-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
1,757 additions
and
3,059 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
swagger-codegen-cli.jar | ||
|
||
.data | ||
.idea | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
|
||
CODEGEN=swagger-codegen-cli.jar | ||
if [ -f $CODEGEN ]; then | ||
echo "Codegen already exists" | ||
else | ||
echo "Downloading codegen" | ||
wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.52/swagger-codegen-cli-3.0.52.jar -O swagger-codegen-cli.jar | ||
fi | ||
|
||
java -jar swagger-codegen-cli.jar generate -i http://localhost:3000/api-json -l typescript-fetch -o clients/liquid-auth-client-js/src/client | ||
java -jar swagger-codegen-cli.jar generate -i http://localhost:3000/api-json -l kotlin-client -o clients/liquid-auth-client-kotlin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Overview | ||
|
||
Client JSON-RPC interfaces are generated from OpenAPI 3.0 specifications. | ||
All clients should mirror the same interfaces and include the same parameters (as much as possible). | ||
|
||
```typescript | ||
interface SignalClient { | ||
readonly url: string; // Origin of the service | ||
type: "offer" | "answer" // Type of client | ||
peerClient: RTCPeerConnection | PeerClient // Native WebRTC Wrapper/Interface | ||
socket: Socket // The socket to the service | ||
|
||
readonly authenticated: boolean; // State of authentication | ||
readonly requestId?: string; // The current request being signaled | ||
|
||
/** | ||
* Generate a Request ID | ||
*/ | ||
generateRequestId(): any; | ||
|
||
/** | ||
* Top level Friendly interface for signaling | ||
* @param args | ||
*/ | ||
peer(requestId: any, type: 'offer' | 'answer', config?: RTCConfiguration): Promise<void>; | ||
|
||
/** | ||
* Link a Request ID to this client | ||
* @param args | ||
*/ | ||
link(...args: any[]): Promise<LinkMessage>; | ||
|
||
/** | ||
* Wait for a desciption signal | ||
* @param args | ||
*/ | ||
signal(...args: any[]): Promise<string>; | ||
|
||
/** | ||
* Terminate the signaling session | ||
*/ | ||
close(): void | ||
|
||
|
||
/** | ||
* Listen to Interface events | ||
* @param args | ||
*/ | ||
on(...args: any[]): void; | ||
|
||
/** | ||
* Emit an event to the interface | ||
* @param channel | ||
* @param callback | ||
*/ | ||
emit(channel: string, callback: (...args: any[])=>void) | ||
|
||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
lib | ||
docs | ||
|
||
# Logs | ||
logs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.