elimity-insights-sdk 1.1.1__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.
Files changed (44) hide show
  1. elimity/__init__.py +0 -0
  2. elimity/__init__.pyi +1 -0
  3. elimity/insights/__init__.py +0 -0
  4. elimity/insights/__init__.pyi +3 -0
  5. elimity/insights/common/__init__.py +0 -0
  6. elimity/insights/common/__init__.pyi +1 -0
  7. elimity/insights/common/v1alpha1/__init__.py +0 -0
  8. elimity/insights/common/v1alpha1/__init__.pyi +1 -0
  9. elimity/insights/common/v1alpha1/common.pb.go +494 -0
  10. elimity/insights/common/v1alpha1/common_pb.ts +138 -0
  11. elimity/insights/common/v1alpha1/common_pb2.py +50 -0
  12. elimity/insights/common/v1alpha1/common_pb2.pyi +63 -0
  13. elimity/insights/customgateway/__init__.py +0 -0
  14. elimity/insights/customgateway/__init__.pyi +1 -0
  15. elimity/insights/customgateway/v1alpha1/__init__.py +0 -0
  16. elimity/insights/customgateway/v1alpha1/__init__.pyi +2 -0
  17. elimity/insights/customgateway/v1alpha1/customgateway.pb.go +504 -0
  18. elimity/insights/customgateway/v1alpha1/customgateway_connect.py +119 -0
  19. elimity/insights/customgateway/v1alpha1/customgateway_pb.ts +136 -0
  20. elimity/insights/customgateway/v1alpha1/customgateway_pb2.py +52 -0
  21. elimity/insights/customgateway/v1alpha1/customgateway_pb2.pyi +48 -0
  22. elimity/insights/customgateway/v1alpha1/v1alpha1connect/__init__.py +0 -0
  23. elimity/insights/customgateway/v1alpha1/v1alpha1connect/__init__.pyi +0 -0
  24. elimity/insights/customgateway/v1alpha1/v1alpha1connect/customgateway.connect.go +113 -0
  25. elimity/insights/export/__init__.py +0 -0
  26. elimity/insights/export/__init__.pyi +1 -0
  27. elimity/insights/export/v1alpha1/__init__.py +0 -0
  28. elimity/insights/export/v1alpha1/__init__.pyi +2 -0
  29. elimity/insights/export/v1alpha1/export.pb.go +635 -0
  30. elimity/insights/export/v1alpha1/export_connect.py +119 -0
  31. elimity/insights/export/v1alpha1/export_pb.ts +182 -0
  32. elimity/insights/export/v1alpha1/export_pb2.py +50 -0
  33. elimity/insights/export/v1alpha1/export_pb2.pyi +57 -0
  34. elimity/insights/export/v1alpha1/v1alpha1connect/__init__.py +0 -0
  35. elimity/insights/export/v1alpha1/v1alpha1connect/__init__.pyi +0 -0
  36. elimity/insights/export/v1alpha1/v1alpha1connect/export.connect.go +112 -0
  37. elimity/py.typed +0 -0
  38. elimity_insights_sdk/__init__.py +31 -0
  39. elimity_insights_sdk/_sdk.py +190 -0
  40. elimity_insights_sdk/py.typed +0 -0
  41. elimity_insights_sdk-1.1.1.dist-info/METADATA +13 -0
  42. elimity_insights_sdk-1.1.1.dist-info/RECORD +44 -0
  43. elimity_insights_sdk-1.1.1.dist-info/WHEEL +4 -0
  44. elimity_insights_sdk-1.1.1.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,182 @@
1
+ // @generated by protoc-gen-es v2.11.0 with parameter "import_extension=js,target=ts"
2
+ // @generated from file elimity/insights/export/v1alpha1/export.proto (package elimity.insights.export.v1alpha1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
6
+ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
7
+ import type { Entity, Relationship } from "../../common/v1alpha1/common_pb.js";
8
+ import { file_elimity_insights_common_v1alpha1_common } from "../../common/v1alpha1/common_pb.js";
9
+ import type { Message } from "@bufbuild/protobuf";
10
+
11
+ /**
12
+ * Describes the file elimity/insights/export/v1alpha1/export.proto.
13
+ */
14
+ export const file_elimity_insights_export_v1alpha1_export: GenFile = /*@__PURE__*/
15
+ fileDesc("Ci1lbGltaXR5L2luc2lnaHRzL2V4cG9ydC92MWFscGhhMS9leHBvcnQucHJvdG8SIGVsaW1pdHkuaW5zaWdodHMuZXhwb3J0LnYxYWxwaGExInoKDUV4cG9ydFJlcXVlc3QSFAoMYXBpX3Rva2VuX2lkGAEgASgDEhgKEGFwaV90b2tlbl9zZWNyZXQYAiABKAwSOQoHdGFyZ2V0cxgDIAMoCzIoLmVsaW1pdHkuaW5zaWdodHMuZXhwb3J0LnYxYWxwaGExLlRhcmdldCJcCg5FeHBvcnRSZXNwb25zZRI0CgRpdGVtGAEgASgLMiYuZWxpbWl0eS5pbnNpZ2h0cy5leHBvcnQudjFhbHBoYTEuSXRlbRIUCgx0YXJnZXRfaW5kZXgYAiABKAMieQoGRmlsdGVyEhUKC2VudGl0eV90eXBlGAEgASgJSAASTwoRcmVsYXRpb25zaGlwX3R5cGUYAiABKAsyMi5lbGltaXR5Lmluc2lnaHRzLmV4cG9ydC52MWFscGhhMS5SZWxhdGlvbnNoaXBUeXBlSABCBwoFdmFsdWUikwEKBEl0ZW0SOgoGZW50aXR5GAEgASgLMiguZWxpbWl0eS5pbnNpZ2h0cy5jb21tb24udjFhbHBoYTEuRW50aXR5SAASRgoMcmVsYXRpb25zaGlwGAIgASgLMi4uZWxpbWl0eS5pbnNpZ2h0cy5jb21tb24udjFhbHBoYTEuUmVsYXRpb25zaGlwSABCBwoFdmFsdWUiRAoQUmVsYXRpb25zaGlwVHlwZRIYChBmcm9tX2VudGl0eV90eXBlGAEgASgJEhYKDnRvX2VudGl0eV90eXBlGAIgASgJIlUKBlRhcmdldBI4CgZmaWx0ZXIYASABKAsyKC5lbGltaXR5Lmluc2lnaHRzLmV4cG9ydC52MWFscGhhMS5GaWx0ZXISEQoJc291cmNlX2lkGAIgASgDMngKB1NlcnZpY2USbQoGRXhwb3J0Ei8uZWxpbWl0eS5pbnNpZ2h0cy5leHBvcnQudjFhbHBoYTEuRXhwb3J0UmVxdWVzdBowLmVsaW1pdHkuaW5zaWdodHMuZXhwb3J0LnYxYWxwaGExLkV4cG9ydFJlc3BvbnNlMAFCSlpIZ2l0aHViLmNvbS9lbGltaXR5LWNvbS9pbnNpZ2h0cy1zZGsvZ2VuL2VsaW1pdHkvaW5zaWdodHMvZXhwb3J0L3YxYWxwaGExYgZwcm90bzM", [file_elimity_insights_common_v1alpha1_common]);
16
+
17
+ /**
18
+ * @generated from message elimity.insights.export.v1alpha1.ExportRequest
19
+ */
20
+ export type ExportRequest = Message<"elimity.insights.export.v1alpha1.ExportRequest"> & {
21
+ /**
22
+ * @generated from field: int64 api_token_id = 1;
23
+ */
24
+ apiTokenId: bigint;
25
+
26
+ /**
27
+ * @generated from field: bytes api_token_secret = 2;
28
+ */
29
+ apiTokenSecret: Uint8Array;
30
+
31
+ /**
32
+ * @generated from field: repeated elimity.insights.export.v1alpha1.Target targets = 3;
33
+ */
34
+ targets: Target[];
35
+ };
36
+
37
+ /**
38
+ * Describes the message elimity.insights.export.v1alpha1.ExportRequest.
39
+ * Use `create(ExportRequestSchema)` to create a new message.
40
+ */
41
+ export const ExportRequestSchema: GenMessage<ExportRequest> = /*@__PURE__*/
42
+ messageDesc(file_elimity_insights_export_v1alpha1_export, 0);
43
+
44
+ /**
45
+ * @generated from message elimity.insights.export.v1alpha1.ExportResponse
46
+ */
47
+ export type ExportResponse = Message<"elimity.insights.export.v1alpha1.ExportResponse"> & {
48
+ /**
49
+ * @generated from field: elimity.insights.export.v1alpha1.Item item = 1;
50
+ */
51
+ item?: Item;
52
+
53
+ /**
54
+ * @generated from field: int64 target_index = 2;
55
+ */
56
+ targetIndex: bigint;
57
+ };
58
+
59
+ /**
60
+ * Describes the message elimity.insights.export.v1alpha1.ExportResponse.
61
+ * Use `create(ExportResponseSchema)` to create a new message.
62
+ */
63
+ export const ExportResponseSchema: GenMessage<ExportResponse> = /*@__PURE__*/
64
+ messageDesc(file_elimity_insights_export_v1alpha1_export, 1);
65
+
66
+ /**
67
+ * @generated from message elimity.insights.export.v1alpha1.Filter
68
+ */
69
+ export type Filter = Message<"elimity.insights.export.v1alpha1.Filter"> & {
70
+ /**
71
+ * @generated from oneof elimity.insights.export.v1alpha1.Filter.value
72
+ */
73
+ value: {
74
+ /**
75
+ * @generated from field: string entity_type = 1;
76
+ */
77
+ value: string;
78
+ case: "entityType";
79
+ } | {
80
+ /**
81
+ * @generated from field: elimity.insights.export.v1alpha1.RelationshipType relationship_type = 2;
82
+ */
83
+ value: RelationshipType;
84
+ case: "relationshipType";
85
+ } | { case: undefined; value?: undefined };
86
+ };
87
+
88
+ /**
89
+ * Describes the message elimity.insights.export.v1alpha1.Filter.
90
+ * Use `create(FilterSchema)` to create a new message.
91
+ */
92
+ export const FilterSchema: GenMessage<Filter> = /*@__PURE__*/
93
+ messageDesc(file_elimity_insights_export_v1alpha1_export, 2);
94
+
95
+ /**
96
+ * @generated from message elimity.insights.export.v1alpha1.Item
97
+ */
98
+ export type Item = Message<"elimity.insights.export.v1alpha1.Item"> & {
99
+ /**
100
+ * @generated from oneof elimity.insights.export.v1alpha1.Item.value
101
+ */
102
+ value: {
103
+ /**
104
+ * @generated from field: elimity.insights.common.v1alpha1.Entity entity = 1;
105
+ */
106
+ value: Entity;
107
+ case: "entity";
108
+ } | {
109
+ /**
110
+ * @generated from field: elimity.insights.common.v1alpha1.Relationship relationship = 2;
111
+ */
112
+ value: Relationship;
113
+ case: "relationship";
114
+ } | { case: undefined; value?: undefined };
115
+ };
116
+
117
+ /**
118
+ * Describes the message elimity.insights.export.v1alpha1.Item.
119
+ * Use `create(ItemSchema)` to create a new message.
120
+ */
121
+ export const ItemSchema: GenMessage<Item> = /*@__PURE__*/
122
+ messageDesc(file_elimity_insights_export_v1alpha1_export, 3);
123
+
124
+ /**
125
+ * @generated from message elimity.insights.export.v1alpha1.RelationshipType
126
+ */
127
+ export type RelationshipType = Message<"elimity.insights.export.v1alpha1.RelationshipType"> & {
128
+ /**
129
+ * @generated from field: string from_entity_type = 1;
130
+ */
131
+ fromEntityType: string;
132
+
133
+ /**
134
+ * @generated from field: string to_entity_type = 2;
135
+ */
136
+ toEntityType: string;
137
+ };
138
+
139
+ /**
140
+ * Describes the message elimity.insights.export.v1alpha1.RelationshipType.
141
+ * Use `create(RelationshipTypeSchema)` to create a new message.
142
+ */
143
+ export const RelationshipTypeSchema: GenMessage<RelationshipType> = /*@__PURE__*/
144
+ messageDesc(file_elimity_insights_export_v1alpha1_export, 4);
145
+
146
+ /**
147
+ * @generated from message elimity.insights.export.v1alpha1.Target
148
+ */
149
+ export type Target = Message<"elimity.insights.export.v1alpha1.Target"> & {
150
+ /**
151
+ * @generated from field: elimity.insights.export.v1alpha1.Filter filter = 1;
152
+ */
153
+ filter?: Filter;
154
+
155
+ /**
156
+ * @generated from field: int64 source_id = 2;
157
+ */
158
+ sourceId: bigint;
159
+ };
160
+
161
+ /**
162
+ * Describes the message elimity.insights.export.v1alpha1.Target.
163
+ * Use `create(TargetSchema)` to create a new message.
164
+ */
165
+ export const TargetSchema: GenMessage<Target> = /*@__PURE__*/
166
+ messageDesc(file_elimity_insights_export_v1alpha1_export, 5);
167
+
168
+ /**
169
+ * @generated from service elimity.insights.export.v1alpha1.Service
170
+ */
171
+ export const Service: GenService<{
172
+ /**
173
+ * @generated from rpc elimity.insights.export.v1alpha1.Service.Export
174
+ */
175
+ export: {
176
+ methodKind: "server_streaming";
177
+ input: typeof ExportRequestSchema;
178
+ output: typeof ExportResponseSchema;
179
+ },
180
+ }> = /*@__PURE__*/
181
+ serviceDesc(file_elimity_insights_export_v1alpha1_export, 0);
182
+
@@ -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: ...
@@ -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
@@ -0,0 +1,31 @@
1
+ from elimity_insights_sdk._sdk import (
2
+ BooleanValue,
3
+ DateTimeValue,
4
+ DateValue,
5
+ EntityItem,
6
+ Item,
7
+ Level,
8
+ LogItem,
9
+ NumberValue,
10
+ RelationshipItem,
11
+ StringValue,
12
+ TimeValue,
13
+ Value,
14
+ app,
15
+ )
16
+
17
+ __all__ = [
18
+ "BooleanValue",
19
+ "DateValue",
20
+ "DateTimeValue",
21
+ "EntityItem",
22
+ "Item",
23
+ "Level",
24
+ "LogItem",
25
+ "NumberValue",
26
+ "RelationshipItem",
27
+ "StringValue",
28
+ "TimeValue",
29
+ "Value",
30
+ "app",
31
+ ]