weave-typescript 0.51.3 → 0.52.0

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 (185) hide show
  1. package/dist/google/protobuf/duration.pb.d.ts +99 -0
  2. package/dist/google/protobuf/duration.pb.js +93 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +2 -1
  5. package/dist/weave/authz/v1/index.d.ts +1 -0
  6. package/dist/weave/authz/v1/index.js +38 -0
  7. package/dist/weave/authz/v1/options.pb.d.ts +52 -0
  8. package/dist/weave/authz/v1/options.pb.js +403 -0
  9. package/dist/weave/filter/v1/index.d.ts +1 -0
  10. package/dist/weave/filter/v1/index.js +38 -0
  11. package/dist/{weaveapi/atc/v1/message.pb.d.ts → weave/filter/v1/options.pb.d.ts} +33 -21
  12. package/dist/weave/filter/v1/options.pb.js +417 -0
  13. package/dist/weave/index.d.ts +2 -0
  14. package/dist/weave/index.js +39 -0
  15. package/dist/weaveapi/agent/v1/agent.pb.d.ts +137 -188
  16. package/dist/weaveapi/agent/v1/agent.pb.js +891 -2151
  17. package/dist/weaveapi/agent/v1/index.d.ts +1 -1
  18. package/dist/weaveapi/agent/v1/index.js +2 -2
  19. package/dist/weaveapi/agent/v1/run.pb.d.ts +289 -0
  20. package/dist/weaveapi/agent/v1/run.pb.js +2763 -0
  21. package/dist/weaveapi/auth/v1/auth.pb.d.ts +67 -14
  22. package/dist/weaveapi/auth/v1/auth.pb.js +829 -89
  23. package/dist/weaveapi/auth/v1/index.d.ts +4 -1
  24. package/dist/weaveapi/auth/v1/index.js +5 -2
  25. package/dist/weaveapi/auth/v1/{service.pb.d.ts → organization_admin.pb.d.ts} +39 -530
  26. package/dist/weaveapi/auth/v1/{service.pb.js → organization_admin.pb.js} +2978 -5812
  27. package/dist/weaveapi/auth/v1/personal_access_token.pb.d.ts +114 -0
  28. package/dist/weaveapi/auth/v1/personal_access_token.pb.js +750 -0
  29. package/dist/weaveapi/auth/v1/profile.pb.d.ts +161 -0
  30. package/dist/weaveapi/auth/v1/profile.pb.js +1007 -0
  31. package/dist/weaveapi/auth/v1/session.pb.d.ts +460 -0
  32. package/dist/weaveapi/auth/v1/session.pb.js +3544 -0
  33. package/dist/weaveapi/chat/v1/chat.pb.d.ts +377 -149
  34. package/dist/weaveapi/chat/v1/chat.pb.js +3492 -1614
  35. package/dist/weaveapi/chat/v1/index.d.ts +0 -1
  36. package/dist/weaveapi/chat/v1/index.js +1 -2
  37. package/dist/weaveapi/consolidation/v1/consolidation.pb.d.ts +95 -0
  38. package/dist/weaveapi/consolidation/v1/consolidation.pb.js +770 -1
  39. package/dist/weaveapi/consolidation/v1/index.d.ts +0 -1
  40. package/dist/weaveapi/consolidation/v1/index.js +1 -2
  41. package/dist/weaveapi/content/v1/content.pb.d.ts +63 -0
  42. package/dist/weaveapi/content/v1/content.pb.js +470 -0
  43. package/dist/weaveapi/content/v1/index.d.ts +1 -0
  44. package/dist/weaveapi/content/v1/index.js +38 -0
  45. package/dist/weaveapi/gateway/v1/gateway.pb.d.ts +247 -523
  46. package/dist/weaveapi/gateway/v1/gateway.pb.js +1648 -5783
  47. package/dist/weaveapi/gateway/v1/index.d.ts +0 -1
  48. package/dist/weaveapi/gateway/v1/index.js +1 -2
  49. package/dist/weaveapi/index.d.ts +5 -5
  50. package/dist/weaveapi/index.js +6 -6
  51. package/dist/weaveapi/inference/v1/generate.pb.d.ts +120 -0
  52. package/dist/weaveapi/inference/v1/generate.pb.js +1159 -0
  53. package/dist/weaveapi/inference/v1/index.d.ts +4 -0
  54. package/dist/weaveapi/{provider → inference}/v1/index.js +4 -2
  55. package/dist/weaveapi/{model → inference}/v1/model.pb.d.ts +52 -15
  56. package/dist/weaveapi/{model → inference}/v1/model.pb.js +529 -116
  57. package/dist/weaveapi/{model/v1/service.pb.d.ts → inference/v1/model_route.pb.d.ts} +182 -110
  58. package/dist/weaveapi/{model/v1/service.pb.js → inference/v1/model_route.pb.js} +2197 -1061
  59. package/dist/weaveapi/inference/v1/provider.pb.d.ts +264 -0
  60. package/dist/weaveapi/inference/v1/provider.pb.js +2590 -0
  61. package/dist/weaveapi/ingestion/v1/index.d.ts +0 -2
  62. package/dist/weaveapi/ingestion/v1/index.js +1 -3
  63. package/dist/weaveapi/ingestion/v1/ingestion.pb.d.ts +543 -0
  64. package/dist/weaveapi/ingestion/v1/ingestion.pb.js +5550 -16
  65. package/dist/weaveapi/initialization/v1/index.d.ts +1 -0
  66. package/dist/weaveapi/initialization/v1/index.js +38 -0
  67. package/dist/weaveapi/initialization/v1/initialization.pb.d.ts +99 -0
  68. package/dist/weaveapi/initialization/v1/initialization.pb.js +510 -0
  69. package/dist/weaveapi/organization/v1/index.d.ts +0 -1
  70. package/dist/weaveapi/organization/v1/index.js +1 -2
  71. package/dist/weaveapi/organization/v1/organization.pb.d.ts +241 -0
  72. package/dist/weaveapi/organization/v1/organization.pb.js +1838 -1
  73. package/dist/weaveapi/reporting/index.d.ts +1 -0
  74. package/dist/weaveapi/reporting/index.js +38 -0
  75. package/dist/weaveapi/{task → reporting}/v1/index.d.ts +1 -1
  76. package/dist/weaveapi/{model → reporting}/v1/index.js +2 -2
  77. package/dist/weaveapi/reporting/v1/service.pb.d.ts +38 -0
  78. package/dist/weaveapi/reporting/v1/service.pb.js +167 -0
  79. package/dist/weaveapi/reporting/v1/usage.pb.d.ts +150 -0
  80. package/dist/weaveapi/reporting/v1/usage.pb.js +1837 -0
  81. package/dist/weaveapi/retrieval/v1/index.d.ts +0 -1
  82. package/dist/weaveapi/retrieval/v1/index.js +1 -2
  83. package/dist/weaveapi/retrieval/v1/retrieval.pb.d.ts +96 -2
  84. package/dist/weaveapi/retrieval/v1/retrieval.pb.js +690 -10
  85. package/dist/weaveapi/tool/index.d.ts +1 -0
  86. package/dist/weaveapi/tool/index.js +38 -0
  87. package/dist/weaveapi/tool/v1/index.d.ts +1 -0
  88. package/dist/weaveapi/tool/v1/index.js +38 -0
  89. package/dist/weaveapi/tool/v1/tool.pb.d.ts +370 -0
  90. package/dist/weaveapi/tool/v1/tool.pb.js +2717 -0
  91. package/dist/weaveapi/workflow/v1/index.d.ts +1 -1
  92. package/dist/weaveapi/workflow/v1/index.js +2 -2
  93. package/dist/weaveapi/workflow/v1/run.pb.d.ts +244 -0
  94. package/dist/weaveapi/workflow/v1/run.pb.js +2084 -0
  95. package/dist/weaveapi/workflow/v1/workflow.pb.d.ts +122 -275
  96. package/dist/weaveapi/workflow/v1/workflow.pb.js +790 -3261
  97. package/dist/weavesql/weavedb/agent_sql.d.ts +173 -477
  98. package/dist/weavesql/weavedb/agent_sql.js +281 -758
  99. package/dist/weavesql/weavedb/authorization_outbox_sql.d.ts +261 -0
  100. package/dist/weavesql/weavedb/authorization_outbox_sql.js +445 -0
  101. package/dist/weavesql/weavedb/chat_sql.d.ts +103 -345
  102. package/dist/weavesql/weavedb/chat_sql.js +312 -597
  103. package/dist/weavesql/weavedb/document_consolidation_sql.d.ts +217 -0
  104. package/dist/weavesql/weavedb/document_consolidation_sql.js +486 -0
  105. package/dist/weavesql/weavedb/document_ingestion_sql.d.ts +1433 -0
  106. package/dist/weavesql/weavedb/document_ingestion_sql.js +3488 -0
  107. package/dist/weavesql/weavedb/document_retrieval_sql.d.ts +314 -0
  108. package/dist/weavesql/weavedb/document_retrieval_sql.js +965 -0
  109. package/dist/weavesql/weavedb/document_table_sql.d.ts +6 -6
  110. package/dist/weavesql/weavedb/document_table_sql.js +12 -12
  111. package/dist/weavesql/weavedb/identity_sql.d.ts +1014 -0
  112. package/dist/weavesql/weavedb/identity_sql.js +1811 -0
  113. package/dist/weavesql/weavedb/inference_model_route_sql.d.ts +161 -0
  114. package/dist/weavesql/weavedb/inference_model_route_sql.js +408 -0
  115. package/dist/weavesql/weavedb/inference_provider_sql.d.ts +125 -0
  116. package/dist/weavesql/weavedb/inference_provider_sql.js +228 -0
  117. package/dist/weavesql/weavedb/initialization_sql.d.ts +15 -0
  118. package/dist/weavesql/weavedb/initialization_sql.js +33 -0
  119. package/dist/weavesql/weavedb/model_catalog_sql.d.ts +6 -6
  120. package/dist/weavesql/weavedb/model_catalog_sql.js +6 -6
  121. package/dist/weavesql/weavedb/organization_sql.d.ts +22 -102
  122. package/dist/weavesql/weavedb/organization_sql.js +54 -262
  123. package/dist/weavesql/weavedb/tool_sql.d.ts +209 -0
  124. package/dist/weavesql/weavedb/tool_sql.js +407 -0
  125. package/dist/weavesql/weavedb/usage_sql.d.ts +356 -0
  126. package/dist/weavesql/weavedb/usage_sql.js +568 -0
  127. package/dist/weavesql/weavedb/workflow_sql.d.ts +159 -546
  128. package/dist/weavesql/weavedb/workflow_sql.js +281 -909
  129. package/package.json +1 -1
  130. package/dist/weaveapi/agent/v1/service.pb.d.ts +0 -397
  131. package/dist/weaveapi/agent/v1/service.pb.js +0 -3152
  132. package/dist/weaveapi/atc/v1/event.pb.d.ts +0 -134
  133. package/dist/weaveapi/atc/v1/event.pb.js +0 -1124
  134. package/dist/weaveapi/atc/v1/index.d.ts +0 -5
  135. package/dist/weaveapi/atc/v1/index.js +0 -42
  136. package/dist/weaveapi/atc/v1/message.pb.js +0 -287
  137. package/dist/weaveapi/atc/v1/process.pb.d.ts +0 -91
  138. package/dist/weaveapi/atc/v1/process.pb.js +0 -658
  139. package/dist/weaveapi/atc/v1/run.pb.d.ts +0 -71
  140. package/dist/weaveapi/atc/v1/run.pb.js +0 -525
  141. package/dist/weaveapi/atc/v1/service.pb.d.ts +0 -472
  142. package/dist/weaveapi/atc/v1/service.pb.js +0 -3093
  143. package/dist/weaveapi/chat/v1/service.pb.d.ts +0 -345
  144. package/dist/weaveapi/chat/v1/service.pb.js +0 -2545
  145. package/dist/weaveapi/consolidation/v1/service.pb.d.ts +0 -93
  146. package/dist/weaveapi/consolidation/v1/service.pb.js +0 -427
  147. package/dist/weaveapi/gateway/v1/service.pb.d.ts +0 -235
  148. package/dist/weaveapi/gateway/v1/service.pb.js +0 -651
  149. package/dist/weaveapi/ingestion/v1/service.pb.d.ts +0 -420
  150. package/dist/weaveapi/ingestion/v1/service.pb.js +0 -2311
  151. package/dist/weaveapi/ingestion/v1/table.pb.d.ts +0 -121
  152. package/dist/weaveapi/ingestion/v1/table.pb.js +0 -1478
  153. package/dist/weaveapi/model/v1/index.d.ts +0 -2
  154. package/dist/weaveapi/organization/v1/service.pb.d.ts +0 -261
  155. package/dist/weaveapi/organization/v1/service.pb.js +0 -1561
  156. package/dist/weaveapi/project/v1/index.d.ts +0 -2
  157. package/dist/weaveapi/project/v1/index.js +0 -39
  158. package/dist/weaveapi/project/v1/project.pb.d.ts +0 -105
  159. package/dist/weaveapi/project/v1/project.pb.js +0 -1004
  160. package/dist/weaveapi/project/v1/service.pb.d.ts +0 -247
  161. package/dist/weaveapi/project/v1/service.pb.js +0 -1994
  162. package/dist/weaveapi/provider/v1/index.d.ts +0 -2
  163. package/dist/weaveapi/provider/v1/provider.pb.d.ts +0 -137
  164. package/dist/weaveapi/provider/v1/provider.pb.js +0 -1000
  165. package/dist/weaveapi/provider/v1/service.pb.d.ts +0 -223
  166. package/dist/weaveapi/provider/v1/service.pb.js +0 -1888
  167. package/dist/weaveapi/retrieval/v1/service.pb.d.ts +0 -93
  168. package/dist/weaveapi/retrieval/v1/service.pb.js +0 -385
  169. package/dist/weaveapi/task/v1/index.js +0 -39
  170. package/dist/weaveapi/task/v1/service.pb.d.ts +0 -172
  171. package/dist/weaveapi/task/v1/service.pb.js +0 -1436
  172. package/dist/weaveapi/task/v1/task.pb.d.ts +0 -85
  173. package/dist/weaveapi/task/v1/task.pb.js +0 -802
  174. package/dist/weaveapi/workflow/v1/service.pb.d.ts +0 -392
  175. package/dist/weaveapi/workflow/v1/service.pb.js +0 -3146
  176. /package/dist/{weaveapi/atc → weave/authz}/index.d.ts +0 -0
  177. /package/dist/{weaveapi/atc → weave/authz}/index.js +0 -0
  178. /package/dist/{weaveapi/model → weave/filter}/index.d.ts +0 -0
  179. /package/dist/{weaveapi/model → weave/filter}/index.js +0 -0
  180. /package/dist/weaveapi/{project → content}/index.d.ts +0 -0
  181. /package/dist/weaveapi/{project → content}/index.js +0 -0
  182. /package/dist/weaveapi/{provider → inference}/index.d.ts +0 -0
  183. /package/dist/weaveapi/{provider → inference}/index.js +0 -0
  184. /package/dist/weaveapi/{task → initialization}/index.d.ts +0 -0
  185. /package/dist/weaveapi/{task → initialization}/index.js +0 -0
@@ -1,3146 +0,0 @@
1
- "use strict";
2
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
- // versions:
4
- // protoc-gen-ts_proto v2.11.8
5
- // protoc unknown
6
- // source: weaveapi/workflow/v1/service.proto
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.WorkflowServiceDefinition = exports.WorkflowServiceClientImpl = exports.WorkflowServiceServiceName = exports.WatchWorkflowRunEventsResponse = exports.WatchWorkflowRunEventsRequest = exports.ListWorkflowRunsResponse = exports.ListWorkflowRunsRequest = exports.GetWorkflowRunResponse = exports.GetWorkflowRunRequest = exports.RunWorkflowResponse = exports.RunWorkflowRequest = exports.ListWorkflowVersionsResponse = exports.ListWorkflowVersionsRequest = exports.GetWorkflowVersionResponse = exports.GetWorkflowVersionRequest = exports.PublishWorkflowDefinitionResponse = exports.PublishWorkflowDefinitionRequest = exports.PlanWorkflowPublishResponse = exports.PlanWorkflowPublishRequest = exports.WatchWorkflowDraftEventsResponse = exports.WatchWorkflowDraftEventsRequest = exports.UpdateWorkflowDraftResponse = exports.UpdateWorkflowDraftRequest = exports.ListWorkflowDefinitionsResponse = exports.ListWorkflowDefinitionsRequest = exports.GetWorkflowDefinitionResponse = exports.GetWorkflowDefinitionRequest = exports.CreateWorkflowDefinitionResponse = exports.CreateWorkflowDefinitionRequest = exports.protobufPackage = void 0;
9
- /* eslint-disable */
10
- const wire_1 = require("@bufbuild/protobuf/wire");
11
- const operators_1 = require("rxjs/operators");
12
- const struct_pb_1 = require("../../../google/protobuf/struct.pb");
13
- const workflow_pb_1 = require("./workflow.pb");
14
- exports.protobufPackage = "weaveapi.workflow.v1";
15
- function createBaseCreateWorkflowDefinitionRequest() {
16
- return {
17
- organizationId: "",
18
- slug: "",
19
- name: "",
20
- description: "",
21
- graph: undefined,
22
- inputSchema: undefined,
23
- outputSchema: undefined,
24
- metadata: undefined,
25
- };
26
- }
27
- exports.CreateWorkflowDefinitionRequest = {
28
- encode(message, writer = new wire_1.BinaryWriter()) {
29
- if (message.organizationId !== "") {
30
- writer.uint32(10).string(message.organizationId);
31
- }
32
- if (message.slug !== "") {
33
- writer.uint32(18).string(message.slug);
34
- }
35
- if (message.name !== "") {
36
- writer.uint32(26).string(message.name);
37
- }
38
- if (message.description !== "") {
39
- writer.uint32(34).string(message.description);
40
- }
41
- if (message.graph !== undefined) {
42
- workflow_pb_1.WorkflowGraph.encode(message.graph, writer.uint32(42).fork()).join();
43
- }
44
- if (message.inputSchema !== undefined) {
45
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.inputSchema), writer.uint32(50).fork()).join();
46
- }
47
- if (message.outputSchema !== undefined) {
48
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.outputSchema), writer.uint32(58).fork()).join();
49
- }
50
- if (message.metadata !== undefined) {
51
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.metadata), writer.uint32(66).fork()).join();
52
- }
53
- return writer;
54
- },
55
- decode(input, length) {
56
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
57
- const end = length === undefined ? reader.len : reader.pos + length;
58
- const message = createBaseCreateWorkflowDefinitionRequest();
59
- while (reader.pos < end) {
60
- const tag = reader.uint32();
61
- switch (tag >>> 3) {
62
- case 1: {
63
- if (tag !== 10) {
64
- break;
65
- }
66
- message.organizationId = reader.string();
67
- continue;
68
- }
69
- case 2: {
70
- if (tag !== 18) {
71
- break;
72
- }
73
- message.slug = reader.string();
74
- continue;
75
- }
76
- case 3: {
77
- if (tag !== 26) {
78
- break;
79
- }
80
- message.name = reader.string();
81
- continue;
82
- }
83
- case 4: {
84
- if (tag !== 34) {
85
- break;
86
- }
87
- message.description = reader.string();
88
- continue;
89
- }
90
- case 5: {
91
- if (tag !== 42) {
92
- break;
93
- }
94
- message.graph = workflow_pb_1.WorkflowGraph.decode(reader, reader.uint32());
95
- continue;
96
- }
97
- case 6: {
98
- if (tag !== 50) {
99
- break;
100
- }
101
- message.inputSchema = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
102
- continue;
103
- }
104
- case 7: {
105
- if (tag !== 58) {
106
- break;
107
- }
108
- message.outputSchema = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
109
- continue;
110
- }
111
- case 8: {
112
- if (tag !== 66) {
113
- break;
114
- }
115
- message.metadata = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
116
- continue;
117
- }
118
- }
119
- if ((tag & 7) === 4 || tag === 0) {
120
- break;
121
- }
122
- reader.skip(tag & 7);
123
- }
124
- return message;
125
- },
126
- fromJSON(object) {
127
- return {
128
- organizationId: isSet(object.organizationId)
129
- ? globalThis.String(object.organizationId)
130
- : isSet(object.organization_id)
131
- ? globalThis.String(object.organization_id)
132
- : "",
133
- slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
134
- name: isSet(object.name) ? globalThis.String(object.name) : "",
135
- description: isSet(object.description) ? globalThis.String(object.description) : "",
136
- graph: isSet(object.graph) ? workflow_pb_1.WorkflowGraph.fromJSON(object.graph) : undefined,
137
- inputSchema: isObject(object.inputSchema)
138
- ? object.inputSchema
139
- : isObject(object.input_schema)
140
- ? object.input_schema
141
- : undefined,
142
- outputSchema: isObject(object.outputSchema)
143
- ? object.outputSchema
144
- : isObject(object.output_schema)
145
- ? object.output_schema
146
- : undefined,
147
- metadata: isObject(object.metadata) ? object.metadata : undefined,
148
- };
149
- },
150
- toJSON(message) {
151
- const obj = {};
152
- if (message.organizationId !== "") {
153
- obj.organizationId = message.organizationId;
154
- }
155
- if (message.slug !== "") {
156
- obj.slug = message.slug;
157
- }
158
- if (message.name !== "") {
159
- obj.name = message.name;
160
- }
161
- if (message.description !== "") {
162
- obj.description = message.description;
163
- }
164
- if (message.graph !== undefined) {
165
- obj.graph = workflow_pb_1.WorkflowGraph.toJSON(message.graph);
166
- }
167
- if (message.inputSchema !== undefined) {
168
- obj.inputSchema = message.inputSchema;
169
- }
170
- if (message.outputSchema !== undefined) {
171
- obj.outputSchema = message.outputSchema;
172
- }
173
- if (message.metadata !== undefined) {
174
- obj.metadata = message.metadata;
175
- }
176
- return obj;
177
- },
178
- create(base) {
179
- return exports.CreateWorkflowDefinitionRequest.fromPartial(base !== null && base !== void 0 ? base : {});
180
- },
181
- fromPartial(object) {
182
- var _a, _b, _c, _d, _e, _f, _g;
183
- const message = createBaseCreateWorkflowDefinitionRequest();
184
- message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
185
- message.slug = (_b = object.slug) !== null && _b !== void 0 ? _b : "";
186
- message.name = (_c = object.name) !== null && _c !== void 0 ? _c : "";
187
- message.description = (_d = object.description) !== null && _d !== void 0 ? _d : "";
188
- message.graph = (object.graph !== undefined && object.graph !== null)
189
- ? workflow_pb_1.WorkflowGraph.fromPartial(object.graph)
190
- : undefined;
191
- message.inputSchema = (_e = object.inputSchema) !== null && _e !== void 0 ? _e : undefined;
192
- message.outputSchema = (_f = object.outputSchema) !== null && _f !== void 0 ? _f : undefined;
193
- message.metadata = (_g = object.metadata) !== null && _g !== void 0 ? _g : undefined;
194
- return message;
195
- },
196
- };
197
- function createBaseCreateWorkflowDefinitionResponse() {
198
- return { definition: undefined, draft: undefined };
199
- }
200
- exports.CreateWorkflowDefinitionResponse = {
201
- encode(message, writer = new wire_1.BinaryWriter()) {
202
- if (message.definition !== undefined) {
203
- workflow_pb_1.WorkflowDefinition.encode(message.definition, writer.uint32(10).fork()).join();
204
- }
205
- if (message.draft !== undefined) {
206
- workflow_pb_1.WorkflowDraft.encode(message.draft, writer.uint32(18).fork()).join();
207
- }
208
- return writer;
209
- },
210
- decode(input, length) {
211
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
212
- const end = length === undefined ? reader.len : reader.pos + length;
213
- const message = createBaseCreateWorkflowDefinitionResponse();
214
- while (reader.pos < end) {
215
- const tag = reader.uint32();
216
- switch (tag >>> 3) {
217
- case 1: {
218
- if (tag !== 10) {
219
- break;
220
- }
221
- message.definition = workflow_pb_1.WorkflowDefinition.decode(reader, reader.uint32());
222
- continue;
223
- }
224
- case 2: {
225
- if (tag !== 18) {
226
- break;
227
- }
228
- message.draft = workflow_pb_1.WorkflowDraft.decode(reader, reader.uint32());
229
- continue;
230
- }
231
- }
232
- if ((tag & 7) === 4 || tag === 0) {
233
- break;
234
- }
235
- reader.skip(tag & 7);
236
- }
237
- return message;
238
- },
239
- fromJSON(object) {
240
- return {
241
- definition: isSet(object.definition) ? workflow_pb_1.WorkflowDefinition.fromJSON(object.definition) : undefined,
242
- draft: isSet(object.draft) ? workflow_pb_1.WorkflowDraft.fromJSON(object.draft) : undefined,
243
- };
244
- },
245
- toJSON(message) {
246
- const obj = {};
247
- if (message.definition !== undefined) {
248
- obj.definition = workflow_pb_1.WorkflowDefinition.toJSON(message.definition);
249
- }
250
- if (message.draft !== undefined) {
251
- obj.draft = workflow_pb_1.WorkflowDraft.toJSON(message.draft);
252
- }
253
- return obj;
254
- },
255
- create(base) {
256
- return exports.CreateWorkflowDefinitionResponse.fromPartial(base !== null && base !== void 0 ? base : {});
257
- },
258
- fromPartial(object) {
259
- const message = createBaseCreateWorkflowDefinitionResponse();
260
- message.definition = (object.definition !== undefined && object.definition !== null)
261
- ? workflow_pb_1.WorkflowDefinition.fromPartial(object.definition)
262
- : undefined;
263
- message.draft = (object.draft !== undefined && object.draft !== null)
264
- ? workflow_pb_1.WorkflowDraft.fromPartial(object.draft)
265
- : undefined;
266
- return message;
267
- },
268
- };
269
- function createBaseGetWorkflowDefinitionRequest() {
270
- return { organizationId: "", workflowDefinitionId: "" };
271
- }
272
- exports.GetWorkflowDefinitionRequest = {
273
- encode(message, writer = new wire_1.BinaryWriter()) {
274
- if (message.organizationId !== "") {
275
- writer.uint32(10).string(message.organizationId);
276
- }
277
- if (message.workflowDefinitionId !== "") {
278
- writer.uint32(18).string(message.workflowDefinitionId);
279
- }
280
- return writer;
281
- },
282
- decode(input, length) {
283
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
284
- const end = length === undefined ? reader.len : reader.pos + length;
285
- const message = createBaseGetWorkflowDefinitionRequest();
286
- while (reader.pos < end) {
287
- const tag = reader.uint32();
288
- switch (tag >>> 3) {
289
- case 1: {
290
- if (tag !== 10) {
291
- break;
292
- }
293
- message.organizationId = reader.string();
294
- continue;
295
- }
296
- case 2: {
297
- if (tag !== 18) {
298
- break;
299
- }
300
- message.workflowDefinitionId = reader.string();
301
- continue;
302
- }
303
- }
304
- if ((tag & 7) === 4 || tag === 0) {
305
- break;
306
- }
307
- reader.skip(tag & 7);
308
- }
309
- return message;
310
- },
311
- fromJSON(object) {
312
- return {
313
- organizationId: isSet(object.organizationId)
314
- ? globalThis.String(object.organizationId)
315
- : isSet(object.organization_id)
316
- ? globalThis.String(object.organization_id)
317
- : "",
318
- workflowDefinitionId: isSet(object.workflowDefinitionId)
319
- ? globalThis.String(object.workflowDefinitionId)
320
- : isSet(object.workflow_definition_id)
321
- ? globalThis.String(object.workflow_definition_id)
322
- : "",
323
- };
324
- },
325
- toJSON(message) {
326
- const obj = {};
327
- if (message.organizationId !== "") {
328
- obj.organizationId = message.organizationId;
329
- }
330
- if (message.workflowDefinitionId !== "") {
331
- obj.workflowDefinitionId = message.workflowDefinitionId;
332
- }
333
- return obj;
334
- },
335
- create(base) {
336
- return exports.GetWorkflowDefinitionRequest.fromPartial(base !== null && base !== void 0 ? base : {});
337
- },
338
- fromPartial(object) {
339
- var _a, _b;
340
- const message = createBaseGetWorkflowDefinitionRequest();
341
- message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
342
- message.workflowDefinitionId = (_b = object.workflowDefinitionId) !== null && _b !== void 0 ? _b : "";
343
- return message;
344
- },
345
- };
346
- function createBaseGetWorkflowDefinitionResponse() {
347
- return { definition: undefined, draft: undefined, latestVersion: undefined };
348
- }
349
- exports.GetWorkflowDefinitionResponse = {
350
- encode(message, writer = new wire_1.BinaryWriter()) {
351
- if (message.definition !== undefined) {
352
- workflow_pb_1.WorkflowDefinition.encode(message.definition, writer.uint32(10).fork()).join();
353
- }
354
- if (message.draft !== undefined) {
355
- workflow_pb_1.WorkflowDraft.encode(message.draft, writer.uint32(18).fork()).join();
356
- }
357
- if (message.latestVersion !== undefined) {
358
- workflow_pb_1.WorkflowVersion.encode(message.latestVersion, writer.uint32(26).fork()).join();
359
- }
360
- return writer;
361
- },
362
- decode(input, length) {
363
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
364
- const end = length === undefined ? reader.len : reader.pos + length;
365
- const message = createBaseGetWorkflowDefinitionResponse();
366
- while (reader.pos < end) {
367
- const tag = reader.uint32();
368
- switch (tag >>> 3) {
369
- case 1: {
370
- if (tag !== 10) {
371
- break;
372
- }
373
- message.definition = workflow_pb_1.WorkflowDefinition.decode(reader, reader.uint32());
374
- continue;
375
- }
376
- case 2: {
377
- if (tag !== 18) {
378
- break;
379
- }
380
- message.draft = workflow_pb_1.WorkflowDraft.decode(reader, reader.uint32());
381
- continue;
382
- }
383
- case 3: {
384
- if (tag !== 26) {
385
- break;
386
- }
387
- message.latestVersion = workflow_pb_1.WorkflowVersion.decode(reader, reader.uint32());
388
- continue;
389
- }
390
- }
391
- if ((tag & 7) === 4 || tag === 0) {
392
- break;
393
- }
394
- reader.skip(tag & 7);
395
- }
396
- return message;
397
- },
398
- fromJSON(object) {
399
- return {
400
- definition: isSet(object.definition) ? workflow_pb_1.WorkflowDefinition.fromJSON(object.definition) : undefined,
401
- draft: isSet(object.draft) ? workflow_pb_1.WorkflowDraft.fromJSON(object.draft) : undefined,
402
- latestVersion: isSet(object.latestVersion)
403
- ? workflow_pb_1.WorkflowVersion.fromJSON(object.latestVersion)
404
- : isSet(object.latest_version)
405
- ? workflow_pb_1.WorkflowVersion.fromJSON(object.latest_version)
406
- : undefined,
407
- };
408
- },
409
- toJSON(message) {
410
- const obj = {};
411
- if (message.definition !== undefined) {
412
- obj.definition = workflow_pb_1.WorkflowDefinition.toJSON(message.definition);
413
- }
414
- if (message.draft !== undefined) {
415
- obj.draft = workflow_pb_1.WorkflowDraft.toJSON(message.draft);
416
- }
417
- if (message.latestVersion !== undefined) {
418
- obj.latestVersion = workflow_pb_1.WorkflowVersion.toJSON(message.latestVersion);
419
- }
420
- return obj;
421
- },
422
- create(base) {
423
- return exports.GetWorkflowDefinitionResponse.fromPartial(base !== null && base !== void 0 ? base : {});
424
- },
425
- fromPartial(object) {
426
- const message = createBaseGetWorkflowDefinitionResponse();
427
- message.definition = (object.definition !== undefined && object.definition !== null)
428
- ? workflow_pb_1.WorkflowDefinition.fromPartial(object.definition)
429
- : undefined;
430
- message.draft = (object.draft !== undefined && object.draft !== null)
431
- ? workflow_pb_1.WorkflowDraft.fromPartial(object.draft)
432
- : undefined;
433
- message.latestVersion = (object.latestVersion !== undefined && object.latestVersion !== null)
434
- ? workflow_pb_1.WorkflowVersion.fromPartial(object.latestVersion)
435
- : undefined;
436
- return message;
437
- },
438
- };
439
- function createBaseListWorkflowDefinitionsRequest() {
440
- return { organizationId: "", status: 0, pageSize: 0, pageToken: "" };
441
- }
442
- exports.ListWorkflowDefinitionsRequest = {
443
- encode(message, writer = new wire_1.BinaryWriter()) {
444
- if (message.organizationId !== "") {
445
- writer.uint32(10).string(message.organizationId);
446
- }
447
- if (message.status !== 0) {
448
- writer.uint32(16).int32(message.status);
449
- }
450
- if (message.pageSize !== 0) {
451
- writer.uint32(24).int32(message.pageSize);
452
- }
453
- if (message.pageToken !== "") {
454
- writer.uint32(34).string(message.pageToken);
455
- }
456
- return writer;
457
- },
458
- decode(input, length) {
459
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
460
- const end = length === undefined ? reader.len : reader.pos + length;
461
- const message = createBaseListWorkflowDefinitionsRequest();
462
- while (reader.pos < end) {
463
- const tag = reader.uint32();
464
- switch (tag >>> 3) {
465
- case 1: {
466
- if (tag !== 10) {
467
- break;
468
- }
469
- message.organizationId = reader.string();
470
- continue;
471
- }
472
- case 2: {
473
- if (tag !== 16) {
474
- break;
475
- }
476
- message.status = reader.int32();
477
- continue;
478
- }
479
- case 3: {
480
- if (tag !== 24) {
481
- break;
482
- }
483
- message.pageSize = reader.int32();
484
- continue;
485
- }
486
- case 4: {
487
- if (tag !== 34) {
488
- break;
489
- }
490
- message.pageToken = reader.string();
491
- continue;
492
- }
493
- }
494
- if ((tag & 7) === 4 || tag === 0) {
495
- break;
496
- }
497
- reader.skip(tag & 7);
498
- }
499
- return message;
500
- },
501
- fromJSON(object) {
502
- return {
503
- organizationId: isSet(object.organizationId)
504
- ? globalThis.String(object.organizationId)
505
- : isSet(object.organization_id)
506
- ? globalThis.String(object.organization_id)
507
- : "",
508
- status: isSet(object.status) ? (0, workflow_pb_1.workflowDefinitionStatusFromJSON)(object.status) : 0,
509
- pageSize: isSet(object.pageSize)
510
- ? globalThis.Number(object.pageSize)
511
- : isSet(object.page_size)
512
- ? globalThis.Number(object.page_size)
513
- : 0,
514
- pageToken: isSet(object.pageToken)
515
- ? globalThis.String(object.pageToken)
516
- : isSet(object.page_token)
517
- ? globalThis.String(object.page_token)
518
- : "",
519
- };
520
- },
521
- toJSON(message) {
522
- const obj = {};
523
- if (message.organizationId !== "") {
524
- obj.organizationId = message.organizationId;
525
- }
526
- if (message.status !== 0) {
527
- obj.status = (0, workflow_pb_1.workflowDefinitionStatusToJSON)(message.status);
528
- }
529
- if (message.pageSize !== 0) {
530
- obj.pageSize = Math.round(message.pageSize);
531
- }
532
- if (message.pageToken !== "") {
533
- obj.pageToken = message.pageToken;
534
- }
535
- return obj;
536
- },
537
- create(base) {
538
- return exports.ListWorkflowDefinitionsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
539
- },
540
- fromPartial(object) {
541
- var _a, _b, _c, _d;
542
- const message = createBaseListWorkflowDefinitionsRequest();
543
- message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
544
- message.status = (_b = object.status) !== null && _b !== void 0 ? _b : 0;
545
- message.pageSize = (_c = object.pageSize) !== null && _c !== void 0 ? _c : 0;
546
- message.pageToken = (_d = object.pageToken) !== null && _d !== void 0 ? _d : "";
547
- return message;
548
- },
549
- };
550
- function createBaseListWorkflowDefinitionsResponse() {
551
- return { definitions: [], nextPageToken: "" };
552
- }
553
- exports.ListWorkflowDefinitionsResponse = {
554
- encode(message, writer = new wire_1.BinaryWriter()) {
555
- for (const v of message.definitions) {
556
- workflow_pb_1.WorkflowDefinition.encode(v, writer.uint32(10).fork()).join();
557
- }
558
- if (message.nextPageToken !== "") {
559
- writer.uint32(18).string(message.nextPageToken);
560
- }
561
- return writer;
562
- },
563
- decode(input, length) {
564
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
565
- const end = length === undefined ? reader.len : reader.pos + length;
566
- const message = createBaseListWorkflowDefinitionsResponse();
567
- while (reader.pos < end) {
568
- const tag = reader.uint32();
569
- switch (tag >>> 3) {
570
- case 1: {
571
- if (tag !== 10) {
572
- break;
573
- }
574
- message.definitions.push(workflow_pb_1.WorkflowDefinition.decode(reader, reader.uint32()));
575
- continue;
576
- }
577
- case 2: {
578
- if (tag !== 18) {
579
- break;
580
- }
581
- message.nextPageToken = reader.string();
582
- continue;
583
- }
584
- }
585
- if ((tag & 7) === 4 || tag === 0) {
586
- break;
587
- }
588
- reader.skip(tag & 7);
589
- }
590
- return message;
591
- },
592
- fromJSON(object) {
593
- return {
594
- definitions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.definitions)
595
- ? object.definitions.map((e) => workflow_pb_1.WorkflowDefinition.fromJSON(e))
596
- : [],
597
- nextPageToken: isSet(object.nextPageToken)
598
- ? globalThis.String(object.nextPageToken)
599
- : isSet(object.next_page_token)
600
- ? globalThis.String(object.next_page_token)
601
- : "",
602
- };
603
- },
604
- toJSON(message) {
605
- var _a;
606
- const obj = {};
607
- if ((_a = message.definitions) === null || _a === void 0 ? void 0 : _a.length) {
608
- obj.definitions = message.definitions.map((e) => workflow_pb_1.WorkflowDefinition.toJSON(e));
609
- }
610
- if (message.nextPageToken !== "") {
611
- obj.nextPageToken = message.nextPageToken;
612
- }
613
- return obj;
614
- },
615
- create(base) {
616
- return exports.ListWorkflowDefinitionsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
617
- },
618
- fromPartial(object) {
619
- var _a;
620
- var _b;
621
- const message = createBaseListWorkflowDefinitionsResponse();
622
- message.definitions = ((_a = object.definitions) === null || _a === void 0 ? void 0 : _a.map((e) => workflow_pb_1.WorkflowDefinition.fromPartial(e))) || [];
623
- message.nextPageToken = (_b = object.nextPageToken) !== null && _b !== void 0 ? _b : "";
624
- return message;
625
- },
626
- };
627
- function createBaseUpdateWorkflowDraftRequest() {
628
- return {
629
- organizationId: "",
630
- workflowDefinitionId: "",
631
- expectedRevision: 0,
632
- name: "",
633
- description: "",
634
- graph: undefined,
635
- inputSchema: undefined,
636
- outputSchema: undefined,
637
- metadata: undefined,
638
- patch: undefined,
639
- source: "",
640
- clientRequestId: "",
641
- };
642
- }
643
- exports.UpdateWorkflowDraftRequest = {
644
- encode(message, writer = new wire_1.BinaryWriter()) {
645
- if (message.organizationId !== "") {
646
- writer.uint32(10).string(message.organizationId);
647
- }
648
- if (message.workflowDefinitionId !== "") {
649
- writer.uint32(18).string(message.workflowDefinitionId);
650
- }
651
- if (message.expectedRevision !== 0) {
652
- writer.uint32(24).int32(message.expectedRevision);
653
- }
654
- if (message.name !== "") {
655
- writer.uint32(34).string(message.name);
656
- }
657
- if (message.description !== "") {
658
- writer.uint32(42).string(message.description);
659
- }
660
- if (message.graph !== undefined) {
661
- workflow_pb_1.WorkflowGraph.encode(message.graph, writer.uint32(50).fork()).join();
662
- }
663
- if (message.inputSchema !== undefined) {
664
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.inputSchema), writer.uint32(58).fork()).join();
665
- }
666
- if (message.outputSchema !== undefined) {
667
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.outputSchema), writer.uint32(66).fork()).join();
668
- }
669
- if (message.metadata !== undefined) {
670
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.metadata), writer.uint32(74).fork()).join();
671
- }
672
- if (message.patch !== undefined) {
673
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.patch), writer.uint32(82).fork()).join();
674
- }
675
- if (message.source !== "") {
676
- writer.uint32(90).string(message.source);
677
- }
678
- if (message.clientRequestId !== "") {
679
- writer.uint32(98).string(message.clientRequestId);
680
- }
681
- return writer;
682
- },
683
- decode(input, length) {
684
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
685
- const end = length === undefined ? reader.len : reader.pos + length;
686
- const message = createBaseUpdateWorkflowDraftRequest();
687
- while (reader.pos < end) {
688
- const tag = reader.uint32();
689
- switch (tag >>> 3) {
690
- case 1: {
691
- if (tag !== 10) {
692
- break;
693
- }
694
- message.organizationId = reader.string();
695
- continue;
696
- }
697
- case 2: {
698
- if (tag !== 18) {
699
- break;
700
- }
701
- message.workflowDefinitionId = reader.string();
702
- continue;
703
- }
704
- case 3: {
705
- if (tag !== 24) {
706
- break;
707
- }
708
- message.expectedRevision = reader.int32();
709
- continue;
710
- }
711
- case 4: {
712
- if (tag !== 34) {
713
- break;
714
- }
715
- message.name = reader.string();
716
- continue;
717
- }
718
- case 5: {
719
- if (tag !== 42) {
720
- break;
721
- }
722
- message.description = reader.string();
723
- continue;
724
- }
725
- case 6: {
726
- if (tag !== 50) {
727
- break;
728
- }
729
- message.graph = workflow_pb_1.WorkflowGraph.decode(reader, reader.uint32());
730
- continue;
731
- }
732
- case 7: {
733
- if (tag !== 58) {
734
- break;
735
- }
736
- message.inputSchema = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
737
- continue;
738
- }
739
- case 8: {
740
- if (tag !== 66) {
741
- break;
742
- }
743
- message.outputSchema = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
744
- continue;
745
- }
746
- case 9: {
747
- if (tag !== 74) {
748
- break;
749
- }
750
- message.metadata = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
751
- continue;
752
- }
753
- case 10: {
754
- if (tag !== 82) {
755
- break;
756
- }
757
- message.patch = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
758
- continue;
759
- }
760
- case 11: {
761
- if (tag !== 90) {
762
- break;
763
- }
764
- message.source = reader.string();
765
- continue;
766
- }
767
- case 12: {
768
- if (tag !== 98) {
769
- break;
770
- }
771
- message.clientRequestId = reader.string();
772
- continue;
773
- }
774
- }
775
- if ((tag & 7) === 4 || tag === 0) {
776
- break;
777
- }
778
- reader.skip(tag & 7);
779
- }
780
- return message;
781
- },
782
- fromJSON(object) {
783
- return {
784
- organizationId: isSet(object.organizationId)
785
- ? globalThis.String(object.organizationId)
786
- : isSet(object.organization_id)
787
- ? globalThis.String(object.organization_id)
788
- : "",
789
- workflowDefinitionId: isSet(object.workflowDefinitionId)
790
- ? globalThis.String(object.workflowDefinitionId)
791
- : isSet(object.workflow_definition_id)
792
- ? globalThis.String(object.workflow_definition_id)
793
- : "",
794
- expectedRevision: isSet(object.expectedRevision)
795
- ? globalThis.Number(object.expectedRevision)
796
- : isSet(object.expected_revision)
797
- ? globalThis.Number(object.expected_revision)
798
- : 0,
799
- name: isSet(object.name) ? globalThis.String(object.name) : "",
800
- description: isSet(object.description) ? globalThis.String(object.description) : "",
801
- graph: isSet(object.graph) ? workflow_pb_1.WorkflowGraph.fromJSON(object.graph) : undefined,
802
- inputSchema: isObject(object.inputSchema)
803
- ? object.inputSchema
804
- : isObject(object.input_schema)
805
- ? object.input_schema
806
- : undefined,
807
- outputSchema: isObject(object.outputSchema)
808
- ? object.outputSchema
809
- : isObject(object.output_schema)
810
- ? object.output_schema
811
- : undefined,
812
- metadata: isObject(object.metadata) ? object.metadata : undefined,
813
- patch: isObject(object.patch) ? object.patch : undefined,
814
- source: isSet(object.source) ? globalThis.String(object.source) : "",
815
- clientRequestId: isSet(object.clientRequestId)
816
- ? globalThis.String(object.clientRequestId)
817
- : isSet(object.client_request_id)
818
- ? globalThis.String(object.client_request_id)
819
- : "",
820
- };
821
- },
822
- toJSON(message) {
823
- const obj = {};
824
- if (message.organizationId !== "") {
825
- obj.organizationId = message.organizationId;
826
- }
827
- if (message.workflowDefinitionId !== "") {
828
- obj.workflowDefinitionId = message.workflowDefinitionId;
829
- }
830
- if (message.expectedRevision !== 0) {
831
- obj.expectedRevision = Math.round(message.expectedRevision);
832
- }
833
- if (message.name !== "") {
834
- obj.name = message.name;
835
- }
836
- if (message.description !== "") {
837
- obj.description = message.description;
838
- }
839
- if (message.graph !== undefined) {
840
- obj.graph = workflow_pb_1.WorkflowGraph.toJSON(message.graph);
841
- }
842
- if (message.inputSchema !== undefined) {
843
- obj.inputSchema = message.inputSchema;
844
- }
845
- if (message.outputSchema !== undefined) {
846
- obj.outputSchema = message.outputSchema;
847
- }
848
- if (message.metadata !== undefined) {
849
- obj.metadata = message.metadata;
850
- }
851
- if (message.patch !== undefined) {
852
- obj.patch = message.patch;
853
- }
854
- if (message.source !== "") {
855
- obj.source = message.source;
856
- }
857
- if (message.clientRequestId !== "") {
858
- obj.clientRequestId = message.clientRequestId;
859
- }
860
- return obj;
861
- },
862
- create(base) {
863
- return exports.UpdateWorkflowDraftRequest.fromPartial(base !== null && base !== void 0 ? base : {});
864
- },
865
- fromPartial(object) {
866
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
867
- const message = createBaseUpdateWorkflowDraftRequest();
868
- message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
869
- message.workflowDefinitionId = (_b = object.workflowDefinitionId) !== null && _b !== void 0 ? _b : "";
870
- message.expectedRevision = (_c = object.expectedRevision) !== null && _c !== void 0 ? _c : 0;
871
- message.name = (_d = object.name) !== null && _d !== void 0 ? _d : "";
872
- message.description = (_e = object.description) !== null && _e !== void 0 ? _e : "";
873
- message.graph = (object.graph !== undefined && object.graph !== null)
874
- ? workflow_pb_1.WorkflowGraph.fromPartial(object.graph)
875
- : undefined;
876
- message.inputSchema = (_f = object.inputSchema) !== null && _f !== void 0 ? _f : undefined;
877
- message.outputSchema = (_g = object.outputSchema) !== null && _g !== void 0 ? _g : undefined;
878
- message.metadata = (_h = object.metadata) !== null && _h !== void 0 ? _h : undefined;
879
- message.patch = (_j = object.patch) !== null && _j !== void 0 ? _j : undefined;
880
- message.source = (_k = object.source) !== null && _k !== void 0 ? _k : "";
881
- message.clientRequestId = (_l = object.clientRequestId) !== null && _l !== void 0 ? _l : "";
882
- return message;
883
- },
884
- };
885
- function createBaseUpdateWorkflowDraftResponse() {
886
- return { draft: undefined };
887
- }
888
- exports.UpdateWorkflowDraftResponse = {
889
- encode(message, writer = new wire_1.BinaryWriter()) {
890
- if (message.draft !== undefined) {
891
- workflow_pb_1.WorkflowDraft.encode(message.draft, writer.uint32(10).fork()).join();
892
- }
893
- return writer;
894
- },
895
- decode(input, length) {
896
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
897
- const end = length === undefined ? reader.len : reader.pos + length;
898
- const message = createBaseUpdateWorkflowDraftResponse();
899
- while (reader.pos < end) {
900
- const tag = reader.uint32();
901
- switch (tag >>> 3) {
902
- case 1: {
903
- if (tag !== 10) {
904
- break;
905
- }
906
- message.draft = workflow_pb_1.WorkflowDraft.decode(reader, reader.uint32());
907
- continue;
908
- }
909
- }
910
- if ((tag & 7) === 4 || tag === 0) {
911
- break;
912
- }
913
- reader.skip(tag & 7);
914
- }
915
- return message;
916
- },
917
- fromJSON(object) {
918
- return { draft: isSet(object.draft) ? workflow_pb_1.WorkflowDraft.fromJSON(object.draft) : undefined };
919
- },
920
- toJSON(message) {
921
- const obj = {};
922
- if (message.draft !== undefined) {
923
- obj.draft = workflow_pb_1.WorkflowDraft.toJSON(message.draft);
924
- }
925
- return obj;
926
- },
927
- create(base) {
928
- return exports.UpdateWorkflowDraftResponse.fromPartial(base !== null && base !== void 0 ? base : {});
929
- },
930
- fromPartial(object) {
931
- const message = createBaseUpdateWorkflowDraftResponse();
932
- message.draft = (object.draft !== undefined && object.draft !== null)
933
- ? workflow_pb_1.WorkflowDraft.fromPartial(object.draft)
934
- : undefined;
935
- return message;
936
- },
937
- };
938
- function createBaseWatchWorkflowDraftEventsRequest() {
939
- return { organizationId: "", workflowDefinitionId: "", afterSequence: 0 };
940
- }
941
- exports.WatchWorkflowDraftEventsRequest = {
942
- encode(message, writer = new wire_1.BinaryWriter()) {
943
- if (message.organizationId !== "") {
944
- writer.uint32(10).string(message.organizationId);
945
- }
946
- if (message.workflowDefinitionId !== "") {
947
- writer.uint32(18).string(message.workflowDefinitionId);
948
- }
949
- if (message.afterSequence !== 0) {
950
- writer.uint32(24).uint64(message.afterSequence);
951
- }
952
- return writer;
953
- },
954
- decode(input, length) {
955
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
956
- const end = length === undefined ? reader.len : reader.pos + length;
957
- const message = createBaseWatchWorkflowDraftEventsRequest();
958
- while (reader.pos < end) {
959
- const tag = reader.uint32();
960
- switch (tag >>> 3) {
961
- case 1: {
962
- if (tag !== 10) {
963
- break;
964
- }
965
- message.organizationId = reader.string();
966
- continue;
967
- }
968
- case 2: {
969
- if (tag !== 18) {
970
- break;
971
- }
972
- message.workflowDefinitionId = reader.string();
973
- continue;
974
- }
975
- case 3: {
976
- if (tag !== 24) {
977
- break;
978
- }
979
- message.afterSequence = longToNumber(reader.uint64());
980
- continue;
981
- }
982
- }
983
- if ((tag & 7) === 4 || tag === 0) {
984
- break;
985
- }
986
- reader.skip(tag & 7);
987
- }
988
- return message;
989
- },
990
- fromJSON(object) {
991
- return {
992
- organizationId: isSet(object.organizationId)
993
- ? globalThis.String(object.organizationId)
994
- : isSet(object.organization_id)
995
- ? globalThis.String(object.organization_id)
996
- : "",
997
- workflowDefinitionId: isSet(object.workflowDefinitionId)
998
- ? globalThis.String(object.workflowDefinitionId)
999
- : isSet(object.workflow_definition_id)
1000
- ? globalThis.String(object.workflow_definition_id)
1001
- : "",
1002
- afterSequence: isSet(object.afterSequence)
1003
- ? globalThis.Number(object.afterSequence)
1004
- : isSet(object.after_sequence)
1005
- ? globalThis.Number(object.after_sequence)
1006
- : 0,
1007
- };
1008
- },
1009
- toJSON(message) {
1010
- const obj = {};
1011
- if (message.organizationId !== "") {
1012
- obj.organizationId = message.organizationId;
1013
- }
1014
- if (message.workflowDefinitionId !== "") {
1015
- obj.workflowDefinitionId = message.workflowDefinitionId;
1016
- }
1017
- if (message.afterSequence !== 0) {
1018
- obj.afterSequence = Math.round(message.afterSequence);
1019
- }
1020
- return obj;
1021
- },
1022
- create(base) {
1023
- return exports.WatchWorkflowDraftEventsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1024
- },
1025
- fromPartial(object) {
1026
- var _a, _b, _c;
1027
- const message = createBaseWatchWorkflowDraftEventsRequest();
1028
- message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
1029
- message.workflowDefinitionId = (_b = object.workflowDefinitionId) !== null && _b !== void 0 ? _b : "";
1030
- message.afterSequence = (_c = object.afterSequence) !== null && _c !== void 0 ? _c : 0;
1031
- return message;
1032
- },
1033
- };
1034
- function createBaseWatchWorkflowDraftEventsResponse() {
1035
- return { event: undefined };
1036
- }
1037
- exports.WatchWorkflowDraftEventsResponse = {
1038
- encode(message, writer = new wire_1.BinaryWriter()) {
1039
- if (message.event !== undefined) {
1040
- workflow_pb_1.WorkflowDraftEvent.encode(message.event, writer.uint32(10).fork()).join();
1041
- }
1042
- return writer;
1043
- },
1044
- decode(input, length) {
1045
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1046
- const end = length === undefined ? reader.len : reader.pos + length;
1047
- const message = createBaseWatchWorkflowDraftEventsResponse();
1048
- while (reader.pos < end) {
1049
- const tag = reader.uint32();
1050
- switch (tag >>> 3) {
1051
- case 1: {
1052
- if (tag !== 10) {
1053
- break;
1054
- }
1055
- message.event = workflow_pb_1.WorkflowDraftEvent.decode(reader, reader.uint32());
1056
- continue;
1057
- }
1058
- }
1059
- if ((tag & 7) === 4 || tag === 0) {
1060
- break;
1061
- }
1062
- reader.skip(tag & 7);
1063
- }
1064
- return message;
1065
- },
1066
- fromJSON(object) {
1067
- return { event: isSet(object.event) ? workflow_pb_1.WorkflowDraftEvent.fromJSON(object.event) : undefined };
1068
- },
1069
- toJSON(message) {
1070
- const obj = {};
1071
- if (message.event !== undefined) {
1072
- obj.event = workflow_pb_1.WorkflowDraftEvent.toJSON(message.event);
1073
- }
1074
- return obj;
1075
- },
1076
- create(base) {
1077
- return exports.WatchWorkflowDraftEventsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1078
- },
1079
- fromPartial(object) {
1080
- const message = createBaseWatchWorkflowDraftEventsResponse();
1081
- message.event = (object.event !== undefined && object.event !== null)
1082
- ? workflow_pb_1.WorkflowDraftEvent.fromPartial(object.event)
1083
- : undefined;
1084
- return message;
1085
- },
1086
- };
1087
- function createBasePlanWorkflowPublishRequest() {
1088
- return { organizationId: "", workflowDefinitionId: "", draftRevision: 0 };
1089
- }
1090
- exports.PlanWorkflowPublishRequest = {
1091
- encode(message, writer = new wire_1.BinaryWriter()) {
1092
- if (message.organizationId !== "") {
1093
- writer.uint32(10).string(message.organizationId);
1094
- }
1095
- if (message.workflowDefinitionId !== "") {
1096
- writer.uint32(18).string(message.workflowDefinitionId);
1097
- }
1098
- if (message.draftRevision !== 0) {
1099
- writer.uint32(24).int32(message.draftRevision);
1100
- }
1101
- return writer;
1102
- },
1103
- decode(input, length) {
1104
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1105
- const end = length === undefined ? reader.len : reader.pos + length;
1106
- const message = createBasePlanWorkflowPublishRequest();
1107
- while (reader.pos < end) {
1108
- const tag = reader.uint32();
1109
- switch (tag >>> 3) {
1110
- case 1: {
1111
- if (tag !== 10) {
1112
- break;
1113
- }
1114
- message.organizationId = reader.string();
1115
- continue;
1116
- }
1117
- case 2: {
1118
- if (tag !== 18) {
1119
- break;
1120
- }
1121
- message.workflowDefinitionId = reader.string();
1122
- continue;
1123
- }
1124
- case 3: {
1125
- if (tag !== 24) {
1126
- break;
1127
- }
1128
- message.draftRevision = reader.int32();
1129
- continue;
1130
- }
1131
- }
1132
- if ((tag & 7) === 4 || tag === 0) {
1133
- break;
1134
- }
1135
- reader.skip(tag & 7);
1136
- }
1137
- return message;
1138
- },
1139
- fromJSON(object) {
1140
- return {
1141
- organizationId: isSet(object.organizationId)
1142
- ? globalThis.String(object.organizationId)
1143
- : isSet(object.organization_id)
1144
- ? globalThis.String(object.organization_id)
1145
- : "",
1146
- workflowDefinitionId: isSet(object.workflowDefinitionId)
1147
- ? globalThis.String(object.workflowDefinitionId)
1148
- : isSet(object.workflow_definition_id)
1149
- ? globalThis.String(object.workflow_definition_id)
1150
- : "",
1151
- draftRevision: isSet(object.draftRevision)
1152
- ? globalThis.Number(object.draftRevision)
1153
- : isSet(object.draft_revision)
1154
- ? globalThis.Number(object.draft_revision)
1155
- : 0,
1156
- };
1157
- },
1158
- toJSON(message) {
1159
- const obj = {};
1160
- if (message.organizationId !== "") {
1161
- obj.organizationId = message.organizationId;
1162
- }
1163
- if (message.workflowDefinitionId !== "") {
1164
- obj.workflowDefinitionId = message.workflowDefinitionId;
1165
- }
1166
- if (message.draftRevision !== 0) {
1167
- obj.draftRevision = Math.round(message.draftRevision);
1168
- }
1169
- return obj;
1170
- },
1171
- create(base) {
1172
- return exports.PlanWorkflowPublishRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1173
- },
1174
- fromPartial(object) {
1175
- var _a, _b, _c;
1176
- const message = createBasePlanWorkflowPublishRequest();
1177
- message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
1178
- message.workflowDefinitionId = (_b = object.workflowDefinitionId) !== null && _b !== void 0 ? _b : "";
1179
- message.draftRevision = (_c = object.draftRevision) !== null && _c !== void 0 ? _c : 0;
1180
- return message;
1181
- },
1182
- };
1183
- function createBasePlanWorkflowPublishResponse() {
1184
- return { plan: undefined };
1185
- }
1186
- exports.PlanWorkflowPublishResponse = {
1187
- encode(message, writer = new wire_1.BinaryWriter()) {
1188
- if (message.plan !== undefined) {
1189
- workflow_pb_1.WorkflowPublishPlan.encode(message.plan, writer.uint32(10).fork()).join();
1190
- }
1191
- return writer;
1192
- },
1193
- decode(input, length) {
1194
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1195
- const end = length === undefined ? reader.len : reader.pos + length;
1196
- const message = createBasePlanWorkflowPublishResponse();
1197
- while (reader.pos < end) {
1198
- const tag = reader.uint32();
1199
- switch (tag >>> 3) {
1200
- case 1: {
1201
- if (tag !== 10) {
1202
- break;
1203
- }
1204
- message.plan = workflow_pb_1.WorkflowPublishPlan.decode(reader, reader.uint32());
1205
- continue;
1206
- }
1207
- }
1208
- if ((tag & 7) === 4 || tag === 0) {
1209
- break;
1210
- }
1211
- reader.skip(tag & 7);
1212
- }
1213
- return message;
1214
- },
1215
- fromJSON(object) {
1216
- return { plan: isSet(object.plan) ? workflow_pb_1.WorkflowPublishPlan.fromJSON(object.plan) : undefined };
1217
- },
1218
- toJSON(message) {
1219
- const obj = {};
1220
- if (message.plan !== undefined) {
1221
- obj.plan = workflow_pb_1.WorkflowPublishPlan.toJSON(message.plan);
1222
- }
1223
- return obj;
1224
- },
1225
- create(base) {
1226
- return exports.PlanWorkflowPublishResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1227
- },
1228
- fromPartial(object) {
1229
- const message = createBasePlanWorkflowPublishResponse();
1230
- message.plan = (object.plan !== undefined && object.plan !== null)
1231
- ? workflow_pb_1.WorkflowPublishPlan.fromPartial(object.plan)
1232
- : undefined;
1233
- return message;
1234
- },
1235
- };
1236
- function createBasePublishWorkflowDefinitionRequest() {
1237
- return { organizationId: "", workflowDefinitionId: "", draftRevision: 0 };
1238
- }
1239
- exports.PublishWorkflowDefinitionRequest = {
1240
- encode(message, writer = new wire_1.BinaryWriter()) {
1241
- if (message.organizationId !== "") {
1242
- writer.uint32(10).string(message.organizationId);
1243
- }
1244
- if (message.workflowDefinitionId !== "") {
1245
- writer.uint32(18).string(message.workflowDefinitionId);
1246
- }
1247
- if (message.draftRevision !== 0) {
1248
- writer.uint32(24).int32(message.draftRevision);
1249
- }
1250
- return writer;
1251
- },
1252
- decode(input, length) {
1253
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1254
- const end = length === undefined ? reader.len : reader.pos + length;
1255
- const message = createBasePublishWorkflowDefinitionRequest();
1256
- while (reader.pos < end) {
1257
- const tag = reader.uint32();
1258
- switch (tag >>> 3) {
1259
- case 1: {
1260
- if (tag !== 10) {
1261
- break;
1262
- }
1263
- message.organizationId = reader.string();
1264
- continue;
1265
- }
1266
- case 2: {
1267
- if (tag !== 18) {
1268
- break;
1269
- }
1270
- message.workflowDefinitionId = reader.string();
1271
- continue;
1272
- }
1273
- case 3: {
1274
- if (tag !== 24) {
1275
- break;
1276
- }
1277
- message.draftRevision = reader.int32();
1278
- continue;
1279
- }
1280
- }
1281
- if ((tag & 7) === 4 || tag === 0) {
1282
- break;
1283
- }
1284
- reader.skip(tag & 7);
1285
- }
1286
- return message;
1287
- },
1288
- fromJSON(object) {
1289
- return {
1290
- organizationId: isSet(object.organizationId)
1291
- ? globalThis.String(object.organizationId)
1292
- : isSet(object.organization_id)
1293
- ? globalThis.String(object.organization_id)
1294
- : "",
1295
- workflowDefinitionId: isSet(object.workflowDefinitionId)
1296
- ? globalThis.String(object.workflowDefinitionId)
1297
- : isSet(object.workflow_definition_id)
1298
- ? globalThis.String(object.workflow_definition_id)
1299
- : "",
1300
- draftRevision: isSet(object.draftRevision)
1301
- ? globalThis.Number(object.draftRevision)
1302
- : isSet(object.draft_revision)
1303
- ? globalThis.Number(object.draft_revision)
1304
- : 0,
1305
- };
1306
- },
1307
- toJSON(message) {
1308
- const obj = {};
1309
- if (message.organizationId !== "") {
1310
- obj.organizationId = message.organizationId;
1311
- }
1312
- if (message.workflowDefinitionId !== "") {
1313
- obj.workflowDefinitionId = message.workflowDefinitionId;
1314
- }
1315
- if (message.draftRevision !== 0) {
1316
- obj.draftRevision = Math.round(message.draftRevision);
1317
- }
1318
- return obj;
1319
- },
1320
- create(base) {
1321
- return exports.PublishWorkflowDefinitionRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1322
- },
1323
- fromPartial(object) {
1324
- var _a, _b, _c;
1325
- const message = createBasePublishWorkflowDefinitionRequest();
1326
- message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
1327
- message.workflowDefinitionId = (_b = object.workflowDefinitionId) !== null && _b !== void 0 ? _b : "";
1328
- message.draftRevision = (_c = object.draftRevision) !== null && _c !== void 0 ? _c : 0;
1329
- return message;
1330
- },
1331
- };
1332
- function createBasePublishWorkflowDefinitionResponse() {
1333
- return { version: undefined };
1334
- }
1335
- exports.PublishWorkflowDefinitionResponse = {
1336
- encode(message, writer = new wire_1.BinaryWriter()) {
1337
- if (message.version !== undefined) {
1338
- workflow_pb_1.WorkflowVersion.encode(message.version, writer.uint32(10).fork()).join();
1339
- }
1340
- return writer;
1341
- },
1342
- decode(input, length) {
1343
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1344
- const end = length === undefined ? reader.len : reader.pos + length;
1345
- const message = createBasePublishWorkflowDefinitionResponse();
1346
- while (reader.pos < end) {
1347
- const tag = reader.uint32();
1348
- switch (tag >>> 3) {
1349
- case 1: {
1350
- if (tag !== 10) {
1351
- break;
1352
- }
1353
- message.version = workflow_pb_1.WorkflowVersion.decode(reader, reader.uint32());
1354
- continue;
1355
- }
1356
- }
1357
- if ((tag & 7) === 4 || tag === 0) {
1358
- break;
1359
- }
1360
- reader.skip(tag & 7);
1361
- }
1362
- return message;
1363
- },
1364
- fromJSON(object) {
1365
- return { version: isSet(object.version) ? workflow_pb_1.WorkflowVersion.fromJSON(object.version) : undefined };
1366
- },
1367
- toJSON(message) {
1368
- const obj = {};
1369
- if (message.version !== undefined) {
1370
- obj.version = workflow_pb_1.WorkflowVersion.toJSON(message.version);
1371
- }
1372
- return obj;
1373
- },
1374
- create(base) {
1375
- return exports.PublishWorkflowDefinitionResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1376
- },
1377
- fromPartial(object) {
1378
- const message = createBasePublishWorkflowDefinitionResponse();
1379
- message.version = (object.version !== undefined && object.version !== null)
1380
- ? workflow_pb_1.WorkflowVersion.fromPartial(object.version)
1381
- : undefined;
1382
- return message;
1383
- },
1384
- };
1385
- function createBaseGetWorkflowVersionRequest() {
1386
- return { organizationId: "", workflowDefinitionId: "", version: 0 };
1387
- }
1388
- exports.GetWorkflowVersionRequest = {
1389
- encode(message, writer = new wire_1.BinaryWriter()) {
1390
- if (message.organizationId !== "") {
1391
- writer.uint32(10).string(message.organizationId);
1392
- }
1393
- if (message.workflowDefinitionId !== "") {
1394
- writer.uint32(18).string(message.workflowDefinitionId);
1395
- }
1396
- if (message.version !== 0) {
1397
- writer.uint32(24).int32(message.version);
1398
- }
1399
- return writer;
1400
- },
1401
- decode(input, length) {
1402
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1403
- const end = length === undefined ? reader.len : reader.pos + length;
1404
- const message = createBaseGetWorkflowVersionRequest();
1405
- while (reader.pos < end) {
1406
- const tag = reader.uint32();
1407
- switch (tag >>> 3) {
1408
- case 1: {
1409
- if (tag !== 10) {
1410
- break;
1411
- }
1412
- message.organizationId = reader.string();
1413
- continue;
1414
- }
1415
- case 2: {
1416
- if (tag !== 18) {
1417
- break;
1418
- }
1419
- message.workflowDefinitionId = reader.string();
1420
- continue;
1421
- }
1422
- case 3: {
1423
- if (tag !== 24) {
1424
- break;
1425
- }
1426
- message.version = reader.int32();
1427
- continue;
1428
- }
1429
- }
1430
- if ((tag & 7) === 4 || tag === 0) {
1431
- break;
1432
- }
1433
- reader.skip(tag & 7);
1434
- }
1435
- return message;
1436
- },
1437
- fromJSON(object) {
1438
- return {
1439
- organizationId: isSet(object.organizationId)
1440
- ? globalThis.String(object.organizationId)
1441
- : isSet(object.organization_id)
1442
- ? globalThis.String(object.organization_id)
1443
- : "",
1444
- workflowDefinitionId: isSet(object.workflowDefinitionId)
1445
- ? globalThis.String(object.workflowDefinitionId)
1446
- : isSet(object.workflow_definition_id)
1447
- ? globalThis.String(object.workflow_definition_id)
1448
- : "",
1449
- version: isSet(object.version) ? globalThis.Number(object.version) : 0,
1450
- };
1451
- },
1452
- toJSON(message) {
1453
- const obj = {};
1454
- if (message.organizationId !== "") {
1455
- obj.organizationId = message.organizationId;
1456
- }
1457
- if (message.workflowDefinitionId !== "") {
1458
- obj.workflowDefinitionId = message.workflowDefinitionId;
1459
- }
1460
- if (message.version !== 0) {
1461
- obj.version = Math.round(message.version);
1462
- }
1463
- return obj;
1464
- },
1465
- create(base) {
1466
- return exports.GetWorkflowVersionRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1467
- },
1468
- fromPartial(object) {
1469
- var _a, _b, _c;
1470
- const message = createBaseGetWorkflowVersionRequest();
1471
- message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
1472
- message.workflowDefinitionId = (_b = object.workflowDefinitionId) !== null && _b !== void 0 ? _b : "";
1473
- message.version = (_c = object.version) !== null && _c !== void 0 ? _c : 0;
1474
- return message;
1475
- },
1476
- };
1477
- function createBaseGetWorkflowVersionResponse() {
1478
- return { version: undefined };
1479
- }
1480
- exports.GetWorkflowVersionResponse = {
1481
- encode(message, writer = new wire_1.BinaryWriter()) {
1482
- if (message.version !== undefined) {
1483
- workflow_pb_1.WorkflowVersion.encode(message.version, writer.uint32(10).fork()).join();
1484
- }
1485
- return writer;
1486
- },
1487
- decode(input, length) {
1488
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1489
- const end = length === undefined ? reader.len : reader.pos + length;
1490
- const message = createBaseGetWorkflowVersionResponse();
1491
- while (reader.pos < end) {
1492
- const tag = reader.uint32();
1493
- switch (tag >>> 3) {
1494
- case 1: {
1495
- if (tag !== 10) {
1496
- break;
1497
- }
1498
- message.version = workflow_pb_1.WorkflowVersion.decode(reader, reader.uint32());
1499
- continue;
1500
- }
1501
- }
1502
- if ((tag & 7) === 4 || tag === 0) {
1503
- break;
1504
- }
1505
- reader.skip(tag & 7);
1506
- }
1507
- return message;
1508
- },
1509
- fromJSON(object) {
1510
- return { version: isSet(object.version) ? workflow_pb_1.WorkflowVersion.fromJSON(object.version) : undefined };
1511
- },
1512
- toJSON(message) {
1513
- const obj = {};
1514
- if (message.version !== undefined) {
1515
- obj.version = workflow_pb_1.WorkflowVersion.toJSON(message.version);
1516
- }
1517
- return obj;
1518
- },
1519
- create(base) {
1520
- return exports.GetWorkflowVersionResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1521
- },
1522
- fromPartial(object) {
1523
- const message = createBaseGetWorkflowVersionResponse();
1524
- message.version = (object.version !== undefined && object.version !== null)
1525
- ? workflow_pb_1.WorkflowVersion.fromPartial(object.version)
1526
- : undefined;
1527
- return message;
1528
- },
1529
- };
1530
- function createBaseListWorkflowVersionsRequest() {
1531
- return { organizationId: "", workflowDefinitionId: "", pageSize: 0, pageToken: "" };
1532
- }
1533
- exports.ListWorkflowVersionsRequest = {
1534
- encode(message, writer = new wire_1.BinaryWriter()) {
1535
- if (message.organizationId !== "") {
1536
- writer.uint32(10).string(message.organizationId);
1537
- }
1538
- if (message.workflowDefinitionId !== "") {
1539
- writer.uint32(18).string(message.workflowDefinitionId);
1540
- }
1541
- if (message.pageSize !== 0) {
1542
- writer.uint32(24).int32(message.pageSize);
1543
- }
1544
- if (message.pageToken !== "") {
1545
- writer.uint32(34).string(message.pageToken);
1546
- }
1547
- return writer;
1548
- },
1549
- decode(input, length) {
1550
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1551
- const end = length === undefined ? reader.len : reader.pos + length;
1552
- const message = createBaseListWorkflowVersionsRequest();
1553
- while (reader.pos < end) {
1554
- const tag = reader.uint32();
1555
- switch (tag >>> 3) {
1556
- case 1: {
1557
- if (tag !== 10) {
1558
- break;
1559
- }
1560
- message.organizationId = reader.string();
1561
- continue;
1562
- }
1563
- case 2: {
1564
- if (tag !== 18) {
1565
- break;
1566
- }
1567
- message.workflowDefinitionId = reader.string();
1568
- continue;
1569
- }
1570
- case 3: {
1571
- if (tag !== 24) {
1572
- break;
1573
- }
1574
- message.pageSize = reader.int32();
1575
- continue;
1576
- }
1577
- case 4: {
1578
- if (tag !== 34) {
1579
- break;
1580
- }
1581
- message.pageToken = reader.string();
1582
- continue;
1583
- }
1584
- }
1585
- if ((tag & 7) === 4 || tag === 0) {
1586
- break;
1587
- }
1588
- reader.skip(tag & 7);
1589
- }
1590
- return message;
1591
- },
1592
- fromJSON(object) {
1593
- return {
1594
- organizationId: isSet(object.organizationId)
1595
- ? globalThis.String(object.organizationId)
1596
- : isSet(object.organization_id)
1597
- ? globalThis.String(object.organization_id)
1598
- : "",
1599
- workflowDefinitionId: isSet(object.workflowDefinitionId)
1600
- ? globalThis.String(object.workflowDefinitionId)
1601
- : isSet(object.workflow_definition_id)
1602
- ? globalThis.String(object.workflow_definition_id)
1603
- : "",
1604
- pageSize: isSet(object.pageSize)
1605
- ? globalThis.Number(object.pageSize)
1606
- : isSet(object.page_size)
1607
- ? globalThis.Number(object.page_size)
1608
- : 0,
1609
- pageToken: isSet(object.pageToken)
1610
- ? globalThis.String(object.pageToken)
1611
- : isSet(object.page_token)
1612
- ? globalThis.String(object.page_token)
1613
- : "",
1614
- };
1615
- },
1616
- toJSON(message) {
1617
- const obj = {};
1618
- if (message.organizationId !== "") {
1619
- obj.organizationId = message.organizationId;
1620
- }
1621
- if (message.workflowDefinitionId !== "") {
1622
- obj.workflowDefinitionId = message.workflowDefinitionId;
1623
- }
1624
- if (message.pageSize !== 0) {
1625
- obj.pageSize = Math.round(message.pageSize);
1626
- }
1627
- if (message.pageToken !== "") {
1628
- obj.pageToken = message.pageToken;
1629
- }
1630
- return obj;
1631
- },
1632
- create(base) {
1633
- return exports.ListWorkflowVersionsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1634
- },
1635
- fromPartial(object) {
1636
- var _a, _b, _c, _d;
1637
- const message = createBaseListWorkflowVersionsRequest();
1638
- message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
1639
- message.workflowDefinitionId = (_b = object.workflowDefinitionId) !== null && _b !== void 0 ? _b : "";
1640
- message.pageSize = (_c = object.pageSize) !== null && _c !== void 0 ? _c : 0;
1641
- message.pageToken = (_d = object.pageToken) !== null && _d !== void 0 ? _d : "";
1642
- return message;
1643
- },
1644
- };
1645
- function createBaseListWorkflowVersionsResponse() {
1646
- return { versions: [], nextPageToken: "" };
1647
- }
1648
- exports.ListWorkflowVersionsResponse = {
1649
- encode(message, writer = new wire_1.BinaryWriter()) {
1650
- for (const v of message.versions) {
1651
- workflow_pb_1.WorkflowVersion.encode(v, writer.uint32(10).fork()).join();
1652
- }
1653
- if (message.nextPageToken !== "") {
1654
- writer.uint32(18).string(message.nextPageToken);
1655
- }
1656
- return writer;
1657
- },
1658
- decode(input, length) {
1659
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1660
- const end = length === undefined ? reader.len : reader.pos + length;
1661
- const message = createBaseListWorkflowVersionsResponse();
1662
- while (reader.pos < end) {
1663
- const tag = reader.uint32();
1664
- switch (tag >>> 3) {
1665
- case 1: {
1666
- if (tag !== 10) {
1667
- break;
1668
- }
1669
- message.versions.push(workflow_pb_1.WorkflowVersion.decode(reader, reader.uint32()));
1670
- continue;
1671
- }
1672
- case 2: {
1673
- if (tag !== 18) {
1674
- break;
1675
- }
1676
- message.nextPageToken = reader.string();
1677
- continue;
1678
- }
1679
- }
1680
- if ((tag & 7) === 4 || tag === 0) {
1681
- break;
1682
- }
1683
- reader.skip(tag & 7);
1684
- }
1685
- return message;
1686
- },
1687
- fromJSON(object) {
1688
- return {
1689
- versions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.versions)
1690
- ? object.versions.map((e) => workflow_pb_1.WorkflowVersion.fromJSON(e))
1691
- : [],
1692
- nextPageToken: isSet(object.nextPageToken)
1693
- ? globalThis.String(object.nextPageToken)
1694
- : isSet(object.next_page_token)
1695
- ? globalThis.String(object.next_page_token)
1696
- : "",
1697
- };
1698
- },
1699
- toJSON(message) {
1700
- var _a;
1701
- const obj = {};
1702
- if ((_a = message.versions) === null || _a === void 0 ? void 0 : _a.length) {
1703
- obj.versions = message.versions.map((e) => workflow_pb_1.WorkflowVersion.toJSON(e));
1704
- }
1705
- if (message.nextPageToken !== "") {
1706
- obj.nextPageToken = message.nextPageToken;
1707
- }
1708
- return obj;
1709
- },
1710
- create(base) {
1711
- return exports.ListWorkflowVersionsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1712
- },
1713
- fromPartial(object) {
1714
- var _a;
1715
- var _b;
1716
- const message = createBaseListWorkflowVersionsResponse();
1717
- message.versions = ((_a = object.versions) === null || _a === void 0 ? void 0 : _a.map((e) => workflow_pb_1.WorkflowVersion.fromPartial(e))) || [];
1718
- message.nextPageToken = (_b = object.nextPageToken) !== null && _b !== void 0 ? _b : "";
1719
- return message;
1720
- },
1721
- };
1722
- function createBaseRunWorkflowRequest() {
1723
- return { organizationId: "", workflowDefinitionId: "", version: 0, chatSessionId: "", input: undefined };
1724
- }
1725
- exports.RunWorkflowRequest = {
1726
- encode(message, writer = new wire_1.BinaryWriter()) {
1727
- if (message.organizationId !== "") {
1728
- writer.uint32(10).string(message.organizationId);
1729
- }
1730
- if (message.workflowDefinitionId !== "") {
1731
- writer.uint32(18).string(message.workflowDefinitionId);
1732
- }
1733
- if (message.version !== 0) {
1734
- writer.uint32(24).int32(message.version);
1735
- }
1736
- if (message.chatSessionId !== "") {
1737
- writer.uint32(34).string(message.chatSessionId);
1738
- }
1739
- if (message.input !== undefined) {
1740
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.input), writer.uint32(42).fork()).join();
1741
- }
1742
- return writer;
1743
- },
1744
- decode(input, length) {
1745
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1746
- const end = length === undefined ? reader.len : reader.pos + length;
1747
- const message = createBaseRunWorkflowRequest();
1748
- while (reader.pos < end) {
1749
- const tag = reader.uint32();
1750
- switch (tag >>> 3) {
1751
- case 1: {
1752
- if (tag !== 10) {
1753
- break;
1754
- }
1755
- message.organizationId = reader.string();
1756
- continue;
1757
- }
1758
- case 2: {
1759
- if (tag !== 18) {
1760
- break;
1761
- }
1762
- message.workflowDefinitionId = reader.string();
1763
- continue;
1764
- }
1765
- case 3: {
1766
- if (tag !== 24) {
1767
- break;
1768
- }
1769
- message.version = reader.int32();
1770
- continue;
1771
- }
1772
- case 4: {
1773
- if (tag !== 34) {
1774
- break;
1775
- }
1776
- message.chatSessionId = reader.string();
1777
- continue;
1778
- }
1779
- case 5: {
1780
- if (tag !== 42) {
1781
- break;
1782
- }
1783
- message.input = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
1784
- continue;
1785
- }
1786
- }
1787
- if ((tag & 7) === 4 || tag === 0) {
1788
- break;
1789
- }
1790
- reader.skip(tag & 7);
1791
- }
1792
- return message;
1793
- },
1794
- fromJSON(object) {
1795
- return {
1796
- organizationId: isSet(object.organizationId)
1797
- ? globalThis.String(object.organizationId)
1798
- : isSet(object.organization_id)
1799
- ? globalThis.String(object.organization_id)
1800
- : "",
1801
- workflowDefinitionId: isSet(object.workflowDefinitionId)
1802
- ? globalThis.String(object.workflowDefinitionId)
1803
- : isSet(object.workflow_definition_id)
1804
- ? globalThis.String(object.workflow_definition_id)
1805
- : "",
1806
- version: isSet(object.version) ? globalThis.Number(object.version) : 0,
1807
- chatSessionId: isSet(object.chatSessionId)
1808
- ? globalThis.String(object.chatSessionId)
1809
- : isSet(object.chat_session_id)
1810
- ? globalThis.String(object.chat_session_id)
1811
- : "",
1812
- input: isObject(object.input) ? object.input : undefined,
1813
- };
1814
- },
1815
- toJSON(message) {
1816
- const obj = {};
1817
- if (message.organizationId !== "") {
1818
- obj.organizationId = message.organizationId;
1819
- }
1820
- if (message.workflowDefinitionId !== "") {
1821
- obj.workflowDefinitionId = message.workflowDefinitionId;
1822
- }
1823
- if (message.version !== 0) {
1824
- obj.version = Math.round(message.version);
1825
- }
1826
- if (message.chatSessionId !== "") {
1827
- obj.chatSessionId = message.chatSessionId;
1828
- }
1829
- if (message.input !== undefined) {
1830
- obj.input = message.input;
1831
- }
1832
- return obj;
1833
- },
1834
- create(base) {
1835
- return exports.RunWorkflowRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1836
- },
1837
- fromPartial(object) {
1838
- var _a, _b, _c, _d, _e;
1839
- const message = createBaseRunWorkflowRequest();
1840
- message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
1841
- message.workflowDefinitionId = (_b = object.workflowDefinitionId) !== null && _b !== void 0 ? _b : "";
1842
- message.version = (_c = object.version) !== null && _c !== void 0 ? _c : 0;
1843
- message.chatSessionId = (_d = object.chatSessionId) !== null && _d !== void 0 ? _d : "";
1844
- message.input = (_e = object.input) !== null && _e !== void 0 ? _e : undefined;
1845
- return message;
1846
- },
1847
- };
1848
- function createBaseRunWorkflowResponse() {
1849
- return { run: undefined };
1850
- }
1851
- exports.RunWorkflowResponse = {
1852
- encode(message, writer = new wire_1.BinaryWriter()) {
1853
- if (message.run !== undefined) {
1854
- workflow_pb_1.WorkflowRun.encode(message.run, writer.uint32(10).fork()).join();
1855
- }
1856
- return writer;
1857
- },
1858
- decode(input, length) {
1859
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1860
- const end = length === undefined ? reader.len : reader.pos + length;
1861
- const message = createBaseRunWorkflowResponse();
1862
- while (reader.pos < end) {
1863
- const tag = reader.uint32();
1864
- switch (tag >>> 3) {
1865
- case 1: {
1866
- if (tag !== 10) {
1867
- break;
1868
- }
1869
- message.run = workflow_pb_1.WorkflowRun.decode(reader, reader.uint32());
1870
- continue;
1871
- }
1872
- }
1873
- if ((tag & 7) === 4 || tag === 0) {
1874
- break;
1875
- }
1876
- reader.skip(tag & 7);
1877
- }
1878
- return message;
1879
- },
1880
- fromJSON(object) {
1881
- return { run: isSet(object.run) ? workflow_pb_1.WorkflowRun.fromJSON(object.run) : undefined };
1882
- },
1883
- toJSON(message) {
1884
- const obj = {};
1885
- if (message.run !== undefined) {
1886
- obj.run = workflow_pb_1.WorkflowRun.toJSON(message.run);
1887
- }
1888
- return obj;
1889
- },
1890
- create(base) {
1891
- return exports.RunWorkflowResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1892
- },
1893
- fromPartial(object) {
1894
- const message = createBaseRunWorkflowResponse();
1895
- message.run = (object.run !== undefined && object.run !== null) ? workflow_pb_1.WorkflowRun.fromPartial(object.run) : undefined;
1896
- return message;
1897
- },
1898
- };
1899
- function createBaseGetWorkflowRunRequest() {
1900
- return { organizationId: "", workflowRunId: "" };
1901
- }
1902
- exports.GetWorkflowRunRequest = {
1903
- encode(message, writer = new wire_1.BinaryWriter()) {
1904
- if (message.organizationId !== "") {
1905
- writer.uint32(10).string(message.organizationId);
1906
- }
1907
- if (message.workflowRunId !== "") {
1908
- writer.uint32(18).string(message.workflowRunId);
1909
- }
1910
- return writer;
1911
- },
1912
- decode(input, length) {
1913
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1914
- const end = length === undefined ? reader.len : reader.pos + length;
1915
- const message = createBaseGetWorkflowRunRequest();
1916
- while (reader.pos < end) {
1917
- const tag = reader.uint32();
1918
- switch (tag >>> 3) {
1919
- case 1: {
1920
- if (tag !== 10) {
1921
- break;
1922
- }
1923
- message.organizationId = reader.string();
1924
- continue;
1925
- }
1926
- case 2: {
1927
- if (tag !== 18) {
1928
- break;
1929
- }
1930
- message.workflowRunId = reader.string();
1931
- continue;
1932
- }
1933
- }
1934
- if ((tag & 7) === 4 || tag === 0) {
1935
- break;
1936
- }
1937
- reader.skip(tag & 7);
1938
- }
1939
- return message;
1940
- },
1941
- fromJSON(object) {
1942
- return {
1943
- organizationId: isSet(object.organizationId)
1944
- ? globalThis.String(object.organizationId)
1945
- : isSet(object.organization_id)
1946
- ? globalThis.String(object.organization_id)
1947
- : "",
1948
- workflowRunId: isSet(object.workflowRunId)
1949
- ? globalThis.String(object.workflowRunId)
1950
- : isSet(object.workflow_run_id)
1951
- ? globalThis.String(object.workflow_run_id)
1952
- : "",
1953
- };
1954
- },
1955
- toJSON(message) {
1956
- const obj = {};
1957
- if (message.organizationId !== "") {
1958
- obj.organizationId = message.organizationId;
1959
- }
1960
- if (message.workflowRunId !== "") {
1961
- obj.workflowRunId = message.workflowRunId;
1962
- }
1963
- return obj;
1964
- },
1965
- create(base) {
1966
- return exports.GetWorkflowRunRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1967
- },
1968
- fromPartial(object) {
1969
- var _a, _b;
1970
- const message = createBaseGetWorkflowRunRequest();
1971
- message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
1972
- message.workflowRunId = (_b = object.workflowRunId) !== null && _b !== void 0 ? _b : "";
1973
- return message;
1974
- },
1975
- };
1976
- function createBaseGetWorkflowRunResponse() {
1977
- return { run: undefined, steps: [] };
1978
- }
1979
- exports.GetWorkflowRunResponse = {
1980
- encode(message, writer = new wire_1.BinaryWriter()) {
1981
- if (message.run !== undefined) {
1982
- workflow_pb_1.WorkflowRun.encode(message.run, writer.uint32(10).fork()).join();
1983
- }
1984
- for (const v of message.steps) {
1985
- workflow_pb_1.WorkflowStepRun.encode(v, writer.uint32(18).fork()).join();
1986
- }
1987
- return writer;
1988
- },
1989
- decode(input, length) {
1990
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1991
- const end = length === undefined ? reader.len : reader.pos + length;
1992
- const message = createBaseGetWorkflowRunResponse();
1993
- while (reader.pos < end) {
1994
- const tag = reader.uint32();
1995
- switch (tag >>> 3) {
1996
- case 1: {
1997
- if (tag !== 10) {
1998
- break;
1999
- }
2000
- message.run = workflow_pb_1.WorkflowRun.decode(reader, reader.uint32());
2001
- continue;
2002
- }
2003
- case 2: {
2004
- if (tag !== 18) {
2005
- break;
2006
- }
2007
- message.steps.push(workflow_pb_1.WorkflowStepRun.decode(reader, reader.uint32()));
2008
- continue;
2009
- }
2010
- }
2011
- if ((tag & 7) === 4 || tag === 0) {
2012
- break;
2013
- }
2014
- reader.skip(tag & 7);
2015
- }
2016
- return message;
2017
- },
2018
- fromJSON(object) {
2019
- return {
2020
- run: isSet(object.run) ? workflow_pb_1.WorkflowRun.fromJSON(object.run) : undefined,
2021
- steps: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.steps) ? object.steps.map((e) => workflow_pb_1.WorkflowStepRun.fromJSON(e)) : [],
2022
- };
2023
- },
2024
- toJSON(message) {
2025
- var _a;
2026
- const obj = {};
2027
- if (message.run !== undefined) {
2028
- obj.run = workflow_pb_1.WorkflowRun.toJSON(message.run);
2029
- }
2030
- if ((_a = message.steps) === null || _a === void 0 ? void 0 : _a.length) {
2031
- obj.steps = message.steps.map((e) => workflow_pb_1.WorkflowStepRun.toJSON(e));
2032
- }
2033
- return obj;
2034
- },
2035
- create(base) {
2036
- return exports.GetWorkflowRunResponse.fromPartial(base !== null && base !== void 0 ? base : {});
2037
- },
2038
- fromPartial(object) {
2039
- var _a;
2040
- const message = createBaseGetWorkflowRunResponse();
2041
- message.run = (object.run !== undefined && object.run !== null) ? workflow_pb_1.WorkflowRun.fromPartial(object.run) : undefined;
2042
- message.steps = ((_a = object.steps) === null || _a === void 0 ? void 0 : _a.map((e) => workflow_pb_1.WorkflowStepRun.fromPartial(e))) || [];
2043
- return message;
2044
- },
2045
- };
2046
- function createBaseListWorkflowRunsRequest() {
2047
- return { organizationId: "", workflowDefinitionId: "", status: 0, pageSize: 0, pageToken: "" };
2048
- }
2049
- exports.ListWorkflowRunsRequest = {
2050
- encode(message, writer = new wire_1.BinaryWriter()) {
2051
- if (message.organizationId !== "") {
2052
- writer.uint32(10).string(message.organizationId);
2053
- }
2054
- if (message.workflowDefinitionId !== "") {
2055
- writer.uint32(18).string(message.workflowDefinitionId);
2056
- }
2057
- if (message.status !== 0) {
2058
- writer.uint32(24).int32(message.status);
2059
- }
2060
- if (message.pageSize !== 0) {
2061
- writer.uint32(32).int32(message.pageSize);
2062
- }
2063
- if (message.pageToken !== "") {
2064
- writer.uint32(42).string(message.pageToken);
2065
- }
2066
- return writer;
2067
- },
2068
- decode(input, length) {
2069
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2070
- const end = length === undefined ? reader.len : reader.pos + length;
2071
- const message = createBaseListWorkflowRunsRequest();
2072
- while (reader.pos < end) {
2073
- const tag = reader.uint32();
2074
- switch (tag >>> 3) {
2075
- case 1: {
2076
- if (tag !== 10) {
2077
- break;
2078
- }
2079
- message.organizationId = reader.string();
2080
- continue;
2081
- }
2082
- case 2: {
2083
- if (tag !== 18) {
2084
- break;
2085
- }
2086
- message.workflowDefinitionId = reader.string();
2087
- continue;
2088
- }
2089
- case 3: {
2090
- if (tag !== 24) {
2091
- break;
2092
- }
2093
- message.status = reader.int32();
2094
- continue;
2095
- }
2096
- case 4: {
2097
- if (tag !== 32) {
2098
- break;
2099
- }
2100
- message.pageSize = reader.int32();
2101
- continue;
2102
- }
2103
- case 5: {
2104
- if (tag !== 42) {
2105
- break;
2106
- }
2107
- message.pageToken = reader.string();
2108
- continue;
2109
- }
2110
- }
2111
- if ((tag & 7) === 4 || tag === 0) {
2112
- break;
2113
- }
2114
- reader.skip(tag & 7);
2115
- }
2116
- return message;
2117
- },
2118
- fromJSON(object) {
2119
- return {
2120
- organizationId: isSet(object.organizationId)
2121
- ? globalThis.String(object.organizationId)
2122
- : isSet(object.organization_id)
2123
- ? globalThis.String(object.organization_id)
2124
- : "",
2125
- workflowDefinitionId: isSet(object.workflowDefinitionId)
2126
- ? globalThis.String(object.workflowDefinitionId)
2127
- : isSet(object.workflow_definition_id)
2128
- ? globalThis.String(object.workflow_definition_id)
2129
- : "",
2130
- status: isSet(object.status) ? (0, workflow_pb_1.workflowRunStatusFromJSON)(object.status) : 0,
2131
- pageSize: isSet(object.pageSize)
2132
- ? globalThis.Number(object.pageSize)
2133
- : isSet(object.page_size)
2134
- ? globalThis.Number(object.page_size)
2135
- : 0,
2136
- pageToken: isSet(object.pageToken)
2137
- ? globalThis.String(object.pageToken)
2138
- : isSet(object.page_token)
2139
- ? globalThis.String(object.page_token)
2140
- : "",
2141
- };
2142
- },
2143
- toJSON(message) {
2144
- const obj = {};
2145
- if (message.organizationId !== "") {
2146
- obj.organizationId = message.organizationId;
2147
- }
2148
- if (message.workflowDefinitionId !== "") {
2149
- obj.workflowDefinitionId = message.workflowDefinitionId;
2150
- }
2151
- if (message.status !== 0) {
2152
- obj.status = (0, workflow_pb_1.workflowRunStatusToJSON)(message.status);
2153
- }
2154
- if (message.pageSize !== 0) {
2155
- obj.pageSize = Math.round(message.pageSize);
2156
- }
2157
- if (message.pageToken !== "") {
2158
- obj.pageToken = message.pageToken;
2159
- }
2160
- return obj;
2161
- },
2162
- create(base) {
2163
- return exports.ListWorkflowRunsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
2164
- },
2165
- fromPartial(object) {
2166
- var _a, _b, _c, _d, _e;
2167
- const message = createBaseListWorkflowRunsRequest();
2168
- message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
2169
- message.workflowDefinitionId = (_b = object.workflowDefinitionId) !== null && _b !== void 0 ? _b : "";
2170
- message.status = (_c = object.status) !== null && _c !== void 0 ? _c : 0;
2171
- message.pageSize = (_d = object.pageSize) !== null && _d !== void 0 ? _d : 0;
2172
- message.pageToken = (_e = object.pageToken) !== null && _e !== void 0 ? _e : "";
2173
- return message;
2174
- },
2175
- };
2176
- function createBaseListWorkflowRunsResponse() {
2177
- return { runs: [], nextPageToken: "" };
2178
- }
2179
- exports.ListWorkflowRunsResponse = {
2180
- encode(message, writer = new wire_1.BinaryWriter()) {
2181
- for (const v of message.runs) {
2182
- workflow_pb_1.WorkflowRun.encode(v, writer.uint32(10).fork()).join();
2183
- }
2184
- if (message.nextPageToken !== "") {
2185
- writer.uint32(18).string(message.nextPageToken);
2186
- }
2187
- return writer;
2188
- },
2189
- decode(input, length) {
2190
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2191
- const end = length === undefined ? reader.len : reader.pos + length;
2192
- const message = createBaseListWorkflowRunsResponse();
2193
- while (reader.pos < end) {
2194
- const tag = reader.uint32();
2195
- switch (tag >>> 3) {
2196
- case 1: {
2197
- if (tag !== 10) {
2198
- break;
2199
- }
2200
- message.runs.push(workflow_pb_1.WorkflowRun.decode(reader, reader.uint32()));
2201
- continue;
2202
- }
2203
- case 2: {
2204
- if (tag !== 18) {
2205
- break;
2206
- }
2207
- message.nextPageToken = reader.string();
2208
- continue;
2209
- }
2210
- }
2211
- if ((tag & 7) === 4 || tag === 0) {
2212
- break;
2213
- }
2214
- reader.skip(tag & 7);
2215
- }
2216
- return message;
2217
- },
2218
- fromJSON(object) {
2219
- return {
2220
- runs: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.runs) ? object.runs.map((e) => workflow_pb_1.WorkflowRun.fromJSON(e)) : [],
2221
- nextPageToken: isSet(object.nextPageToken)
2222
- ? globalThis.String(object.nextPageToken)
2223
- : isSet(object.next_page_token)
2224
- ? globalThis.String(object.next_page_token)
2225
- : "",
2226
- };
2227
- },
2228
- toJSON(message) {
2229
- var _a;
2230
- const obj = {};
2231
- if ((_a = message.runs) === null || _a === void 0 ? void 0 : _a.length) {
2232
- obj.runs = message.runs.map((e) => workflow_pb_1.WorkflowRun.toJSON(e));
2233
- }
2234
- if (message.nextPageToken !== "") {
2235
- obj.nextPageToken = message.nextPageToken;
2236
- }
2237
- return obj;
2238
- },
2239
- create(base) {
2240
- return exports.ListWorkflowRunsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
2241
- },
2242
- fromPartial(object) {
2243
- var _a;
2244
- var _b;
2245
- const message = createBaseListWorkflowRunsResponse();
2246
- message.runs = ((_a = object.runs) === null || _a === void 0 ? void 0 : _a.map((e) => workflow_pb_1.WorkflowRun.fromPartial(e))) || [];
2247
- message.nextPageToken = (_b = object.nextPageToken) !== null && _b !== void 0 ? _b : "";
2248
- return message;
2249
- },
2250
- };
2251
- function createBaseWatchWorkflowRunEventsRequest() {
2252
- return { organizationId: "", workflowRunId: "", afterSequence: 0 };
2253
- }
2254
- exports.WatchWorkflowRunEventsRequest = {
2255
- encode(message, writer = new wire_1.BinaryWriter()) {
2256
- if (message.organizationId !== "") {
2257
- writer.uint32(10).string(message.organizationId);
2258
- }
2259
- if (message.workflowRunId !== "") {
2260
- writer.uint32(18).string(message.workflowRunId);
2261
- }
2262
- if (message.afterSequence !== 0) {
2263
- writer.uint32(24).uint64(message.afterSequence);
2264
- }
2265
- return writer;
2266
- },
2267
- decode(input, length) {
2268
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2269
- const end = length === undefined ? reader.len : reader.pos + length;
2270
- const message = createBaseWatchWorkflowRunEventsRequest();
2271
- while (reader.pos < end) {
2272
- const tag = reader.uint32();
2273
- switch (tag >>> 3) {
2274
- case 1: {
2275
- if (tag !== 10) {
2276
- break;
2277
- }
2278
- message.organizationId = reader.string();
2279
- continue;
2280
- }
2281
- case 2: {
2282
- if (tag !== 18) {
2283
- break;
2284
- }
2285
- message.workflowRunId = reader.string();
2286
- continue;
2287
- }
2288
- case 3: {
2289
- if (tag !== 24) {
2290
- break;
2291
- }
2292
- message.afterSequence = longToNumber(reader.uint64());
2293
- continue;
2294
- }
2295
- }
2296
- if ((tag & 7) === 4 || tag === 0) {
2297
- break;
2298
- }
2299
- reader.skip(tag & 7);
2300
- }
2301
- return message;
2302
- },
2303
- fromJSON(object) {
2304
- return {
2305
- organizationId: isSet(object.organizationId)
2306
- ? globalThis.String(object.organizationId)
2307
- : isSet(object.organization_id)
2308
- ? globalThis.String(object.organization_id)
2309
- : "",
2310
- workflowRunId: isSet(object.workflowRunId)
2311
- ? globalThis.String(object.workflowRunId)
2312
- : isSet(object.workflow_run_id)
2313
- ? globalThis.String(object.workflow_run_id)
2314
- : "",
2315
- afterSequence: isSet(object.afterSequence)
2316
- ? globalThis.Number(object.afterSequence)
2317
- : isSet(object.after_sequence)
2318
- ? globalThis.Number(object.after_sequence)
2319
- : 0,
2320
- };
2321
- },
2322
- toJSON(message) {
2323
- const obj = {};
2324
- if (message.organizationId !== "") {
2325
- obj.organizationId = message.organizationId;
2326
- }
2327
- if (message.workflowRunId !== "") {
2328
- obj.workflowRunId = message.workflowRunId;
2329
- }
2330
- if (message.afterSequence !== 0) {
2331
- obj.afterSequence = Math.round(message.afterSequence);
2332
- }
2333
- return obj;
2334
- },
2335
- create(base) {
2336
- return exports.WatchWorkflowRunEventsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
2337
- },
2338
- fromPartial(object) {
2339
- var _a, _b, _c;
2340
- const message = createBaseWatchWorkflowRunEventsRequest();
2341
- message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
2342
- message.workflowRunId = (_b = object.workflowRunId) !== null && _b !== void 0 ? _b : "";
2343
- message.afterSequence = (_c = object.afterSequence) !== null && _c !== void 0 ? _c : 0;
2344
- return message;
2345
- },
2346
- };
2347
- function createBaseWatchWorkflowRunEventsResponse() {
2348
- return { event: undefined };
2349
- }
2350
- exports.WatchWorkflowRunEventsResponse = {
2351
- encode(message, writer = new wire_1.BinaryWriter()) {
2352
- if (message.event !== undefined) {
2353
- workflow_pb_1.WorkflowRunEvent.encode(message.event, writer.uint32(10).fork()).join();
2354
- }
2355
- return writer;
2356
- },
2357
- decode(input, length) {
2358
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2359
- const end = length === undefined ? reader.len : reader.pos + length;
2360
- const message = createBaseWatchWorkflowRunEventsResponse();
2361
- while (reader.pos < end) {
2362
- const tag = reader.uint32();
2363
- switch (tag >>> 3) {
2364
- case 1: {
2365
- if (tag !== 10) {
2366
- break;
2367
- }
2368
- message.event = workflow_pb_1.WorkflowRunEvent.decode(reader, reader.uint32());
2369
- continue;
2370
- }
2371
- }
2372
- if ((tag & 7) === 4 || tag === 0) {
2373
- break;
2374
- }
2375
- reader.skip(tag & 7);
2376
- }
2377
- return message;
2378
- },
2379
- fromJSON(object) {
2380
- return { event: isSet(object.event) ? workflow_pb_1.WorkflowRunEvent.fromJSON(object.event) : undefined };
2381
- },
2382
- toJSON(message) {
2383
- const obj = {};
2384
- if (message.event !== undefined) {
2385
- obj.event = workflow_pb_1.WorkflowRunEvent.toJSON(message.event);
2386
- }
2387
- return obj;
2388
- },
2389
- create(base) {
2390
- return exports.WatchWorkflowRunEventsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
2391
- },
2392
- fromPartial(object) {
2393
- const message = createBaseWatchWorkflowRunEventsResponse();
2394
- message.event = (object.event !== undefined && object.event !== null)
2395
- ? workflow_pb_1.WorkflowRunEvent.fromPartial(object.event)
2396
- : undefined;
2397
- return message;
2398
- },
2399
- };
2400
- exports.WorkflowServiceServiceName = "weaveapi.workflow.v1.WorkflowService";
2401
- class WorkflowServiceClientImpl {
2402
- constructor(rpc, opts) {
2403
- this.service = (opts === null || opts === void 0 ? void 0 : opts.service) || exports.WorkflowServiceServiceName;
2404
- this.rpc = rpc;
2405
- this.CreateWorkflowDefinition = this.CreateWorkflowDefinition.bind(this);
2406
- this.GetWorkflowDefinition = this.GetWorkflowDefinition.bind(this);
2407
- this.ListWorkflowDefinitions = this.ListWorkflowDefinitions.bind(this);
2408
- this.UpdateWorkflowDraft = this.UpdateWorkflowDraft.bind(this);
2409
- this.WatchWorkflowDraftEvents = this.WatchWorkflowDraftEvents.bind(this);
2410
- this.PlanWorkflowPublish = this.PlanWorkflowPublish.bind(this);
2411
- this.PublishWorkflowDefinition = this.PublishWorkflowDefinition.bind(this);
2412
- this.GetWorkflowVersion = this.GetWorkflowVersion.bind(this);
2413
- this.ListWorkflowVersions = this.ListWorkflowVersions.bind(this);
2414
- this.RunWorkflow = this.RunWorkflow.bind(this);
2415
- this.GetWorkflowRun = this.GetWorkflowRun.bind(this);
2416
- this.ListWorkflowRuns = this.ListWorkflowRuns.bind(this);
2417
- this.WatchWorkflowRunEvents = this.WatchWorkflowRunEvents.bind(this);
2418
- }
2419
- CreateWorkflowDefinition(request) {
2420
- const data = exports.CreateWorkflowDefinitionRequest.encode(request).finish();
2421
- const promise = this.rpc.request(this.service, "CreateWorkflowDefinition", data);
2422
- return promise.then((data) => exports.CreateWorkflowDefinitionResponse.decode(new wire_1.BinaryReader(data)));
2423
- }
2424
- GetWorkflowDefinition(request) {
2425
- const data = exports.GetWorkflowDefinitionRequest.encode(request).finish();
2426
- const promise = this.rpc.request(this.service, "GetWorkflowDefinition", data);
2427
- return promise.then((data) => exports.GetWorkflowDefinitionResponse.decode(new wire_1.BinaryReader(data)));
2428
- }
2429
- ListWorkflowDefinitions(request) {
2430
- const data = exports.ListWorkflowDefinitionsRequest.encode(request).finish();
2431
- const promise = this.rpc.request(this.service, "ListWorkflowDefinitions", data);
2432
- return promise.then((data) => exports.ListWorkflowDefinitionsResponse.decode(new wire_1.BinaryReader(data)));
2433
- }
2434
- UpdateWorkflowDraft(request) {
2435
- const data = exports.UpdateWorkflowDraftRequest.encode(request).finish();
2436
- const promise = this.rpc.request(this.service, "UpdateWorkflowDraft", data);
2437
- return promise.then((data) => exports.UpdateWorkflowDraftResponse.decode(new wire_1.BinaryReader(data)));
2438
- }
2439
- WatchWorkflowDraftEvents(request) {
2440
- const data = exports.WatchWorkflowDraftEventsRequest.encode(request).finish();
2441
- const result = this.rpc.serverStreamingRequest(this.service, "WatchWorkflowDraftEvents", data);
2442
- return result.pipe((0, operators_1.map)((data) => exports.WatchWorkflowDraftEventsResponse.decode(new wire_1.BinaryReader(data))));
2443
- }
2444
- PlanWorkflowPublish(request) {
2445
- const data = exports.PlanWorkflowPublishRequest.encode(request).finish();
2446
- const promise = this.rpc.request(this.service, "PlanWorkflowPublish", data);
2447
- return promise.then((data) => exports.PlanWorkflowPublishResponse.decode(new wire_1.BinaryReader(data)));
2448
- }
2449
- PublishWorkflowDefinition(request) {
2450
- const data = exports.PublishWorkflowDefinitionRequest.encode(request).finish();
2451
- const promise = this.rpc.request(this.service, "PublishWorkflowDefinition", data);
2452
- return promise.then((data) => exports.PublishWorkflowDefinitionResponse.decode(new wire_1.BinaryReader(data)));
2453
- }
2454
- GetWorkflowVersion(request) {
2455
- const data = exports.GetWorkflowVersionRequest.encode(request).finish();
2456
- const promise = this.rpc.request(this.service, "GetWorkflowVersion", data);
2457
- return promise.then((data) => exports.GetWorkflowVersionResponse.decode(new wire_1.BinaryReader(data)));
2458
- }
2459
- ListWorkflowVersions(request) {
2460
- const data = exports.ListWorkflowVersionsRequest.encode(request).finish();
2461
- const promise = this.rpc.request(this.service, "ListWorkflowVersions", data);
2462
- return promise.then((data) => exports.ListWorkflowVersionsResponse.decode(new wire_1.BinaryReader(data)));
2463
- }
2464
- RunWorkflow(request) {
2465
- const data = exports.RunWorkflowRequest.encode(request).finish();
2466
- const promise = this.rpc.request(this.service, "RunWorkflow", data);
2467
- return promise.then((data) => exports.RunWorkflowResponse.decode(new wire_1.BinaryReader(data)));
2468
- }
2469
- GetWorkflowRun(request) {
2470
- const data = exports.GetWorkflowRunRequest.encode(request).finish();
2471
- const promise = this.rpc.request(this.service, "GetWorkflowRun", data);
2472
- return promise.then((data) => exports.GetWorkflowRunResponse.decode(new wire_1.BinaryReader(data)));
2473
- }
2474
- ListWorkflowRuns(request) {
2475
- const data = exports.ListWorkflowRunsRequest.encode(request).finish();
2476
- const promise = this.rpc.request(this.service, "ListWorkflowRuns", data);
2477
- return promise.then((data) => exports.ListWorkflowRunsResponse.decode(new wire_1.BinaryReader(data)));
2478
- }
2479
- WatchWorkflowRunEvents(request) {
2480
- const data = exports.WatchWorkflowRunEventsRequest.encode(request).finish();
2481
- const result = this.rpc.serverStreamingRequest(this.service, "WatchWorkflowRunEvents", data);
2482
- return result.pipe((0, operators_1.map)((data) => exports.WatchWorkflowRunEventsResponse.decode(new wire_1.BinaryReader(data))));
2483
- }
2484
- }
2485
- exports.WorkflowServiceClientImpl = WorkflowServiceClientImpl;
2486
- exports.WorkflowServiceDefinition = {
2487
- name: "WorkflowService",
2488
- fullName: "weaveapi.workflow.v1.WorkflowService",
2489
- methods: {
2490
- createWorkflowDefinition: {
2491
- name: "CreateWorkflowDefinition",
2492
- requestType: exports.CreateWorkflowDefinitionRequest,
2493
- requestStream: false,
2494
- responseType: exports.CreateWorkflowDefinitionResponse,
2495
- responseStream: false,
2496
- options: {
2497
- _unknownFields: {
2498
- 578365826: [
2499
- new Uint8Array([
2500
- 18,
2501
- 58,
2502
- 1,
2503
- 42,
2504
- 34,
2505
- 13,
2506
- 47,
2507
- 118,
2508
- 49,
2509
- 47,
2510
- 119,
2511
- 111,
2512
- 114,
2513
- 107,
2514
- 102,
2515
- 108,
2516
- 111,
2517
- 119,
2518
- 115,
2519
- ]),
2520
- ],
2521
- },
2522
- },
2523
- },
2524
- getWorkflowDefinition: {
2525
- name: "GetWorkflowDefinition",
2526
- requestType: exports.GetWorkflowDefinitionRequest,
2527
- requestStream: false,
2528
- responseType: exports.GetWorkflowDefinitionResponse,
2529
- responseStream: false,
2530
- options: {
2531
- _unknownFields: {
2532
- 578365826: [
2533
- new Uint8Array([
2534
- 40,
2535
- 18,
2536
- 38,
2537
- 47,
2538
- 118,
2539
- 49,
2540
- 47,
2541
- 119,
2542
- 111,
2543
- 114,
2544
- 107,
2545
- 102,
2546
- 108,
2547
- 111,
2548
- 119,
2549
- 115,
2550
- 47,
2551
- 123,
2552
- 119,
2553
- 111,
2554
- 114,
2555
- 107,
2556
- 102,
2557
- 108,
2558
- 111,
2559
- 119,
2560
- 95,
2561
- 100,
2562
- 101,
2563
- 102,
2564
- 105,
2565
- 110,
2566
- 105,
2567
- 116,
2568
- 105,
2569
- 111,
2570
- 110,
2571
- 95,
2572
- 105,
2573
- 100,
2574
- 125,
2575
- ]),
2576
- ],
2577
- },
2578
- },
2579
- },
2580
- listWorkflowDefinitions: {
2581
- name: "ListWorkflowDefinitions",
2582
- requestType: exports.ListWorkflowDefinitionsRequest,
2583
- requestStream: false,
2584
- responseType: exports.ListWorkflowDefinitionsResponse,
2585
- responseStream: false,
2586
- options: {
2587
- _unknownFields: {
2588
- 578365826: [
2589
- new Uint8Array([15, 18, 13, 47, 118, 49, 47, 119, 111, 114, 107, 102, 108, 111, 119, 115]),
2590
- ],
2591
- },
2592
- },
2593
- },
2594
- updateWorkflowDraft: {
2595
- name: "UpdateWorkflowDraft",
2596
- requestType: exports.UpdateWorkflowDraftRequest,
2597
- requestStream: false,
2598
- responseType: exports.UpdateWorkflowDraftResponse,
2599
- responseStream: false,
2600
- options: {
2601
- _unknownFields: {
2602
- 578365826: [
2603
- new Uint8Array([
2604
- 49,
2605
- 58,
2606
- 1,
2607
- 42,
2608
- 50,
2609
- 44,
2610
- 47,
2611
- 118,
2612
- 49,
2613
- 47,
2614
- 119,
2615
- 111,
2616
- 114,
2617
- 107,
2618
- 102,
2619
- 108,
2620
- 111,
2621
- 119,
2622
- 115,
2623
- 47,
2624
- 123,
2625
- 119,
2626
- 111,
2627
- 114,
2628
- 107,
2629
- 102,
2630
- 108,
2631
- 111,
2632
- 119,
2633
- 95,
2634
- 100,
2635
- 101,
2636
- 102,
2637
- 105,
2638
- 110,
2639
- 105,
2640
- 116,
2641
- 105,
2642
- 111,
2643
- 110,
2644
- 95,
2645
- 105,
2646
- 100,
2647
- 125,
2648
- 47,
2649
- 100,
2650
- 114,
2651
- 97,
2652
- 102,
2653
- 116,
2654
- ]),
2655
- ],
2656
- },
2657
- },
2658
- },
2659
- watchWorkflowDraftEvents: {
2660
- name: "WatchWorkflowDraftEvents",
2661
- requestType: exports.WatchWorkflowDraftEventsRequest,
2662
- requestStream: false,
2663
- responseType: exports.WatchWorkflowDraftEventsResponse,
2664
- responseStream: true,
2665
- options: {},
2666
- },
2667
- planWorkflowPublish: {
2668
- name: "PlanWorkflowPublish",
2669
- requestType: exports.PlanWorkflowPublishRequest,
2670
- requestStream: false,
2671
- responseType: exports.PlanWorkflowPublishResponse,
2672
- responseStream: false,
2673
- options: {
2674
- _unknownFields: {
2675
- 578365826: [
2676
- new Uint8Array([
2677
- 61,
2678
- 58,
2679
- 1,
2680
- 42,
2681
- 34,
2682
- 56,
2683
- 47,
2684
- 118,
2685
- 49,
2686
- 47,
2687
- 119,
2688
- 111,
2689
- 114,
2690
- 107,
2691
- 102,
2692
- 108,
2693
- 111,
2694
- 119,
2695
- 115,
2696
- 47,
2697
- 123,
2698
- 119,
2699
- 111,
2700
- 114,
2701
- 107,
2702
- 102,
2703
- 108,
2704
- 111,
2705
- 119,
2706
- 95,
2707
- 100,
2708
- 101,
2709
- 102,
2710
- 105,
2711
- 110,
2712
- 105,
2713
- 116,
2714
- 105,
2715
- 111,
2716
- 110,
2717
- 95,
2718
- 105,
2719
- 100,
2720
- 125,
2721
- 47,
2722
- 100,
2723
- 114,
2724
- 97,
2725
- 102,
2726
- 116,
2727
- 58,
2728
- 112,
2729
- 108,
2730
- 97,
2731
- 110,
2732
- 80,
2733
- 117,
2734
- 98,
2735
- 108,
2736
- 105,
2737
- 115,
2738
- 104,
2739
- ]),
2740
- ],
2741
- },
2742
- },
2743
- },
2744
- publishWorkflowDefinition: {
2745
- name: "PublishWorkflowDefinition",
2746
- requestType: exports.PublishWorkflowDefinitionRequest,
2747
- requestStream: false,
2748
- responseType: exports.PublishWorkflowDefinitionResponse,
2749
- responseStream: false,
2750
- options: {
2751
- _unknownFields: {
2752
- 578365826: [
2753
- new Uint8Array([
2754
- 51,
2755
- 58,
2756
- 1,
2757
- 42,
2758
- 34,
2759
- 46,
2760
- 47,
2761
- 118,
2762
- 49,
2763
- 47,
2764
- 119,
2765
- 111,
2766
- 114,
2767
- 107,
2768
- 102,
2769
- 108,
2770
- 111,
2771
- 119,
2772
- 115,
2773
- 47,
2774
- 123,
2775
- 119,
2776
- 111,
2777
- 114,
2778
- 107,
2779
- 102,
2780
- 108,
2781
- 111,
2782
- 119,
2783
- 95,
2784
- 100,
2785
- 101,
2786
- 102,
2787
- 105,
2788
- 110,
2789
- 105,
2790
- 116,
2791
- 105,
2792
- 111,
2793
- 110,
2794
- 95,
2795
- 105,
2796
- 100,
2797
- 125,
2798
- 58,
2799
- 112,
2800
- 117,
2801
- 98,
2802
- 108,
2803
- 105,
2804
- 115,
2805
- 104,
2806
- ]),
2807
- ],
2808
- },
2809
- },
2810
- },
2811
- getWorkflowVersion: {
2812
- name: "GetWorkflowVersion",
2813
- requestType: exports.GetWorkflowVersionRequest,
2814
- requestStream: false,
2815
- responseType: exports.GetWorkflowVersionResponse,
2816
- responseStream: false,
2817
- options: {
2818
- _unknownFields: {
2819
- 578365826: [
2820
- new Uint8Array([
2821
- 59,
2822
- 18,
2823
- 57,
2824
- 47,
2825
- 118,
2826
- 49,
2827
- 47,
2828
- 119,
2829
- 111,
2830
- 114,
2831
- 107,
2832
- 102,
2833
- 108,
2834
- 111,
2835
- 119,
2836
- 115,
2837
- 47,
2838
- 123,
2839
- 119,
2840
- 111,
2841
- 114,
2842
- 107,
2843
- 102,
2844
- 108,
2845
- 111,
2846
- 119,
2847
- 95,
2848
- 100,
2849
- 101,
2850
- 102,
2851
- 105,
2852
- 110,
2853
- 105,
2854
- 116,
2855
- 105,
2856
- 111,
2857
- 110,
2858
- 95,
2859
- 105,
2860
- 100,
2861
- 125,
2862
- 47,
2863
- 118,
2864
- 101,
2865
- 114,
2866
- 115,
2867
- 105,
2868
- 111,
2869
- 110,
2870
- 115,
2871
- 47,
2872
- 123,
2873
- 118,
2874
- 101,
2875
- 114,
2876
- 115,
2877
- 105,
2878
- 111,
2879
- 110,
2880
- 125,
2881
- ]),
2882
- ],
2883
- },
2884
- },
2885
- },
2886
- listWorkflowVersions: {
2887
- name: "ListWorkflowVersions",
2888
- requestType: exports.ListWorkflowVersionsRequest,
2889
- requestStream: false,
2890
- responseType: exports.ListWorkflowVersionsResponse,
2891
- responseStream: false,
2892
- options: {
2893
- _unknownFields: {
2894
- 578365826: [
2895
- new Uint8Array([
2896
- 49,
2897
- 18,
2898
- 47,
2899
- 47,
2900
- 118,
2901
- 49,
2902
- 47,
2903
- 119,
2904
- 111,
2905
- 114,
2906
- 107,
2907
- 102,
2908
- 108,
2909
- 111,
2910
- 119,
2911
- 115,
2912
- 47,
2913
- 123,
2914
- 119,
2915
- 111,
2916
- 114,
2917
- 107,
2918
- 102,
2919
- 108,
2920
- 111,
2921
- 119,
2922
- 95,
2923
- 100,
2924
- 101,
2925
- 102,
2926
- 105,
2927
- 110,
2928
- 105,
2929
- 116,
2930
- 105,
2931
- 111,
2932
- 110,
2933
- 95,
2934
- 105,
2935
- 100,
2936
- 125,
2937
- 47,
2938
- 118,
2939
- 101,
2940
- 114,
2941
- 115,
2942
- 105,
2943
- 111,
2944
- 110,
2945
- 115,
2946
- ]),
2947
- ],
2948
- },
2949
- },
2950
- },
2951
- runWorkflow: {
2952
- name: "RunWorkflow",
2953
- requestType: exports.RunWorkflowRequest,
2954
- requestStream: false,
2955
- responseType: exports.RunWorkflowResponse,
2956
- responseStream: false,
2957
- options: {
2958
- _unknownFields: {
2959
- 578365826: [
2960
- new Uint8Array([
2961
- 66,
2962
- 58,
2963
- 1,
2964
- 42,
2965
- 34,
2966
- 61,
2967
- 47,
2968
- 118,
2969
- 49,
2970
- 47,
2971
- 119,
2972
- 111,
2973
- 114,
2974
- 107,
2975
- 102,
2976
- 108,
2977
- 111,
2978
- 119,
2979
- 115,
2980
- 47,
2981
- 123,
2982
- 119,
2983
- 111,
2984
- 114,
2985
- 107,
2986
- 102,
2987
- 108,
2988
- 111,
2989
- 119,
2990
- 95,
2991
- 100,
2992
- 101,
2993
- 102,
2994
- 105,
2995
- 110,
2996
- 105,
2997
- 116,
2998
- 105,
2999
- 111,
3000
- 110,
3001
- 95,
3002
- 105,
3003
- 100,
3004
- 125,
3005
- 47,
3006
- 118,
3007
- 101,
3008
- 114,
3009
- 115,
3010
- 105,
3011
- 111,
3012
- 110,
3013
- 115,
3014
- 47,
3015
- 123,
3016
- 118,
3017
- 101,
3018
- 114,
3019
- 115,
3020
- 105,
3021
- 111,
3022
- 110,
3023
- 125,
3024
- 58,
3025
- 114,
3026
- 117,
3027
- 110,
3028
- ]),
3029
- ],
3030
- },
3031
- },
3032
- },
3033
- getWorkflowRun: {
3034
- name: "GetWorkflowRun",
3035
- requestType: exports.GetWorkflowRunRequest,
3036
- requestStream: false,
3037
- responseType: exports.GetWorkflowRunResponse,
3038
- responseStream: false,
3039
- options: {
3040
- _unknownFields: {
3041
- 578365826: [
3042
- new Uint8Array([
3043
- 37,
3044
- 18,
3045
- 35,
3046
- 47,
3047
- 118,
3048
- 49,
3049
- 47,
3050
- 119,
3051
- 111,
3052
- 114,
3053
- 107,
3054
- 102,
3055
- 108,
3056
- 111,
3057
- 119,
3058
- 45,
3059
- 114,
3060
- 117,
3061
- 110,
3062
- 115,
3063
- 47,
3064
- 123,
3065
- 119,
3066
- 111,
3067
- 114,
3068
- 107,
3069
- 102,
3070
- 108,
3071
- 111,
3072
- 119,
3073
- 95,
3074
- 114,
3075
- 117,
3076
- 110,
3077
- 95,
3078
- 105,
3079
- 100,
3080
- 125,
3081
- ]),
3082
- ],
3083
- },
3084
- },
3085
- },
3086
- listWorkflowRuns: {
3087
- name: "ListWorkflowRuns",
3088
- requestType: exports.ListWorkflowRunsRequest,
3089
- requestStream: false,
3090
- responseType: exports.ListWorkflowRunsResponse,
3091
- responseStream: false,
3092
- options: {
3093
- _unknownFields: {
3094
- 578365826: [
3095
- new Uint8Array([
3096
- 19,
3097
- 18,
3098
- 17,
3099
- 47,
3100
- 118,
3101
- 49,
3102
- 47,
3103
- 119,
3104
- 111,
3105
- 114,
3106
- 107,
3107
- 102,
3108
- 108,
3109
- 111,
3110
- 119,
3111
- 45,
3112
- 114,
3113
- 117,
3114
- 110,
3115
- 115,
3116
- ]),
3117
- ],
3118
- },
3119
- },
3120
- },
3121
- watchWorkflowRunEvents: {
3122
- name: "WatchWorkflowRunEvents",
3123
- requestType: exports.WatchWorkflowRunEventsRequest,
3124
- requestStream: false,
3125
- responseType: exports.WatchWorkflowRunEventsResponse,
3126
- responseStream: true,
3127
- options: {},
3128
- },
3129
- },
3130
- };
3131
- function longToNumber(int64) {
3132
- const num = globalThis.Number(int64.toString());
3133
- if (num > globalThis.Number.MAX_SAFE_INTEGER) {
3134
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
3135
- }
3136
- if (num < globalThis.Number.MIN_SAFE_INTEGER) {
3137
- throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
3138
- }
3139
- return num;
3140
- }
3141
- function isObject(value) {
3142
- return typeof value === "object" && value !== null;
3143
- }
3144
- function isSet(value) {
3145
- return value !== null && value !== undefined;
3146
- }