geniebox-shared-lib 2.4.0 → 2.4.2

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.
@@ -8,10 +8,14 @@ export interface Agent {
8
8
  name: string;
9
9
  description: string;
10
10
  /** JSON string */
11
- icon: string;
11
+ icon?: {
12
+ [key: string]: any;
13
+ } | undefined;
12
14
  userId: string;
13
15
  /** JSON string */
14
- instructions: string;
16
+ instructions?: {
17
+ [key: string]: any;
18
+ } | undefined;
15
19
  /** "public", "private", "readonly" */
16
20
  visibility: string;
17
21
  createdAt: string;
@@ -10,21 +10,13 @@ exports.AgentServiceControllerMethods = AgentServiceControllerMethods;
10
10
  /* eslint-disable */
11
11
  const wire_1 = require("@bufbuild/protobuf/wire");
12
12
  const microservices_1 = require("@nestjs/microservices");
13
+ const protobufjs_1 = require("protobufjs");
13
14
  const empty_interface_1 = require("./google/protobuf/empty.interface");
15
+ const struct_interface_1 = require("./google/protobuf/struct.interface");
14
16
  exports.protobufPackage = "agent";
15
17
  exports.AGENT_PACKAGE_NAME = "agent";
16
18
  function createBaseAgent() {
17
- return {
18
- id: "",
19
- name: "",
20
- description: "",
21
- icon: "",
22
- userId: "",
23
- instructions: "",
24
- visibility: "",
25
- createdAt: "",
26
- updatedAt: "",
27
- };
19
+ return { id: "", name: "", description: "", userId: "", visibility: "", createdAt: "", updatedAt: "" };
28
20
  }
29
21
  exports.Agent = {
30
22
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -37,14 +29,14 @@ exports.Agent = {
37
29
  if (message.description !== "") {
38
30
  writer.uint32(26).string(message.description);
39
31
  }
40
- if (message.icon !== "") {
41
- writer.uint32(34).string(message.icon);
32
+ if (message.icon !== undefined) {
33
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.icon), writer.uint32(34).fork()).join();
42
34
  }
43
35
  if (message.userId !== "") {
44
36
  writer.uint32(42).string(message.userId);
45
37
  }
46
- if (message.instructions !== "") {
47
- writer.uint32(50).string(message.instructions);
38
+ if (message.instructions !== undefined) {
39
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.instructions), writer.uint32(50).fork()).join();
48
40
  }
49
41
  if (message.visibility !== "") {
50
42
  writer.uint32(58).string(message.visibility);
@@ -89,7 +81,7 @@ exports.Agent = {
89
81
  if (tag !== 34) {
90
82
  break;
91
83
  }
92
- message.icon = reader.string();
84
+ message.icon = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
93
85
  continue;
94
86
  }
95
87
  case 5: {
@@ -103,7 +95,7 @@ exports.Agent = {
103
95
  if (tag !== 50) {
104
96
  break;
105
97
  }
106
- message.instructions = reader.string();
98
+ message.instructions = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
107
99
  continue;
108
100
  }
109
101
  case 7: {
@@ -504,6 +496,7 @@ exports.AgentsResponse = {
504
496
  return message;
505
497
  },
506
498
  };
499
+ protobufjs_1.wrappers[".google.protobuf.Struct"] = { fromObject: struct_interface_1.Struct.wrap, toObject: struct_interface_1.Struct.unwrap };
507
500
  function AgentServiceControllerMethods() {
508
501
  return function (constructor) {
509
502
  const grpcMethods = ["createAgent", "getAgent", "updateAgent", "deleteAgent", "listAgents"];
@@ -0,0 +1,91 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "google.protobuf";
3
+ /**
4
+ * `NullValue` is a singleton enumeration to represent the null value for the
5
+ * `Value` type union.
6
+ *
7
+ * The JSON representation for `NullValue` is JSON `null`.
8
+ */
9
+ export declare enum NullValue {
10
+ /** NULL_VALUE - Null value. */
11
+ NULL_VALUE = 0,
12
+ UNRECOGNIZED = -1
13
+ }
14
+ /**
15
+ * `Struct` represents a structured data value, consisting of fields
16
+ * which map to dynamically typed values. In some languages, `Struct`
17
+ * might be supported by a native representation. For example, in
18
+ * scripting languages like JS a struct is represented as an
19
+ * object. The details of that representation are described together
20
+ * with the proto support for the language.
21
+ *
22
+ * The JSON representation for `Struct` is JSON object.
23
+ */
24
+ export interface Struct {
25
+ /** Unordered map of dynamically typed values. */
26
+ fields: {
27
+ [key: string]: any | undefined;
28
+ };
29
+ }
30
+ export interface Struct_FieldsEntry {
31
+ key: string;
32
+ value?: any | undefined;
33
+ }
34
+ /**
35
+ * `Value` represents a dynamically typed value which can be either
36
+ * null, a number, a string, a boolean, a recursive struct value, or a
37
+ * list of values. A producer of value is expected to set one of these
38
+ * variants. Absence of any variant indicates an error.
39
+ *
40
+ * The JSON representation for `Value` is JSON value.
41
+ */
42
+ export interface Value {
43
+ /** Represents a null value. */
44
+ nullValue?: NullValue | undefined;
45
+ /** Represents a double value. */
46
+ numberValue?: number | undefined;
47
+ /** Represents a string value. */
48
+ stringValue?: string | undefined;
49
+ /** Represents a boolean value. */
50
+ boolValue?: boolean | undefined;
51
+ /** Represents a structured value. */
52
+ structValue?: {
53
+ [key: string]: any;
54
+ } | undefined;
55
+ /** Represents a repeated `Value`. */
56
+ listValue?: Array<any> | undefined;
57
+ }
58
+ /**
59
+ * `ListValue` is a wrapper around a repeated field of values.
60
+ *
61
+ * The JSON representation for `ListValue` is JSON array.
62
+ */
63
+ export interface ListValue {
64
+ /** Repeated field of dynamically typed values. */
65
+ values: any[];
66
+ }
67
+ export declare const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
68
+ export declare const Struct: MessageFns<Struct> & StructWrapperFns;
69
+ export declare const Struct_FieldsEntry: MessageFns<Struct_FieldsEntry>;
70
+ export declare const Value: MessageFns<Value> & AnyValueWrapperFns;
71
+ export declare const ListValue: MessageFns<ListValue> & ListValueWrapperFns;
72
+ export interface MessageFns<T> {
73
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
74
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
75
+ }
76
+ export interface StructWrapperFns {
77
+ wrap(object: {
78
+ [key: string]: any;
79
+ } | undefined): Struct;
80
+ unwrap(message: Struct): {
81
+ [key: string]: any;
82
+ };
83
+ }
84
+ export interface AnyValueWrapperFns {
85
+ wrap(value: any): Value;
86
+ unwrap(message: any): string | number | boolean | Object | null | Array<any> | undefined;
87
+ }
88
+ export interface ListValueWrapperFns {
89
+ wrap(array: Array<any> | undefined): ListValue;
90
+ unwrap(message: ListValue): Array<any>;
91
+ }
@@ -0,0 +1,300 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.7.7
5
+ // protoc v5.28.2
6
+ // source: google/protobuf/struct.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ListValue = exports.Value = exports.Struct_FieldsEntry = exports.Struct = exports.GOOGLE_PROTOBUF_PACKAGE_NAME = exports.NullValue = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ const wire_1 = require("@bufbuild/protobuf/wire");
11
+ const protobufjs_1 = require("protobufjs");
12
+ exports.protobufPackage = "google.protobuf";
13
+ /**
14
+ * `NullValue` is a singleton enumeration to represent the null value for the
15
+ * `Value` type union.
16
+ *
17
+ * The JSON representation for `NullValue` is JSON `null`.
18
+ */
19
+ var NullValue;
20
+ (function (NullValue) {
21
+ /** NULL_VALUE - Null value. */
22
+ NullValue[NullValue["NULL_VALUE"] = 0] = "NULL_VALUE";
23
+ NullValue[NullValue["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
24
+ })(NullValue || (exports.NullValue = NullValue = {}));
25
+ exports.GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
26
+ function createBaseStruct() {
27
+ return { fields: {} };
28
+ }
29
+ exports.Struct = {
30
+ encode(message, writer = new wire_1.BinaryWriter()) {
31
+ Object.entries(message.fields).forEach(([key, value]) => {
32
+ if (value !== undefined) {
33
+ exports.Struct_FieldsEntry.encode({ key: key, value }, writer.uint32(10).fork()).join();
34
+ }
35
+ });
36
+ return writer;
37
+ },
38
+ decode(input, length) {
39
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
40
+ const end = length === undefined ? reader.len : reader.pos + length;
41
+ const message = createBaseStruct();
42
+ while (reader.pos < end) {
43
+ const tag = reader.uint32();
44
+ switch (tag >>> 3) {
45
+ case 1: {
46
+ if (tag !== 10) {
47
+ break;
48
+ }
49
+ const entry1 = exports.Struct_FieldsEntry.decode(reader, reader.uint32());
50
+ if (entry1.value !== undefined) {
51
+ message.fields[entry1.key] = entry1.value;
52
+ }
53
+ continue;
54
+ }
55
+ }
56
+ if ((tag & 7) === 4 || tag === 0) {
57
+ break;
58
+ }
59
+ reader.skip(tag & 7);
60
+ }
61
+ return message;
62
+ },
63
+ wrap(object) {
64
+ const struct = createBaseStruct();
65
+ if (object !== undefined) {
66
+ for (const key of Object.keys(object)) {
67
+ struct.fields[key] = exports.Value.wrap(object[key]);
68
+ }
69
+ }
70
+ return struct;
71
+ },
72
+ unwrap(message) {
73
+ const object = {};
74
+ if (message.fields) {
75
+ for (const key of Object.keys(message.fields)) {
76
+ object[key] = exports.Value.unwrap(message.fields[key]);
77
+ }
78
+ }
79
+ return object;
80
+ },
81
+ };
82
+ function createBaseStruct_FieldsEntry() {
83
+ return { key: "" };
84
+ }
85
+ exports.Struct_FieldsEntry = {
86
+ encode(message, writer = new wire_1.BinaryWriter()) {
87
+ if (message.key !== "") {
88
+ writer.uint32(10).string(message.key);
89
+ }
90
+ if (message.value !== undefined) {
91
+ exports.Value.encode(exports.Value.wrap(message.value), writer.uint32(18).fork()).join();
92
+ }
93
+ return writer;
94
+ },
95
+ decode(input, length) {
96
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
97
+ const end = length === undefined ? reader.len : reader.pos + length;
98
+ const message = createBaseStruct_FieldsEntry();
99
+ while (reader.pos < end) {
100
+ const tag = reader.uint32();
101
+ switch (tag >>> 3) {
102
+ case 1: {
103
+ if (tag !== 10) {
104
+ break;
105
+ }
106
+ message.key = reader.string();
107
+ continue;
108
+ }
109
+ case 2: {
110
+ if (tag !== 18) {
111
+ break;
112
+ }
113
+ message.value = exports.Value.unwrap(exports.Value.decode(reader, reader.uint32()));
114
+ continue;
115
+ }
116
+ }
117
+ if ((tag & 7) === 4 || tag === 0) {
118
+ break;
119
+ }
120
+ reader.skip(tag & 7);
121
+ }
122
+ return message;
123
+ },
124
+ };
125
+ function createBaseValue() {
126
+ return {};
127
+ }
128
+ exports.Value = {
129
+ encode(message, writer = new wire_1.BinaryWriter()) {
130
+ if (message.nullValue !== undefined) {
131
+ writer.uint32(8).int32(message.nullValue);
132
+ }
133
+ if (message.numberValue !== undefined) {
134
+ writer.uint32(17).double(message.numberValue);
135
+ }
136
+ if (message.stringValue !== undefined) {
137
+ writer.uint32(26).string(message.stringValue);
138
+ }
139
+ if (message.boolValue !== undefined) {
140
+ writer.uint32(32).bool(message.boolValue);
141
+ }
142
+ if (message.structValue !== undefined) {
143
+ exports.Struct.encode(exports.Struct.wrap(message.structValue), writer.uint32(42).fork()).join();
144
+ }
145
+ if (message.listValue !== undefined) {
146
+ exports.ListValue.encode(exports.ListValue.wrap(message.listValue), writer.uint32(50).fork()).join();
147
+ }
148
+ return writer;
149
+ },
150
+ decode(input, length) {
151
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
152
+ const end = length === undefined ? reader.len : reader.pos + length;
153
+ const message = createBaseValue();
154
+ while (reader.pos < end) {
155
+ const tag = reader.uint32();
156
+ switch (tag >>> 3) {
157
+ case 1: {
158
+ if (tag !== 8) {
159
+ break;
160
+ }
161
+ message.nullValue = reader.int32();
162
+ continue;
163
+ }
164
+ case 2: {
165
+ if (tag !== 17) {
166
+ break;
167
+ }
168
+ message.numberValue = reader.double();
169
+ continue;
170
+ }
171
+ case 3: {
172
+ if (tag !== 26) {
173
+ break;
174
+ }
175
+ message.stringValue = reader.string();
176
+ continue;
177
+ }
178
+ case 4: {
179
+ if (tag !== 32) {
180
+ break;
181
+ }
182
+ message.boolValue = reader.bool();
183
+ continue;
184
+ }
185
+ case 5: {
186
+ if (tag !== 42) {
187
+ break;
188
+ }
189
+ message.structValue = exports.Struct.unwrap(exports.Struct.decode(reader, reader.uint32()));
190
+ continue;
191
+ }
192
+ case 6: {
193
+ if (tag !== 50) {
194
+ break;
195
+ }
196
+ message.listValue = exports.ListValue.unwrap(exports.ListValue.decode(reader, reader.uint32()));
197
+ continue;
198
+ }
199
+ }
200
+ if ((tag & 7) === 4 || tag === 0) {
201
+ break;
202
+ }
203
+ reader.skip(tag & 7);
204
+ }
205
+ return message;
206
+ },
207
+ wrap(value) {
208
+ const result = {};
209
+ if (value === null) {
210
+ result.nullValue = NullValue.NULL_VALUE;
211
+ }
212
+ else if (typeof value === "boolean") {
213
+ result.boolValue = value;
214
+ }
215
+ else if (typeof value === "number") {
216
+ result.numberValue = value;
217
+ }
218
+ else if (typeof value === "string") {
219
+ result.stringValue = value;
220
+ }
221
+ else if (globalThis.Array.isArray(value)) {
222
+ result.listValue = exports.ListValue.wrap(value);
223
+ }
224
+ else if (typeof value === "object") {
225
+ result.structValue = exports.Struct.wrap(value);
226
+ }
227
+ else if (typeof value !== "undefined") {
228
+ throw new globalThis.Error("Unsupported any value type: " + typeof value);
229
+ }
230
+ return result;
231
+ },
232
+ unwrap(message) {
233
+ if (message?.hasOwnProperty("stringValue") && message.stringValue !== undefined) {
234
+ return message.stringValue;
235
+ }
236
+ else if (message?.hasOwnProperty("numberValue") && message?.numberValue !== undefined) {
237
+ return message.numberValue;
238
+ }
239
+ else if (message?.hasOwnProperty("boolValue") && message?.boolValue !== undefined) {
240
+ return message.boolValue;
241
+ }
242
+ else if (message?.hasOwnProperty("structValue") && message?.structValue !== undefined) {
243
+ return exports.Struct.unwrap(message.structValue);
244
+ }
245
+ else if (message?.hasOwnProperty("listValue") && message?.listValue !== undefined) {
246
+ return exports.ListValue.unwrap(message.listValue);
247
+ }
248
+ else if (message?.hasOwnProperty("nullValue") && message?.nullValue !== undefined) {
249
+ return null;
250
+ }
251
+ return undefined;
252
+ },
253
+ };
254
+ function createBaseListValue() {
255
+ return { values: [] };
256
+ }
257
+ exports.ListValue = {
258
+ encode(message, writer = new wire_1.BinaryWriter()) {
259
+ for (const v of message.values) {
260
+ exports.Value.encode(exports.Value.wrap(v), writer.uint32(10).fork()).join();
261
+ }
262
+ return writer;
263
+ },
264
+ decode(input, length) {
265
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
266
+ const end = length === undefined ? reader.len : reader.pos + length;
267
+ const message = createBaseListValue();
268
+ while (reader.pos < end) {
269
+ const tag = reader.uint32();
270
+ switch (tag >>> 3) {
271
+ case 1: {
272
+ if (tag !== 10) {
273
+ break;
274
+ }
275
+ message.values.push(exports.Value.unwrap(exports.Value.decode(reader, reader.uint32())));
276
+ continue;
277
+ }
278
+ }
279
+ if ((tag & 7) === 4 || tag === 0) {
280
+ break;
281
+ }
282
+ reader.skip(tag & 7);
283
+ }
284
+ return message;
285
+ },
286
+ wrap(array) {
287
+ const result = createBaseListValue();
288
+ result.values = (array ?? []).map(exports.Value.wrap);
289
+ return result;
290
+ },
291
+ unwrap(message) {
292
+ if (message?.hasOwnProperty("values") && globalThis.Array.isArray(message.values)) {
293
+ return message.values.map(exports.Value.unwrap);
294
+ }
295
+ else {
296
+ return message;
297
+ }
298
+ },
299
+ };
300
+ protobufjs_1.wrappers[".google.protobuf.Struct"] = { fromObject: exports.Struct.wrap, toObject: exports.Struct.unwrap };
@@ -6,8 +6,9 @@ export declare const protobufPackage = "mcp";
6
6
  export interface McpServer {
7
7
  id: string;
8
8
  name: string;
9
- /** JSON string */
10
- config: string;
9
+ config?: {
10
+ [key: string]: any;
11
+ } | undefined;
11
12
  enabled: boolean;
12
13
  userId: string;
13
14
  visibility: string;
@@ -35,10 +36,12 @@ export interface McpOAuthSession {
35
36
  id: string;
36
37
  mcpServerId: string;
37
38
  serverUrl: string;
38
- /** JSON */
39
- clientInfo: string;
40
- /** JSON */
41
- tokens: string;
39
+ clientInfo?: {
40
+ [key: string]: any;
41
+ } | undefined;
42
+ tokens?: {
43
+ [key: string]: any;
44
+ } | undefined;
42
45
  codeVerifier: string;
43
46
  state: string;
44
47
  createdAt: string;
@@ -48,7 +51,9 @@ export interface McpOAuthSession {
48
51
  export interface CreateMcpServerRequest {
49
52
  userId: string;
50
53
  name: string;
51
- config: string;
54
+ config?: {
55
+ [key: string]: any;
56
+ } | undefined;
52
57
  enabled: boolean;
53
58
  visibility: string;
54
59
  }
@@ -56,7 +61,9 @@ export interface UpdateMcpServerRequest {
56
61
  id: string;
57
62
  userId: string;
58
63
  name?: string | undefined;
59
- config?: string | undefined;
64
+ config?: {
65
+ [key: string]: any;
66
+ } | undefined;
60
67
  enabled?: boolean | undefined;
61
68
  visibility?: string | undefined;
62
69
  }
@@ -10,11 +10,13 @@ exports.McpServiceControllerMethods = McpServiceControllerMethods;
10
10
  /* eslint-disable */
11
11
  const wire_1 = require("@bufbuild/protobuf/wire");
12
12
  const microservices_1 = require("@nestjs/microservices");
13
+ const protobufjs_1 = require("protobufjs");
13
14
  const empty_interface_1 = require("./google/protobuf/empty.interface");
15
+ const struct_interface_1 = require("./google/protobuf/struct.interface");
14
16
  exports.protobufPackage = "mcp";
15
17
  exports.MCP_PACKAGE_NAME = "mcp";
16
18
  function createBaseMcpServer() {
17
- return { id: "", name: "", config: "", enabled: false, userId: "", visibility: "", createdAt: "", updatedAt: "" };
19
+ return { id: "", name: "", enabled: false, userId: "", visibility: "", createdAt: "", updatedAt: "" };
18
20
  }
19
21
  exports.McpServer = {
20
22
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -24,8 +26,8 @@ exports.McpServer = {
24
26
  if (message.name !== "") {
25
27
  writer.uint32(18).string(message.name);
26
28
  }
27
- if (message.config !== "") {
28
- writer.uint32(26).string(message.config);
29
+ if (message.config !== undefined) {
30
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.config), writer.uint32(26).fork()).join();
29
31
  }
30
32
  if (message.enabled !== false) {
31
33
  writer.uint32(32).bool(message.enabled);
@@ -69,7 +71,7 @@ exports.McpServer = {
69
71
  if (tag !== 26) {
70
72
  break;
71
73
  }
72
- message.config = reader.string();
74
+ message.config = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
73
75
  continue;
74
76
  }
75
77
  case 4: {
@@ -293,17 +295,7 @@ exports.McpToolCustomization = {
293
295
  },
294
296
  };
295
297
  function createBaseMcpOAuthSession() {
296
- return {
297
- id: "",
298
- mcpServerId: "",
299
- serverUrl: "",
300
- clientInfo: "",
301
- tokens: "",
302
- codeVerifier: "",
303
- state: "",
304
- createdAt: "",
305
- updatedAt: "",
306
- };
298
+ return { id: "", mcpServerId: "", serverUrl: "", codeVerifier: "", state: "", createdAt: "", updatedAt: "" };
307
299
  }
308
300
  exports.McpOAuthSession = {
309
301
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -316,11 +308,11 @@ exports.McpOAuthSession = {
316
308
  if (message.serverUrl !== "") {
317
309
  writer.uint32(26).string(message.serverUrl);
318
310
  }
319
- if (message.clientInfo !== "") {
320
- writer.uint32(34).string(message.clientInfo);
311
+ if (message.clientInfo !== undefined) {
312
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.clientInfo), writer.uint32(34).fork()).join();
321
313
  }
322
- if (message.tokens !== "") {
323
- writer.uint32(42).string(message.tokens);
314
+ if (message.tokens !== undefined) {
315
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.tokens), writer.uint32(42).fork()).join();
324
316
  }
325
317
  if (message.codeVerifier !== "") {
326
318
  writer.uint32(50).string(message.codeVerifier);
@@ -368,14 +360,14 @@ exports.McpOAuthSession = {
368
360
  if (tag !== 34) {
369
361
  break;
370
362
  }
371
- message.clientInfo = reader.string();
363
+ message.clientInfo = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
372
364
  continue;
373
365
  }
374
366
  case 5: {
375
367
  if (tag !== 42) {
376
368
  break;
377
369
  }
378
- message.tokens = reader.string();
370
+ message.tokens = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
379
371
  continue;
380
372
  }
381
373
  case 6: {
@@ -416,7 +408,7 @@ exports.McpOAuthSession = {
416
408
  },
417
409
  };
418
410
  function createBaseCreateMcpServerRequest() {
419
- return { userId: "", name: "", config: "", enabled: false, visibility: "" };
411
+ return { userId: "", name: "", enabled: false, visibility: "" };
420
412
  }
421
413
  exports.CreateMcpServerRequest = {
422
414
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -426,8 +418,8 @@ exports.CreateMcpServerRequest = {
426
418
  if (message.name !== "") {
427
419
  writer.uint32(18).string(message.name);
428
420
  }
429
- if (message.config !== "") {
430
- writer.uint32(26).string(message.config);
421
+ if (message.config !== undefined) {
422
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.config), writer.uint32(26).fork()).join();
431
423
  }
432
424
  if (message.enabled !== false) {
433
425
  writer.uint32(32).bool(message.enabled);
@@ -462,7 +454,7 @@ exports.CreateMcpServerRequest = {
462
454
  if (tag !== 26) {
463
455
  break;
464
456
  }
465
- message.config = reader.string();
457
+ message.config = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
466
458
  continue;
467
459
  }
468
460
  case 4: {
@@ -503,7 +495,7 @@ exports.UpdateMcpServerRequest = {
503
495
  writer.uint32(26).string(message.name);
504
496
  }
505
497
  if (message.config !== undefined) {
506
- writer.uint32(34).string(message.config);
498
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.config), writer.uint32(34).fork()).join();
507
499
  }
508
500
  if (message.enabled !== undefined) {
509
501
  writer.uint32(40).bool(message.enabled);
@@ -545,7 +537,7 @@ exports.UpdateMcpServerRequest = {
545
537
  if (tag !== 34) {
546
538
  break;
547
539
  }
548
- message.config = reader.string();
540
+ message.config = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
549
541
  continue;
550
542
  }
551
543
  case 5: {
@@ -869,6 +861,7 @@ exports.McpServersResponse = {
869
861
  return message;
870
862
  },
871
863
  };
864
+ protobufjs_1.wrappers[".google.protobuf.Struct"] = { fromObject: struct_interface_1.Struct.wrap, toObject: struct_interface_1.Struct.unwrap };
872
865
  function McpServiceControllerMethods() {
873
866
  return function (constructor) {
874
867
  const grpcMethods = [
@@ -7,8 +7,9 @@ export interface Workflow {
7
7
  id: string;
8
8
  version: string;
9
9
  name: string;
10
- /** JSON string */
11
- icon: string;
10
+ icon?: {
11
+ [key: string]: any;
12
+ } | undefined;
12
13
  description: string;
13
14
  isPublished: boolean;
14
15
  visibility: string;
@@ -23,10 +24,12 @@ export interface WorkflowNode {
23
24
  kind: string;
24
25
  name: string;
25
26
  description: string;
26
- /** JSON string */
27
- uiConfig: string;
28
- /** JSON string */
29
- nodeConfig: string;
27
+ uiConfig?: {
28
+ [key: string]: any;
29
+ } | undefined;
30
+ nodeConfig?: {
31
+ [key: string]: any;
32
+ } | undefined;
30
33
  createdAt: string;
31
34
  updatedAt: string;
32
35
  }
@@ -38,8 +41,9 @@ export interface WorkflowEdge {
38
41
  source: string;
39
42
  /** Node ID */
40
43
  target: string;
41
- /** JSON string */
42
- uiConfig: string;
44
+ uiConfig?: {
45
+ [key: string]: any;
46
+ } | undefined;
43
47
  createdAt: string;
44
48
  }
45
49
  export interface FullWorkflow {
@@ -52,7 +56,9 @@ export interface CreateWorkflowRequest {
52
56
  userId: string;
53
57
  name: string;
54
58
  description: string;
55
- icon: string;
59
+ icon?: {
60
+ [key: string]: any;
61
+ } | undefined;
56
62
  visibility: string;
57
63
  }
58
64
  export interface UpdateWorkflowRequest {
@@ -60,7 +66,9 @@ export interface UpdateWorkflowRequest {
60
66
  userId: string;
61
67
  name?: string | undefined;
62
68
  description?: string | undefined;
63
- icon?: string | undefined;
69
+ icon?: {
70
+ [key: string]: any;
71
+ } | undefined;
64
72
  isPublished?: boolean | undefined;
65
73
  visibility?: string | undefined;
66
74
  }
@@ -84,16 +92,24 @@ export interface CreateNodeRequest {
84
92
  kind: string;
85
93
  name: string;
86
94
  description: string;
87
- uiConfig: string;
88
- nodeConfig: string;
95
+ uiConfig?: {
96
+ [key: string]: any;
97
+ } | undefined;
98
+ nodeConfig?: {
99
+ [key: string]: any;
100
+ } | undefined;
89
101
  }
90
102
  export interface UpdateNodeRequest {
91
103
  id: string;
92
104
  userId: string;
93
105
  name?: string | undefined;
94
106
  description?: string | undefined;
95
- uiConfig?: string | undefined;
96
- nodeConfig?: string | undefined;
107
+ uiConfig?: {
108
+ [key: string]: any;
109
+ } | undefined;
110
+ nodeConfig?: {
111
+ [key: string]: any;
112
+ } | undefined;
97
113
  }
98
114
  export interface DeleteNodeRequest {
99
115
  id: string;
@@ -104,7 +120,9 @@ export interface CreateEdgeRequest {
104
120
  userId: string;
105
121
  source: string;
106
122
  target: string;
107
- uiConfig: string;
123
+ uiConfig?: {
124
+ [key: string]: any;
125
+ } | undefined;
108
126
  }
109
127
  export interface DeleteEdgeRequest {
110
128
  id: string;
@@ -114,6 +132,17 @@ export interface WorkflowsResponse {
114
132
  workflows: Workflow[];
115
133
  total: number;
116
134
  }
135
+ export interface SaveStructureRequest {
136
+ workflowId: string;
137
+ /** Auth */
138
+ userId: string;
139
+ nodes: WorkflowNode[];
140
+ edges: WorkflowEdge[];
141
+ /** IDs to delete */
142
+ deleteNodes: string[];
143
+ /** IDs to delete */
144
+ deleteEdges: string[];
145
+ }
117
146
  export declare const WORKFLOW_PACKAGE_NAME = "workflow";
118
147
  export declare const Workflow: MessageFns<Workflow>;
119
148
  export declare const WorkflowNode: MessageFns<WorkflowNode>;
@@ -130,6 +159,7 @@ export declare const DeleteNodeRequest: MessageFns<DeleteNodeRequest>;
130
159
  export declare const CreateEdgeRequest: MessageFns<CreateEdgeRequest>;
131
160
  export declare const DeleteEdgeRequest: MessageFns<DeleteEdgeRequest>;
132
161
  export declare const WorkflowsResponse: MessageFns<WorkflowsResponse>;
162
+ export declare const SaveStructureRequest: MessageFns<SaveStructureRequest>;
133
163
  export interface WorkflowServiceClient {
134
164
  createWorkflow(request: CreateWorkflowRequest, metadata?: Metadata): Observable<Workflow>;
135
165
  /** Returns graph */
@@ -142,6 +172,7 @@ export interface WorkflowServiceClient {
142
172
  deleteNode(request: DeleteNodeRequest, metadata?: Metadata): Observable<Empty>;
143
173
  createEdge(request: CreateEdgeRequest, metadata?: Metadata): Observable<WorkflowEdge>;
144
174
  deleteEdge(request: DeleteEdgeRequest, metadata?: Metadata): Observable<Empty>;
175
+ saveStructure(request: SaveStructureRequest, metadata?: Metadata): Observable<Empty>;
145
176
  }
146
177
  export interface WorkflowServiceController {
147
178
  createWorkflow(request: CreateWorkflowRequest, metadata?: Metadata): Promise<Workflow> | Observable<Workflow> | Workflow;
@@ -155,6 +186,7 @@ export interface WorkflowServiceController {
155
186
  deleteNode(request: DeleteNodeRequest, metadata?: Metadata): void;
156
187
  createEdge(request: CreateEdgeRequest, metadata?: Metadata): Promise<WorkflowEdge> | Observable<WorkflowEdge> | WorkflowEdge;
157
188
  deleteEdge(request: DeleteEdgeRequest, metadata?: Metadata): void;
189
+ saveStructure(request: SaveStructureRequest, metadata?: Metadata): void;
158
190
  }
159
191
  export declare function WorkflowServiceControllerMethods(): (constructor: Function) => void;
160
192
  export declare const WORKFLOW_SERVICE_NAME = "WorkflowService";
@@ -251,6 +283,15 @@ export declare const WorkflowServiceService: {
251
283
  readonly responseSerialize: (value: Empty) => Buffer;
252
284
  readonly responseDeserialize: (value: Buffer) => Empty;
253
285
  };
286
+ readonly saveStructure: {
287
+ readonly path: "/workflow.WorkflowService/saveStructure";
288
+ readonly requestStream: false;
289
+ readonly responseStream: false;
290
+ readonly requestSerialize: (value: SaveStructureRequest) => Buffer;
291
+ readonly requestDeserialize: (value: Buffer) => SaveStructureRequest;
292
+ readonly responseSerialize: (value: Empty) => Buffer;
293
+ readonly responseDeserialize: (value: Buffer) => Empty;
294
+ };
254
295
  };
255
296
  export interface WorkflowServiceServer extends UntypedServiceImplementation {
256
297
  createWorkflow: handleUnaryCall<CreateWorkflowRequest, Workflow>;
@@ -264,6 +305,7 @@ export interface WorkflowServiceServer extends UntypedServiceImplementation {
264
305
  deleteNode: handleUnaryCall<DeleteNodeRequest, Empty>;
265
306
  createEdge: handleUnaryCall<CreateEdgeRequest, WorkflowEdge>;
266
307
  deleteEdge: handleUnaryCall<DeleteEdgeRequest, Empty>;
308
+ saveStructure: handleUnaryCall<SaveStructureRequest, Empty>;
267
309
  }
268
310
  export interface MessageFns<T> {
269
311
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
@@ -5,12 +5,14 @@
5
5
  // protoc v5.28.2
6
6
  // source: workflow.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.WorkflowServiceService = exports.WORKFLOW_SERVICE_NAME = exports.WorkflowsResponse = exports.DeleteEdgeRequest = exports.CreateEdgeRequest = exports.DeleteNodeRequest = exports.UpdateNodeRequest = exports.CreateNodeRequest = exports.DeleteWorkflowRequest = exports.ListWorkflowsRequest = exports.GetWorkflowRequest = exports.UpdateWorkflowRequest = exports.CreateWorkflowRequest = exports.FullWorkflow = exports.WorkflowEdge = exports.WorkflowNode = exports.Workflow = exports.WORKFLOW_PACKAGE_NAME = exports.protobufPackage = void 0;
8
+ exports.WorkflowServiceService = exports.WORKFLOW_SERVICE_NAME = exports.SaveStructureRequest = exports.WorkflowsResponse = exports.DeleteEdgeRequest = exports.CreateEdgeRequest = exports.DeleteNodeRequest = exports.UpdateNodeRequest = exports.CreateNodeRequest = exports.DeleteWorkflowRequest = exports.ListWorkflowsRequest = exports.GetWorkflowRequest = exports.UpdateWorkflowRequest = exports.CreateWorkflowRequest = exports.FullWorkflow = exports.WorkflowEdge = exports.WorkflowNode = exports.Workflow = exports.WORKFLOW_PACKAGE_NAME = exports.protobufPackage = void 0;
9
9
  exports.WorkflowServiceControllerMethods = WorkflowServiceControllerMethods;
10
10
  /* eslint-disable */
11
11
  const wire_1 = require("@bufbuild/protobuf/wire");
12
12
  const microservices_1 = require("@nestjs/microservices");
13
+ const protobufjs_1 = require("protobufjs");
13
14
  const empty_interface_1 = require("./google/protobuf/empty.interface");
15
+ const struct_interface_1 = require("./google/protobuf/struct.interface");
14
16
  exports.protobufPackage = "workflow";
15
17
  exports.WORKFLOW_PACKAGE_NAME = "workflow";
16
18
  function createBaseWorkflow() {
@@ -18,7 +20,6 @@ function createBaseWorkflow() {
18
20
  id: "",
19
21
  version: "",
20
22
  name: "",
21
- icon: "",
22
23
  description: "",
23
24
  isPublished: false,
24
25
  visibility: "",
@@ -38,8 +39,8 @@ exports.Workflow = {
38
39
  if (message.name !== "") {
39
40
  writer.uint32(26).string(message.name);
40
41
  }
41
- if (message.icon !== "") {
42
- writer.uint32(34).string(message.icon);
42
+ if (message.icon !== undefined) {
43
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.icon), writer.uint32(34).fork()).join();
43
44
  }
44
45
  if (message.description !== "") {
45
46
  writer.uint32(42).string(message.description);
@@ -93,7 +94,7 @@ exports.Workflow = {
93
94
  if (tag !== 34) {
94
95
  break;
95
96
  }
96
- message.icon = reader.string();
97
+ message.icon = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
97
98
  continue;
98
99
  }
99
100
  case 5: {
@@ -148,18 +149,7 @@ exports.Workflow = {
148
149
  },
149
150
  };
150
151
  function createBaseWorkflowNode() {
151
- return {
152
- id: "",
153
- version: "",
154
- workflowId: "",
155
- kind: "",
156
- name: "",
157
- description: "",
158
- uiConfig: "",
159
- nodeConfig: "",
160
- createdAt: "",
161
- updatedAt: "",
162
- };
152
+ return { id: "", version: "", workflowId: "", kind: "", name: "", description: "", createdAt: "", updatedAt: "" };
163
153
  }
164
154
  exports.WorkflowNode = {
165
155
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -181,11 +171,11 @@ exports.WorkflowNode = {
181
171
  if (message.description !== "") {
182
172
  writer.uint32(50).string(message.description);
183
173
  }
184
- if (message.uiConfig !== "") {
185
- writer.uint32(58).string(message.uiConfig);
174
+ if (message.uiConfig !== undefined) {
175
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.uiConfig), writer.uint32(58).fork()).join();
186
176
  }
187
- if (message.nodeConfig !== "") {
188
- writer.uint32(66).string(message.nodeConfig);
177
+ if (message.nodeConfig !== undefined) {
178
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.nodeConfig), writer.uint32(66).fork()).join();
189
179
  }
190
180
  if (message.createdAt !== "") {
191
181
  writer.uint32(74).string(message.createdAt);
@@ -248,14 +238,14 @@ exports.WorkflowNode = {
248
238
  if (tag !== 58) {
249
239
  break;
250
240
  }
251
- message.uiConfig = reader.string();
241
+ message.uiConfig = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
252
242
  continue;
253
243
  }
254
244
  case 8: {
255
245
  if (tag !== 66) {
256
246
  break;
257
247
  }
258
- message.nodeConfig = reader.string();
248
+ message.nodeConfig = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
259
249
  continue;
260
250
  }
261
251
  case 9: {
@@ -282,7 +272,7 @@ exports.WorkflowNode = {
282
272
  },
283
273
  };
284
274
  function createBaseWorkflowEdge() {
285
- return { id: "", version: "", workflowId: "", source: "", target: "", uiConfig: "", createdAt: "" };
275
+ return { id: "", version: "", workflowId: "", source: "", target: "", createdAt: "" };
286
276
  }
287
277
  exports.WorkflowEdge = {
288
278
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -301,8 +291,8 @@ exports.WorkflowEdge = {
301
291
  if (message.target !== "") {
302
292
  writer.uint32(42).string(message.target);
303
293
  }
304
- if (message.uiConfig !== "") {
305
- writer.uint32(50).string(message.uiConfig);
294
+ if (message.uiConfig !== undefined) {
295
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.uiConfig), writer.uint32(50).fork()).join();
306
296
  }
307
297
  if (message.createdAt !== "") {
308
298
  writer.uint32(58).string(message.createdAt);
@@ -355,7 +345,7 @@ exports.WorkflowEdge = {
355
345
  if (tag !== 50) {
356
346
  break;
357
347
  }
358
- message.uiConfig = reader.string();
348
+ message.uiConfig = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
359
349
  continue;
360
350
  }
361
351
  case 7: {
@@ -428,7 +418,7 @@ exports.FullWorkflow = {
428
418
  },
429
419
  };
430
420
  function createBaseCreateWorkflowRequest() {
431
- return { userId: "", name: "", description: "", icon: "", visibility: "" };
421
+ return { userId: "", name: "", description: "", visibility: "" };
432
422
  }
433
423
  exports.CreateWorkflowRequest = {
434
424
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -441,8 +431,8 @@ exports.CreateWorkflowRequest = {
441
431
  if (message.description !== "") {
442
432
  writer.uint32(26).string(message.description);
443
433
  }
444
- if (message.icon !== "") {
445
- writer.uint32(34).string(message.icon);
434
+ if (message.icon !== undefined) {
435
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.icon), writer.uint32(34).fork()).join();
446
436
  }
447
437
  if (message.visibility !== "") {
448
438
  writer.uint32(42).string(message.visibility);
@@ -481,7 +471,7 @@ exports.CreateWorkflowRequest = {
481
471
  if (tag !== 34) {
482
472
  break;
483
473
  }
484
- message.icon = reader.string();
474
+ message.icon = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
485
475
  continue;
486
476
  }
487
477
  case 5: {
@@ -518,7 +508,7 @@ exports.UpdateWorkflowRequest = {
518
508
  writer.uint32(34).string(message.description);
519
509
  }
520
510
  if (message.icon !== undefined) {
521
- writer.uint32(42).string(message.icon);
511
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.icon), writer.uint32(42).fork()).join();
522
512
  }
523
513
  if (message.isPublished !== undefined) {
524
514
  writer.uint32(48).bool(message.isPublished);
@@ -567,7 +557,7 @@ exports.UpdateWorkflowRequest = {
567
557
  if (tag !== 42) {
568
558
  break;
569
559
  }
570
- message.icon = reader.string();
560
+ message.icon = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
571
561
  continue;
572
562
  }
573
563
  case 6: {
@@ -733,7 +723,7 @@ exports.DeleteWorkflowRequest = {
733
723
  },
734
724
  };
735
725
  function createBaseCreateNodeRequest() {
736
- return { workflowId: "", userId: "", kind: "", name: "", description: "", uiConfig: "", nodeConfig: "" };
726
+ return { workflowId: "", userId: "", kind: "", name: "", description: "" };
737
727
  }
738
728
  exports.CreateNodeRequest = {
739
729
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -752,11 +742,11 @@ exports.CreateNodeRequest = {
752
742
  if (message.description !== "") {
753
743
  writer.uint32(42).string(message.description);
754
744
  }
755
- if (message.uiConfig !== "") {
756
- writer.uint32(50).string(message.uiConfig);
745
+ if (message.uiConfig !== undefined) {
746
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.uiConfig), writer.uint32(50).fork()).join();
757
747
  }
758
- if (message.nodeConfig !== "") {
759
- writer.uint32(58).string(message.nodeConfig);
748
+ if (message.nodeConfig !== undefined) {
749
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.nodeConfig), writer.uint32(58).fork()).join();
760
750
  }
761
751
  return writer;
762
752
  },
@@ -806,14 +796,14 @@ exports.CreateNodeRequest = {
806
796
  if (tag !== 50) {
807
797
  break;
808
798
  }
809
- message.uiConfig = reader.string();
799
+ message.uiConfig = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
810
800
  continue;
811
801
  }
812
802
  case 7: {
813
803
  if (tag !== 58) {
814
804
  break;
815
805
  }
816
- message.nodeConfig = reader.string();
806
+ message.nodeConfig = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
817
807
  continue;
818
808
  }
819
809
  }
@@ -843,10 +833,10 @@ exports.UpdateNodeRequest = {
843
833
  writer.uint32(34).string(message.description);
844
834
  }
845
835
  if (message.uiConfig !== undefined) {
846
- writer.uint32(42).string(message.uiConfig);
836
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.uiConfig), writer.uint32(42).fork()).join();
847
837
  }
848
838
  if (message.nodeConfig !== undefined) {
849
- writer.uint32(50).string(message.nodeConfig);
839
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.nodeConfig), writer.uint32(50).fork()).join();
850
840
  }
851
841
  return writer;
852
842
  },
@@ -889,14 +879,14 @@ exports.UpdateNodeRequest = {
889
879
  if (tag !== 42) {
890
880
  break;
891
881
  }
892
- message.uiConfig = reader.string();
882
+ message.uiConfig = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
893
883
  continue;
894
884
  }
895
885
  case 6: {
896
886
  if (tag !== 50) {
897
887
  break;
898
888
  }
899
- message.nodeConfig = reader.string();
889
+ message.nodeConfig = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
900
890
  continue;
901
891
  }
902
892
  }
@@ -952,7 +942,7 @@ exports.DeleteNodeRequest = {
952
942
  },
953
943
  };
954
944
  function createBaseCreateEdgeRequest() {
955
- return { workflowId: "", userId: "", source: "", target: "", uiConfig: "" };
945
+ return { workflowId: "", userId: "", source: "", target: "" };
956
946
  }
957
947
  exports.CreateEdgeRequest = {
958
948
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -968,8 +958,8 @@ exports.CreateEdgeRequest = {
968
958
  if (message.target !== "") {
969
959
  writer.uint32(34).string(message.target);
970
960
  }
971
- if (message.uiConfig !== "") {
972
- writer.uint32(42).string(message.uiConfig);
961
+ if (message.uiConfig !== undefined) {
962
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.uiConfig), writer.uint32(42).fork()).join();
973
963
  }
974
964
  return writer;
975
965
  },
@@ -1012,7 +1002,7 @@ exports.CreateEdgeRequest = {
1012
1002
  if (tag !== 42) {
1013
1003
  break;
1014
1004
  }
1015
- message.uiConfig = reader.string();
1005
+ message.uiConfig = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
1016
1006
  continue;
1017
1007
  }
1018
1008
  }
@@ -1110,6 +1100,90 @@ exports.WorkflowsResponse = {
1110
1100
  return message;
1111
1101
  },
1112
1102
  };
1103
+ function createBaseSaveStructureRequest() {
1104
+ return { workflowId: "", userId: "", nodes: [], edges: [], deleteNodes: [], deleteEdges: [] };
1105
+ }
1106
+ exports.SaveStructureRequest = {
1107
+ encode(message, writer = new wire_1.BinaryWriter()) {
1108
+ if (message.workflowId !== "") {
1109
+ writer.uint32(10).string(message.workflowId);
1110
+ }
1111
+ if (message.userId !== "") {
1112
+ writer.uint32(18).string(message.userId);
1113
+ }
1114
+ for (const v of message.nodes) {
1115
+ exports.WorkflowNode.encode(v, writer.uint32(26).fork()).join();
1116
+ }
1117
+ for (const v of message.edges) {
1118
+ exports.WorkflowEdge.encode(v, writer.uint32(34).fork()).join();
1119
+ }
1120
+ for (const v of message.deleteNodes) {
1121
+ writer.uint32(42).string(v);
1122
+ }
1123
+ for (const v of message.deleteEdges) {
1124
+ writer.uint32(50).string(v);
1125
+ }
1126
+ return writer;
1127
+ },
1128
+ decode(input, length) {
1129
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1130
+ const end = length === undefined ? reader.len : reader.pos + length;
1131
+ const message = createBaseSaveStructureRequest();
1132
+ while (reader.pos < end) {
1133
+ const tag = reader.uint32();
1134
+ switch (tag >>> 3) {
1135
+ case 1: {
1136
+ if (tag !== 10) {
1137
+ break;
1138
+ }
1139
+ message.workflowId = reader.string();
1140
+ continue;
1141
+ }
1142
+ case 2: {
1143
+ if (tag !== 18) {
1144
+ break;
1145
+ }
1146
+ message.userId = reader.string();
1147
+ continue;
1148
+ }
1149
+ case 3: {
1150
+ if (tag !== 26) {
1151
+ break;
1152
+ }
1153
+ message.nodes.push(exports.WorkflowNode.decode(reader, reader.uint32()));
1154
+ continue;
1155
+ }
1156
+ case 4: {
1157
+ if (tag !== 34) {
1158
+ break;
1159
+ }
1160
+ message.edges.push(exports.WorkflowEdge.decode(reader, reader.uint32()));
1161
+ continue;
1162
+ }
1163
+ case 5: {
1164
+ if (tag !== 42) {
1165
+ break;
1166
+ }
1167
+ message.deleteNodes.push(reader.string());
1168
+ continue;
1169
+ }
1170
+ case 6: {
1171
+ if (tag !== 50) {
1172
+ break;
1173
+ }
1174
+ message.deleteEdges.push(reader.string());
1175
+ continue;
1176
+ }
1177
+ }
1178
+ if ((tag & 7) === 4 || tag === 0) {
1179
+ break;
1180
+ }
1181
+ reader.skip(tag & 7);
1182
+ }
1183
+ return message;
1184
+ },
1185
+ };
1186
+ protobufjs_1.wrappers[".google.protobuf.Struct"] = { fromObject: struct_interface_1.Struct.wrap, toObject: struct_interface_1.Struct.unwrap };
1113
1187
  function WorkflowServiceControllerMethods() {
1114
1188
  return function (constructor) {
1115
1189
  const grpcMethods = [
@@ -1123,6 +1197,7 @@ function WorkflowServiceControllerMethods() {
1123
1197
  "deleteNode",
1124
1198
  "createEdge",
1125
1199
  "deleteEdge",
1200
+ "saveStructure",
1126
1201
  ];
1127
1202
  for (const method of grpcMethods) {
1128
1203
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
@@ -1228,4 +1303,13 @@ exports.WorkflowServiceService = {
1228
1303
  responseSerialize: (value) => Buffer.from(empty_interface_1.Empty.encode(value).finish()),
1229
1304
  responseDeserialize: (value) => empty_interface_1.Empty.decode(value),
1230
1305
  },
1306
+ saveStructure: {
1307
+ path: "/workflow.WorkflowService/saveStructure",
1308
+ requestStream: false,
1309
+ responseStream: false,
1310
+ requestSerialize: (value) => Buffer.from(exports.SaveStructureRequest.encode(value).finish()),
1311
+ requestDeserialize: (value) => exports.SaveStructureRequest.decode(value),
1312
+ responseSerialize: (value) => Buffer.from(empty_interface_1.Empty.encode(value).finish()),
1313
+ responseDeserialize: (value) => empty_interface_1.Empty.decode(value),
1314
+ },
1231
1315
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geniebox-shared-lib",
3
- "version": "2.4.0",
3
+ "version": "2.4.2",
4
4
  "description": "Shared NestJS library with gRPC clients",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",