| 1 | // @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=none" |
| 2 | // @generated from file svc/auth/v1/service.proto (package svc.auth.v1, syntax proto3) |
| 3 | /* eslint-disable */ |
| 4 | // @ts-nocheck |
| 5 | |
| 6 | import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; |
| 7 | import { Duration, Message, proto3, Timestamp } from "@bufbuild/protobuf"; |
| 8 | import { Version } from "../../../types/v1/version_pb"; |
| 9 | import { UserToken } from "../../../types/v1/user_token_pb"; |
| 10 | |
| 11 | /** |
| 12 | * @generated from message svc.auth.v1.GetAuthURLRequest |
| 13 | */ |
| 14 | export class GetAuthURLRequest extends Message<GetAuthURLRequest> { |
| 15 | /** |
| 16 | * optional: if an org is specified |
| 17 | * |
| 18 | * @generated from oneof svc.auth.v1.GetAuthURLRequest.organization |
| 19 | */ |
| 20 | organization: { |
| 21 | /** |
| 22 | * @generated from field: int64 by_id = 100; |
| 23 | */ |
| 24 | value: bigint; |
| 25 | case: "byId"; |
| 26 | } | { |
| 27 | /** |
| 28 | * @generated from field: string by_name = 101; |
| 29 | */ |
| 30 | value: string; |
| 31 | case: "byName"; |
| 32 | } | { case: undefined; value?: undefined } = { case: undefined }; |
| 33 | |
| 34 | /** |
| 35 | * @generated from field: string return_to_url = 2; |
| 36 | */ |
| 37 | returnToUrl = ""; |
| 38 | |
| 39 | /** |
| 40 | * @generated from field: svc.auth.v1.LocalhostViaBrowser localhost = 3; |
| 41 | */ |
| 42 | localhost?: LocalhostViaBrowser; |
| 43 | |
| 44 | constructor(data?: PartialMessage<GetAuthURLRequest>) { |
| 45 | super(); |
| 46 | proto3.util.initPartial(data, this); |
| 47 | } |
| 48 | |
| 49 | static readonly runtime: typeof proto3 = proto3; |
| 50 | static readonly typeName = "svc.auth.v1.GetAuthURLRequest"; |
| 51 | static readonly fields: FieldList = proto3.util.newFieldList(() => [ |
| 52 | { no: 100, name: "by_id", kind: "scalar", T: 3 /* ScalarType.INT64 */, oneof: "organization" }, |
| 53 | { no: 101, name: "by_name", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "organization" }, |
| 54 | { no: 2, name: "return_to_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, |
| 55 | { no: 3, name: "localhost", kind: "message", T: LocalhostViaBrowser }, |
| 56 | ]); |
| 57 | |
| 58 | static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetAuthURLRequest { |
| 59 | return new GetAuthURLRequest().fromBinary(bytes, options); |
| 60 | } |
| 61 | |
| 62 | static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetAuthURLRequest { |
| 63 | return new GetAuthURLRequest().fromJson(jsonValue, options); |
| 64 | } |
| 65 | |
| 66 | static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetAuthURLRequest { |
| 67 | return new GetAuthURLRequest().fromJsonString(jsonString, options); |
| 68 | } |
| 69 | |
| 70 | static equals(a: GetAuthURLRequest | PlainMessage<GetAuthURLRequest> | undefined, b: GetAuthURLRequest | PlainMessage<GetAuthURLRequest> | undefined): boolean { |
| 71 | return proto3.util.equals(GetAuthURLRequest, a, b); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * @generated from message svc.auth.v1.LocalhostViaBrowser |
| 77 | */ |
| 78 | export class LocalhostViaBrowser extends Message<LocalhostViaBrowser> { |
| 79 | /** |
| 80 | * @generated from field: string architecture = 1; |
| 81 | */ |
| 82 | architecture = ""; |
| 83 | |
| 84 | /** |
| 85 | * @generated from field: string operating_system = 2; |
| 86 | */ |
| 87 | operatingSystem = ""; |
| 88 | |
| 89 | /** |
| 90 | * @generated from field: types.v1.Version using_version = 3; |
| 91 | */ |
| 92 | usingVersion?: Version; |
| 93 | |
| 94 | constructor(data?: PartialMessage<LocalhostViaBrowser>) { |
| 95 | super(); |
| 96 | proto3.util.initPartial(data, this); |
| 97 | } |
| 98 | |
| 99 | static readonly runtime: typeof proto3 = proto3; |
| 100 | static readonly typeName = "svc.auth.v1.LocalhostViaBrowser"; |
| 101 | static readonly fields: FieldList = proto3.util.newFieldList(() => [ |
| 102 | { no: 1, name: "architecture", kind: "scalar", T: 9 /* ScalarType.STRING */ }, |
| 103 | { no: 2, name: "operating_system", kind: "scalar", T: 9 /* ScalarType.STRING */ }, |
| 104 | { no: 3, name: "using_version", kind: "message", T: Version }, |
| 105 | ]); |
| 106 | |
| 107 | static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LocalhostViaBrowser { |
| 108 | return new LocalhostViaBrowser().fromBinary(bytes, options); |
| 109 | } |
| 110 | |
| 111 | static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LocalhostViaBrowser { |
| 112 | return new LocalhostViaBrowser().fromJson(jsonValue, options); |
| 113 | } |
| 114 | |
| 115 | static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LocalhostViaBrowser { |
| 116 | return new LocalhostViaBrowser().fromJsonString(jsonString, options); |
| 117 | } |
| 118 | |
| 119 | static equals(a: LocalhostViaBrowser | PlainMessage<LocalhostViaBrowser> | undefined, b: LocalhostViaBrowser | PlainMessage<LocalhostViaBrowser> | undefined): boolean { |
| 120 | return proto3.util.equals(LocalhostViaBrowser, a, b); |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | /** |
| 125 | * @generated from message svc.auth.v1.GetAuthURLResponse |
| 126 | */ |
| 127 | export class GetAuthURLResponse extends Message<GetAuthURLResponse> { |
| 128 | /** |
| 129 | * @generated from field: string auth_url = 1; |
| 130 | */ |
| 131 | authUrl = ""; |
| 132 | |
| 133 | constructor(data?: PartialMessage<GetAuthURLResponse>) { |
| 134 | super(); |
| 135 | proto3.util.initPartial(data, this); |
| 136 | } |
| 137 | |
| 138 | static readonly runtime: typeof proto3 = proto3; |
| 139 | static readonly typeName = "svc.auth.v1.GetAuthURLResponse"; |
| 140 | static readonly fields: FieldList = proto3.util.newFieldList(() => [ |
| 141 | { no: 1, name: "auth_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, |
| 142 | ]); |
| 143 | |
| 144 | static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetAuthURLResponse { |
| 145 | return new GetAuthURLResponse().fromBinary(bytes, options); |
| 146 | } |
| 147 | |
| 148 | static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetAuthURLResponse { |
| 149 | return new GetAuthURLResponse().fromJson(jsonValue, options); |
| 150 | } |
| 151 | |
| 152 | static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetAuthURLResponse { |
| 153 | return new GetAuthURLResponse().fromJsonString(jsonString, options); |
| 154 | } |
| 155 | |
| 156 | static equals(a: GetAuthURLResponse | PlainMessage<GetAuthURLResponse> | undefined, b: GetAuthURLResponse | PlainMessage<GetAuthURLResponse> | undefined): boolean { |
| 157 | return proto3.util.equals(GetAuthURLResponse, a, b); |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | /** |
| 162 | * @generated from message svc.auth.v1.BeginDeviceAuthRequest |
| 163 | */ |
| 164 | export class BeginDeviceAuthRequest extends Message<BeginDeviceAuthRequest> { |
| 165 | /** |
| 166 | * @generated from field: string organization = 1; |
| 167 | */ |
| 168 | organization = ""; |
| 169 | |
| 170 | /** |
| 171 | * @generated from field: string return_to_url = 2; |
| 172 | */ |
| 173 | returnToUrl = ""; |
| 174 | |
| 175 | constructor(data?: PartialMessage<BeginDeviceAuthRequest>) { |
| 176 | super(); |
| 177 | proto3.util.initPartial(data, this); |
| 178 | } |
| 179 | |
| 180 | static readonly runtime: typeof proto3 = proto3; |
| 181 | static readonly typeName = "svc.auth.v1.BeginDeviceAuthRequest"; |
| 182 | static readonly fields: FieldList = proto3.util.newFieldList(() => [ |
| 183 | { no: 1, name: "organization", kind: "scalar", T: 9 /* ScalarType.STRING */ }, |
| 184 | { no: 2, name: "return_to_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, |
| 185 | ]); |
| 186 | |
| 187 | static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BeginDeviceAuthRequest { |
| 188 | return new BeginDeviceAuthRequest().fromBinary(bytes, options); |
| 189 | } |
| 190 | |
| 191 | static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BeginDeviceAuthRequest { |
| 192 | return new BeginDeviceAuthRequest().fromJson(jsonValue, options); |
| 193 | } |
| 194 | |
| 195 | static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BeginDeviceAuthRequest { |
| 196 | return new BeginDeviceAuthRequest().fromJsonString(jsonString, options); |
| 197 | } |
| 198 | |
| 199 | static equals(a: BeginDeviceAuthRequest | PlainMessage<BeginDeviceAuthRequest> | undefined, b: BeginDeviceAuthRequest | PlainMessage<BeginDeviceAuthRequest> | undefined): boolean { |
| 200 | return proto3.util.equals(BeginDeviceAuthRequest, a, b); |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | /** |
| 205 | * @generated from message svc.auth.v1.BeginDeviceAuthResponse |
| 206 | */ |
| 207 | export class BeginDeviceAuthResponse extends Message<BeginDeviceAuthResponse> { |
| 208 | /** |
| 209 | * @generated from field: string url = 1; |
| 210 | */ |
| 211 | url = ""; |
| 212 | |
| 213 | /** |
| 214 | * device_code must be used to retrieve an authenticated user token with `CompleteDeviceAuth` |
| 215 | * |
| 216 | * @generated from field: string device_code = 2; |
| 217 | */ |
| 218 | deviceCode = ""; |
| 219 | |
| 220 | /** |
| 221 | * @generated from field: string user_code = 3; |
| 222 | */ |
| 223 | userCode = ""; |
| 224 | |
| 225 | /** |
| 226 | * @generated from field: google.protobuf.Timestamp expires_at = 4; |
| 227 | */ |
| 228 | expiresAt?: Timestamp; |
| 229 | |
| 230 | /** |
| 231 | * @generated from field: google.protobuf.Duration poll_interval = 5; |
| 232 | */ |
| 233 | pollInterval?: Duration; |
| 234 | |
| 235 | constructor(data?: PartialMessage<BeginDeviceAuthResponse>) { |
| 236 | super(); |
| 237 | proto3.util.initPartial(data, this); |
| 238 | } |
| 239 | |
| 240 | static readonly runtime: typeof proto3 = proto3; |
| 241 | static readonly typeName = "svc.auth.v1.BeginDeviceAuthResponse"; |
| 242 | static readonly fields: FieldList = proto3.util.newFieldList(() => [ |
| 243 | { no: 1, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, |
| 244 | { no: 2, name: "device_code", kind: "scalar", T: 9 /* ScalarType.STRING */ }, |
| 245 | { no: 3, name: "user_code", kind: "scalar", T: 9 /* ScalarType.STRING */ }, |
| 246 | { no: 4, name: "expires_at", kind: "message", T: Timestamp }, |
| 247 | { no: 5, name: "poll_interval", kind: "message", T: Duration }, |
| 248 | ]); |
| 249 | |
| 250 | static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BeginDeviceAuthResponse { |
| 251 | return new BeginDeviceAuthResponse().fromBinary(bytes, options); |
| 252 | } |
| 253 | |
| 254 | static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BeginDeviceAuthResponse { |
| 255 | return new BeginDeviceAuthResponse().fromJson(jsonValue, options); |
| 256 | } |
| 257 | |
| 258 | static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BeginDeviceAuthResponse { |
| 259 | return new BeginDeviceAuthResponse().fromJsonString(jsonString, options); |
| 260 | } |
| 261 | |
| 262 | static equals(a: BeginDeviceAuthResponse | PlainMessage<BeginDeviceAuthResponse> | undefined, b: BeginDeviceAuthResponse | PlainMessage<BeginDeviceAuthResponse> | undefined): boolean { |
| 263 | return proto3.util.equals(BeginDeviceAuthResponse, a, b); |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | /** |
| 268 | * @generated from message svc.auth.v1.CompleteDeviceAuthRequest |
| 269 | */ |
| 270 | export class CompleteDeviceAuthRequest extends Message<CompleteDeviceAuthRequest> { |
| 271 | /** |
| 272 | * device_code is returned when calling `BeginDeviceAuth` and allows an auth flow |
| 273 | * to retrieve the user token that is generated when a user is authenticated |
| 274 | * |
| 275 | * @generated from field: string device_code = 1; |
| 276 | */ |
| 277 | deviceCode = ""; |
| 278 | |
| 279 | /** |
| 280 | * @generated from field: string user_code = 2; |
| 281 | */ |
| 282 | userCode = ""; |
| 283 | |
| 284 | /** |
| 285 | * @generated from field: string architecture = 5; |
| 286 | */ |
| 287 | architecture = ""; |
| 288 | |
| 289 | /** |
| 290 | * @generated from field: string operating_system = 6; |
| 291 | */ |
| 292 | operatingSystem = ""; |
| 293 | |
| 294 | constructor(data?: PartialMessage<CompleteDeviceAuthRequest>) { |
| 295 | super(); |
| 296 | proto3.util.initPartial(data, this); |
| 297 | } |
| 298 | |
| 299 | static readonly runtime: typeof proto3 = proto3; |
| 300 | static readonly typeName = "svc.auth.v1.CompleteDeviceAuthRequest"; |
| 301 | static readonly fields: FieldList = proto3.util.newFieldList(() => [ |
| 302 | { no: 1, name: "device_code", kind: "scalar", T: 9 /* ScalarType.STRING */ }, |
| 303 | { no: 2, name: "user_code", kind: "scalar", T: 9 /* ScalarType.STRING */ }, |
| 304 | { no: 5, name: "architecture", kind: "scalar", T: 9 /* ScalarType.STRING */ }, |
| 305 | { no: 6, name: "operating_system", kind: "scalar", T: 9 /* ScalarType.STRING */ }, |
| 306 | ]); |
| 307 | |
| 308 | static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CompleteDeviceAuthRequest { |
| 309 | return new CompleteDeviceAuthRequest().fromBinary(bytes, options); |
| 310 | } |
| 311 | |
| 312 | static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CompleteDeviceAuthRequest { |
| 313 | return new CompleteDeviceAuthRequest().fromJson(jsonValue, options); |
| 314 | } |
| 315 | |
| 316 | static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CompleteDeviceAuthRequest { |
| 317 | return new CompleteDeviceAuthRequest().fromJsonString(jsonString, options); |
| 318 | } |
| 319 | |
| 320 | static equals(a: CompleteDeviceAuthRequest | PlainMessage<CompleteDeviceAuthRequest> | undefined, b: CompleteDeviceAuthRequest | PlainMessage<CompleteDeviceAuthRequest> | undefined): boolean { |
| 321 | return proto3.util.equals(CompleteDeviceAuthRequest, a, b); |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | /** |
| 326 | * @generated from message svc.auth.v1.CompleteDeviceAuthResponse |
| 327 | */ |
| 328 | export class CompleteDeviceAuthResponse extends Message<CompleteDeviceAuthResponse> { |
| 329 | /** |
| 330 | * @generated from field: types.v1.UserToken token = 1; |
| 331 | */ |
| 332 | token?: UserToken; |
| 333 | |
| 334 | constructor(data?: PartialMessage<CompleteDeviceAuthResponse>) { |
| 335 | super(); |
| 336 | proto3.util.initPartial(data, this); |
| 337 | } |
| 338 | |
| 339 | static readonly runtime: typeof proto3 = proto3; |
| 340 | static readonly typeName = "svc.auth.v1.CompleteDeviceAuthResponse"; |
| 341 | static readonly fields: FieldList = proto3.util.newFieldList(() => [ |
| 342 | { no: 1, name: "token", kind: "message", T: UserToken }, |
| 343 | ]); |
| 344 | |
| 345 | static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CompleteDeviceAuthResponse { |
| 346 | return new CompleteDeviceAuthResponse().fromBinary(bytes, options); |
| 347 | } |
| 348 | |
| 349 | static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CompleteDeviceAuthResponse { |
| 350 | return new CompleteDeviceAuthResponse().fromJson(jsonValue, options); |
| 351 | } |
| 352 | |
| 353 | static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CompleteDeviceAuthResponse { |
| 354 | return new CompleteDeviceAuthResponse().fromJsonString(jsonString, options); |
| 355 | } |
| 356 | |
| 357 | static equals(a: CompleteDeviceAuthResponse | PlainMessage<CompleteDeviceAuthResponse> | undefined, b: CompleteDeviceAuthResponse | PlainMessage<CompleteDeviceAuthResponse> | undefined): boolean { |
| 358 | return proto3.util.equals(CompleteDeviceAuthResponse, a, b); |
| 359 | } |
| 360 | } |
| 361 |