weave-typescript 0.51.3 → 0.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/dist/google/protobuf/duration.pb.d.ts +99 -0
  2. package/dist/google/protobuf/duration.pb.js +93 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +2 -1
  5. package/dist/weave/authz/v1/index.d.ts +1 -0
  6. package/dist/weave/authz/v1/index.js +38 -0
  7. package/dist/weave/authz/v1/options.pb.d.ts +52 -0
  8. package/dist/weave/authz/v1/options.pb.js +403 -0
  9. package/dist/weave/filter/v1/index.d.ts +1 -0
  10. package/dist/weave/filter/v1/index.js +38 -0
  11. package/dist/{weaveapi/atc/v1/message.pb.d.ts → weave/filter/v1/options.pb.d.ts} +33 -21
  12. package/dist/weave/filter/v1/options.pb.js +417 -0
  13. package/dist/weave/index.d.ts +2 -0
  14. package/dist/weave/index.js +39 -0
  15. package/dist/weaveapi/agent/v1/agent.pb.d.ts +137 -188
  16. package/dist/weaveapi/agent/v1/agent.pb.js +891 -2151
  17. package/dist/weaveapi/agent/v1/index.d.ts +1 -1
  18. package/dist/weaveapi/agent/v1/index.js +2 -2
  19. package/dist/weaveapi/agent/v1/run.pb.d.ts +289 -0
  20. package/dist/weaveapi/agent/v1/run.pb.js +2763 -0
  21. package/dist/weaveapi/auth/v1/auth.pb.d.ts +67 -14
  22. package/dist/weaveapi/auth/v1/auth.pb.js +829 -89
  23. package/dist/weaveapi/auth/v1/index.d.ts +4 -1
  24. package/dist/weaveapi/auth/v1/index.js +5 -2
  25. package/dist/weaveapi/auth/v1/{service.pb.d.ts → organization_admin.pb.d.ts} +39 -530
  26. package/dist/weaveapi/auth/v1/{service.pb.js → organization_admin.pb.js} +2978 -5812
  27. package/dist/weaveapi/auth/v1/personal_access_token.pb.d.ts +114 -0
  28. package/dist/weaveapi/auth/v1/personal_access_token.pb.js +750 -0
  29. package/dist/weaveapi/auth/v1/profile.pb.d.ts +161 -0
  30. package/dist/weaveapi/auth/v1/profile.pb.js +1007 -0
  31. package/dist/weaveapi/auth/v1/session.pb.d.ts +460 -0
  32. package/dist/weaveapi/auth/v1/session.pb.js +3544 -0
  33. package/dist/weaveapi/chat/v1/chat.pb.d.ts +377 -149
  34. package/dist/weaveapi/chat/v1/chat.pb.js +3492 -1614
  35. package/dist/weaveapi/chat/v1/index.d.ts +0 -1
  36. package/dist/weaveapi/chat/v1/index.js +1 -2
  37. package/dist/weaveapi/consolidation/v1/consolidation.pb.d.ts +95 -0
  38. package/dist/weaveapi/consolidation/v1/consolidation.pb.js +770 -1
  39. package/dist/weaveapi/consolidation/v1/index.d.ts +0 -1
  40. package/dist/weaveapi/consolidation/v1/index.js +1 -2
  41. package/dist/weaveapi/content/v1/content.pb.d.ts +63 -0
  42. package/dist/weaveapi/content/v1/content.pb.js +470 -0
  43. package/dist/weaveapi/content/v1/index.d.ts +1 -0
  44. package/dist/weaveapi/content/v1/index.js +38 -0
  45. package/dist/weaveapi/gateway/v1/gateway.pb.d.ts +247 -523
  46. package/dist/weaveapi/gateway/v1/gateway.pb.js +1648 -5783
  47. package/dist/weaveapi/gateway/v1/index.d.ts +0 -1
  48. package/dist/weaveapi/gateway/v1/index.js +1 -2
  49. package/dist/weaveapi/index.d.ts +5 -5
  50. package/dist/weaveapi/index.js +6 -6
  51. package/dist/weaveapi/inference/v1/generate.pb.d.ts +120 -0
  52. package/dist/weaveapi/inference/v1/generate.pb.js +1159 -0
  53. package/dist/weaveapi/inference/v1/index.d.ts +4 -0
  54. package/dist/weaveapi/{provider → inference}/v1/index.js +4 -2
  55. package/dist/weaveapi/{model → inference}/v1/model.pb.d.ts +52 -15
  56. package/dist/weaveapi/{model → inference}/v1/model.pb.js +529 -116
  57. package/dist/weaveapi/{model/v1/service.pb.d.ts → inference/v1/model_route.pb.d.ts} +182 -110
  58. package/dist/weaveapi/{model/v1/service.pb.js → inference/v1/model_route.pb.js} +2197 -1061
  59. package/dist/weaveapi/inference/v1/provider.pb.d.ts +264 -0
  60. package/dist/weaveapi/inference/v1/provider.pb.js +2590 -0
  61. package/dist/weaveapi/ingestion/v1/index.d.ts +0 -2
  62. package/dist/weaveapi/ingestion/v1/index.js +1 -3
  63. package/dist/weaveapi/ingestion/v1/ingestion.pb.d.ts +543 -0
  64. package/dist/weaveapi/ingestion/v1/ingestion.pb.js +5550 -16
  65. package/dist/weaveapi/initialization/v1/index.d.ts +1 -0
  66. package/dist/weaveapi/initialization/v1/index.js +38 -0
  67. package/dist/weaveapi/initialization/v1/initialization.pb.d.ts +99 -0
  68. package/dist/weaveapi/initialization/v1/initialization.pb.js +510 -0
  69. package/dist/weaveapi/organization/v1/index.d.ts +0 -1
  70. package/dist/weaveapi/organization/v1/index.js +1 -2
  71. package/dist/weaveapi/organization/v1/organization.pb.d.ts +241 -0
  72. package/dist/weaveapi/organization/v1/organization.pb.js +1838 -1
  73. package/dist/weaveapi/reporting/index.d.ts +1 -0
  74. package/dist/weaveapi/reporting/index.js +38 -0
  75. package/dist/weaveapi/{task → reporting}/v1/index.d.ts +1 -1
  76. package/dist/weaveapi/{model → reporting}/v1/index.js +2 -2
  77. package/dist/weaveapi/reporting/v1/service.pb.d.ts +38 -0
  78. package/dist/weaveapi/reporting/v1/service.pb.js +167 -0
  79. package/dist/weaveapi/reporting/v1/usage.pb.d.ts +150 -0
  80. package/dist/weaveapi/reporting/v1/usage.pb.js +1837 -0
  81. package/dist/weaveapi/retrieval/v1/index.d.ts +0 -1
  82. package/dist/weaveapi/retrieval/v1/index.js +1 -2
  83. package/dist/weaveapi/retrieval/v1/retrieval.pb.d.ts +96 -2
  84. package/dist/weaveapi/retrieval/v1/retrieval.pb.js +690 -10
  85. package/dist/weaveapi/tool/index.d.ts +1 -0
  86. package/dist/weaveapi/tool/index.js +38 -0
  87. package/dist/weaveapi/tool/v1/index.d.ts +1 -0
  88. package/dist/weaveapi/tool/v1/index.js +38 -0
  89. package/dist/weaveapi/tool/v1/tool.pb.d.ts +370 -0
  90. package/dist/weaveapi/tool/v1/tool.pb.js +2717 -0
  91. package/dist/weaveapi/workflow/v1/index.d.ts +1 -1
  92. package/dist/weaveapi/workflow/v1/index.js +2 -2
  93. package/dist/weaveapi/workflow/v1/run.pb.d.ts +244 -0
  94. package/dist/weaveapi/workflow/v1/run.pb.js +2084 -0
  95. package/dist/weaveapi/workflow/v1/workflow.pb.d.ts +122 -275
  96. package/dist/weaveapi/workflow/v1/workflow.pb.js +790 -3261
  97. package/dist/weavesql/weavedb/agent_sql.d.ts +173 -477
  98. package/dist/weavesql/weavedb/agent_sql.js +281 -758
  99. package/dist/weavesql/weavedb/authorization_outbox_sql.d.ts +261 -0
  100. package/dist/weavesql/weavedb/authorization_outbox_sql.js +445 -0
  101. package/dist/weavesql/weavedb/chat_sql.d.ts +103 -345
  102. package/dist/weavesql/weavedb/chat_sql.js +312 -597
  103. package/dist/weavesql/weavedb/document_consolidation_sql.d.ts +217 -0
  104. package/dist/weavesql/weavedb/document_consolidation_sql.js +486 -0
  105. package/dist/weavesql/weavedb/document_ingestion_sql.d.ts +1433 -0
  106. package/dist/weavesql/weavedb/document_ingestion_sql.js +3488 -0
  107. package/dist/weavesql/weavedb/document_retrieval_sql.d.ts +314 -0
  108. package/dist/weavesql/weavedb/document_retrieval_sql.js +965 -0
  109. package/dist/weavesql/weavedb/document_table_sql.d.ts +6 -6
  110. package/dist/weavesql/weavedb/document_table_sql.js +12 -12
  111. package/dist/weavesql/weavedb/identity_sql.d.ts +1014 -0
  112. package/dist/weavesql/weavedb/identity_sql.js +1811 -0
  113. package/dist/weavesql/weavedb/inference_model_route_sql.d.ts +161 -0
  114. package/dist/weavesql/weavedb/inference_model_route_sql.js +408 -0
  115. package/dist/weavesql/weavedb/inference_provider_sql.d.ts +125 -0
  116. package/dist/weavesql/weavedb/inference_provider_sql.js +228 -0
  117. package/dist/weavesql/weavedb/initialization_sql.d.ts +15 -0
  118. package/dist/weavesql/weavedb/initialization_sql.js +33 -0
  119. package/dist/weavesql/weavedb/model_catalog_sql.d.ts +6 -6
  120. package/dist/weavesql/weavedb/model_catalog_sql.js +6 -6
  121. package/dist/weavesql/weavedb/organization_sql.d.ts +22 -102
  122. package/dist/weavesql/weavedb/organization_sql.js +54 -262
  123. package/dist/weavesql/weavedb/tool_sql.d.ts +209 -0
  124. package/dist/weavesql/weavedb/tool_sql.js +407 -0
  125. package/dist/weavesql/weavedb/usage_sql.d.ts +356 -0
  126. package/dist/weavesql/weavedb/usage_sql.js +568 -0
  127. package/dist/weavesql/weavedb/workflow_sql.d.ts +159 -546
  128. package/dist/weavesql/weavedb/workflow_sql.js +281 -909
  129. package/package.json +1 -1
  130. package/dist/weaveapi/agent/v1/service.pb.d.ts +0 -397
  131. package/dist/weaveapi/agent/v1/service.pb.js +0 -3152
  132. package/dist/weaveapi/atc/v1/event.pb.d.ts +0 -134
  133. package/dist/weaveapi/atc/v1/event.pb.js +0 -1124
  134. package/dist/weaveapi/atc/v1/index.d.ts +0 -5
  135. package/dist/weaveapi/atc/v1/index.js +0 -42
  136. package/dist/weaveapi/atc/v1/message.pb.js +0 -287
  137. package/dist/weaveapi/atc/v1/process.pb.d.ts +0 -91
  138. package/dist/weaveapi/atc/v1/process.pb.js +0 -658
  139. package/dist/weaveapi/atc/v1/run.pb.d.ts +0 -71
  140. package/dist/weaveapi/atc/v1/run.pb.js +0 -525
  141. package/dist/weaveapi/atc/v1/service.pb.d.ts +0 -472
  142. package/dist/weaveapi/atc/v1/service.pb.js +0 -3093
  143. package/dist/weaveapi/chat/v1/service.pb.d.ts +0 -345
  144. package/dist/weaveapi/chat/v1/service.pb.js +0 -2545
  145. package/dist/weaveapi/consolidation/v1/service.pb.d.ts +0 -93
  146. package/dist/weaveapi/consolidation/v1/service.pb.js +0 -427
  147. package/dist/weaveapi/gateway/v1/service.pb.d.ts +0 -235
  148. package/dist/weaveapi/gateway/v1/service.pb.js +0 -651
  149. package/dist/weaveapi/ingestion/v1/service.pb.d.ts +0 -420
  150. package/dist/weaveapi/ingestion/v1/service.pb.js +0 -2311
  151. package/dist/weaveapi/ingestion/v1/table.pb.d.ts +0 -121
  152. package/dist/weaveapi/ingestion/v1/table.pb.js +0 -1478
  153. package/dist/weaveapi/model/v1/index.d.ts +0 -2
  154. package/dist/weaveapi/organization/v1/service.pb.d.ts +0 -261
  155. package/dist/weaveapi/organization/v1/service.pb.js +0 -1561
  156. package/dist/weaveapi/project/v1/index.d.ts +0 -2
  157. package/dist/weaveapi/project/v1/index.js +0 -39
  158. package/dist/weaveapi/project/v1/project.pb.d.ts +0 -105
  159. package/dist/weaveapi/project/v1/project.pb.js +0 -1004
  160. package/dist/weaveapi/project/v1/service.pb.d.ts +0 -247
  161. package/dist/weaveapi/project/v1/service.pb.js +0 -1994
  162. package/dist/weaveapi/provider/v1/index.d.ts +0 -2
  163. package/dist/weaveapi/provider/v1/provider.pb.d.ts +0 -137
  164. package/dist/weaveapi/provider/v1/provider.pb.js +0 -1000
  165. package/dist/weaveapi/provider/v1/service.pb.d.ts +0 -223
  166. package/dist/weaveapi/provider/v1/service.pb.js +0 -1888
  167. package/dist/weaveapi/retrieval/v1/service.pb.d.ts +0 -93
  168. package/dist/weaveapi/retrieval/v1/service.pb.js +0 -385
  169. package/dist/weaveapi/task/v1/index.js +0 -39
  170. package/dist/weaveapi/task/v1/service.pb.d.ts +0 -172
  171. package/dist/weaveapi/task/v1/service.pb.js +0 -1436
  172. package/dist/weaveapi/task/v1/task.pb.d.ts +0 -85
  173. package/dist/weaveapi/task/v1/task.pb.js +0 -802
  174. package/dist/weaveapi/workflow/v1/service.pb.d.ts +0 -392
  175. package/dist/weaveapi/workflow/v1/service.pb.js +0 -3146
  176. /package/dist/{weaveapi/atc → weave/authz}/index.d.ts +0 -0
  177. /package/dist/{weaveapi/atc → weave/authz}/index.js +0 -0
  178. /package/dist/{weaveapi/model → weave/filter}/index.d.ts +0 -0
  179. /package/dist/{weaveapi/model → weave/filter}/index.js +0 -0
  180. /package/dist/weaveapi/{project → content}/index.d.ts +0 -0
  181. /package/dist/weaveapi/{project → content}/index.js +0 -0
  182. /package/dist/weaveapi/{provider → inference}/index.d.ts +0 -0
  183. /package/dist/weaveapi/{provider → inference}/index.js +0 -0
  184. /package/dist/weaveapi/{task → initialization}/index.d.ts +0 -0
  185. /package/dist/weaveapi/{task → initialization}/index.js +0 -0
@@ -1,1124 +0,0 @@
1
- "use strict";
2
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
- // versions:
4
- // protoc-gen-ts_proto v2.11.8
5
- // protoc unknown
6
- // source: weaveapi/atc/v1/event.proto
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.InspectionEvent = exports.InspectionActor = exports.InspectionSubject = exports.Event = exports.InspectionActorKind = exports.InspectionSubjectKind = exports.InspectionOutcome = exports.InspectionAction = exports.InspectionCategory = exports.protobufPackage = void 0;
9
- exports.inspectionCategoryFromJSON = inspectionCategoryFromJSON;
10
- exports.inspectionCategoryToJSON = inspectionCategoryToJSON;
11
- exports.inspectionActionFromJSON = inspectionActionFromJSON;
12
- exports.inspectionActionToJSON = inspectionActionToJSON;
13
- exports.inspectionOutcomeFromJSON = inspectionOutcomeFromJSON;
14
- exports.inspectionOutcomeToJSON = inspectionOutcomeToJSON;
15
- exports.inspectionSubjectKindFromJSON = inspectionSubjectKindFromJSON;
16
- exports.inspectionSubjectKindToJSON = inspectionSubjectKindToJSON;
17
- exports.inspectionActorKindFromJSON = inspectionActorKindFromJSON;
18
- exports.inspectionActorKindToJSON = inspectionActorKindToJSON;
19
- /* eslint-disable */
20
- const wire_1 = require("@bufbuild/protobuf/wire");
21
- const timestamp_pb_1 = require("../../../google/protobuf/timestamp.pb");
22
- exports.protobufPackage = "weaveapi.atc.v1";
23
- var InspectionCategory;
24
- (function (InspectionCategory) {
25
- InspectionCategory[InspectionCategory["INSPECTION_CATEGORY_UNSPECIFIED"] = 0] = "INSPECTION_CATEGORY_UNSPECIFIED";
26
- InspectionCategory[InspectionCategory["INSPECTION_CATEGORY_MEMORY"] = 1] = "INSPECTION_CATEGORY_MEMORY";
27
- InspectionCategory[InspectionCategory["INSPECTION_CATEGORY_ARTIFACT"] = 2] = "INSPECTION_CATEGORY_ARTIFACT";
28
- InspectionCategory[InspectionCategory["INSPECTION_CATEGORY_SECRET"] = 3] = "INSPECTION_CATEGORY_SECRET";
29
- InspectionCategory[InspectionCategory["INSPECTION_CATEGORY_POLICY"] = 4] = "INSPECTION_CATEGORY_POLICY";
30
- InspectionCategory[InspectionCategory["INSPECTION_CATEGORY_API"] = 5] = "INSPECTION_CATEGORY_API";
31
- InspectionCategory[InspectionCategory["INSPECTION_CATEGORY_STORAGE"] = 6] = "INSPECTION_CATEGORY_STORAGE";
32
- InspectionCategory[InspectionCategory["INSPECTION_CATEGORY_PROCESS"] = 7] = "INSPECTION_CATEGORY_PROCESS";
33
- InspectionCategory[InspectionCategory["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
34
- })(InspectionCategory || (exports.InspectionCategory = InspectionCategory = {}));
35
- function inspectionCategoryFromJSON(object) {
36
- switch (object) {
37
- case 0:
38
- case "INSPECTION_CATEGORY_UNSPECIFIED":
39
- return InspectionCategory.INSPECTION_CATEGORY_UNSPECIFIED;
40
- case 1:
41
- case "INSPECTION_CATEGORY_MEMORY":
42
- return InspectionCategory.INSPECTION_CATEGORY_MEMORY;
43
- case 2:
44
- case "INSPECTION_CATEGORY_ARTIFACT":
45
- return InspectionCategory.INSPECTION_CATEGORY_ARTIFACT;
46
- case 3:
47
- case "INSPECTION_CATEGORY_SECRET":
48
- return InspectionCategory.INSPECTION_CATEGORY_SECRET;
49
- case 4:
50
- case "INSPECTION_CATEGORY_POLICY":
51
- return InspectionCategory.INSPECTION_CATEGORY_POLICY;
52
- case 5:
53
- case "INSPECTION_CATEGORY_API":
54
- return InspectionCategory.INSPECTION_CATEGORY_API;
55
- case 6:
56
- case "INSPECTION_CATEGORY_STORAGE":
57
- return InspectionCategory.INSPECTION_CATEGORY_STORAGE;
58
- case 7:
59
- case "INSPECTION_CATEGORY_PROCESS":
60
- return InspectionCategory.INSPECTION_CATEGORY_PROCESS;
61
- case -1:
62
- case "UNRECOGNIZED":
63
- default:
64
- return InspectionCategory.UNRECOGNIZED;
65
- }
66
- }
67
- function inspectionCategoryToJSON(object) {
68
- switch (object) {
69
- case InspectionCategory.INSPECTION_CATEGORY_UNSPECIFIED:
70
- return "INSPECTION_CATEGORY_UNSPECIFIED";
71
- case InspectionCategory.INSPECTION_CATEGORY_MEMORY:
72
- return "INSPECTION_CATEGORY_MEMORY";
73
- case InspectionCategory.INSPECTION_CATEGORY_ARTIFACT:
74
- return "INSPECTION_CATEGORY_ARTIFACT";
75
- case InspectionCategory.INSPECTION_CATEGORY_SECRET:
76
- return "INSPECTION_CATEGORY_SECRET";
77
- case InspectionCategory.INSPECTION_CATEGORY_POLICY:
78
- return "INSPECTION_CATEGORY_POLICY";
79
- case InspectionCategory.INSPECTION_CATEGORY_API:
80
- return "INSPECTION_CATEGORY_API";
81
- case InspectionCategory.INSPECTION_CATEGORY_STORAGE:
82
- return "INSPECTION_CATEGORY_STORAGE";
83
- case InspectionCategory.INSPECTION_CATEGORY_PROCESS:
84
- return "INSPECTION_CATEGORY_PROCESS";
85
- case InspectionCategory.UNRECOGNIZED:
86
- default:
87
- return "UNRECOGNIZED";
88
- }
89
- }
90
- var InspectionAction;
91
- (function (InspectionAction) {
92
- InspectionAction[InspectionAction["INSPECTION_ACTION_UNSPECIFIED"] = 0] = "INSPECTION_ACTION_UNSPECIFIED";
93
- InspectionAction[InspectionAction["INSPECTION_ACTION_READ"] = 1] = "INSPECTION_ACTION_READ";
94
- InspectionAction[InspectionAction["INSPECTION_ACTION_WRITE"] = 2] = "INSPECTION_ACTION_WRITE";
95
- InspectionAction[InspectionAction["INSPECTION_ACTION_QUERY"] = 3] = "INSPECTION_ACTION_QUERY";
96
- InspectionAction[InspectionAction["INSPECTION_ACTION_REQUEST"] = 4] = "INSPECTION_ACTION_REQUEST";
97
- InspectionAction[InspectionAction["INSPECTION_ACTION_RESPOND"] = 5] = "INSPECTION_ACTION_RESPOND";
98
- InspectionAction[InspectionAction["INSPECTION_ACTION_STREAM"] = 6] = "INSPECTION_ACTION_STREAM";
99
- InspectionAction[InspectionAction["INSPECTION_ACTION_SCAN"] = 7] = "INSPECTION_ACTION_SCAN";
100
- InspectionAction[InspectionAction["INSPECTION_ACTION_EVALUATE"] = 8] = "INSPECTION_ACTION_EVALUATE";
101
- InspectionAction[InspectionAction["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
102
- })(InspectionAction || (exports.InspectionAction = InspectionAction = {}));
103
- function inspectionActionFromJSON(object) {
104
- switch (object) {
105
- case 0:
106
- case "INSPECTION_ACTION_UNSPECIFIED":
107
- return InspectionAction.INSPECTION_ACTION_UNSPECIFIED;
108
- case 1:
109
- case "INSPECTION_ACTION_READ":
110
- return InspectionAction.INSPECTION_ACTION_READ;
111
- case 2:
112
- case "INSPECTION_ACTION_WRITE":
113
- return InspectionAction.INSPECTION_ACTION_WRITE;
114
- case 3:
115
- case "INSPECTION_ACTION_QUERY":
116
- return InspectionAction.INSPECTION_ACTION_QUERY;
117
- case 4:
118
- case "INSPECTION_ACTION_REQUEST":
119
- return InspectionAction.INSPECTION_ACTION_REQUEST;
120
- case 5:
121
- case "INSPECTION_ACTION_RESPOND":
122
- return InspectionAction.INSPECTION_ACTION_RESPOND;
123
- case 6:
124
- case "INSPECTION_ACTION_STREAM":
125
- return InspectionAction.INSPECTION_ACTION_STREAM;
126
- case 7:
127
- case "INSPECTION_ACTION_SCAN":
128
- return InspectionAction.INSPECTION_ACTION_SCAN;
129
- case 8:
130
- case "INSPECTION_ACTION_EVALUATE":
131
- return InspectionAction.INSPECTION_ACTION_EVALUATE;
132
- case -1:
133
- case "UNRECOGNIZED":
134
- default:
135
- return InspectionAction.UNRECOGNIZED;
136
- }
137
- }
138
- function inspectionActionToJSON(object) {
139
- switch (object) {
140
- case InspectionAction.INSPECTION_ACTION_UNSPECIFIED:
141
- return "INSPECTION_ACTION_UNSPECIFIED";
142
- case InspectionAction.INSPECTION_ACTION_READ:
143
- return "INSPECTION_ACTION_READ";
144
- case InspectionAction.INSPECTION_ACTION_WRITE:
145
- return "INSPECTION_ACTION_WRITE";
146
- case InspectionAction.INSPECTION_ACTION_QUERY:
147
- return "INSPECTION_ACTION_QUERY";
148
- case InspectionAction.INSPECTION_ACTION_REQUEST:
149
- return "INSPECTION_ACTION_REQUEST";
150
- case InspectionAction.INSPECTION_ACTION_RESPOND:
151
- return "INSPECTION_ACTION_RESPOND";
152
- case InspectionAction.INSPECTION_ACTION_STREAM:
153
- return "INSPECTION_ACTION_STREAM";
154
- case InspectionAction.INSPECTION_ACTION_SCAN:
155
- return "INSPECTION_ACTION_SCAN";
156
- case InspectionAction.INSPECTION_ACTION_EVALUATE:
157
- return "INSPECTION_ACTION_EVALUATE";
158
- case InspectionAction.UNRECOGNIZED:
159
- default:
160
- return "UNRECOGNIZED";
161
- }
162
- }
163
- var InspectionOutcome;
164
- (function (InspectionOutcome) {
165
- InspectionOutcome[InspectionOutcome["INSPECTION_OUTCOME_UNSPECIFIED"] = 0] = "INSPECTION_OUTCOME_UNSPECIFIED";
166
- InspectionOutcome[InspectionOutcome["INSPECTION_OUTCOME_ALLOWED"] = 1] = "INSPECTION_OUTCOME_ALLOWED";
167
- InspectionOutcome[InspectionOutcome["INSPECTION_OUTCOME_DENIED"] = 2] = "INSPECTION_OUTCOME_DENIED";
168
- InspectionOutcome[InspectionOutcome["INSPECTION_OUTCOME_ERROR"] = 3] = "INSPECTION_OUTCOME_ERROR";
169
- InspectionOutcome[InspectionOutcome["INSPECTION_OUTCOME_SUCCESS"] = 4] = "INSPECTION_OUTCOME_SUCCESS";
170
- InspectionOutcome[InspectionOutcome["INSPECTION_OUTCOME_PARTIAL"] = 5] = "INSPECTION_OUTCOME_PARTIAL";
171
- InspectionOutcome[InspectionOutcome["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
172
- })(InspectionOutcome || (exports.InspectionOutcome = InspectionOutcome = {}));
173
- function inspectionOutcomeFromJSON(object) {
174
- switch (object) {
175
- case 0:
176
- case "INSPECTION_OUTCOME_UNSPECIFIED":
177
- return InspectionOutcome.INSPECTION_OUTCOME_UNSPECIFIED;
178
- case 1:
179
- case "INSPECTION_OUTCOME_ALLOWED":
180
- return InspectionOutcome.INSPECTION_OUTCOME_ALLOWED;
181
- case 2:
182
- case "INSPECTION_OUTCOME_DENIED":
183
- return InspectionOutcome.INSPECTION_OUTCOME_DENIED;
184
- case 3:
185
- case "INSPECTION_OUTCOME_ERROR":
186
- return InspectionOutcome.INSPECTION_OUTCOME_ERROR;
187
- case 4:
188
- case "INSPECTION_OUTCOME_SUCCESS":
189
- return InspectionOutcome.INSPECTION_OUTCOME_SUCCESS;
190
- case 5:
191
- case "INSPECTION_OUTCOME_PARTIAL":
192
- return InspectionOutcome.INSPECTION_OUTCOME_PARTIAL;
193
- case -1:
194
- case "UNRECOGNIZED":
195
- default:
196
- return InspectionOutcome.UNRECOGNIZED;
197
- }
198
- }
199
- function inspectionOutcomeToJSON(object) {
200
- switch (object) {
201
- case InspectionOutcome.INSPECTION_OUTCOME_UNSPECIFIED:
202
- return "INSPECTION_OUTCOME_UNSPECIFIED";
203
- case InspectionOutcome.INSPECTION_OUTCOME_ALLOWED:
204
- return "INSPECTION_OUTCOME_ALLOWED";
205
- case InspectionOutcome.INSPECTION_OUTCOME_DENIED:
206
- return "INSPECTION_OUTCOME_DENIED";
207
- case InspectionOutcome.INSPECTION_OUTCOME_ERROR:
208
- return "INSPECTION_OUTCOME_ERROR";
209
- case InspectionOutcome.INSPECTION_OUTCOME_SUCCESS:
210
- return "INSPECTION_OUTCOME_SUCCESS";
211
- case InspectionOutcome.INSPECTION_OUTCOME_PARTIAL:
212
- return "INSPECTION_OUTCOME_PARTIAL";
213
- case InspectionOutcome.UNRECOGNIZED:
214
- default:
215
- return "UNRECOGNIZED";
216
- }
217
- }
218
- var InspectionSubjectKind;
219
- (function (InspectionSubjectKind) {
220
- InspectionSubjectKind[InspectionSubjectKind["INSPECTION_SUBJECT_KIND_UNSPECIFIED"] = 0] = "INSPECTION_SUBJECT_KIND_UNSPECIFIED";
221
- InspectionSubjectKind[InspectionSubjectKind["INSPECTION_SUBJECT_KIND_RUN"] = 1] = "INSPECTION_SUBJECT_KIND_RUN";
222
- InspectionSubjectKind[InspectionSubjectKind["INSPECTION_SUBJECT_KIND_PROCESS"] = 2] = "INSPECTION_SUBJECT_KIND_PROCESS";
223
- InspectionSubjectKind[InspectionSubjectKind["INSPECTION_SUBJECT_KIND_MEMORY_NAMESPACE"] = 3] = "INSPECTION_SUBJECT_KIND_MEMORY_NAMESPACE";
224
- InspectionSubjectKind[InspectionSubjectKind["INSPECTION_SUBJECT_KIND_ARTIFACT"] = 4] = "INSPECTION_SUBJECT_KIND_ARTIFACT";
225
- InspectionSubjectKind[InspectionSubjectKind["INSPECTION_SUBJECT_KIND_ARTIFACT_SPACE"] = 5] = "INSPECTION_SUBJECT_KIND_ARTIFACT_SPACE";
226
- InspectionSubjectKind[InspectionSubjectKind["INSPECTION_SUBJECT_KIND_SECRET"] = 6] = "INSPECTION_SUBJECT_KIND_SECRET";
227
- InspectionSubjectKind[InspectionSubjectKind["INSPECTION_SUBJECT_KIND_POLICY"] = 7] = "INSPECTION_SUBJECT_KIND_POLICY";
228
- InspectionSubjectKind[InspectionSubjectKind["INSPECTION_SUBJECT_KIND_POLICY_VERSION"] = 8] = "INSPECTION_SUBJECT_KIND_POLICY_VERSION";
229
- InspectionSubjectKind[InspectionSubjectKind["INSPECTION_SUBJECT_KIND_TENANT"] = 9] = "INSPECTION_SUBJECT_KIND_TENANT";
230
- InspectionSubjectKind[InspectionSubjectKind["INSPECTION_SUBJECT_KIND_TOOL_RUN"] = 10] = "INSPECTION_SUBJECT_KIND_TOOL_RUN";
231
- InspectionSubjectKind[InspectionSubjectKind["INSPECTION_SUBJECT_KIND_REVIEW"] = 11] = "INSPECTION_SUBJECT_KIND_REVIEW";
232
- InspectionSubjectKind[InspectionSubjectKind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
233
- })(InspectionSubjectKind || (exports.InspectionSubjectKind = InspectionSubjectKind = {}));
234
- function inspectionSubjectKindFromJSON(object) {
235
- switch (object) {
236
- case 0:
237
- case "INSPECTION_SUBJECT_KIND_UNSPECIFIED":
238
- return InspectionSubjectKind.INSPECTION_SUBJECT_KIND_UNSPECIFIED;
239
- case 1:
240
- case "INSPECTION_SUBJECT_KIND_RUN":
241
- return InspectionSubjectKind.INSPECTION_SUBJECT_KIND_RUN;
242
- case 2:
243
- case "INSPECTION_SUBJECT_KIND_PROCESS":
244
- return InspectionSubjectKind.INSPECTION_SUBJECT_KIND_PROCESS;
245
- case 3:
246
- case "INSPECTION_SUBJECT_KIND_MEMORY_NAMESPACE":
247
- return InspectionSubjectKind.INSPECTION_SUBJECT_KIND_MEMORY_NAMESPACE;
248
- case 4:
249
- case "INSPECTION_SUBJECT_KIND_ARTIFACT":
250
- return InspectionSubjectKind.INSPECTION_SUBJECT_KIND_ARTIFACT;
251
- case 5:
252
- case "INSPECTION_SUBJECT_KIND_ARTIFACT_SPACE":
253
- return InspectionSubjectKind.INSPECTION_SUBJECT_KIND_ARTIFACT_SPACE;
254
- case 6:
255
- case "INSPECTION_SUBJECT_KIND_SECRET":
256
- return InspectionSubjectKind.INSPECTION_SUBJECT_KIND_SECRET;
257
- case 7:
258
- case "INSPECTION_SUBJECT_KIND_POLICY":
259
- return InspectionSubjectKind.INSPECTION_SUBJECT_KIND_POLICY;
260
- case 8:
261
- case "INSPECTION_SUBJECT_KIND_POLICY_VERSION":
262
- return InspectionSubjectKind.INSPECTION_SUBJECT_KIND_POLICY_VERSION;
263
- case 9:
264
- case "INSPECTION_SUBJECT_KIND_TENANT":
265
- return InspectionSubjectKind.INSPECTION_SUBJECT_KIND_TENANT;
266
- case 10:
267
- case "INSPECTION_SUBJECT_KIND_TOOL_RUN":
268
- return InspectionSubjectKind.INSPECTION_SUBJECT_KIND_TOOL_RUN;
269
- case 11:
270
- case "INSPECTION_SUBJECT_KIND_REVIEW":
271
- return InspectionSubjectKind.INSPECTION_SUBJECT_KIND_REVIEW;
272
- case -1:
273
- case "UNRECOGNIZED":
274
- default:
275
- return InspectionSubjectKind.UNRECOGNIZED;
276
- }
277
- }
278
- function inspectionSubjectKindToJSON(object) {
279
- switch (object) {
280
- case InspectionSubjectKind.INSPECTION_SUBJECT_KIND_UNSPECIFIED:
281
- return "INSPECTION_SUBJECT_KIND_UNSPECIFIED";
282
- case InspectionSubjectKind.INSPECTION_SUBJECT_KIND_RUN:
283
- return "INSPECTION_SUBJECT_KIND_RUN";
284
- case InspectionSubjectKind.INSPECTION_SUBJECT_KIND_PROCESS:
285
- return "INSPECTION_SUBJECT_KIND_PROCESS";
286
- case InspectionSubjectKind.INSPECTION_SUBJECT_KIND_MEMORY_NAMESPACE:
287
- return "INSPECTION_SUBJECT_KIND_MEMORY_NAMESPACE";
288
- case InspectionSubjectKind.INSPECTION_SUBJECT_KIND_ARTIFACT:
289
- return "INSPECTION_SUBJECT_KIND_ARTIFACT";
290
- case InspectionSubjectKind.INSPECTION_SUBJECT_KIND_ARTIFACT_SPACE:
291
- return "INSPECTION_SUBJECT_KIND_ARTIFACT_SPACE";
292
- case InspectionSubjectKind.INSPECTION_SUBJECT_KIND_SECRET:
293
- return "INSPECTION_SUBJECT_KIND_SECRET";
294
- case InspectionSubjectKind.INSPECTION_SUBJECT_KIND_POLICY:
295
- return "INSPECTION_SUBJECT_KIND_POLICY";
296
- case InspectionSubjectKind.INSPECTION_SUBJECT_KIND_POLICY_VERSION:
297
- return "INSPECTION_SUBJECT_KIND_POLICY_VERSION";
298
- case InspectionSubjectKind.INSPECTION_SUBJECT_KIND_TENANT:
299
- return "INSPECTION_SUBJECT_KIND_TENANT";
300
- case InspectionSubjectKind.INSPECTION_SUBJECT_KIND_TOOL_RUN:
301
- return "INSPECTION_SUBJECT_KIND_TOOL_RUN";
302
- case InspectionSubjectKind.INSPECTION_SUBJECT_KIND_REVIEW:
303
- return "INSPECTION_SUBJECT_KIND_REVIEW";
304
- case InspectionSubjectKind.UNRECOGNIZED:
305
- default:
306
- return "UNRECOGNIZED";
307
- }
308
- }
309
- var InspectionActorKind;
310
- (function (InspectionActorKind) {
311
- InspectionActorKind[InspectionActorKind["INSPECTION_ACTOR_KIND_UNSPECIFIED"] = 0] = "INSPECTION_ACTOR_KIND_UNSPECIFIED";
312
- InspectionActorKind[InspectionActorKind["INSPECTION_ACTOR_KIND_USER"] = 1] = "INSPECTION_ACTOR_KIND_USER";
313
- InspectionActorKind[InspectionActorKind["INSPECTION_ACTOR_KIND_AGENT_PROCESS"] = 2] = "INSPECTION_ACTOR_KIND_AGENT_PROCESS";
314
- InspectionActorKind[InspectionActorKind["INSPECTION_ACTOR_KIND_SYSTEM"] = 3] = "INSPECTION_ACTOR_KIND_SYSTEM";
315
- InspectionActorKind[InspectionActorKind["INSPECTION_ACTOR_KIND_API_CALLER"] = 4] = "INSPECTION_ACTOR_KIND_API_CALLER";
316
- InspectionActorKind[InspectionActorKind["INSPECTION_ACTOR_KIND_SUPERVISOR"] = 5] = "INSPECTION_ACTOR_KIND_SUPERVISOR";
317
- InspectionActorKind[InspectionActorKind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
318
- })(InspectionActorKind || (exports.InspectionActorKind = InspectionActorKind = {}));
319
- function inspectionActorKindFromJSON(object) {
320
- switch (object) {
321
- case 0:
322
- case "INSPECTION_ACTOR_KIND_UNSPECIFIED":
323
- return InspectionActorKind.INSPECTION_ACTOR_KIND_UNSPECIFIED;
324
- case 1:
325
- case "INSPECTION_ACTOR_KIND_USER":
326
- return InspectionActorKind.INSPECTION_ACTOR_KIND_USER;
327
- case 2:
328
- case "INSPECTION_ACTOR_KIND_AGENT_PROCESS":
329
- return InspectionActorKind.INSPECTION_ACTOR_KIND_AGENT_PROCESS;
330
- case 3:
331
- case "INSPECTION_ACTOR_KIND_SYSTEM":
332
- return InspectionActorKind.INSPECTION_ACTOR_KIND_SYSTEM;
333
- case 4:
334
- case "INSPECTION_ACTOR_KIND_API_CALLER":
335
- return InspectionActorKind.INSPECTION_ACTOR_KIND_API_CALLER;
336
- case 5:
337
- case "INSPECTION_ACTOR_KIND_SUPERVISOR":
338
- return InspectionActorKind.INSPECTION_ACTOR_KIND_SUPERVISOR;
339
- case -1:
340
- case "UNRECOGNIZED":
341
- default:
342
- return InspectionActorKind.UNRECOGNIZED;
343
- }
344
- }
345
- function inspectionActorKindToJSON(object) {
346
- switch (object) {
347
- case InspectionActorKind.INSPECTION_ACTOR_KIND_UNSPECIFIED:
348
- return "INSPECTION_ACTOR_KIND_UNSPECIFIED";
349
- case InspectionActorKind.INSPECTION_ACTOR_KIND_USER:
350
- return "INSPECTION_ACTOR_KIND_USER";
351
- case InspectionActorKind.INSPECTION_ACTOR_KIND_AGENT_PROCESS:
352
- return "INSPECTION_ACTOR_KIND_AGENT_PROCESS";
353
- case InspectionActorKind.INSPECTION_ACTOR_KIND_SYSTEM:
354
- return "INSPECTION_ACTOR_KIND_SYSTEM";
355
- case InspectionActorKind.INSPECTION_ACTOR_KIND_API_CALLER:
356
- return "INSPECTION_ACTOR_KIND_API_CALLER";
357
- case InspectionActorKind.INSPECTION_ACTOR_KIND_SUPERVISOR:
358
- return "INSPECTION_ACTOR_KIND_SUPERVISOR";
359
- case InspectionActorKind.UNRECOGNIZED:
360
- default:
361
- return "UNRECOGNIZED";
362
- }
363
- }
364
- function createBaseEvent() {
365
- return {
366
- eventId: "",
367
- runId: "",
368
- eventType: "",
369
- sequence: 0,
370
- data: new Uint8Array(0),
371
- causationId: "",
372
- correlationId: "",
373
- occurredAt: undefined,
374
- };
375
- }
376
- exports.Event = {
377
- encode(message, writer = new wire_1.BinaryWriter()) {
378
- if (message.eventId !== "") {
379
- writer.uint32(10).string(message.eventId);
380
- }
381
- if (message.runId !== "") {
382
- writer.uint32(18).string(message.runId);
383
- }
384
- if (message.eventType !== "") {
385
- writer.uint32(26).string(message.eventType);
386
- }
387
- if (message.sequence !== 0) {
388
- writer.uint32(32).uint64(message.sequence);
389
- }
390
- if (message.data.length !== 0) {
391
- writer.uint32(42).bytes(message.data);
392
- }
393
- if (message.causationId !== "") {
394
- writer.uint32(50).string(message.causationId);
395
- }
396
- if (message.correlationId !== "") {
397
- writer.uint32(58).string(message.correlationId);
398
- }
399
- if (message.occurredAt !== undefined) {
400
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.occurredAt), writer.uint32(66).fork()).join();
401
- }
402
- return writer;
403
- },
404
- decode(input, length) {
405
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
406
- const end = length === undefined ? reader.len : reader.pos + length;
407
- const message = createBaseEvent();
408
- while (reader.pos < end) {
409
- const tag = reader.uint32();
410
- switch (tag >>> 3) {
411
- case 1: {
412
- if (tag !== 10) {
413
- break;
414
- }
415
- message.eventId = reader.string();
416
- continue;
417
- }
418
- case 2: {
419
- if (tag !== 18) {
420
- break;
421
- }
422
- message.runId = reader.string();
423
- continue;
424
- }
425
- case 3: {
426
- if (tag !== 26) {
427
- break;
428
- }
429
- message.eventType = reader.string();
430
- continue;
431
- }
432
- case 4: {
433
- if (tag !== 32) {
434
- break;
435
- }
436
- message.sequence = longToNumber(reader.uint64());
437
- continue;
438
- }
439
- case 5: {
440
- if (tag !== 42) {
441
- break;
442
- }
443
- message.data = reader.bytes();
444
- continue;
445
- }
446
- case 6: {
447
- if (tag !== 50) {
448
- break;
449
- }
450
- message.causationId = reader.string();
451
- continue;
452
- }
453
- case 7: {
454
- if (tag !== 58) {
455
- break;
456
- }
457
- message.correlationId = reader.string();
458
- continue;
459
- }
460
- case 8: {
461
- if (tag !== 66) {
462
- break;
463
- }
464
- message.occurredAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
465
- continue;
466
- }
467
- }
468
- if ((tag & 7) === 4 || tag === 0) {
469
- break;
470
- }
471
- reader.skip(tag & 7);
472
- }
473
- return message;
474
- },
475
- fromJSON(object) {
476
- return {
477
- eventId: isSet(object.eventId)
478
- ? globalThis.String(object.eventId)
479
- : isSet(object.event_id)
480
- ? globalThis.String(object.event_id)
481
- : "",
482
- runId: isSet(object.runId)
483
- ? globalThis.String(object.runId)
484
- : isSet(object.run_id)
485
- ? globalThis.String(object.run_id)
486
- : "",
487
- eventType: isSet(object.eventType)
488
- ? globalThis.String(object.eventType)
489
- : isSet(object.event_type)
490
- ? globalThis.String(object.event_type)
491
- : "",
492
- sequence: isSet(object.sequence) ? globalThis.Number(object.sequence) : 0,
493
- data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0),
494
- causationId: isSet(object.causationId)
495
- ? globalThis.String(object.causationId)
496
- : isSet(object.causation_id)
497
- ? globalThis.String(object.causation_id)
498
- : "",
499
- correlationId: isSet(object.correlationId)
500
- ? globalThis.String(object.correlationId)
501
- : isSet(object.correlation_id)
502
- ? globalThis.String(object.correlation_id)
503
- : "",
504
- occurredAt: isSet(object.occurredAt)
505
- ? fromJsonTimestamp(object.occurredAt)
506
- : isSet(object.occurred_at)
507
- ? fromJsonTimestamp(object.occurred_at)
508
- : undefined,
509
- };
510
- },
511
- toJSON(message) {
512
- const obj = {};
513
- if (message.eventId !== "") {
514
- obj.eventId = message.eventId;
515
- }
516
- if (message.runId !== "") {
517
- obj.runId = message.runId;
518
- }
519
- if (message.eventType !== "") {
520
- obj.eventType = message.eventType;
521
- }
522
- if (message.sequence !== 0) {
523
- obj.sequence = Math.round(message.sequence);
524
- }
525
- if (message.data.length !== 0) {
526
- obj.data = base64FromBytes(message.data);
527
- }
528
- if (message.causationId !== "") {
529
- obj.causationId = message.causationId;
530
- }
531
- if (message.correlationId !== "") {
532
- obj.correlationId = message.correlationId;
533
- }
534
- if (message.occurredAt !== undefined) {
535
- obj.occurredAt = message.occurredAt.toISOString();
536
- }
537
- return obj;
538
- },
539
- create(base) {
540
- return exports.Event.fromPartial(base !== null && base !== void 0 ? base : {});
541
- },
542
- fromPartial(object) {
543
- var _a, _b, _c, _d, _e, _f, _g, _h;
544
- const message = createBaseEvent();
545
- message.eventId = (_a = object.eventId) !== null && _a !== void 0 ? _a : "";
546
- message.runId = (_b = object.runId) !== null && _b !== void 0 ? _b : "";
547
- message.eventType = (_c = object.eventType) !== null && _c !== void 0 ? _c : "";
548
- message.sequence = (_d = object.sequence) !== null && _d !== void 0 ? _d : 0;
549
- message.data = (_e = object.data) !== null && _e !== void 0 ? _e : new Uint8Array(0);
550
- message.causationId = (_f = object.causationId) !== null && _f !== void 0 ? _f : "";
551
- message.correlationId = (_g = object.correlationId) !== null && _g !== void 0 ? _g : "";
552
- message.occurredAt = (_h = object.occurredAt) !== null && _h !== void 0 ? _h : undefined;
553
- return message;
554
- },
555
- };
556
- function createBaseInspectionSubject() {
557
- return { kind: 0, id: "" };
558
- }
559
- exports.InspectionSubject = {
560
- encode(message, writer = new wire_1.BinaryWriter()) {
561
- if (message.kind !== 0) {
562
- writer.uint32(8).int32(message.kind);
563
- }
564
- if (message.id !== "") {
565
- writer.uint32(18).string(message.id);
566
- }
567
- return writer;
568
- },
569
- decode(input, length) {
570
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
571
- const end = length === undefined ? reader.len : reader.pos + length;
572
- const message = createBaseInspectionSubject();
573
- while (reader.pos < end) {
574
- const tag = reader.uint32();
575
- switch (tag >>> 3) {
576
- case 1: {
577
- if (tag !== 8) {
578
- break;
579
- }
580
- message.kind = reader.int32();
581
- continue;
582
- }
583
- case 2: {
584
- if (tag !== 18) {
585
- break;
586
- }
587
- message.id = reader.string();
588
- continue;
589
- }
590
- }
591
- if ((tag & 7) === 4 || tag === 0) {
592
- break;
593
- }
594
- reader.skip(tag & 7);
595
- }
596
- return message;
597
- },
598
- fromJSON(object) {
599
- return {
600
- kind: isSet(object.kind) ? inspectionSubjectKindFromJSON(object.kind) : 0,
601
- id: isSet(object.id) ? globalThis.String(object.id) : "",
602
- };
603
- },
604
- toJSON(message) {
605
- const obj = {};
606
- if (message.kind !== 0) {
607
- obj.kind = inspectionSubjectKindToJSON(message.kind);
608
- }
609
- if (message.id !== "") {
610
- obj.id = message.id;
611
- }
612
- return obj;
613
- },
614
- create(base) {
615
- return exports.InspectionSubject.fromPartial(base !== null && base !== void 0 ? base : {});
616
- },
617
- fromPartial(object) {
618
- var _a, _b;
619
- const message = createBaseInspectionSubject();
620
- message.kind = (_a = object.kind) !== null && _a !== void 0 ? _a : 0;
621
- message.id = (_b = object.id) !== null && _b !== void 0 ? _b : "";
622
- return message;
623
- },
624
- };
625
- function createBaseInspectionActor() {
626
- return { kind: 0, id: "" };
627
- }
628
- exports.InspectionActor = {
629
- encode(message, writer = new wire_1.BinaryWriter()) {
630
- if (message.kind !== 0) {
631
- writer.uint32(8).int32(message.kind);
632
- }
633
- if (message.id !== "") {
634
- writer.uint32(18).string(message.id);
635
- }
636
- return writer;
637
- },
638
- decode(input, length) {
639
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
640
- const end = length === undefined ? reader.len : reader.pos + length;
641
- const message = createBaseInspectionActor();
642
- while (reader.pos < end) {
643
- const tag = reader.uint32();
644
- switch (tag >>> 3) {
645
- case 1: {
646
- if (tag !== 8) {
647
- break;
648
- }
649
- message.kind = reader.int32();
650
- continue;
651
- }
652
- case 2: {
653
- if (tag !== 18) {
654
- break;
655
- }
656
- message.id = reader.string();
657
- continue;
658
- }
659
- }
660
- if ((tag & 7) === 4 || tag === 0) {
661
- break;
662
- }
663
- reader.skip(tag & 7);
664
- }
665
- return message;
666
- },
667
- fromJSON(object) {
668
- return {
669
- kind: isSet(object.kind) ? inspectionActorKindFromJSON(object.kind) : 0,
670
- id: isSet(object.id) ? globalThis.String(object.id) : "",
671
- };
672
- },
673
- toJSON(message) {
674
- const obj = {};
675
- if (message.kind !== 0) {
676
- obj.kind = inspectionActorKindToJSON(message.kind);
677
- }
678
- if (message.id !== "") {
679
- obj.id = message.id;
680
- }
681
- return obj;
682
- },
683
- create(base) {
684
- return exports.InspectionActor.fromPartial(base !== null && base !== void 0 ? base : {});
685
- },
686
- fromPartial(object) {
687
- var _a, _b;
688
- const message = createBaseInspectionActor();
689
- message.kind = (_a = object.kind) !== null && _a !== void 0 ? _a : 0;
690
- message.id = (_b = object.id) !== null && _b !== void 0 ? _b : "";
691
- return message;
692
- },
693
- };
694
- function createBaseInspectionEvent() {
695
- return {
696
- eventId: "",
697
- tenantId: "",
698
- eventType: "",
699
- category: 0,
700
- subject: undefined,
701
- actor: undefined,
702
- runId: "",
703
- processId: "",
704
- action: 0,
705
- outcome: 0,
706
- reason: "",
707
- correlationId: "",
708
- causationId: "",
709
- data: new Uint8Array(0),
710
- schemaVersion: 0,
711
- sequence: 0,
712
- occurredAt: undefined,
713
- expiresAt: undefined,
714
- };
715
- }
716
- exports.InspectionEvent = {
717
- encode(message, writer = new wire_1.BinaryWriter()) {
718
- if (message.eventId !== "") {
719
- writer.uint32(10).string(message.eventId);
720
- }
721
- if (message.tenantId !== "") {
722
- writer.uint32(18).string(message.tenantId);
723
- }
724
- if (message.eventType !== "") {
725
- writer.uint32(26).string(message.eventType);
726
- }
727
- if (message.category !== 0) {
728
- writer.uint32(32).int32(message.category);
729
- }
730
- if (message.subject !== undefined) {
731
- exports.InspectionSubject.encode(message.subject, writer.uint32(42).fork()).join();
732
- }
733
- if (message.actor !== undefined) {
734
- exports.InspectionActor.encode(message.actor, writer.uint32(50).fork()).join();
735
- }
736
- if (message.runId !== "") {
737
- writer.uint32(58).string(message.runId);
738
- }
739
- if (message.processId !== "") {
740
- writer.uint32(66).string(message.processId);
741
- }
742
- if (message.action !== 0) {
743
- writer.uint32(72).int32(message.action);
744
- }
745
- if (message.outcome !== 0) {
746
- writer.uint32(80).int32(message.outcome);
747
- }
748
- if (message.reason !== "") {
749
- writer.uint32(90).string(message.reason);
750
- }
751
- if (message.correlationId !== "") {
752
- writer.uint32(98).string(message.correlationId);
753
- }
754
- if (message.causationId !== "") {
755
- writer.uint32(106).string(message.causationId);
756
- }
757
- if (message.data.length !== 0) {
758
- writer.uint32(114).bytes(message.data);
759
- }
760
- if (message.schemaVersion !== 0) {
761
- writer.uint32(120).int32(message.schemaVersion);
762
- }
763
- if (message.sequence !== 0) {
764
- writer.uint32(128).uint64(message.sequence);
765
- }
766
- if (message.occurredAt !== undefined) {
767
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.occurredAt), writer.uint32(138).fork()).join();
768
- }
769
- if (message.expiresAt !== undefined) {
770
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.expiresAt), writer.uint32(146).fork()).join();
771
- }
772
- return writer;
773
- },
774
- decode(input, length) {
775
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
776
- const end = length === undefined ? reader.len : reader.pos + length;
777
- const message = createBaseInspectionEvent();
778
- while (reader.pos < end) {
779
- const tag = reader.uint32();
780
- switch (tag >>> 3) {
781
- case 1: {
782
- if (tag !== 10) {
783
- break;
784
- }
785
- message.eventId = reader.string();
786
- continue;
787
- }
788
- case 2: {
789
- if (tag !== 18) {
790
- break;
791
- }
792
- message.tenantId = reader.string();
793
- continue;
794
- }
795
- case 3: {
796
- if (tag !== 26) {
797
- break;
798
- }
799
- message.eventType = reader.string();
800
- continue;
801
- }
802
- case 4: {
803
- if (tag !== 32) {
804
- break;
805
- }
806
- message.category = reader.int32();
807
- continue;
808
- }
809
- case 5: {
810
- if (tag !== 42) {
811
- break;
812
- }
813
- message.subject = exports.InspectionSubject.decode(reader, reader.uint32());
814
- continue;
815
- }
816
- case 6: {
817
- if (tag !== 50) {
818
- break;
819
- }
820
- message.actor = exports.InspectionActor.decode(reader, reader.uint32());
821
- continue;
822
- }
823
- case 7: {
824
- if (tag !== 58) {
825
- break;
826
- }
827
- message.runId = reader.string();
828
- continue;
829
- }
830
- case 8: {
831
- if (tag !== 66) {
832
- break;
833
- }
834
- message.processId = reader.string();
835
- continue;
836
- }
837
- case 9: {
838
- if (tag !== 72) {
839
- break;
840
- }
841
- message.action = reader.int32();
842
- continue;
843
- }
844
- case 10: {
845
- if (tag !== 80) {
846
- break;
847
- }
848
- message.outcome = reader.int32();
849
- continue;
850
- }
851
- case 11: {
852
- if (tag !== 90) {
853
- break;
854
- }
855
- message.reason = reader.string();
856
- continue;
857
- }
858
- case 12: {
859
- if (tag !== 98) {
860
- break;
861
- }
862
- message.correlationId = reader.string();
863
- continue;
864
- }
865
- case 13: {
866
- if (tag !== 106) {
867
- break;
868
- }
869
- message.causationId = reader.string();
870
- continue;
871
- }
872
- case 14: {
873
- if (tag !== 114) {
874
- break;
875
- }
876
- message.data = reader.bytes();
877
- continue;
878
- }
879
- case 15: {
880
- if (tag !== 120) {
881
- break;
882
- }
883
- message.schemaVersion = reader.int32();
884
- continue;
885
- }
886
- case 16: {
887
- if (tag !== 128) {
888
- break;
889
- }
890
- message.sequence = longToNumber(reader.uint64());
891
- continue;
892
- }
893
- case 17: {
894
- if (tag !== 138) {
895
- break;
896
- }
897
- message.occurredAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
898
- continue;
899
- }
900
- case 18: {
901
- if (tag !== 146) {
902
- break;
903
- }
904
- message.expiresAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
905
- continue;
906
- }
907
- }
908
- if ((tag & 7) === 4 || tag === 0) {
909
- break;
910
- }
911
- reader.skip(tag & 7);
912
- }
913
- return message;
914
- },
915
- fromJSON(object) {
916
- return {
917
- eventId: isSet(object.eventId)
918
- ? globalThis.String(object.eventId)
919
- : isSet(object.event_id)
920
- ? globalThis.String(object.event_id)
921
- : "",
922
- tenantId: isSet(object.tenantId)
923
- ? globalThis.String(object.tenantId)
924
- : isSet(object.tenant_id)
925
- ? globalThis.String(object.tenant_id)
926
- : "",
927
- eventType: isSet(object.eventType)
928
- ? globalThis.String(object.eventType)
929
- : isSet(object.event_type)
930
- ? globalThis.String(object.event_type)
931
- : "",
932
- category: isSet(object.category) ? inspectionCategoryFromJSON(object.category) : 0,
933
- subject: isSet(object.subject) ? exports.InspectionSubject.fromJSON(object.subject) : undefined,
934
- actor: isSet(object.actor) ? exports.InspectionActor.fromJSON(object.actor) : undefined,
935
- runId: isSet(object.runId)
936
- ? globalThis.String(object.runId)
937
- : isSet(object.run_id)
938
- ? globalThis.String(object.run_id)
939
- : "",
940
- processId: isSet(object.processId)
941
- ? globalThis.String(object.processId)
942
- : isSet(object.process_id)
943
- ? globalThis.String(object.process_id)
944
- : "",
945
- action: isSet(object.action) ? inspectionActionFromJSON(object.action) : 0,
946
- outcome: isSet(object.outcome) ? inspectionOutcomeFromJSON(object.outcome) : 0,
947
- reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
948
- correlationId: isSet(object.correlationId)
949
- ? globalThis.String(object.correlationId)
950
- : isSet(object.correlation_id)
951
- ? globalThis.String(object.correlation_id)
952
- : "",
953
- causationId: isSet(object.causationId)
954
- ? globalThis.String(object.causationId)
955
- : isSet(object.causation_id)
956
- ? globalThis.String(object.causation_id)
957
- : "",
958
- data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0),
959
- schemaVersion: isSet(object.schemaVersion)
960
- ? globalThis.Number(object.schemaVersion)
961
- : isSet(object.schema_version)
962
- ? globalThis.Number(object.schema_version)
963
- : 0,
964
- sequence: isSet(object.sequence) ? globalThis.Number(object.sequence) : 0,
965
- occurredAt: isSet(object.occurredAt)
966
- ? fromJsonTimestamp(object.occurredAt)
967
- : isSet(object.occurred_at)
968
- ? fromJsonTimestamp(object.occurred_at)
969
- : undefined,
970
- expiresAt: isSet(object.expiresAt)
971
- ? fromJsonTimestamp(object.expiresAt)
972
- : isSet(object.expires_at)
973
- ? fromJsonTimestamp(object.expires_at)
974
- : undefined,
975
- };
976
- },
977
- toJSON(message) {
978
- const obj = {};
979
- if (message.eventId !== "") {
980
- obj.eventId = message.eventId;
981
- }
982
- if (message.tenantId !== "") {
983
- obj.tenantId = message.tenantId;
984
- }
985
- if (message.eventType !== "") {
986
- obj.eventType = message.eventType;
987
- }
988
- if (message.category !== 0) {
989
- obj.category = inspectionCategoryToJSON(message.category);
990
- }
991
- if (message.subject !== undefined) {
992
- obj.subject = exports.InspectionSubject.toJSON(message.subject);
993
- }
994
- if (message.actor !== undefined) {
995
- obj.actor = exports.InspectionActor.toJSON(message.actor);
996
- }
997
- if (message.runId !== "") {
998
- obj.runId = message.runId;
999
- }
1000
- if (message.processId !== "") {
1001
- obj.processId = message.processId;
1002
- }
1003
- if (message.action !== 0) {
1004
- obj.action = inspectionActionToJSON(message.action);
1005
- }
1006
- if (message.outcome !== 0) {
1007
- obj.outcome = inspectionOutcomeToJSON(message.outcome);
1008
- }
1009
- if (message.reason !== "") {
1010
- obj.reason = message.reason;
1011
- }
1012
- if (message.correlationId !== "") {
1013
- obj.correlationId = message.correlationId;
1014
- }
1015
- if (message.causationId !== "") {
1016
- obj.causationId = message.causationId;
1017
- }
1018
- if (message.data.length !== 0) {
1019
- obj.data = base64FromBytes(message.data);
1020
- }
1021
- if (message.schemaVersion !== 0) {
1022
- obj.schemaVersion = Math.round(message.schemaVersion);
1023
- }
1024
- if (message.sequence !== 0) {
1025
- obj.sequence = Math.round(message.sequence);
1026
- }
1027
- if (message.occurredAt !== undefined) {
1028
- obj.occurredAt = message.occurredAt.toISOString();
1029
- }
1030
- if (message.expiresAt !== undefined) {
1031
- obj.expiresAt = message.expiresAt.toISOString();
1032
- }
1033
- return obj;
1034
- },
1035
- create(base) {
1036
- return exports.InspectionEvent.fromPartial(base !== null && base !== void 0 ? base : {});
1037
- },
1038
- fromPartial(object) {
1039
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
1040
- const message = createBaseInspectionEvent();
1041
- message.eventId = (_a = object.eventId) !== null && _a !== void 0 ? _a : "";
1042
- message.tenantId = (_b = object.tenantId) !== null && _b !== void 0 ? _b : "";
1043
- message.eventType = (_c = object.eventType) !== null && _c !== void 0 ? _c : "";
1044
- message.category = (_d = object.category) !== null && _d !== void 0 ? _d : 0;
1045
- message.subject = (object.subject !== undefined && object.subject !== null)
1046
- ? exports.InspectionSubject.fromPartial(object.subject)
1047
- : undefined;
1048
- message.actor = (object.actor !== undefined && object.actor !== null)
1049
- ? exports.InspectionActor.fromPartial(object.actor)
1050
- : undefined;
1051
- message.runId = (_e = object.runId) !== null && _e !== void 0 ? _e : "";
1052
- message.processId = (_f = object.processId) !== null && _f !== void 0 ? _f : "";
1053
- message.action = (_g = object.action) !== null && _g !== void 0 ? _g : 0;
1054
- message.outcome = (_h = object.outcome) !== null && _h !== void 0 ? _h : 0;
1055
- message.reason = (_j = object.reason) !== null && _j !== void 0 ? _j : "";
1056
- message.correlationId = (_k = object.correlationId) !== null && _k !== void 0 ? _k : "";
1057
- message.causationId = (_l = object.causationId) !== null && _l !== void 0 ? _l : "";
1058
- message.data = (_m = object.data) !== null && _m !== void 0 ? _m : new Uint8Array(0);
1059
- message.schemaVersion = (_o = object.schemaVersion) !== null && _o !== void 0 ? _o : 0;
1060
- message.sequence = (_p = object.sequence) !== null && _p !== void 0 ? _p : 0;
1061
- message.occurredAt = (_q = object.occurredAt) !== null && _q !== void 0 ? _q : undefined;
1062
- message.expiresAt = (_r = object.expiresAt) !== null && _r !== void 0 ? _r : undefined;
1063
- return message;
1064
- },
1065
- };
1066
- function bytesFromBase64(b64) {
1067
- if (globalThis.Buffer) {
1068
- return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
1069
- }
1070
- else {
1071
- const bin = globalThis.atob(b64);
1072
- const arr = new Uint8Array(bin.length);
1073
- for (let i = 0; i < bin.length; ++i) {
1074
- arr[i] = bin.charCodeAt(i);
1075
- }
1076
- return arr;
1077
- }
1078
- }
1079
- function base64FromBytes(arr) {
1080
- if (globalThis.Buffer) {
1081
- return globalThis.Buffer.from(arr).toString("base64");
1082
- }
1083
- else {
1084
- const bin = [];
1085
- arr.forEach((byte) => {
1086
- bin.push(globalThis.String.fromCharCode(byte));
1087
- });
1088
- return globalThis.btoa(bin.join(""));
1089
- }
1090
- }
1091
- function toTimestamp(date) {
1092
- const seconds = Math.trunc(date.getTime() / 1000);
1093
- const nanos = (date.getTime() % 1000) * 1000000;
1094
- return { seconds, nanos };
1095
- }
1096
- function fromTimestamp(t) {
1097
- let millis = (t.seconds || 0) * 1000;
1098
- millis += (t.nanos || 0) / 1000000;
1099
- return new globalThis.Date(millis);
1100
- }
1101
- function fromJsonTimestamp(o) {
1102
- if (o instanceof globalThis.Date) {
1103
- return o;
1104
- }
1105
- else if (typeof o === "string") {
1106
- return new globalThis.Date(o);
1107
- }
1108
- else {
1109
- return fromTimestamp(timestamp_pb_1.Timestamp.fromJSON(o));
1110
- }
1111
- }
1112
- function longToNumber(int64) {
1113
- const num = globalThis.Number(int64.toString());
1114
- if (num > globalThis.Number.MAX_SAFE_INTEGER) {
1115
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
1116
- }
1117
- if (num < globalThis.Number.MIN_SAFE_INTEGER) {
1118
- throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
1119
- }
1120
- return num;
1121
- }
1122
- function isSet(value) {
1123
- return value !== null && value !== undefined;
1124
- }