weave-typescript 0.51.2 → 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 +2 -2
  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
@@ -0,0 +1,2084 @@
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/run.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.WorkflowRunServiceDefinition = exports.WorkflowRunServiceClientImpl = exports.WorkflowRunServiceServiceName = exports.WorkflowRunStep = exports.WorkflowRun = exports.ListWorkflowRunStepsResponse = exports.ListWorkflowRunStepsRequest = exports.ListWorkflowRunsResponse = exports.ListWorkflowRunsRequest = exports.CancelWorkflowRunResponse = exports.CancelWorkflowRunRequest = exports.GetWorkflowRunResponse = exports.GetWorkflowRunRequest = exports.CreateWorkflowRunResponse = exports.CreateWorkflowRunRequest = exports.WorkflowRunStepStatus = exports.WorkflowRunStepKind = exports.WorkflowRunStatus = exports.protobufPackage = void 0;
9
+ exports.workflowRunStatusFromJSON = workflowRunStatusFromJSON;
10
+ exports.workflowRunStatusToJSON = workflowRunStatusToJSON;
11
+ exports.workflowRunStepKindFromJSON = workflowRunStepKindFromJSON;
12
+ exports.workflowRunStepKindToJSON = workflowRunStepKindToJSON;
13
+ exports.workflowRunStepStatusFromJSON = workflowRunStepStatusFromJSON;
14
+ exports.workflowRunStepStatusToJSON = workflowRunStepStatusToJSON;
15
+ /* eslint-disable */
16
+ const wire_1 = require("@bufbuild/protobuf/wire");
17
+ const struct_pb_1 = require("../../../google/protobuf/struct.pb");
18
+ const timestamp_pb_1 = require("../../../google/protobuf/timestamp.pb");
19
+ exports.protobufPackage = "weaveapi.workflow.v1";
20
+ var WorkflowRunStatus;
21
+ (function (WorkflowRunStatus) {
22
+ WorkflowRunStatus[WorkflowRunStatus["WORKFLOW_RUN_STATUS_UNSPECIFIED"] = 0] = "WORKFLOW_RUN_STATUS_UNSPECIFIED";
23
+ WorkflowRunStatus[WorkflowRunStatus["WORKFLOW_RUN_STATUS_PENDING"] = 1] = "WORKFLOW_RUN_STATUS_PENDING";
24
+ WorkflowRunStatus[WorkflowRunStatus["WORKFLOW_RUN_STATUS_RUNNING"] = 2] = "WORKFLOW_RUN_STATUS_RUNNING";
25
+ WorkflowRunStatus[WorkflowRunStatus["WORKFLOW_RUN_STATUS_WAITING"] = 3] = "WORKFLOW_RUN_STATUS_WAITING";
26
+ WorkflowRunStatus[WorkflowRunStatus["WORKFLOW_RUN_STATUS_COMPLETED"] = 4] = "WORKFLOW_RUN_STATUS_COMPLETED";
27
+ WorkflowRunStatus[WorkflowRunStatus["WORKFLOW_RUN_STATUS_FAILED"] = 5] = "WORKFLOW_RUN_STATUS_FAILED";
28
+ WorkflowRunStatus[WorkflowRunStatus["WORKFLOW_RUN_STATUS_CANCELED"] = 6] = "WORKFLOW_RUN_STATUS_CANCELED";
29
+ WorkflowRunStatus[WorkflowRunStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
30
+ })(WorkflowRunStatus || (exports.WorkflowRunStatus = WorkflowRunStatus = {}));
31
+ function workflowRunStatusFromJSON(object) {
32
+ switch (object) {
33
+ case 0:
34
+ case "WORKFLOW_RUN_STATUS_UNSPECIFIED":
35
+ return WorkflowRunStatus.WORKFLOW_RUN_STATUS_UNSPECIFIED;
36
+ case 1:
37
+ case "WORKFLOW_RUN_STATUS_PENDING":
38
+ return WorkflowRunStatus.WORKFLOW_RUN_STATUS_PENDING;
39
+ case 2:
40
+ case "WORKFLOW_RUN_STATUS_RUNNING":
41
+ return WorkflowRunStatus.WORKFLOW_RUN_STATUS_RUNNING;
42
+ case 3:
43
+ case "WORKFLOW_RUN_STATUS_WAITING":
44
+ return WorkflowRunStatus.WORKFLOW_RUN_STATUS_WAITING;
45
+ case 4:
46
+ case "WORKFLOW_RUN_STATUS_COMPLETED":
47
+ return WorkflowRunStatus.WORKFLOW_RUN_STATUS_COMPLETED;
48
+ case 5:
49
+ case "WORKFLOW_RUN_STATUS_FAILED":
50
+ return WorkflowRunStatus.WORKFLOW_RUN_STATUS_FAILED;
51
+ case 6:
52
+ case "WORKFLOW_RUN_STATUS_CANCELED":
53
+ return WorkflowRunStatus.WORKFLOW_RUN_STATUS_CANCELED;
54
+ case -1:
55
+ case "UNRECOGNIZED":
56
+ default:
57
+ return WorkflowRunStatus.UNRECOGNIZED;
58
+ }
59
+ }
60
+ function workflowRunStatusToJSON(object) {
61
+ switch (object) {
62
+ case WorkflowRunStatus.WORKFLOW_RUN_STATUS_UNSPECIFIED:
63
+ return "WORKFLOW_RUN_STATUS_UNSPECIFIED";
64
+ case WorkflowRunStatus.WORKFLOW_RUN_STATUS_PENDING:
65
+ return "WORKFLOW_RUN_STATUS_PENDING";
66
+ case WorkflowRunStatus.WORKFLOW_RUN_STATUS_RUNNING:
67
+ return "WORKFLOW_RUN_STATUS_RUNNING";
68
+ case WorkflowRunStatus.WORKFLOW_RUN_STATUS_WAITING:
69
+ return "WORKFLOW_RUN_STATUS_WAITING";
70
+ case WorkflowRunStatus.WORKFLOW_RUN_STATUS_COMPLETED:
71
+ return "WORKFLOW_RUN_STATUS_COMPLETED";
72
+ case WorkflowRunStatus.WORKFLOW_RUN_STATUS_FAILED:
73
+ return "WORKFLOW_RUN_STATUS_FAILED";
74
+ case WorkflowRunStatus.WORKFLOW_RUN_STATUS_CANCELED:
75
+ return "WORKFLOW_RUN_STATUS_CANCELED";
76
+ case WorkflowRunStatus.UNRECOGNIZED:
77
+ default:
78
+ return "UNRECOGNIZED";
79
+ }
80
+ }
81
+ var WorkflowRunStepKind;
82
+ (function (WorkflowRunStepKind) {
83
+ WorkflowRunStepKind[WorkflowRunStepKind["WORKFLOW_RUN_STEP_KIND_UNSPECIFIED"] = 0] = "WORKFLOW_RUN_STEP_KIND_UNSPECIFIED";
84
+ WorkflowRunStepKind[WorkflowRunStepKind["WORKFLOW_RUN_STEP_KIND_AGENT"] = 1] = "WORKFLOW_RUN_STEP_KIND_AGENT";
85
+ WorkflowRunStepKind[WorkflowRunStepKind["WORKFLOW_RUN_STEP_KIND_WORKFLOW"] = 2] = "WORKFLOW_RUN_STEP_KIND_WORKFLOW";
86
+ WorkflowRunStepKind[WorkflowRunStepKind["WORKFLOW_RUN_STEP_KIND_TOOL"] = 3] = "WORKFLOW_RUN_STEP_KIND_TOOL";
87
+ WorkflowRunStepKind[WorkflowRunStepKind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
88
+ })(WorkflowRunStepKind || (exports.WorkflowRunStepKind = WorkflowRunStepKind = {}));
89
+ function workflowRunStepKindFromJSON(object) {
90
+ switch (object) {
91
+ case 0:
92
+ case "WORKFLOW_RUN_STEP_KIND_UNSPECIFIED":
93
+ return WorkflowRunStepKind.WORKFLOW_RUN_STEP_KIND_UNSPECIFIED;
94
+ case 1:
95
+ case "WORKFLOW_RUN_STEP_KIND_AGENT":
96
+ return WorkflowRunStepKind.WORKFLOW_RUN_STEP_KIND_AGENT;
97
+ case 2:
98
+ case "WORKFLOW_RUN_STEP_KIND_WORKFLOW":
99
+ return WorkflowRunStepKind.WORKFLOW_RUN_STEP_KIND_WORKFLOW;
100
+ case 3:
101
+ case "WORKFLOW_RUN_STEP_KIND_TOOL":
102
+ return WorkflowRunStepKind.WORKFLOW_RUN_STEP_KIND_TOOL;
103
+ case -1:
104
+ case "UNRECOGNIZED":
105
+ default:
106
+ return WorkflowRunStepKind.UNRECOGNIZED;
107
+ }
108
+ }
109
+ function workflowRunStepKindToJSON(object) {
110
+ switch (object) {
111
+ case WorkflowRunStepKind.WORKFLOW_RUN_STEP_KIND_UNSPECIFIED:
112
+ return "WORKFLOW_RUN_STEP_KIND_UNSPECIFIED";
113
+ case WorkflowRunStepKind.WORKFLOW_RUN_STEP_KIND_AGENT:
114
+ return "WORKFLOW_RUN_STEP_KIND_AGENT";
115
+ case WorkflowRunStepKind.WORKFLOW_RUN_STEP_KIND_WORKFLOW:
116
+ return "WORKFLOW_RUN_STEP_KIND_WORKFLOW";
117
+ case WorkflowRunStepKind.WORKFLOW_RUN_STEP_KIND_TOOL:
118
+ return "WORKFLOW_RUN_STEP_KIND_TOOL";
119
+ case WorkflowRunStepKind.UNRECOGNIZED:
120
+ default:
121
+ return "UNRECOGNIZED";
122
+ }
123
+ }
124
+ var WorkflowRunStepStatus;
125
+ (function (WorkflowRunStepStatus) {
126
+ WorkflowRunStepStatus[WorkflowRunStepStatus["WORKFLOW_RUN_STEP_STATUS_UNSPECIFIED"] = 0] = "WORKFLOW_RUN_STEP_STATUS_UNSPECIFIED";
127
+ WorkflowRunStepStatus[WorkflowRunStepStatus["WORKFLOW_RUN_STEP_STATUS_PENDING"] = 1] = "WORKFLOW_RUN_STEP_STATUS_PENDING";
128
+ WorkflowRunStepStatus[WorkflowRunStepStatus["WORKFLOW_RUN_STEP_STATUS_RUNNING"] = 2] = "WORKFLOW_RUN_STEP_STATUS_RUNNING";
129
+ WorkflowRunStepStatus[WorkflowRunStepStatus["WORKFLOW_RUN_STEP_STATUS_WAITING"] = 3] = "WORKFLOW_RUN_STEP_STATUS_WAITING";
130
+ WorkflowRunStepStatus[WorkflowRunStepStatus["WORKFLOW_RUN_STEP_STATUS_COMPLETED"] = 4] = "WORKFLOW_RUN_STEP_STATUS_COMPLETED";
131
+ WorkflowRunStepStatus[WorkflowRunStepStatus["WORKFLOW_RUN_STEP_STATUS_FAILED"] = 5] = "WORKFLOW_RUN_STEP_STATUS_FAILED";
132
+ WorkflowRunStepStatus[WorkflowRunStepStatus["WORKFLOW_RUN_STEP_STATUS_SKIPPED"] = 6] = "WORKFLOW_RUN_STEP_STATUS_SKIPPED";
133
+ WorkflowRunStepStatus[WorkflowRunStepStatus["WORKFLOW_RUN_STEP_STATUS_CANCELED"] = 7] = "WORKFLOW_RUN_STEP_STATUS_CANCELED";
134
+ WorkflowRunStepStatus[WorkflowRunStepStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
135
+ })(WorkflowRunStepStatus || (exports.WorkflowRunStepStatus = WorkflowRunStepStatus = {}));
136
+ function workflowRunStepStatusFromJSON(object) {
137
+ switch (object) {
138
+ case 0:
139
+ case "WORKFLOW_RUN_STEP_STATUS_UNSPECIFIED":
140
+ return WorkflowRunStepStatus.WORKFLOW_RUN_STEP_STATUS_UNSPECIFIED;
141
+ case 1:
142
+ case "WORKFLOW_RUN_STEP_STATUS_PENDING":
143
+ return WorkflowRunStepStatus.WORKFLOW_RUN_STEP_STATUS_PENDING;
144
+ case 2:
145
+ case "WORKFLOW_RUN_STEP_STATUS_RUNNING":
146
+ return WorkflowRunStepStatus.WORKFLOW_RUN_STEP_STATUS_RUNNING;
147
+ case 3:
148
+ case "WORKFLOW_RUN_STEP_STATUS_WAITING":
149
+ return WorkflowRunStepStatus.WORKFLOW_RUN_STEP_STATUS_WAITING;
150
+ case 4:
151
+ case "WORKFLOW_RUN_STEP_STATUS_COMPLETED":
152
+ return WorkflowRunStepStatus.WORKFLOW_RUN_STEP_STATUS_COMPLETED;
153
+ case 5:
154
+ case "WORKFLOW_RUN_STEP_STATUS_FAILED":
155
+ return WorkflowRunStepStatus.WORKFLOW_RUN_STEP_STATUS_FAILED;
156
+ case 6:
157
+ case "WORKFLOW_RUN_STEP_STATUS_SKIPPED":
158
+ return WorkflowRunStepStatus.WORKFLOW_RUN_STEP_STATUS_SKIPPED;
159
+ case 7:
160
+ case "WORKFLOW_RUN_STEP_STATUS_CANCELED":
161
+ return WorkflowRunStepStatus.WORKFLOW_RUN_STEP_STATUS_CANCELED;
162
+ case -1:
163
+ case "UNRECOGNIZED":
164
+ default:
165
+ return WorkflowRunStepStatus.UNRECOGNIZED;
166
+ }
167
+ }
168
+ function workflowRunStepStatusToJSON(object) {
169
+ switch (object) {
170
+ case WorkflowRunStepStatus.WORKFLOW_RUN_STEP_STATUS_UNSPECIFIED:
171
+ return "WORKFLOW_RUN_STEP_STATUS_UNSPECIFIED";
172
+ case WorkflowRunStepStatus.WORKFLOW_RUN_STEP_STATUS_PENDING:
173
+ return "WORKFLOW_RUN_STEP_STATUS_PENDING";
174
+ case WorkflowRunStepStatus.WORKFLOW_RUN_STEP_STATUS_RUNNING:
175
+ return "WORKFLOW_RUN_STEP_STATUS_RUNNING";
176
+ case WorkflowRunStepStatus.WORKFLOW_RUN_STEP_STATUS_WAITING:
177
+ return "WORKFLOW_RUN_STEP_STATUS_WAITING";
178
+ case WorkflowRunStepStatus.WORKFLOW_RUN_STEP_STATUS_COMPLETED:
179
+ return "WORKFLOW_RUN_STEP_STATUS_COMPLETED";
180
+ case WorkflowRunStepStatus.WORKFLOW_RUN_STEP_STATUS_FAILED:
181
+ return "WORKFLOW_RUN_STEP_STATUS_FAILED";
182
+ case WorkflowRunStepStatus.WORKFLOW_RUN_STEP_STATUS_SKIPPED:
183
+ return "WORKFLOW_RUN_STEP_STATUS_SKIPPED";
184
+ case WorkflowRunStepStatus.WORKFLOW_RUN_STEP_STATUS_CANCELED:
185
+ return "WORKFLOW_RUN_STEP_STATUS_CANCELED";
186
+ case WorkflowRunStepStatus.UNRECOGNIZED:
187
+ default:
188
+ return "UNRECOGNIZED";
189
+ }
190
+ }
191
+ function createBaseCreateWorkflowRunRequest() {
192
+ return { workflowId: "", chatSessionId: "", input: undefined };
193
+ }
194
+ exports.CreateWorkflowRunRequest = {
195
+ encode(message, writer = new wire_1.BinaryWriter()) {
196
+ if (message.workflowId !== "") {
197
+ writer.uint32(10).string(message.workflowId);
198
+ }
199
+ if (message.chatSessionId !== "") {
200
+ writer.uint32(18).string(message.chatSessionId);
201
+ }
202
+ if (message.input !== undefined) {
203
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.input), writer.uint32(26).fork()).join();
204
+ }
205
+ return writer;
206
+ },
207
+ decode(input, length) {
208
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
209
+ const end = length === undefined ? reader.len : reader.pos + length;
210
+ const message = createBaseCreateWorkflowRunRequest();
211
+ while (reader.pos < end) {
212
+ const tag = reader.uint32();
213
+ switch (tag >>> 3) {
214
+ case 1: {
215
+ if (tag !== 10) {
216
+ break;
217
+ }
218
+ message.workflowId = reader.string();
219
+ continue;
220
+ }
221
+ case 2: {
222
+ if (tag !== 18) {
223
+ break;
224
+ }
225
+ message.chatSessionId = reader.string();
226
+ continue;
227
+ }
228
+ case 3: {
229
+ if (tag !== 26) {
230
+ break;
231
+ }
232
+ message.input = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
233
+ continue;
234
+ }
235
+ }
236
+ if ((tag & 7) === 4 || tag === 0) {
237
+ break;
238
+ }
239
+ reader.skip(tag & 7);
240
+ }
241
+ return message;
242
+ },
243
+ fromJSON(object) {
244
+ return {
245
+ workflowId: isSet(object.workflowId)
246
+ ? globalThis.String(object.workflowId)
247
+ : isSet(object.workflow_id)
248
+ ? globalThis.String(object.workflow_id)
249
+ : "",
250
+ chatSessionId: isSet(object.chatSessionId)
251
+ ? globalThis.String(object.chatSessionId)
252
+ : isSet(object.chat_session_id)
253
+ ? globalThis.String(object.chat_session_id)
254
+ : "",
255
+ input: isObject(object.input) ? object.input : undefined,
256
+ };
257
+ },
258
+ toJSON(message) {
259
+ const obj = {};
260
+ if (message.workflowId !== "") {
261
+ obj.workflowId = message.workflowId;
262
+ }
263
+ if (message.chatSessionId !== "") {
264
+ obj.chatSessionId = message.chatSessionId;
265
+ }
266
+ if (message.input !== undefined) {
267
+ obj.input = message.input;
268
+ }
269
+ return obj;
270
+ },
271
+ create(base) {
272
+ return exports.CreateWorkflowRunRequest.fromPartial(base !== null && base !== void 0 ? base : {});
273
+ },
274
+ fromPartial(object) {
275
+ var _a, _b, _c;
276
+ const message = createBaseCreateWorkflowRunRequest();
277
+ message.workflowId = (_a = object.workflowId) !== null && _a !== void 0 ? _a : "";
278
+ message.chatSessionId = (_b = object.chatSessionId) !== null && _b !== void 0 ? _b : "";
279
+ message.input = (_c = object.input) !== null && _c !== void 0 ? _c : undefined;
280
+ return message;
281
+ },
282
+ };
283
+ function createBaseCreateWorkflowRunResponse() {
284
+ return { workflowRun: undefined };
285
+ }
286
+ exports.CreateWorkflowRunResponse = {
287
+ encode(message, writer = new wire_1.BinaryWriter()) {
288
+ if (message.workflowRun !== undefined) {
289
+ exports.WorkflowRun.encode(message.workflowRun, writer.uint32(10).fork()).join();
290
+ }
291
+ return writer;
292
+ },
293
+ decode(input, length) {
294
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
295
+ const end = length === undefined ? reader.len : reader.pos + length;
296
+ const message = createBaseCreateWorkflowRunResponse();
297
+ while (reader.pos < end) {
298
+ const tag = reader.uint32();
299
+ switch (tag >>> 3) {
300
+ case 1: {
301
+ if (tag !== 10) {
302
+ break;
303
+ }
304
+ message.workflowRun = exports.WorkflowRun.decode(reader, reader.uint32());
305
+ continue;
306
+ }
307
+ }
308
+ if ((tag & 7) === 4 || tag === 0) {
309
+ break;
310
+ }
311
+ reader.skip(tag & 7);
312
+ }
313
+ return message;
314
+ },
315
+ fromJSON(object) {
316
+ return {
317
+ workflowRun: isSet(object.workflowRun)
318
+ ? exports.WorkflowRun.fromJSON(object.workflowRun)
319
+ : isSet(object.workflow_run)
320
+ ? exports.WorkflowRun.fromJSON(object.workflow_run)
321
+ : undefined,
322
+ };
323
+ },
324
+ toJSON(message) {
325
+ const obj = {};
326
+ if (message.workflowRun !== undefined) {
327
+ obj.workflowRun = exports.WorkflowRun.toJSON(message.workflowRun);
328
+ }
329
+ return obj;
330
+ },
331
+ create(base) {
332
+ return exports.CreateWorkflowRunResponse.fromPartial(base !== null && base !== void 0 ? base : {});
333
+ },
334
+ fromPartial(object) {
335
+ const message = createBaseCreateWorkflowRunResponse();
336
+ message.workflowRun = (object.workflowRun !== undefined && object.workflowRun !== null)
337
+ ? exports.WorkflowRun.fromPartial(object.workflowRun)
338
+ : undefined;
339
+ return message;
340
+ },
341
+ };
342
+ function createBaseGetWorkflowRunRequest() {
343
+ return { workflowRunId: "" };
344
+ }
345
+ exports.GetWorkflowRunRequest = {
346
+ encode(message, writer = new wire_1.BinaryWriter()) {
347
+ if (message.workflowRunId !== "") {
348
+ writer.uint32(10).string(message.workflowRunId);
349
+ }
350
+ return writer;
351
+ },
352
+ decode(input, length) {
353
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
354
+ const end = length === undefined ? reader.len : reader.pos + length;
355
+ const message = createBaseGetWorkflowRunRequest();
356
+ while (reader.pos < end) {
357
+ const tag = reader.uint32();
358
+ switch (tag >>> 3) {
359
+ case 1: {
360
+ if (tag !== 10) {
361
+ break;
362
+ }
363
+ message.workflowRunId = reader.string();
364
+ continue;
365
+ }
366
+ }
367
+ if ((tag & 7) === 4 || tag === 0) {
368
+ break;
369
+ }
370
+ reader.skip(tag & 7);
371
+ }
372
+ return message;
373
+ },
374
+ fromJSON(object) {
375
+ return {
376
+ workflowRunId: isSet(object.workflowRunId)
377
+ ? globalThis.String(object.workflowRunId)
378
+ : isSet(object.workflow_run_id)
379
+ ? globalThis.String(object.workflow_run_id)
380
+ : "",
381
+ };
382
+ },
383
+ toJSON(message) {
384
+ const obj = {};
385
+ if (message.workflowRunId !== "") {
386
+ obj.workflowRunId = message.workflowRunId;
387
+ }
388
+ return obj;
389
+ },
390
+ create(base) {
391
+ return exports.GetWorkflowRunRequest.fromPartial(base !== null && base !== void 0 ? base : {});
392
+ },
393
+ fromPartial(object) {
394
+ var _a;
395
+ const message = createBaseGetWorkflowRunRequest();
396
+ message.workflowRunId = (_a = object.workflowRunId) !== null && _a !== void 0 ? _a : "";
397
+ return message;
398
+ },
399
+ };
400
+ function createBaseGetWorkflowRunResponse() {
401
+ return { workflowRun: undefined, steps: [] };
402
+ }
403
+ exports.GetWorkflowRunResponse = {
404
+ encode(message, writer = new wire_1.BinaryWriter()) {
405
+ if (message.workflowRun !== undefined) {
406
+ exports.WorkflowRun.encode(message.workflowRun, writer.uint32(10).fork()).join();
407
+ }
408
+ for (const v of message.steps) {
409
+ exports.WorkflowRunStep.encode(v, writer.uint32(18).fork()).join();
410
+ }
411
+ return writer;
412
+ },
413
+ decode(input, length) {
414
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
415
+ const end = length === undefined ? reader.len : reader.pos + length;
416
+ const message = createBaseGetWorkflowRunResponse();
417
+ while (reader.pos < end) {
418
+ const tag = reader.uint32();
419
+ switch (tag >>> 3) {
420
+ case 1: {
421
+ if (tag !== 10) {
422
+ break;
423
+ }
424
+ message.workflowRun = exports.WorkflowRun.decode(reader, reader.uint32());
425
+ continue;
426
+ }
427
+ case 2: {
428
+ if (tag !== 18) {
429
+ break;
430
+ }
431
+ message.steps.push(exports.WorkflowRunStep.decode(reader, reader.uint32()));
432
+ continue;
433
+ }
434
+ }
435
+ if ((tag & 7) === 4 || tag === 0) {
436
+ break;
437
+ }
438
+ reader.skip(tag & 7);
439
+ }
440
+ return message;
441
+ },
442
+ fromJSON(object) {
443
+ return {
444
+ workflowRun: isSet(object.workflowRun)
445
+ ? exports.WorkflowRun.fromJSON(object.workflowRun)
446
+ : isSet(object.workflow_run)
447
+ ? exports.WorkflowRun.fromJSON(object.workflow_run)
448
+ : undefined,
449
+ steps: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.steps) ? object.steps.map((e) => exports.WorkflowRunStep.fromJSON(e)) : [],
450
+ };
451
+ },
452
+ toJSON(message) {
453
+ var _a;
454
+ const obj = {};
455
+ if (message.workflowRun !== undefined) {
456
+ obj.workflowRun = exports.WorkflowRun.toJSON(message.workflowRun);
457
+ }
458
+ if ((_a = message.steps) === null || _a === void 0 ? void 0 : _a.length) {
459
+ obj.steps = message.steps.map((e) => exports.WorkflowRunStep.toJSON(e));
460
+ }
461
+ return obj;
462
+ },
463
+ create(base) {
464
+ return exports.GetWorkflowRunResponse.fromPartial(base !== null && base !== void 0 ? base : {});
465
+ },
466
+ fromPartial(object) {
467
+ var _a;
468
+ const message = createBaseGetWorkflowRunResponse();
469
+ message.workflowRun = (object.workflowRun !== undefined && object.workflowRun !== null)
470
+ ? exports.WorkflowRun.fromPartial(object.workflowRun)
471
+ : undefined;
472
+ message.steps = ((_a = object.steps) === null || _a === void 0 ? void 0 : _a.map((e) => exports.WorkflowRunStep.fromPartial(e))) || [];
473
+ return message;
474
+ },
475
+ };
476
+ function createBaseCancelWorkflowRunRequest() {
477
+ return { workflowRunId: "" };
478
+ }
479
+ exports.CancelWorkflowRunRequest = {
480
+ encode(message, writer = new wire_1.BinaryWriter()) {
481
+ if (message.workflowRunId !== "") {
482
+ writer.uint32(10).string(message.workflowRunId);
483
+ }
484
+ return writer;
485
+ },
486
+ decode(input, length) {
487
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
488
+ const end = length === undefined ? reader.len : reader.pos + length;
489
+ const message = createBaseCancelWorkflowRunRequest();
490
+ while (reader.pos < end) {
491
+ const tag = reader.uint32();
492
+ switch (tag >>> 3) {
493
+ case 1: {
494
+ if (tag !== 10) {
495
+ break;
496
+ }
497
+ message.workflowRunId = reader.string();
498
+ continue;
499
+ }
500
+ }
501
+ if ((tag & 7) === 4 || tag === 0) {
502
+ break;
503
+ }
504
+ reader.skip(tag & 7);
505
+ }
506
+ return message;
507
+ },
508
+ fromJSON(object) {
509
+ return {
510
+ workflowRunId: isSet(object.workflowRunId)
511
+ ? globalThis.String(object.workflowRunId)
512
+ : isSet(object.workflow_run_id)
513
+ ? globalThis.String(object.workflow_run_id)
514
+ : "",
515
+ };
516
+ },
517
+ toJSON(message) {
518
+ const obj = {};
519
+ if (message.workflowRunId !== "") {
520
+ obj.workflowRunId = message.workflowRunId;
521
+ }
522
+ return obj;
523
+ },
524
+ create(base) {
525
+ return exports.CancelWorkflowRunRequest.fromPartial(base !== null && base !== void 0 ? base : {});
526
+ },
527
+ fromPartial(object) {
528
+ var _a;
529
+ const message = createBaseCancelWorkflowRunRequest();
530
+ message.workflowRunId = (_a = object.workflowRunId) !== null && _a !== void 0 ? _a : "";
531
+ return message;
532
+ },
533
+ };
534
+ function createBaseCancelWorkflowRunResponse() {
535
+ return { workflowRun: undefined };
536
+ }
537
+ exports.CancelWorkflowRunResponse = {
538
+ encode(message, writer = new wire_1.BinaryWriter()) {
539
+ if (message.workflowRun !== undefined) {
540
+ exports.WorkflowRun.encode(message.workflowRun, writer.uint32(10).fork()).join();
541
+ }
542
+ return writer;
543
+ },
544
+ decode(input, length) {
545
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
546
+ const end = length === undefined ? reader.len : reader.pos + length;
547
+ const message = createBaseCancelWorkflowRunResponse();
548
+ while (reader.pos < end) {
549
+ const tag = reader.uint32();
550
+ switch (tag >>> 3) {
551
+ case 1: {
552
+ if (tag !== 10) {
553
+ break;
554
+ }
555
+ message.workflowRun = exports.WorkflowRun.decode(reader, reader.uint32());
556
+ continue;
557
+ }
558
+ }
559
+ if ((tag & 7) === 4 || tag === 0) {
560
+ break;
561
+ }
562
+ reader.skip(tag & 7);
563
+ }
564
+ return message;
565
+ },
566
+ fromJSON(object) {
567
+ return {
568
+ workflowRun: isSet(object.workflowRun)
569
+ ? exports.WorkflowRun.fromJSON(object.workflowRun)
570
+ : isSet(object.workflow_run)
571
+ ? exports.WorkflowRun.fromJSON(object.workflow_run)
572
+ : undefined,
573
+ };
574
+ },
575
+ toJSON(message) {
576
+ const obj = {};
577
+ if (message.workflowRun !== undefined) {
578
+ obj.workflowRun = exports.WorkflowRun.toJSON(message.workflowRun);
579
+ }
580
+ return obj;
581
+ },
582
+ create(base) {
583
+ return exports.CancelWorkflowRunResponse.fromPartial(base !== null && base !== void 0 ? base : {});
584
+ },
585
+ fromPartial(object) {
586
+ const message = createBaseCancelWorkflowRunResponse();
587
+ message.workflowRun = (object.workflowRun !== undefined && object.workflowRun !== null)
588
+ ? exports.WorkflowRun.fromPartial(object.workflowRun)
589
+ : undefined;
590
+ return message;
591
+ },
592
+ };
593
+ function createBaseListWorkflowRunsRequest() {
594
+ return { workflowId: "", status: 0, pageSize: 0, pageOffset: 0 };
595
+ }
596
+ exports.ListWorkflowRunsRequest = {
597
+ encode(message, writer = new wire_1.BinaryWriter()) {
598
+ if (message.workflowId !== "") {
599
+ writer.uint32(10).string(message.workflowId);
600
+ }
601
+ if (message.status !== 0) {
602
+ writer.uint32(16).int32(message.status);
603
+ }
604
+ if (message.pageSize !== 0) {
605
+ writer.uint32(24).int32(message.pageSize);
606
+ }
607
+ if (message.pageOffset !== 0) {
608
+ writer.uint32(32).int32(message.pageOffset);
609
+ }
610
+ return writer;
611
+ },
612
+ decode(input, length) {
613
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
614
+ const end = length === undefined ? reader.len : reader.pos + length;
615
+ const message = createBaseListWorkflowRunsRequest();
616
+ while (reader.pos < end) {
617
+ const tag = reader.uint32();
618
+ switch (tag >>> 3) {
619
+ case 1: {
620
+ if (tag !== 10) {
621
+ break;
622
+ }
623
+ message.workflowId = reader.string();
624
+ continue;
625
+ }
626
+ case 2: {
627
+ if (tag !== 16) {
628
+ break;
629
+ }
630
+ message.status = reader.int32();
631
+ continue;
632
+ }
633
+ case 3: {
634
+ if (tag !== 24) {
635
+ break;
636
+ }
637
+ message.pageSize = reader.int32();
638
+ continue;
639
+ }
640
+ case 4: {
641
+ if (tag !== 32) {
642
+ break;
643
+ }
644
+ message.pageOffset = reader.int32();
645
+ continue;
646
+ }
647
+ }
648
+ if ((tag & 7) === 4 || tag === 0) {
649
+ break;
650
+ }
651
+ reader.skip(tag & 7);
652
+ }
653
+ return message;
654
+ },
655
+ fromJSON(object) {
656
+ return {
657
+ workflowId: isSet(object.workflowId)
658
+ ? globalThis.String(object.workflowId)
659
+ : isSet(object.workflow_id)
660
+ ? globalThis.String(object.workflow_id)
661
+ : "",
662
+ status: isSet(object.status) ? workflowRunStatusFromJSON(object.status) : 0,
663
+ pageSize: isSet(object.pageSize)
664
+ ? globalThis.Number(object.pageSize)
665
+ : isSet(object.page_size)
666
+ ? globalThis.Number(object.page_size)
667
+ : 0,
668
+ pageOffset: isSet(object.pageOffset)
669
+ ? globalThis.Number(object.pageOffset)
670
+ : isSet(object.page_offset)
671
+ ? globalThis.Number(object.page_offset)
672
+ : 0,
673
+ };
674
+ },
675
+ toJSON(message) {
676
+ const obj = {};
677
+ if (message.workflowId !== "") {
678
+ obj.workflowId = message.workflowId;
679
+ }
680
+ if (message.status !== 0) {
681
+ obj.status = workflowRunStatusToJSON(message.status);
682
+ }
683
+ if (message.pageSize !== 0) {
684
+ obj.pageSize = Math.round(message.pageSize);
685
+ }
686
+ if (message.pageOffset !== 0) {
687
+ obj.pageOffset = Math.round(message.pageOffset);
688
+ }
689
+ return obj;
690
+ },
691
+ create(base) {
692
+ return exports.ListWorkflowRunsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
693
+ },
694
+ fromPartial(object) {
695
+ var _a, _b, _c, _d;
696
+ const message = createBaseListWorkflowRunsRequest();
697
+ message.workflowId = (_a = object.workflowId) !== null && _a !== void 0 ? _a : "";
698
+ message.status = (_b = object.status) !== null && _b !== void 0 ? _b : 0;
699
+ message.pageSize = (_c = object.pageSize) !== null && _c !== void 0 ? _c : 0;
700
+ message.pageOffset = (_d = object.pageOffset) !== null && _d !== void 0 ? _d : 0;
701
+ return message;
702
+ },
703
+ };
704
+ function createBaseListWorkflowRunsResponse() {
705
+ return { workflowRuns: [] };
706
+ }
707
+ exports.ListWorkflowRunsResponse = {
708
+ encode(message, writer = new wire_1.BinaryWriter()) {
709
+ for (const v of message.workflowRuns) {
710
+ exports.WorkflowRun.encode(v, writer.uint32(10).fork()).join();
711
+ }
712
+ return writer;
713
+ },
714
+ decode(input, length) {
715
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
716
+ const end = length === undefined ? reader.len : reader.pos + length;
717
+ const message = createBaseListWorkflowRunsResponse();
718
+ while (reader.pos < end) {
719
+ const tag = reader.uint32();
720
+ switch (tag >>> 3) {
721
+ case 1: {
722
+ if (tag !== 10) {
723
+ break;
724
+ }
725
+ message.workflowRuns.push(exports.WorkflowRun.decode(reader, reader.uint32()));
726
+ continue;
727
+ }
728
+ }
729
+ if ((tag & 7) === 4 || tag === 0) {
730
+ break;
731
+ }
732
+ reader.skip(tag & 7);
733
+ }
734
+ return message;
735
+ },
736
+ fromJSON(object) {
737
+ return {
738
+ workflowRuns: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.workflowRuns)
739
+ ? object.workflowRuns.map((e) => exports.WorkflowRun.fromJSON(e))
740
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.workflow_runs)
741
+ ? object.workflow_runs.map((e) => exports.WorkflowRun.fromJSON(e))
742
+ : [],
743
+ };
744
+ },
745
+ toJSON(message) {
746
+ var _a;
747
+ const obj = {};
748
+ if ((_a = message.workflowRuns) === null || _a === void 0 ? void 0 : _a.length) {
749
+ obj.workflowRuns = message.workflowRuns.map((e) => exports.WorkflowRun.toJSON(e));
750
+ }
751
+ return obj;
752
+ },
753
+ create(base) {
754
+ return exports.ListWorkflowRunsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
755
+ },
756
+ fromPartial(object) {
757
+ var _a;
758
+ const message = createBaseListWorkflowRunsResponse();
759
+ message.workflowRuns = ((_a = object.workflowRuns) === null || _a === void 0 ? void 0 : _a.map((e) => exports.WorkflowRun.fromPartial(e))) || [];
760
+ return message;
761
+ },
762
+ };
763
+ function createBaseListWorkflowRunStepsRequest() {
764
+ return { workflowRunId: "" };
765
+ }
766
+ exports.ListWorkflowRunStepsRequest = {
767
+ encode(message, writer = new wire_1.BinaryWriter()) {
768
+ if (message.workflowRunId !== "") {
769
+ writer.uint32(10).string(message.workflowRunId);
770
+ }
771
+ return writer;
772
+ },
773
+ decode(input, length) {
774
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
775
+ const end = length === undefined ? reader.len : reader.pos + length;
776
+ const message = createBaseListWorkflowRunStepsRequest();
777
+ while (reader.pos < end) {
778
+ const tag = reader.uint32();
779
+ switch (tag >>> 3) {
780
+ case 1: {
781
+ if (tag !== 10) {
782
+ break;
783
+ }
784
+ message.workflowRunId = reader.string();
785
+ continue;
786
+ }
787
+ }
788
+ if ((tag & 7) === 4 || tag === 0) {
789
+ break;
790
+ }
791
+ reader.skip(tag & 7);
792
+ }
793
+ return message;
794
+ },
795
+ fromJSON(object) {
796
+ return {
797
+ workflowRunId: isSet(object.workflowRunId)
798
+ ? globalThis.String(object.workflowRunId)
799
+ : isSet(object.workflow_run_id)
800
+ ? globalThis.String(object.workflow_run_id)
801
+ : "",
802
+ };
803
+ },
804
+ toJSON(message) {
805
+ const obj = {};
806
+ if (message.workflowRunId !== "") {
807
+ obj.workflowRunId = message.workflowRunId;
808
+ }
809
+ return obj;
810
+ },
811
+ create(base) {
812
+ return exports.ListWorkflowRunStepsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
813
+ },
814
+ fromPartial(object) {
815
+ var _a;
816
+ const message = createBaseListWorkflowRunStepsRequest();
817
+ message.workflowRunId = (_a = object.workflowRunId) !== null && _a !== void 0 ? _a : "";
818
+ return message;
819
+ },
820
+ };
821
+ function createBaseListWorkflowRunStepsResponse() {
822
+ return { steps: [] };
823
+ }
824
+ exports.ListWorkflowRunStepsResponse = {
825
+ encode(message, writer = new wire_1.BinaryWriter()) {
826
+ for (const v of message.steps) {
827
+ exports.WorkflowRunStep.encode(v, writer.uint32(10).fork()).join();
828
+ }
829
+ return writer;
830
+ },
831
+ decode(input, length) {
832
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
833
+ const end = length === undefined ? reader.len : reader.pos + length;
834
+ const message = createBaseListWorkflowRunStepsResponse();
835
+ while (reader.pos < end) {
836
+ const tag = reader.uint32();
837
+ switch (tag >>> 3) {
838
+ case 1: {
839
+ if (tag !== 10) {
840
+ break;
841
+ }
842
+ message.steps.push(exports.WorkflowRunStep.decode(reader, reader.uint32()));
843
+ continue;
844
+ }
845
+ }
846
+ if ((tag & 7) === 4 || tag === 0) {
847
+ break;
848
+ }
849
+ reader.skip(tag & 7);
850
+ }
851
+ return message;
852
+ },
853
+ fromJSON(object) {
854
+ return {
855
+ steps: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.steps) ? object.steps.map((e) => exports.WorkflowRunStep.fromJSON(e)) : [],
856
+ };
857
+ },
858
+ toJSON(message) {
859
+ var _a;
860
+ const obj = {};
861
+ if ((_a = message.steps) === null || _a === void 0 ? void 0 : _a.length) {
862
+ obj.steps = message.steps.map((e) => exports.WorkflowRunStep.toJSON(e));
863
+ }
864
+ return obj;
865
+ },
866
+ create(base) {
867
+ return exports.ListWorkflowRunStepsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
868
+ },
869
+ fromPartial(object) {
870
+ var _a;
871
+ const message = createBaseListWorkflowRunStepsResponse();
872
+ message.steps = ((_a = object.steps) === null || _a === void 0 ? void 0 : _a.map((e) => exports.WorkflowRunStep.fromPartial(e))) || [];
873
+ return message;
874
+ },
875
+ };
876
+ function createBaseWorkflowRun() {
877
+ return {
878
+ id: "",
879
+ orgId: "",
880
+ workflowId: "",
881
+ startedByUserId: "",
882
+ chatSessionId: "",
883
+ status: 0,
884
+ input: undefined,
885
+ output: undefined,
886
+ definitionSnapshot: undefined,
887
+ errorCode: "",
888
+ errorMessage: "",
889
+ startedAt: undefined,
890
+ completedAt: undefined,
891
+ };
892
+ }
893
+ exports.WorkflowRun = {
894
+ encode(message, writer = new wire_1.BinaryWriter()) {
895
+ if (message.id !== "") {
896
+ writer.uint32(10).string(message.id);
897
+ }
898
+ if (message.orgId !== "") {
899
+ writer.uint32(18).string(message.orgId);
900
+ }
901
+ if (message.workflowId !== "") {
902
+ writer.uint32(26).string(message.workflowId);
903
+ }
904
+ if (message.startedByUserId !== "") {
905
+ writer.uint32(34).string(message.startedByUserId);
906
+ }
907
+ if (message.chatSessionId !== "") {
908
+ writer.uint32(42).string(message.chatSessionId);
909
+ }
910
+ if (message.status !== 0) {
911
+ writer.uint32(48).int32(message.status);
912
+ }
913
+ if (message.input !== undefined) {
914
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.input), writer.uint32(58).fork()).join();
915
+ }
916
+ if (message.output !== undefined) {
917
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.output), writer.uint32(66).fork()).join();
918
+ }
919
+ if (message.definitionSnapshot !== undefined) {
920
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.definitionSnapshot), writer.uint32(74).fork()).join();
921
+ }
922
+ if (message.errorCode !== "") {
923
+ writer.uint32(82).string(message.errorCode);
924
+ }
925
+ if (message.errorMessage !== "") {
926
+ writer.uint32(90).string(message.errorMessage);
927
+ }
928
+ if (message.startedAt !== undefined) {
929
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(98).fork()).join();
930
+ }
931
+ if (message.completedAt !== undefined) {
932
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.completedAt), writer.uint32(106).fork()).join();
933
+ }
934
+ return writer;
935
+ },
936
+ decode(input, length) {
937
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
938
+ const end = length === undefined ? reader.len : reader.pos + length;
939
+ const message = createBaseWorkflowRun();
940
+ while (reader.pos < end) {
941
+ const tag = reader.uint32();
942
+ switch (tag >>> 3) {
943
+ case 1: {
944
+ if (tag !== 10) {
945
+ break;
946
+ }
947
+ message.id = reader.string();
948
+ continue;
949
+ }
950
+ case 2: {
951
+ if (tag !== 18) {
952
+ break;
953
+ }
954
+ message.orgId = reader.string();
955
+ continue;
956
+ }
957
+ case 3: {
958
+ if (tag !== 26) {
959
+ break;
960
+ }
961
+ message.workflowId = reader.string();
962
+ continue;
963
+ }
964
+ case 4: {
965
+ if (tag !== 34) {
966
+ break;
967
+ }
968
+ message.startedByUserId = reader.string();
969
+ continue;
970
+ }
971
+ case 5: {
972
+ if (tag !== 42) {
973
+ break;
974
+ }
975
+ message.chatSessionId = reader.string();
976
+ continue;
977
+ }
978
+ case 6: {
979
+ if (tag !== 48) {
980
+ break;
981
+ }
982
+ message.status = reader.int32();
983
+ continue;
984
+ }
985
+ case 7: {
986
+ if (tag !== 58) {
987
+ break;
988
+ }
989
+ message.input = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
990
+ continue;
991
+ }
992
+ case 8: {
993
+ if (tag !== 66) {
994
+ break;
995
+ }
996
+ message.output = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
997
+ continue;
998
+ }
999
+ case 9: {
1000
+ if (tag !== 74) {
1001
+ break;
1002
+ }
1003
+ message.definitionSnapshot = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
1004
+ continue;
1005
+ }
1006
+ case 10: {
1007
+ if (tag !== 82) {
1008
+ break;
1009
+ }
1010
+ message.errorCode = reader.string();
1011
+ continue;
1012
+ }
1013
+ case 11: {
1014
+ if (tag !== 90) {
1015
+ break;
1016
+ }
1017
+ message.errorMessage = reader.string();
1018
+ continue;
1019
+ }
1020
+ case 12: {
1021
+ if (tag !== 98) {
1022
+ break;
1023
+ }
1024
+ message.startedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
1025
+ continue;
1026
+ }
1027
+ case 13: {
1028
+ if (tag !== 106) {
1029
+ break;
1030
+ }
1031
+ message.completedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
1032
+ continue;
1033
+ }
1034
+ }
1035
+ if ((tag & 7) === 4 || tag === 0) {
1036
+ break;
1037
+ }
1038
+ reader.skip(tag & 7);
1039
+ }
1040
+ return message;
1041
+ },
1042
+ fromJSON(object) {
1043
+ return {
1044
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1045
+ orgId: isSet(object.orgId)
1046
+ ? globalThis.String(object.orgId)
1047
+ : isSet(object.org_id)
1048
+ ? globalThis.String(object.org_id)
1049
+ : "",
1050
+ workflowId: isSet(object.workflowId)
1051
+ ? globalThis.String(object.workflowId)
1052
+ : isSet(object.workflow_id)
1053
+ ? globalThis.String(object.workflow_id)
1054
+ : "",
1055
+ startedByUserId: isSet(object.startedByUserId)
1056
+ ? globalThis.String(object.startedByUserId)
1057
+ : isSet(object.started_by_user_id)
1058
+ ? globalThis.String(object.started_by_user_id)
1059
+ : "",
1060
+ chatSessionId: isSet(object.chatSessionId)
1061
+ ? globalThis.String(object.chatSessionId)
1062
+ : isSet(object.chat_session_id)
1063
+ ? globalThis.String(object.chat_session_id)
1064
+ : "",
1065
+ status: isSet(object.status) ? workflowRunStatusFromJSON(object.status) : 0,
1066
+ input: isObject(object.input) ? object.input : undefined,
1067
+ output: isObject(object.output) ? object.output : undefined,
1068
+ definitionSnapshot: isObject(object.definitionSnapshot)
1069
+ ? object.definitionSnapshot
1070
+ : isObject(object.definition_snapshot)
1071
+ ? object.definition_snapshot
1072
+ : undefined,
1073
+ errorCode: isSet(object.errorCode)
1074
+ ? globalThis.String(object.errorCode)
1075
+ : isSet(object.error_code)
1076
+ ? globalThis.String(object.error_code)
1077
+ : "",
1078
+ errorMessage: isSet(object.errorMessage)
1079
+ ? globalThis.String(object.errorMessage)
1080
+ : isSet(object.error_message)
1081
+ ? globalThis.String(object.error_message)
1082
+ : "",
1083
+ startedAt: isSet(object.startedAt)
1084
+ ? fromJsonTimestamp(object.startedAt)
1085
+ : isSet(object.started_at)
1086
+ ? fromJsonTimestamp(object.started_at)
1087
+ : undefined,
1088
+ completedAt: isSet(object.completedAt)
1089
+ ? fromJsonTimestamp(object.completedAt)
1090
+ : isSet(object.completed_at)
1091
+ ? fromJsonTimestamp(object.completed_at)
1092
+ : undefined,
1093
+ };
1094
+ },
1095
+ toJSON(message) {
1096
+ const obj = {};
1097
+ if (message.id !== "") {
1098
+ obj.id = message.id;
1099
+ }
1100
+ if (message.orgId !== "") {
1101
+ obj.orgId = message.orgId;
1102
+ }
1103
+ if (message.workflowId !== "") {
1104
+ obj.workflowId = message.workflowId;
1105
+ }
1106
+ if (message.startedByUserId !== "") {
1107
+ obj.startedByUserId = message.startedByUserId;
1108
+ }
1109
+ if (message.chatSessionId !== "") {
1110
+ obj.chatSessionId = message.chatSessionId;
1111
+ }
1112
+ if (message.status !== 0) {
1113
+ obj.status = workflowRunStatusToJSON(message.status);
1114
+ }
1115
+ if (message.input !== undefined) {
1116
+ obj.input = message.input;
1117
+ }
1118
+ if (message.output !== undefined) {
1119
+ obj.output = message.output;
1120
+ }
1121
+ if (message.definitionSnapshot !== undefined) {
1122
+ obj.definitionSnapshot = message.definitionSnapshot;
1123
+ }
1124
+ if (message.errorCode !== "") {
1125
+ obj.errorCode = message.errorCode;
1126
+ }
1127
+ if (message.errorMessage !== "") {
1128
+ obj.errorMessage = message.errorMessage;
1129
+ }
1130
+ if (message.startedAt !== undefined) {
1131
+ obj.startedAt = message.startedAt.toISOString();
1132
+ }
1133
+ if (message.completedAt !== undefined) {
1134
+ obj.completedAt = message.completedAt.toISOString();
1135
+ }
1136
+ return obj;
1137
+ },
1138
+ create(base) {
1139
+ return exports.WorkflowRun.fromPartial(base !== null && base !== void 0 ? base : {});
1140
+ },
1141
+ fromPartial(object) {
1142
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
1143
+ const message = createBaseWorkflowRun();
1144
+ message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
1145
+ message.orgId = (_b = object.orgId) !== null && _b !== void 0 ? _b : "";
1146
+ message.workflowId = (_c = object.workflowId) !== null && _c !== void 0 ? _c : "";
1147
+ message.startedByUserId = (_d = object.startedByUserId) !== null && _d !== void 0 ? _d : "";
1148
+ message.chatSessionId = (_e = object.chatSessionId) !== null && _e !== void 0 ? _e : "";
1149
+ message.status = (_f = object.status) !== null && _f !== void 0 ? _f : 0;
1150
+ message.input = (_g = object.input) !== null && _g !== void 0 ? _g : undefined;
1151
+ message.output = (_h = object.output) !== null && _h !== void 0 ? _h : undefined;
1152
+ message.definitionSnapshot = (_j = object.definitionSnapshot) !== null && _j !== void 0 ? _j : undefined;
1153
+ message.errorCode = (_k = object.errorCode) !== null && _k !== void 0 ? _k : "";
1154
+ message.errorMessage = (_l = object.errorMessage) !== null && _l !== void 0 ? _l : "";
1155
+ message.startedAt = (_m = object.startedAt) !== null && _m !== void 0 ? _m : undefined;
1156
+ message.completedAt = (_o = object.completedAt) !== null && _o !== void 0 ? _o : undefined;
1157
+ return message;
1158
+ },
1159
+ };
1160
+ function createBaseWorkflowRunStep() {
1161
+ return {
1162
+ id: "",
1163
+ orgId: "",
1164
+ workflowRunId: "",
1165
+ stepKey: "",
1166
+ kind: 0,
1167
+ status: 0,
1168
+ agentId: "",
1169
+ agentRunId: "",
1170
+ toolId: "",
1171
+ input: undefined,
1172
+ output: undefined,
1173
+ errorCode: "",
1174
+ errorMessage: "",
1175
+ startedAt: undefined,
1176
+ completedAt: undefined,
1177
+ workflowId: "",
1178
+ childWorkflowRunId: "",
1179
+ };
1180
+ }
1181
+ exports.WorkflowRunStep = {
1182
+ encode(message, writer = new wire_1.BinaryWriter()) {
1183
+ if (message.id !== "") {
1184
+ writer.uint32(10).string(message.id);
1185
+ }
1186
+ if (message.orgId !== "") {
1187
+ writer.uint32(18).string(message.orgId);
1188
+ }
1189
+ if (message.workflowRunId !== "") {
1190
+ writer.uint32(26).string(message.workflowRunId);
1191
+ }
1192
+ if (message.stepKey !== "") {
1193
+ writer.uint32(34).string(message.stepKey);
1194
+ }
1195
+ if (message.kind !== 0) {
1196
+ writer.uint32(40).int32(message.kind);
1197
+ }
1198
+ if (message.status !== 0) {
1199
+ writer.uint32(48).int32(message.status);
1200
+ }
1201
+ if (message.agentId !== "") {
1202
+ writer.uint32(58).string(message.agentId);
1203
+ }
1204
+ if (message.agentRunId !== "") {
1205
+ writer.uint32(66).string(message.agentRunId);
1206
+ }
1207
+ if (message.toolId !== "") {
1208
+ writer.uint32(74).string(message.toolId);
1209
+ }
1210
+ if (message.input !== undefined) {
1211
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.input), writer.uint32(82).fork()).join();
1212
+ }
1213
+ if (message.output !== undefined) {
1214
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.output), writer.uint32(90).fork()).join();
1215
+ }
1216
+ if (message.errorCode !== "") {
1217
+ writer.uint32(98).string(message.errorCode);
1218
+ }
1219
+ if (message.errorMessage !== "") {
1220
+ writer.uint32(106).string(message.errorMessage);
1221
+ }
1222
+ if (message.startedAt !== undefined) {
1223
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(114).fork()).join();
1224
+ }
1225
+ if (message.completedAt !== undefined) {
1226
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.completedAt), writer.uint32(122).fork()).join();
1227
+ }
1228
+ if (message.workflowId !== "") {
1229
+ writer.uint32(130).string(message.workflowId);
1230
+ }
1231
+ if (message.childWorkflowRunId !== "") {
1232
+ writer.uint32(138).string(message.childWorkflowRunId);
1233
+ }
1234
+ return writer;
1235
+ },
1236
+ decode(input, length) {
1237
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1238
+ const end = length === undefined ? reader.len : reader.pos + length;
1239
+ const message = createBaseWorkflowRunStep();
1240
+ while (reader.pos < end) {
1241
+ const tag = reader.uint32();
1242
+ switch (tag >>> 3) {
1243
+ case 1: {
1244
+ if (tag !== 10) {
1245
+ break;
1246
+ }
1247
+ message.id = reader.string();
1248
+ continue;
1249
+ }
1250
+ case 2: {
1251
+ if (tag !== 18) {
1252
+ break;
1253
+ }
1254
+ message.orgId = reader.string();
1255
+ continue;
1256
+ }
1257
+ case 3: {
1258
+ if (tag !== 26) {
1259
+ break;
1260
+ }
1261
+ message.workflowRunId = reader.string();
1262
+ continue;
1263
+ }
1264
+ case 4: {
1265
+ if (tag !== 34) {
1266
+ break;
1267
+ }
1268
+ message.stepKey = reader.string();
1269
+ continue;
1270
+ }
1271
+ case 5: {
1272
+ if (tag !== 40) {
1273
+ break;
1274
+ }
1275
+ message.kind = reader.int32();
1276
+ continue;
1277
+ }
1278
+ case 6: {
1279
+ if (tag !== 48) {
1280
+ break;
1281
+ }
1282
+ message.status = reader.int32();
1283
+ continue;
1284
+ }
1285
+ case 7: {
1286
+ if (tag !== 58) {
1287
+ break;
1288
+ }
1289
+ message.agentId = reader.string();
1290
+ continue;
1291
+ }
1292
+ case 8: {
1293
+ if (tag !== 66) {
1294
+ break;
1295
+ }
1296
+ message.agentRunId = reader.string();
1297
+ continue;
1298
+ }
1299
+ case 9: {
1300
+ if (tag !== 74) {
1301
+ break;
1302
+ }
1303
+ message.toolId = reader.string();
1304
+ continue;
1305
+ }
1306
+ case 10: {
1307
+ if (tag !== 82) {
1308
+ break;
1309
+ }
1310
+ message.input = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
1311
+ continue;
1312
+ }
1313
+ case 11: {
1314
+ if (tag !== 90) {
1315
+ break;
1316
+ }
1317
+ message.output = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
1318
+ continue;
1319
+ }
1320
+ case 12: {
1321
+ if (tag !== 98) {
1322
+ break;
1323
+ }
1324
+ message.errorCode = reader.string();
1325
+ continue;
1326
+ }
1327
+ case 13: {
1328
+ if (tag !== 106) {
1329
+ break;
1330
+ }
1331
+ message.errorMessage = reader.string();
1332
+ continue;
1333
+ }
1334
+ case 14: {
1335
+ if (tag !== 114) {
1336
+ break;
1337
+ }
1338
+ message.startedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
1339
+ continue;
1340
+ }
1341
+ case 15: {
1342
+ if (tag !== 122) {
1343
+ break;
1344
+ }
1345
+ message.completedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
1346
+ continue;
1347
+ }
1348
+ case 16: {
1349
+ if (tag !== 130) {
1350
+ break;
1351
+ }
1352
+ message.workflowId = reader.string();
1353
+ continue;
1354
+ }
1355
+ case 17: {
1356
+ if (tag !== 138) {
1357
+ break;
1358
+ }
1359
+ message.childWorkflowRunId = reader.string();
1360
+ continue;
1361
+ }
1362
+ }
1363
+ if ((tag & 7) === 4 || tag === 0) {
1364
+ break;
1365
+ }
1366
+ reader.skip(tag & 7);
1367
+ }
1368
+ return message;
1369
+ },
1370
+ fromJSON(object) {
1371
+ return {
1372
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1373
+ orgId: isSet(object.orgId)
1374
+ ? globalThis.String(object.orgId)
1375
+ : isSet(object.org_id)
1376
+ ? globalThis.String(object.org_id)
1377
+ : "",
1378
+ workflowRunId: isSet(object.workflowRunId)
1379
+ ? globalThis.String(object.workflowRunId)
1380
+ : isSet(object.workflow_run_id)
1381
+ ? globalThis.String(object.workflow_run_id)
1382
+ : "",
1383
+ stepKey: isSet(object.stepKey)
1384
+ ? globalThis.String(object.stepKey)
1385
+ : isSet(object.step_key)
1386
+ ? globalThis.String(object.step_key)
1387
+ : "",
1388
+ kind: isSet(object.kind) ? workflowRunStepKindFromJSON(object.kind) : 0,
1389
+ status: isSet(object.status) ? workflowRunStepStatusFromJSON(object.status) : 0,
1390
+ agentId: isSet(object.agentId)
1391
+ ? globalThis.String(object.agentId)
1392
+ : isSet(object.agent_id)
1393
+ ? globalThis.String(object.agent_id)
1394
+ : "",
1395
+ agentRunId: isSet(object.agentRunId)
1396
+ ? globalThis.String(object.agentRunId)
1397
+ : isSet(object.agent_run_id)
1398
+ ? globalThis.String(object.agent_run_id)
1399
+ : "",
1400
+ toolId: isSet(object.toolId)
1401
+ ? globalThis.String(object.toolId)
1402
+ : isSet(object.tool_id)
1403
+ ? globalThis.String(object.tool_id)
1404
+ : "",
1405
+ input: isObject(object.input) ? object.input : undefined,
1406
+ output: isObject(object.output) ? object.output : undefined,
1407
+ errorCode: isSet(object.errorCode)
1408
+ ? globalThis.String(object.errorCode)
1409
+ : isSet(object.error_code)
1410
+ ? globalThis.String(object.error_code)
1411
+ : "",
1412
+ errorMessage: isSet(object.errorMessage)
1413
+ ? globalThis.String(object.errorMessage)
1414
+ : isSet(object.error_message)
1415
+ ? globalThis.String(object.error_message)
1416
+ : "",
1417
+ startedAt: isSet(object.startedAt)
1418
+ ? fromJsonTimestamp(object.startedAt)
1419
+ : isSet(object.started_at)
1420
+ ? fromJsonTimestamp(object.started_at)
1421
+ : undefined,
1422
+ completedAt: isSet(object.completedAt)
1423
+ ? fromJsonTimestamp(object.completedAt)
1424
+ : isSet(object.completed_at)
1425
+ ? fromJsonTimestamp(object.completed_at)
1426
+ : undefined,
1427
+ workflowId: isSet(object.workflowId)
1428
+ ? globalThis.String(object.workflowId)
1429
+ : isSet(object.workflow_id)
1430
+ ? globalThis.String(object.workflow_id)
1431
+ : "",
1432
+ childWorkflowRunId: isSet(object.childWorkflowRunId)
1433
+ ? globalThis.String(object.childWorkflowRunId)
1434
+ : isSet(object.child_workflow_run_id)
1435
+ ? globalThis.String(object.child_workflow_run_id)
1436
+ : "",
1437
+ };
1438
+ },
1439
+ toJSON(message) {
1440
+ const obj = {};
1441
+ if (message.id !== "") {
1442
+ obj.id = message.id;
1443
+ }
1444
+ if (message.orgId !== "") {
1445
+ obj.orgId = message.orgId;
1446
+ }
1447
+ if (message.workflowRunId !== "") {
1448
+ obj.workflowRunId = message.workflowRunId;
1449
+ }
1450
+ if (message.stepKey !== "") {
1451
+ obj.stepKey = message.stepKey;
1452
+ }
1453
+ if (message.kind !== 0) {
1454
+ obj.kind = workflowRunStepKindToJSON(message.kind);
1455
+ }
1456
+ if (message.status !== 0) {
1457
+ obj.status = workflowRunStepStatusToJSON(message.status);
1458
+ }
1459
+ if (message.agentId !== "") {
1460
+ obj.agentId = message.agentId;
1461
+ }
1462
+ if (message.agentRunId !== "") {
1463
+ obj.agentRunId = message.agentRunId;
1464
+ }
1465
+ if (message.toolId !== "") {
1466
+ obj.toolId = message.toolId;
1467
+ }
1468
+ if (message.input !== undefined) {
1469
+ obj.input = message.input;
1470
+ }
1471
+ if (message.output !== undefined) {
1472
+ obj.output = message.output;
1473
+ }
1474
+ if (message.errorCode !== "") {
1475
+ obj.errorCode = message.errorCode;
1476
+ }
1477
+ if (message.errorMessage !== "") {
1478
+ obj.errorMessage = message.errorMessage;
1479
+ }
1480
+ if (message.startedAt !== undefined) {
1481
+ obj.startedAt = message.startedAt.toISOString();
1482
+ }
1483
+ if (message.completedAt !== undefined) {
1484
+ obj.completedAt = message.completedAt.toISOString();
1485
+ }
1486
+ if (message.workflowId !== "") {
1487
+ obj.workflowId = message.workflowId;
1488
+ }
1489
+ if (message.childWorkflowRunId !== "") {
1490
+ obj.childWorkflowRunId = message.childWorkflowRunId;
1491
+ }
1492
+ return obj;
1493
+ },
1494
+ create(base) {
1495
+ return exports.WorkflowRunStep.fromPartial(base !== null && base !== void 0 ? base : {});
1496
+ },
1497
+ fromPartial(object) {
1498
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
1499
+ const message = createBaseWorkflowRunStep();
1500
+ message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
1501
+ message.orgId = (_b = object.orgId) !== null && _b !== void 0 ? _b : "";
1502
+ message.workflowRunId = (_c = object.workflowRunId) !== null && _c !== void 0 ? _c : "";
1503
+ message.stepKey = (_d = object.stepKey) !== null && _d !== void 0 ? _d : "";
1504
+ message.kind = (_e = object.kind) !== null && _e !== void 0 ? _e : 0;
1505
+ message.status = (_f = object.status) !== null && _f !== void 0 ? _f : 0;
1506
+ message.agentId = (_g = object.agentId) !== null && _g !== void 0 ? _g : "";
1507
+ message.agentRunId = (_h = object.agentRunId) !== null && _h !== void 0 ? _h : "";
1508
+ message.toolId = (_j = object.toolId) !== null && _j !== void 0 ? _j : "";
1509
+ message.input = (_k = object.input) !== null && _k !== void 0 ? _k : undefined;
1510
+ message.output = (_l = object.output) !== null && _l !== void 0 ? _l : undefined;
1511
+ message.errorCode = (_m = object.errorCode) !== null && _m !== void 0 ? _m : "";
1512
+ message.errorMessage = (_o = object.errorMessage) !== null && _o !== void 0 ? _o : "";
1513
+ message.startedAt = (_p = object.startedAt) !== null && _p !== void 0 ? _p : undefined;
1514
+ message.completedAt = (_q = object.completedAt) !== null && _q !== void 0 ? _q : undefined;
1515
+ message.workflowId = (_r = object.workflowId) !== null && _r !== void 0 ? _r : "";
1516
+ message.childWorkflowRunId = (_s = object.childWorkflowRunId) !== null && _s !== void 0 ? _s : "";
1517
+ return message;
1518
+ },
1519
+ };
1520
+ exports.WorkflowRunServiceServiceName = "weaveapi.workflow.v1.WorkflowRunService";
1521
+ class WorkflowRunServiceClientImpl {
1522
+ constructor(rpc, opts) {
1523
+ this.service = (opts === null || opts === void 0 ? void 0 : opts.service) || exports.WorkflowRunServiceServiceName;
1524
+ this.rpc = rpc;
1525
+ this.CreateWorkflowRun = this.CreateWorkflowRun.bind(this);
1526
+ this.GetWorkflowRun = this.GetWorkflowRun.bind(this);
1527
+ this.CancelWorkflowRun = this.CancelWorkflowRun.bind(this);
1528
+ this.ListWorkflowRuns = this.ListWorkflowRuns.bind(this);
1529
+ this.ListWorkflowRunSteps = this.ListWorkflowRunSteps.bind(this);
1530
+ }
1531
+ CreateWorkflowRun(request) {
1532
+ const data = exports.CreateWorkflowRunRequest.encode(request).finish();
1533
+ const promise = this.rpc.request(this.service, "CreateWorkflowRun", data);
1534
+ return promise.then((data) => exports.CreateWorkflowRunResponse.decode(new wire_1.BinaryReader(data)));
1535
+ }
1536
+ GetWorkflowRun(request) {
1537
+ const data = exports.GetWorkflowRunRequest.encode(request).finish();
1538
+ const promise = this.rpc.request(this.service, "GetWorkflowRun", data);
1539
+ return promise.then((data) => exports.GetWorkflowRunResponse.decode(new wire_1.BinaryReader(data)));
1540
+ }
1541
+ CancelWorkflowRun(request) {
1542
+ const data = exports.CancelWorkflowRunRequest.encode(request).finish();
1543
+ const promise = this.rpc.request(this.service, "CancelWorkflowRun", data);
1544
+ return promise.then((data) => exports.CancelWorkflowRunResponse.decode(new wire_1.BinaryReader(data)));
1545
+ }
1546
+ ListWorkflowRuns(request) {
1547
+ const data = exports.ListWorkflowRunsRequest.encode(request).finish();
1548
+ const promise = this.rpc.request(this.service, "ListWorkflowRuns", data);
1549
+ return promise.then((data) => exports.ListWorkflowRunsResponse.decode(new wire_1.BinaryReader(data)));
1550
+ }
1551
+ ListWorkflowRunSteps(request) {
1552
+ const data = exports.ListWorkflowRunStepsRequest.encode(request).finish();
1553
+ const promise = this.rpc.request(this.service, "ListWorkflowRunSteps", data);
1554
+ return promise.then((data) => exports.ListWorkflowRunStepsResponse.decode(new wire_1.BinaryReader(data)));
1555
+ }
1556
+ }
1557
+ exports.WorkflowRunServiceClientImpl = WorkflowRunServiceClientImpl;
1558
+ exports.WorkflowRunServiceDefinition = {
1559
+ name: "WorkflowRunService",
1560
+ fullName: "weaveapi.workflow.v1.WorkflowRunService",
1561
+ methods: {
1562
+ createWorkflowRun: {
1563
+ name: "CreateWorkflowRun",
1564
+ requestType: exports.CreateWorkflowRunRequest,
1565
+ requestStream: false,
1566
+ responseType: exports.CreateWorkflowRunResponse,
1567
+ responseStream: false,
1568
+ options: {
1569
+ _unknownFields: {
1570
+ 408002: [
1571
+ new Uint8Array([
1572
+ 34,
1573
+ 10,
1574
+ 8,
1575
+ 119,
1576
+ 111,
1577
+ 114,
1578
+ 107,
1579
+ 102,
1580
+ 108,
1581
+ 111,
1582
+ 119,
1583
+ 18,
1584
+ 7,
1585
+ 99,
1586
+ 97,
1587
+ 110,
1588
+ 95,
1589
+ 114,
1590
+ 117,
1591
+ 110,
1592
+ 26,
1593
+ 13,
1594
+ 18,
1595
+ 11,
1596
+ 119,
1597
+ 111,
1598
+ 114,
1599
+ 107,
1600
+ 102,
1601
+ 108,
1602
+ 111,
1603
+ 119,
1604
+ 95,
1605
+ 105,
1606
+ 100,
1607
+ ]),
1608
+ ],
1609
+ 578365826: [
1610
+ new Uint8Array([
1611
+ 36,
1612
+ 58,
1613
+ 1,
1614
+ 42,
1615
+ 34,
1616
+ 31,
1617
+ 47,
1618
+ 118,
1619
+ 49,
1620
+ 47,
1621
+ 119,
1622
+ 111,
1623
+ 114,
1624
+ 107,
1625
+ 102,
1626
+ 108,
1627
+ 111,
1628
+ 119,
1629
+ 115,
1630
+ 47,
1631
+ 123,
1632
+ 119,
1633
+ 111,
1634
+ 114,
1635
+ 107,
1636
+ 102,
1637
+ 108,
1638
+ 111,
1639
+ 119,
1640
+ 95,
1641
+ 105,
1642
+ 100,
1643
+ 125,
1644
+ 58,
1645
+ 114,
1646
+ 117,
1647
+ 110,
1648
+ ]),
1649
+ ],
1650
+ },
1651
+ },
1652
+ },
1653
+ getWorkflowRun: {
1654
+ name: "GetWorkflowRun",
1655
+ requestType: exports.GetWorkflowRunRequest,
1656
+ requestStream: false,
1657
+ responseType: exports.GetWorkflowRunResponse,
1658
+ responseStream: false,
1659
+ options: {
1660
+ _unknownFields: {
1661
+ 408002: [
1662
+ new Uint8Array([
1663
+ 43,
1664
+ 10,
1665
+ 12,
1666
+ 119,
1667
+ 111,
1668
+ 114,
1669
+ 107,
1670
+ 102,
1671
+ 108,
1672
+ 111,
1673
+ 119,
1674
+ 95,
1675
+ 114,
1676
+ 117,
1677
+ 110,
1678
+ 18,
1679
+ 8,
1680
+ 99,
1681
+ 97,
1682
+ 110,
1683
+ 95,
1684
+ 114,
1685
+ 101,
1686
+ 97,
1687
+ 100,
1688
+ 26,
1689
+ 17,
1690
+ 18,
1691
+ 15,
1692
+ 119,
1693
+ 111,
1694
+ 114,
1695
+ 107,
1696
+ 102,
1697
+ 108,
1698
+ 111,
1699
+ 119,
1700
+ 95,
1701
+ 114,
1702
+ 117,
1703
+ 110,
1704
+ 95,
1705
+ 105,
1706
+ 100,
1707
+ ]),
1708
+ ],
1709
+ 578365826: [
1710
+ new Uint8Array([
1711
+ 37,
1712
+ 18,
1713
+ 35,
1714
+ 47,
1715
+ 118,
1716
+ 49,
1717
+ 47,
1718
+ 119,
1719
+ 111,
1720
+ 114,
1721
+ 107,
1722
+ 102,
1723
+ 108,
1724
+ 111,
1725
+ 119,
1726
+ 45,
1727
+ 114,
1728
+ 117,
1729
+ 110,
1730
+ 115,
1731
+ 47,
1732
+ 123,
1733
+ 119,
1734
+ 111,
1735
+ 114,
1736
+ 107,
1737
+ 102,
1738
+ 108,
1739
+ 111,
1740
+ 119,
1741
+ 95,
1742
+ 114,
1743
+ 117,
1744
+ 110,
1745
+ 95,
1746
+ 105,
1747
+ 100,
1748
+ 125,
1749
+ ]),
1750
+ ],
1751
+ },
1752
+ },
1753
+ },
1754
+ cancelWorkflowRun: {
1755
+ name: "CancelWorkflowRun",
1756
+ requestType: exports.CancelWorkflowRunRequest,
1757
+ requestStream: false,
1758
+ responseType: exports.CancelWorkflowRunResponse,
1759
+ responseStream: false,
1760
+ options: {
1761
+ _unknownFields: {
1762
+ 408002: [
1763
+ new Uint8Array([
1764
+ 45,
1765
+ 10,
1766
+ 12,
1767
+ 119,
1768
+ 111,
1769
+ 114,
1770
+ 107,
1771
+ 102,
1772
+ 108,
1773
+ 111,
1774
+ 119,
1775
+ 95,
1776
+ 114,
1777
+ 117,
1778
+ 110,
1779
+ 18,
1780
+ 10,
1781
+ 99,
1782
+ 97,
1783
+ 110,
1784
+ 95,
1785
+ 99,
1786
+ 97,
1787
+ 110,
1788
+ 99,
1789
+ 101,
1790
+ 108,
1791
+ 26,
1792
+ 17,
1793
+ 18,
1794
+ 15,
1795
+ 119,
1796
+ 111,
1797
+ 114,
1798
+ 107,
1799
+ 102,
1800
+ 108,
1801
+ 111,
1802
+ 119,
1803
+ 95,
1804
+ 114,
1805
+ 117,
1806
+ 110,
1807
+ 95,
1808
+ 105,
1809
+ 100,
1810
+ ]),
1811
+ ],
1812
+ 578365826: [
1813
+ new Uint8Array([
1814
+ 47,
1815
+ 58,
1816
+ 1,
1817
+ 42,
1818
+ 34,
1819
+ 42,
1820
+ 47,
1821
+ 118,
1822
+ 49,
1823
+ 47,
1824
+ 119,
1825
+ 111,
1826
+ 114,
1827
+ 107,
1828
+ 102,
1829
+ 108,
1830
+ 111,
1831
+ 119,
1832
+ 45,
1833
+ 114,
1834
+ 117,
1835
+ 110,
1836
+ 115,
1837
+ 47,
1838
+ 123,
1839
+ 119,
1840
+ 111,
1841
+ 114,
1842
+ 107,
1843
+ 102,
1844
+ 108,
1845
+ 111,
1846
+ 119,
1847
+ 95,
1848
+ 114,
1849
+ 117,
1850
+ 110,
1851
+ 95,
1852
+ 105,
1853
+ 100,
1854
+ 125,
1855
+ 58,
1856
+ 99,
1857
+ 97,
1858
+ 110,
1859
+ 99,
1860
+ 101,
1861
+ 108,
1862
+ ]),
1863
+ ],
1864
+ },
1865
+ },
1866
+ },
1867
+ listWorkflowRuns: {
1868
+ name: "ListWorkflowRuns",
1869
+ requestType: exports.ListWorkflowRunsRequest,
1870
+ requestStream: false,
1871
+ responseType: exports.ListWorkflowRunsResponse,
1872
+ responseStream: false,
1873
+ options: {
1874
+ _unknownFields: {
1875
+ 408002: [
1876
+ new Uint8Array([
1877
+ 42,
1878
+ 10,
1879
+ 12,
1880
+ 111,
1881
+ 114,
1882
+ 103,
1883
+ 97,
1884
+ 110,
1885
+ 105,
1886
+ 122,
1887
+ 97,
1888
+ 116,
1889
+ 105,
1890
+ 111,
1891
+ 110,
1892
+ 18,
1893
+ 22,
1894
+ 99,
1895
+ 97,
1896
+ 110,
1897
+ 95,
1898
+ 108,
1899
+ 105,
1900
+ 115,
1901
+ 116,
1902
+ 95,
1903
+ 119,
1904
+ 111,
1905
+ 114,
1906
+ 107,
1907
+ 102,
1908
+ 108,
1909
+ 111,
1910
+ 119,
1911
+ 95,
1912
+ 114,
1913
+ 117,
1914
+ 110,
1915
+ 115,
1916
+ 26,
1917
+ 2,
1918
+ 8,
1919
+ 1,
1920
+ ]),
1921
+ ],
1922
+ 578365826: [
1923
+ new Uint8Array([
1924
+ 19,
1925
+ 18,
1926
+ 17,
1927
+ 47,
1928
+ 118,
1929
+ 49,
1930
+ 47,
1931
+ 119,
1932
+ 111,
1933
+ 114,
1934
+ 107,
1935
+ 102,
1936
+ 108,
1937
+ 111,
1938
+ 119,
1939
+ 45,
1940
+ 114,
1941
+ 117,
1942
+ 110,
1943
+ 115,
1944
+ ]),
1945
+ ],
1946
+ },
1947
+ },
1948
+ },
1949
+ listWorkflowRunSteps: {
1950
+ name: "ListWorkflowRunSteps",
1951
+ requestType: exports.ListWorkflowRunStepsRequest,
1952
+ requestStream: false,
1953
+ responseType: exports.ListWorkflowRunStepsResponse,
1954
+ responseStream: false,
1955
+ options: {
1956
+ _unknownFields: {
1957
+ 408002: [
1958
+ new Uint8Array([
1959
+ 43,
1960
+ 10,
1961
+ 12,
1962
+ 119,
1963
+ 111,
1964
+ 114,
1965
+ 107,
1966
+ 102,
1967
+ 108,
1968
+ 111,
1969
+ 119,
1970
+ 95,
1971
+ 114,
1972
+ 117,
1973
+ 110,
1974
+ 18,
1975
+ 8,
1976
+ 99,
1977
+ 97,
1978
+ 110,
1979
+ 95,
1980
+ 114,
1981
+ 101,
1982
+ 97,
1983
+ 100,
1984
+ 26,
1985
+ 17,
1986
+ 18,
1987
+ 15,
1988
+ 119,
1989
+ 111,
1990
+ 114,
1991
+ 107,
1992
+ 102,
1993
+ 108,
1994
+ 111,
1995
+ 119,
1996
+ 95,
1997
+ 114,
1998
+ 117,
1999
+ 110,
2000
+ 95,
2001
+ 105,
2002
+ 100,
2003
+ ]),
2004
+ ],
2005
+ 578365826: [
2006
+ new Uint8Array([
2007
+ 43,
2008
+ 18,
2009
+ 41,
2010
+ 47,
2011
+ 118,
2012
+ 49,
2013
+ 47,
2014
+ 119,
2015
+ 111,
2016
+ 114,
2017
+ 107,
2018
+ 102,
2019
+ 108,
2020
+ 111,
2021
+ 119,
2022
+ 45,
2023
+ 114,
2024
+ 117,
2025
+ 110,
2026
+ 115,
2027
+ 47,
2028
+ 123,
2029
+ 119,
2030
+ 111,
2031
+ 114,
2032
+ 107,
2033
+ 102,
2034
+ 108,
2035
+ 111,
2036
+ 119,
2037
+ 95,
2038
+ 114,
2039
+ 117,
2040
+ 110,
2041
+ 95,
2042
+ 105,
2043
+ 100,
2044
+ 125,
2045
+ 47,
2046
+ 115,
2047
+ 116,
2048
+ 101,
2049
+ 112,
2050
+ 115,
2051
+ ]),
2052
+ ],
2053
+ },
2054
+ },
2055
+ },
2056
+ },
2057
+ };
2058
+ function toTimestamp(date) {
2059
+ const seconds = Math.trunc(date.getTime() / 1000);
2060
+ const nanos = (date.getTime() % 1000) * 1000000;
2061
+ return { seconds, nanos };
2062
+ }
2063
+ function fromTimestamp(t) {
2064
+ let millis = (t.seconds || 0) * 1000;
2065
+ millis += (t.nanos || 0) / 1000000;
2066
+ return new globalThis.Date(millis);
2067
+ }
2068
+ function fromJsonTimestamp(o) {
2069
+ if (o instanceof globalThis.Date) {
2070
+ return o;
2071
+ }
2072
+ else if (typeof o === "string") {
2073
+ return new globalThis.Date(o);
2074
+ }
2075
+ else {
2076
+ return fromTimestamp(timestamp_pb_1.Timestamp.fromJSON(o));
2077
+ }
2078
+ }
2079
+ function isObject(value) {
2080
+ return typeof value === "object" && value !== null;
2081
+ }
2082
+ function isSet(value) {
2083
+ return value !== null && value !== undefined;
2084
+ }