@code0-tech/tucana 0.0.54 → 0.0.56

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code0-tech/tucana",
3
- "version": "0.0.54",
3
+ "version": "0.0.56",
4
4
  "description": "Code0 GRPC Protocol",
5
5
  "homepage": "https://github.com/code0-tech/tucana#readme",
6
6
  "bugs": {
@@ -7,7 +7,9 @@ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
7
7
  import type { IBinaryReader } from "@protobuf-ts/runtime";
8
8
  import type { PartialMessage } from "@protobuf-ts/runtime";
9
9
  import { MessageType } from "@protobuf-ts/runtime";
10
+ import { ActionConfigurations } from "./shared.action_configuration_pb";
10
11
  import { Struct } from "./shared.struct_pb";
12
+ import { ActionConfigurationDefinition } from "./shared.action_configuration_pb";
11
13
  import { Value } from "./shared.struct_pb";
12
14
  /**
13
15
  * Event that gets admitted by an action
@@ -21,10 +23,16 @@ export interface Event {
21
23
  * @generated from protobuf field: string event_type = 1
22
24
  */
23
25
  eventType: string;
26
+ /**
27
+ * Project Id that this event is emitted for
28
+ *
29
+ * @generated from protobuf field: int64 project_id = 2
30
+ */
31
+ projectId: bigint;
24
32
  /**
25
33
  * Payload (JSON) of event params
26
34
  *
27
- * @generated from protobuf field: shared.Value payload = 2
35
+ * @generated from protobuf field: shared.Value payload = 3
28
36
  */
29
37
  payload?: Value;
30
38
  }
@@ -44,6 +52,10 @@ export interface ActionLogon {
44
52
  * @generated from protobuf field: string version = 2
45
53
  */
46
54
  version: string;
55
+ /**
56
+ * @generated from protobuf field: repeated shared.ActionConfigurationDefinition action_configurations = 3
57
+ */
58
+ actionConfigurations: ActionConfigurationDefinition[];
47
59
  }
48
60
  /**
49
61
  * Request to execute a request a flow
@@ -132,11 +144,27 @@ export interface TransferRequest {
132
144
  */
133
145
  export interface TransferResponse {
134
146
  /**
135
- * Execution request
136
- *
137
- * @generated from protobuf field: aquila.ExecutionRequest execution = 1
147
+ * @generated from protobuf oneof: data
138
148
  */
139
- execution?: ExecutionRequest;
149
+ data: {
150
+ oneofKind: "execution";
151
+ /**
152
+ * Execution request
153
+ *
154
+ * @generated from protobuf field: aquila.ExecutionRequest execution = 1
155
+ */
156
+ execution: ExecutionRequest;
157
+ } | {
158
+ oneofKind: "actionConfigurations";
159
+ /**
160
+ * ActionConfigurations that have been configured by the user
161
+ *
162
+ * @generated from protobuf field: shared.ActionConfigurations action_configurations = 2
163
+ */
164
+ actionConfigurations: ActionConfigurations;
165
+ } | {
166
+ oneofKind: undefined;
167
+ };
140
168
  }
