@uniswap/client-platform-service 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,77 @@
1
+ import { MethodKind } from "@bufbuild/protobuf";
2
+ import { ChallengeRequest, ChallengeResponse, DeleteSessionRequest, DeleteSessionResponse, InitSessionRequest, InitSessionResponse, IntrospectRequest, IntrospectResponse, UpgradeSessionRequest, UpgradeSessionResponse } from "./sessionService_pb.js";
3
+ /**
4
+ * typically utilized by Entry Gateway for inspecting the validity of a session
5
+ *
6
+ * @generated from rpc uniswap.sessionService.v1.SessionService.Introspect
7
+ */
8
+ export declare const introspect: {
9
+ readonly localName: "introspect";
10
+ readonly name: "Introspect";
11
+ readonly kind: MethodKind.Unary;
12
+ readonly I: typeof IntrospectRequest;
13
+ readonly O: typeof IntrospectResponse;
14
+ readonly service: {
15
+ readonly typeName: "uniswap.sessionService.v1.SessionService";
16
+ };
17
+ };
18
+ /**
19
+ * used by client for initializing a session
20
+ *
21
+ * @generated from rpc uniswap.sessionService.v1.SessionService.InitSession
22
+ */
23
+ export declare const initSession: {
24
+ readonly localName: "initSession";
25
+ readonly name: "InitSession";
26
+ readonly kind: MethodKind.Unary;
27
+ readonly I: typeof InitSessionRequest;
28
+ readonly O: typeof InitSessionResponse;
29
+ readonly service: {
30
+ readonly typeName: "uniswap.sessionService.v1.SessionService";
31
+ };
32
+ };
33
+ /**
34
+ * used by client to request a challenge
35
+ *
36
+ * @generated from rpc uniswap.sessionService.v1.SessionService.Challenge
37
+ */
38
+ export declare const challenge: {
39
+ readonly localName: "challenge";
40
+ readonly name: "Challenge";
41
+ readonly kind: MethodKind.Unary;
42
+ readonly I: typeof ChallengeRequest;
43
+ readonly O: typeof ChallengeResponse;
44
+ readonly service: {
45
+ readonly typeName: "uniswap.sessionService.v1.SessionService";
46
+ };
47
+ };
48
+ /**
49
+ * a universal method for all types of bot detection mechanism
50
+ *
51
+ * @generated from rpc uniswap.sessionService.v1.SessionService.UpgradeSession
52
+ */
53
+ export declare const upgradeSession: {
54
+ readonly localName: "upgradeSession";
55
+ readonly name: "UpgradeSession";
56
+ readonly kind: MethodKind.Unary;
57
+ readonly I: typeof UpgradeSessionRequest;
58
+ readonly O: typeof UpgradeSessionResponse;
59
+ readonly service: {
60
+ readonly typeName: "uniswap.sessionService.v1.SessionService";
61
+ };
62
+ };
63
+ /**
64
+ * delete a certain session. For example, on app uninstall
65
+ *
66
+ * @generated from rpc uniswap.sessionService.v1.SessionService.DeleteSession
67
+ */
68
+ export declare const deleteSession: {
69
+ readonly localName: "deleteSession";
70
+ readonly name: "DeleteSession";
71
+ readonly kind: MethodKind.Unary;
72
+ readonly I: typeof DeleteSessionRequest;
73
+ readonly O: typeof DeleteSessionResponse;
74
+ readonly service: {
75
+ readonly typeName: "uniswap.sessionService.v1.SessionService";
76
+ };
77
+ };
@@ -0,0 +1,81 @@
1
+ // @generated by protoc-gen-connect-query v1.4.1 with parameter "target=ts"
2
+ // @generated from file uniswap/sessionservice/v1/sessionService.proto (package uniswap.sessionService.v1, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+ import { MethodKind } from "@bufbuild/protobuf";
6
+ import { ChallengeRequest, ChallengeResponse, DeleteSessionRequest, DeleteSessionResponse, InitSessionRequest, InitSessionResponse, IntrospectRequest, IntrospectResponse, UpgradeSessionRequest, UpgradeSessionResponse } from "./sessionService_pb.js";
7
+ /**
8
+ * typically utilized by Entry Gateway for inspecting the validity of a session
9
+ *
10
+ * @generated from rpc uniswap.sessionService.v1.SessionService.Introspect
11
+ */
12
+ export const introspect = {
13
+ localName: "introspect",
14
+ name: "Introspect",
15
+ kind: MethodKind.Unary,
16
+ I: IntrospectRequest,
17
+ O: IntrospectResponse,
18
+ service: {
19
+ typeName: "uniswap.sessionService.v1.SessionService"
20
+ }
21
+ };
22
+ /**
23
+ * used by client for initializing a session
24
+ *
25
+ * @generated from rpc uniswap.sessionService.v1.SessionService.InitSession
26
+ */
27
+ export const initSession = {
28
+ localName: "initSession",
29
+ name: "InitSession",
30
+ kind: MethodKind.Unary,
31
+ I: InitSessionRequest,
32
+ O: InitSessionResponse,
33
+ service: {
34
+ typeName: "uniswap.sessionService.v1.SessionService"
35
+ }
36
+ };
37
+ /**
38
+ * used by client to request a challenge
39
+ *
40
+ * @generated from rpc uniswap.sessionService.v1.SessionService.Challenge
41
+ */
42
+ export const challenge = {
43
+ localName: "challenge",
44
+ name: "Challenge",
45
+ kind: MethodKind.Unary,
46
+ I: ChallengeRequest,
47
+ O: ChallengeResponse,
48
+ service: {
49
+ typeName: "uniswap.sessionService.v1.SessionService"
50
+ }
51
+ };
52
+ /**
53
+ * a universal method for all types of bot detection mechanism
54
+ *
55
+ * @generated from rpc uniswap.sessionService.v1.SessionService.UpgradeSession
56
+ */
57
+ export const upgradeSession = {
58
+ localName: "upgradeSession",
59
+ name: "UpgradeSession",
60
+ kind: MethodKind.Unary,
61
+ I: UpgradeSessionRequest,
62
+ O: UpgradeSessionResponse,
63
+ service: {
64
+ typeName: "uniswap.sessionService.v1.SessionService"
65
+ }
66
+ };
67
+ /**
68
+ * delete a certain session. For example, on app uninstall
69
+ *
70
+ * @generated from rpc uniswap.sessionService.v1.SessionService.DeleteSession
71
+ */
72
+ export const deleteSession = {
73
+ localName: "deleteSession",
74
+ name: "DeleteSession",
75
+ kind: MethodKind.Unary,
76
+ I: DeleteSessionRequest,
77
+ O: DeleteSessionResponse,
78
+ service: {
79
+ typeName: "uniswap.sessionService.v1.SessionService"
80
+ }
81
+ };
@@ -0,0 +1,65 @@
1
+ import { ChallengeRequest, ChallengeResponse, DeleteSessionRequest, DeleteSessionResponse, InitSessionRequest, InitSessionResponse, IntrospectRequest, IntrospectResponse, UpgradeSessionRequest, UpgradeSessionResponse } from "./sessionService_pb.js";
2
+ import { MethodKind } from "@bufbuild/protobuf";
3
+ /**
4
+ * @generated from service uniswap.sessionService.v1.SessionService
5
+ */
6
+ export declare const SessionService: {
7
+ readonly typeName: "uniswap.sessionService.v1.SessionService";
8
+ readonly methods: {
9
+ /**
10
+ * typically utilized by Entry Gateway for inspecting the validity of a session
11
+ *
12
+ * @generated from rpc uniswap.sessionService.v1.SessionService.Introspect
13
+ */
14
+ readonly introspect: {
15
+ readonly name: "Introspect";
16
+ readonly I: typeof IntrospectRequest;
17
+ readonly O: typeof IntrospectResponse;
18
+ readonly kind: MethodKind.Unary;
19
+ };
20
+ /**
21
+ * used by client for initializing a session
22
+ *
23
+ * @generated from rpc uniswap.sessionService.v1.SessionService.InitSession
24
+ */
25
+ readonly initSession: {
26
+ readonly name: "InitSession";
27
+ readonly I: typeof InitSessionRequest;
28
+ readonly O: typeof InitSessionResponse;
29
+ readonly kind: MethodKind.Unary;
30
+ };
31
+ /**
32
+ * used by client to request a challenge
33
+ *
34
+ * @generated from rpc uniswap.sessionService.v1.SessionService.Challenge
35
+ */
36
+ readonly challenge: {
37
+ readonly name: "Challenge";
38
+ readonly I: typeof ChallengeRequest;
39
+ readonly O: typeof ChallengeResponse;
40
+ readonly kind: MethodKind.Unary;
41
+ };
42
+ /**
43
+ * a universal method for all types of bot detection mechanism
44
+ *
45
+ * @generated from rpc uniswap.sessionService.v1.SessionService.UpgradeSession
46
+ */
47
+ readonly upgradeSession: {
48
+ readonly name: "UpgradeSession";
49
+ readonly I: typeof UpgradeSessionRequest;
50
+ readonly O: typeof UpgradeSessionResponse;
51
+ readonly kind: MethodKind.Unary;
52
+ };
53
+ /**
54
+ * delete a certain session. For example, on app uninstall
55
+ *
56
+ * @generated from rpc uniswap.sessionService.v1.SessionService.DeleteSession
57
+ */
58
+ readonly deleteSession: {
59
+ readonly name: "DeleteSession";
60
+ readonly I: typeof DeleteSessionRequest;
61
+ readonly O: typeof DeleteSessionResponse;
62
+ readonly kind: MethodKind.Unary;
63
+ };
64
+ };
65
+ };
@@ -0,0 +1,69 @@
1
+ // @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts"
2
+ // @generated from file uniswap/sessionservice/v1/sessionService.proto (package uniswap.sessionService.v1, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+ import { ChallengeRequest, ChallengeResponse, DeleteSessionRequest, DeleteSessionResponse, InitSessionRequest, InitSessionResponse, IntrospectRequest, IntrospectResponse, UpgradeSessionRequest, UpgradeSessionResponse } from "./sessionService_pb.js";
6
+ import { MethodKind } from "@bufbuild/protobuf";
7
+ /**
8
+ * @generated from service uniswap.sessionService.v1.SessionService
9
+ */
10
+ export const SessionService = {
11
+ typeName: "uniswap.sessionService.v1.SessionService",
12
+ methods: {
13
+ /**
14
+ * typically utilized by Entry Gateway for inspecting the validity of a session
15
+ *
16
+ * @generated from rpc uniswap.sessionService.v1.SessionService.Introspect
17
+ */
18
+ introspect: {
19
+ name: "Introspect",
20
+ I: IntrospectRequest,
21
+ O: IntrospectResponse,
22
+ kind: MethodKind.Unary,
23
+ },
24
+ /**
25
+ * used by client for initializing a session
26
+ *
27
+ * @generated from rpc uniswap.sessionService.v1.SessionService.InitSession
28
+ */
29
+ initSession: {
30
+ name: "InitSession",
31
+ I: InitSessionRequest,
32
+ O: InitSessionResponse,
33
+ kind: MethodKind.Unary,
34
+ },
35
+ /**
36
+ * used by client to request a challenge
37
+ *
38
+ * @generated from rpc uniswap.sessionService.v1.SessionService.Challenge
39
+ */
40
+ challenge: {
41
+ name: "Challenge",
42
+ I: ChallengeRequest,
43
+ O: ChallengeResponse,
44
+ kind: MethodKind.Unary,
45
+ },
46
+ /**
47
+ * a universal method for all types of bot detection mechanism
48
+ *
49
+ * @generated from rpc uniswap.sessionService.v1.SessionService.UpgradeSession
50
+ */
51
+ upgradeSession: {
52
+ name: "UpgradeSession",
53
+ I: UpgradeSessionRequest,
54
+ O: UpgradeSessionResponse,
55
+ kind: MethodKind.Unary,
56
+ },
57
+ /**
58
+ * delete a certain session. For example, on app uninstall
59
+ *
60
+ * @generated from rpc uniswap.sessionService.v1.SessionService.DeleteSession
61
+ */
62
+ deleteSession: {
63
+ name: "DeleteSession",
64
+ I: DeleteSessionRequest,
65
+ O: DeleteSessionResponse,
66
+ kind: MethodKind.Unary,
67
+ },
68
+ }
69
+ };
@@ -0,0 +1,205 @@
1
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
2
+ import { Message, proto3 } from "@bufbuild/protobuf";
3
+ /**
4
+ * @generated from enum uniswap.sessionService.v1.BotDetectionType
5
+ */
6
+ export declare enum BotDetectionType {
7
+ /**
8
+ * @generated from enum value: BOT_DETECTION_NONE = 0;
9
+ */
10
+ BOT_DETECTION_NONE = 0,
11
+ /**
12
+ * @generated from enum value: BOT_DETECTION_TURNSTILE = 1;
13
+ */
14
+ BOT_DETECTION_TURNSTILE = 1,
15
+ /**
16
+ * client should receive challenge in the format of json
17
+ *
18
+ * @generated from enum value: BOT_DETECTION_HASHCASH = 2;
19
+ */
20
+ BOT_DETECTION_HASHCASH = 2
21
+ }
22
+ /**
23
+ * @generated from message uniswap.sessionService.v1.IntrospectRequest
24
+ */
25
+ export declare class IntrospectRequest extends Message<IntrospectRequest> {
26
+ /**
27
+ * only Entry Gate way will call, therefore in the request body
28
+ *
29
+ * @generated from field: string session_id = 1;
30
+ */
31
+ sessionId: string;
32
+ constructor(data?: PartialMessage<IntrospectRequest>);
33
+ static readonly runtime: typeof proto3;
34
+ static readonly typeName = "uniswap.sessionService.v1.IntrospectRequest";
35
+ static readonly fields: FieldList;
36
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): IntrospectRequest;
37
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): IntrospectRequest;
38
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): IntrospectRequest;
39
+ static equals(a: IntrospectRequest | PlainMessage<IntrospectRequest> | undefined, b: IntrospectRequest | PlainMessage<IntrospectRequest> | undefined): boolean;
40
+ }
41
+ /**
42
+ * @generated from message uniswap.sessionService.v1.IntrospectResponse
43
+ */
44
+ export declare class IntrospectResponse extends Message<IntrospectResponse> {
45
+ /**
46
+ * @generated from field: string wrapped_id = 1;
47
+ */
48
+ wrappedId: string;
49
+ /**
50
+ * @generated from field: bool result = 2;
51
+ */
52
+ result: boolean;
53
+ /**
54
+ * string user_id = 3; // will add back when user_id is available
55
+ *
56
+ * @generated from field: int32 score = 4;
57
+ */
58
+ score: number;
59
+ constructor(data?: PartialMessage<IntrospectResponse>);
60
+ static readonly runtime: typeof proto3;
61
+ static readonly typeName = "uniswap.sessionService.v1.IntrospectResponse";
62
+ static readonly fields: FieldList;
63
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): IntrospectResponse;
64
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): IntrospectResponse;
65
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): IntrospectResponse;
66
+ static equals(a: IntrospectResponse | PlainMessage<IntrospectResponse> | undefined, b: IntrospectResponse | PlainMessage<IntrospectResponse> | undefined): boolean;
67
+ }
68
+ /**
69
+ * @generated from message uniswap.sessionService.v1.InitSessionRequest
70
+ */
71
+ export declare class InitSessionRequest extends Message<InitSessionRequest> {
72
+ constructor(data?: PartialMessage<InitSessionRequest>);
73
+ static readonly runtime: typeof proto3;
74
+ static readonly typeName = "uniswap.sessionService.v1.InitSessionRequest";
75
+ static readonly fields: FieldList;
76
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): InitSessionRequest;
77
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): InitSessionRequest;
78
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): InitSessionRequest;
79
+ static equals(a: InitSessionRequest | PlainMessage<InitSessionRequest> | undefined, b: InitSessionRequest | PlainMessage<InitSessionRequest> | undefined): boolean;
80
+ }
81
+ /**
82
+ * @generated from message uniswap.sessionService.v1.InitSessionResponse
83
+ */
84
+ export declare class InitSessionResponse extends Message<InitSessionResponse> {
85
+ /**
86
+ * for web, it is in the cookie, for mobile + extension, it is in the body
87
+ *
88
+ * @generated from field: optional string session_id = 1;
89
+ */
90
+ sessionId?: string;
91
+ /**
92
+ * @generated from field: bool need_challenge = 2;
93
+ */
94
+ needChallenge: boolean;
95
+ /**
96
+ * extra information in json client needs to know to complete the bot detection mechanism
97
+ *
98
+ * @generated from field: map<string, string> extra = 3;
99
+ */
100
+ extra: {
101
+ [key: string]: string;
102
+ };
103
+ constructor(data?: PartialMessage<InitSessionResponse>);
104
+ static readonly runtime: typeof proto3;
105
+ static readonly typeName = "uniswap.sessionService.v1.InitSessionResponse";
106
+ static readonly fields: FieldList;
107
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): InitSessionResponse;
108
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): InitSessionResponse;
109
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): InitSessionResponse;
110
+ static equals(a: InitSessionResponse | PlainMessage<InitSessionResponse> | undefined, b: InitSessionResponse | PlainMessage<InitSessionResponse> | undefined): boolean;
111
+ }
112
+ /**
113
+ * @generated from message uniswap.sessionService.v1.ChallengeRequest
114
+ */
115
+ export declare class ChallengeRequest extends Message<ChallengeRequest> {
116
+ constructor(data?: PartialMessage<ChallengeRequest>);
117
+ static readonly runtime: typeof proto3;
118
+ static readonly typeName = "uniswap.sessionService.v1.ChallengeRequest";
119
+ static readonly fields: FieldList;
120
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ChallengeRequest;
121
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ChallengeRequest;
122
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChallengeRequest;
123
+ static equals(a: ChallengeRequest | PlainMessage<ChallengeRequest> | undefined, b: ChallengeRequest | PlainMessage<ChallengeRequest> | undefined): boolean;
124
+ }
125
+ /**
126
+ * @generated from message uniswap.sessionService.v1.ChallengeResponse
127
+ */
128
+ export declare class ChallengeResponse extends Message<ChallengeResponse> {
129
+ /**
130
+ * @generated from field: optional string challenge = 1;
131
+ */
132
+ challenge?: string;
133
+ /**
134
+ * the bot detection mechanism client should use
135
+ *
136
+ * @generated from field: uniswap.sessionService.v1.BotDetectionType bot_detection_type = 2;
137
+ */
138
+ botDetectionType: BotDetectionType;
139
+ constructor(data?: PartialMessage<ChallengeResponse>);
140
+ static readonly runtime: typeof proto3;
141
+ static readonly typeName = "uniswap.sessionService.v1.ChallengeResponse";
142
+ static readonly fields: FieldList;
143
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ChallengeResponse;
144
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ChallengeResponse;
145
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChallengeResponse;
146
+ static equals(a: ChallengeResponse | PlainMessage<ChallengeResponse> | undefined, b: ChallengeResponse | PlainMessage<ChallengeResponse> | undefined): boolean;
147
+ }
148
+ /**
149
+ * @generated from message uniswap.sessionService.v1.UpgradeSessionRequest
150
+ */
151
+ export declare class UpgradeSessionRequest extends Message<UpgradeSessionRequest> {
152
+ /**
153
+ * e.g., bot detection token or hashcash solution
154
+ *
155
+ * @generated from field: string solution = 1;
156
+ */
157
+ solution: string;
158
+ constructor(data?: PartialMessage<UpgradeSessionRequest>);
159
+ static readonly runtime: typeof proto3;
160
+ static readonly typeName = "uniswap.sessionService.v1.UpgradeSessionRequest";
161
+ static readonly fields: FieldList;
162
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpgradeSessionRequest;
163
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpgradeSessionRequest;
164
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpgradeSessionRequest;
165
+ static equals(a: UpgradeSessionRequest | PlainMessage<UpgradeSessionRequest> | undefined, b: UpgradeSessionRequest | PlainMessage<UpgradeSessionRequest> | undefined): boolean;
166
+ }
167
+ /**
168
+ * @generated from message uniswap.sessionService.v1.UpgradeSessionResponse
169
+ */
170
+ export declare class UpgradeSessionResponse extends Message<UpgradeSessionResponse> {
171
+ constructor(data?: PartialMessage<UpgradeSessionResponse>);
172
+ static readonly runtime: typeof proto3;
173
+ static readonly typeName = "uniswap.sessionService.v1.UpgradeSessionResponse";
174
+ static readonly fields: FieldList;
175
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpgradeSessionResponse;
176
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpgradeSessionResponse;
177
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpgradeSessionResponse;
178
+ static equals(a: UpgradeSessionResponse | PlainMessage<UpgradeSessionResponse> | undefined, b: UpgradeSessionResponse | PlainMessage<UpgradeSessionResponse> | undefined): boolean;
179
+ }
180
+ /**
181
+ * @generated from message uniswap.sessionService.v1.DeleteSessionRequest
182
+ */
183
+ export declare class DeleteSessionRequest extends Message<DeleteSessionRequest> {
184
+ constructor(data?: PartialMessage<DeleteSessionRequest>);
185
+ static readonly runtime: typeof proto3;
186
+ static readonly typeName = "uniswap.sessionService.v1.DeleteSessionRequest";
187
+ static readonly fields: FieldList;
188
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteSessionRequest;
189
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteSessionRequest;
190
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteSessionRequest;
191
+ static equals(a: DeleteSessionRequest | PlainMessage<DeleteSessionRequest> | undefined, b: DeleteSessionRequest | PlainMessage<DeleteSessionRequest> | undefined): boolean;
192
+ }
193
+ /**
194
+ * @generated from message uniswap.sessionService.v1.DeleteSessionResponse
195
+ */
196
+ export declare class DeleteSessionResponse extends Message<DeleteSessionResponse> {
197
+ constructor(data?: PartialMessage<DeleteSessionResponse>);
198
+ static readonly runtime: typeof proto3;
199
+ static readonly typeName = "uniswap.sessionService.v1.DeleteSessionResponse";
200
+ static readonly fields: FieldList;
201
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteSessionResponse;
202
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteSessionResponse;
203
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteSessionResponse;
204
+ static equals(a: DeleteSessionResponse | PlainMessage<DeleteSessionResponse> | undefined, b: DeleteSessionResponse | PlainMessage<DeleteSessionResponse> | undefined): boolean;
205
+ }
@@ -0,0 +1,328 @@
1
+ // @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
2
+ // @generated from file uniswap/sessionservice/v1/sessionService.proto (package uniswap.sessionService.v1, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+ import { Message, proto3 } from "@bufbuild/protobuf";
6
+ /**
7
+ * @generated from enum uniswap.sessionService.v1.BotDetectionType
8
+ */
9
+ export var BotDetectionType;
10
+ (function (BotDetectionType) {
11
+ /**
12
+ * @generated from enum value: BOT_DETECTION_NONE = 0;
13
+ */
14
+ BotDetectionType[BotDetectionType["BOT_DETECTION_NONE"] = 0] = "BOT_DETECTION_NONE";
15
+ /**
16
+ * @generated from enum value: BOT_DETECTION_TURNSTILE = 1;
17
+ */
18
+ BotDetectionType[BotDetectionType["BOT_DETECTION_TURNSTILE"] = 1] = "BOT_DETECTION_TURNSTILE";
19
+ /**
20
+ * client should receive challenge in the format of json
21
+ *
22
+ * @generated from enum value: BOT_DETECTION_HASHCASH = 2;
23
+ */
24
+ BotDetectionType[BotDetectionType["BOT_DETECTION_HASHCASH"] = 2] = "BOT_DETECTION_HASHCASH";
25
+ })(BotDetectionType || (BotDetectionType = {}));
26
+ // Retrieve enum metadata with: proto3.getEnumType(BotDetectionType)
27
+ proto3.util.setEnumType(BotDetectionType, "uniswap.sessionService.v1.BotDetectionType", [
28
+ { no: 0, name: "BOT_DETECTION_NONE" },
29
+ { no: 1, name: "BOT_DETECTION_TURNSTILE" },
30
+ { no: 2, name: "BOT_DETECTION_HASHCASH" },
31
+ ]);
32
+ /**
33
+ * @generated from message uniswap.sessionService.v1.IntrospectRequest
34
+ */
35
+ export class IntrospectRequest extends Message {
36
+ constructor(data) {
37
+ super();
38
+ /**
39
+ * only Entry Gate way will call, therefore in the request body
40
+ *
41
+ * @generated from field: string session_id = 1;
42
+ */
43
+ this.sessionId = "";
44
+ proto3.util.initPartial(data, this);
45
+ }
46
+ static fromBinary(bytes, options) {
47
+ return new IntrospectRequest().fromBinary(bytes, options);
48
+ }
49
+ static fromJson(jsonValue, options) {
50
+ return new IntrospectRequest().fromJson(jsonValue, options);
51
+ }
52
+ static fromJsonString(jsonString, options) {
53
+ return new IntrospectRequest().fromJsonString(jsonString, options);
54
+ }
55
+ static equals(a, b) {
56
+ return proto3.util.equals(IntrospectRequest, a, b);
57
+ }
58
+ }
59
+ IntrospectRequest.runtime = proto3;
60
+ IntrospectRequest.typeName = "uniswap.sessionService.v1.IntrospectRequest";
61
+ IntrospectRequest.fields = proto3.util.newFieldList(() => [
62
+ { no: 1, name: "session_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
63
+ ]);
64
+ /**
65
+ * @generated from message uniswap.sessionService.v1.IntrospectResponse
66
+ */
67
+ export class IntrospectResponse extends Message {
68
+ constructor(data) {
69
+ super();
70
+ /**
71
+ * @generated from field: string wrapped_id = 1;
72
+ */
73
+ this.wrappedId = "";
74
+ /**
75
+ * @generated from field: bool result = 2;
76
+ */
77
+ this.result = false;
78
+ /**
79
+ * string user_id = 3; // will add back when user_id is available
80
+ *
81
+ * @generated from field: int32 score = 4;
82
+ */
83
+ this.score = 0;
84
+ proto3.util.initPartial(data, this);
85
+ }
86
+ static fromBinary(bytes, options) {
87
+ return new IntrospectResponse().fromBinary(bytes, options);
88
+ }
89
+ static fromJson(jsonValue, options) {
90
+ return new IntrospectResponse().fromJson(jsonValue, options);
91
+ }
92
+ static fromJsonString(jsonString, options) {
93
+ return new IntrospectResponse().fromJsonString(jsonString, options);
94
+ }
95
+ static equals(a, b) {
96
+ return proto3.util.equals(IntrospectResponse, a, b);
97
+ }
98
+ }
99
+ IntrospectResponse.runtime = proto3;
100
+ IntrospectResponse.typeName = "uniswap.sessionService.v1.IntrospectResponse";
101
+ IntrospectResponse.fields = proto3.util.newFieldList(() => [
102
+ { no: 1, name: "wrapped_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
103
+ { no: 2, name: "result", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
104
+ { no: 4, name: "score", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
105
+ ]);
106
+ /**
107
+ * @generated from message uniswap.sessionService.v1.InitSessionRequest
108
+ */
109
+ export class InitSessionRequest extends Message {
110
+ constructor(data) {
111
+ super();
112
+ proto3.util.initPartial(data, this);
113
+ }
114
+ static fromBinary(bytes, options) {
115
+ return new InitSessionRequest().fromBinary(bytes, options);
116
+ }
117
+ static fromJson(jsonValue, options) {
118
+ return new InitSessionRequest().fromJson(jsonValue, options);
119
+ }
120
+ static fromJsonString(jsonString, options) {
121
+ return new InitSessionRequest().fromJsonString(jsonString, options);
122
+ }
123
+ static equals(a, b) {
124
+ return proto3.util.equals(InitSessionRequest, a, b);
125
+ }
126
+ }
127
+ InitSessionRequest.runtime = proto3;
128
+ InitSessionRequest.typeName = "uniswap.sessionService.v1.InitSessionRequest";
129
+ InitSessionRequest.fields = proto3.util.newFieldList(() => []);
130
+ /**
131
+ * @generated from message uniswap.sessionService.v1.InitSessionResponse
132
+ */
133
+ export class InitSessionResponse extends Message {
134
+ constructor(data) {
135
+ super();
136
+ /**
137
+ * @generated from field: bool need_challenge = 2;
138
+ */
139
+ this.needChallenge = false;
140
+ /**
141
+ * extra information in json client needs to know to complete the bot detection mechanism
142
+ *
143
+ * @generated from field: map<string, string> extra = 3;
144
+ */
145
+ this.extra = {};
146
+ proto3.util.initPartial(data, this);
147
+ }
148
+ static fromBinary(bytes, options) {
149
+ return new InitSessionResponse().fromBinary(bytes, options);
150
+ }
151
+ static fromJson(jsonValue, options) {
152
+ return new InitSessionResponse().fromJson(jsonValue, options);
153
+ }
154
+ static fromJsonString(jsonString, options) {
155
+ return new InitSessionResponse().fromJsonString(jsonString, options);
156
+ }
157
+ static equals(a, b) {
158
+ return proto3.util.equals(InitSessionResponse, a, b);
159
+ }
160
+ }
161
+ InitSessionResponse.runtime = proto3;
162
+ InitSessionResponse.typeName = "uniswap.sessionService.v1.InitSessionResponse";
163
+ InitSessionResponse.fields = proto3.util.newFieldList(() => [
164
+ { no: 1, name: "session_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
165
+ { no: 2, name: "need_challenge", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
166
+ { no: 3, name: "extra", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "scalar", T: 9 /* ScalarType.STRING */ } },
167
+ ]);
168
+ /**
169
+ * @generated from message uniswap.sessionService.v1.ChallengeRequest
170
+ */
171
+ export class ChallengeRequest extends Message {
172
+ constructor(data) {
173
+ super();
174
+ proto3.util.initPartial(data, this);
175
+ }
176
+ static fromBinary(bytes, options) {
177
+ return new ChallengeRequest().fromBinary(bytes, options);
178
+ }
179
+ static fromJson(jsonValue, options) {
180
+ return new ChallengeRequest().fromJson(jsonValue, options);
181
+ }
182
+ static fromJsonString(jsonString, options) {
183
+ return new ChallengeRequest().fromJsonString(jsonString, options);
184
+ }
185
+ static equals(a, b) {
186
+ return proto3.util.equals(ChallengeRequest, a, b);
187
+ }
188
+ }
189
+ ChallengeRequest.runtime = proto3;
190
+ ChallengeRequest.typeName = "uniswap.sessionService.v1.ChallengeRequest";
191
+ ChallengeRequest.fields = proto3.util.newFieldList(() => []);
192
+ /**
193
+ * @generated from message uniswap.sessionService.v1.ChallengeResponse
194
+ */
195
+ export class ChallengeResponse extends Message {
196
+ constructor(data) {
197
+ super();
198
+ /**
199
+ * the bot detection mechanism client should use
200
+ *
201
+ * @generated from field: uniswap.sessionService.v1.BotDetectionType bot_detection_type = 2;
202
+ */
203
+ this.botDetectionType = BotDetectionType.BOT_DETECTION_NONE;
204
+ proto3.util.initPartial(data, this);
205
+ }
206
+ static fromBinary(bytes, options) {
207
+ return new ChallengeResponse().fromBinary(bytes, options);
208
+ }
209
+ static fromJson(jsonValue, options) {
210
+ return new ChallengeResponse().fromJson(jsonValue, options);
211
+ }
212
+ static fromJsonString(jsonString, options) {
213
+ return new ChallengeResponse().fromJsonString(jsonString, options);
214
+ }
215
+ static equals(a, b) {
216
+ return proto3.util.equals(ChallengeResponse, a, b);
217
+ }
218
+ }
219
+ ChallengeResponse.runtime = proto3;
220
+ ChallengeResponse.typeName = "uniswap.sessionService.v1.ChallengeResponse";
221
+ ChallengeResponse.fields = proto3.util.newFieldList(() => [
222
+ { no: 1, name: "challenge", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
223
+ { no: 2, name: "bot_detection_type", kind: "enum", T: proto3.getEnumType(BotDetectionType) },
224
+ ]);
225
+ /**
226
+ * @generated from message uniswap.sessionService.v1.UpgradeSessionRequest
227
+ */
228
+ export class UpgradeSessionRequest extends Message {
229
+ constructor(data) {
230
+ super();
231
+ /**
232
+ * e.g., bot detection token or hashcash solution
233
+ *
234
+ * @generated from field: string solution = 1;
235
+ */
236
+ this.solution = "";
237
+ proto3.util.initPartial(data, this);
238
+ }
239
+ static fromBinary(bytes, options) {
240
+ return new UpgradeSessionRequest().fromBinary(bytes, options);
241
+ }
242
+ static fromJson(jsonValue, options) {
243
+ return new UpgradeSessionRequest().fromJson(jsonValue, options);
244
+ }
245
+ static fromJsonString(jsonString, options) {
246
+ return new UpgradeSessionRequest().fromJsonString(jsonString, options);
247
+ }
248
+ static equals(a, b) {
249
+ return proto3.util.equals(UpgradeSessionRequest, a, b);
250
+ }
251
+ }
252
+ UpgradeSessionRequest.runtime = proto3;
253
+ UpgradeSessionRequest.typeName = "uniswap.sessionService.v1.UpgradeSessionRequest";
254
+ UpgradeSessionRequest.fields = proto3.util.newFieldList(() => [
255
+ { no: 1, name: "solution", kind: "scalar", T: 9 /* ScalarType.STRING */ },
256
+ ]);
257
+ /**
258
+ * @generated from message uniswap.sessionService.v1.UpgradeSessionResponse
259
+ */
260
+ export class UpgradeSessionResponse extends Message {
261
+ constructor(data) {
262
+ super();
263
+ proto3.util.initPartial(data, this);
264
+ }
265
+ static fromBinary(bytes, options) {
266
+ return new UpgradeSessionResponse().fromBinary(bytes, options);
267
+ }
268
+ static fromJson(jsonValue, options) {
269
+ return new UpgradeSessionResponse().fromJson(jsonValue, options);
270
+ }
271
+ static fromJsonString(jsonString, options) {
272
+ return new UpgradeSessionResponse().fromJsonString(jsonString, options);
273
+ }
274
+ static equals(a, b) {
275
+ return proto3.util.equals(UpgradeSessionResponse, a, b);
276
+ }
277
+ }
278
+ UpgradeSessionResponse.runtime = proto3;
279
+ UpgradeSessionResponse.typeName = "uniswap.sessionService.v1.UpgradeSessionResponse";
280
+ UpgradeSessionResponse.fields = proto3.util.newFieldList(() => []);
281
+ /**
282
+ * @generated from message uniswap.sessionService.v1.DeleteSessionRequest
283
+ */
284
+ export class DeleteSessionRequest extends Message {
285
+ constructor(data) {
286
+ super();
287
+ proto3.util.initPartial(data, this);
288
+ }
289
+ static fromBinary(bytes, options) {
290
+ return new DeleteSessionRequest().fromBinary(bytes, options);
291
+ }
292
+ static fromJson(jsonValue, options) {
293
+ return new DeleteSessionRequest().fromJson(jsonValue, options);
294
+ }
295
+ static fromJsonString(jsonString, options) {
296
+ return new DeleteSessionRequest().fromJsonString(jsonString, options);
297
+ }
298
+ static equals(a, b) {
299
+ return proto3.util.equals(DeleteSessionRequest, a, b);
300
+ }
301
+ }
302
+ DeleteSessionRequest.runtime = proto3;
303
+ DeleteSessionRequest.typeName = "uniswap.sessionService.v1.DeleteSessionRequest";
304
+ DeleteSessionRequest.fields = proto3.util.newFieldList(() => []);
305
+ /**
306
+ * @generated from message uniswap.sessionService.v1.DeleteSessionResponse
307
+ */
308
+ export class DeleteSessionResponse extends Message {
309
+ constructor(data) {
310
+ super();
311
+ proto3.util.initPartial(data, this);
312
+ }
313
+ static fromBinary(bytes, options) {
314
+ return new DeleteSessionResponse().fromBinary(bytes, options);
315
+ }
316
+ static fromJson(jsonValue, options) {
317
+ return new DeleteSessionResponse().fromJson(jsonValue, options);
318
+ }
319
+ static fromJsonString(jsonString, options) {
320
+ return new DeleteSessionResponse().fromJsonString(jsonString, options);
321
+ }
322
+ static equals(a, b) {
323
+ return proto3.util.equals(DeleteSessionResponse, a, b);
324
+ }
325
+ }
326
+ DeleteSessionResponse.runtime = proto3;
327
+ DeleteSessionResponse.typeName = "uniswap.sessionService.v1.DeleteSessionResponse";
328
+ DeleteSessionResponse.fields = proto3.util.newFieldList(() => []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-platform-service",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },