diff --git a/internal/generated/intercom/client.gen.go b/internal/generated/intercom/client.gen.go index 16c56ee..7975244 100644 --- a/internal/generated/intercom/client.gen.go +++ b/internal/generated/intercom/client.gen.go @@ -4288,16 +4288,18 @@ func (e SideConversationListType) Valid() bool { // Defines values for SingleFilterSearchRequestOperator. const ( - SingleFilterSearchRequestOperatorCaret SingleFilterSearchRequestOperator = "^" - SingleFilterSearchRequestOperatorDollarSign SingleFilterSearchRequestOperator = "$" - SingleFilterSearchRequestOperatorEmpty SingleFilterSearchRequestOperator = "!=" - SingleFilterSearchRequestOperatorEqual SingleFilterSearchRequestOperator = "=" - SingleFilterSearchRequestOperatorGreaterThan SingleFilterSearchRequestOperator = ">" - SingleFilterSearchRequestOperatorIN SingleFilterSearchRequestOperator = "IN" - SingleFilterSearchRequestOperatorLessThan SingleFilterSearchRequestOperator = "<" - SingleFilterSearchRequestOperatorN1 SingleFilterSearchRequestOperator = "!~" - SingleFilterSearchRequestOperatorNIN SingleFilterSearchRequestOperator = "NIN" - SingleFilterSearchRequestOperatorTilde SingleFilterSearchRequestOperator = "~" + SingleFilterSearchRequestOperatorCaret SingleFilterSearchRequestOperator = "^" + SingleFilterSearchRequestOperatorDollarSign SingleFilterSearchRequestOperator = "$" + SingleFilterSearchRequestOperatorEmpty SingleFilterSearchRequestOperator = "!=" + SingleFilterSearchRequestOperatorEqual SingleFilterSearchRequestOperator = "=" + SingleFilterSearchRequestOperatorGreaterThan SingleFilterSearchRequestOperator = ">" + SingleFilterSearchRequestOperatorGreaterThanEqual SingleFilterSearchRequestOperator = ">=" + SingleFilterSearchRequestOperatorIN SingleFilterSearchRequestOperator = "IN" + SingleFilterSearchRequestOperatorLessThan SingleFilterSearchRequestOperator = "<" + SingleFilterSearchRequestOperatorLessThanEqual SingleFilterSearchRequestOperator = "<=" + SingleFilterSearchRequestOperatorN1 SingleFilterSearchRequestOperator = "!~" + SingleFilterSearchRequestOperatorNIN SingleFilterSearchRequestOperator = "NIN" + SingleFilterSearchRequestOperatorTilde SingleFilterSearchRequestOperator = "~" ) // Valid indicates whether the value is a known member of the SingleFilterSearchRequestOperator enum. @@ -4313,10 +4315,14 @@ func (e SingleFilterSearchRequestOperator) Valid() bool { return true case SingleFilterSearchRequestOperatorGreaterThan: return true + case SingleFilterSearchRequestOperatorGreaterThanEqual: + return true case SingleFilterSearchRequestOperatorIN: return true case SingleFilterSearchRequestOperatorLessThan: return true + case SingleFilterSearchRequestOperatorLessThanEqual: + return true case SingleFilterSearchRequestOperatorN1: return true case SingleFilterSearchRequestOperatorNIN: @@ -8536,7 +8542,7 @@ type ConversationPartSchema struct { // AppPackageCode The app package code if this part was created via API. null if the part was not created via API. AppPackageCode *string `json:"app_package_code,omitempty"` - // AssignedTo The id of the admin that was assigned the conversation by this conversation_part (null if there has been no change in assignment.) + // AssignedTo The assignee this conversation_part assigned the conversation to, as a reference whose `type` is `admin`, `team` or `bot`. When the part unassigned the conversation, `type` is `nobody_admin` and `id` is `null`. Null when the part did not change the assignment, or when the assignee has since been deleted. AssignedTo *ReferenceSchema `json:"assigned_to,omitempty"` // Attachments A list of attachments for the part. @@ -12389,14 +12395,24 @@ type SingleFilterSearchRequestSchema struct { // Field The accepted field that you want to search on. Field *string `json:"field,omitempty"` - // Operator The accepted operators you can use to define how you want to search for the value. + // Operator The accepted operators you can use to define how you want to search for the value. Operator support depends on the field's data type. The breakdown below is for Contacts search; the other search endpoints that share this schema accept a different set per field: + // - `string` fields: `=`, `!=`, `IN`, `NIN`, `~`, `!~`, `^`, `$` + // - `tag_id`: `=` and `!=` only. Every other operator returns an error. + // - `boolean` fields: `=`, `!=`, `IN`, `NIN` + // - `integer` fields: `=`, `!=`, `IN`, `NIN`, `<`, `>`, `<=`, `>=` + // - `date` fields (all standard timestamp attributes and date custom attributes): `=`, `<`, `>` only. `!=`, `<=`, `>=`, `IN`, and `NIN` are not supported and return an error. Operator *SingleFilterSearchRequestOperator `json:"operator,omitempty"` // Value The value that you want to search on. Value *SingleFilterSearchRequest_Value `json:"value,omitempty"` } -// SingleFilterSearchRequestOperator The accepted operators you can use to define how you want to search for the value. +// SingleFilterSearchRequestOperator The accepted operators you can use to define how you want to search for the value. Operator support depends on the field's data type. The breakdown below is for Contacts search; the other search endpoints that share this schema accept a different set per field: +// - `string` fields: `=`, `!=`, `IN`, `NIN`, `~`, `!~`, `^`, `$` +// - `tag_id`: `=` and `!=` only. Every other operator returns an error. +// - `boolean` fields: `=`, `!=`, `IN`, `NIN` +// - `integer` fields: `=`, `!=`, `IN`, `NIN`, `<`, `>`, `<=`, `>=` +// - `date` fields (all standard timestamp attributes and date custom attributes): `=`, `<`, `>` only. `!=`, `<=`, `>=`, `IN`, and `NIN` are not supported and return an error. type SingleFilterSearchRequestOperator string // SingleFilterSearchRequestValue0 defines model for . @@ -12853,7 +12869,7 @@ type TicketPartSchema struct { // AppPackageCode 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. AppPackageCode *string `json:"app_package_code,omitempty"` - // AssignedTo The id of the admin that was assigned the ticket by this ticket_part (null if there has been no change in assignment.) + // AssignedTo The assignee this ticket_part assigned the ticket to, as a reference whose `type` is `admin`, `team` or `bot`. When the part unassigned the ticket, `type` is `nobody_admin` and `id` is `null`. Null when the part did not change the assignment, or when the assignee has since been deleted. AssignedTo *ReferenceSchema `json:"assigned_to,omitempty"` // Attachments A list of attachments for the part. @@ -13281,7 +13297,7 @@ type UpdateArticleRequestSchema struct { // ScheduledUnpublishAt ISO 8601 timestamp at which to schedule a future unpublish of the article. Setting `null` cancels a pending unpublish schedule. Timestamps in the past or equal to the current time are rejected with 400 `parameter_invalid` — the value must be strictly in the future. Rejected with 400 `parameter_invalid` if the article has never been published. Sending in the same request as `scheduled_publish_at` returns 400 — only one pending schedule per article. Empty string returns 400 `parameter_invalid`. ScheduledUnpublishAt *time.Time `json:"scheduled_unpublish_at,omitempty"` - // State Whether the article will be `published` or will be a `draft`. Defaults to draft. For multilingual articles, this will be the state of the default language's content. + // State Whether the article will be `published` or will be a `draft`. Omitting this field leaves the publish state unchanged, so a draft stays a draft and an edit to a published article goes live immediately unless that article already has a pending draft or a scheduled publish time is set in the same request. The `PUT /articles/{id}/draft` endpoint ignores this field and always stages a draft. For multilingual articles, this will be the state of the default language's content. State *UpdateArticleRequestState `json:"state,omitempty"` // Title The title of the article.For multilingual articles, this will be the title of the default language's content. @@ -13289,7 +13305,7 @@ type UpdateArticleRequestSchema struct { TranslatedContent *ArticleTranslatedContentSchema `json:"translated_content,omitempty"` } -// UpdateArticleRequestState Whether the article will be `published` or will be a `draft`. Defaults to draft. For multilingual articles, this will be the state of the default language's content. +// UpdateArticleRequestState Whether the article will be `published` or will be a `draft`. Omitting this field leaves the publish state unchanged, so a draft stays a draft and an edit to a published article goes live immediately unless that article already has a pending draft or a scheduled publish time is set in the same request. The `PUT /articles/{id}/draft` endpoint ignores this field and always stages a draft. For multilingual articles, this will be the state of the default language's content. type UpdateArticleRequestState string // UpdateAudienceRequestSchema The request payload for updating an audience. All fields are optional — only provided fields will be updated. diff --git a/spec/intercom.openapi.yaml b/spec/intercom.openapi.yaml index 5b27176..76e8733 100644 --- a/spec/intercom.openapi.yaml +++ b/spec/intercom.openapi.yaml @@ -8742,10 +8742,23 @@ paths: ### Searching for Timestamp Fields - All timestamp fields (created_at, updated_at etc.) are filtered by UTC calendar day in Contact Search. An equality (=) query on a timestamp matches any contact whose value falls on the same UTC day, so filtering by a value the API returned reliably matches that contact regardless of your workspace's timezone. Comparisons (>, <) are evaluated at UTC day granularity. - For example, if you search for all Contacts with a created_at value greater (>) than 1577869200 (the UNIX timestamp for January 1st, 2020 9:00 AM UTC), that will be interpreted as 1577836800 (January 1st, 2020 12:00 AM UTC). The search results will then include Contacts created from January 2nd, 2020 12:00 AM UTC onwards. - If you'd like to get contacts created on January 1st, 2020 (UTC) you should search with a created_at value equal (=) to 1577836800 (January 1st, 2020 12:00 AM UTC). - This behaviour applies only to timestamps used in search queries. The search results will still contain the full UNIX timestamp and be sorted accordingly. + Timestamp fields (`created_at`, `updated_at` etc.) and Date custom attributes are matched by calendar day. Sub-day precision (hour, minute, second) is not supported. + + The day boundary uses **your workspace's timezone**, so the same query can return different results on two workspaces in different timezones. + + Because the value is truncated to a day: + + * `=` matches the whole day. + * `>` matches from the start of the *next* day, not from the instant you passed. + * `<` matches everything before the start of that day. + + The `!=`, `>=`, `<=`, `IN` and `NIN` operators are not supported on Date fields and return an error. + + **Example**, on a workspace set to UTC. Searching for `created_at` greater than `1577869200` (January 1st, 2020 9:00 AM UTC) truncates that value to `1577836800` (January 1st, 2020 12:00 AM UTC). Because `>` starts at the next day, the results begin from January 2nd, 2020 12:00 AM UTC - not from 9:00 AM on January 1st. On a workspace in another timezone, the boundaries fall on that timezone's midnight instead. + + To get contacts created on January 1st, 2020, search for `created_at` equal to `1577836800`. + + Only search queries behave this way. Responses still carry the full UNIX timestamp, and sorting uses the full value. ### Accepted Fields @@ -8799,24 +8812,26 @@ paths: ### Accepted Operators - {% admonition type="warning" name="Searching based on `created_at`" %} - You cannot use the `<=` or `>=` operators to search by `created_at`. + {% admonition type="warning" name="Operators not supported on Date fields" %} + Date fields (`created_at`, `updated_at`, and any Date custom attribute) do not support the `!=`, `>=`, or `<=` operators. Using them returns an error. {% /admonition %} - The table below shows the operators you can use to define how you want to search for the value. The operator should be put in as a string (`"="`). The operator has to be compatible with the field's type (eg. you cannot search with `>` for a given string value as it's only compatible for integer's and dates). + The table below shows the operators you can use to define how you want to search for the value. The operator should be put in as a string (`"="`). Which operators are valid depends on the field's type - see the "Valid Types" column below. Searching by `tag_id` supports only the `=` and `!=` operators. - | Operator | Valid Types | Description | - | :------- | :------------------------------- | :--------------------------------------------------------------- | - | = | All | Equals | - | != | All | Doesn't Equal | - | IN | All | In
Shortcut for `OR` queries
Values must be in Array | - | NIN | All | Not In
Shortcut for `OR !` queries
Values must be in Array | - | > | Integer
Date (UNIX Timestamp) | Greater than | - | < | Integer
Date (UNIX Timestamp) | Lower than | - | ~ | String | Contains | - | !~ | String | Doesn't Contain | - | ^ | String | Starts With | - | $ | String | Ends With | + | Operator | Valid Types | Description | + | :------- | :---------------------------------- | :----------------------------------------------------------------------| + | = | All | Equals | + | != | All except Date | Doesn't Equal | + | IN | All except Date and tag_id | In
Shortcut for `OR` queries
Values must be in Array | + | NIN | All except Date and tag_id | Not In
Shortcut for `OR !` queries
Values must be in Array | + | > | Integer
Date | Greater than
On Date fields, matches from the start of the next day | + | < | Integer
Date | Lower than
On Date fields, matches before the start of the day | + | >= | Integer | Greater than or equal to
Not supported on Date fields | + | <= | Integer | Lower than or equal to
Not supported on Date fields | + | ~ | String | Contains | + | !~ | String | Doesn't Contain | + | ^ | String | Starts With | + | $ | String | Ends With | responses: '200': description: successful @@ -8908,7 +8923,7 @@ paths: Contacts that have been merged (via POST /contacts/merge) will not appear in list results. Only the target contact from the merge remains accessible. {% /admonition %} {% admonition type="warning" name="Pagination" %} - You can use pagination to limit the number of results returned. The default is `50` results per page. + You can use pagination to limit the number of results returned. The default is `10` results per page, with a maximum of `150`. See the [pagination section](https://developers.intercom.com/docs/build-an-integration/learn-more/rest-apis/pagination/#pagination-for-list-apis) for more details on how to use the `starting_after` param. {% /admonition %} responses: @@ -11058,8 +11073,6 @@ paths: updated_at: 1663597260 notified_at: 1663597260 assigned_to: - type: contact - id: '1a2b3c' author: type: admin id: '274' @@ -12863,26 +12876,18 @@ paths: summary: Detach a contact from a group conversation value: admin_id: 991267739 - customer: - intercom_user_id: 6762f1a61bb69f9f2193bbd8 conversation_not_found: summary: Conversation not found value: admin_id: 991267742 - customer: - intercom_user_id: 6762f1b61bb69f9f2193bbe1 contact_not_found: summary: Contact not found value: admin_id: 991267745 - customer: - intercom_user_id: 6762f1c41bb69f9f2193bbe9 last_customer: summary: Last customer value: admin_id: 991267748 - customer: - intercom_user_id: 6762f1d11bb69f9f2193bbf1 "/conversations/{id}/handling_events": get: summary: List handling events @@ -27249,8 +27254,10 @@ components: assigned_to: "$ref": "#/components/schemas/reference" nullable: true - description: The id of the admin that was assigned the conversation by this - conversation_part (null if there has been no change in assignment.) + description: The assignee this conversation_part assigned the conversation to, as + a reference whose `type` is `admin`, `team` or `bot`. When the part unassigned + the conversation, `type` is `nobody_admin` and `id` is `null`. Null when the + part did not change the assignment, or when the assignee has since been deleted. author: "$ref": "#/components/schemas/conversation_part_author" attachments: @@ -33288,13 +33295,20 @@ components: - IN - NIN - "<" + - "<=" - ">" + - ">=" - "~" - "!~" - "^" - "$" - description: The accepted operators you can use to define how you want to - search for the value. + description: |- + The accepted operators you can use to define how you want to search for the value. Operator support depends on the field's data type. The breakdown below is for Contacts search; the other search endpoints that share this schema accept a different set per field: + - `string` fields: `=`, `!=`, `IN`, `NIN`, `~`, `!~`, `^`, `$` + - `tag_id`: `=` and `!=` only. Every other operator returns an error. + - `boolean` fields: `=`, `!=`, `IN`, `NIN` + - `integer` fields: `=`, `!=`, `IN`, `NIN`, `<`, `>`, `<=`, `>=` + - `date` fields (all standard timestamp attributes and date custom attributes): `=`, `<`, `>` only. `!=`, `<=`, `>=`, `IN`, and `NIN` are not supported and return an error. example: ">" value: oneOf: @@ -33951,8 +33965,10 @@ components: assigned_to: "$ref": "#/components/schemas/reference" nullable: true - description: The id of the admin that was assigned the ticket by this ticket_part - (null if there has been no change in assignment.) + description: The assignee this ticket_part assigned the ticket to, as a reference + whose `type` is `admin`, `team` or `bot`. When the part unassigned the ticket, + `type` is `nobody_admin` and `id` is `null`. Null when the part did not change + the assignment, or when the assignee has since been deleted. author: "$ref": "#/components/schemas/ticket_part_author" attachments: @@ -34590,8 +34606,12 @@ components: state: type: string description: Whether the article will be `published` or will be a `draft`. - Defaults to draft. For multilingual articles, this will be the state of - the default language's content. + Omitting this field leaves the publish state unchanged, so a draft stays + a draft and an edit to a published article goes live immediately unless + that article already has a pending draft or a scheduled publish time is + set in the same request. The `PUT /articles/{id}/draft` endpoint ignores + this field and always stages a draft. For multilingual articles, this + will be the state of the default language's content. enum: - published - draft diff --git a/spec/metadata.json b/spec/metadata.json index 32d7fcf..cafb244 100644 --- a/spec/metadata.json +++ b/spec/metadata.json @@ -1,7 +1,7 @@ { - "source": "https://github.com/intercom/Intercom-OpenAPI/blob/5662b2ec2ab3626b9e54ef5e89f7b7be4931391f/descriptions/2.16/api.intercom.io.yaml", + "source": "https://github.com/intercom/Intercom-OpenAPI/blob/32e9c498ecb385b1b745238604918d2a947b4a40/descriptions/2.16/api.intercom.io.yaml", "upstreamRepository": "intercom/Intercom-OpenAPI", "upstreamPath": "descriptions/2.16/api.intercom.io.yaml", - "upstreamCommit": "5662b2ec2ab3626b9e54ef5e89f7b7be4931391f", + "upstreamCommit": "32e9c498ecb385b1b745238604918d2a947b4a40", "apiVersion": "2.16" }