141
169
  declare class Event$Type extends MessageType<Event> {
142
170
  constructor();
@@ -9,19 +9,23 @@ import { WireType } from "@protobuf-ts/runtime";
9
9
  import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
10
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
11
11
  import { MessageType } from "@protobuf-ts/runtime";
12
+ import { ActionConfigurations } from "./shared.action_configuration_pb";
12
13
  import { Struct } from "./shared.struct_pb";
14
+ import { ActionConfigurationDefinition } from "./shared.action_configuration_pb";
13
15
  import { Value } from "./shared.struct_pb";
14
16
  // @generated message type with reflection information, may provide speed optimized methods
15
17
  class Event$Type extends MessageType {
16
18
  constructor() {
17
19
  super("aquila.Event", [
18
20
  { no: 1, name: "event_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
19
- { no: 2, name: "payload", kind: "message", T: () => Value }
21
+ { no: 2, name: "project_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
22
+ { no: 3, name: "payload", kind: "message", T: () => Value }
20
23
  ]);
21
24
  }
22
25
  create(value) {
23
26
  const message = globalThis.Object.create((this.messagePrototype));
24
27
  message.eventType = "";
28
+ message.projectId = 0n;
25
29
  if (value !== undefined)
26
30
  reflectionMergePartial(this, message, value);
27
31
  return message;
@@ -34,7 +38,10 @@ class Event$Type extends MessageType {
34
38
  case /* string event_type */ 1:
35
39
  message.eventType = reader.string();
36
40
  break;
37
- case /* shared.Value payload */ 2:
41
+ case /* int64 project_id */ 2:
42
+ message.projectId = reader.int64().toBigInt();
43
+ break;
44
+ case /* shared.Value payload */ 3:
38
45
  message.payload = Value.internalBinaryRead(reader, reader.uint32(), options, message.payload);
39
46
  break;
40
47
  default:
@@ -52,9 +59,12 @@ class Event$Type extends MessageType {
52
59
  /* string event_type = 1; */
53
60
  if (message.eventType !== "")
54
61
  writer.tag(1, WireType.LengthDelimited).string(message.eventType);
55
- /* shared.Value payload = 2; */
62
+ /* int64 project_id = 2; */
63
+ if (message.projectId !== 0n)
64
+ writer.tag(2, WireType.Varint).int64(message.projectId);
65
+ /* shared.Value payload = 3; */
56
66
  if (message.payload)
57
- Value.internalBinaryWrite(message.payload, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
67
+ Value.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
58
68
  let u = options.writeUnknownFields;
59
69
  if (u !== false)
60
70
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -70,13 +80,15 @@ class ActionLogon$Type extends MessageType {
70
80
  constructor() {
71
81
  super("aquila.ActionLogon", [
72
82
  { no: 1, name: "action_identifier", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
73
- { no: 2, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
83
+ { no: 2, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
84
+ { no: 3, name: "action_configurations", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ActionConfigurationDefinition }
74
85
  ]);
75
86
  }
76
87
  create(value) {
77
88
  const message = globalThis.Object.create((this.messagePrototype));
78
89
  message.actionIdentifier = "";
79
90
  message.version = "";
91
+ message.actionConfigurations = [];
80
92
  if (value !== undefined)
81
93
  reflectionMergePartial(this, message, value);
82
94
  return message;
@@ -92,6 +104,9 @@ class ActionLogon$Type extends MessageType {
92
104
  case /* string version */ 2:
93
105
  message.version = reader.string();
94
106
  break;
107
+ case /* repeated shared.ActionConfigurationDefinition action_configurations */ 3:
108
+ message.actionConfigurations.push(ActionConfigurationDefinition.internalBinaryRead(reader, reader.uint32(), options));
109
+ break;
95
110
  default:
96
111
  let u = options.readUnknownField;
97
112
  if (u === "throw")
@@ -110,6 +125,9 @@ class ActionLogon$Type extends MessageType {
110
125
  /* string version = 2; */
111
126
  if (message.version !== "")
112
127
  writer.tag(2, WireType.LengthDelimited).string(message.version);
128
+ /* repeated shared.ActionConfigurationDefinition action_configurations = 3; */
129
+ for (let i = 0; i < message.actionConfigurations.length; i++)
130
+ ActionConfigurationDefinition.internalBinaryWrite(message.actionConfigurations[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
113
131
  let u = options.writeUnknownFields;
114
132
  if (u !== false)
115
133
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -310,11 +328,13 @@ export const TransferRequest = new TransferRequest$Type();
310
328
  class TransferResponse$Type extends MessageType {
311
329
  constructor() {
312
330
  super("aquila.TransferResponse", [
313
- { no: 1, name: "execution", kind: "message", T: () => ExecutionRequest }
331
+ { no: 1, name: "execution", kind: "message", oneof: "data", T: () => ExecutionRequest },
332
+ { no: 2, name: "action_configurations", kind: "message", oneof: "data", T: () => ActionConfigurations }
314
333
  ]);
315
334
  }
316
335
  create(value) {
317
336
  const message = globalThis.Object.create((this.messagePrototype));
337
+ message.data = { oneofKind: undefined };
318
338
  if (value !== undefined)
319
339
  reflectionMergePartial(this, message, value);
320
340
  return message;
@@ -325,7 +345,16 @@ class TransferResponse$Type extends MessageType {
325
345
  let [fieldNo, wireType] = reader.tag();
326
346
  switch (fieldNo) {
327
347
  case /* aquila.ExecutionRequest execution */ 1:
328
- message.execution = ExecutionRequest.internalBinaryRead(reader, reader.uint32(), options, message.execution);
348
+ message.data = {
349
+ oneofKind: "execution",
350
+ execution: ExecutionRequest.internalBinaryRead(reader, reader.uint32(), options, message.data.execution)
351
+ };
352
+ break;
353
+ case /* shared.ActionConfigurations action_configurations */ 2:
354
+ message.data = {
355
+ oneofKind: "actionConfigurations",
356
+ actionConfigurations: ActionConfigurations.internalBinaryRead(reader, reader.uint32(), options, message.data.actionConfigurations)
357
+ };
329
358
  break;
330
359
  default:
331
360
  let u = options.readUnknownField;
@@ -340,8 +369,11 @@ class TransferResponse$Type extends MessageType {
340
369
  }
341
370
  internalBinaryWrite(message, writer, options) {
342
371
  /* aquila.ExecutionRequest execution = 1; */
343
- if (message.execution)
344
- ExecutionRequest.internalBinaryWrite(message.execution, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
372
+ if (message.data.oneofKind === "execution")
373
+ ExecutionRequest.internalBinaryWrite(message.data.execution, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
374
+ /* shared.ActionConfigurations action_configurations = 2; */
375
+ if (message.data.oneofKind === "actionConfigurations")
376
+ ActionConfigurations.internalBinaryWrite(message.data.actionConfigurations, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
345
377
  let u = options.writeUnknownFields;
346
378
  if (u !== false)
347
379
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -21,24 +21,35 @@ export interface ActionConfiguration {
21
21
  */
22
22
  identifier: string;
23
23
  /**
24
- * @generated from protobuf field: int64 project_id = 2
24
+ * @generated from protobuf field: shared.Value value = 2
25
+ */
26
+ value?: Value;
27
+ }
28
+ /**
29
+ * Message representing a project configuration for an action
30
+ *
31
+ * @generated from protobuf message shared.ActionProjectConfiguration
32
+ */
33
+ export interface ActionProjectConfiguration {
34
+ /**
35
+ * @generated from protobuf field: int64 project_id = 1
25
36
  */
26
37
  projectId: bigint;
27
38
  /**
28
- * @generated from protobuf field: shared.Value value = 3
39
+ * @generated from protobuf field: repeated shared.ActionConfiguration action_configurations = 2
29
40
  */
30
- value?: Value;
41
+ actionConfigurations: ActionConfiguration[];
31
42
  }
32
43
  /**
33
- * Wrapper message containing a collection of ActionConfiguration instances
44
+ * Wrapper message containing a collection of ActionProjectConfiguration instances
34
45
  *
35
46
  * @generated from protobuf message shared.ActionConfigurations
36
47
  */
37
48
  export interface ActionConfigurations {
38
49
  /**
39
- * @generated from protobuf field: repeated shared.ActionConfiguration action_configurations = 1
50
+ * @generated from protobuf field: repeated shared.ActionProjectConfiguration action_configurations = 1
40
51
  */
41
- actionConfigurations: ActionConfiguration[];
52
+ actionConfigurations: ActionProjectConfiguration[];
42
53
  }
43
54
  /**
44
55
  * Message sent by the Action to define a configuration
@@ -77,6 +88,16 @@ declare class ActionConfiguration$Type extends MessageType<ActionConfiguration>
77
88
  * @generated MessageType for protobuf message shared.ActionConfiguration
78
89
  */
79
90
  export declare const ActionConfiguration: ActionConfiguration$Type;
91
+ declare class ActionProjectConfiguration$Type extends MessageType<ActionProjectConfiguration> {
92
+ constructor();
93
+ create(value?: PartialMessage<ActionProjectConfiguration>): ActionProjectConfiguration;
94
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ActionProjectConfiguration): ActionProjectConfiguration;
95
+ internalBinaryWrite(message: ActionProjectConfiguration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
96
+ }
97
+ /**
98
+ * @generated MessageType for protobuf message shared.ActionProjectConfiguration
99
+ */
100
+ export declare const ActionProjectConfiguration: ActionProjectConfiguration$Type;
80
101
  declare class ActionConfigurations$Type extends MessageType<ActionConfigurations> {
81
102
  constructor();
82
103
  create(value?: PartialMessage<ActionConfigurations>): ActionConfigurations;
@@ -13,14 +13,12 @@ class ActionConfiguration$Type extends MessageType {
13
13
  constructor() {
14
14
  super("shared.ActionConfiguration", [
15
15
  { no: 1, name: "identifier", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
16
- { no: 2, name: "project_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
17
- { no: 3, name: "value", kind: "message", T: () => Value }
16
+ { no: 2, name: "value", kind: "message", T: () => Value }
18
17
  ]);
19
18
  }
20
19
  create(value) {
21
20
  const message = globalThis.Object.create((this.messagePrototype));
22
21
  message.identifier = "";
23
- message.projectId = 0n;
24
22
  if (value !== undefined)
25
23
  reflectionMergePartial(this, message, value);
26
24
  return message;
@@ -33,10 +31,7 @@ class ActionConfiguration$Type extends MessageType {
33
31
  case /* string identifier */ 1:
34
32
  message.identifier = reader.string();
35
33
  break;
36
- case /* int64 project_id */ 2:
37
- message.projectId = reader.int64().toBigInt();
38
- break;
39
- case /* shared.Value value */ 3:
34
+ case /* shared.Value value */ 2:
40
35
  message.value = Value.internalBinaryRead(reader, reader.uint32(), options, message.value);
41
36
  break;
42
37
  default:
@@ -54,12 +49,9 @@ class ActionConfiguration$Type extends MessageType {
54
49
  /* string identifier = 1; */
55
50
  if (message.identifier !== "")
56
51
  writer.tag(1, WireType.LengthDelimited).string(message.identifier);
57
- /* int64 project_id = 2; */
58
- if (message.projectId !== 0n)
59
- writer.tag(2, WireType.Varint).int64(message.projectId);
60
- /* shared.Value value = 3; */
52
+ /* shared.Value value = 2; */
61
53
  if (message.value)
62
- Value.internalBinaryWrite(message.value, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
54
+ Value.internalBinaryWrite(message.value, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
63
55
  let u = options.writeUnknownFields;
64
56
  if (u !== false)
65
57
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -71,10 +63,65 @@ class ActionConfiguration$Type extends MessageType {
71
63
  */
72
64
  export const ActionConfiguration = new ActionConfiguration$Type();
73
65
  // @generated message type with reflection information, may provide speed optimized methods
66
+ class ActionProjectConfiguration$Type extends MessageType {
67
+ constructor() {
68
+ super("shared.ActionProjectConfiguration", [
69
+ { no: 1, name: "project_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
70
+ { no: 2, name: "action_configurations", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ActionConfiguration }
71
+ ]);
72
+ }
73
+ create(value) {
74
+ const message = globalThis.Object.create((this.messagePrototype));
75
+ message.projectId = 0n;
76
+ message.actionConfigurations = [];
77
+ if (value !== undefined)
78
+ reflectionMergePartial(this, message, value);
79
+ return message;
80
+ }
81
+ internalBinaryRead(reader, length, options, target) {
82
+ let message = target ?? this.create(), end = reader.pos + length;
83
+ while (reader.pos < end) {
84
+ let [fieldNo, wireType] = reader.tag();
85
+ switch (fieldNo) {
86
+ case /* int64 project_id */ 1:
87
+ message.projectId = reader.int64().toBigInt();
88
+ break;
89
+ case /* repeated shared.ActionConfiguration action_configurations */ 2:
90
+ message.actionConfigurations.push(ActionConfiguration.internalBinaryRead(reader, reader.uint32(), options));
91
+ break;
92
+ default:
93
+ let u = options.readUnknownField;
94
+ if (u === "throw")
95
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
96
+ let d = reader.skip(wireType);
97
+ if (u !== false)
98
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
99
+ }
100
+ }
101
+ return message;
102
+ }
103
+ internalBinaryWrite(message, writer, options) {
104
+ /* int64 project_id = 1; */
105
+ if (message.projectId !== 0n)
106
+ writer.tag(1, WireType.Varint).int64(message.projectId);
107
+ /* repeated shared.ActionConfiguration action_configurations = 2; */
108
+ for (let i = 0; i < message.actionConfigurations.length; i++)
109
+ ActionConfiguration.internalBinaryWrite(message.actionConfigurations[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
110
+ let u = options.writeUnknownFields;
111
+ if (u !== false)
112
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
113
+ return writer;
114
+ }
115
+ }
116
+ /**
117
+ * @generated MessageType for protobuf message shared.ActionProjectConfiguration
118
+ */
119
+ export const ActionProjectConfiguration = new ActionProjectConfiguration$Type();
120
+ // @generated message type with reflection information, may provide speed optimized methods
74
121
  class ActionConfigurations$Type extends MessageType {
75
122
  constructor() {
76
123
  super("shared.ActionConfigurations", [
77
- { no: 1, name: "action_configurations", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ActionConfiguration }
124
+ { no: 1, name: "action_configurations", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ActionProjectConfiguration }
78
125
  ]);
79
126
  }
80
127
  create(value) {
@@ -89,8 +136,8 @@ class ActionConfigurations$Type extends MessageType {
89
136
  while (reader.pos < end) {
90
137
  let [fieldNo, wireType] = reader.tag();
91
138
  switch (fieldNo) {
92
- case /* repeated shared.ActionConfiguration action_configurations */ 1:
93
- message.actionConfigurations.push(ActionConfiguration.internalBinaryRead(reader, reader.uint32(), options));
139
+ case /* repeated shared.ActionProjectConfiguration action_configurations */ 1:
140
+ message.actionConfigurations.push(ActionProjectConfiguration.internalBinaryRead(reader, reader.uint32(), options));
94
141
  break;
95
142
  default:
96
143
  let u = options.readUnknownField;
@@ -104,9 +151,9 @@ class ActionConfigurations$Type extends MessageType {
104
151
  return message;
105
152
  }
106
153
  internalBinaryWrite(message, writer, options) {
107
- /* repeated shared.ActionConfiguration action_configurations = 1; */
154
+ /* repeated shared.ActionProjectConfiguration action_configurations = 1; */
108
155
  for (let i = 0; i < message.actionConfigurations.length; i++)
109
- ActionConfiguration.internalBinaryWrite(message.actionConfigurations[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
156
+ ActionProjectConfiguration.internalBinaryWrite(message.actionConfigurations[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
110
157
  let u = options.writeUnknownFields;
111
158
  if (u !== false)
112
159
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);