@lansweeper/data-platform-outbound-grpc 0.1.11 → 0.1.13
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.
- package/CHANGELOG.md +16 -0
- package/gen-proto/image.json +1 -1
- package/gen-proto/outbound_grpc_pb.d.ts +17 -0
- package/gen-proto/outbound_grpc_pb.js +34 -0
- package/gen-proto/outbound_pb.d.ts +111 -63
- package/gen-proto/outbound_pb.js +997 -525
- package/generated-go/outbound.pb.go +820 -682
- package/generated-go/outbound_grpc.pb.go +41 -2
- package/java.json +1 -1
- package/package.json +2 -2
- package/proto/outbound.proto +48 -16
|
@@ -26,8 +26,9 @@ import (
|
|
|
26
26
|
const _ = grpc.SupportPackageIsVersion7
|
|
27
27
|
|
|
28
28
|
const (
|
|
29
|
-
DataCoreOutboundService_GetEntity_FullMethodName
|
|
30
|
-
DataCoreOutboundService_ListEntities_FullMethodName
|
|
29
|
+
DataCoreOutboundService_GetEntity_FullMethodName = "/com.lansweeper.dp.outbound.v1.DataCoreOutboundService/GetEntity"
|
|
30
|
+
DataCoreOutboundService_ListEntities_FullMethodName = "/com.lansweeper.dp.outbound.v1.DataCoreOutboundService/ListEntities"
|
|
31
|
+
DataCoreOutboundService_CatalogLookup_FullMethodName = "/com.lansweeper.dp.outbound.v1.DataCoreOutboundService/CatalogLookup"
|
|
31
32
|
)
|
|
32
33
|
|
|
33
34
|
// DataCoreOutboundServiceClient is the client API for DataCoreOutboundService service.
|
|
@@ -38,6 +39,8 @@ type DataCoreOutboundServiceClient interface {
|
|
|
38
39
|
GetEntity(ctx context.Context, in *GetEntityRequest, opts ...grpc.CallOption) (*GetEntityResponse, error)
|
|
39
40
|
// lists entities for a site or site/type
|
|
40
41
|
ListEntities(ctx context.Context, in *ListEntityRequest, opts ...grpc.CallOption) (DataCoreOutboundService_ListEntitiesClient, error)
|
|
42
|
+
// Retrieve a single entity by site/inst-id/type/id
|
|
43
|
+
CatalogLookup(ctx context.Context, in *CatalogLookupRequest, opts ...grpc.CallOption) (*CatalogLookupResponse, error)
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
type dataCoreOutboundServiceClient struct {
|
|
@@ -89,6 +92,15 @@ func (x *dataCoreOutboundServiceListEntitiesClient) Recv() (*ListEntityResponse,
|
|
|
89
92
|
return m, nil
|
|
90
93
|
}
|
|
91
94
|
|
|
95
|
+
func (c *dataCoreOutboundServiceClient) CatalogLookup(ctx context.Context, in *CatalogLookupRequest, opts ...grpc.CallOption) (*CatalogLookupResponse, error) {
|
|
96
|
+
out := new(CatalogLookupResponse)
|
|
97
|
+
err := c.cc.Invoke(ctx, DataCoreOutboundService_CatalogLookup_FullMethodName, in, out, opts...)
|
|
98
|
+
if err != nil {
|
|
99
|
+
return nil, err
|
|
100
|
+
}
|
|
101
|
+
return out, nil
|
|
102
|
+
}
|
|
103
|
+
|
|
92
104
|
// DataCoreOutboundServiceServer is the server API for DataCoreOutboundService service.
|
|
93
105
|
// All implementations must embed UnimplementedDataCoreOutboundServiceServer
|
|
94
106
|
// for forward compatibility
|
|
@@ -97,6 +109,8 @@ type DataCoreOutboundServiceServer interface {
|
|
|
97
109
|
GetEntity(context.Context, *GetEntityRequest) (*GetEntityResponse, error)
|
|
98
110
|
// lists entities for a site or site/type
|
|
99
111
|
ListEntities(*ListEntityRequest, DataCoreOutboundService_ListEntitiesServer) error
|
|
112
|
+
// Retrieve a single entity by site/inst-id/type/id
|
|
113
|
+
CatalogLookup(context.Context, *CatalogLookupRequest) (*CatalogLookupResponse, error)
|
|
100
114
|
mustEmbedUnimplementedDataCoreOutboundServiceServer()
|
|
101
115
|
}
|
|
102
116
|
|
|
@@ -110,6 +124,9 @@ func (UnimplementedDataCoreOutboundServiceServer) GetEntity(context.Context, *Ge
|
|
|
110
124
|
func (UnimplementedDataCoreOutboundServiceServer) ListEntities(*ListEntityRequest, DataCoreOutboundService_ListEntitiesServer) error {
|
|
111
125
|
return status.Errorf(codes.Unimplemented, "method ListEntities not implemented")
|
|
112
126
|
}
|
|
127
|
+
func (UnimplementedDataCoreOutboundServiceServer) CatalogLookup(context.Context, *CatalogLookupRequest) (*CatalogLookupResponse, error) {
|
|
128
|
+
return nil, status.Errorf(codes.Unimplemented, "method CatalogLookup not implemented")
|
|
129
|
+
}
|
|
113
130
|
func (UnimplementedDataCoreOutboundServiceServer) mustEmbedUnimplementedDataCoreOutboundServiceServer() {
|
|
114
131
|
}
|
|
115
132
|
|
|
@@ -163,6 +180,24 @@ func (x *dataCoreOutboundServiceListEntitiesServer) Send(m *ListEntityResponse)
|
|
|
163
180
|
return x.ServerStream.SendMsg(m)
|
|
164
181
|
}
|
|
165
182
|
|
|
183
|
+
func _DataCoreOutboundService_CatalogLookup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
184
|
+
in := new(CatalogLookupRequest)
|
|
185
|
+
if err := dec(in); err != nil {
|
|
186
|
+
return nil, err
|
|
187
|
+
}
|
|
188
|
+
if interceptor == nil {
|
|
189
|
+
return srv.(DataCoreOutboundServiceServer).CatalogLookup(ctx, in)
|
|
190
|
+
}
|
|
191
|
+
info := &grpc.UnaryServerInfo{
|
|
192
|
+
Server: srv,
|
|
193
|
+
FullMethod: DataCoreOutboundService_CatalogLookup_FullMethodName,
|
|
194
|
+
}
|
|
195
|
+
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
196
|
+
return srv.(DataCoreOutboundServiceServer).CatalogLookup(ctx, req.(*CatalogLookupRequest))
|
|
197
|
+
}
|
|
198
|
+
return interceptor(ctx, in, info, handler)
|
|
199
|
+
}
|
|
200
|
+
|
|
166
201
|
// DataCoreOutboundService_ServiceDesc is the grpc.ServiceDesc for DataCoreOutboundService service.
|
|
167
202
|
// It's only intended for direct use with grpc.RegisterService,
|
|
168
203
|
// and not to be introspected or modified (even as a copy)
|
|
@@ -174,6 +209,10 @@ var DataCoreOutboundService_ServiceDesc = grpc.ServiceDesc{
|
|
|
174
209
|
MethodName: "GetEntity",
|
|
175
210
|
Handler: _DataCoreOutboundService_GetEntity_Handler,
|
|
176
211
|
},
|
|
212
|
+
{
|
|
213
|
+
MethodName: "CatalogLookup",
|
|
214
|
+
Handler: _DataCoreOutboundService_CatalogLookup_Handler,
|
|
215
|
+
},
|
|
177
216
|
},
|
|
178
217
|
Streams: []grpc.StreamDesc{
|
|
179
218
|
{
|
package/java.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lansweeper/data-platform-outbound-grpc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "Data Platform Outbound gRPC",
|
|
5
5
|
"main": "gen-proto/index.js",
|
|
6
6
|
"types": "gen-proto/index.d.ts",
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"@grpc/grpc-js": "^1.5.1",
|
|
10
10
|
"google-protobuf": "^3.17.0"
|
|
11
11
|
},
|
|
12
|
-
"gitHead": "
|
|
12
|
+
"gitHead": "04c17bf03534723b067248f0b76860ce75084e08"
|
|
13
13
|
}
|
package/proto/outbound.proto
CHANGED
|
@@ -28,6 +28,8 @@ service DataCoreOutboundService {
|
|
|
28
28
|
// lists entities for a site or site/type
|
|
29
29
|
rpc ListEntities(ListEntityRequest) returns (stream ListEntityResponse) {}
|
|
30
30
|
|
|
31
|
+
// Retrieve a single entity by site/inst-id/type/id
|
|
32
|
+
rpc CatalogLookup (CatalogLookupRequest) returns (CatalogLookupResponse) {}
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
/**
|
|
@@ -55,6 +57,24 @@ message ListEntityResponse {
|
|
|
55
57
|
repeated Entity related = 2;
|
|
56
58
|
}
|
|
57
59
|
|
|
60
|
+
message CatalogLookupRequest {
|
|
61
|
+
repeated int64 brand_id = 1;
|
|
62
|
+
repeated int64 model_id = 2;
|
|
63
|
+
repeated int64 os_id = 3;
|
|
64
|
+
repeated int64 sw_id = 4;
|
|
65
|
+
repeated int64 monitor_id = 5;
|
|
66
|
+
|
|
67
|
+
optional bool only_requested = 10; // false by default: to avoid to get full path
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
message CatalogLookupResponse {
|
|
71
|
+
repeated CatalogBrand brand = 1;
|
|
72
|
+
repeated CatalogModel model = 2;
|
|
73
|
+
repeated CatalogOs os = 3;
|
|
74
|
+
repeated CatalogSoftware sw = 4;
|
|
75
|
+
repeated CatalogMonitor monitor = 5;
|
|
76
|
+
}
|
|
77
|
+
|
|
58
78
|
// ----- Data Part ------
|
|
59
79
|
|
|
60
80
|
message EntityPath {
|
|
@@ -106,6 +126,8 @@ message Asset {
|
|
|
106
126
|
message AssetType {
|
|
107
127
|
// Lansweeper Asset Type. Full list available here: /lansweeperapis/packages/model/masterData/content/masterData.json
|
|
108
128
|
string ls_name = 1;
|
|
129
|
+
// Lansweeper type ID
|
|
130
|
+
int32 ls_id = 3;
|
|
109
131
|
// Fing Type
|
|
110
132
|
optional string fing_type = 2;
|
|
111
133
|
}
|
|
@@ -126,9 +148,16 @@ message CoreFields {
|
|
|
126
148
|
|
|
127
149
|
message HardwareInfo {
|
|
128
150
|
optional int64 type_id = 1;
|
|
151
|
+
|
|
152
|
+
// catalog id of: CatalogBrand
|
|
129
153
|
optional int64 make_id = 2;
|
|
154
|
+
|
|
155
|
+
// catalog id of: CatalogModel
|
|
130
156
|
optional int64 model_id = 3;
|
|
157
|
+
|
|
158
|
+
// catalog id of: CatalogModel
|
|
131
159
|
optional int64 family_id = 4;
|
|
160
|
+
|
|
132
161
|
optional bool is_family = 6;
|
|
133
162
|
optional string serial = 7;
|
|
134
163
|
optional string type_name = 10;
|
|
@@ -139,10 +168,6 @@ message HardwareInfo {
|
|
|
139
168
|
optional string cpe = 21;
|
|
140
169
|
optional int32 rank = 20;
|
|
141
170
|
|
|
142
|
-
optional CatalogBrand catalog_brand = 22;
|
|
143
|
-
optional CatalogModel catalog_model = 23;
|
|
144
|
-
optional CatalogModel catalog_family = 25;
|
|
145
|
-
|
|
146
171
|
optional RawHardwareInfo raw = 24;
|
|
147
172
|
}
|
|
148
173
|
|
|
@@ -154,8 +179,12 @@ message RawHardwareInfo {
|
|
|
154
179
|
}
|
|
155
180
|
|
|
156
181
|
message OperatingSystemInfo {
|
|
182
|
+
// catalog id of: CatalogOs
|
|
157
183
|
optional int64 id = 1;
|
|
184
|
+
|
|
185
|
+
// catalog id of: CatalogBrand
|
|
158
186
|
optional int64 make_id = 11;
|
|
187
|
+
|
|
159
188
|
optional string name = 2;
|
|
160
189
|
optional string version = 3;
|
|
161
190
|
optional string build = 4;
|
|
@@ -167,9 +196,6 @@ message OperatingSystemInfo {
|
|
|
167
196
|
|
|
168
197
|
optional int32 rank = 8;
|
|
169
198
|
|
|
170
|
-
optional CatalogBrand catalog_brand = 9;
|
|
171
|
-
optional CatalogOs catalog_os = 10;
|
|
172
|
-
|
|
173
199
|
oneof raw {
|
|
174
200
|
WindowsRawOperatingSystemInfo windows = 32;
|
|
175
201
|
}
|
|
@@ -199,13 +225,17 @@ message MonitorInventory {
|
|
|
199
225
|
|
|
200
226
|
/* Monitor definition: normalized and with link to raw */
|
|
201
227
|
message Monitor {
|
|
228
|
+
// catalog id of: CatalogMonitor
|
|
229
|
+
optional int64 id = 1;
|
|
202
230
|
|
|
203
|
-
|
|
204
|
-
optional
|
|
205
|
-
google.protobuf.Timestamp manufacturer_date = 3;
|
|
231
|
+
// catalog id of: CatalogBrand
|
|
232
|
+
optional int64 make_id = 2;
|
|
206
233
|
|
|
207
|
-
|
|
208
|
-
|
|
234
|
+
string make_name = 3;
|
|
235
|
+
string model_name = 4;
|
|
236
|
+
|
|
237
|
+
optional string serial_number = 5;
|
|
238
|
+
google.protobuf.Timestamp manufacturer_date = 6;
|
|
209
239
|
|
|
210
240
|
oneof raw {
|
|
211
241
|
WindowsRawMonitorInfo windows = 20;
|
|
@@ -235,8 +265,14 @@ message Software {
|
|
|
235
265
|
optional int32 rank = 1;
|
|
236
266
|
optional int64 type_id = 2;
|
|
237
267
|
optional int64 cat_id = 3;
|
|
268
|
+
|
|
269
|
+
// catalog id of: CatalogBrand
|
|
238
270
|
optional int64 make_id = 4;
|
|
271
|
+
|
|
272
|
+
// catalog id of: CatalogSoftware
|
|
239
273
|
optional int64 sw_id = 5;
|
|
274
|
+
|
|
275
|
+
// catalog id of: CatalogSoftware
|
|
240
276
|
optional int64 parent_id = 6;
|
|
241
277
|
|
|
242
278
|
optional string type_name = 7;
|
|
@@ -252,10 +288,6 @@ message Software {
|
|
|
252
288
|
|
|
253
289
|
optional string cpe = 15;
|
|
254
290
|
|
|
255
|
-
optional CatalogBrand catalog_brand = 22;
|
|
256
|
-
optional CatalogSoftware catalog_software = 16;
|
|
257
|
-
optional CatalogSoftware catalog_latest = 23;
|
|
258
|
-
|
|
259
291
|
RawSoftware raw = 17;
|
|
260
292
|
optional string raw_hash = 18; // optional raw hash of SW
|
|
261
293
|
optional string nre_hash = 19; // optional NRE hash of SW
|