From b47d527054d1da007a0b672b3718b4afbbe14fa9 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 16 Oct 2025 02:58:11 +0000 Subject: [PATCH 1/2] ## Python SDK Changes Detected: * `glean.client.messages.retrieve()`: `request.datasource` **Changed** **Breaking** :warning: --- .speakeasy/gen.lock | 10 +++++----- .speakeasy/gen.yaml | 2 +- .speakeasy/glean-merged-spec.yaml | 5 ++++- .speakeasy/workflow.lock | 12 +++++------ RELEASES.md | 12 ++++++++++- docs/models/datasource.md | 4 +++- docs/models/messagesrequest.md | 2 +- docs/sdks/messages/README.md | 4 ++-- pyproject.toml | 2 +- speakeasyusagegen/.speakeasy/logs/naming.log | 2 +- src/glean/api_client/_version.py | 4 ++-- src/glean/api_client/messages.py | 8 ++++---- .../api_client/models/messagesrequest.py | 14 +++++++------ .../pathpostrestapiv1createcollection.go | 20 +++++++++---------- .../handler/pathpostrestapiv1getchat.go | 4 ++-- .../sdk/models/components/messagesrequest.go | 16 ++++++++++----- tests/test_messages.py | 5 ++++- tests/test_summarize.py | 8 +++----- 18 files changed, 79 insertions(+), 55 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 5fab9a9b..d6b1ff0a 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 3e3290ca-0ee8-4981-b1bc-14536048fa63 management: - docChecksum: ef00a2f5125097d9f584f0bbb5436f00 + docChecksum: 5a4cd8de1e6ca5f701ac27e244d09799 docVersion: 0.9.0 speakeasyVersion: 1.636.3 generationVersion: 2.723.11 - releaseVersion: 0.10.2 - configChecksum: 0df6a87cbbcb2fcac2bba9f5d9a53017 + releaseVersion: 0.10.3 + configChecksum: e07c2e6f4cf5159e031335490e5f2f34 repoURL: https://github.com/gleanwork/api-client-python.git installationURL: https://github.com/gleanwork/api-client-python.git published: true @@ -2195,7 +2195,7 @@ examples: messages: speakeasy-default-messages: requestBody: - application/json: {"idType": "CONVERSATION_ID", "id": ""} + application/json: {"idType": "CONVERSATION_ID", "id": "", "datasource": "GCHAT"} responses: "200": application/json: {"hasMore": true, "searchResponse": {"trackingToken": "trackingToken", "results": [{"title": "title", "url": "https://www.example.com/", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}]}, {"title": "title", "url": "https://www.example.com/", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}]}], "errorInfo": {"errorMessages": [{"source": "gmail", "errorMessage": "invalid token"}, {"source": "slack", "errorMessage": "expired token"}]}, "requestID": "5e345ae500ff0befa2b9d1a3ba0001737e7363696f312d323535323137000171756572792d656e64706f696e743a323032303031333074313830343032000100", "facetResults": [{"sourceName": "sourceName", "operatorName": "operatorName", "buckets": [{"count": 1, "percentage": 5, "value": {"stringValue": "stringValue", "integerValue": 5}}, {"count": 1, "percentage": 5, "value": {"stringValue": "stringValue", "integerValue": 5}}]}, {"sourceName": "sourceName", "operatorName": "operatorName", "buckets": [{"count": 1, "percentage": 5, "value": {"stringValue": "stringValue", "integerValue": 5}}, {"count": 1, "percentage": 5, "value": {"stringValue": "stringValue", "integerValue": 5}}]}], "rewrittenFacetFilters": [{"fieldName": "fieldName", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Spreadsheet", "relationType": "EQUALS"}]}, {"fieldName": "fieldName", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Spreadsheet", "relationType": "EQUALS"}]}], "hasMoreResults": true}, "rootMessage": {"title": "title", "url": "https://example.com/foo/bar", "nativeAppUrl": "slack://foo/bar", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}], "mustIncludeSuggestions": {"suggestions": [{"query": "app:github type:pull author:mortimer", "label": "Mortimer's PRs", "datasource": "github"}], "person": {"name": "George Clooney", "obfuscatedId": "abc123"}}}} @@ -2744,4 +2744,4 @@ generatedTests: updateshortcut: "2025-06-12T19:13:52-04:00" releaseNotes: | ## Python SDK Changes Detected: - * `glean.client.search.retrieve_feed()`: `response.results.[].primary_entry.digest.sections.[].updates.[].urls` **Added** + * `glean.client.messages.retrieve()`: `request.datasource` **Changed** **Breaking** :warning: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 9accbce2..df6d7da2 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -27,7 +27,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true python: - version: 0.10.2 + version: 0.10.3 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index 08638fae..aea85d72 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -8774,6 +8774,7 @@ components: required: - id - idType + - datasource properties: idType: type: string @@ -8805,9 +8806,11 @@ components: type: string enum: - SLACK + - SLACKENTGRID - MICROSOFTTEAMS + - GCHAT - FACEBOOKWORKPLACE - description: The type of the data source. Missing field defaults to SLACK. + description: The type of the data source. datasourceInstanceDisplayName: type: string description: The datasource instance display name from which the document was extracted. This is used for appinstance facet filter for datasources that support multiple instances. diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 0a5087ac..335f8e55 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,11 +2,11 @@ speakeasyVersion: 1.636.3 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:784ebb76d989e40e13173fd5583545b5c83afb48be4d97b2c129cc90e2998f3f - sourceBlobDigest: sha256:7d1478805de16c63a0e5c784706e64b229cb94f7e0b4d438aa52f764be944544 + sourceRevisionDigest: sha256:1dc42ac3d5012271bce5ddf879010efb2f292ded5ce08d224bb1cd28fcc4558d + sourceBlobDigest: sha256:fa9263107a00a7b99c1ea0d1c0100757e4abad76b9156a0c98186da8953f8f16 tags: - latest - - speakeasy-sdk-regen-1760121026 + - speakeasy-sdk-regen-1760583312 Glean Client API: sourceNamespace: glean-client-api sourceRevisionDigest: sha256:4edc63ad559e4f2c9fb9ebf5edaaaaa9269f1874d271cfd84b441d6dacac43d2 @@ -17,10 +17,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:784ebb76d989e40e13173fd5583545b5c83afb48be4d97b2c129cc90e2998f3f - sourceBlobDigest: sha256:7d1478805de16c63a0e5c784706e64b229cb94f7e0b4d438aa52f764be944544 + sourceRevisionDigest: sha256:1dc42ac3d5012271bce5ddf879010efb2f292ded5ce08d224bb1cd28fcc4558d + sourceBlobDigest: sha256:fa9263107a00a7b99c1ea0d1c0100757e4abad76b9156a0c98186da8953f8f16 codeSamplesNamespace: glean-api-specs-python-code-samples - codeSamplesRevisionDigest: sha256:0c78dc6fe3fd8e0ce3f9c12806901702b8ee76b252cce8dd81e313f35a75635f + codeSamplesRevisionDigest: sha256:c0d827ef14785e6dd39b1db016e2957246cd2c73a71693fd1ef691f7878c7917 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/RELEASES.md b/RELEASES.md index 6f6dd7ec..ca377ab6 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -298,4 +298,14 @@ Based on: ### Generated - [python v0.10.2] . ### Releases -- [PyPI v0.10.2] https://pypi.org/project/glean/0.10.2 - . \ No newline at end of file +- [PyPI v0.10.2] https://pypi.org/project/glean/0.10.2 - . + +## 2025-10-16 02:54:45 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.636.3 (2.723.11) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.10.3] . +### Releases +- [PyPI v0.10.3] https://pypi.org/project/glean/0.10.3 - . \ No newline at end of file diff --git a/docs/models/datasource.md b/docs/models/datasource.md index 7c145c8e..154a81d3 100644 --- a/docs/models/datasource.md +++ b/docs/models/datasource.md @@ -1,6 +1,6 @@ # Datasource -The type of the data source. Missing field defaults to SLACK. +The type of the data source. ## Values @@ -8,5 +8,7 @@ The type of the data source. Missing field defaults to SLACK. | Name | Value | | ------------------- | ------------------- | | `SLACK` | SLACK | +| `SLACKENTGRID` | SLACKENTGRID | | `MICROSOFTTEAMS` | MICROSOFTTEAMS | +| `GCHAT` | GCHAT | | `FACEBOOKWORKPLACE` | FACEBOOKWORKPLACE | \ No newline at end of file diff --git a/docs/models/messagesrequest.md b/docs/models/messagesrequest.md index 5278772a..4e064fdd 100644 --- a/docs/models/messagesrequest.md +++ b/docs/models/messagesrequest.md @@ -11,5 +11,5 @@ | `direction` | [Optional[models.Direction]](../models/direction.md) | :heavy_minus_sign: | The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. | | `timestamp_millis` | *Optional[int]* | :heavy_minus_sign: | Timestamp in millis of the reference message. Only applicable when using a message_id. | | `include_root_message` | *Optional[bool]* | :heavy_minus_sign: | Whether to include root message in response. | -| `datasource` | [Optional[models.Datasource]](../models/datasource.md) | :heavy_minus_sign: | The type of the data source. Missing field defaults to SLACK. | +| `datasource` | [models.Datasource](../models/datasource.md) | :heavy_check_mark: | The type of the data source. | | `datasource_instance_display_name` | *Optional[str]* | :heavy_minus_sign: | The datasource instance display name from which the document was extracted. This is used for appinstance facet filter for datasources that support multiple instances. | \ No newline at end of file diff --git a/docs/sdks/messages/README.md b/docs/sdks/messages/README.md index d7cbe960..3cf9519d 100644 --- a/docs/sdks/messages/README.md +++ b/docs/sdks/messages/README.md @@ -23,7 +23,7 @@ with Glean( api_token=os.getenv("GLEAN_API_TOKEN", ""), ) as glean: - res = glean.client.messages.retrieve(id_type=models.IDType.CONVERSATION_ID, id="") + res = glean.client.messages.retrieve(id_type=models.IDType.CONVERSATION_ID, id="", datasource=models.Datasource.GCHAT) # Handle response print(res) @@ -36,11 +36,11 @@ with Glean( | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id_type` | [models.IDType](../../models/idtype.md) | :heavy_check_mark: | Type of the id in the incoming request. | | `id` | *str* | :heavy_check_mark: | ID corresponding to the requested idType. Note that channel and threads are represented by the underlying datasource's ID and conversations are represented by their document's ID. | +| `datasource` | [models.Datasource](../../models/datasource.md) | :heavy_check_mark: | The type of the data source. | | `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Id for the for the workspace in case of multiple workspaces. | | `direction` | [Optional[models.Direction]](../../models/direction.md) | :heavy_minus_sign: | The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. | | `timestamp_millis` | *Optional[int]* | :heavy_minus_sign: | Timestamp in millis of the reference message. Only applicable when using a message_id. | | `include_root_message` | *Optional[bool]* | :heavy_minus_sign: | Whether to include root message in response. | -| `datasource` | [Optional[models.Datasource]](../../models/datasource.md) | :heavy_minus_sign: | The type of the data source. Missing field defaults to SLACK. | | `datasource_instance_display_name` | *Optional[str]* | :heavy_minus_sign: | The datasource instance display name from which the document was extracted. This is used for appinstance facet filter for datasources that support multiple instances. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | diff --git a/pyproject.toml b/pyproject.toml index 912b7de5..3a401d37 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "glean-api-client" -version = "0.10.2" +version = "0.10.3" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Glean Technologies, Inc." }] license = "MIT" diff --git a/speakeasyusagegen/.speakeasy/logs/naming.log b/speakeasyusagegen/.speakeasy/logs/naming.log index 8096515a..eef6e0bb 100644 --- a/speakeasyusagegen/.speakeasy/logs/naming.log +++ b/speakeasyusagegen/.speakeasy/logs/naming.log @@ -768,7 +768,7 @@ Messages (SDK empty) MessagesRequest (idType: enum, id: string, workspaceId: string ...) IdType (enum: CHANNEL_NAME, THREAD_ID, CONVERSATION_ID) Direction (enum: OLDER, NEWER) - Datasource (enum: SLACK, MICROSOFTTEAMS, FACEBOOKWORKPLACE) + Datasource (enum: SLACK, SLACKENTGRID, MICROSOFTTEAMS ...) MessagesResponse (HttpMeta: HTTPMetadata, MessagesResponse: MessagesResponse) MessagesResponse (hasMore: boolean, searchResponse: SearchResponse, rootMessage: SearchResult) SearchResponse (trackingToken: string, sessionInfo: SessionInfo, results: array ...) diff --git a/src/glean/api_client/_version.py b/src/glean/api_client/_version.py index e331b560..ddd34f57 100644 --- a/src/glean/api_client/_version.py +++ b/src/glean/api_client/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "glean" -__version__: str = "0.10.2" +__version__: str = "0.10.3" __openapi_doc_version__: str = "0.9.0" __gen_version__: str = "2.723.11" -__user_agent__: str = "speakeasy-sdk/python 0.10.2 2.723.11 0.9.0 glean" +__user_agent__: str = "speakeasy-sdk/python 0.10.3 2.723.11 0.9.0 glean" try: if __package__ is not None: diff --git a/src/glean/api_client/messages.py b/src/glean/api_client/messages.py index 59102bde..574ea7f3 100644 --- a/src/glean/api_client/messages.py +++ b/src/glean/api_client/messages.py @@ -15,11 +15,11 @@ def retrieve( *, id_type: models.IDType, id: str, + datasource: models.Datasource, workspace_id: Optional[str] = None, direction: Optional[models.Direction] = None, timestamp_millis: Optional[int] = None, include_root_message: Optional[bool] = None, - datasource: Optional[models.Datasource] = None, datasource_instance_display_name: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -32,11 +32,11 @@ def retrieve( :param id_type: Type of the id in the incoming request. :param id: ID corresponding to the requested idType. Note that channel and threads are represented by the underlying datasource's ID and conversations are represented by their document's ID. + :param datasource: The type of the data source. :param workspace_id: Id for the for the workspace in case of multiple workspaces. :param direction: The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. :param timestamp_millis: Timestamp in millis of the reference message. Only applicable when using a message_id. :param include_root_message: Whether to include root message in response. - :param datasource: The type of the data source. Missing field defaults to SLACK. :param datasource_instance_display_name: The datasource instance display name from which the document was extracted. This is used for appinstance facet filter for datasources that support multiple instances. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -122,11 +122,11 @@ async def retrieve_async( *, id_type: models.IDType, id: str, + datasource: models.Datasource, workspace_id: Optional[str] = None, direction: Optional[models.Direction] = None, timestamp_millis: Optional[int] = None, include_root_message: Optional[bool] = None, - datasource: Optional[models.Datasource] = None, datasource_instance_display_name: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -139,11 +139,11 @@ async def retrieve_async( :param id_type: Type of the id in the incoming request. :param id: ID corresponding to the requested idType. Note that channel and threads are represented by the underlying datasource's ID and conversations are represented by their document's ID. + :param datasource: The type of the data source. :param workspace_id: Id for the for the workspace in case of multiple workspaces. :param direction: The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. :param timestamp_millis: Timestamp in millis of the reference message. Only applicable when using a message_id. :param include_root_message: Whether to include root message in response. - :param datasource: The type of the data source. Missing field defaults to SLACK. :param datasource_instance_display_name: The datasource instance display name from which the document was extracted. This is used for appinstance facet filter for datasources that support multiple instances. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method diff --git a/src/glean/api_client/models/messagesrequest.py b/src/glean/api_client/models/messagesrequest.py index 07b71075..38b97077 100644 --- a/src/glean/api_client/models/messagesrequest.py +++ b/src/glean/api_client/models/messagesrequest.py @@ -24,10 +24,12 @@ class Direction(str, Enum): class Datasource(str, Enum): - r"""The type of the data source. Missing field defaults to SLACK.""" + r"""The type of the data source.""" SLACK = "SLACK" + SLACKENTGRID = "SLACKENTGRID" MICROSOFTTEAMS = "MICROSOFTTEAMS" + GCHAT = "GCHAT" FACEBOOKWORKPLACE = "FACEBOOKWORKPLACE" @@ -36,6 +38,8 @@ class MessagesRequestTypedDict(TypedDict): r"""Type of the id in the incoming request.""" id: str r"""ID corresponding to the requested idType. Note that channel and threads are represented by the underlying datasource's ID and conversations are represented by their document's ID.""" + datasource: Datasource + r"""The type of the data source.""" workspace_id: NotRequired[str] r"""Id for the for the workspace in case of multiple workspaces.""" direction: NotRequired[Direction] @@ -44,8 +48,6 @@ class MessagesRequestTypedDict(TypedDict): r"""Timestamp in millis of the reference message. Only applicable when using a message_id.""" include_root_message: NotRequired[bool] r"""Whether to include root message in response.""" - datasource: NotRequired[Datasource] - r"""The type of the data source. Missing field defaults to SLACK.""" datasource_instance_display_name: NotRequired[str] r"""The datasource instance display name from which the document was extracted. This is used for appinstance facet filter for datasources that support multiple instances.""" @@ -57,6 +59,9 @@ class MessagesRequest(BaseModel): id: str r"""ID corresponding to the requested idType. Note that channel and threads are represented by the underlying datasource's ID and conversations are represented by their document's ID.""" + datasource: Datasource + r"""The type of the data source.""" + workspace_id: Annotated[Optional[str], pydantic.Field(alias="workspaceId")] = None r"""Id for the for the workspace in case of multiple workspaces.""" @@ -73,9 +78,6 @@ class MessagesRequest(BaseModel): ] = None r"""Whether to include root message in response.""" - datasource: Optional[Datasource] = None - r"""The type of the data source. Missing field defaults to SLACK.""" - datasource_instance_display_name: Annotated[ Optional[str], pydantic.Field(alias="datasourceInstanceDisplayName") ] = None diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go b/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go index 371b9023..5c99a0ad 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go @@ -56,14 +56,14 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ operations.ResponseBody2{ Collection: &components.Collection{ Name: "", - Description: "whole busily jive hawk gee basic minus hence", + Description: "motionless whenever paintwork import over cuckoo", AddedRoles: []components.UserRoleSpecification{ components.UserRoleSpecification{ Person: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", }, - Role: components.UserRoleAnswerModerator, + Role: components.UserRoleOwner, }, }, RemovedRoles: []components.UserRoleSpecification{ @@ -90,7 +90,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ID: 158969, + ID: 363711, Creator: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -101,7 +101,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, Items: []components.CollectionItem{ components.CollectionItem{ - CollectionID: 110375, + CollectionID: 570197, CreatedBy: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -266,13 +266,13 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ Name: "George Clooney", ObfuscatedID: "abc123", }, - Role: components.UserRoleEditor, + Role: components.UserRoleAnswerModerator, }, }, }, Collection: &components.Collection{ Name: "", - Description: "wedge colorfully orientate rally", + Description: "athwart skateboard newsstand farm bourgeoisie ah how elliptical aha well-to-do", AudienceFilters: []components.FacetFilter{ components.FacetFilter{ FieldName: types.String("type"), @@ -288,7 +288,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ID: 131797, + ID: 643990, Creator: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -300,7 +300,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ Children: []components.Collection{ components.Collection{ Name: "", - Description: "outside yippee sidetrack mature regularly mouser inject worth", + Description: "woot purse salty even as advanced", AudienceFilters: []components.FacetFilter{ components.FacetFilter{ FieldName: types.String("type"), @@ -316,7 +316,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ID: 149448, + ID: 359978, Creator: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -328,7 +328,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ItemType: components.CollectionItemItemTypeCollection, + ItemType: components.CollectionItemItemTypeURL, }, }, }, diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go b/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go index f8469b5b..35e69d35 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go @@ -628,8 +628,8 @@ func testGetchatGetchat0(w http.ResponseWriter, req *http.Request) { Roles: []components.UserRoleSpecification{}, SourceDocumentSpec: types.Pointer(components.CreateDocumentSpecUnionDocumentSpec3( components.DocumentSpec3{ - UgcType: components.DocumentSpecUgcType1Announcements, - ContentID: 848009, + UgcType: components.DocumentSpecUgcType1Shortcuts, + ContentID: 602763, }, )), SourceType: components.AnswerSourceTypeAssistant.ToPointer(), diff --git a/tests/mockserver/internal/sdk/models/components/messagesrequest.go b/tests/mockserver/internal/sdk/models/components/messagesrequest.go index e7c80836..a778dc51 100644 --- a/tests/mockserver/internal/sdk/models/components/messagesrequest.go +++ b/tests/mockserver/internal/sdk/models/components/messagesrequest.go @@ -64,12 +64,14 @@ func (e *Direction) UnmarshalJSON(data []byte) error { } } -// Datasource - The type of the data source. Missing field defaults to SLACK. +// Datasource - The type of the data source. type Datasource string const ( DatasourceSlack Datasource = "SLACK" + DatasourceSlackentgrid Datasource = "SLACKENTGRID" DatasourceMicrosoftteams Datasource = "MICROSOFTTEAMS" + DatasourceGchat Datasource = "GCHAT" DatasourceFacebookworkplace Datasource = "FACEBOOKWORKPLACE" ) @@ -84,8 +86,12 @@ func (e *Datasource) UnmarshalJSON(data []byte) error { switch v { case "SLACK": fallthrough + case "SLACKENTGRID": + fallthrough case "MICROSOFTTEAMS": fallthrough + case "GCHAT": + fallthrough case "FACEBOOKWORKPLACE": *e = Datasource(v) return nil @@ -107,8 +113,8 @@ type MessagesRequest struct { TimestampMillis *int64 `json:"timestampMillis,omitempty"` // Whether to include root message in response. IncludeRootMessage *bool `json:"includeRootMessage,omitempty"` - // The type of the data source. Missing field defaults to SLACK. - Datasource *Datasource `json:"datasource,omitempty"` + // The type of the data source. + Datasource Datasource `json:"datasource"` // The datasource instance display name from which the document was extracted. This is used for appinstance facet filter for datasources that support multiple instances. DatasourceInstanceDisplayName *string `json:"datasourceInstanceDisplayName,omitempty"` } @@ -155,9 +161,9 @@ func (o *MessagesRequest) GetIncludeRootMessage() *bool { return o.IncludeRootMessage } -func (o *MessagesRequest) GetDatasource() *Datasource { +func (o *MessagesRequest) GetDatasource() Datasource { if o == nil { - return nil + return Datasource("") } return o.Datasource } diff --git a/tests/test_messages.py b/tests/test_messages.py index 88279ce0..36643db3 100644 --- a/tests/test_messages.py +++ b/tests/test_messages.py @@ -16,6 +16,9 @@ def test_messages_messages(): assert glean is not None res = glean.client.messages.retrieve( - id_type=models.IDType.CONVERSATION_ID, id="", timestamp_millis=558834 + id_type=models.IDType.CONVERSATION_ID, + id="", + datasource=models.Datasource.MICROSOFTTEAMS, + timestamp_millis=558834, ) assert res is not None diff --git a/tests/test_summarize.py b/tests/test_summarize.py index cac8e978..63b4eb85 100644 --- a/tests/test_summarize.py +++ b/tests/test_summarize.py @@ -1,6 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from glean.api_client import Glean, models +from glean.api_client import Glean import os from tests.test_client import create_test_http_client @@ -18,12 +18,10 @@ def test_summarize_summarize(): res = glean.client.documents.summarize( document_specs=[ { - "ugc_type": models.DocumentSpecUgcType1.SHORTCUTS, - "content_id": 602763, + "url": "https://dim-glider.com/", }, { - "ugc_type": models.DocumentSpecUgcType1.SHORTCUTS, - "content_id": 602763, + "id": "", }, ] ) From 6384ce462a7a80f91ea6659ee61e272b9c38f467 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Thu, 16 Oct 2025 02:58:21 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow