Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
787 changes: 774 additions & 13 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: true
tests:
generateTests: true
generateNewTests: false
skipResponseBodyAssertions: false
java:
version: 0.5.6
version: 0.6.0
additionalDependencies: []
additionalPlugins: []
artifactID: glean-api-client
Expand All @@ -41,6 +45,7 @@ java:
shared: models/components
webhooks: models/webhooks
inputModelSuffix: input
languageVersion: 11
license:
name: The MIT License (MIT)
shortName: MIT
Expand Down
26 changes: 24 additions & 2 deletions .speakeasy/glean-merged-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1795,7 +1795,7 @@ paths:
tags:
- Entities
summary: List entities
description: List some set of details for all entities that fit the given criteria and return in the requested order. Does not support negation in filters, assumes relation type EQUALS. There is a limit of 10000 entities that can be retrieved via this endpoint.
description: List some set of details for all entities that fit the given criteria and return in the requested order. Does not support negation in filters, assumes relation type EQUALS. There is a limit of 10000 entities that can be retrieved via this endpoint, except when using FULL_DIRECTORY request type for people entities.
operationId: listentities
x-visibility: Public
x-codegen-request-body-name: payload
Expand Down Expand Up @@ -4122,6 +4122,7 @@ components:
- ID_EQUALS
- LT
- GT
- NOT_EQUALS
example: EQUALS
isNegated:
type: boolean
Expand Down Expand Up @@ -4868,7 +4869,8 @@ components:
example: From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.
boardId:
type: integer
description: The parent board ID of this Answer, or 0 if it's a floating Answer.
description: The parent board ID of this Answer, or 0 if it's a floating Answer. Adding Answers to Answer Boards is no longer permitted.
deprecated: true
audienceFilters:
type: array
description: Filters which restrict who should see the answer. Values are taken from the corresponding filters in people search.
Expand Down Expand Up @@ -5640,11 +5642,13 @@ components:
- ATTACHMENT
- CANONICAL
- CASE
- contact
- CONTACT
- CONVERSATION_MESSAGES
- EXPERT
- FROM
- HIGHLIGHT
- opportunity
- OPPORTUNITY
- RECENT
- SOURCE
Expand Down Expand Up @@ -7523,6 +7527,7 @@ components:
type: string
title: Role
description: The role of the message.
example: USER
content:
title: Content
description: The content of the message.
Expand Down Expand Up @@ -8415,6 +8420,7 @@ components:
- COPYPASTED_QUOTES
- INVALID_OPERATOR
- MAYBE_INVALID_FACET_QUERY
- TOO_MANY_DATASOURCE_GROUPS
description: The type of the warning.
lastUsedTerm:
type: string
Expand Down Expand Up @@ -9058,6 +9064,7 @@ components:
- DISPLAYABLE_LIST
- SOCIAL_LINK
- EXTERNAL_TASKS
- WORKFLOW_COLLECTIONS
- ZERO_STATE_CHAT_SUGGESTION
- ZERO_STATE_CHAT_TOOL_SUGGESTION
- ZERO_STATE_WORKFLOW_CREATED_BY_ME
Expand Down Expand Up @@ -9632,6 +9639,16 @@ components:
source:
type: string
description: A string denoting the search surface from which the endpoint is called.
requestType:
type: string
default: STANDARD
description: The type of request being made.
x-enumDescriptions:
STANDARD: Used by default for all requests and satisfies all standard use cases for list requests. Limited to 10000 entities.
FULL_DIRECTORY: Used exclusively to return a comprehensive list of all people entities in the organization, typically for audit like purposes. The recommended approach is to sort by FIRST_NAME or LAST_NAME, and use pagination for large organizations.
enum:
- STANDARD
- FULL_DIRECTORY
EntitiesSortOrder:
type: string
description: Different ways of sorting entities
Expand Down Expand Up @@ -11745,6 +11762,10 @@ components:
type: string
description: end time of the time range, applicable for the CUSTOM type.
format: date-time
lastNDaysValue:
type: integer
description: The number of days to look back from the current time, applicable for the LAST_N_DAYS type.
format: int64
InputOptions:
description: Controls which data-sources and what time-range to include in scans.
properties:
Expand Down Expand Up @@ -11779,6 +11800,7 @@ components:
- PAST_YEAR
- PAST_DAY
- CUSTOM
- LAST_N_DAYS
customTimeRange:
$ref: "#/components/schemas/TimeRange"
SharingOptions:
Expand Down
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
speakeasyVersion: 1.563.2
speakeasyVersion: 1.576.1
sources:
Glean API:
sourceNamespace: glean-api-specs
sourceRevisionDigest: sha256:766f374184dd7d6b119aef718a826e26e7e690a65bd8edd8e326c75699c9c0f5
sourceBlobDigest: sha256:b566588e295fa760c08dc3e5f61f4026e3b295999709bbec5a3f434f51316f89
sourceRevisionDigest: sha256:57fc6af98e6e9e98c92547985293be8fafd52d2a1d1ef88d4b24636743b9f119
sourceBlobDigest: sha256:01cf4577ff2f15ba160b16bba410571a8ba0c5fefa7e6dd7101edef7ef7c68dc
tags:
- latest
- speakeasy-sdk-regen-1749670145
- speakeasy-sdk-regen-1750453706
Glean-OAS:
sourceNamespace: glean-oas
sourceRevisionDigest: sha256:8841834dd58ddd4e2dcf98fc90fbd06fbf3626a29df941503cce55b9548a5317
Expand All @@ -18,10 +18,10 @@ targets:
glean:
source: Glean API
sourceNamespace: glean-api-specs
sourceRevisionDigest: sha256:766f374184dd7d6b119aef718a826e26e7e690a65bd8edd8e326c75699c9c0f5
sourceBlobDigest: sha256:b566588e295fa760c08dc3e5f61f4026e3b295999709bbec5a3f434f51316f89
sourceRevisionDigest: sha256:57fc6af98e6e9e98c92547985293be8fafd52d2a1d1ef88d4b24636743b9f119
sourceBlobDigest: sha256:01cf4577ff2f15ba160b16bba410571a8ba0c5fefa7e6dd7101edef7ef7c68dc
codeSamplesNamespace: glean-api-specs-java-code-samples
codeSamplesRevisionDigest: sha256:d644e6736c249dfb5aab7f2f6899ae480a6fbebde39c8bb385cf233f3b5689d4
codeSamplesRevisionDigest: sha256:0b38a88f263a55a5ce1d7a0938446b8192c36e32ab974acc6c9dff2a62fc28d1
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ The samples below show how a published SDK artifact is used:

Gradle:
```groovy
implementation 'com.glean.api-client:glean-api-client:0.5.6'
implementation 'com.glean.api-client:glean-api-client:0.6.0'
```

Maven:
```xml
<dependency>
<groupId>com.glean.api-client</groupId>
<artifactId>glean-api-client</artifactId>
<version>0.5.6</version>
<version>0.6.0</version>
</dependency>
```

Expand All @@ -91,9 +91,11 @@ gradlew.bat publishToMavenLocal -Pskip.signing
### Logging
A logging framework/facade has not yet been adopted but is under consideration.

For request and response logging (especially json bodies) use:
For request and response logging (especially json bodies), call `enableHTTPDebugLogging(boolean)` on the SDK builder like so:
```java
SpeakeasyHTTPClient.setDebugLogging(true); // experimental API only (may change without warning)
SDK.builder()
.enableHTTPDebugLogging(true)
.build();
```
Example output:
```
Expand All @@ -107,7 +109,9 @@ Response body:
"token": "global"
}
```
WARNING: This should only used for temporary debugging purposes. Leaving this option on in a production system could expose credentials/secrets in logs. <i>Authorization</i> headers are redacted by default and there is the ability to specify redacted header names via `SpeakeasyHTTPClient.setRedactedHeaders`.
__WARNING__: This should only used for temporary debugging purposes. Leaving this option on in a production system could expose credentials/secrets in logs. <i>Authorization</i> headers are redacted by default and there is the ability to specify redacted header names via `SpeakeasyHTTPClient.setRedactedHeaders`.

