weave-typescript 0.11.14 → 0.11.16

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 (75) hide show
  1. package/dist/weaveapi/data/v1/data.pb.d.ts +54 -0
  2. package/dist/weaveapi/data/v1/data.pb.js +411 -0
  3. package/dist/weaveapi/data/v1/service.pb.d.ts +296 -0
  4. package/dist/weaveapi/data/v1/service.pb.js +2779 -0
  5. package/dist/weaveapi/input/v1/input.pb.d.ts +77 -0
  6. package/dist/weaveapi/input/v1/input.pb.js +632 -0
  7. package/dist/weaveapi/input/v1/service.pb.d.ts +390 -0
  8. package/dist/weaveapi/input/v1/service.pb.js +3612 -0
  9. package/dist/weaveapi/integration/v1/integration.pb.d.ts +67 -0
  10. package/dist/weaveapi/integration/v1/integration.pb.js +486 -0
  11. package/dist/weaveapi/integration/v1/service.pb.d.ts +318 -0
  12. package/dist/weaveapi/integration/v1/service.pb.js +2994 -0
  13. package/dist/weaveapi/project/v1/project.pb.d.ts +1 -0
  14. package/dist/weaveapi/project/v1/project.pb.js +17 -1
  15. package/dist/weaveapi/project/v1/service.pb.d.ts +25 -0
  16. package/dist/weaveapi/project/v1/service.pb.js +248 -5
  17. package/dist/weaveapi/report/v1/report.pb.d.ts +81 -0
  18. package/dist/weaveapi/report/v1/report.pb.js +678 -0
  19. package/dist/weaveapi/report/v1/service.pb.d.ts +194 -0
  20. package/dist/weaveapi/report/v1/service.pb.js +1925 -0
  21. package/dist/weaveapi/requirement/v1/requirement.pb.d.ts +70 -0
  22. package/dist/weaveapi/requirement/v1/requirement.pb.js +570 -0
  23. package/dist/weaveapi/requirement/v1/service.pb.d.ts +390 -0
  24. package/dist/weaveapi/requirement/v1/service.pb.js +3638 -0
  25. package/dist/weaveapi/run/v1/run.pb.d.ts +117 -0
  26. package/dist/weaveapi/run/v1/run.pb.js +1155 -0
  27. package/dist/weaveapi/run/v1/service.pb.d.ts +229 -0
  28. package/dist/weaveapi/run/v1/service.pb.js +2428 -0
  29. package/dist/weaveapi/script/v1/script.pb.d.ts +102 -0
  30. package/dist/weaveapi/script/v1/script.pb.js +1025 -0
  31. package/dist/weaveapi/script/v1/service.pb.d.ts +502 -0
  32. package/dist/weaveapi/script/v1/service.pb.js +4873 -0
  33. package/dist/weaveapi/storage/v1/service.pb.d.ts +4 -0
  34. package/dist/weaveapi/storage/v1/service.pb.js +50 -7
  35. package/dist/weaveapi/storage/v1/storage.pb.d.ts +2 -0
  36. package/dist/weaveapi/storage/v1/storage.pb.js +23 -0
  37. package/dist/weaveapi/storage/v1/vcs.pb.d.ts +75 -0
  38. package/dist/weaveapi/storage/v1/vcs.pb.js +864 -0
  39. package/dist/weaveapi/suite/v1/service.pb.d.ts +539 -0
  40. package/dist/weaveapi/suite/v1/service.pb.js +5281 -0
  41. package/dist/weaveapi/suite/v1/suite.pb.d.ts +92 -0
  42. package/dist/weaveapi/suite/v1/suite.pb.js +876 -0
  43. package/dist/weaveapi/testcase/v1/service.pb.d.ts +498 -0
  44. package/dist/weaveapi/testcase/v1/service.pb.js +4730 -0
  45. package/dist/weaveapi/testcase/v1/testcase.pb.d.ts +91 -0
  46. package/dist/weaveapi/testcase/v1/testcase.pb.js +794 -0
  47. package/dist/weaveapi/workflow/v1/service.pb.d.ts +26 -0
  48. package/dist/weaveapi/workflow/v1/service.pb.js +293 -5
  49. package/dist/weaveapi/workflow/v1/workflow.pb.d.ts +1 -0
  50. package/dist/weaveapi/workflow/v1/workflow.pb.js +17 -1
  51. package/dist/weavesql/weavedb/data_asset_sql.d.ts +206 -0
  52. package/dist/weavesql/weavedb/data_asset_sql.js +335 -0
  53. package/dist/weavesql/weavedb/input_sql.d.ts +293 -0
  54. package/dist/weavesql/weavedb/input_sql.js +500 -0
  55. package/dist/weavesql/weavedb/integration_sql.d.ts +236 -0
  56. package/dist/weavesql/weavedb/integration_sql.js +377 -0
  57. package/dist/weavesql/weavedb/project_sql.d.ts +29 -5
  58. package/dist/weavesql/weavedb/project_sql.js +73 -37
  59. package/dist/weavesql/weavedb/report_sql.d.ts +192 -0
  60. package/dist/weavesql/weavedb/report_sql.js +308 -0
  61. package/dist/weavesql/weavedb/requirement_sql.d.ts +231 -0
  62. package/dist/weavesql/weavedb/requirement_sql.js +399 -0
  63. package/dist/weavesql/weavedb/run_sql.d.ts +283 -0
  64. package/dist/weavesql/weavedb/run_sql.js +462 -0
  65. package/dist/weavesql/weavedb/suite_sql.d.ts +354 -0
  66. package/dist/weavesql/weavedb/suite_sql.js +631 -0
  67. package/dist/weavesql/weavedb/test_case_sql.d.ts +325 -0
  68. package/dist/weavesql/weavedb/test_case_sql.js +563 -0
  69. package/dist/weavesql/weavedb/test_script_sql.d.ts +354 -0
  70. package/dist/weavesql/weavedb/test_script_sql.js +605 -0
  71. package/dist/weavesql/weavedb/traceability_sql.d.ts +117 -0
  72. package/dist/weavesql/weavedb/traceability_sql.js +363 -0
  73. package/dist/weavesql/weavedb/workflow_sql.d.ts +30 -5
  74. package/dist/weavesql/weavedb/workflow_sql.js +76 -38
  75. package/package.json +1 -1
