elimity-insights-sdk 1.1.0__py3-none-any.whl
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.
Potentially problematic release.
This version of elimity-insights-sdk might be problematic. Click here for more details.
- elimity/__init__.py +0 -0
- elimity/__init__.pyi +1 -0
- elimity/insights/__init__.py +0 -0
- elimity/insights/__init__.pyi +3 -0
- elimity/insights/common/__init__.py +0 -0
- elimity/insights/common/__init__.pyi +1 -0
- elimity/insights/common/v1alpha1/__init__.py +0 -0
- elimity/insights/common/v1alpha1/__init__.pyi +1 -0
- elimity/insights/common/v1alpha1/common.pb.go +494 -0
- elimity/insights/common/v1alpha1/common_pb.ts +202 -0
- elimity/insights/common/v1alpha1/common_pb2.py +50 -0
- elimity/insights/common/v1alpha1/common_pb2.pyi +63 -0
- elimity/insights/customgateway/__init__.py +0 -0
- elimity/insights/customgateway/__init__.pyi +1 -0
- elimity/insights/customgateway/v1alpha1/__init__.py +0 -0
- elimity/insights/customgateway/v1alpha1/__init__.pyi +2 -0
- elimity/insights/customgateway/v1alpha1/customgateway.pb.go +504 -0
- elimity/insights/customgateway/v1alpha1/customgateway_connect.py +119 -0
- elimity/insights/customgateway/v1alpha1/customgateway_connect.ts +26 -0
- elimity/insights/customgateway/v1alpha1/customgateway_pb.ts +196 -0
- elimity/insights/customgateway/v1alpha1/customgateway_pb2.py +52 -0
- elimity/insights/customgateway/v1alpha1/customgateway_pb2.pyi +48 -0
- elimity/insights/customgateway/v1alpha1/v1alpha1connect/__init__.py +0 -0
- elimity/insights/customgateway/v1alpha1/v1alpha1connect/__init__.pyi +0 -0
- elimity/insights/customgateway/v1alpha1/v1alpha1connect/customgateway.connect.go +113 -0
- elimity/insights/export/__init__.py +0 -0
- elimity/insights/export/__init__.pyi +1 -0
- elimity/insights/export/v1alpha1/__init__.py +0 -0
- elimity/insights/export/v1alpha1/__init__.pyi +2 -0
- elimity/insights/export/v1alpha1/export.pb.go +635 -0
- elimity/insights/export/v1alpha1/export_connect.py +119 -0
- elimity/insights/export/v1alpha1/export_connect.ts +26 -0
- elimity/insights/export/v1alpha1/export_pb.ts +287 -0
- elimity/insights/export/v1alpha1/export_pb2.py +50 -0
- elimity/insights/export/v1alpha1/export_pb2.pyi +57 -0
- elimity/insights/export/v1alpha1/v1alpha1connect/__init__.py +0 -0
- elimity/insights/export/v1alpha1/v1alpha1connect/__init__.pyi +0 -0
- elimity/insights/export/v1alpha1/v1alpha1connect/export.connect.go +112 -0
- elimity/py.typed +0 -0
- elimity_insights_sdk/__init__.py +31 -0
- elimity_insights_sdk/_sdk.py +190 -0
- elimity_insights_sdk/py.typed +0 -0
- elimity_insights_sdk-1.1.0.dist-info/METADATA +13 -0
- elimity_insights_sdk-1.1.0.dist-info/RECORD +46 -0
- elimity_insights_sdk-1.1.0.dist-info/WHEEL +4 -0
- elimity_insights_sdk-1.1.0.dist-info/licenses/LICENSE.txt +201 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT!
|
|
3
|
+
# source: elimity/insights/export/v1alpha1/export.proto
|
|
4
|
+
|
|
5
|
+
from collections.abc import AsyncIterator, Iterable, Iterator, Mapping
|
|
6
|
+
from typing import Protocol
|
|
7
|
+
|
|
8
|
+
from connectrpc.client import ConnectClient, ConnectClientSync
|
|
9
|
+
from connectrpc.code import Code
|
|
10
|
+
from connectrpc.errors import ConnectError
|
|
11
|
+
from connectrpc.interceptor import Interceptor, InterceptorSync
|
|
12
|
+
from connectrpc.method import IdempotencyLevel, MethodInfo
|
|
13
|
+
from connectrpc.request import Headers, RequestContext
|
|
14
|
+
from connectrpc.server import ConnectASGIApplication, ConnectWSGIApplication, Endpoint, EndpointSync
|
|
15
|
+
import elimity.insights.export.v1alpha1.export_pb2 as elimity_dot_insights_dot_export_dot_v1alpha1_dot_export__pb2
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Service(Protocol):
|
|
19
|
+
def export(self, request: elimity_dot_insights_dot_export_dot_v1alpha1_dot_export__pb2.ExportRequest, ctx: RequestContext) -> AsyncIterator[elimity_dot_insights_dot_export_dot_v1alpha1_dot_export__pb2.ExportResponse]:
|
|
20
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class ServiceASGIApplication(ConnectASGIApplication):
|
|
24
|
+
def __init__(self, service: Service, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
|
|
25
|
+
super().__init__(
|
|
26
|
+
endpoints={
|
|
27
|
+
"/elimity.insights.export.v1alpha1.Service/Export": Endpoint.server_stream(
|
|
28
|
+
method=MethodInfo(
|
|
29
|
+
name="Export",
|
|
30
|
+
service_name="elimity.insights.export.v1alpha1.Service",
|
|
31
|
+
input=elimity_dot_insights_dot_export_dot_v1alpha1_dot_export__pb2.ExportRequest,
|
|
32
|
+
output=elimity_dot_insights_dot_export_dot_v1alpha1_dot_export__pb2.ExportResponse,
|
|
33
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
34
|
+
),
|
|
35
|
+
function=service.export,
|
|
36
|
+
),
|
|
37
|
+
},
|
|
38
|
+
interceptors=interceptors,
|
|
39
|
+
read_max_bytes=read_max_bytes,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
@property
|
|
43
|
+
def path(self) -> str:
|
|
44
|
+
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
45
|
+
return "/elimity.insights.export.v1alpha1.Service"
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class ServiceClient(ConnectClient):
|
|
49
|
+
def export(
|
|
50
|
+
self,
|
|
51
|
+
request: elimity_dot_insights_dot_export_dot_v1alpha1_dot_export__pb2.ExportRequest,
|
|
52
|
+
*,
|
|
53
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
54
|
+
timeout_ms: int | None = None,
|
|
55
|
+
) -> AsyncIterator[elimity_dot_insights_dot_export_dot_v1alpha1_dot_export__pb2.ExportResponse]:
|
|
56
|
+
return self.execute_server_stream(
|
|
57
|
+
request=request,
|
|
58
|
+
method=MethodInfo(
|
|
59
|
+
name="Export",
|
|
60
|
+
service_name="elimity.insights.export.v1alpha1.Service",
|
|
61
|
+
input=elimity_dot_insights_dot_export_dot_v1alpha1_dot_export__pb2.ExportRequest,
|
|
62
|
+
output=elimity_dot_insights_dot_export_dot_v1alpha1_dot_export__pb2.ExportResponse,
|
|
63
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
64
|
+
),
|
|
65
|
+
headers=headers,
|
|
66
|
+
timeout_ms=timeout_ms,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class ServiceSync(Protocol):
|
|
71
|
+
def export(self, request: elimity_dot_insights_dot_export_dot_v1alpha1_dot_export__pb2.ExportRequest, ctx: RequestContext) -> Iterator[elimity_dot_insights_dot_export_dot_v1alpha1_dot_export__pb2.ExportResponse]:
|
|
72
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class ServiceWSGIApplication(ConnectWSGIApplication):
|
|
76
|
+
def __init__(self, service: ServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None:
|
|
77
|
+
super().__init__(
|
|
78
|
+
endpoints={
|
|
79
|
+
"/elimity.insights.export.v1alpha1.Service/Export": EndpointSync.server_stream(
|
|
80
|
+
method=MethodInfo(
|
|
81
|
+
name="Export",
|
|
82
|
+
service_name="elimity.insights.export.v1alpha1.Service",
|
|
83
|
+
input=elimity_dot_insights_dot_export_dot_v1alpha1_dot_export__pb2.ExportRequest,
|
|
84
|
+
output=elimity_dot_insights_dot_export_dot_v1alpha1_dot_export__pb2.ExportResponse,
|
|
85
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
86
|
+
),
|
|
87
|
+
function=service.export,
|
|
88
|
+
),
|
|
89
|
+
},
|
|
90
|
+
interceptors=interceptors,
|
|
91
|
+
read_max_bytes=read_max_bytes,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def path(self) -> str:
|
|
96
|
+
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
97
|
+
return "/elimity.insights.export.v1alpha1.Service"
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class ServiceClientSync(ConnectClientSync):
|
|
101
|
+
def export(
|
|
102
|
+
self,
|
|
103
|
+
request: elimity_dot_insights_dot_export_dot_v1alpha1_dot_export__pb2.ExportRequest,
|
|
104
|
+
*,
|
|
105
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
106
|
+
timeout_ms: int | None = None,
|
|
107
|
+
) -> Iterator[elimity_dot_insights_dot_export_dot_v1alpha1_dot_export__pb2.ExportResponse]:
|
|
108
|
+
return self.execute_server_stream(
|
|
109
|
+
request=request,
|
|
110
|
+
method=MethodInfo(
|
|
111
|
+
name="Export",
|
|
112
|
+
service_name="elimity.insights.export.v1alpha1.Service",
|
|
113
|
+
input=elimity_dot_insights_dot_export_dot_v1alpha1_dot_export__pb2.ExportRequest,
|
|
114
|
+
output=elimity_dot_insights_dot_export_dot_v1alpha1_dot_export__pb2.ExportResponse,
|
|
115
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
116
|
+
),
|
|
117
|
+
headers=headers,
|
|
118
|
+
timeout_ms=timeout_ms,
|
|
119
|
+
)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// @generated by protoc-gen-connect-es v1.6.1 with parameter "target=ts"
|
|
2
|
+
// @generated from file elimity/insights/export/v1alpha1/export.proto (package elimity.insights.export.v1alpha1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
|
|
6
|
+
import { ExportRequest, ExportResponse } from "./export_pb.js";
|
|
7
|
+
import { MethodKind } from "@bufbuild/protobuf";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @generated from service elimity.insights.export.v1alpha1.Service
|
|
11
|
+
*/
|
|
12
|
+
export const Service = {
|
|
13
|
+
typeName: "elimity.insights.export.v1alpha1.Service",
|
|
14
|
+
methods: {
|
|
15
|
+
/**
|
|
16
|
+
* @generated from rpc elimity.insights.export.v1alpha1.Service.Export
|
|
17
|
+
*/
|
|
18
|
+
export: {
|
|
19
|
+
name: "Export",
|
|
20
|
+
I: ExportRequest,
|
|
21
|
+
O: ExportResponse,
|
|
22
|
+
kind: MethodKind.ServerStreaming,
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
} as const;
|
|
26
|
+
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
|
|
2
|
+
// @generated from file elimity/insights/export/v1alpha1/export.proto (package elimity.insights.export.v1alpha1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
|
|
6
|
+
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
7
|
+
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
|
|
8
|
+
import { Entity, Relationship } from "../../common/v1alpha1/common_pb.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @generated from message elimity.insights.export.v1alpha1.ExportRequest
|
|
12
|
+
*/
|
|
13
|
+
export class ExportRequest extends Message<ExportRequest> {
|
|
14
|
+
/**
|
|
15
|
+
* @generated from field: int64 api_token_id = 1;
|
|
16
|
+
*/
|
|
17
|
+
apiTokenId = protoInt64.zero;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @generated from field: bytes api_token_secret = 2;
|
|
21
|
+
*/
|
|
22
|
+
apiTokenSecret = new Uint8Array(0);
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @generated from field: repeated elimity.insights.export.v1alpha1.Target targets = 3;
|
|
26
|
+
*/
|
|
27
|
+
targets: Target[] = [];
|
|
28
|
+
|
|
29
|
+
constructor(data?: PartialMessage<ExportRequest>) {
|
|
30
|
+
super();
|
|
31
|
+
proto3.util.initPartial(data, this);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
35
|
+
static readonly typeName = "elimity.insights.export.v1alpha1.ExportRequest";
|
|
36
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
37
|
+
{ no: 1, name: "api_token_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
|
|
38
|
+
{ no: 2, name: "api_token_secret", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
|
|
39
|
+
{ no: 3, name: "targets", kind: "message", T: Target, repeated: true },
|
|
40
|
+
]);
|
|
41
|
+
|
|
42
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ExportRequest {
|
|
43
|
+
return new ExportRequest().fromBinary(bytes, options);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ExportRequest {
|
|
47
|
+
return new ExportRequest().fromJson(jsonValue, options);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ExportRequest {
|
|
51
|
+
return new ExportRequest().fromJsonString(jsonString, options);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
static equals(a: ExportRequest | PlainMessage<ExportRequest> | undefined, b: ExportRequest | PlainMessage<ExportRequest> | undefined): boolean {
|
|
55
|
+
return proto3.util.equals(ExportRequest, a, b);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @generated from message elimity.insights.export.v1alpha1.ExportResponse
|
|
61
|
+
*/
|
|
62
|
+
export class ExportResponse extends Message<ExportResponse> {
|
|
63
|
+
/**
|
|
64
|
+
* @generated from field: elimity.insights.export.v1alpha1.Item item = 1;
|
|
65
|
+
*/
|
|
66
|
+
item?: Item;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @generated from field: int64 target_index = 2;
|
|
70
|
+
*/
|
|
71
|
+
targetIndex = protoInt64.zero;
|
|
72
|
+
|
|
73
|
+
constructor(data?: PartialMessage<ExportResponse>) {
|
|
74
|
+
super();
|
|
75
|
+
proto3.util.initPartial(data, this);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
79
|
+
static readonly typeName = "elimity.insights.export.v1alpha1.ExportResponse";
|
|
80
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
81
|
+
{ no: 1, name: "item", kind: "message", T: Item },
|
|
82
|
+
{ no: 2, name: "target_index", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
|
|
83
|
+
]);
|
|
84
|
+
|
|
85
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ExportResponse {
|
|
86
|
+
return new ExportResponse().fromBinary(bytes, options);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ExportResponse {
|
|
90
|
+
return new ExportResponse().fromJson(jsonValue, options);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ExportResponse {
|
|
94
|
+
return new ExportResponse().fromJsonString(jsonString, options);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
static equals(a: ExportResponse | PlainMessage<ExportResponse> | undefined, b: ExportResponse | PlainMessage<ExportResponse> | undefined): boolean {
|
|
98
|
+
return proto3.util.equals(ExportResponse, a, b);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @generated from message elimity.insights.export.v1alpha1.Filter
|
|
104
|
+
*/
|
|
105
|
+
export class Filter extends Message<Filter> {
|
|
106
|
+
/**
|
|
107
|
+
* @generated from oneof elimity.insights.export.v1alpha1.Filter.value
|
|
108
|
+
*/
|
|
109
|
+
value: {
|
|
110
|
+
/**
|
|
111
|
+
* @generated from field: string entity_type = 1;
|
|
112
|
+
*/
|
|
113
|
+
value: string;
|
|
114
|
+
case: "entityType";
|
|
115
|
+
} | {
|
|
116
|
+
/**
|
|
117
|
+
* @generated from field: elimity.insights.export.v1alpha1.RelationshipType relationship_type = 2;
|
|
118
|
+
*/
|
|
119
|
+
value: RelationshipType;
|
|
120
|
+
case: "relationshipType";
|
|
121
|
+
} | { case: undefined; value?: undefined } = { case: undefined };
|
|
122
|
+
|
|
123
|
+
constructor(data?: PartialMessage<Filter>) {
|
|
124
|
+
super();
|
|
125
|
+
proto3.util.initPartial(data, this);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
129
|
+
static readonly typeName = "elimity.insights.export.v1alpha1.Filter";
|
|
130
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
131
|
+
{ no: 1, name: "entity_type", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "value" },
|
|
132
|
+
{ no: 2, name: "relationship_type", kind: "message", T: RelationshipType, oneof: "value" },
|
|
133
|
+
]);
|
|
134
|
+
|
|
135
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Filter {
|
|
136
|
+
return new Filter().fromBinary(bytes, options);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Filter {
|
|
140
|
+
return new Filter().fromJson(jsonValue, options);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Filter {
|
|
144
|
+
return new Filter().fromJsonString(jsonString, options);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
static equals(a: Filter | PlainMessage<Filter> | undefined, b: Filter | PlainMessage<Filter> | undefined): boolean {
|
|
148
|
+
return proto3.util.equals(Filter, a, b);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @generated from message elimity.insights.export.v1alpha1.Item
|
|
154
|
+
*/
|
|
155
|
+
export class Item extends Message<Item> {
|
|
156
|
+
/**
|
|
157
|
+
* @generated from oneof elimity.insights.export.v1alpha1.Item.value
|
|
158
|
+
*/
|
|
159
|
+
value: {
|
|
160
|
+
/**
|
|
161
|
+
* @generated from field: elimity.insights.common.v1alpha1.Entity entity = 1;
|
|
162
|
+
*/
|
|
163
|
+
value: Entity;
|
|
164
|
+
case: "entity";
|
|
165
|
+
} | {
|
|
166
|
+
/**
|
|
167
|
+
* @generated from field: elimity.insights.common.v1alpha1.Relationship relationship = 2;
|
|
168
|
+
*/
|
|
169
|
+
value: Relationship;
|
|
170
|
+
case: "relationship";
|
|
171
|
+
} | { case: undefined; value?: undefined } = { case: undefined };
|
|
172
|
+
|
|
173
|
+
constructor(data?: PartialMessage<Item>) {
|
|
174
|
+
super();
|
|
175
|
+
proto3.util.initPartial(data, this);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
179
|
+
static readonly typeName = "elimity.insights.export.v1alpha1.Item";
|
|
180
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
181
|
+
{ no: 1, name: "entity", kind: "message", T: Entity, oneof: "value" },
|
|
182
|
+
{ no: 2, name: "relationship", kind: "message", T: Relationship, oneof: "value" },
|
|
183
|
+
]);
|
|
184
|
+
|
|
185
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Item {
|
|
186
|
+
return new Item().fromBinary(bytes, options);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Item {
|
|
190
|
+
return new Item().fromJson(jsonValue, options);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Item {
|
|
194
|
+
return new Item().fromJsonString(jsonString, options);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
static equals(a: Item | PlainMessage<Item> | undefined, b: Item | PlainMessage<Item> | undefined): boolean {
|
|
198
|
+
return proto3.util.equals(Item, a, b);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* @generated from message elimity.insights.export.v1alpha1.RelationshipType
|
|
204
|
+
*/
|
|
205
|
+
export class RelationshipType extends Message<RelationshipType> {
|
|
206
|
+
/**
|
|
207
|
+
* @generated from field: string from_entity_type = 1;
|
|
208
|
+
*/
|
|
209
|
+
fromEntityType = "";
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* @generated from field: string to_entity_type = 2;
|
|
213
|
+
*/
|
|
214
|
+
toEntityType = "";
|
|
215
|
+
|
|
216
|
+
constructor(data?: PartialMessage<RelationshipType>) {
|
|
217
|
+
super();
|
|
218
|
+
proto3.util.initPartial(data, this);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
222
|
+
static readonly typeName = "elimity.insights.export.v1alpha1.RelationshipType";
|
|
223
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
224
|
+
{ no: 1, name: "from_entity_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
225
|
+
{ no: 2, name: "to_entity_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
226
|
+
]);
|
|
227
|
+
|
|
228
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RelationshipType {
|
|
229
|
+
return new RelationshipType().fromBinary(bytes, options);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RelationshipType {
|
|
233
|
+
return new RelationshipType().fromJson(jsonValue, options);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RelationshipType {
|
|
237
|
+
return new RelationshipType().fromJsonString(jsonString, options);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
static equals(a: RelationshipType | PlainMessage<RelationshipType> | undefined, b: RelationshipType | PlainMessage<RelationshipType> | undefined): boolean {
|
|
241
|
+
return proto3.util.equals(RelationshipType, a, b);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* @generated from message elimity.insights.export.v1alpha1.Target
|
|
247
|
+
*/
|
|
248
|
+
export class Target extends Message<Target> {
|
|
249
|
+
/**
|
|
250
|
+
* @generated from field: elimity.insights.export.v1alpha1.Filter filter = 1;
|
|
251
|
+
*/
|
|
252
|
+
filter?: Filter;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* @generated from field: int64 source_id = 2;
|
|
256
|
+
*/
|
|
257
|
+
sourceId = protoInt64.zero;
|
|
258
|
+
|
|
259
|
+
constructor(data?: PartialMessage<Target>) {
|
|
260
|
+
super();
|
|
261
|
+
proto3.util.initPartial(data, this);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
265
|
+
static readonly typeName = "elimity.insights.export.v1alpha1.Target";
|
|
266
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
267
|
+
{ no: 1, name: "filter", kind: "message", T: Filter },
|
|
268
|
+
{ no: 2, name: "source_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
|
|
269
|
+
]);
|
|
270
|
+
|
|
271
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Target {
|
|
272
|
+
return new Target().fromBinary(bytes, options);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Target {
|
|
276
|
+
return new Target().fromJson(jsonValue, options);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Target {
|
|
280
|
+
return new Target().fromJsonString(jsonString, options);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
static equals(a: Target | PlainMessage<Target> | undefined, b: Target | PlainMessage<Target> | undefined): boolean {
|
|
284
|
+
return proto3.util.equals(Target, a, b);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: elimity/insights/export/v1alpha1/export.proto
|
|
5
|
+
# Protobuf Python Version: 5.29.5
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
5,
|
|
15
|
+
29,
|
|
16
|
+
5,
|
|
17
|
+
'',
|
|
18
|
+
'elimity/insights/export/v1alpha1/export.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from elimity.insights.common.v1alpha1 import common_pb2 as elimity_dot_insights_dot_common_dot_v1alpha1_dot_common__pb2
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-elimity/insights/export/v1alpha1/export.proto\x12 elimity.insights.export.v1alpha1\x1a-elimity/insights/common/v1alpha1/common.proto\"\x9f\x01\n\rExportRequest\x12 \n\x0c\x61pi_token_id\x18\x01 \x01(\x03R\napiTokenId\x12(\n\x10\x61pi_token_secret\x18\x02 \x01(\x0cR\x0e\x61piTokenSecret\x12\x42\n\x07targets\x18\x03 \x03(\x0b\x32(.elimity.insights.export.v1alpha1.TargetR\x07targets\"o\n\x0e\x45xportResponse\x12:\n\x04item\x18\x01 \x01(\x0b\x32&.elimity.insights.export.v1alpha1.ItemR\x04item\x12!\n\x0ctarget_index\x18\x02 \x01(\x03R\x0btargetIndex\"\x97\x01\n\x06\x46ilter\x12!\n\x0b\x65ntity_type\x18\x01 \x01(\tH\x00R\nentityType\x12\x61\n\x11relationship_type\x18\x02 \x01(\x0b\x32\x32.elimity.insights.export.v1alpha1.RelationshipTypeH\x00R\x10relationshipTypeB\x07\n\x05value\"\xa9\x01\n\x04Item\x12\x42\n\x06\x65ntity\x18\x01 \x01(\x0b\x32(.elimity.insights.common.v1alpha1.EntityH\x00R\x06\x65ntity\x12T\n\x0crelationship\x18\x02 \x01(\x0b\x32..elimity.insights.common.v1alpha1.RelationshipH\x00R\x0crelationshipB\x07\n\x05value\"b\n\x10RelationshipType\x12(\n\x10\x66rom_entity_type\x18\x01 \x01(\tR\x0e\x66romEntityType\x12$\n\x0eto_entity_type\x18\x02 \x01(\tR\x0ctoEntityType\"g\n\x06Target\x12@\n\x06\x66ilter\x18\x01 \x01(\x0b\x32(.elimity.insights.export.v1alpha1.FilterR\x06\x66ilter\x12\x1b\n\tsource_id\x18\x02 \x01(\x03R\x08sourceId2x\n\x07Service\x12m\n\x06\x45xport\x12/.elimity.insights.export.v1alpha1.ExportRequest\x1a\x30.elimity.insights.export.v1alpha1.ExportResponse0\x01\x42JZHgithub.com/elimity-com/insights-sdk/gen/elimity/insights/export/v1alpha1b\x06proto3')
|
|
29
|
+
|
|
30
|
+
_globals = globals()
|
|
31
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
32
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'elimity.insights.export.v1alpha1.export_pb2', _globals)
|
|
33
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
34
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
35
|
+
_globals['DESCRIPTOR']._serialized_options = b'ZHgithub.com/elimity-com/insights-sdk/gen/elimity/insights/export/v1alpha1'
|
|
36
|
+
_globals['_EXPORTREQUEST']._serialized_start=131
|
|
37
|
+
_globals['_EXPORTREQUEST']._serialized_end=290
|
|
38
|
+
_globals['_EXPORTRESPONSE']._serialized_start=292
|
|
39
|
+
_globals['_EXPORTRESPONSE']._serialized_end=403
|
|
40
|
+
_globals['_FILTER']._serialized_start=406
|
|
41
|
+
_globals['_FILTER']._serialized_end=557
|
|
42
|
+
_globals['_ITEM']._serialized_start=560
|
|
43
|
+
_globals['_ITEM']._serialized_end=729
|
|
44
|
+
_globals['_RELATIONSHIPTYPE']._serialized_start=731
|
|
45
|
+
_globals['_RELATIONSHIPTYPE']._serialized_end=829
|
|
46
|
+
_globals['_TARGET']._serialized_start=831
|
|
47
|
+
_globals['_TARGET']._serialized_end=934
|
|
48
|
+
_globals['_SERVICE']._serialized_start=936
|
|
49
|
+
_globals['_SERVICE']._serialized_end=1056
|
|
50
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
from elimity.insights.common.v1alpha1 import common_pb2 as _common_pb2
|
|
2
|
+
from google.protobuf.internal import containers as _containers
|
|
3
|
+
from google.protobuf import descriptor as _descriptor
|
|
4
|
+
from google.protobuf import message as _message
|
|
5
|
+
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
6
|
+
|
|
7
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
8
|
+
|
|
9
|
+
class ExportRequest(_message.Message):
|
|
10
|
+
__slots__ = ("api_token_id", "api_token_secret", "targets")
|
|
11
|
+
API_TOKEN_ID_FIELD_NUMBER: _ClassVar[int]
|
|
12
|
+
API_TOKEN_SECRET_FIELD_NUMBER: _ClassVar[int]
|
|
13
|
+
TARGETS_FIELD_NUMBER: _ClassVar[int]
|
|
14
|
+
api_token_id: int
|
|
15
|
+
api_token_secret: bytes
|
|
16
|
+
targets: _containers.RepeatedCompositeFieldContainer[Target]
|
|
17
|
+
def __init__(self, api_token_id: _Optional[int] = ..., api_token_secret: _Optional[bytes] = ..., targets: _Optional[_Iterable[_Union[Target, _Mapping]]] = ...) -> None: ...
|
|
18
|
+
|
|
19
|
+
class ExportResponse(_message.Message):
|
|
20
|
+
__slots__ = ("item", "target_index")
|
|
21
|
+
ITEM_FIELD_NUMBER: _ClassVar[int]
|
|
22
|
+
TARGET_INDEX_FIELD_NUMBER: _ClassVar[int]
|
|
23
|
+
item: Item
|
|
24
|
+
target_index: int
|
|
25
|
+
def __init__(self, item: _Optional[_Union[Item, _Mapping]] = ..., target_index: _Optional[int] = ...) -> None: ...
|
|
26
|
+
|
|
27
|
+
class Filter(_message.Message):
|
|
28
|
+
__slots__ = ("entity_type", "relationship_type")
|
|
29
|
+
ENTITY_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
30
|
+
RELATIONSHIP_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
31
|
+
entity_type: str
|
|
32
|
+
relationship_type: RelationshipType
|
|
33
|
+
def __init__(self, entity_type: _Optional[str] = ..., relationship_type: _Optional[_Union[RelationshipType, _Mapping]] = ...) -> None: ...
|
|
34
|
+
|
|
35
|
+
class Item(_message.Message):
|
|
36
|
+
__slots__ = ("entity", "relationship")
|
|
37
|
+
ENTITY_FIELD_NUMBER: _ClassVar[int]
|
|
38
|
+
RELATIONSHIP_FIELD_NUMBER: _ClassVar[int]
|
|
39
|
+
entity: _common_pb2.Entity
|
|
40
|
+
relationship: _common_pb2.Relationship
|
|
41
|
+
def __init__(self, entity: _Optional[_Union[_common_pb2.Entity, _Mapping]] = ..., relationship: _Optional[_Union[_common_pb2.Relationship, _Mapping]] = ...) -> None: ...
|
|
42
|
+
|
|
43
|
+
class RelationshipType(_message.Message):
|
|
44
|
+
__slots__ = ("from_entity_type", "to_entity_type")
|
|
45
|
+
FROM_ENTITY_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
46
|
+
TO_ENTITY_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
47
|
+
from_entity_type: str
|
|
48
|
+
to_entity_type: str
|
|
49
|
+
def __init__(self, from_entity_type: _Optional[str] = ..., to_entity_type: _Optional[str] = ...) -> None: ...
|
|
50
|
+
|
|
51
|
+
class Target(_message.Message):
|
|
52
|
+
__slots__ = ("filter", "source_id")
|
|
53
|
+
FILTER_FIELD_NUMBER: _ClassVar[int]
|
|
54
|
+
SOURCE_ID_FIELD_NUMBER: _ClassVar[int]
|
|
55
|
+
filter: Filter
|
|
56
|
+
source_id: int
|
|
57
|
+
def __init__(self, filter: _Optional[_Union[Filter, _Mapping]] = ..., source_id: _Optional[int] = ...) -> None: ...
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
|
2
|
+
//
|
|
3
|
+
// Source: elimity/insights/export/v1alpha1/export.proto
|
|
4
|
+
|
|
5
|
+
package v1alpha1connect
|
|
6
|
+
|
|
7
|
+
import (
|
|
8
|
+
connect "connectrpc.com/connect"
|
|
9
|
+
context "context"
|
|
10
|
+
errors "errors"
|
|
11
|
+
v1alpha1 "github.com/elimity-com/insights-sdk/gen/elimity/insights/export/v1alpha1"
|
|
12
|
+
http "net/http"
|
|
13
|
+
strings "strings"
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
|
17
|
+
// compatible. If you get a compiler error that this constant is not defined, this code was
|
|
18
|
+
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
|
19
|
+
// problem by either regenerating this code with an older version of connect or updating the connect
|
|
20
|
+
// version compiled into your binary.
|
|
21
|
+
const _ = connect.IsAtLeastVersion1_13_0
|
|
22
|
+
|
|
23
|
+
const (
|
|
24
|
+
// ServiceName is the fully-qualified name of the Service service.
|
|
25
|
+
ServiceName = "elimity.insights.export.v1alpha1.Service"
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
|
29
|
+
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
|
30
|
+
//
|
|
31
|
+
// Note that these are different from the fully-qualified method names used by
|
|
32
|
+
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
|
33
|
+
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
|
34
|
+
// period.
|
|
35
|
+
const (
|
|
36
|
+
// ServiceExportProcedure is the fully-qualified name of the Service's Export RPC.
|
|
37
|
+
ServiceExportProcedure = "/elimity.insights.export.v1alpha1.Service/Export"
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package.
|
|
41
|
+
var (
|
|
42
|
+
serviceServiceDescriptor = v1alpha1.File_elimity_insights_export_v1alpha1_export_proto.Services().ByName("Service")
|
|
43
|
+
serviceExportMethodDescriptor = serviceServiceDescriptor.Methods().ByName("Export")
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
// ServiceClient is a client for the elimity.insights.export.v1alpha1.Service service.
|
|
47
|
+
type ServiceClient interface {
|
|
48
|
+
Export(context.Context, *connect.Request[v1alpha1.ExportRequest]) (*connect.ServerStreamForClient[v1alpha1.ExportResponse], error)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// NewServiceClient constructs a client for the elimity.insights.export.v1alpha1.Service service. By
|
|
52
|
+
// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses,
|
|
53
|
+
// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the
|
|
54
|
+
// connect.WithGRPC() or connect.WithGRPCWeb() options.
|
|
55
|
+
//
|
|
56
|
+
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
|
57
|
+
// http://api.acme.com or https://acme.com/grpc).
|
|
58
|
+
func NewServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ServiceClient {
|
|
59
|
+
baseURL = strings.TrimRight(baseURL, "/")
|
|
60
|
+
return &serviceClient{
|
|
61
|
+
export: connect.NewClient[v1alpha1.ExportRequest, v1alpha1.ExportResponse](
|
|
62
|
+
httpClient,
|
|
63
|
+
baseURL+ServiceExportProcedure,
|
|
64
|
+
connect.WithSchema(serviceExportMethodDescriptor),
|
|
65
|
+
connect.WithClientOptions(opts...),
|
|
66
|
+
),
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// serviceClient implements ServiceClient.
|
|
71
|
+
type serviceClient struct {
|
|
72
|
+
export *connect.Client[v1alpha1.ExportRequest, v1alpha1.ExportResponse]
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Export calls elimity.insights.export.v1alpha1.Service.Export.
|
|
76
|
+
func (c *serviceClient) Export(ctx context.Context, req *connect.Request[v1alpha1.ExportRequest]) (*connect.ServerStreamForClient[v1alpha1.ExportResponse], error) {
|
|
77
|
+
return c.export.CallServerStream(ctx, req)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// ServiceHandler is an implementation of the elimity.insights.export.v1alpha1.Service service.
|
|
81
|
+
type ServiceHandler interface {
|
|
82
|
+
Export(context.Context, *connect.Request[v1alpha1.ExportRequest], *connect.ServerStream[v1alpha1.ExportResponse]) error
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// NewServiceHandler builds an HTTP handler from the service implementation. It returns the path on
|
|
86
|
+
// which to mount the handler and the handler itself.
|
|
87
|
+
//
|
|
88
|
+
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
|
89
|
+
// and JSON codecs. They also support gzip compression.
|
|
90
|
+
func NewServiceHandler(svc ServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
|
91
|
+
serviceExportHandler := connect.NewServerStreamHandler(
|
|
92
|
+
ServiceExportProcedure,
|
|
93
|
+
svc.Export,
|
|
94
|
+
connect.WithSchema(serviceExportMethodDescriptor),
|
|
95
|
+
connect.WithHandlerOptions(opts...),
|
|
96
|
+
)
|
|
97
|
+
return "/elimity.insights.export.v1alpha1.Service/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
98
|
+
switch r.URL.Path {
|
|
99
|
+
case ServiceExportProcedure:
|
|
100
|
+
serviceExportHandler.ServeHTTP(w, r)
|
|
101
|
+
default:
|
|
102
|
+
http.NotFound(w, r)
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// UnimplementedServiceHandler returns CodeUnimplemented from all methods.
|
|
108
|
+
type UnimplementedServiceHandler struct{}
|
|
109
|
+
|
|
110
|
+
func (UnimplementedServiceHandler) Export(context.Context, *connect.Request[v1alpha1.ExportRequest], *connect.ServerStream[v1alpha1.ExportResponse]) error {
|
|
111
|
+
return connect.NewError(connect.CodeUnimplemented, errors.New("elimity.insights.export.v1alpha1.Service.Export is not implemented"))
|
|
112
|
+
}
|
elimity/py.typed
ADDED
|
File without changes
|