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,1478 +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/ingestion/v1/table.proto
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.GetDocumentTableResponse = exports.GetDocumentTableRequest = exports.ListDocumentTablesResponse = exports.ListDocumentTablesRequest = exports.ThreadTableLink = exports.DocumentTable = exports.DocumentTableColumn = exports.TableSourceFormat = exports.protobufPackage = void 0;
9
- exports.tableSourceFormatFromJSON = tableSourceFormatFromJSON;
10
- exports.tableSourceFormatToJSON = tableSourceFormatToJSON;
11
- /* eslint-disable */
12
- const wire_1 = require("@bufbuild/protobuf/wire");
13
- const struct_pb_1 = require("../../../google/protobuf/struct.pb");
14
- const timestamp_pb_1 = require("../../../google/protobuf/timestamp.pb");
15
- const ingestion_pb_1 = require("./ingestion.pb");
16
- exports.protobufPackage = "weaveapi.ingestion.v1";
17
- var TableSourceFormat;
18
- (function (TableSourceFormat) {
19
- TableSourceFormat[TableSourceFormat["TABLE_SOURCE_FORMAT_UNSPECIFIED"] = 0] = "TABLE_SOURCE_FORMAT_UNSPECIFIED";
20
- TableSourceFormat[TableSourceFormat["TABLE_SOURCE_FORMAT_CSV"] = 1] = "TABLE_SOURCE_FORMAT_CSV";
21
- TableSourceFormat[TableSourceFormat["TABLE_SOURCE_FORMAT_TSV"] = 2] = "TABLE_SOURCE_FORMAT_TSV";
22
- TableSourceFormat[TableSourceFormat["TABLE_SOURCE_FORMAT_XLSX"] = 3] = "TABLE_SOURCE_FORMAT_XLSX";
23
- TableSourceFormat[TableSourceFormat["TABLE_SOURCE_FORMAT_HTML"] = 4] = "TABLE_SOURCE_FORMAT_HTML";
24
- TableSourceFormat[TableSourceFormat["TABLE_SOURCE_FORMAT_PDF"] = 5] = "TABLE_SOURCE_FORMAT_PDF";
25
- TableSourceFormat[TableSourceFormat["TABLE_SOURCE_FORMAT_OTHER"] = 6] = "TABLE_SOURCE_FORMAT_OTHER";
26
- TableSourceFormat[TableSourceFormat["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
27
- })(TableSourceFormat || (exports.TableSourceFormat = TableSourceFormat = {}));
28
- function tableSourceFormatFromJSON(object) {
29
- switch (object) {
30
- case 0:
31
- case "TABLE_SOURCE_FORMAT_UNSPECIFIED":
32
- return TableSourceFormat.TABLE_SOURCE_FORMAT_UNSPECIFIED;
33
- case 1:
34
- case "TABLE_SOURCE_FORMAT_CSV":
35
- return TableSourceFormat.TABLE_SOURCE_FORMAT_CSV;
36
- case 2:
37
- case "TABLE_SOURCE_FORMAT_TSV":
38
- return TableSourceFormat.TABLE_SOURCE_FORMAT_TSV;
39
- case 3:
40
- case "TABLE_SOURCE_FORMAT_XLSX":
41
- return TableSourceFormat.TABLE_SOURCE_FORMAT_XLSX;
42
- case 4:
43
- case "TABLE_SOURCE_FORMAT_HTML":
44
- return TableSourceFormat.TABLE_SOURCE_FORMAT_HTML;
45
- case 5:
46
- case "TABLE_SOURCE_FORMAT_PDF":
47
- return TableSourceFormat.TABLE_SOURCE_FORMAT_PDF;
48
- case 6:
49
- case "TABLE_SOURCE_FORMAT_OTHER":
50
- return TableSourceFormat.TABLE_SOURCE_FORMAT_OTHER;
51
- case -1:
52
- case "UNRECOGNIZED":
53
- default:
54
- return TableSourceFormat.UNRECOGNIZED;
55
- }
56
- }
57
- function tableSourceFormatToJSON(object) {
58
- switch (object) {
59
- case TableSourceFormat.TABLE_SOURCE_FORMAT_UNSPECIFIED:
60
- return "TABLE_SOURCE_FORMAT_UNSPECIFIED";
61
- case TableSourceFormat.TABLE_SOURCE_FORMAT_CSV:
62
- return "TABLE_SOURCE_FORMAT_CSV";
63
- case TableSourceFormat.TABLE_SOURCE_FORMAT_TSV:
64
- return "TABLE_SOURCE_FORMAT_TSV";
65
- case TableSourceFormat.TABLE_SOURCE_FORMAT_XLSX:
66
- return "TABLE_SOURCE_FORMAT_XLSX";
67
- case TableSourceFormat.TABLE_SOURCE_FORMAT_HTML:
68
- return "TABLE_SOURCE_FORMAT_HTML";
69
- case TableSourceFormat.TABLE_SOURCE_FORMAT_PDF:
70
- return "TABLE_SOURCE_FORMAT_PDF";
71
- case TableSourceFormat.TABLE_SOURCE_FORMAT_OTHER:
72
- return "TABLE_SOURCE_FORMAT_OTHER";
73
- case TableSourceFormat.UNRECOGNIZED:
74
- default:
75
- return "UNRECOGNIZED";
76
- }
77
- }
78
- function createBaseDocumentTableColumn() {
79
- return {
80
- id: "",
81
- tableId: "",
82
- ordinal: 0,
83
- name: "",
84
- sourceName: "",
85
- dataType: "",
86
- semanticType: "",
87
- unit: "",
88
- description: "",
89
- nullable: false,
90
- confidence: 0,
91
- metadata: undefined,
92
- };
93
- }
94
- exports.DocumentTableColumn = {
95
- encode(message, writer = new wire_1.BinaryWriter()) {
96
- if (message.id !== "") {
97
- writer.uint32(10).string(message.id);
98
- }
99
- if (message.tableId !== "") {
100
- writer.uint32(18).string(message.tableId);
101
- }
102
- if (message.ordinal !== 0) {
103
- writer.uint32(24).int32(message.ordinal);
104
- }
105
- if (message.name !== "") {
106
- writer.uint32(34).string(message.name);
107
- }
108
- if (message.sourceName !== "") {
109
- writer.uint32(42).string(message.sourceName);
110
- }
111
- if (message.dataType !== "") {
112
- writer.uint32(50).string(message.dataType);
113
- }
114
- if (message.semanticType !== "") {
115
- writer.uint32(58).string(message.semanticType);
116
- }
117
- if (message.unit !== "") {
118
- writer.uint32(66).string(message.unit);
119
- }
120
- if (message.description !== "") {
121
- writer.uint32(74).string(message.description);
122
- }
123
- if (message.nullable !== false) {
124
- writer.uint32(80).bool(message.nullable);
125
- }
126
- if (message.confidence !== 0) {
127
- writer.uint32(93).float(message.confidence);
128
- }
129
- if (message.metadata !== undefined) {
130
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.metadata), writer.uint32(98).fork()).join();
131
- }
132
- return writer;
133
- },
134
- decode(input, length) {
135
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
136
- const end = length === undefined ? reader.len : reader.pos + length;
137
- const message = createBaseDocumentTableColumn();
138
- while (reader.pos < end) {
139
- const tag = reader.uint32();
140
- switch (tag >>> 3) {
141
- case 1: {
142
- if (tag !== 10) {
143
- break;
144
- }
145
- message.id = reader.string();
146
- continue;
147
- }
148
- case 2: {
149
- if (tag !== 18) {
150
- break;
151
- }
152
- message.tableId = reader.string();
153
- continue;
154
- }
155
- case 3: {
156
- if (tag !== 24) {
157
- break;
158
- }
159
- message.ordinal = reader.int32();
160
- continue;
161
- }
162
- case 4: {
163
- if (tag !== 34) {
164
- break;
165
- }
166
- message.name = reader.string();
167
- continue;
168
- }
169
- case 5: {
170
- if (tag !== 42) {
171
- break;
172
- }
173
- message.sourceName = reader.string();
174
- continue;
175
- }
176
- case 6: {
177
- if (tag !== 50) {
178
- break;
179
- }
180
- message.dataType = reader.string();
181
- continue;
182
- }
183
- case 7: {
184
- if (tag !== 58) {
185
- break;
186
- }
187
- message.semanticType = reader.string();
188
- continue;
189
- }
190
- case 8: {
191
- if (tag !== 66) {
192
- break;
193
- }
194
- message.unit = reader.string();
195
- continue;
196
- }
197
- case 9: {
198
- if (tag !== 74) {
199
- break;
200
- }
201
- message.description = reader.string();
202
- continue;
203
- }
204
- case 10: {
205
- if (tag !== 80) {
206
- break;
207
- }
208
- message.nullable = reader.bool();
209
- continue;
210
- }
211
- case 11: {
212
- if (tag !== 93) {
213
- break;
214
- }
215
- message.confidence = reader.float();
216
- continue;
217
- }
218
- case 12: {
219
- if (tag !== 98) {
220
- break;
221
- }
222
- message.metadata = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
223
- continue;
224
- }
225
- }
226
- if ((tag & 7) === 4 || tag === 0) {
227
- break;
228
- }
229
- reader.skip(tag & 7);
230
- }
231
- return message;
232
- },
233
- fromJSON(object) {
234
- return {
235
- id: isSet(object.id) ? globalThis.String(object.id) : "",
236
- tableId: isSet(object.tableId)
237
- ? globalThis.String(object.tableId)
238
- : isSet(object.table_id)
239
- ? globalThis.String(object.table_id)
240
- : "",
241
- ordinal: isSet(object.ordinal) ? globalThis.Number(object.ordinal) : 0,
242
- name: isSet(object.name) ? globalThis.String(object.name) : "",
243
- sourceName: isSet(object.sourceName)
244
- ? globalThis.String(object.sourceName)
245
- : isSet(object.source_name)
246
- ? globalThis.String(object.source_name)
247
- : "",
248
- dataType: isSet(object.dataType)
249
- ? globalThis.String(object.dataType)
250
- : isSet(object.data_type)
251
- ? globalThis.String(object.data_type)
252
- : "",
253
- semanticType: isSet(object.semanticType)
254
- ? globalThis.String(object.semanticType)
255
- : isSet(object.semantic_type)
256
- ? globalThis.String(object.semantic_type)
257
- : "",
258
- unit: isSet(object.unit) ? globalThis.String(object.unit) : "",
259
- description: isSet(object.description) ? globalThis.String(object.description) : "",
260
- nullable: isSet(object.nullable) ? globalThis.Boolean(object.nullable) : false,
261
- confidence: isSet(object.confidence) ? globalThis.Number(object.confidence) : 0,
262
- metadata: isObject(object.metadata) ? object.metadata : undefined,
263
- };
264
- },
265
- toJSON(message) {
266
- const obj = {};
267
- if (message.id !== "") {
268
- obj.id = message.id;
269
- }
270
- if (message.tableId !== "") {
271
- obj.tableId = message.tableId;
272
- }
273
- if (message.ordinal !== 0) {
274
- obj.ordinal = Math.round(message.ordinal);
275
- }
276
- if (message.name !== "") {
277
- obj.name = message.name;
278
- }
279
- if (message.sourceName !== "") {
280
- obj.sourceName = message.sourceName;
281
- }
282
- if (message.dataType !== "") {
283
- obj.dataType = message.dataType;
284
- }
285
- if (message.semanticType !== "") {
286
- obj.semanticType = message.semanticType;
287
- }
288
- if (message.unit !== "") {
289
- obj.unit = message.unit;
290
- }
291
- if (message.description !== "") {
292
- obj.description = message.description;
293
- }
294
- if (message.nullable !== false) {
295
- obj.nullable = message.nullable;
296
- }
297
- if (message.confidence !== 0) {
298
- obj.confidence = message.confidence;
299
- }
300
- if (message.metadata !== undefined) {
301
- obj.metadata = message.metadata;
302
- }
303
- return obj;
304
- },
305
- create(base) {
306
- return exports.DocumentTableColumn.fromPartial(base !== null && base !== void 0 ? base : {});
307
- },
308
- fromPartial(object) {
309
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
310
- const message = createBaseDocumentTableColumn();
311
- message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
312
- message.tableId = (_b = object.tableId) !== null && _b !== void 0 ? _b : "";
313
- message.ordinal = (_c = object.ordinal) !== null && _c !== void 0 ? _c : 0;
314
- message.name = (_d = object.name) !== null && _d !== void 0 ? _d : "";
315
- message.sourceName = (_e = object.sourceName) !== null && _e !== void 0 ? _e : "";
316
- message.dataType = (_f = object.dataType) !== null && _f !== void 0 ? _f : "";
317
- message.semanticType = (_g = object.semanticType) !== null && _g !== void 0 ? _g : "";
318
- message.unit = (_h = object.unit) !== null && _h !== void 0 ? _h : "";
319
- message.description = (_j = object.description) !== null && _j !== void 0 ? _j : "";
320
- message.nullable = (_k = object.nullable) !== null && _k !== void 0 ? _k : false;
321
- message.confidence = (_l = object.confidence) !== null && _l !== void 0 ? _l : 0;
322
- message.metadata = (_m = object.metadata) !== null && _m !== void 0 ? _m : undefined;
323
- return message;
324
- },
325
- };
326
- function createBaseDocumentTable() {
327
- return {
328
- id: "",
329
- organizationId: "",
330
- documentId: "",
331
- name: "",
332
- description: "",
333
- summary: "",
334
- sourceFormat: 0,
335
- parserName: "",
336
- tableVersion: 0,
337
- active: false,
338
- artifactId: "",
339
- artifactVersion: 0,
340
- safeTableAlias: "",
341
- rowCount: 0,
342
- columnCount: 0,
343
- artifactScopeKind: "",
344
- artifactScopeKey: "",
345
- authorizationSnapshot: undefined,
346
- sourceLocation: undefined,
347
- columns: [],
348
- metadata: undefined,
349
- createdAt: undefined,
350
- updatedAt: undefined,
351
- };
352
- }
353
- exports.DocumentTable = {
354
- encode(message, writer = new wire_1.BinaryWriter()) {
355
- if (message.id !== "") {
356
- writer.uint32(10).string(message.id);
357
- }
358
- if (message.organizationId !== "") {
359
- writer.uint32(18).string(message.organizationId);
360
- }
361
- if (message.documentId !== "") {
362
- writer.uint32(26).string(message.documentId);
363
- }
364
- if (message.name !== "") {
365
- writer.uint32(34).string(message.name);
366
- }
367
- if (message.description !== "") {
368
- writer.uint32(42).string(message.description);
369
- }
370
- if (message.summary !== "") {
371
- writer.uint32(50).string(message.summary);
372
- }
373
- if (message.sourceFormat !== 0) {
374
- writer.uint32(56).int32(message.sourceFormat);
375
- }
376
- if (message.parserName !== "") {
377
- writer.uint32(66).string(message.parserName);
378
- }
379
- if (message.tableVersion !== 0) {
380
- writer.uint32(72).int32(message.tableVersion);
381
- }
382
- if (message.active !== false) {
383
- writer.uint32(80).bool(message.active);
384
- }
385
- if (message.artifactId !== "") {
386
- writer.uint32(90).string(message.artifactId);
387
- }
388
- if (message.artifactVersion !== 0) {
389
- writer.uint32(96).int32(message.artifactVersion);
390
- }
391
- if (message.safeTableAlias !== "") {
392
- writer.uint32(106).string(message.safeTableAlias);
393
- }
394
- if (message.rowCount !== 0) {
395
- writer.uint32(112).int64(message.rowCount);
396
- }
397
- if (message.columnCount !== 0) {
398
- writer.uint32(120).int32(message.columnCount);
399
- }
400
- if (message.artifactScopeKind !== "") {
401
- writer.uint32(130).string(message.artifactScopeKind);
402
- }
403
- if (message.artifactScopeKey !== "") {
404
- writer.uint32(138).string(message.artifactScopeKey);
405
- }
406
- if (message.authorizationSnapshot !== undefined) {
407
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.authorizationSnapshot), writer.uint32(146).fork()).join();
408
- }
409
- if (message.sourceLocation !== undefined) {
410
- ingestion_pb_1.SourceLocation.encode(message.sourceLocation, writer.uint32(154).fork()).join();
411
- }
412
- for (const v of message.columns) {
413
- exports.DocumentTableColumn.encode(v, writer.uint32(162).fork()).join();
414
- }
415
- if (message.metadata !== undefined) {
416
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.metadata), writer.uint32(186).fork()).join();
417
- }
418
- if (message.createdAt !== undefined) {
419
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(194).fork()).join();
420
- }
421
- if (message.updatedAt !== undefined) {
422
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(202).fork()).join();
423
- }
424
- return writer;
425
- },
426
- decode(input, length) {
427
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
428
- const end = length === undefined ? reader.len : reader.pos + length;
429
- const message = createBaseDocumentTable();
430
- while (reader.pos < end) {
431
- const tag = reader.uint32();
432
- switch (tag >>> 3) {
433
- case 1: {
434
- if (tag !== 10) {
435
- break;
436
- }
437
- message.id = reader.string();
438
- continue;
439
- }
440
- case 2: {
441
- if (tag !== 18) {
442
- break;
443
- }
444
- message.organizationId = reader.string();
445
- continue;
446
- }
447
- case 3: {
448
- if (tag !== 26) {
449
- break;
450
- }
451
- message.documentId = reader.string();
452
- continue;
453
- }
454
- case 4: {
455
- if (tag !== 34) {
456
- break;
457
- }
458
- message.name = reader.string();
459
- continue;
460
- }
461
- case 5: {
462
- if (tag !== 42) {
463
- break;
464
- }
465
- message.description = reader.string();
466
- continue;
467
- }
468
- case 6: {
469
- if (tag !== 50) {
470
- break;
471
- }
472
- message.summary = reader.string();
473
- continue;
474
- }
475
- case 7: {
476
- if (tag !== 56) {
477
- break;
478
- }
479
- message.sourceFormat = reader.int32();
480
- continue;
481
- }
482
- case 8: {
483
- if (tag !== 66) {
484
- break;
485
- }
486
- message.parserName = reader.string();
487
- continue;
488
- }
489
- case 9: {
490
- if (tag !== 72) {
491
- break;
492
- }
493
- message.tableVersion = reader.int32();
494
- continue;
495
- }
496
- case 10: {
497
- if (tag !== 80) {
498
- break;
499
- }
500
- message.active = reader.bool();
501
- continue;
502
- }
503
- case 11: {
504
- if (tag !== 90) {
505
- break;
506
- }
507
- message.artifactId = reader.string();
508
- continue;
509
- }
510
- case 12: {
511
- if (tag !== 96) {
512
- break;
513
- }
514
- message.artifactVersion = reader.int32();
515
- continue;
516
- }
517
- case 13: {
518
- if (tag !== 106) {
519
- break;
520
- }
521
- message.safeTableAlias = reader.string();
522
- continue;
523
- }
524
- case 14: {
525
- if (tag !== 112) {
526
- break;
527
- }
528
- message.rowCount = longToNumber(reader.int64());
529
- continue;
530
- }
531
- case 15: {
532
- if (tag !== 120) {
533
- break;
534
- }
535
- message.columnCount = reader.int32();
536
- continue;
537
- }
538
- case 16: {
539
- if (tag !== 130) {
540
- break;
541
- }
542
- message.artifactScopeKind = reader.string();
543
- continue;
544
- }
545
- case 17: {
546
- if (tag !== 138) {
547
- break;
548
- }
549
- message.artifactScopeKey = reader.string();
550
- continue;
551
- }
552
- case 18: {
553
- if (tag !== 146) {
554
- break;
555
- }
556
- message.authorizationSnapshot = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
557
- continue;
558
- }
559
- case 19: {
560
- if (tag !== 154) {
561
- break;
562
- }
563
- message.sourceLocation = ingestion_pb_1.SourceLocation.decode(reader, reader.uint32());
564
- continue;
565
- }
566
- case 20: {
567
- if (tag !== 162) {
568
- break;
569
- }
570
- message.columns.push(exports.DocumentTableColumn.decode(reader, reader.uint32()));
571
- continue;
572
- }
573
- case 23: {
574
- if (tag !== 186) {
575
- break;
576
- }
577
- message.metadata = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
578
- continue;
579
- }
580
- case 24: {
581
- if (tag !== 194) {
582
- break;
583
- }
584
- message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
585
- continue;
586
- }
587
- case 25: {
588
- if (tag !== 202) {
589
- break;
590
- }
591
- message.updatedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
592
- continue;
593
- }
594
- }
595
- if ((tag & 7) === 4 || tag === 0) {
596
- break;
597
- }
598
- reader.skip(tag & 7);
599
- }
600
- return message;
601
- },
602
- fromJSON(object) {
603
- return {
604
- id: isSet(object.id) ? globalThis.String(object.id) : "",
605
- organizationId: isSet(object.organizationId)
606
- ? globalThis.String(object.organizationId)
607
- : isSet(object.organization_id)
608
- ? globalThis.String(object.organization_id)
609
- : "",
610
- documentId: isSet(object.documentId)
611
- ? globalThis.String(object.documentId)
612
- : isSet(object.document_id)
613
- ? globalThis.String(object.document_id)
614
- : "",
615
- name: isSet(object.name) ? globalThis.String(object.name) : "",
616
- description: isSet(object.description) ? globalThis.String(object.description) : "",
617
- summary: isSet(object.summary) ? globalThis.String(object.summary) : "",
618
- sourceFormat: isSet(object.sourceFormat)
619
- ? tableSourceFormatFromJSON(object.sourceFormat)
620
- : isSet(object.source_format)
621
- ? tableSourceFormatFromJSON(object.source_format)
622
- : 0,
623
- parserName: isSet(object.parserName)
624
- ? globalThis.String(object.parserName)
625
- : isSet(object.parser_name)
626
- ? globalThis.String(object.parser_name)
627
- : "",
628
- tableVersion: isSet(object.tableVersion)
629
- ? globalThis.Number(object.tableVersion)
630
- : isSet(object.table_version)
631
- ? globalThis.Number(object.table_version)
632
- : 0,
633
- active: isSet(object.active) ? globalThis.Boolean(object.active) : false,
634
- artifactId: isSet(object.artifactId)
635
- ? globalThis.String(object.artifactId)
636
- : isSet(object.artifact_id)
637
- ? globalThis.String(object.artifact_id)
638
- : "",
639
- artifactVersion: isSet(object.artifactVersion)
640
- ? globalThis.Number(object.artifactVersion)
641
- : isSet(object.artifact_version)
642
- ? globalThis.Number(object.artifact_version)
643
- : 0,
644
- safeTableAlias: isSet(object.safeTableAlias)
645
- ? globalThis.String(object.safeTableAlias)
646
- : isSet(object.safe_table_alias)
647
- ? globalThis.String(object.safe_table_alias)
648
- : "",
649
- rowCount: isSet(object.rowCount)
650
- ? globalThis.Number(object.rowCount)
651
- : isSet(object.row_count)
652
- ? globalThis.Number(object.row_count)
653
- : 0,
654
- columnCount: isSet(object.columnCount)
655
- ? globalThis.Number(object.columnCount)
656
- : isSet(object.column_count)
657
- ? globalThis.Number(object.column_count)
658
- : 0,
659
- artifactScopeKind: isSet(object.artifactScopeKind)
660
- ? globalThis.String(object.artifactScopeKind)
661
- : isSet(object.artifact_scope_kind)
662
- ? globalThis.String(object.artifact_scope_kind)
663
- : "",
664
- artifactScopeKey: isSet(object.artifactScopeKey)
665
- ? globalThis.String(object.artifactScopeKey)
666
- : isSet(object.artifact_scope_key)
667
- ? globalThis.String(object.artifact_scope_key)
668
- : "",
669
- authorizationSnapshot: isObject(object.authorizationSnapshot)
670
- ? object.authorizationSnapshot
671
- : isObject(object.authorization_snapshot)
672
- ? object.authorization_snapshot
673
- : undefined,
674
- sourceLocation: isSet(object.sourceLocation)
675
- ? ingestion_pb_1.SourceLocation.fromJSON(object.sourceLocation)
676
- : isSet(object.source_location)
677
- ? ingestion_pb_1.SourceLocation.fromJSON(object.source_location)
678
- : undefined,
679
- columns: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.columns)
680
- ? object.columns.map((e) => exports.DocumentTableColumn.fromJSON(e))
681
- : [],
682
- metadata: isObject(object.metadata) ? object.metadata : undefined,
683
- createdAt: isSet(object.createdAt)
684
- ? fromJsonTimestamp(object.createdAt)
685
- : isSet(object.created_at)
686
- ? fromJsonTimestamp(object.created_at)
687
- : undefined,
688
- updatedAt: isSet(object.updatedAt)
689
- ? fromJsonTimestamp(object.updatedAt)
690
- : isSet(object.updated_at)
691
- ? fromJsonTimestamp(object.updated_at)
692
- : undefined,
693
- };
694
- },
695
- toJSON(message) {
696
- var _a;
697
- const obj = {};
698
- if (message.id !== "") {
699
- obj.id = message.id;
700
- }
701
- if (message.organizationId !== "") {
702
- obj.organizationId = message.organizationId;
703
- }
704
- if (message.documentId !== "") {
705
- obj.documentId = message.documentId;
706
- }
707
- if (message.name !== "") {
708
- obj.name = message.name;
709
- }
710
- if (message.description !== "") {
711
- obj.description = message.description;
712
- }
713
- if (message.summary !== "") {
714
- obj.summary = message.summary;
715
- }
716
- if (message.sourceFormat !== 0) {
717
- obj.sourceFormat = tableSourceFormatToJSON(message.sourceFormat);
718
- }
719
- if (message.parserName !== "") {
720
- obj.parserName = message.parserName;
721
- }
722
- if (message.tableVersion !== 0) {
723
- obj.tableVersion = Math.round(message.tableVersion);
724
- }
725
- if (message.active !== false) {
726
- obj.active = message.active;
727
- }
728
- if (message.artifactId !== "") {
729
- obj.artifactId = message.artifactId;
730
- }
731
- if (message.artifactVersion !== 0) {
732
- obj.artifactVersion = Math.round(message.artifactVersion);
733
- }
734
- if (message.safeTableAlias !== "") {
735
- obj.safeTableAlias = message.safeTableAlias;
736
- }
737
- if (message.rowCount !== 0) {
738
- obj.rowCount = Math.round(message.rowCount);
739
- }
740
- if (message.columnCount !== 0) {
741
- obj.columnCount = Math.round(message.columnCount);
742
- }
743
- if (message.artifactScopeKind !== "") {
744
- obj.artifactScopeKind = message.artifactScopeKind;
745
- }
746
- if (message.artifactScopeKey !== "") {
747
- obj.artifactScopeKey = message.artifactScopeKey;
748
- }
749
- if (message.authorizationSnapshot !== undefined) {
750
- obj.authorizationSnapshot = message.authorizationSnapshot;
751
- }
752
- if (message.sourceLocation !== undefined) {
753
- obj.sourceLocation = ingestion_pb_1.SourceLocation.toJSON(message.sourceLocation);
754
- }
755
- if ((_a = message.columns) === null || _a === void 0 ? void 0 : _a.length) {
756
- obj.columns = message.columns.map((e) => exports.DocumentTableColumn.toJSON(e));
757
- }
758
- if (message.metadata !== undefined) {
759
- obj.metadata = message.metadata;
760
- }
761
- if (message.createdAt !== undefined) {
762
- obj.createdAt = message.createdAt.toISOString();
763
- }
764
- if (message.updatedAt !== undefined) {
765
- obj.updatedAt = message.updatedAt.toISOString();
766
- }
767
- return obj;
768
- },
769
- create(base) {
770
- return exports.DocumentTable.fromPartial(base !== null && base !== void 0 ? base : {});
771
- },
772
- fromPartial(object) {
773
- var _a;
774
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
775
- const message = createBaseDocumentTable();
776
- message.id = (_b = object.id) !== null && _b !== void 0 ? _b : "";
777
- message.organizationId = (_c = object.organizationId) !== null && _c !== void 0 ? _c : "";
778
- message.documentId = (_d = object.documentId) !== null && _d !== void 0 ? _d : "";
779
- message.name = (_e = object.name) !== null && _e !== void 0 ? _e : "";
780
- message.description = (_f = object.description) !== null && _f !== void 0 ? _f : "";
781
- message.summary = (_g = object.summary) !== null && _g !== void 0 ? _g : "";
782
- message.sourceFormat = (_h = object.sourceFormat) !== null && _h !== void 0 ? _h : 0;
783
- message.parserName = (_j = object.parserName) !== null && _j !== void 0 ? _j : "";
784
- message.tableVersion = (_k = object.tableVersion) !== null && _k !== void 0 ? _k : 0;
785
- message.active = (_l = object.active) !== null && _l !== void 0 ? _l : false;
786
- message.artifactId = (_m = object.artifactId) !== null && _m !== void 0 ? _m : "";
787
- message.artifactVersion = (_o = object.artifactVersion) !== null && _o !== void 0 ? _o : 0;
788
- message.safeTableAlias = (_p = object.safeTableAlias) !== null && _p !== void 0 ? _p : "";
789
- message.rowCount = (_q = object.rowCount) !== null && _q !== void 0 ? _q : 0;
790
- message.columnCount = (_r = object.columnCount) !== null && _r !== void 0 ? _r : 0;
791
- message.artifactScopeKind = (_s = object.artifactScopeKind) !== null && _s !== void 0 ? _s : "";
792
- message.artifactScopeKey = (_t = object.artifactScopeKey) !== null && _t !== void 0 ? _t : "";
793
- message.authorizationSnapshot = (_u = object.authorizationSnapshot) !== null && _u !== void 0 ? _u : undefined;
794
- message.sourceLocation = (object.sourceLocation !== undefined && object.sourceLocation !== null)
795
- ? ingestion_pb_1.SourceLocation.fromPartial(object.sourceLocation)
796
- : undefined;
797
- message.columns = ((_a = object.columns) === null || _a === void 0 ? void 0 : _a.map((e) => exports.DocumentTableColumn.fromPartial(e))) || [];
798
- message.metadata = (_v = object.metadata) !== null && _v !== void 0 ? _v : undefined;
799
- message.createdAt = (_w = object.createdAt) !== null && _w !== void 0 ? _w : undefined;
800
- message.updatedAt = (_x = object.updatedAt) !== null && _x !== void 0 ? _x : undefined;
801
- return message;
802
- },
803
- };
804
- function createBaseThreadTableLink() {
805
- return {
806
- threadId: "",
807
- documentId: "",
808
- tableId: "",
809
- artifactId: "",
810
- artifactVersion: 0,
811
- tableName: "",
812
- tableSummary: "",
813
- safeTableAlias: "",
814
- sourceLocation: undefined,
815
- authorizationSnapshot: undefined,
816
- };
817
- }
818
- exports.ThreadTableLink = {
819
- encode(message, writer = new wire_1.BinaryWriter()) {
820
- if (message.threadId !== "") {
821
- writer.uint32(10).string(message.threadId);
822
- }
823
- if (message.documentId !== "") {
824
- writer.uint32(18).string(message.documentId);
825
- }
826
- if (message.tableId !== "") {
827
- writer.uint32(26).string(message.tableId);
828
- }
829
- if (message.artifactId !== "") {
830
- writer.uint32(34).string(message.artifactId);
831
- }
832
- if (message.artifactVersion !== 0) {
833
- writer.uint32(40).int32(message.artifactVersion);
834
- }
835
- if (message.tableName !== "") {
836
- writer.uint32(50).string(message.tableName);
837
- }
838
- if (message.tableSummary !== "") {
839
- writer.uint32(58).string(message.tableSummary);
840
- }
841
- if (message.safeTableAlias !== "") {
842
- writer.uint32(66).string(message.safeTableAlias);
843
- }
844
- if (message.sourceLocation !== undefined) {
845
- ingestion_pb_1.SourceLocation.encode(message.sourceLocation, writer.uint32(74).fork()).join();
846
- }
847
- if (message.authorizationSnapshot !== undefined) {
848
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.authorizationSnapshot), writer.uint32(82).fork()).join();
849
- }
850
- return writer;
851
- },
852
- decode(input, length) {
853
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
854
- const end = length === undefined ? reader.len : reader.pos + length;
855
- const message = createBaseThreadTableLink();
856
- while (reader.pos < end) {
857
- const tag = reader.uint32();
858
- switch (tag >>> 3) {
859
- case 1: {
860
- if (tag !== 10) {
861
- break;
862
- }
863
- message.threadId = reader.string();
864
- continue;
865
- }
866
- case 2: {
867
- if (tag !== 18) {
868
- break;
869
- }
870
- message.documentId = reader.string();
871
- continue;
872
- }
873
- case 3: {
874
- if (tag !== 26) {
875
- break;
876
- }
877
- message.tableId = reader.string();
878
- continue;
879
- }
880
- case 4: {
881
- if (tag !== 34) {
882
- break;
883
- }
884
- message.artifactId = reader.string();
885
- continue;
886
- }
887
- case 5: {
888
- if (tag !== 40) {
889
- break;
890
- }
891
- message.artifactVersion = reader.int32();
892
- continue;
893
- }
894
- case 6: {
895
- if (tag !== 50) {
896
- break;
897
- }
898
- message.tableName = reader.string();
899
- continue;
900
- }
901
- case 7: {
902
- if (tag !== 58) {
903
- break;
904
- }
905
- message.tableSummary = reader.string();
906
- continue;
907
- }
908
- case 8: {
909
- if (tag !== 66) {
910
- break;
911
- }
912
- message.safeTableAlias = reader.string();
913
- continue;
914
- }
915
- case 9: {
916
- if (tag !== 74) {
917
- break;
918
- }
919
- message.sourceLocation = ingestion_pb_1.SourceLocation.decode(reader, reader.uint32());
920
- continue;
921
- }
922
- case 10: {
923
- if (tag !== 82) {
924
- break;
925
- }
926
- message.authorizationSnapshot = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
927
- continue;
928
- }
929
- }
930
- if ((tag & 7) === 4 || tag === 0) {
931
- break;
932
- }
933
- reader.skip(tag & 7);
934
- }
935
- return message;
936
- },
937
- fromJSON(object) {
938
- return {
939
- threadId: isSet(object.threadId)
940
- ? globalThis.String(object.threadId)
941
- : isSet(object.thread_id)
942
- ? globalThis.String(object.thread_id)
943
- : "",
944
- documentId: isSet(object.documentId)
945
- ? globalThis.String(object.documentId)
946
- : isSet(object.document_id)
947
- ? globalThis.String(object.document_id)
948
- : "",
949
- tableId: isSet(object.tableId)
950
- ? globalThis.String(object.tableId)
951
- : isSet(object.table_id)
952
- ? globalThis.String(object.table_id)
953
- : "",
954
- artifactId: isSet(object.artifactId)
955
- ? globalThis.String(object.artifactId)
956
- : isSet(object.artifact_id)
957
- ? globalThis.String(object.artifact_id)
958
- : "",
959
- artifactVersion: isSet(object.artifactVersion)
960
- ? globalThis.Number(object.artifactVersion)
961
- : isSet(object.artifact_version)
962
- ? globalThis.Number(object.artifact_version)
963
- : 0,
964
- tableName: isSet(object.tableName)
965
- ? globalThis.String(object.tableName)
966
- : isSet(object.table_name)
967
- ? globalThis.String(object.table_name)
968
- : "",
969
- tableSummary: isSet(object.tableSummary)
970
- ? globalThis.String(object.tableSummary)
971
- : isSet(object.table_summary)
972
- ? globalThis.String(object.table_summary)
973
- : "",
974
- safeTableAlias: isSet(object.safeTableAlias)
975
- ? globalThis.String(object.safeTableAlias)
976
- : isSet(object.safe_table_alias)
977
- ? globalThis.String(object.safe_table_alias)
978
- : "",
979
- sourceLocation: isSet(object.sourceLocation)
980
- ? ingestion_pb_1.SourceLocation.fromJSON(object.sourceLocation)
981
- : isSet(object.source_location)
982
- ? ingestion_pb_1.SourceLocation.fromJSON(object.source_location)
983
- : undefined,
984
- authorizationSnapshot: isObject(object.authorizationSnapshot)
985
- ? object.authorizationSnapshot
986
- : isObject(object.authorization_snapshot)
987
- ? object.authorization_snapshot
988
- : undefined,
989
- };
990
- },
991
- toJSON(message) {
992
- const obj = {};
993
- if (message.threadId !== "") {
994
- obj.threadId = message.threadId;
995
- }
996
- if (message.documentId !== "") {
997
- obj.documentId = message.documentId;
998
- }
999
- if (message.tableId !== "") {
1000
- obj.tableId = message.tableId;
1001
- }
1002
- if (message.artifactId !== "") {
1003
- obj.artifactId = message.artifactId;
1004
- }
1005
- if (message.artifactVersion !== 0) {
1006
- obj.artifactVersion = Math.round(message.artifactVersion);
1007
- }
1008
- if (message.tableName !== "") {
1009
- obj.tableName = message.tableName;
1010
- }
1011
- if (message.tableSummary !== "") {
1012
- obj.tableSummary = message.tableSummary;
1013
- }
1014
- if (message.safeTableAlias !== "") {
1015
- obj.safeTableAlias = message.safeTableAlias;
1016
- }
1017
- if (message.sourceLocation !== undefined) {
1018
- obj.sourceLocation = ingestion_pb_1.SourceLocation.toJSON(message.sourceLocation);
1019
- }
1020
- if (message.authorizationSnapshot !== undefined) {
1021
- obj.authorizationSnapshot = message.authorizationSnapshot;
1022
- }
1023
- return obj;
1024
- },
1025
- create(base) {
1026
- return exports.ThreadTableLink.fromPartial(base !== null && base !== void 0 ? base : {});
1027
- },
1028
- fromPartial(object) {
1029
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1030
- const message = createBaseThreadTableLink();
1031
- message.threadId = (_a = object.threadId) !== null && _a !== void 0 ? _a : "";
1032
- message.documentId = (_b = object.documentId) !== null && _b !== void 0 ? _b : "";
1033
- message.tableId = (_c = object.tableId) !== null && _c !== void 0 ? _c : "";
1034
- message.artifactId = (_d = object.artifactId) !== null && _d !== void 0 ? _d : "";
1035
- message.artifactVersion = (_e = object.artifactVersion) !== null && _e !== void 0 ? _e : 0;
1036
- message.tableName = (_f = object.tableName) !== null && _f !== void 0 ? _f : "";
1037
- message.tableSummary = (_g = object.tableSummary) !== null && _g !== void 0 ? _g : "";
1038
- message.safeTableAlias = (_h = object.safeTableAlias) !== null && _h !== void 0 ? _h : "";
1039
- message.sourceLocation = (object.sourceLocation !== undefined && object.sourceLocation !== null)
1040
- ? ingestion_pb_1.SourceLocation.fromPartial(object.sourceLocation)
1041
- : undefined;
1042
- message.authorizationSnapshot = (_j = object.authorizationSnapshot) !== null && _j !== void 0 ? _j : undefined;
1043
- return message;
1044
- },
1045
- };
1046
- function createBaseListDocumentTablesRequest() {
1047
- return { organizationId: "", documentId: "", actingUserId: "", includeInactive: false, pageSize: 0, pageToken: "" };
1048
- }
1049
- exports.ListDocumentTablesRequest = {
1050
- encode(message, writer = new wire_1.BinaryWriter()) {
1051
- if (message.organizationId !== "") {
1052
- writer.uint32(10).string(message.organizationId);
1053
- }
1054
- if (message.documentId !== "") {
1055
- writer.uint32(18).string(message.documentId);
1056
- }
1057
- if (message.actingUserId !== "") {
1058
- writer.uint32(26).string(message.actingUserId);
1059
- }
1060
- if (message.includeInactive !== false) {
1061
- writer.uint32(32).bool(message.includeInactive);
1062
- }
1063
- if (message.pageSize !== 0) {
1064
- writer.uint32(40).int32(message.pageSize);
1065
- }
1066
- if (message.pageToken !== "") {
1067
- writer.uint32(50).string(message.pageToken);
1068
- }
1069
- return writer;
1070
- },
1071
- decode(input, length) {
1072
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1073
- const end = length === undefined ? reader.len : reader.pos + length;
1074
- const message = createBaseListDocumentTablesRequest();
1075
- while (reader.pos < end) {
1076
- const tag = reader.uint32();
1077
- switch (tag >>> 3) {
1078
- case 1: {
1079
- if (tag !== 10) {
1080
- break;
1081
- }
1082
- message.organizationId = reader.string();
1083
- continue;
1084
- }
1085
- case 2: {
1086
- if (tag !== 18) {
1087
- break;
1088
- }
1089
- message.documentId = reader.string();
1090
- continue;
1091
- }
1092
- case 3: {
1093
- if (tag !== 26) {
1094
- break;
1095
- }
1096
- message.actingUserId = reader.string();
1097
- continue;
1098
- }
1099
- case 4: {
1100
- if (tag !== 32) {
1101
- break;
1102
- }
1103
- message.includeInactive = reader.bool();
1104
- continue;
1105
- }
1106
- case 5: {
1107
- if (tag !== 40) {
1108
- break;
1109
- }
1110
- message.pageSize = reader.int32();
1111
- continue;
1112
- }
1113
- case 6: {
1114
- if (tag !== 50) {
1115
- break;
1116
- }
1117
- message.pageToken = reader.string();
1118
- continue;
1119
- }
1120
- }
1121
- if ((tag & 7) === 4 || tag === 0) {
1122
- break;
1123
- }
1124
- reader.skip(tag & 7);
1125
- }
1126
- return message;
1127
- },
1128
- fromJSON(object) {
1129
- return {
1130
- organizationId: isSet(object.organizationId)
1131
- ? globalThis.String(object.organizationId)
1132
- : isSet(object.organization_id)
1133
- ? globalThis.String(object.organization_id)
1134
- : "",
1135
- documentId: isSet(object.documentId)
1136
- ? globalThis.String(object.documentId)
1137
- : isSet(object.document_id)
1138
- ? globalThis.String(object.document_id)
1139
- : "",
1140
- actingUserId: isSet(object.actingUserId)
1141
- ? globalThis.String(object.actingUserId)
1142
- : isSet(object.acting_user_id)
1143
- ? globalThis.String(object.acting_user_id)
1144
- : "",
1145
- includeInactive: isSet(object.includeInactive)
1146
- ? globalThis.Boolean(object.includeInactive)
1147
- : isSet(object.include_inactive)
1148
- ? globalThis.Boolean(object.include_inactive)
1149
- : false,
1150
- pageSize: isSet(object.pageSize)
1151
- ? globalThis.Number(object.pageSize)
1152
- : isSet(object.page_size)
1153
- ? globalThis.Number(object.page_size)
1154
- : 0,
1155
- pageToken: isSet(object.pageToken)
1156
- ? globalThis.String(object.pageToken)
1157
- : isSet(object.page_token)
1158
- ? globalThis.String(object.page_token)
1159
- : "",
1160
- };
1161
- },
1162
- toJSON(message) {
1163
- const obj = {};
1164
- if (message.organizationId !== "") {
1165
- obj.organizationId = message.organizationId;
1166
- }
1167
- if (message.documentId !== "") {
1168
- obj.documentId = message.documentId;
1169
- }
1170
- if (message.actingUserId !== "") {
1171
- obj.actingUserId = message.actingUserId;
1172
- }
1173
- if (message.includeInactive !== false) {
1174
- obj.includeInactive = message.includeInactive;
1175
- }
1176
- if (message.pageSize !== 0) {
1177
- obj.pageSize = Math.round(message.pageSize);
1178
- }
1179
- if (message.pageToken !== "") {
1180
- obj.pageToken = message.pageToken;
1181
- }
1182
- return obj;
1183
- },
1184
- create(base) {
1185
- return exports.ListDocumentTablesRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1186
- },
1187
- fromPartial(object) {
1188
- var _a, _b, _c, _d, _e, _f;
1189
- const message = createBaseListDocumentTablesRequest();
1190
- message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
1191
- message.documentId = (_b = object.documentId) !== null && _b !== void 0 ? _b : "";
1192
- message.actingUserId = (_c = object.actingUserId) !== null && _c !== void 0 ? _c : "";
1193
- message.includeInactive = (_d = object.includeInactive) !== null && _d !== void 0 ? _d : false;
1194
- message.pageSize = (_e = object.pageSize) !== null && _e !== void 0 ? _e : 0;
1195
- message.pageToken = (_f = object.pageToken) !== null && _f !== void 0 ? _f : "";
1196
- return message;
1197
- },
1198
- };
1199
- function createBaseListDocumentTablesResponse() {
1200
- return { tables: [], nextPageToken: "" };
1201
- }
1202
- exports.ListDocumentTablesResponse = {
1203
- encode(message, writer = new wire_1.BinaryWriter()) {
1204
- for (const v of message.tables) {
1205
- exports.DocumentTable.encode(v, writer.uint32(10).fork()).join();
1206
- }
1207
- if (message.nextPageToken !== "") {
1208
- writer.uint32(18).string(message.nextPageToken);
1209
- }
1210
- return writer;
1211
- },
1212
- decode(input, length) {
1213
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1214
- const end = length === undefined ? reader.len : reader.pos + length;
1215
- const message = createBaseListDocumentTablesResponse();
1216
- while (reader.pos < end) {
1217
- const tag = reader.uint32();
1218
- switch (tag >>> 3) {
1219
- case 1: {
1220
- if (tag !== 10) {
1221
- break;
1222
- }
1223
- message.tables.push(exports.DocumentTable.decode(reader, reader.uint32()));
1224
- continue;
1225
- }
1226
- case 2: {
1227
- if (tag !== 18) {
1228
- break;
1229
- }
1230
- message.nextPageToken = reader.string();
1231
- continue;
1232
- }
1233
- }
1234
- if ((tag & 7) === 4 || tag === 0) {
1235
- break;
1236
- }
1237
- reader.skip(tag & 7);
1238
- }
1239
- return message;
1240
- },
1241
- fromJSON(object) {
1242
- return {
1243
- tables: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.tables) ? object.tables.map((e) => exports.DocumentTable.fromJSON(e)) : [],
1244
- nextPageToken: isSet(object.nextPageToken)
1245
- ? globalThis.String(object.nextPageToken)
1246
- : isSet(object.next_page_token)
1247
- ? globalThis.String(object.next_page_token)
1248
- : "",
1249
- };
1250
- },
1251
- toJSON(message) {
1252
- var _a;
1253
- const obj = {};
1254
- if ((_a = message.tables) === null || _a === void 0 ? void 0 : _a.length) {
1255
- obj.tables = message.tables.map((e) => exports.DocumentTable.toJSON(e));
1256
- }
1257
- if (message.nextPageToken !== "") {
1258
- obj.nextPageToken = message.nextPageToken;
1259
- }
1260
- return obj;
1261
- },
1262
- create(base) {
1263
- return exports.ListDocumentTablesResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1264
- },
1265
- fromPartial(object) {
1266
- var _a;
1267
- var _b;
1268
- const message = createBaseListDocumentTablesResponse();
1269
- message.tables = ((_a = object.tables) === null || _a === void 0 ? void 0 : _a.map((e) => exports.DocumentTable.fromPartial(e))) || [];
1270
- message.nextPageToken = (_b = object.nextPageToken) !== null && _b !== void 0 ? _b : "";
1271
- return message;
1272
- },
1273
- };
1274
- function createBaseGetDocumentTableRequest() {
1275
- return { organizationId: "", documentId: "", tableId: "", actingUserId: "" };
1276
- }
1277
- exports.GetDocumentTableRequest = {
1278
- encode(message, writer = new wire_1.BinaryWriter()) {
1279
- if (message.organizationId !== "") {
1280
- writer.uint32(10).string(message.organizationId);
1281
- }
1282
- if (message.documentId !== "") {
1283
- writer.uint32(18).string(message.documentId);
1284
- }
1285
- if (message.tableId !== "") {
1286
- writer.uint32(26).string(message.tableId);
1287
- }
1288
- if (message.actingUserId !== "") {
1289
- writer.uint32(34).string(message.actingUserId);
1290
- }
1291
- return writer;
1292
- },
1293
- decode(input, length) {
1294
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1295
- const end = length === undefined ? reader.len : reader.pos + length;
1296
- const message = createBaseGetDocumentTableRequest();
1297
- while (reader.pos < end) {
1298
- const tag = reader.uint32();
1299
- switch (tag >>> 3) {
1300
- case 1: {
1301
- if (tag !== 10) {
1302
- break;
1303
- }
1304
- message.organizationId = reader.string();
1305
- continue;
1306
- }
1307
- case 2: {
1308
- if (tag !== 18) {
1309
- break;
1310
- }
1311
- message.documentId = reader.string();
1312
- continue;
1313
- }
1314
- case 3: {
1315
- if (tag !== 26) {
1316
- break;
1317
- }
1318
- message.tableId = reader.string();
1319
- continue;
1320
- }
1321
- case 4: {
1322
- if (tag !== 34) {
1323
- break;
1324
- }
1325
- message.actingUserId = reader.string();
1326
- continue;
1327
- }
1328
- }
1329
- if ((tag & 7) === 4 || tag === 0) {
1330
- break;
1331
- }
1332
- reader.skip(tag & 7);
1333
- }
1334
- return message;
1335
- },
1336
- fromJSON(object) {
1337
- return {
1338
- organizationId: isSet(object.organizationId)
1339
- ? globalThis.String(object.organizationId)
1340
- : isSet(object.organization_id)
1341
- ? globalThis.String(object.organization_id)
1342
- : "",
1343
- documentId: isSet(object.documentId)
1344
- ? globalThis.String(object.documentId)
1345
- : isSet(object.document_id)
1346
- ? globalThis.String(object.document_id)
1347
- : "",
1348
- tableId: isSet(object.tableId)
1349
- ? globalThis.String(object.tableId)
1350
- : isSet(object.table_id)
1351
- ? globalThis.String(object.table_id)
1352
- : "",
1353
- actingUserId: isSet(object.actingUserId)
1354
- ? globalThis.String(object.actingUserId)
1355
- : isSet(object.acting_user_id)
1356
- ? globalThis.String(object.acting_user_id)
1357
- : "",
1358
- };
1359
- },
1360
- toJSON(message) {
1361
- const obj = {};
1362
- if (message.organizationId !== "") {
1363
- obj.organizationId = message.organizationId;
1364
- }
1365
- if (message.documentId !== "") {
1366
- obj.documentId = message.documentId;
1367
- }
1368
- if (message.tableId !== "") {
1369
- obj.tableId = message.tableId;
1370
- }
1371
- if (message.actingUserId !== "") {
1372
- obj.actingUserId = message.actingUserId;
1373
- }
1374
- return obj;
1375
- },
1376
- create(base) {
1377
- return exports.GetDocumentTableRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1378
- },
1379
- fromPartial(object) {
1380
- var _a, _b, _c, _d;
1381
- const message = createBaseGetDocumentTableRequest();
1382
- message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
1383
- message.documentId = (_b = object.documentId) !== null && _b !== void 0 ? _b : "";
1384
- message.tableId = (_c = object.tableId) !== null && _c !== void 0 ? _c : "";
1385
- message.actingUserId = (_d = object.actingUserId) !== null && _d !== void 0 ? _d : "";
1386
- return message;
1387
- },
1388
- };
1389
- function createBaseGetDocumentTableResponse() {
1390
- return { table: undefined };
1391
- }
1392
- exports.GetDocumentTableResponse = {
1393
- encode(message, writer = new wire_1.BinaryWriter()) {
1394
- if (message.table !== undefined) {
1395
- exports.DocumentTable.encode(message.table, writer.uint32(10).fork()).join();
1396
- }
1397
- return writer;
1398
- },
1399
- decode(input, length) {
1400
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1401
- const end = length === undefined ? reader.len : reader.pos + length;
1402
- const message = createBaseGetDocumentTableResponse();
1403
- while (reader.pos < end) {
1404
- const tag = reader.uint32();
1405
- switch (tag >>> 3) {
1406
- case 1: {
1407
- if (tag !== 10) {
1408
- break;
1409
- }
1410
- message.table = exports.DocumentTable.decode(reader, reader.uint32());
1411
- continue;
1412
- }
1413
- }
1414
- if ((tag & 7) === 4 || tag === 0) {
1415
- break;
1416
- }
1417
- reader.skip(tag & 7);
1418
- }
1419
- return message;
1420
- },
1421
- fromJSON(object) {
1422
- return { table: isSet(object.table) ? exports.DocumentTable.fromJSON(object.table) : undefined };
1423
- },
1424
- toJSON(message) {
1425
- const obj = {};
1426
- if (message.table !== undefined) {
1427
- obj.table = exports.DocumentTable.toJSON(message.table);
1428
- }
1429
- return obj;
1430
- },
1431
- create(base) {
1432
- return exports.GetDocumentTableResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1433
- },
1434
- fromPartial(object) {
1435
- const message = createBaseGetDocumentTableResponse();
1436
- message.table = (object.table !== undefined && object.table !== null)
1437
- ? exports.DocumentTable.fromPartial(object.table)
1438
- : undefined;
1439
- return message;
1440
- },
1441
- };
1442
- function toTimestamp(date) {
1443
- const seconds = Math.trunc(date.getTime() / 1000);
1444
- const nanos = (date.getTime() % 1000) * 1000000;
1445
- return { seconds, nanos };
1446
- }
1447
- function fromTimestamp(t) {
1448
- let millis = (t.seconds || 0) * 1000;
1449
- millis += (t.nanos || 0) / 1000000;
1450
- return new globalThis.Date(millis);
1451
- }
1452
- function fromJsonTimestamp(o) {
1453
- if (o instanceof globalThis.Date) {
1454
- return o;
1455
- }
1456
- else if (typeof o === "string") {
1457
- return new globalThis.Date(o);
1458
- }
1459
- else {
1460
- return fromTimestamp(timestamp_pb_1.Timestamp.fromJSON(o));
1461
- }
1462
- }
1463
- function longToNumber(int64) {
1464
- const num = globalThis.Number(int64.toString());
1465
- if (num > globalThis.Number.MAX_SAFE_INTEGER) {
1466
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
1467
- }
1468
- if (num < globalThis.Number.MIN_SAFE_INTEGER) {
1469
- throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
1470
- }
1471
- return num;
1472
- }
1473
- function isObject(value) {
1474
- return typeof value === "object" && value !== null;
1475
- }
1476
- function isSet(value) {
1477
- return value !== null && value !== undefined;
1478
- }