@@ -0,0 +1,70 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "weaveapi.requirement.v1";
3
+ export declare enum RequirementStatus {
4
+ REQUIREMENT_STATUS_UNSPECIFIED = 0,
5
+ REQUIREMENT_STATUS_PROPOSED = 1,
6
+ REQUIREMENT_STATUS_APPROVED = 2,
7
+ REQUIREMENT_STATUS_REJECTED = 3,
8
+ REQUIREMENT_STATUS_ARCHIVED = 4,
9
+ UNRECOGNIZED = -1
10
+ }
11
+ export declare function requirementStatusFromJSON(object: any): RequirementStatus;
12
+ export declare function requirementStatusToJSON(object: RequirementStatus): string;
13
+ export declare enum RequirementPriority {
14
+ REQUIREMENT_PRIORITY_UNSPECIFIED = 0,
15
+ REQUIREMENT_PRIORITY_LOW = 1,
16
+ REQUIREMENT_PRIORITY_MEDIUM = 2,
17
+ REQUIREMENT_PRIORITY_HIGH = 3,
18
+ REQUIREMENT_PRIORITY_CRITICAL = 4,
19
+ UNRECOGNIZED = -1
20
+ }
21
+ export declare function requirementPriorityFromJSON(object: any): RequirementPriority;
22
+ export declare function requirementPriorityToJSON(object: RequirementPriority): string;
23
+ export interface Requirement {
24
+ requirementId: string;
25
+ projectId: string;
26
+ requirementKey: string;
27
+ title: string;
28
+ description: string;
29
+ status: RequirementStatus;
30
+ priority: RequirementPriority;
31
+ confidence: number;
32
+ metadata: {
33
+ [key: string]: any;
34
+ } | undefined;
35
+ createdAt: Date | undefined;
36
+ updatedAt: Date | undefined;
37
+ archivedAt: Date | undefined;
38
+ }
39
+ export interface RequirementSourceRef {
40
+ requirementSourceRefId: string;
41
+ requirementId: string;
42
+ inputSourceId: string;
43
+ inputVersionId: string;
44
+ excerpt: string;
45
+ locator: {
46
+ [key: string]: any;
47
+ } | undefined;
48
+ createdAt: Date | undefined;
49
+ }
50
+ export declare const Requirement: MessageFns<Requirement>;
51
+ export declare const RequirementSourceRef: MessageFns<RequirementSourceRef>;
52
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
53
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
54
+ [K in keyof T]?: DeepPartial<T[K]>;
55
+ } : Partial<T>;
56
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
57
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
58
+ [K in keyof P]: Exact<P[K], I[K]>;
59
+ } & {
60
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
61
+ };
62
+ export interface MessageFns<T> {
63
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
64
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
65
+ fromJSON(object: any): T;
66
+ toJSON(message: T): unknown;
67
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
68
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
69
+ }
70
+ export {};
@@ -0,0 +1,570 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.11.2
5
+ // protoc unknown
6
+ // source: weaveapi/requirement/v1/requirement.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.RequirementSourceRef = exports.Requirement = exports.RequirementPriority = exports.RequirementStatus = exports.protobufPackage = void 0;
9
+ exports.requirementStatusFromJSON = requirementStatusFromJSON;
10
+ exports.requirementStatusToJSON = requirementStatusToJSON;
11
+ exports.requirementPriorityFromJSON = requirementPriorityFromJSON;
12
+ exports.requirementPriorityToJSON = requirementPriorityToJSON;
13
+ /* eslint-disable */
14
+ const wire_1 = require("@bufbuild/protobuf/wire");
15
+ const struct_pb_1 = require("../../../google/protobuf/struct.pb");
16
+ const timestamp_pb_1 = require("../../../google/protobuf/timestamp.pb");
17
+ exports.protobufPackage = "weaveapi.requirement.v1";
18
+ var RequirementStatus;
19
+ (function (RequirementStatus) {
20
+ RequirementStatus[RequirementStatus["REQUIREMENT_STATUS_UNSPECIFIED"] = 0] = "REQUIREMENT_STATUS_UNSPECIFIED";
21
+ RequirementStatus[RequirementStatus["REQUIREMENT_STATUS_PROPOSED"] = 1] = "REQUIREMENT_STATUS_PROPOSED";
22
+ RequirementStatus[RequirementStatus["REQUIREMENT_STATUS_APPROVED"] = 2] = "REQUIREMENT_STATUS_APPROVED";
23
+ RequirementStatus[RequirementStatus["REQUIREMENT_STATUS_REJECTED"] = 3] = "REQUIREMENT_STATUS_REJECTED";
24
+ RequirementStatus[RequirementStatus["REQUIREMENT_STATUS_ARCHIVED"] = 4] = "REQUIREMENT_STATUS_ARCHIVED";
25
+ RequirementStatus[RequirementStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
26
+ })(RequirementStatus || (exports.RequirementStatus = RequirementStatus = {}));
27
+ function requirementStatusFromJSON(object) {
28
+ switch (object) {
29
+ case 0:
30
+ case "REQUIREMENT_STATUS_UNSPECIFIED":
31
+ return RequirementStatus.REQUIREMENT_STATUS_UNSPECIFIED;
32
+ case 1:
33
+ case "REQUIREMENT_STATUS_PROPOSED":
34
+ return RequirementStatus.REQUIREMENT_STATUS_PROPOSED;
35
+ case 2:
36
+ case "REQUIREMENT_STATUS_APPROVED":
37
+ return RequirementStatus.REQUIREMENT_STATUS_APPROVED;
38
+ case 3:
39
+ case "REQUIREMENT_STATUS_REJECTED":
40
+ return RequirementStatus.REQUIREMENT_STATUS_REJECTED;
41
+ case 4:
42
+ case "REQUIREMENT_STATUS_ARCHIVED":
43
+ return RequirementStatus.REQUIREMENT_STATUS_ARCHIVED;
44
+ case -1:
45
+ case "UNRECOGNIZED":
46
+ default:
47
+ return RequirementStatus.UNRECOGNIZED;
48
+ }
49
+ }
50
+ function requirementStatusToJSON(object) {
51
+ switch (object) {
52
+ case RequirementStatus.REQUIREMENT_STATUS_UNSPECIFIED:
53
+ return "REQUIREMENT_STATUS_UNSPECIFIED";
54
+ case RequirementStatus.REQUIREMENT_STATUS_PROPOSED:
55
+ return "REQUIREMENT_STATUS_PROPOSED";
56
+ case RequirementStatus.REQUIREMENT_STATUS_APPROVED:
57
+ return "REQUIREMENT_STATUS_APPROVED";
58
+ case RequirementStatus.REQUIREMENT_STATUS_REJECTED:
59
+ return "REQUIREMENT_STATUS_REJECTED";
60
+ case RequirementStatus.REQUIREMENT_STATUS_ARCHIVED:
61
+ return "REQUIREMENT_STATUS_ARCHIVED";
62
+ case RequirementStatus.UNRECOGNIZED:
63
+ default:
64
+ return "UNRECOGNIZED";
65
+ }
66
+ }
67
+ var RequirementPriority;
68
+ (function (RequirementPriority) {
69
+ RequirementPriority[RequirementPriority["REQUIREMENT_PRIORITY_UNSPECIFIED"] = 0] = "REQUIREMENT_PRIORITY_UNSPECIFIED";
70
+ RequirementPriority[RequirementPriority["REQUIREMENT_PRIORITY_LOW"] = 1] = "REQUIREMENT_PRIORITY_LOW";
71
+ RequirementPriority[RequirementPriority["REQUIREMENT_PRIORITY_MEDIUM"] = 2] = "REQUIREMENT_PRIORITY_MEDIUM";
72
+ RequirementPriority[RequirementPriority["REQUIREMENT_PRIORITY_HIGH"] = 3] = "REQUIREMENT_PRIORITY_HIGH";
73
+ RequirementPriority[RequirementPriority["REQUIREMENT_PRIORITY_CRITICAL"] = 4] = "REQUIREMENT_PRIORITY_CRITICAL";
74
+ RequirementPriority[RequirementPriority["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
75
+ })(RequirementPriority || (exports.RequirementPriority = RequirementPriority = {}));
76
+ function requirementPriorityFromJSON(object) {
77
+ switch (object) {
78
+ case 0:
79
+ case "REQUIREMENT_PRIORITY_UNSPECIFIED":
80
+ return RequirementPriority.REQUIREMENT_PRIORITY_UNSPECIFIED;
81
+ case 1:
82
+ case "REQUIREMENT_PRIORITY_LOW":
83
+ return RequirementPriority.REQUIREMENT_PRIORITY_LOW;
84
+ case 2:
85
+ case "REQUIREMENT_PRIORITY_MEDIUM":
86
+ return RequirementPriority.REQUIREMENT_PRIORITY_MEDIUM;
87
+ case 3:
88
+ case "REQUIREMENT_PRIORITY_HIGH":
89
+ return RequirementPriority.REQUIREMENT_PRIORITY_HIGH;
90
+ case 4:
91
+ case "REQUIREMENT_PRIORITY_CRITICAL":
92
+ return RequirementPriority.REQUIREMENT_PRIORITY_CRITICAL;
93
+ case -1:
94
+ case "UNRECOGNIZED":
95
+ default:
96
+ return RequirementPriority.UNRECOGNIZED;
97
+ }
98
+ }
99
+ function requirementPriorityToJSON(object) {
100
+ switch (object) {
101
+ case RequirementPriority.REQUIREMENT_PRIORITY_UNSPECIFIED:
102
+ return "REQUIREMENT_PRIORITY_UNSPECIFIED";
103
+ case RequirementPriority.REQUIREMENT_PRIORITY_LOW:
104
+ return "REQUIREMENT_PRIORITY_LOW";
105
+ case RequirementPriority.REQUIREMENT_PRIORITY_MEDIUM:
106
+ return "REQUIREMENT_PRIORITY_MEDIUM";
107
+ case RequirementPriority.REQUIREMENT_PRIORITY_HIGH:
108
+ return "REQUIREMENT_PRIORITY_HIGH";
109
+ case RequirementPriority.REQUIREMENT_PRIORITY_CRITICAL:
110
+ return "REQUIREMENT_PRIORITY_CRITICAL";
111
+ case RequirementPriority.UNRECOGNIZED:
112
+ default:
113
+ return "UNRECOGNIZED";
114
+ }
115
+ }
116
+ function createBaseRequirement() {
117
+ return {
118
+ requirementId: "",
119
+ projectId: "",
120
+ requirementKey: "",
121
+ title: "",
122
+ description: "",
123
+ status: 0,
124
+ priority: 0,
125
+ confidence: 0,
126
+ metadata: undefined,
127
+ createdAt: undefined,
128
+ updatedAt: undefined,
129
+ archivedAt: undefined,
130
+ };
131
+ }
132
+ exports.Requirement = {
133
+ encode(message, writer = new wire_1.BinaryWriter()) {
134
+ if (message.requirementId !== "") {
135
+ writer.uint32(10).string(message.requirementId);
136
+ }
137
+ if (message.projectId !== "") {
138
+ writer.uint32(18).string(message.projectId);
139
+ }
140
+ if (message.requirementKey !== "") {
141
+ writer.uint32(26).string(message.requirementKey);
142
+ }
143
+ if (message.title !== "") {
144
+ writer.uint32(34).string(message.title);
145
+ }
146
+ if (message.description !== "") {
147
+ writer.uint32(42).string(message.description);
148
+ }
149
+ if (message.status !== 0) {
150
+ writer.uint32(48).int32(message.status);
151
+ }
152
+ if (message.priority !== 0) {
153
+ writer.uint32(56).int32(message.priority);
154
+ }
155
+ if (message.confidence !== 0) {
156
+ writer.uint32(65).double(message.confidence);
157
+ }
158
+ if (message.metadata !== undefined) {
159
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.metadata), writer.uint32(74).fork()).join();
160
+ }
161
+ if (message.createdAt !== undefined) {
162
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(82).fork()).join();
163
+ }
164
+ if (message.updatedAt !== undefined) {
165
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(90).fork()).join();
166
+ }
167
+ if (message.archivedAt !== undefined) {
168
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.archivedAt), writer.uint32(98).fork()).join();
169
+ }
170
+ return writer;
171
+ },
172
+ decode(input, length) {
173
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
174
+ const end = length === undefined ? reader.len : reader.pos + length;
175
+ const message = createBaseRequirement();
176
+ while (reader.pos < end) {
177
+ const tag = reader.uint32();
178
+ switch (tag >>> 3) {
179
+ case 1: {
180
+ if (tag !== 10) {
181
+ break;
182
+ }
183
+ message.requirementId = reader.string();
184
+ continue;
185
+ }
186
+ case 2: {
187
+ if (tag !== 18) {
188
+ break;
189
+ }
190
+ message.projectId = reader.string();
191
+ continue;
192
+ }
193
+ case 3: {
194
+ if (tag !== 26) {
195
+ break;
196
+ }
197
+ message.requirementKey = reader.string();
198
+ continue;
199
+ }
200
+ case 4: {
201
+ if (tag !== 34) {
202
+ break;
203
+ }
204
+ message.title = reader.string();
205
+ continue;
206
+ }
207
+ case 5: {
208
+ if (tag !== 42) {
209
+ break;
210
+ }
211
+ message.description = reader.string();
212
+ continue;
213
+ }
214
+ case 6: {
215
+ if (tag !== 48) {
216
+ break;
217
+ }
218
+ message.status = reader.int32();
219
+ continue;
220
+ }
221
+ case 7: {
222
+ if (tag !== 56) {
223
+ break;
224
+ }
225
+ message.priority = reader.int32();
226
+ continue;
227
+ }
228
+ case 8: {
229
+ if (tag !== 65) {
230
+ break;
231
+ }
232
+ message.confidence = reader.double();
233
+ continue;
234
+ }
235
+ case 9: {
236
+ if (tag !== 74) {
237
+ break;
238
+ }
239
+ message.metadata = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
240
+ continue;
241
+ }
242
+ case 10: {
243
+ if (tag !== 82) {
244
+ break;
245
+ }
246
+ message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
247
+ continue;
248
+ }
249
+ case 11: {
250
+ if (tag !== 90) {
251
+ break;
252
+ }
253
+ message.updatedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
254
+ continue;
255
+ }
256
+ case 12: {
257
+ if (tag !== 98) {
258
+ break;
259
+ }
260
+ message.archivedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
261
+ continue;
262
+ }
263
+ }
264
+ if ((tag & 7) === 4 || tag === 0) {
265
+ break;
266
+ }
267
+ reader.skip(tag & 7);
268
+ }
269
+ return message;
270
+ },
271
+ fromJSON(object) {
272
+ return {
273
+ requirementId: isSet(object.requirementId)
274
+ ? globalThis.String(object.requirementId)
275
+ : isSet(object.requirement_id)
276
+ ? globalThis.String(object.requirement_id)
277
+ : "",
278
+ projectId: isSet(object.projectId)
279
+ ? globalThis.String(object.projectId)
280
+ : isSet(object.project_id)
281
+ ? globalThis.String(object.project_id)
282
+ : "",
283
+ requirementKey: isSet(object.requirementKey)
284
+ ? globalThis.String(object.requirementKey)
285
+ : isSet(object.requirement_key)
286
+ ? globalThis.String(object.requirement_key)
287
+ : "",
288
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
289
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
290
+ status: isSet(object.status) ? requirementStatusFromJSON(object.status) : 0,
291
+ priority: isSet(object.priority) ? requirementPriorityFromJSON(object.priority) : 0,
292
+ confidence: isSet(object.confidence) ? globalThis.Number(object.confidence) : 0,
293
+ metadata: isObject(object.metadata) ? object.metadata : undefined,
294
+ createdAt: isSet(object.createdAt)
295
+ ? fromJsonTimestamp(object.createdAt)
296
+ : isSet(object.created_at)
297
+ ? fromJsonTimestamp(object.created_at)
298
+ : undefined,
299
+ updatedAt: isSet(object.updatedAt)
300
+ ? fromJsonTimestamp(object.updatedAt)
301
+ : isSet(object.updated_at)
302
+ ? fromJsonTimestamp(object.updated_at)
303
+ : undefined,
304
+ archivedAt: isSet(object.archivedAt)
305
+ ? fromJsonTimestamp(object.archivedAt)
306
+ : isSet(object.archived_at)
307
+ ? fromJsonTimestamp(object.archived_at)
308
+ : undefined,
309
+ };
310
+ },
311
+ toJSON(message) {
312
+ const obj = {};
313
+ if (message.requirementId !== "") {
314
+ obj.requirementId = message.requirementId;
315
+ }
316
+ if (message.projectId !== "") {
317
+ obj.projectId = message.projectId;
318
+ }
319
+ if (message.requirementKey !== "") {
320
+ obj.requirementKey = message.requirementKey;
321
+ }
322
+ if (message.title !== "") {
323
+ obj.title = message.title;
324
+ }
325
+ if (message.description !== "") {
326
+ obj.description = message.description;
327
+ }
328
+ if (message.status !== 0) {
329
+ obj.status = requirementStatusToJSON(message.status);
330
+ }
331
+ if (message.priority !== 0) {
332
+ obj.priority = requirementPriorityToJSON(message.priority);
333
+ }
334
+ if (message.confidence !== 0) {
335
+ obj.confidence = message.confidence;
336
+ }
337
+ if (message.metadata !== undefined) {
338
+ obj.metadata = message.metadata;
339
+ }
340
+ if (message.createdAt !== undefined) {
341
+ obj.createdAt = message.createdAt.toISOString();
342
+ }
343
+ if (message.updatedAt !== undefined) {
344
+ obj.updatedAt = message.updatedAt.toISOString();
345
+ }
346
+ if (message.archivedAt !== undefined) {
347
+ obj.archivedAt = message.archivedAt.toISOString();
348
+ }
349
+ return obj;
350
+ },
351
+ create(base) {
352
+ return exports.Requirement.fromPartial(base !== null && base !== void 0 ? base : {});
353
+ },
354
+ fromPartial(object) {
355
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
356
+ const message = createBaseRequirement();
357
+ message.requirementId = (_a = object.requirementId) !== null && _a !== void 0 ? _a : "";
358
+ message.projectId = (_b = object.projectId) !== null && _b !== void 0 ? _b : "";
359
+ message.requirementKey = (_c = object.requirementKey) !== null && _c !== void 0 ? _c : "";
360
+ message.title = (_d = object.title) !== null && _d !== void 0 ? _d : "";
361
+ message.description = (_e = object.description) !== null && _e !== void 0 ? _e : "";
362
+ message.status = (_f = object.status) !== null && _f !== void 0 ? _f : 0;
363
+ message.priority = (_g = object.priority) !== null && _g !== void 0 ? _g : 0;
364
+ message.confidence = (_h = object.confidence) !== null && _h !== void 0 ? _h : 0;
365
+ message.metadata = (_j = object.metadata) !== null && _j !== void 0 ? _j : undefined;
366
+ message.createdAt = (_k = object.createdAt) !== null && _k !== void 0 ? _k : undefined;
367
+ message.updatedAt = (_l = object.updatedAt) !== null && _l !== void 0 ? _l : undefined;
368
+ message.archivedAt = (_m = object.archivedAt) !== null && _m !== void 0 ? _m : undefined;
369
+ return message;
370
+ },
371
+ };
372
+ function createBaseRequirementSourceRef() {
373
+ return {
374
+ requirementSourceRefId: "",
375
+ requirementId: "",
376
+ inputSourceId: "",
377
+ inputVersionId: "",
378
+ excerpt: "",
379
+ locator: undefined,
380
+ createdAt: undefined,
381
+ };
382
+ }
383
+ exports.RequirementSourceRef = {
384
+ encode(message, writer = new wire_1.BinaryWriter()) {
385
+ if (message.requirementSourceRefId !== "") {
386
+ writer.uint32(10).string(message.requirementSourceRefId);
387
+ }
388
+ if (message.requirementId !== "") {
389
+ writer.uint32(18).string(message.requirementId);
390
+ }
391
+ if (message.inputSourceId !== "") {
392
+ writer.uint32(26).string(message.inputSourceId);
393
+ }
394
+ if (message.inputVersionId !== "") {
395
+ writer.uint32(34).string(message.inputVersionId);
396
+ }
397
+ if (message.excerpt !== "") {
398
+ writer.uint32(42).string(message.excerpt);
399
+ }
400
+ if (message.locator !== undefined) {
401
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.locator), writer.uint32(50).fork()).join();
402
+ }
403
+ if (message.createdAt !== undefined) {
404
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(58).fork()).join();
405
+ }
406
+ return writer;
407
+ },
408
+ decode(input, length) {
409
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
410
+ const end = length === undefined ? reader.len : reader.pos + length;
411
+ const message = createBaseRequirementSourceRef();
412
+ while (reader.pos < end) {
413
+ const tag = reader.uint32();
414
+ switch (tag >>> 3) {
415
+ case 1: {
416
+ if (tag !== 10) {
417
+ break;
418
+ }
419
+ message.requirementSourceRefId = reader.string();
420
+ continue;
421
+ }
422
+ case 2: {
423
+ if (tag !== 18) {
424
+ break;
425
+ }
426
+ message.requirementId = reader.string();
427
+ continue;
428
+ }
429
+ case 3: {
430
+ if (tag !== 26) {
431
+ break;
432
+ }
433
+ message.inputSourceId = reader.string();
434
+ continue;
435
+ }
436
+ case 4: {
437
+ if (tag !== 34) {
438
+ break;
439
+ }
440
+ message.inputVersionId = reader.string();
441
+ continue;
442
+ }
443
+ case 5: {
444
+ if (tag !== 42) {
445
+ break;
446
+ }
447
+ message.excerpt = reader.string();
448
+ continue;
449
+ }
450
+ case 6: {
451
+ if (tag !== 50) {
452
+ break;
453
+ }
454
+ message.locator = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
455
+ continue;
456
+ }
457
+ case 7: {
458
+ if (tag !== 58) {
459
+ break;
460
+ }
461
+ message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
462
+ continue;
463
+ }
464
+ }
465
+ if ((tag & 7) === 4 || tag === 0) {
466
+ break;
467
+ }
468
+ reader.skip(tag & 7);
469
+ }
470
+ return message;
471
+ },
472
+ fromJSON(object) {
473
+ return {
474
+ requirementSourceRefId: isSet(object.requirementSourceRefId)
475
+ ? globalThis.String(object.requirementSourceRefId)
476
+ : isSet(object.requirement_source_ref_id)
477
+ ? globalThis.String(object.requirement_source_ref_id)
478
+ : "",
479
+ requirementId: isSet(object.requirementId)
480
+ ? globalThis.String(object.requirementId)
481
+ : isSet(object.requirement_id)
482
+ ? globalThis.String(object.requirement_id)
483
+ : "",
484
+ inputSourceId: isSet(object.inputSourceId)
485
+ ? globalThis.String(object.inputSourceId)
486
+ : isSet(object.input_source_id)
487
+ ? globalThis.String(object.input_source_id)
488
+ : "",
489
+ inputVersionId: isSet(object.inputVersionId)
490
+ ? globalThis.String(object.inputVersionId)
491
+ : isSet(object.input_version_id)
492
+ ? globalThis.String(object.input_version_id)
493
+ : "",
494
+ excerpt: isSet(object.excerpt) ? globalThis.String(object.excerpt) : "",
495
+ locator: isObject(object.locator) ? object.locator : undefined,
496
+ createdAt: isSet(object.createdAt)
497
+ ? fromJsonTimestamp(object.createdAt)
498
+ : isSet(object.created_at)
499
+ ? fromJsonTimestamp(object.created_at)
500
+ : undefined,
501
+ };
502
+ },
503
+ toJSON(message) {
504
+ const obj = {};
505
+ if (message.requirementSourceRefId !== "") {
506
+ obj.requirementSourceRefId = message.requirementSourceRefId;
507
+ }
508
+ if (message.requirementId !== "") {
509
+ obj.requirementId = message.requirementId;
510
+ }
511
+ if (message.inputSourceId !== "") {
512
+ obj.inputSourceId = message.inputSourceId;
513
+ }
514
+ if (message.inputVersionId !== "") {
515
+ obj.inputVersionId = message.inputVersionId;
516
+ }
517
+ if (message.excerpt !== "") {
518
+ obj.excerpt = message.excerpt;
519
+ }
520
+ if (message.locator !== undefined) {
521
+ obj.locator = message.locator;
522
+ }
523
+ if (message.createdAt !== undefined) {
524
+ obj.createdAt = message.createdAt.toISOString();
525
+ }
526
+ return obj;
527
+ },
528
+ create(base) {
529
+ return exports.RequirementSourceRef.fromPartial(base !== null && base !== void 0 ? base : {});
530
+ },
531
+ fromPartial(object) {
532
+ var _a, _b, _c, _d, _e, _f, _g;
533
+ const message = createBaseRequirementSourceRef();
534
+ message.requirementSourceRefId = (_a = object.requirementSourceRefId) !== null && _a !== void 0 ? _a : "";
535
+ message.requirementId = (_b = object.requirementId) !== null && _b !== void 0 ? _b : "";
536
+ message.inputSourceId = (_c = object.inputSourceId) !== null && _c !== void 0 ? _c : "";
537
+ message.inputVersionId = (_d = object.inputVersionId) !== null && _d !== void 0 ? _d : "";
538
+ message.excerpt = (_e = object.excerpt) !== null && _e !== void 0 ? _e : "";
539
+ message.locator = (_f = object.locator) !== null && _f !== void 0 ? _f : undefined;
540
+ message.createdAt = (_g = object.createdAt) !== null && _g !== void 0 ? _g : undefined;
541
+ return message;
542
+ },
543
+ };
544
+ function toTimestamp(date) {
545
+ const seconds = Math.trunc(date.getTime() / 1000);
546
+ const nanos = (date.getTime() % 1000) * 1000000;
547
+ return { seconds, nanos };
548
+ }
549
+ function fromTimestamp(t) {
550
+ let millis = (t.seconds || 0) * 1000;
551
+ millis += (t.nanos || 0) / 1000000;
552
+ return new globalThis.Date(millis);
553
+ }
554
+ function fromJsonTimestamp(o) {
555
+ if (o instanceof globalThis.Date) {
556
+ return o;
557
+ }
558
+ else if (typeof o === "string") {
559
+ return new globalThis.Date(o);
560
+ }
561
+ else {
562
+ return fromTimestamp(timestamp_pb_1.Timestamp.fromJSON(o));
563
+ }
564
+ }
565
+ function isObject(value) {
566
+ return typeof value === "object" && value !== null;
567
+ }
568
+ function isSet(value) {
569
+ return value !== null && value !== undefined;
570
+ }