Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
zefanjajobse committed Sep 20, 2022
0 parents commit c040b0c
Show file tree
Hide file tree
Showing 30 changed files with 29,581 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist/
.idea
.vscode
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
grpc_web_proto_compile --clear_output_dir --verbosity=1 --js_out_options="import_style=commonjs,binary" --grpc_web_out_options="import_style=commonjs+dts,mode=grpcweb" ./proto ./src/grpc-web
568 changes: 568 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "grpc-web",
"version": "1.0.0",
"description": "",
"main": "src/index.js",
"types": "src/index.d.ts",
"scripts": {
"test": "ts-node src/index.ts"
},
"author": "",
"license": "ISC",
"dependencies": {
"google-protobuf": "^3.21.0",
"grpc-web": "1.2.1"
},
"devDependencies": {
"@types/node": "^18.7.18",
"ts-node": "^10.9.1",
"xhr2": "^0.2.1",
"protobufjs": "^7.1.1"
},
"files": [
"index.js",
"index.d.ts",
"package-lock.json",
"tsconfig.json",
"src/**"
]
}
74 changes: 74 additions & 0 deletions proto/authentication.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
syntax = "proto3";

package web.authentication;

service ClientAuthentication {
rpc viaAuthCode (AuthRequest) returns (AuthResponse) {}
rpc logout (Empty) returns (Empty) {}
}

message PlayerInfo {
int64 nucleusId = 1;
int64 personaId = 2;
int32 platformId = 3;
}

enum Platform {
UNKNOWN = 0;
PC = 1;
PS4 = 2;
XBOXONE = 3;
PS5 = 4;
XBSX = 5;
COMMON = 6;
}

enum Reason {
NONE = 0;
PLAYER = 1;
SYNC = 2;
}

message AuthRequest {
string authCode = 1;
string redirectUri = 2;
string product = 3;
string firstPartyId = 4;
Platform platform = 5;
}

message Duration {
int64 seconds = 1;
int32 nanos = 2;
}

message TimeTravel {
Duration offset = 1;
}

message ProtocolVersionOverride {
string original = 1;
string overridden = 2;
Reason reason = 3;
}

enum UserBits {
USER_BIT_UNSPECIFIED = 0;
USER_BIT_ACCEPTED_TOS = 1;
USER_BIT_ENABLE_USERSHARING = 2;
USER_BIT_ENABLE_CRASHREPORTS = 3;
USER_BIT_COMPLETED_TUTORIAL = 4;
USER_BIT_CLIENT_ENABLE_USAGESHARING = 5;
}

message Empty {
}

message AuthResponse {
string sessionId = 1;
PlayerInfo player = 3;
repeated UserBits userBits = 4;
TimeTravel timeTravel = 5;
ProtocolVersionOverride protocolVersionOverride = 6;
}

Loading

0 comments on commit c040b0c

Please sign in to comment.