Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: 🐝 Update SDK - Generate 0.3.0-beta.4 #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
  •  
  •  
  •  
406 changes: 253 additions & 153 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
java:
version: 0.3.0-beta.3
version: 0.3.0-beta.4
additionalDependencies: []
additionalPlugins: []
artifactID: backend-api
Expand Down
21 changes: 14 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
speakeasyVersion: 1.390.1
speakeasyVersion: 1.385.0
sources:
clerk-java-sdk:
sourceNamespace: clerk-java-sdk
sourceRevisionDigest: sha256:515e4f10455f21ad59bbe16319a383e9e12c116d55bcf7652c681bba41aa304b
sourceBlobDigest: sha256:9f3e5fb65dd3e8c708debe9a1dc453eeea8f47bd0bce5691c696b39e7b4391db
sourceRevisionDigest: sha256:e0e54d531ac126ba5d82485d6e3b57c849622b9938ef439bfd9a377353f5f0a9
sourceBlobDigest: sha256:def78a57452610c201cfa2962c4354e41a16ddf30c45520ee396f78452eceb7e
tags:
- latest
- main
targets:
clerk-java:
source: clerk-java-sdk
sourceNamespace: clerk-java-sdk
sourceRevisionDigest: sha256:515e4f10455f21ad59bbe16319a383e9e12c116d55bcf7652c681bba41aa304b
sourceBlobDigest: sha256:9f3e5fb65dd3e8c708debe9a1dc453eeea8f47bd0bce5691c696b39e7b4391db
sourceRevisionDigest: sha256:e0e54d531ac126ba5d82485d6e3b57c849622b9938ef439bfd9a377353f5f0a9
sourceBlobDigest: sha256:def78a57452610c201cfa2962c4354e41a16ddf30c45520ee396f78452eceb7e
codeSamplesNamespace: clerk-java-sdk-code-samples
codeSamplesRevisionDigest: sha256:6d91002655ce0016a63610e4e471f5a347ef403edd77653c20cd2d5165964e9c
outLocation: /github/workspace/repo
my-first-target:
source: clerk-java-sdk
Expand All @@ -22,13 +24,14 @@ targets:
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
speakeasyVersion: v1.385.0
sources:
clerk-java-sdk:
inputs:
- location: ./openapi.yml
- location: https://raw.githubusercontent.com/clerk/openapi-specs/refs/heads/main/bapi/2021-02-05.yml
overlays:
- location: fixes.yml
- location: .speakeasy/speakeasy-suggestions.yaml
registry:
location: registry.speakeasyapi.dev/clerk/clerk/clerk-java-sdk
targets:
Expand All @@ -41,3 +44,7 @@ workflow:
ossrhPassword: $ossrh_password
gpgSecretKey: $gpg_secret_key
gpgPassPhrase: $gpg_pass_phrase
codeSamples:
output: ""
registry:
location: registry.speakeasyapi.dev/clerk/clerk/clerk-java-sdk-code-samples
4 changes: 4 additions & 0 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ targets:
ossrhPassword: $ossrh_password
gpgSecretKey: $gpg_secret_key
gpgPassPhrase: $gpg_pass_phrase
codeSamples:
registry:
location: registry.speakeasyapi.dev/clerk/clerk/clerk-java-sdk-code-samples
blocking: false
241 changes: 94 additions & 147 deletions README.md

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,14 @@ Based on:
### Generated
- [java v0.3.0-beta.3] .
### Releases
- [Maven Central v0.3.0-beta.3] https://central.sonatype.com/artifact/com.clerk/backend-api/0.3.0-beta.3 - .
- [Maven Central v0.3.0-beta.3] https://central.sonatype.com/artifact/com.clerk/backend-api/0.3.0-beta.3 - .

## 2024-10-26 00:08:33
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.385.0 (2.407.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v0.3.0-beta.4] .
### Releases
- [Maven Central v0.3.0-beta.4] https://central.sonatype.com/artifact/com.clerk/backend-api/0.3.0-beta.4 - .
54 changes: 4 additions & 50 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,10 @@
```java
package hello.world;

import com.clerk.backend_api.Clerk;
import java.lang.Exception;

public class Application {

public static void main(String[] args) throws Exception {
try {
Clerk sdk = Clerk.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build();

sdk.clients().list()
.limit(10L)
.offset(0L)
.callAsStreamUnwrapped()
.forEach(item -> {
// handle item
});

} catch (com.clerk.backend_api.models.errors.ClerkErrors e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}

}
}
```

### Create Actor Tokens

This example shows how to create an actor token that can be used to impersonate the given user.

