diff --git a/README.md b/README.md index 7d882f1..efd24f9 100644 --- a/README.md +++ b/README.md @@ -414,3 +414,25 @@ runsClient.createRunAndStream(thread.id(), createRunRequest, new AssistantStream }); // "createThreadAndRunAndStream" and "submitToolOutputsAndStream" methods are also available ``` +- List all the users in an organization. +```java +OpenAI openAI = OpenAI.newBuilder() + .adminKey(System.getenv("OPENAI_ADMIN_KEY")) + .build(); + +UsersClient usersClient = openAI.usersClient(); +List users = usersClient.listUsers(Optional.empty(), Optional.empty()).data(); +``` +- List user actions and configuration changes within an organization +```java +OpenAI openAI = OpenAI.newBuilder() + .adminKey(System.getenv("OPENAI_ADMIN_KEY")) + .build(); + +AuditLogsClient auditLogsClient = openAI.auditLogsClient(); +ListAuditLogsQueryParameters queryParameters = ListAuditLogsQueryParameters.newBuilder() + .eventTypes(List.of("invite.sent", "invite.deleted")) + .build(); +List auditLogs = auditLogsClient.listAuditLogs(queryParameters).data(); +``` + diff --git a/build.gradle b/build.gradle index 2df4f1e..087f9a5 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ plugins { id "signing" id "io.github.gradle-nexus.publish-plugin" version "2.0.0" id "com.diffplug.spotless" version "6.25.0" - id "me.qoomon.git-versioning" version "6.4.3" + id "me.qoomon.git-versioning" version "6.4.4" id "com.github.ben-manes.versions" version "0.51.0" } @@ -34,7 +34,7 @@ java { } def jacksonVersion = "2.17.2" -def junitVersion = "5.10.3" +def junitVersion = "5.11.0" dependencies { implementation("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}") @@ -45,7 +45,7 @@ dependencies { testImplementation("org.junit.jupiter:junit-jupiter-params:${junitVersion}") testImplementation("org.assertj:assertj-core:3.26.3") testImplementation("org.mock-server:mockserver-netty-no-dependencies:5.15.0") - testImplementation("com.atlassian.oai:swagger-request-validator-core:2.41.0") + testImplementation("com.atlassian.oai:swagger-request-validator-core:2.42.0") testImplementation("org.skyscreamer:jsonassert:1.5.3") } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 2c35211..a4b76b9 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 09523c0..9355b41 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME