weave-typescript 0.45.0 → 0.47.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.
@@ -5,9 +5,9 @@
5
5
  // protoc unknown
6
6
  // source: weaveapi/workflow/v1/workflow.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ToolCallEvent = exports.WorkflowRunEvent = exports.WorkflowStepRun = exports.WorkflowRun = exports.WorkflowPublishPlanIssue = exports.WorkflowPublishPlan = exports.WorkflowEdge = exports.WorkflowStepDefinition = exports.WorkflowDefinition = exports.WorkflowVersion = exports.WorkflowDraftPatch = exports.WorkflowDraft = exports.WorkflowTemplate = exports.ToolCallState = exports.WorkflowRunEventKind = exports.WorkflowStepRunStatus = exports.WorkflowRunStatus = exports.WorkflowStepKind = exports.WorkflowTemplateStatus = exports.protobufPackage = void 0;
9
- exports.workflowTemplateStatusFromJSON = workflowTemplateStatusFromJSON;
10
- exports.workflowTemplateStatusToJSON = workflowTemplateStatusToJSON;
8
+ exports.ToolCallEvent = exports.WorkflowRunEvent = exports.WorkflowStepRun = exports.WorkflowRun = exports.WorkflowPublishPlanIssue = exports.WorkflowPublishPlan = exports.WorkflowEdge = exports.WorkflowStepDefinition = exports.WorkflowGraph = exports.WorkflowVersion = exports.WorkflowDraftPatch = exports.WorkflowDraft = exports.WorkflowDefinition = exports.ToolCallState = exports.WorkflowRunEventKind = exports.WorkflowStepRunStatus = exports.WorkflowRunStatus = exports.WorkflowStepKind = exports.WorkflowDefinitionStatus = exports.protobufPackage = void 0;
9
+ exports.workflowDefinitionStatusFromJSON = workflowDefinitionStatusFromJSON;
10
+ exports.workflowDefinitionStatusToJSON = workflowDefinitionStatusToJSON;
11
11
  exports.workflowStepKindFromJSON = workflowStepKindFromJSON;
12
12
  exports.workflowStepKindToJSON = workflowStepKindToJSON;
13
13
  exports.workflowRunStatusFromJSON = workflowRunStatusFromJSON;
@@ -23,39 +23,39 @@ const wire_1 = require("@bufbuild/protobuf/wire");
23
23
  const struct_pb_1 = require("../../../google/protobuf/struct.pb");
24
24
  const timestamp_pb_1 = require("../../../google/protobuf/timestamp.pb");
25
25
  exports.protobufPackage = "weaveapi.workflow.v1";
26
- var WorkflowTemplateStatus;
27
- (function (WorkflowTemplateStatus) {
28
- WorkflowTemplateStatus[WorkflowTemplateStatus["WORKFLOW_TEMPLATE_STATUS_UNSPECIFIED"] = 0] = "WORKFLOW_TEMPLATE_STATUS_UNSPECIFIED";
29
- WorkflowTemplateStatus[WorkflowTemplateStatus["WORKFLOW_TEMPLATE_STATUS_ACTIVE"] = 1] = "WORKFLOW_TEMPLATE_STATUS_ACTIVE";
30
- WorkflowTemplateStatus[WorkflowTemplateStatus["WORKFLOW_TEMPLATE_STATUS_ARCHIVED"] = 2] = "WORKFLOW_TEMPLATE_STATUS_ARCHIVED";
31
- WorkflowTemplateStatus[WorkflowTemplateStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
32
- })(WorkflowTemplateStatus || (exports.WorkflowTemplateStatus = WorkflowTemplateStatus = {}));
33
- function workflowTemplateStatusFromJSON(object) {
26
+ var WorkflowDefinitionStatus;
27
+ (function (WorkflowDefinitionStatus) {
28
+ WorkflowDefinitionStatus[WorkflowDefinitionStatus["WORKFLOW_DEFINITION_STATUS_UNSPECIFIED"] = 0] = "WORKFLOW_DEFINITION_STATUS_UNSPECIFIED";
29
+ WorkflowDefinitionStatus[WorkflowDefinitionStatus["WORKFLOW_DEFINITION_STATUS_ACTIVE"] = 1] = "WORKFLOW_DEFINITION_STATUS_ACTIVE";
30
+ WorkflowDefinitionStatus[WorkflowDefinitionStatus["WORKFLOW_DEFINITION_STATUS_ARCHIVED"] = 2] = "WORKFLOW_DEFINITION_STATUS_ARCHIVED";
31
+ WorkflowDefinitionStatus[WorkflowDefinitionStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
32
+ })(WorkflowDefinitionStatus || (exports.WorkflowDefinitionStatus = WorkflowDefinitionStatus = {}));
33
+ function workflowDefinitionStatusFromJSON(object) {
34
34
  switch (object) {
35
35
  case 0:
36
- case "WORKFLOW_TEMPLATE_STATUS_UNSPECIFIED":
37
- return WorkflowTemplateStatus.WORKFLOW_TEMPLATE_STATUS_UNSPECIFIED;
36
+ case "WORKFLOW_DEFINITION_STATUS_UNSPECIFIED":
37
+ return WorkflowDefinitionStatus.WORKFLOW_DEFINITION_STATUS_UNSPECIFIED;
38
38
  case 1:
39
- case "WORKFLOW_TEMPLATE_STATUS_ACTIVE":
40
- return WorkflowTemplateStatus.WORKFLOW_TEMPLATE_STATUS_ACTIVE;
39
+ case "WORKFLOW_DEFINITION_STATUS_ACTIVE":
40
+ return WorkflowDefinitionStatus.WORKFLOW_DEFINITION_STATUS_ACTIVE;
41
41
  case 2:
42
- case "WORKFLOW_TEMPLATE_STATUS_ARCHIVED":
43
- return WorkflowTemplateStatus.WORKFLOW_TEMPLATE_STATUS_ARCHIVED;
42
+ case "WORKFLOW_DEFINITION_STATUS_ARCHIVED":
43
+ return WorkflowDefinitionStatus.WORKFLOW_DEFINITION_STATUS_ARCHIVED;
44
44
  case -1:
45
45
  case "UNRECOGNIZED":
46
46
  default:
47
- return WorkflowTemplateStatus.UNRECOGNIZED;
47
+ return WorkflowDefinitionStatus.UNRECOGNIZED;
48
48
  }
49
49
  }
50
- function workflowTemplateStatusToJSON(object) {
50
+ function workflowDefinitionStatusToJSON(object) {
51
51
  switch (object) {
52
- case WorkflowTemplateStatus.WORKFLOW_TEMPLATE_STATUS_UNSPECIFIED:
53
- return "WORKFLOW_TEMPLATE_STATUS_UNSPECIFIED";
54
- case WorkflowTemplateStatus.WORKFLOW_TEMPLATE_STATUS_ACTIVE:
55
- return "WORKFLOW_TEMPLATE_STATUS_ACTIVE";
56
- case WorkflowTemplateStatus.WORKFLOW_TEMPLATE_STATUS_ARCHIVED:
57
- return "WORKFLOW_TEMPLATE_STATUS_ARCHIVED";
58
- case WorkflowTemplateStatus.UNRECOGNIZED:
52
+ case WorkflowDefinitionStatus.WORKFLOW_DEFINITION_STATUS_UNSPECIFIED:
53
+ return "WORKFLOW_DEFINITION_STATUS_UNSPECIFIED";
54
+ case WorkflowDefinitionStatus.WORKFLOW_DEFINITION_STATUS_ACTIVE:
55
+ return "WORKFLOW_DEFINITION_STATUS_ACTIVE";
56
+ case WorkflowDefinitionStatus.WORKFLOW_DEFINITION_STATUS_ARCHIVED:
57
+ return "WORKFLOW_DEFINITION_STATUS_ARCHIVED";
58
+ case WorkflowDefinitionStatus.UNRECOGNIZED:
59
59
  default:
60
60
  return "UNRECOGNIZED";
61
61
  }
@@ -413,7 +413,7 @@ function toolCallStateToJSON(object) {
413
413
  return "UNRECOGNIZED";
414
414
  }
415
415
  }
416
- function createBaseWorkflowTemplate() {
416
+ function createBaseWorkflowDefinition() {
417
417
  return {
418
418
  id: "",
419
419
  organizationId: "",
@@ -429,7 +429,7 @@ function createBaseWorkflowTemplate() {
429
429
  updatedAt: undefined,
430
430
  };
431
431
  }
432
- exports.WorkflowTemplate = {
432
+ exports.WorkflowDefinition = {
433
433
  encode(message, writer = new wire_1.BinaryWriter()) {
434
434
  if (message.id !== "") {
435
435
  writer.uint32(10).string(message.id);
@@ -472,7 +472,7 @@ exports.WorkflowTemplate = {
472
472
  decode(input, length) {
473
473
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
474
474
  const end = length === undefined ? reader.len : reader.pos + length;
475
- const message = createBaseWorkflowTemplate();
475
+ const message = createBaseWorkflowDefinition();
476
476
  while (reader.pos < end) {
477
477
  const tag = reader.uint32();
478
478
  switch (tag >>> 3) {
@@ -579,7 +579,7 @@ exports.WorkflowTemplate = {
579
579
  slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
580
580
  name: isSet(object.name) ? globalThis.String(object.name) : "",
581
581
  description: isSet(object.description) ? globalThis.String(object.description) : "",
582
- status: isSet(object.status) ? workflowTemplateStatusFromJSON(object.status) : 0,
582
+ status: isSet(object.status) ? workflowDefinitionStatusFromJSON(object.status) : 0,
583
583
  createdByUserId: isSet(object.createdByUserId)
584
584
  ? globalThis.String(object.createdByUserId)
585
585
  : isSet(object.created_by_user_id)
@@ -630,7 +630,7 @@ exports.WorkflowTemplate = {
630
630
  obj.description = message.description;
631
631
  }
632
632
  if (message.status !== 0) {
633
- obj.status = workflowTemplateStatusToJSON(message.status);
633
+ obj.status = workflowDefinitionStatusToJSON(message.status);
634
634
  }
635
635
  if (message.createdByUserId !== "") {
636
636
  obj.createdByUserId = message.createdByUserId;
@@ -653,11 +653,11 @@ exports.WorkflowTemplate = {
653
653
  return obj;
654
654
  },
655
655
  create(base) {
656
- return exports.WorkflowTemplate.fromPartial(base !== null && base !== void 0 ? base : {});
656
+ return exports.WorkflowDefinition.fromPartial(base !== null && base !== void 0 ? base : {});
657
657
  },
658
658
  fromPartial(object) {
659
659
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
660
- const message = createBaseWorkflowTemplate();
660
+ const message = createBaseWorkflowDefinition();
661
661
  message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
662
662
  message.organizationId = (_b = object.organizationId) !== null && _b !== void 0 ? _b : "";
663
663
  message.slug = (_c = object.slug) !== null && _c !== void 0 ? _c : "";
@@ -676,13 +676,13 @@ exports.WorkflowTemplate = {
676
676
  function createBaseWorkflowDraft() {
677
677
  return {
678
678
  id: "",
679
- templateId: "",
679
+ definitionId: "",
680
680
  organizationId: "",
681
681
  baseVersionId: "",
682
682
  revision: 0,
683
683
  name: "",
684
684
  description: "",
685
- definition: undefined,
685
+ graph: undefined,
686
686
  inputSchema: undefined,
687
687
  outputSchema: undefined,
688
688
  metadata: undefined,
@@ -696,8 +696,8 @@ exports.WorkflowDraft = {
696
696
  if (message.id !== "") {
697
697
  writer.uint32(10).string(message.id);
698
698
  }
699
- if (message.templateId !== "") {
700
- writer.uint32(18).string(message.templateId);
699
+ if (message.definitionId !== "") {
700
+ writer.uint32(18).string(message.definitionId);
701
701
  }
702
702
  if (message.organizationId !== "") {
703
703
  writer.uint32(26).string(message.organizationId);
@@ -714,8 +714,8 @@ exports.WorkflowDraft = {
714
714
  if (message.description !== "") {
715
715
  writer.uint32(58).string(message.description);
716
716
  }
717
- if (message.definition !== undefined) {
718
- exports.WorkflowDefinition.encode(message.definition, writer.uint32(66).fork()).join();
717
+ if (message.graph !== undefined) {
718
+ exports.WorkflowGraph.encode(message.graph, writer.uint32(66).fork()).join();
719
719
  }
720
720
  if (message.inputSchema !== undefined) {
721
721
  struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.inputSchema), writer.uint32(74).fork()).join();
@@ -755,7 +755,7 @@ exports.WorkflowDraft = {
755
755
  if (tag !== 18) {
756
756
  break;
757
757
  }
758
- message.templateId = reader.string();
758
+ message.definitionId = reader.string();
759
759
  continue;
760
760
  }
761
761
  case 3: {
@@ -797,7 +797,7 @@ exports.WorkflowDraft = {
797
797
  if (tag !== 66) {
798
798
  break;
799
799
  }
800
- message.definition = exports.WorkflowDefinition.decode(reader, reader.uint32());
800
+ message.graph = exports.WorkflowGraph.decode(reader, reader.uint32());
801
801
  continue;
802
802
  }
803
803
  case 9: {
@@ -853,10 +853,10 @@ exports.WorkflowDraft = {
853
853
  fromJSON(object) {
854
854
  return {
855
855
  id: isSet(object.id) ? globalThis.String(object.id) : "",
856
- templateId: isSet(object.templateId)
857
- ? globalThis.String(object.templateId)
858
- : isSet(object.template_id)
859
- ? globalThis.String(object.template_id)
856
+ definitionId: isSet(object.definitionId)
857
+ ? globalThis.String(object.definitionId)
858
+ : isSet(object.definition_id)
859
+ ? globalThis.String(object.definition_id)
860
860
  : "",
861
861
  organizationId: isSet(object.organizationId)
862
862
  ? globalThis.String(object.organizationId)
@@ -871,7 +871,7 @@ exports.WorkflowDraft = {
871
871
  revision: isSet(object.revision) ? globalThis.Number(object.revision) : 0,
872
872
  name: isSet(object.name) ? globalThis.String(object.name) : "",
873
873
  description: isSet(object.description) ? globalThis.String(object.description) : "",
874
- definition: isSet(object.definition) ? exports.WorkflowDefinition.fromJSON(object.definition) : undefined,
874
+ graph: isSet(object.graph) ? exports.WorkflowGraph.fromJSON(object.graph) : undefined,
875
875
  inputSchema: isObject(object.inputSchema)
876
876
  ? object.inputSchema
877
877
  : isObject(object.input_schema)
@@ -905,8 +905,8 @@ exports.WorkflowDraft = {
905
905
  if (message.id !== "") {
906
906
  obj.id = message.id;
907
907
  }
908
- if (message.templateId !== "") {
909
- obj.templateId = message.templateId;
908
+ if (message.definitionId !== "") {
909
+ obj.definitionId = message.definitionId;
910
910
  }
911
911
  if (message.organizationId !== "") {
912
912
  obj.organizationId = message.organizationId;
@@ -923,8 +923,8 @@ exports.WorkflowDraft = {
923
923
  if (message.description !== "") {
924
924
  obj.description = message.description;
925
925
  }
926
- if (message.definition !== undefined) {
927
- obj.definition = exports.WorkflowDefinition.toJSON(message.definition);
926
+ if (message.graph !== undefined) {
927
+ obj.graph = exports.WorkflowGraph.toJSON(message.graph);
928
928
  }
929
929
  if (message.inputSchema !== undefined) {
930
930
  obj.inputSchema = message.inputSchema;
@@ -953,14 +953,14 @@ exports.WorkflowDraft = {
953
953
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
954
954
  const message = createBaseWorkflowDraft();
955
955
  message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
956
- message.templateId = (_b = object.templateId) !== null && _b !== void 0 ? _b : "";
956
+ message.definitionId = (_b = object.definitionId) !== null && _b !== void 0 ? _b : "";
957
957
  message.organizationId = (_c = object.organizationId) !== null && _c !== void 0 ? _c : "";
958
958
  message.baseVersionId = (_d = object.baseVersionId) !== null && _d !== void 0 ? _d : "";
959
959
  message.revision = (_e = object.revision) !== null && _e !== void 0 ? _e : 0;
960
960
  message.name = (_f = object.name) !== null && _f !== void 0 ? _f : "";
961
961
  message.description = (_g = object.description) !== null && _g !== void 0 ? _g : "";
962
- message.definition = (object.definition !== undefined && object.definition !== null)
963
- ? exports.WorkflowDefinition.fromPartial(object.definition)
962
+ message.graph = (object.graph !== undefined && object.graph !== null)
963
+ ? exports.WorkflowGraph.fromPartial(object.graph)
964
964
  : undefined;
965
965
  message.inputSchema = (_h = object.inputSchema) !== null && _h !== void 0 ? _h : undefined;
966
966
  message.outputSchema = (_j = object.outputSchema) !== null && _j !== void 0 ? _j : undefined;
@@ -974,7 +974,7 @@ exports.WorkflowDraft = {
974
974
  function createBaseWorkflowDraftPatch() {
975
975
  return {
976
976
  id: "",
977
- templateId: "",
977
+ definitionId: "",
978
978
  organizationId: "",
979
979
  revision: 0,
980
980
  patch: undefined,
@@ -987,8 +987,8 @@ exports.WorkflowDraftPatch = {
987
987
  if (message.id !== "") {
988
988
  writer.uint32(10).string(message.id);
989
989
  }
990
- if (message.templateId !== "") {
991
- writer.uint32(18).string(message.templateId);
990
+ if (message.definitionId !== "") {
991
+ writer.uint32(18).string(message.definitionId);
992
992
  }
993
993
  if (message.organizationId !== "") {
994
994
  writer.uint32(26).string(message.organizationId);
@@ -1025,7 +1025,7 @@ exports.WorkflowDraftPatch = {
1025
1025
  if (tag !== 18) {
1026
1026
  break;
1027
1027
  }
1028
- message.templateId = reader.string();
1028
+ message.definitionId = reader.string();
1029
1029
  continue;
1030
1030
  }
1031
1031
  case 3: {
@@ -1074,10 +1074,10 @@ exports.WorkflowDraftPatch = {
1074
1074
  fromJSON(object) {
1075
1075
  return {
1076
1076
  id: isSet(object.id) ? globalThis.String(object.id) : "",
1077
- templateId: isSet(object.templateId)
1078
- ? globalThis.String(object.templateId)
1079
- : isSet(object.template_id)
1080
- ? globalThis.String(object.template_id)
1077
+ definitionId: isSet(object.definitionId)
1078
+ ? globalThis.String(object.definitionId)
1079
+ : isSet(object.definition_id)
1080
+ ? globalThis.String(object.definition_id)
1081
1081
  : "",
1082
1082
  organizationId: isSet(object.organizationId)
1083
1083
  ? globalThis.String(object.organizationId)
@@ -1103,8 +1103,8 @@ exports.WorkflowDraftPatch = {
1103
1103
  if (message.id !== "") {
1104
1104
  obj.id = message.id;
1105
1105
  }
1106
- if (message.templateId !== "") {
1107
- obj.templateId = message.templateId;
1106
+ if (message.definitionId !== "") {
1107
+ obj.definitionId = message.definitionId;
1108
1108
  }
1109
1109
  if (message.organizationId !== "") {
1110
1110
  obj.organizationId = message.organizationId;
@@ -1130,7 +1130,7 @@ exports.WorkflowDraftPatch = {
1130
1130
  var _a, _b, _c, _d, _e, _f, _g;
1131
1131
  const message = createBaseWorkflowDraftPatch();
1132
1132
  message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
1133
- message.templateId = (_b = object.templateId) !== null && _b !== void 0 ? _b : "";
1133
+ message.definitionId = (_b = object.definitionId) !== null && _b !== void 0 ? _b : "";
1134
1134
  message.organizationId = (_c = object.organizationId) !== null && _c !== void 0 ? _c : "";
1135
1135
  message.revision = (_d = object.revision) !== null && _d !== void 0 ? _d : 0;
1136
1136
  message.patch = (_e = object.patch) !== null && _e !== void 0 ? _e : undefined;
@@ -1142,13 +1142,13 @@ exports.WorkflowDraftPatch = {
1142
1142
  function createBaseWorkflowVersion() {
1143
1143
  return {
1144
1144
  id: "",
1145
- templateId: "",
1145
+ definitionId: "",
1146
1146
  organizationId: "",
1147
1147
  version: 0,
1148
1148
  sourceDraftRevision: 0,
1149
1149
  name: "",
1150
1150
  description: "",
1151
- definition: undefined,
1151
+ graph: undefined,
1152
1152
  inputSchema: undefined,
1153
1153
  outputSchema: undefined,
1154
1154
  metadata: undefined,
@@ -1161,8 +1161,8 @@ exports.WorkflowVersion = {
1161
1161
  if (message.id !== "") {
1162
1162
  writer.uint32(10).string(message.id);
1163
1163
  }
1164
- if (message.templateId !== "") {
1165
- writer.uint32(18).string(message.templateId);
1164
+ if (message.definitionId !== "") {
1165
+ writer.uint32(18).string(message.definitionId);
1166
1166
  }
1167
1167
  if (message.organizationId !== "") {
1168
1168
  writer.uint32(26).string(message.organizationId);
@@ -1179,8 +1179,8 @@ exports.WorkflowVersion = {
1179
1179
  if (message.description !== "") {
1180
1180
  writer.uint32(58).string(message.description);
1181
1181
  }
1182
- if (message.definition !== undefined) {
1183
- exports.WorkflowDefinition.encode(message.definition, writer.uint32(66).fork()).join();
1182
+ if (message.graph !== undefined) {
1183
+ exports.WorkflowGraph.encode(message.graph, writer.uint32(66).fork()).join();
1184
1184
  }
1185
1185
  if (message.inputSchema !== undefined) {
1186
1186
  struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.inputSchema), writer.uint32(74).fork()).join();
@@ -1217,7 +1217,7 @@ exports.WorkflowVersion = {
1217
1217
  if (tag !== 18) {
1218
1218
  break;
1219
1219
  }
1220
- message.templateId = reader.string();
1220
+ message.definitionId = reader.string();
1221
1221
  continue;
1222
1222
  }
1223
1223
  case 3: {
@@ -1259,7 +1259,7 @@ exports.WorkflowVersion = {
1259
1259
  if (tag !== 66) {
1260
1260
  break;
1261
1261
  }
1262
- message.definition = exports.WorkflowDefinition.decode(reader, reader.uint32());
1262
+ message.graph = exports.WorkflowGraph.decode(reader, reader.uint32());
1263
1263
  continue;
1264
1264
  }
1265
1265
  case 9: {
@@ -1308,10 +1308,10 @@ exports.WorkflowVersion = {
1308
1308
  fromJSON(object) {
1309
1309
  return {
1310
1310
  id: isSet(object.id) ? globalThis.String(object.id) : "",
1311
- templateId: isSet(object.templateId)
1312
- ? globalThis.String(object.templateId)
1313
- : isSet(object.template_id)
1314
- ? globalThis.String(object.template_id)
1311
+ definitionId: isSet(object.definitionId)
1312
+ ? globalThis.String(object.definitionId)
1313
+ : isSet(object.definition_id)
1314
+ ? globalThis.String(object.definition_id)
1315
1315
  : "",
1316
1316
  organizationId: isSet(object.organizationId)
1317
1317
  ? globalThis.String(object.organizationId)
@@ -1326,7 +1326,7 @@ exports.WorkflowVersion = {
1326
1326
  : 0,
1327
1327
  name: isSet(object.name) ? globalThis.String(object.name) : "",
1328
1328
  description: isSet(object.description) ? globalThis.String(object.description) : "",
1329
- definition: isSet(object.definition) ? exports.WorkflowDefinition.fromJSON(object.definition) : undefined,
1329
+ graph: isSet(object.graph) ? exports.WorkflowGraph.fromJSON(object.graph) : undefined,
1330
1330
  inputSchema: isObject(object.inputSchema)
1331
1331
  ? object.inputSchema
1332
1332
  : isObject(object.input_schema)
@@ -1355,8 +1355,8 @@ exports.WorkflowVersion = {
1355
1355
  if (message.id !== "") {
1356
1356
  obj.id = message.id;
1357
1357
  }
1358
- if (message.templateId !== "") {
1359
- obj.templateId = message.templateId;
1358
+ if (message.definitionId !== "") {
1359
+ obj.definitionId = message.definitionId;
1360
1360
  }
1361
1361
  if (message.organizationId !== "") {
1362
1362
  obj.organizationId = message.organizationId;
@@ -1373,8 +1373,8 @@ exports.WorkflowVersion = {
1373
1373
  if (message.description !== "") {
1374
1374
  obj.description = message.description;
1375
1375
  }
1376
- if (message.definition !== undefined) {
1377
- obj.definition = exports.WorkflowDefinition.toJSON(message.definition);
1376
+ if (message.graph !== undefined) {
1377
+ obj.graph = exports.WorkflowGraph.toJSON(message.graph);
1378
1378
  }
1379
1379
  if (message.inputSchema !== undefined) {
1380
1380
  obj.inputSchema = message.inputSchema;
@@ -1400,14 +1400,14 @@ exports.WorkflowVersion = {
1400
1400
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1401
1401
  const message = createBaseWorkflowVersion();
1402
1402
  message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
1403
- message.templateId = (_b = object.templateId) !== null && _b !== void 0 ? _b : "";
1403
+ message.definitionId = (_b = object.definitionId) !== null && _b !== void 0 ? _b : "";
1404
1404
  message.organizationId = (_c = object.organizationId) !== null && _c !== void 0 ? _c : "";
1405
1405
  message.version = (_d = object.version) !== null && _d !== void 0 ? _d : 0;
1406
1406
  message.sourceDraftRevision = (_e = object.sourceDraftRevision) !== null && _e !== void 0 ? _e : 0;
1407
1407
  message.name = (_f = object.name) !== null && _f !== void 0 ? _f : "";
1408
1408
  message.description = (_g = object.description) !== null && _g !== void 0 ? _g : "";
1409
- message.definition = (object.definition !== undefined && object.definition !== null)
1410
- ? exports.WorkflowDefinition.fromPartial(object.definition)
1409
+ message.graph = (object.graph !== undefined && object.graph !== null)
1410
+ ? exports.WorkflowGraph.fromPartial(object.graph)
1411
1411
  : undefined;
1412
1412
  message.inputSchema = (_h = object.inputSchema) !== null && _h !== void 0 ? _h : undefined;
1413
1413
  message.outputSchema = (_j = object.outputSchema) !== null && _j !== void 0 ? _j : undefined;
@@ -1417,10 +1417,10 @@ exports.WorkflowVersion = {
1417
1417
  return message;
1418
1418
  },
1419
1419
  };
1420
- function createBaseWorkflowDefinition() {
1420
+ function createBaseWorkflowGraph() {
1421
1421
  return { steps: [], edges: [], config: undefined };
1422
1422
  }
1423
- exports.WorkflowDefinition = {
1423
+ exports.WorkflowGraph = {
1424
1424
  encode(message, writer = new wire_1.BinaryWriter()) {
1425
1425
  for (const v of message.steps) {
1426
1426
  exports.WorkflowStepDefinition.encode(v, writer.uint32(10).fork()).join();
@@ -1436,7 +1436,7 @@ exports.WorkflowDefinition = {
1436
1436
  decode(input, length) {
1437
1437
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1438
1438
  const end = length === undefined ? reader.len : reader.pos + length;
1439
- const message = createBaseWorkflowDefinition();
1439
+ const message = createBaseWorkflowGraph();
1440
1440
  while (reader.pos < end) {
1441
1441
  const tag = reader.uint32();
1442
1442
  switch (tag >>> 3) {
@@ -1493,12 +1493,12 @@ exports.WorkflowDefinition = {
1493
1493
  return obj;
1494
1494
  },
1495
1495
  create(base) {
1496
- return exports.WorkflowDefinition.fromPartial(base !== null && base !== void 0 ? base : {});
1496
+ return exports.WorkflowGraph.fromPartial(base !== null && base !== void 0 ? base : {});
1497
1497
  },
1498
1498
  fromPartial(object) {
1499
1499
  var _a, _b;
1500
1500
  var _c;
1501
- const message = createBaseWorkflowDefinition();
1501
+ const message = createBaseWorkflowGraph();
1502
1502
  message.steps = ((_a = object.steps) === null || _a === void 0 ? void 0 : _a.map((e) => exports.WorkflowStepDefinition.fromPartial(e))) || [];
1503
1503
  message.edges = ((_b = object.edges) === null || _b === void 0 ? void 0 : _b.map((e) => exports.WorkflowEdge.fromPartial(e))) || [];
1504
1504
  message.config = (_c = object.config) !== null && _c !== void 0 ? _c : undefined;
@@ -1822,12 +1822,12 @@ exports.WorkflowEdge = {
1822
1822
  },
1823
1823
  };
1824
1824
  function createBaseWorkflowPublishPlan() {
1825
- return { templateId: "", draftRevision: 0, publishable: false, issues: [], compiledPreview: undefined };
1825
+ return { definitionId: "", draftRevision: 0, publishable: false, issues: [], compiledPreview: undefined };
1826
1826
  }
1827
1827
  exports.WorkflowPublishPlan = {
1828
1828
  encode(message, writer = new wire_1.BinaryWriter()) {
1829
- if (message.templateId !== "") {
1830
- writer.uint32(10).string(message.templateId);
1829
+ if (message.definitionId !== "") {
1830
+ writer.uint32(10).string(message.definitionId);
1831
1831
  }
1832
1832
  if (message.draftRevision !== 0) {
1833
1833
  writer.uint32(16).int32(message.draftRevision);
@@ -1854,7 +1854,7 @@ exports.WorkflowPublishPlan = {
1854
1854
  if (tag !== 10) {
1855
1855
  break;
1856
1856
  }
1857
- message.templateId = reader.string();
1857
+ message.definitionId = reader.string();
1858
1858
  continue;
1859
1859
  }
1860
1860
  case 2: {
@@ -1895,10 +1895,10 @@ exports.WorkflowPublishPlan = {
1895
1895
  },
1896
1896
  fromJSON(object) {
1897
1897
  return {
1898
- templateId: isSet(object.templateId)
1899
- ? globalThis.String(object.templateId)
1900
- : isSet(object.template_id)
1901
- ? globalThis.String(object.template_id)
1898
+ definitionId: isSet(object.definitionId)
1899
+ ? globalThis.String(object.definitionId)
1900
+ : isSet(object.definition_id)
1901
+ ? globalThis.String(object.definition_id)
1902
1902
  : "",
1903
1903
  draftRevision: isSet(object.draftRevision)
1904
1904
  ? globalThis.Number(object.draftRevision)
@@ -1919,8 +1919,8 @@ exports.WorkflowPublishPlan = {
1919
1919
  toJSON(message) {
1920
1920
  var _a;
1921
1921
  const obj = {};
1922
- if (message.templateId !== "") {
1923
- obj.templateId = message.templateId;
1922
+ if (message.definitionId !== "") {
1923
+ obj.definitionId = message.definitionId;
1924
1924
  }
1925
1925
  if (message.draftRevision !== 0) {
1926
1926
  obj.draftRevision = Math.round(message.draftRevision);
@@ -1943,7 +1943,7 @@ exports.WorkflowPublishPlan = {
1943
1943
  var _a;
1944
1944
  var _b, _c, _d, _e;
1945
1945
  const message = createBaseWorkflowPublishPlan();
1946
- message.templateId = (_b = object.templateId) !== null && _b !== void 0 ? _b : "";
1946
+ message.definitionId = (_b = object.definitionId) !== null && _b !== void 0 ? _b : "";
1947
1947
  message.draftRevision = (_c = object.draftRevision) !== null && _c !== void 0 ? _c : 0;
1948
1948
  message.publishable = (_d = object.publishable) !== null && _d !== void 0 ? _d : false;
1949
1949
  message.issues = ((_a = object.issues) === null || _a === void 0 ? void 0 : _a.map((e) => exports.WorkflowPublishPlanIssue.fromPartial(e))) || [];
@@ -2039,7 +2039,7 @@ function createBaseWorkflowRun() {
2039
2039
  return {
2040
2040
  id: "",
2041
2041
  organizationId: "",
2042
- workflowTemplateId: "",
2042
+ workflowDefinitionId: "",
2043
2043
  workflowVersionId: "",
2044
2044
  status: 0,
2045
2045
  createdByUserId: "",
@@ -2061,8 +2061,8 @@ exports.WorkflowRun = {
2061
2061
  if (message.organizationId !== "") {
2062
2062
  writer.uint32(18).string(message.organizationId);
2063
2063
  }
2064
- if (message.workflowTemplateId !== "") {
2065
- writer.uint32(26).string(message.workflowTemplateId);
2064
+ if (message.workflowDefinitionId !== "") {
2065
+ writer.uint32(26).string(message.workflowDefinitionId);
2066
2066
  }
2067
2067
  if (message.workflowVersionId !== "") {
2068
2068
  writer.uint32(34).string(message.workflowVersionId);
@@ -2124,7 +2124,7 @@ exports.WorkflowRun = {
2124
2124
  if (tag !== 26) {
2125
2125
  break;
2126
2126
  }
2127
- message.workflowTemplateId = reader.string();
2127
+ message.workflowDefinitionId = reader.string();
2128
2128
  continue;
2129
2129
  }
2130
2130
  case 4: {
@@ -2220,10 +2220,10 @@ exports.WorkflowRun = {
2220
2220
  : isSet(object.organization_id)
2221
2221
  ? globalThis.String(object.organization_id)
2222
2222
  : "",
2223
- workflowTemplateId: isSet(object.workflowTemplateId)
2224
- ? globalThis.String(object.workflowTemplateId)
2225
- : isSet(object.workflow_template_id)
2226
- ? globalThis.String(object.workflow_template_id)
2223
+ workflowDefinitionId: isSet(object.workflowDefinitionId)
2224
+ ? globalThis.String(object.workflowDefinitionId)
2225
+ : isSet(object.workflow_definition_id)
2226
+ ? globalThis.String(object.workflow_definition_id)
2227
2227
  : "",
2228
2228
  workflowVersionId: isSet(object.workflowVersionId)
2229
2229
  ? globalThis.String(object.workflowVersionId)
@@ -2278,8 +2278,8 @@ exports.WorkflowRun = {
2278
2278
  if (message.organizationId !== "") {
2279
2279
  obj.organizationId = message.organizationId;
2280
2280
  }
2281
- if (message.workflowTemplateId !== "") {
2282
- obj.workflowTemplateId = message.workflowTemplateId;
2281
+ if (message.workflowDefinitionId !== "") {
2282
+ obj.workflowDefinitionId = message.workflowDefinitionId;
2283
2283
  }
2284
2284
  if (message.workflowVersionId !== "") {
2285
2285
  obj.workflowVersionId = message.workflowVersionId;
@@ -2324,7 +2324,7 @@ exports.WorkflowRun = {
2324
2324
  const message = createBaseWorkflowRun();
2325
2325
  message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
2326
2326
  message.organizationId = (_b = object.organizationId) !== null && _b !== void 0 ? _b : "";
2327
- message.workflowTemplateId = (_c = object.workflowTemplateId) !== null && _c !== void 0 ? _c : "";
2327
+ message.workflowDefinitionId = (_c = object.workflowDefinitionId) !== null && _c !== void 0 ? _c : "";
2328
2328
  message.workflowVersionId = (_d = object.workflowVersionId) !== null && _d !== void 0 ? _d : "";
2329
2329
  message.status = (_e = object.status) !== null && _e !== void 0 ? _e : 0;
2330
2330
  message.createdByUserId = (_f = object.createdByUserId) !== null && _f !== void 0 ? _f : "";