diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index f2c1f83..0ca8dc8 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 0359d4fe-2923-46fc-aaca-cf70b48dcfa1 management: - docChecksum: 2ffc5de135d861194642d3cb0a9e3bb4 + docChecksum: 32dd53402e2cd4015df1497391a25ceb docVersion: 0.9.0 - speakeasyVersion: 1.642.1 - generationVersion: 2.731.4 - releaseVersion: 0.11.2 - configChecksum: 31b264d5e634fc5007a0a4711f927b69 + speakeasyVersion: 1.649.0 + generationVersion: 2.739.1 + releaseVersion: 0.11.3 + configChecksum: 8f1c85036091aa8e4fab677c86027b43 repoURL: https://github.com/gleanwork/api-client-java.git published: true features: @@ -14,14 +14,14 @@ features: additionalDependencies: 0.1.0 additionalProperties: 0.0.1 constsAndDefaults: 0.1.1 - core: 3.53.0 + core: 3.55.0 deprecations: 2.81.1 examples: 2.81.6 flattening: 2.81.1 globalSecurity: 2.83.1 globalSecurityCallbacks: 0.1.0 globalSecurityFlattening: 0.1.0 - globalServerURLs: 2.82.2 + globalServerURLs: 2.83.0 groups: 2.81.3 nameOverrides: 2.81.3 sdkHooks: 1.1.0 @@ -2897,6 +2897,3 @@ generatedTests: get_/rest/api/v1/tools/list: "2025-06-09T18:03:44Z" post_/rest/api/v1/tools/call: "2025-06-09T18:03:44Z" listpolicies: "2025-06-09T18:03:44Z" -releaseNotes: | - ## Java SDK Changes Detected: - * `glean.client.insights.retrieve()`: `response.agentsresponse` **Changed** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 8b1b8e0..0ef451d 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -24,7 +24,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 0.11.2 + version: 0.11.3 additionalDependencies: [] additionalPlugins: [] artifactID: glean-api-client diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index 4d2645b..b6102ed 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -7378,7 +7378,7 @@ components: additionalProperties: $ref: "#/components/schemas/WriteActionParameter" ChatMessageFragment: - description: Represents a part of a ChatMessage that originates from a single action/tool. It is designed to support rich data formats beyond simple text, allowing for a more dynamic and interactive chat experience. Each fragment can include various types of content, such as text, search queries, action information, and more. Also, each ChatMessageFragment should only have one of structuredResults, querySuggestion, writeAction, followupAction, agentRecommendation or file. + description: Represents a part of a ChatMessage that originates from a single action/tool. It is designed to support rich data formats beyond simple text, allowing for a more dynamic and interactive chat experience. Each fragment can include various types of content, such as text, search queries, action information, and more. Also, each ChatMessageFragment should only have one of structuredResults, querySuggestion, writeAction, followupAction, agentRecommendation, followupRoutingSuggestion or file. allOf: - $ref: "#/components/schemas/Result" - type: object @@ -11788,7 +11788,8 @@ components: type: array items: $ref: "#/components/schemas/DatasourceObjectTypeDocumentCountEntry" - description: A list of object types and corresponding upload counts + description: | + A list of object types and corresponding upload counts. Note: This data may be cached and could be up to 3 hours stale. indexed: type: array description: The number of documents indexed, grouped by objectType diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index b8d568a..1727e7e 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,12 +1,12 @@ -speakeasyVersion: 1.642.1 +speakeasyVersion: 1.649.0 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:092bfa8d363f0191930191e522b5f72025fec603b0474d9d5d2380b79b356f32 - sourceBlobDigest: sha256:84c15305b5763d040c255114c33c0c78072f77ac102895bf669b71c32f037048 + sourceRevisionDigest: sha256:7365082c1cce88ce70a8d3236d544faf9f251cec5fbae1b45b592acb841b262c + sourceBlobDigest: sha256:65aeb5314d524c7f62b12446b09c7381fb911e9d7c057e230f7f26d85b8e982b tags: - latest - - speakeasy-sdk-regen-1761685683 + - speakeasy-sdk-regen-1762301909 Glean-OAS: sourceNamespace: glean-oas sourceRevisionDigest: sha256:8841834dd58ddd4e2dcf98fc90fbd06fbf3626a29df941503cce55b9548a5317 @@ -18,10 +18,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:092bfa8d363f0191930191e522b5f72025fec603b0474d9d5d2380b79b356f32 - sourceBlobDigest: sha256:84c15305b5763d040c255114c33c0c78072f77ac102895bf669b71c32f037048 + sourceRevisionDigest: sha256:7365082c1cce88ce70a8d3236d544faf9f251cec5fbae1b45b592acb841b262c + sourceBlobDigest: sha256:65aeb5314d524c7f62b12446b09c7381fb911e9d7c057e230f7f26d85b8e982b codeSamplesNamespace: glean-api-specs-java-code-samples - codeSamplesRevisionDigest: sha256:c83720dd11d90c11b3fca65383615a471a55bb68c1971f6a032b68aca36cd639 + codeSamplesRevisionDigest: sha256:f4b144826fa7651779ffe8b0d4e915127050d16d4f9053992e5b69d958afbdf4 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 49828e2..6f3479c 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.glean.api-client:glean-api-client:0.11.2' +implementation 'com.glean.api-client:glean-api-client:0.11.3' ``` Maven: @@ -73,7 +73,7 @@ Maven: com.glean.api-client glean-api-client - 0.11.2 + 0.11.3 ``` @@ -614,13 +614,13 @@ package hello.world; import com.glean.api_client.glean_api_client.Glean; import com.glean.api_client.glean_api_client.models.components.*; -import com.glean.api_client.glean_api_client.models.errors.CollectionError; +import com.glean.api_client.glean_api_client.models.errors.*; import com.glean.api_client.glean_api_client.models.operations.CreatecollectionResponse; +import java.io.UncheckedIOException; import java.lang.Exception; import java.time.LocalDate; import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; +import java.util.*; public class Application { @@ -629,614 +629,646 @@ public class Application { Glean sdk = Glean.builder() .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) .build(); - - CreateCollectionRequest req = CreateCollectionRequest.builder() - .name("") - .addedRoles(List.of( - UserRoleSpecification.builder() - .role(UserRole.VERIFIER) - .person(Person.builder() - .name("George Clooney") - .obfuscatedId("abc123") - .relatedDocuments(List.of( - RelatedDocuments.builder() - .querySuggestion(QuerySuggestion.builder() - .query("app:github type:pull author:mortimer") - .searchProviderInfo(SearchProviderInfo.builder() - .name("Google") - .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") - .build()) - .label("Mortimer's PRs") - .datasource("github") - .requestOptions(SearchRequestOptions.builder() - .facetBucketSize(977077L) - .datasourceFilter("JIRA") - .datasourcesFilter(List.of( - "JIRA")) - .queryOverridesFacetFilters(true) - .facetFilters(List.of( - FacetFilter.builder() - .fieldName("type") - .values(List.of( - FacetFilterValue.builder() - .value("Spreadsheet") - .relationType(RelationType.EQUALS) - .build(), - FacetFilterValue.builder() - .value("Presentation") - .relationType(RelationType.EQUALS) - .build())) - .build())) - .facetFilterSets(List.of( - FacetFilterSet.builder() - .filters(List.of( - FacetFilter.builder() - .fieldName("type") - .values(List.of( - FacetFilterValue.builder() - .value("Spreadsheet") - .relationType(RelationType.EQUALS) - .build(), - FacetFilterValue.builder() - .value("Presentation") - .relationType(RelationType.EQUALS) - .build())) - .build())) - .build(), - FacetFilterSet.builder() - .filters(List.of( - FacetFilter.builder() - .fieldName("type") - .values(List.of( - FacetFilterValue.builder() - .value("Spreadsheet") - .relationType(RelationType.EQUALS) - .build(), - FacetFilterValue.builder() - .value("Presentation") - .relationType(RelationType.EQUALS) - .build())) - .build())) - .build(), - FacetFilterSet.builder() - .filters(List.of( - FacetFilter.builder() - .fieldName("type") - .values(List.of( - FacetFilterValue.builder() - .value("Spreadsheet") - .relationType(RelationType.EQUALS) - .build(), - FacetFilterValue.builder() - .value("Presentation") - .relationType(RelationType.EQUALS) - .build())) - .build())) - .build())) - .authTokens(List.of( - AuthToken.builder() - .accessToken("123abc") - .datasource("gmail") - .scope("email profile https://www.googleapis.com/auth/gmail.readonly") - .tokenType("Bearer") - .authUser("1") - .build())) - .build()) - .ranges(List.of( - TextRange.builder() - .startIndex(86650L) - .document(Document.builder() - .metadata(DocumentMetadata.builder() - .datasource("datasource") - .objectType("Feature Request") - .container("container") - .parentId("JIRA_EN-1337") - .mimeType("mimeType") - .documentId("documentId") - .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) - .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) - .components(List.of( - "Backend", - "Networking")) - .status("[\"Done\"]") - .pins(List.of( - PinDocument.builder() - .documentId("") - .audienceFilters(List.of( - FacetFilter.builder() - .fieldName("type") - .values(List.of( - FacetFilterValue.builder() - .value("Spreadsheet") - .relationType(RelationType.EQUALS) - .build(), - FacetFilterValue.builder() - .value("Presentation") - .relationType(RelationType.EQUALS) - .build())) - .build())) + try { + + CreateCollectionRequest req = CreateCollectionRequest.builder() + .name("") + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(977077L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) .build())) - .collections(List.of( - Collection.builder() - .name("") - .description("meaty dial elegantly while react") - .id(854591L) - .audienceFilters(List.of( - FacetFilter.builder() - .fieldName("type") - .values(List.of( - FacetFilterValue.builder() - .value("Spreadsheet") - .relationType(RelationType.EQUALS) - .build(), - FacetFilterValue.builder() - .value("Presentation") - .relationType(RelationType.EQUALS) - .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) .build())) - .items(List.of( - CollectionItem.builder() - .collectionId(697663L) - .itemType(CollectionItemItemType.TEXT) - .shortcut(Shortcut.builder() - .inputAlias("") - .build()) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) .build(), - CollectionItem.builder() - .collectionId(697663L) - .itemType(CollectionItemItemType.TEXT) - .shortcut(Shortcut.builder() - .inputAlias("") - .build()) + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) .build(), - CollectionItem.builder() - .collectionId(697663L) - .itemType(CollectionItemItemType.TEXT) - .shortcut(Shortcut.builder() - .inputAlias("") - .build()) + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) .build())) .build())) - .interactions(DocumentInteractions.builder() - .reacts(List.of( - Reaction.builder() - .build(), - Reaction.builder() + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(86650L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) .build())) - .shares(List.of( - Share.builder() - .numDaysAgo(365776L) - .build(), - Share.builder() - .numDaysAgo(365776L) - .build(), - Share.builder() - .numDaysAgo(365776L) + .collections(List.of( + Collection.builder() + .name("") + .description("meaty dial elegantly while react") + .id(854591L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(697663L) + .itemType(CollectionItemItemType.TEXT) + .shortcut(Shortcut.builder() + .inputAlias("") + .build()) + .build(), + CollectionItem.builder() + .collectionId(697663L) + .itemType(CollectionItemItemType.TEXT) + .shortcut(Shortcut.builder() + .inputAlias("") + .build()) + .build(), + CollectionItem.builder() + .collectionId(697663L) + .itemType(CollectionItemItemType.TEXT) + .shortcut(Shortcut.builder() + .inputAlias("") + .build()) + .build())) .build())) - .build()) - .verification(Verification.builder() - .state(State.DEPRECATED) - .metadata(VerificationMetadata.builder() - .reminders(List.of( - Reminder.builder() + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(365776L) + .build(), + Share.builder() + .numDaysAgo(365776L) + .build(), + Share.builder() + .numDaysAgo(365776L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(268615L) + .build())) + .lastReminder(Reminder.builder() .assignee(Person.builder() .name("George Clooney") .obfuscatedId("abc123") .build()) - .remindAt(268615L) - .build())) - .lastReminder(Reminder.builder() - .assignee(Person.builder() - .name("George Clooney") - .obfuscatedId("abc123") + .remindAt(423482L) .build()) - .remindAt(423482L) .build()) .build()) - .build()) - .shortcuts(List.of( - Shortcut.builder() - .inputAlias("") - .build(), - Shortcut.builder() - .inputAlias("") - .build(), - Shortcut.builder() - .inputAlias("") - .build())) - .customData(Map.ofEntries( - Map.entry("someCustomField", CustomDataValue.builder() - .build()))) - .build()) - .build()) - .build())) - .inputDetails(SearchRequestInputDetails.builder() - .hasCopyPaste(true) - .build()) - .build()) - .results(List.of( - SearchResult.builder() - .url("https://example.com/foo/bar") - .title("title") - .nativeAppUrl("slack://foo/bar") - .snippets(List.of( - SearchResultSnippet.builder() - .snippet("snippet") - .mimeType("mimeType") - .build())) - .build())) - .build(), - RelatedDocuments.builder() - .querySuggestion(QuerySuggestion.builder() - .query("app:github type:pull author:mortimer") - .searchProviderInfo(SearchProviderInfo.builder() - .name("Google") - .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") - .build()) - .label("Mortimer's PRs") - .datasource("github") - .requestOptions(SearchRequestOptions.builder() - .facetBucketSize(977077L) - .datasourceFilter("JIRA") - .datasourcesFilter(List.of( - "JIRA")) - .queryOverridesFacetFilters(true) - .facetFilters(List.of( - FacetFilter.builder() - .fieldName("type") - .values(List.of( - FacetFilterValue.builder() - .value("Spreadsheet") - .relationType(RelationType.EQUALS) - .build(), - FacetFilterValue.builder() - .value("Presentation") - .relationType(RelationType.EQUALS) - .build())) - .build())) - .facetFilterSets(List.of( - FacetFilterSet.builder() - .filters(List.of( - FacetFilter.builder() - .fieldName("type") - .values(List.of( - FacetFilterValue.builder() - .value("Spreadsheet") - .relationType(RelationType.EQUALS) + .shortcuts(List.of( + Shortcut.builder() + .inputAlias("") .build(), - FacetFilterValue.builder() - .value("Presentation") - .relationType(RelationType.EQUALS) - .build())) - .build())) - .build(), - FacetFilterSet.builder() - .filters(List.of( - FacetFilter.builder() - .fieldName("type") - .values(List.of( - FacetFilterValue.builder() - .value("Spreadsheet") - .relationType(RelationType.EQUALS) + Shortcut.builder() + .inputAlias("") .build(), - FacetFilterValue.builder() - .value("Presentation") - .relationType(RelationType.EQUALS) + Shortcut.builder() + .inputAlias("") .build())) - .build())) - .build(), - FacetFilterSet.builder() - .filters(List.of( - FacetFilter.builder() - .fieldName("type") - .values(List.of( - FacetFilterValue.builder() - .value("Spreadsheet") - .relationType(RelationType.EQUALS) - .build(), - FacetFilterValue.builder() - .value("Presentation") - .relationType(RelationType.EQUALS) - .build())) - .build())) - .build())) - .authTokens(List.of( - AuthToken.builder() - .accessToken("123abc") - .datasource("gmail") - .scope("email profile https://www.googleapis.com/auth/gmail.readonly") - .tokenType("Bearer") - .authUser("1") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) .build()) - .ranges(List.of( - TextRange.builder() - .startIndex(86650L) - .document(Document.builder() - .metadata(DocumentMetadata.builder() - .datasource("datasource") - .objectType("Feature Request") - .container("container") - .parentId("JIRA_EN-1337") + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") .mimeType("mimeType") - .documentId("documentId") - .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) - .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) - .components(List.of( - "Backend", - "Networking")) - .status("[\"Done\"]") - .pins(List.of( - PinDocument.builder() - .documentId("") - .audienceFilters(List.of( - FacetFilter.builder() - .fieldName("type") - .values(List.of( - FacetFilterValue.builder() - .value("Spreadsheet") - .relationType(RelationType.EQUALS) - .build(), - FacetFilterValue.builder() - .value("Presentation") - .relationType(RelationType.EQUALS) - .build())) - .build())) + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(977077L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) .build())) - .collections(List.of( - Collection.builder() - .name("") - .description("meaty dial elegantly while react") - .id(854591L) - .audienceFilters(List.of( - FacetFilter.builder() - .fieldName("type") - .values(List.of( - FacetFilterValue.builder() - .value("Spreadsheet") - .relationType(RelationType.EQUALS) - .build(), - FacetFilterValue.builder() - .value("Presentation") - .relationType(RelationType.EQUALS) - .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) .build())) - .items(List.of( - CollectionItem.builder() - .collectionId(697663L) - .itemType(CollectionItemItemType.TEXT) - .shortcut(Shortcut.builder() - .inputAlias("") - .build()) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) .build(), - CollectionItem.builder() - .collectionId(697663L) - .itemType(CollectionItemItemType.TEXT) - .shortcut(Shortcut.builder() - .inputAlias("") - .build()) + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) .build(), - CollectionItem.builder() - .collectionId(697663L) - .itemType(CollectionItemItemType.TEXT) - .shortcut(Shortcut.builder() - .inputAlias("") - .build()) + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) .build())) .build())) - .interactions(DocumentInteractions.builder() - .reacts(List.of( - Reaction.builder() - .build(), - Reaction.builder() + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(86650L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) .build())) - .shares(List.of( - Share.builder() - .numDaysAgo(365776L) - .build(), - Share.builder() - .numDaysAgo(365776L) - .build(), - Share.builder() - .numDaysAgo(365776L) + .collections(List.of( + Collection.builder() + .name("") + .description("meaty dial elegantly while react") + .id(854591L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(697663L) + .itemType(CollectionItemItemType.TEXT) + .shortcut(Shortcut.builder() + .inputAlias("") + .build()) + .build(), + CollectionItem.builder() + .collectionId(697663L) + .itemType(CollectionItemItemType.TEXT) + .shortcut(Shortcut.builder() + .inputAlias("") + .build()) + .build(), + CollectionItem.builder() + .collectionId(697663L) + .itemType(CollectionItemItemType.TEXT) + .shortcut(Shortcut.builder() + .inputAlias("") + .build()) + .build())) .build())) - .build()) - .verification(Verification.builder() - .state(State.DEPRECATED) - .metadata(VerificationMetadata.builder() - .reminders(List.of( - Reminder.builder() + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(365776L) + .build(), + Share.builder() + .numDaysAgo(365776L) + .build(), + Share.builder() + .numDaysAgo(365776L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(268615L) + .build())) + .lastReminder(Reminder.builder() .assignee(Person.builder() .name("George Clooney") .obfuscatedId("abc123") .build()) - .remindAt(268615L) - .build())) - .lastReminder(Reminder.builder() - .assignee(Person.builder() - .name("George Clooney") - .obfuscatedId("abc123") + .remindAt(423482L) .build()) - .remindAt(423482L) .build()) .build()) + .shortcuts(List.of( + Shortcut.builder() + .inputAlias("") + .build(), + Shortcut.builder() + .inputAlias("") + .build(), + Shortcut.builder() + .inputAlias("") + .build())) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) .build()) - .shortcuts(List.of( - Shortcut.builder() - .inputAlias("") - .build(), - Shortcut.builder() - .inputAlias("") - .build(), - Shortcut.builder() - .inputAlias("") - .build())) - .customData(Map.ofEntries( - Map.entry("someCustomField", CustomDataValue.builder() - .build()))) .build()) - .build()) - .build())) - .inputDetails(SearchRequestInputDetails.builder() - .hasCopyPaste(true) - .build()) - .build()) - .results(List.of( - SearchResult.builder() - .url("https://example.com/foo/bar") - .title("title") - .nativeAppUrl("slack://foo/bar") - .snippets(List.of( - SearchResultSnippet.builder() - .snippet("snippet") - .mimeType("mimeType") .build())) - .build())) - .build())) - .metadata(PersonMetadata.builder() - .type(PersonMetadataType.FULL_TIME) - .title("Actor") - .department("Movies") - .email("george@example.com") - .location("Hollywood, CA") - .phone("6505551234") - .photoUrl("https://example.com/george.jpg") - .startDate(LocalDate.parse("2000-01-23")) - .datasourceProfile(List.of( - DatasourceProfile.builder() - .datasource("github") - .handle("") - .build(), - DatasourceProfile.builder() - .datasource("github") - .handle("") + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) .build())) - .querySuggestions(QuerySuggestionList.builder() - .suggestions(List.of( - QuerySuggestion.builder() - .query("app:github type:pull author:mortimer") - .label("Mortimer's PRs") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() .datasource("github") + .handle("") .build())) - .build()) - .inviteInfo(InviteInfo.builder() - .invites(List.of( - ChannelInviteInfo.builder() + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) .build(), - ChannelInviteInfo.builder() + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) .build())) .build()) - .customFields(List.of( - CustomFieldData.builder() - .label("") - .values(List.of( - CustomFieldValue.of(CustomFieldValueStr.builder() - .build()), - CustomFieldValue.of(CustomFieldValueStr.builder() - .build()), - CustomFieldValue.of(CustomFieldValueStr.builder() - .build()))) - .build(), - CustomFieldData.builder() - .label("") - .values(List.of( - CustomFieldValue.of(CustomFieldValueStr.builder() - .build()), - CustomFieldValue.of(CustomFieldValueStr.builder() - .build()), - CustomFieldValue.of(CustomFieldValueStr.builder() - .build()))) - .build())) - .badges(List.of( - Badge.builder() - .key("deployment_name_new_hire") - .displayName("New hire") - .iconConfig(IconConfig.builder() - .color("#343CED") - .key("person_icon") - .iconType(IconType.GLYPH) - .name("user") - .build()) - .build())) .build()) - .build()) - .build())) - .removedRoles(List.of( - UserRoleSpecification.builder() - .role(UserRole.VIEWER) - .person(Person.builder() - .name("George Clooney") - .obfuscatedId("abc123") - .metadata(PersonMetadata.builder() - .type(PersonMetadataType.FULL_TIME) - .title("Actor") - .department("Movies") - .email("george@example.com") - .location("Hollywood, CA") - .phone("6505551234") - .photoUrl("https://example.com/george.jpg") - .startDate(LocalDate.parse("2000-01-23")) - .datasourceProfile(List.of( - DatasourceProfile.builder() - .datasource("github") - .handle("") - .build(), - DatasourceProfile.builder() - .datasource("github") - .handle("") - .build())) - .querySuggestions(QuerySuggestionList.builder() - .suggestions(List.of( - QuerySuggestion.builder() - .query("app:github type:pull author:mortimer") - .label("Mortimer's PRs") + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() .datasource("github") - .build())) - .build()) - .inviteInfo(InviteInfo.builder() - .invites(List.of( - ChannelInviteInfo.builder() + .handle("") .build(), - ChannelInviteInfo.builder() + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) .build())) .build()) - .badges(List.of( - Badge.builder() - .key("deployment_name_new_hire") - .displayName("New hire") - .iconConfig(IconConfig.builder() - .color("#343CED") - .key("person_icon") - .iconType(IconType.GLYPH) - .name("user") - .build()) - .build())) .build()) - .build()) - .build())) - .audienceFilters(List.of( - FacetFilter.builder() - .fieldName("type") - .values(List.of( - FacetFilterValue.builder() - .value("Spreadsheet") - .relationType(RelationType.EQUALS) - .build(), - FacetFilterValue.builder() - .value("Presentation") - .relationType(RelationType.EQUALS) - .build())) - .build())) - .build(); + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(); - CreatecollectionResponse res = sdk.client().collections().create() - .request(req) - .call(); + CreatecollectionResponse res = sdk.client().collections().create() + .request(req) + .call(); - if (res.oneOf().isPresent()) { - // handle response - } - } + if (res.oneOf().isPresent()) { + // handle response + } + } catch (GleanError ex) { // all SDK exceptions inherit from GleanError + + // ex.ToString() provides a detailed error message including + // HTTP status code, headers, and error payload (if any) + System.out.println(ex); + + // Base exception fields + var rawResponse = ex.rawResponse(); + var headers = ex.headers(); + var contentType = headers.first("Content-Type"); + int statusCode = ex.code(); + Optional responseBody = ex.body(); + + // different error subclasses may be thrown + // depending on the service call + if (ex instanceof CollectionError) { + var e = (CollectionError) ex; + // Check error data fields + e.data().ifPresent(payload -> { + ErrorCode errorCode = payload.errorCode(); + }); + } + + // An underlying cause may be provided. If the error payload + // cannot be deserialized then the deserialization exception + // will be set as the cause. + if (ex.getCause() != null) { + var cause = ex.getCause(); + } + } catch (UncheckedIOException ex) { + // handle IO error (connection, timeout, etc) + } } } ``` @@ -1291,6 +1323,7 @@ public class Application { public static void main(String[] args) throws Exception { Glean sdk = Glean.builder() + .serverIndex(0) .instance("") .apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", "")) .build(); diff --git a/RELEASES.md b/RELEASES.md index b05c1d8..5b98eab 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -318,4 +318,14 @@ Based on: ### Generated - [java v0.11.2] . ### Releases -- [Maven Central v0.11.2] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.11.2 - . \ No newline at end of file +- [Maven Central v0.11.2] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.11.2 - . + +## 2025-11-05 16:07:52 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.649.0 (2.739.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.11.3] . +### Releases +- [Maven Central v0.11.3] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.11.3 - . \ No newline at end of file diff --git a/docs/models/components/ChatMessageFragment.md b/docs/models/components/ChatMessageFragment.md index 0bb9a3e..2595675 100644 --- a/docs/models/components/ChatMessageFragment.md +++ b/docs/models/components/ChatMessageFragment.md @@ -1,6 +1,6 @@ # ChatMessageFragment -Represents a part of a ChatMessage that originates from a single action/tool. It is designed to support rich data formats beyond simple text, allowing for a more dynamic and interactive chat experience. Each fragment can include various types of content, such as text, search queries, action information, and more. Also, each ChatMessageFragment should only have one of structuredResults, querySuggestion, writeAction, followupAction, agentRecommendation or file. +Represents a part of a ChatMessage that originates from a single action/tool. It is designed to support rich data formats beyond simple text, allowing for a more dynamic and interactive chat experience. Each fragment can include various types of content, such as text, search queries, action information, and more. Also, each ChatMessageFragment should only have one of structuredResults, querySuggestion, writeAction, followupAction, agentRecommendation, followupRoutingSuggestion or file. ## Fields diff --git a/docs/models/components/DebugDatasourceStatusResponseCounts.md b/docs/models/components/DebugDatasourceStatusResponseCounts.md index a400525..9a06aa4 100644 --- a/docs/models/components/DebugDatasourceStatusResponseCounts.md +++ b/docs/models/components/DebugDatasourceStatusResponseCounts.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `uploaded` | List\<[DatasourceObjectTypeDocumentCountEntry](../../models/components/DatasourceObjectTypeDocumentCountEntry.md)> | :heavy_minus_sign: | A list of object types and corresponding upload counts | -| `indexed` | List\<[DatasourceObjectTypeDocumentCountEntry](../../models/components/DatasourceObjectTypeDocumentCountEntry.md)> | :heavy_minus_sign: | The number of documents indexed, grouped by objectType | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `uploaded` | List\<[DatasourceObjectTypeDocumentCountEntry](../../models/components/DatasourceObjectTypeDocumentCountEntry.md)> | :heavy_minus_sign: | A list of object types and corresponding upload counts. Note: This data may be cached and could be up to 3 hours stale.
| +| `indexed` | List\<[DatasourceObjectTypeDocumentCountEntry](../../models/components/DatasourceObjectTypeDocumentCountEntry.md)> | :heavy_minus_sign: | The number of documents indexed, grouped by objectType | \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 9222333..fe23fe5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=com.glean.api-client artifactId=glean-api-client -version=0.11.2 +version=0.11.3 org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g diff --git a/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java b/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java index 82ddfc9..4bd6ec7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java +++ b/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java @@ -24,8 +24,8 @@ public class SDKConfiguration { private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "0.9.0"; - public static final String SDK_VERSION = "0.11.2"; - public static final String GEN_VERSION = "2.731.4"; + public static final String SDK_VERSION = "0.11.3"; + public static final String GEN_VERSION = "2.739.1"; private static final String BASE_PACKAGE = "com.glean.api_client.glean_api_client"; public static final String USER_AGENT = String.format("speakeasy-sdk/%s %s %s %s %s", diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMessageFragment.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMessageFragment.java index 39ba9dd..7034e75 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMessageFragment.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMessageFragment.java @@ -24,7 +24,7 @@ * information, and more. * *

Also, each ChatMessageFragment should only have one of structuredResults, querySuggestion, - * writeAction, followupAction, agentRecommendation or file. + * writeAction, followupAction, agentRecommendation, followupRoutingSuggestion or file. */ public class ChatMessageFragment { /** diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDatasourceStatusResponseCounts.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDatasourceStatusResponseCounts.java index e645012..ce60e6b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDatasourceStatusResponseCounts.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDatasourceStatusResponseCounts.java @@ -18,7 +18,8 @@ public class DebugDatasourceStatusResponseCounts { /** - * A list of object types and corresponding upload counts + * A list of object types and corresponding upload counts. Note: This data may be cached and could be + * up to 3 hours stale. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("uploaded") @@ -46,7 +47,8 @@ public DebugDatasourceStatusResponseCounts() { } /** - * A list of object types and corresponding upload counts + * A list of object types and corresponding upload counts. Note: This data may be cached and could be + * up to 3 hours stale. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -69,7 +71,8 @@ public static Builder builder() { /** - * A list of object types and corresponding upload counts + * A list of object types and corresponding upload counts. Note: This data may be cached and could be + * up to 3 hours stale. */ public DebugDatasourceStatusResponseCounts withUploaded(List uploaded) { Utils.checkNotNull(uploaded, "uploaded"); @@ -79,7 +82,8 @@ public DebugDatasourceStatusResponseCounts withUploaded(List> uploaded) { Utils.checkNotNull(uploaded, "uploaded"); @@ -146,7 +150,8 @@ private Builder() { /** - * A list of object types and corresponding upload counts + * A list of object types and corresponding upload counts. Note: This data may be cached and could be + * up to 3 hours stale. */ public Builder uploaded(List uploaded) { Utils.checkNotNull(uploaded, "uploaded"); @@ -155,7 +160,8 @@ public Builder uploaded(List uploaded) { } /** - * A list of object types and corresponding upload counts + * A list of object types and corresponding upload counts. Note: This data may be cached and could be + * up to 3 hours stale. */ public Builder uploaded(Optional> uploaded) { Utils.checkNotNull(uploaded, "uploaded");