__NOTE__: This is a convenience method that calls `HTTPClient.enableDebugLogging()`. The `SpeakeasyHTTPClient` honors this setting. If you are using a custom HTTP client, it is up to the custom client to honor this setting.

Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this second option does not log bodies.
<!-- End SDK Installation [installation] -->
Expand All @@ -131,7 +135,7 @@ public class Application {
public static void main(String[] args) throws Exception {

Glean sdk = Glean.builder()
.apiToken("<YOUR_BEARER_TOKEN_HERE>")
.apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", ""))
.build();

ChatResponse res = sdk.client().chat().create()
Expand Down Expand Up @@ -169,7 +173,7 @@ public class Application {
public static void main(String[] args) throws Exception {

Glean sdk = Glean.builder()
.apiToken("<YOUR_BEARER_TOKEN_HERE>")
.apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", ""))
.build();

ChatStreamResponse res = sdk.client().chat().createStream()
Expand Down Expand Up @@ -219,7 +223,7 @@ public class Application {
public static void main(String[] args) throws Exception {

Glean sdk = Glean.builder()
.apiToken("<YOUR_BEARER_TOKEN_HERE>")
.apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", ""))
.build();

Activity req = Activity.builder()
Expand Down Expand Up @@ -526,7 +530,7 @@ public class Application {
public static void main(String[] args) throws CollectionError, Exception {

Glean sdk = Glean.builder()
.apiToken("<YOUR_BEARER_TOKEN_HERE>")
.apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", ""))
.build();

CreateCollectionRequest req = CreateCollectionRequest.builder()
Expand Down Expand Up @@ -1169,7 +1173,7 @@ public class Application {

Glean sdk = Glean.builder()
.instance("<value>")
.apiToken("<YOUR_BEARER_TOKEN_HERE>")
.apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", ""))
.build();

Activity req = Activity.builder()
Expand Down Expand Up @@ -1226,7 +1230,7 @@ public class Application {

Glean sdk = Glean.builder()
.serverURL("https://instance-name-be.glean.com")
.apiToken("<YOUR_BEARER_TOKEN_HERE>")
.apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", ""))
.build();

Activity req = Activity.builder()
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,14 @@ Based on:
### Generated
- [java v0.5.6] .
### Releases
- [Maven Central v0.5.6] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.5.6 - .
- [Maven Central v0.5.6] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.5.6 - .

## 2025-07-07 23:17:04
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.576.1 (2.651.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v0.6.0] .
### Releases
- [Maven Central v0.6.0] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.6.0 - .
4 changes: 2 additions & 2 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class Application {
public static void main(String[] args) throws Exception {

Glean sdk = Glean.builder()
.apiToken("<YOUR_BEARER_TOKEN_HERE>")
.apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", ""))
.build();

ChatResponse res = sdk.client().chat().create()
Expand Down Expand Up @@ -49,7 +49,7 @@ public class Application {
public static void main(String[] args) throws Exception {

Glean sdk = Glean.builder()
.apiToken("<YOUR_BEARER_TOKEN_HERE>")
.apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", ""))
.build();

ChatStreamResponse res = sdk.client().chat().createStream()
Expand Down
14 changes: 10 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ repositories {
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
withSourcesJar()
withJavadocJar()
}
Expand Down Expand Up @@ -66,6 +64,10 @@ tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}

tasks.withType(JavaCompile).configureEach {
options.release = 11
}

sourcesJar {
archiveBaseName = "${artifactId}"
}
Expand Down Expand Up @@ -104,11 +106,15 @@ publishing {
// https://github.com/gradle/gradle/issues/18619
groupId = "com.glean.api-client"
artifactId = "glean-api-client"
version = "0.5.6"
version = "0.6.0"

from components.java

pom {
properties = [
'maven.compiler.source': '11',
'maven.compiler.target': '11',
]
name = 'Glean Java SDK'
description = 'SDK enabling Java developers to easily integrate with the Glean API.'
url = 'https://github.com/gleanwork/api-client-java'
Expand Down Expand Up @@ -201,4 +207,4 @@ dependencies {
antJUnit 'org.apache.ant:ant-junit:1.9.7'
}

apply from: 'build-extras.gradle'
apply from: 'build-extras.gradle'
Loading