@miradorlabs/web-grpc 1.0.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.
Files changed (33) hide show
  1. package/README.md +5 -0
  2. package/google/protobuf/timestamp.ts +229 -0
  3. package/package.json +11 -0
  4. package/proto/gateway/common/v1/status.ts +179 -0
  5. package/proto/gateway/common/v1/status_grpc_pb.js +1 -0
  6. package/proto/gateway/common/v1/status_pb.js +237 -0
  7. package/proto/gateway/common/v1/types.ts +176 -0
  8. package/proto/gateway/common/v1/types_grpc_pb.js +1 -0
  9. package/proto/gateway/common/v1/types_pb.js +216 -0
  10. package/proto/gateway/web/v1/account_gateway.ts +7037 -0
  11. package/proto/gateway/web/v1/account_gateway_grpc_pb.js +813 -0
  12. package/proto/gateway/web/v1/account_gateway_pb.js +14338 -0
  13. package/proto/gateway/web/v1/automation_gateway.ts +5605 -0
  14. package/proto/gateway/web/v1/automation_gateway_grpc_pb.js +485 -0
  15. package/proto/gateway/web/v1/automation_gateway_pb.js +11618 -0
  16. package/proto/gateway/web/v1/chain_gateway.ts +3805 -0
  17. package/proto/gateway/web/v1/chain_gateway_grpc_pb.js +115 -0
  18. package/proto/gateway/web/v1/chain_gateway_pb.js +7049 -0
  19. package/proto/gateway/web/v1/market_gateway.ts +492 -0
  20. package/proto/gateway/web/v1/market_gateway_grpc_pb.js +45 -0
  21. package/proto/gateway/web/v1/market_gateway_pb.js +1063 -0
  22. package/proto/gateway/web/v1/oauth_gateway.ts +1163 -0
  23. package/proto/gateway/web/v1/oauth_gateway_grpc_pb.js +150 -0
  24. package/proto/gateway/web/v1/oauth_gateway_pb.js +2316 -0
  25. package/proto/gateway/web/v1/plan_gateway.ts +2463 -0
  26. package/proto/gateway/web/v1/plan_gateway_grpc_pb.js +152 -0
  27. package/proto/gateway/web/v1/plan_gateway_pb.js +4840 -0
  28. package/proto/gateway/web/v1/stream_gateway.ts +2354 -0
  29. package/proto/gateway/web/v1/stream_gateway_grpc_pb.js +145 -0
  30. package/proto/gateway/web/v1/stream_gateway_pb.js +4593 -0
  31. package/proto/gateway/web/v1/trace_gateway.ts +16320 -0
  32. package/proto/gateway/web/v1/trace_gateway_grpc_pb.js +280 -0
  33. package/proto/gateway/web/v1/trace_gateway_pb.js +28667 -0