```java
package hello.world;

import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.SDKError;
import com.clerk.backend_api.models.operations.CreateActorTokenRequestBody;
import com.clerk.backend_api.models.operations.CreateActorTokenResponse;
import com.clerk.backend_api.models.operations.GetEmailAddressResponse;
import java.lang.Exception;
import java.util.Map;

public class Application {

Expand All @@ -55,17 +15,11 @@ public class Application {
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build();

CreateActorTokenRequestBody req = CreateActorTokenRequestBody.builder()
.userId("<value>")
.actor(Map.ofEntries(
Map.entry("sub", "user_2OEpKhcCN1Lat9NQ0G6puh7q5Rb")))
.build();

CreateActorTokenResponse res = sdk.actors().createToken()
.request(req)
GetEmailAddressResponse res = sdk.emailAddresses().get()
.emailAddressId("<value>")
.call();

if (res.actorToken().isPresent()) {
if (res.emailAddress().isPresent()) {
// handle response
}
} catch (com.clerk.backend_api.models.errors.ClerkErrors e) {
Expand Down
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ tasks.withType(Javadoc) {
}

group = "com.clerk"
version = "0.3.0-beta.3"
version = "0.3.0-beta.4"

sourcesJar {
archiveBaseName = "backend-api"
Expand Down Expand Up @@ -101,7 +101,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.clerk'
artifactId = 'backend-api'
version = '0.3.0-beta.3'
version = '0.3.0-beta.4'

from components.java

Expand Down Expand Up @@ -152,7 +152,6 @@ dependencies {
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
implementation 'org.apache.httpcomponents:httpmime:4.5.14'
implementation 'commons-io:commons-io:2.15.1'
implementation 'com.jayway.jsonpath:json-path:2.9.0'
}


Expand Down
12 changes: 12 additions & 0 deletions docs/models/components/EnrollmentMode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EnrollmentMode

Mode of enrollment for the domain


## Values

| Name | Value |
| ---------------------- | ---------------------- |
| `MANUAL_INVITATION` | manual_invitation |
| `AUTOMATIC_INVITATION` | automatic_invitation |
| `AUTOMATIC_SUGGESTION` | automatic_suggestion |
1 change: 1 addition & 0 deletions docs/models/components/Invitation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
| `revoked` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | false |
| `status` | [InvitationStatus](../../models/components/InvitationStatus.md) | :heavy_check_mark: | N/A | pending |
| `url` | *JsonNullable<String>* | :heavy_minus_sign: | N/A | |
| `expiresAt` | *JsonNullable<Long>* | :heavy_minus_sign: | Unix timestamp of expiration.<br/> | |
| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.<br/> | |
| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.<br/> | |
1 change: 1 addition & 0 deletions docs/models/components/InvitationRevoked.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
| `revoked` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | true |
| `status` | [InvitationRevokedStatus](../../models/components/InvitationRevokedStatus.md) | :heavy_check_mark: | N/A | revoked |
| `url` | *JsonNullable<String>* | :heavy_minus_sign: | N/A | |
| `expiresAt` | *JsonNullable<Long>* | :heavy_minus_sign: | Unix timestamp of expiration.<br/> | |
| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.<br/> | |
| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.<br/> | |
3 changes: 2 additions & 1 deletion docs/models/components/InvitationStatus.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
| ---------- | ---------- |
| `PENDING` | pending |
| `ACCEPTED` | accepted |
| `REVOKED` | revoked |
| `REVOKED` | revoked |
| `EXPIRED` | expired |
13 changes: 13 additions & 0 deletions docs/models/components/Keys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Keys


## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `use` | *Optional<String>* | :heavy_minus_sign: | N/A |
| `kty` | *Optional<String>* | :heavy_minus_sign: | N/A |
| `kid` | *Optional<String>* | :heavy_minus_sign: | N/A |
| `alg` | *Optional<String>* | :heavy_minus_sign: | N/A |
| `n` | *Optional<String>* | :heavy_minus_sign: | N/A |
| `e` | *Optional<String>* | :heavy_minus_sign: | N/A |
16 changes: 16 additions & 0 deletions docs/models/components/LatestActivity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# LatestActivity


## Fields

| Field | Type | Required | Description |
| ------------------- | ------------------- | ------------------- | ------------------- |
| `object` | *String* | :heavy_check_mark: | N/A |
| `id` | *String* | :heavy_check_mark: | N/A |
| `deviceType` | *Optional<String>* | :heavy_minus_sign: | N/A |
| `isMobile` | *Optional<Boolean>* | :heavy_minus_sign: | N/A |
| `browserName` | *Optional<String>* | :heavy_minus_sign: | N/A |
| `browserVersion` | *Optional<String>* | :heavy_minus_sign: | N/A |
| `ipAddress` | *Optional<String>* | :heavy_minus_sign: | N/A |
| `city` | *Optional<String>* | :heavy_minus_sign: | N/A |
| `country` | *Optional<String>* | :heavy_minus_sign: | N/A |
Loading