@miradorlabs/web-grpc 4.20.0 → 4.21.0

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,89 @@
1
+ // GENERATED CODE -- DO NOT EDIT!
2
+
3
+ 'use strict';
4
+ var grpc = require('@grpc/grpc-js');
5
+ var proto_gateway_web_v1_desktop_auth_gateway_pb = require('../../../../proto/gateway/web/v1/desktop_auth_gateway_pb.js');
6
+ var google_api_field_behavior_pb = require('../../../../google/api/field_behavior_pb.js');
7
+ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
8
+ var proto_gateway_common_v1_status_pb = require('../../../../proto/gateway/common/v1/status_pb.js');
9
+
10
+ function serialize_gateway_web_v1_AuthorizeDesktopFreshSessionRequest(arg) {
11
+ if (!(arg instanceof proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopFreshSessionRequest)) {
12
+ throw new Error('Expected argument of type gateway.web.v1.AuthorizeDesktopFreshSessionRequest');
13
+ }
14
+ return Buffer.from(arg.serializeBinary());
15
+ }
16
+
17
+ function deserialize_gateway_web_v1_AuthorizeDesktopFreshSessionRequest(buffer_arg) {
18
+ return proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopFreshSessionRequest.deserializeBinary(new Uint8Array(buffer_arg));
19
+ }
20
+
21
+ function serialize_gateway_web_v1_AuthorizeDesktopFreshSessionResponse(arg) {
22
+ if (!(arg instanceof proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopFreshSessionResponse)) {
23
+ throw new Error('Expected argument of type gateway.web.v1.AuthorizeDesktopFreshSessionResponse');
24
+ }
25
+ return Buffer.from(arg.serializeBinary());
26
+ }
27
+
28
+ function deserialize_gateway_web_v1_AuthorizeDesktopFreshSessionResponse(buffer_arg) {
29
+ return proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopFreshSessionResponse.deserializeBinary(new Uint8Array(buffer_arg));
30
+ }
31
+
32
+ function serialize_gateway_web_v1_AuthorizeDesktopLoginRequest(arg) {
33
+ if (!(arg instanceof proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopLoginRequest)) {
34
+ throw new Error('Expected argument of type gateway.web.v1.AuthorizeDesktopLoginRequest');
35
+ }
36
+ return Buffer.from(arg.serializeBinary());
37
+ }
38
+
39
+ function deserialize_gateway_web_v1_AuthorizeDesktopLoginRequest(buffer_arg) {
40
+ return proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopLoginRequest.deserializeBinary(new Uint8Array(buffer_arg));
41
+ }
42
+
43
+ function serialize_gateway_web_v1_AuthorizeDesktopLoginResponse(arg) {
44
+ if (!(arg instanceof proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopLoginResponse)) {
45
+ throw new Error('Expected argument of type gateway.web.v1.AuthorizeDesktopLoginResponse');
46
+ }
47
+ return Buffer.from(arg.serializeBinary());
48
+ }
49
+
50
+ function deserialize_gateway_web_v1_AuthorizeDesktopLoginResponse(buffer_arg) {
51
+ return proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopLoginResponse.deserializeBinary(new Uint8Array(buffer_arg));
52
+ }
53
+
54
+
55
+ // DesktopAuthGatewayService is the desktop's approval page. A refusal is a non-success status whose reason clients
56
+ // branch on (status.reason); the message is for people.
57
+ var DesktopAuthGatewayServiceService = exports.DesktopAuthGatewayServiceService = {
58
+ // AuthorizeDesktopLogin is the click, for any organization the caller belongs to. A caller who is not an active member,
59
+ // or whose organization is suspended, is denied: VALIDATION_ERROR with reason ORG_NOT_ACCESSIBLE, or with no reason
60
+ // when the gateway's own organization check refuses first.
61
+ authorizeDesktopLogin: {
62
+ path: '/gateway.web.v1.DesktopAuthGatewayService/AuthorizeDesktopLogin',
63
+ requestStream: false,
64
+ responseStream: false,
65
+ requestType: proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopLoginRequest,
66
+ responseType: proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopLoginResponse,
67
+ requestSerialize: serialize_gateway_web_v1_AuthorizeDesktopLoginRequest,
68
+ requestDeserialize: deserialize_gateway_web_v1_AuthorizeDesktopLoginRequest,
69
+ responseSerialize: serialize_gateway_web_v1_AuthorizeDesktopLoginResponse,
70
+ responseDeserialize: deserialize_gateway_web_v1_AuthorizeDesktopLoginResponse,
71
+ },
72
+ // AuthorizeDesktopFreshSession is the clickless approval right after a sign-in in the desktop's window, for the
73
+ // caller's PERSONAL organization, which the server resolves, and a Clerk session under five minutes old, taken from
74
+ // the verified token and never from the request. Refusals: VALIDATION_ERROR with reason PERSONAL_ORG_REQUIRED or
75
+ // CONSENT_REQUIRED (show the click), or PERMISSION_DENIED or ORG_NOT_ACCESSIBLE (denied, no click).
76
+ authorizeDesktopFreshSession: {
77
+ path: '/gateway.web.v1.DesktopAuthGatewayService/AuthorizeDesktopFreshSession',
78
+ requestStream: false,
79
+ responseStream: false,
80
+ requestType: proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopFreshSessionRequest,
81
+ responseType: proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopFreshSessionResponse,
82
+ requestSerialize: serialize_gateway_web_v1_AuthorizeDesktopFreshSessionRequest,
83
+ requestDeserialize: deserialize_gateway_web_v1_AuthorizeDesktopFreshSessionRequest,
84
+ responseSerialize: serialize_gateway_web_v1_AuthorizeDesktopFreshSessionResponse,
85
+ responseDeserialize: deserialize_gateway_web_v1_AuthorizeDesktopFreshSessionResponse,
86
+ },
87
+ };
88
+
89
+ exports.DesktopAuthGatewayServiceClient = grpc.makeGenericClientConstructor(DesktopAuthGatewayServiceService, 'DesktopAuthGatewayService');