@@ -0,0 +1,150 @@
1
+ // GENERATED CODE -- DO NOT EDIT!
2
+
3
+ 'use strict';
4
+ var grpc = require('@grpc/grpc-js');
5
+ var proto_gateway_web_v1_oauth_gateway_pb = require('../../../../proto/gateway/web/v1/oauth_gateway_pb.js');
6
+ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
7
+ var proto_gateway_common_v1_status_pb = require('../../../../proto/gateway/common/v1/status_pb.js');
8
+
9
+ function serialize_gateway_web_v1_CompleteSlackOAuthRequest(arg) {
10
+ if (!(arg instanceof proto_gateway_web_v1_oauth_gateway_pb.CompleteSlackOAuthRequest)) {
11
+ throw new Error('Expected argument of type gateway.web.v1.CompleteSlackOAuthRequest');
12
+ }
13
+ return Buffer.from(arg.serializeBinary());
14
+ }
15
+
16
+ function deserialize_gateway_web_v1_CompleteSlackOAuthRequest(buffer_arg) {
17
+ return proto_gateway_web_v1_oauth_gateway_pb.CompleteSlackOAuthRequest.deserializeBinary(new Uint8Array(buffer_arg));
18
+ }
19
+
20
+ function serialize_gateway_web_v1_CompleteSlackOAuthResponse(arg) {
21
+ if (!(arg instanceof proto_gateway_web_v1_oauth_gateway_pb.CompleteSlackOAuthResponse)) {
22
+ throw new Error('Expected argument of type gateway.web.v1.CompleteSlackOAuthResponse');
23
+ }
24
+ return Buffer.from(arg.serializeBinary());
25
+ }
26
+
27
+ function deserialize_gateway_web_v1_CompleteSlackOAuthResponse(buffer_arg) {
28
+ return proto_gateway_web_v1_oauth_gateway_pb.CompleteSlackOAuthResponse.deserializeBinary(new Uint8Array(buffer_arg));
29
+ }
30
+
31
+ function serialize_gateway_web_v1_GetOAuthConnectionRequest(arg) {
32
+ if (!(arg instanceof proto_gateway_web_v1_oauth_gateway_pb.GetOAuthConnectionRequest)) {
33
+ throw new Error('Expected argument of type gateway.web.v1.GetOAuthConnectionRequest');
34
+ }
35
+ return Buffer.from(arg.serializeBinary());
36
+ }
37
+
38
+ function deserialize_gateway_web_v1_GetOAuthConnectionRequest(buffer_arg) {
39
+ return proto_gateway_web_v1_oauth_gateway_pb.GetOAuthConnectionRequest.deserializeBinary(new Uint8Array(buffer_arg));
40
+ }
41
+
42
+ function serialize_gateway_web_v1_GetOAuthConnectionResponse(arg) {
43
+ if (!(arg instanceof proto_gateway_web_v1_oauth_gateway_pb.GetOAuthConnectionResponse)) {
44
+ throw new Error('Expected argument of type gateway.web.v1.GetOAuthConnectionResponse');
45
+ }
46
+ return Buffer.from(arg.serializeBinary());
47
+ }
48
+
49
+ function deserialize_gateway_web_v1_GetOAuthConnectionResponse(buffer_arg) {
50
+ return proto_gateway_web_v1_oauth_gateway_pb.GetOAuthConnectionResponse.deserializeBinary(new Uint8Array(buffer_arg));
51
+ }
52
+
53
+ function serialize_gateway_web_v1_InitiateSlackOAuthRequest(arg) {
54
+ if (!(arg instanceof proto_gateway_web_v1_oauth_gateway_pb.InitiateSlackOAuthRequest)) {
55
+ throw new Error('Expected argument of type gateway.web.v1.InitiateSlackOAuthRequest');
56
+ }
57
+ return Buffer.from(arg.serializeBinary());
58
+ }
59
+
60
+ function deserialize_gateway_web_v1_InitiateSlackOAuthRequest(buffer_arg) {
61
+ return proto_gateway_web_v1_oauth_gateway_pb.InitiateSlackOAuthRequest.deserializeBinary(new Uint8Array(buffer_arg));
62
+ }
63
+
64
+ function serialize_gateway_web_v1_InitiateSlackOAuthResponse(arg) {
65
+ if (!(arg instanceof proto_gateway_web_v1_oauth_gateway_pb.InitiateSlackOAuthResponse)) {
66
+ throw new Error('Expected argument of type gateway.web.v1.InitiateSlackOAuthResponse');
67
+ }
68
+ return Buffer.from(arg.serializeBinary());
69
+ }
70
+
71
+ function deserialize_gateway_web_v1_InitiateSlackOAuthResponse(buffer_arg) {
72
+ return proto_gateway_web_v1_oauth_gateway_pb.InitiateSlackOAuthResponse.deserializeBinary(new Uint8Array(buffer_arg));
73
+ }
74
+
75
+ function serialize_gateway_web_v1_ListSlackChannelsRequest(arg) {
76
+ if (!(arg instanceof proto_gateway_web_v1_oauth_gateway_pb.ListSlackChannelsRequest)) {
77
+ throw new Error('Expected argument of type gateway.web.v1.ListSlackChannelsRequest');
78
+ }
79
+ return Buffer.from(arg.serializeBinary());
80
+ }
81
+
82
+ function deserialize_gateway_web_v1_ListSlackChannelsRequest(buffer_arg) {
83
+ return proto_gateway_web_v1_oauth_gateway_pb.ListSlackChannelsRequest.deserializeBinary(new Uint8Array(buffer_arg));
84
+ }
85
+
86
+ function serialize_gateway_web_v1_ListSlackChannelsResponse(arg) {
87
+ if (!(arg instanceof proto_gateway_web_v1_oauth_gateway_pb.ListSlackChannelsResponse)) {
88
+ throw new Error('Expected argument of type gateway.web.v1.ListSlackChannelsResponse');
89
+ }
90
+ return Buffer.from(arg.serializeBinary());
91
+ }
92
+
93
+ function deserialize_gateway_web_v1_ListSlackChannelsResponse(buffer_arg) {
94
+ return proto_gateway_web_v1_oauth_gateway_pb.ListSlackChannelsResponse.deserializeBinary(new Uint8Array(buffer_arg));
95
+ }
96
+
97
+
98
+ // OAuthGatewayService provides web client access to OAuth connection management
99
+ var OAuthGatewayServiceService = exports.OAuthGatewayServiceService = {
100
+ // InitiateSlackOAuth returns the Slack OAuth URL for the user to authorize
101
+ initiateSlackOAuth: {
102
+ path: '/gateway.web.v1.OAuthGatewayService/InitiateSlackOAuth',
103
+ requestStream: false,
104
+ responseStream: false,
105
+ requestType: proto_gateway_web_v1_oauth_gateway_pb.InitiateSlackOAuthRequest,
106
+ responseType: proto_gateway_web_v1_oauth_gateway_pb.InitiateSlackOAuthResponse,
107
+ requestSerialize: serialize_gateway_web_v1_InitiateSlackOAuthRequest,
108
+ requestDeserialize: deserialize_gateway_web_v1_InitiateSlackOAuthRequest,
109
+ responseSerialize: serialize_gateway_web_v1_InitiateSlackOAuthResponse,
110
+ responseDeserialize: deserialize_gateway_web_v1_InitiateSlackOAuthResponse,
111
+ },
112
+ // CompleteSlackOAuth exchanges the authorization code for a bot token
113
+ completeSlackOAuth: {
114
+ path: '/gateway.web.v1.OAuthGatewayService/CompleteSlackOAuth',
115
+ requestStream: false,
116
+ responseStream: false,
117
+ requestType: proto_gateway_web_v1_oauth_gateway_pb.CompleteSlackOAuthRequest,
118
+ responseType: proto_gateway_web_v1_oauth_gateway_pb.CompleteSlackOAuthResponse,
119
+ requestSerialize: serialize_gateway_web_v1_CompleteSlackOAuthRequest,
120
+ requestDeserialize: deserialize_gateway_web_v1_CompleteSlackOAuthRequest,
121
+ responseSerialize: serialize_gateway_web_v1_CompleteSlackOAuthResponse,
122
+ responseDeserialize: deserialize_gateway_web_v1_CompleteSlackOAuthResponse,
123
+ },
124
+ // GetOAuthConnection returns an existing OAuth connection for an organization and provider
125
+ getOAuthConnection: {
126
+ path: '/gateway.web.v1.OAuthGatewayService/GetOAuthConnection',
127
+ requestStream: false,
128
+ responseStream: false,
129
+ requestType: proto_gateway_web_v1_oauth_gateway_pb.GetOAuthConnectionRequest,
130
+ responseType: proto_gateway_web_v1_oauth_gateway_pb.GetOAuthConnectionResponse,
131
+ requestSerialize: serialize_gateway_web_v1_GetOAuthConnectionRequest,
132
+ requestDeserialize: deserialize_gateway_web_v1_GetOAuthConnectionRequest,
133
+ responseSerialize: serialize_gateway_web_v1_GetOAuthConnectionResponse,
134
+ responseDeserialize: deserialize_gateway_web_v1_GetOAuthConnectionResponse,
135
+ },
136
+ // ListSlackChannels lists available Slack channels using the stored bot token
137
+ listSlackChannels: {
138
+ path: '/gateway.web.v1.OAuthGatewayService/ListSlackChannels',
139
+ requestStream: false,
140
+ responseStream: false,
141
+ requestType: proto_gateway_web_v1_oauth_gateway_pb.ListSlackChannelsRequest,
142
+ responseType: proto_gateway_web_v1_oauth_gateway_pb.ListSlackChannelsResponse,
143
+ requestSerialize: serialize_gateway_web_v1_ListSlackChannelsRequest,
144
+ requestDeserialize: deserialize_gateway_web_v1_ListSlackChannelsRequest,
145
+ responseSerialize: serialize_gateway_web_v1_ListSlackChannelsResponse,
146
+ responseDeserialize: deserialize_gateway_web_v1_ListSlackChannelsResponse,
147
+ },
148
+ };
149
+
150
+ exports.OAuthGatewayServiceClient = grpc.makeGenericClientConstructor(OAuthGatewayServiceService, 'OAuthGatewayService');