weave-typescript 0.13.0 → 0.15.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 (121) hide show
  1. package/dist/index.d.ts +9 -16
  2. package/dist/index.js +13 -21
  3. package/dist/weaveapi/project/v1/project.pb.d.ts +69 -5
  4. package/dist/weaveapi/project/v1/project.pb.js +787 -62
  5. package/dist/weaveapi/project/v1/service.pb.d.ts +110 -69
  6. package/dist/weaveapi/project/v1/service.pb.js +1056 -392
  7. package/dist/weaveapi/task/v1/service.pb.d.ts +172 -0
  8. package/dist/weaveapi/task/v1/service.pb.js +1436 -0
  9. package/dist/weaveapi/task/v1/task.pb.d.ts +85 -0
  10. package/dist/weaveapi/task/v1/task.pb.js +802 -0
  11. package/dist/weavesql/atcdb/event_sql.d.ts +10 -0
  12. package/dist/weavesql/atcdb/event_sql.js +11 -1
  13. package/dist/weavesql/atcdb/mailbox_sql.d.ts +2 -2
  14. package/dist/weavesql/atcdb/mailbox_sql.js +1 -1
  15. package/dist/weavesql/weavedb/project_sql.d.ts +164 -41
  16. package/dist/weavesql/weavedb/project_sql.js +398 -103
  17. package/dist/weavesql/weavedb/task_sql.d.ts +210 -0
  18. package/dist/weavesql/weavedb/task_sql.js +430 -0
  19. package/package.json +2 -2
  20. package/dist/weaveapi/auth/v1/service.pb.d.ts +0 -709
  21. package/dist/weaveapi/auth/v1/service.pb.js +0 -5058
  22. package/dist/weaveapi/auth/v1/session.pb.d.ts +0 -43
  23. package/dist/weaveapi/auth/v1/session.pb.js +0 -308
  24. package/dist/weaveapi/auth/v1/usage.pb.d.ts +0 -76
  25. package/dist/weaveapi/auth/v1/usage.pb.js +0 -849
  26. package/dist/weaveapi/auth/v1/user.pb.d.ts +0 -141
  27. package/dist/weaveapi/auth/v1/user.pb.js +0 -1625
  28. package/dist/weaveapi/data/v1/data.pb.d.ts +0 -54
  29. package/dist/weaveapi/data/v1/data.pb.js +0 -411
  30. package/dist/weaveapi/data/v1/service.pb.d.ts +0 -296
  31. package/dist/weaveapi/data/v1/service.pb.js +0 -2777
  32. package/dist/weaveapi/generate/v1/configuration.pb.d.ts +0 -122
  33. package/dist/weaveapi/generate/v1/configuration.pb.js +0 -877
  34. package/dist/weaveapi/generate/v1/generate.pb.d.ts +0 -48
  35. package/dist/weaveapi/generate/v1/generate.pb.js +0 -367
  36. package/dist/weaveapi/generate/v1/service.pb.d.ts +0 -173
  37. package/dist/weaveapi/generate/v1/service.pb.js +0 -1207
  38. package/dist/weaveapi/input/v1/input.pb.d.ts +0 -77
  39. package/dist/weaveapi/input/v1/input.pb.js +0 -632
  40. package/dist/weaveapi/input/v1/service.pb.d.ts +0 -390
  41. package/dist/weaveapi/input/v1/service.pb.js +0 -3610
  42. package/dist/weaveapi/integration/v1/integration.pb.d.ts +0 -67
  43. package/dist/weaveapi/integration/v1/integration.pb.js +0 -486
  44. package/dist/weaveapi/integration/v1/service.pb.d.ts +0 -318
  45. package/dist/weaveapi/integration/v1/service.pb.js +0 -2992
  46. package/dist/weaveapi/llmx/v1/architecture.pb.d.ts +0 -665
  47. package/dist/weaveapi/llmx/v1/architecture.pb.js +0 -3028
  48. package/dist/weaveapi/llmx/v1/capabilities.pb.d.ts +0 -709
  49. package/dist/weaveapi/llmx/v1/capabilities.pb.js +0 -3458
  50. package/dist/weaveapi/llmx/v1/model.pb.d.ts +0 -375
  51. package/dist/weaveapi/llmx/v1/model.pb.js +0 -1472
  52. package/dist/weaveapi/llmx/v1/pricing.pb.d.ts +0 -340
  53. package/dist/weaveapi/llmx/v1/pricing.pb.js +0 -974
  54. package/dist/weaveapi/llmx/v1/provider.pb.d.ts +0 -72
  55. package/dist/weaveapi/llmx/v1/provider.pb.js +0 -218
  56. package/dist/weaveapi/llmx/v1/service.pb.d.ts +0 -683
  57. package/dist/weaveapi/llmx/v1/service.pb.js +0 -5311
  58. package/dist/weaveapi/mcpregistry/v1/server.pb.d.ts +0 -54
  59. package/dist/weaveapi/mcpregistry/v1/server.pb.js +0 -436
  60. package/dist/weaveapi/mcpregistry/v1/service.pb.d.ts +0 -171
  61. package/dist/weaveapi/mcpregistry/v1/service.pb.js +0 -963
  62. package/dist/weaveapi/payment/v1/invoice.pb.d.ts +0 -92
  63. package/dist/weaveapi/payment/v1/invoice.pb.js +0 -998
  64. package/dist/weaveapi/payment/v1/service.pb.d.ts +0 -662
  65. package/dist/weaveapi/payment/v1/service.pb.js +0 -5395
  66. package/dist/weaveapi/payment/v1/subscription.pb.d.ts +0 -165
  67. package/dist/weaveapi/payment/v1/subscription.pb.js +0 -1930
  68. package/dist/weaveapi/report/v1/report.pb.d.ts +0 -81
  69. package/dist/weaveapi/report/v1/report.pb.js +0 -678
  70. package/dist/weaveapi/report/v1/service.pb.d.ts +0 -194
  71. package/dist/weaveapi/report/v1/service.pb.js +0 -1923
  72. package/dist/weaveapi/requirement/v1/requirement.pb.d.ts +0 -70
  73. package/dist/weaveapi/requirement/v1/requirement.pb.js +0 -570
  74. package/dist/weaveapi/requirement/v1/service.pb.d.ts +0 -390
  75. package/dist/weaveapi/requirement/v1/service.pb.js +0 -3636
  76. package/dist/weaveapi/run/v1/run.pb.d.ts +0 -117
  77. package/dist/weaveapi/run/v1/run.pb.js +0 -1155
  78. package/dist/weaveapi/run/v1/service.pb.d.ts +0 -229
  79. package/dist/weaveapi/run/v1/service.pb.js +0 -2426
  80. package/dist/weaveapi/script/v1/script.pb.d.ts +0 -102
  81. package/dist/weaveapi/script/v1/script.pb.js +0 -1025
  82. package/dist/weaveapi/script/v1/service.pb.d.ts +0 -502
  83. package/dist/weaveapi/script/v1/service.pb.js +0 -4871
  84. package/dist/weaveapi/storage/v1/auth.pb.d.ts +0 -27
  85. package/dist/weaveapi/storage/v1/auth.pb.js +0 -110
  86. package/dist/weaveapi/storage/v1/nosql_database.pb.d.ts +0 -91
  87. package/dist/weaveapi/storage/v1/nosql_database.pb.js +0 -1056
  88. package/dist/weaveapi/storage/v1/object_store.pb.d.ts +0 -49
  89. package/dist/weaveapi/storage/v1/object_store.pb.js +0 -441
  90. package/dist/weaveapi/storage/v1/service.pb.d.ts +0 -245
  91. package/dist/weaveapi/storage/v1/service.pb.js +0 -1339
  92. package/dist/weaveapi/storage/v1/sql_database.pb.d.ts +0 -98
  93. package/dist/weaveapi/storage/v1/sql_database.pb.js +0 -1184
  94. package/dist/weaveapi/storage/v1/storage.pb.d.ts +0 -35
  95. package/dist/weaveapi/storage/v1/storage.pb.js +0 -198
  96. package/dist/weaveapi/storage/v1/vcs.pb.d.ts +0 -75
  97. package/dist/weaveapi/storage/v1/vcs.pb.js +0 -864
  98. package/dist/weaveapi/suite/v1/service.pb.d.ts +0 -539
  99. package/dist/weaveapi/suite/v1/service.pb.js +0 -5279
  100. package/dist/weaveapi/suite/v1/suite.pb.d.ts +0 -92
  101. package/dist/weaveapi/suite/v1/suite.pb.js +0 -876
  102. package/dist/weaveapi/synthesize/v1/dataset.pb.d.ts +0 -68
  103. package/dist/weaveapi/synthesize/v1/dataset.pb.js +0 -460
  104. package/dist/weaveapi/synthesize/v1/inline_data.pb.d.ts +0 -45
  105. package/dist/weaveapi/synthesize/v1/inline_data.pb.js +0 -166
  106. package/dist/weaveapi/synthesize/v1/relationship.pb.d.ts +0 -58
  107. package/dist/weaveapi/synthesize/v1/relationship.pb.js +0 -253
  108. package/dist/weaveapi/synthesize/v1/service.pb.d.ts +0 -144
  109. package/dist/weaveapi/synthesize/v1/service.pb.js +0 -937
  110. package/dist/weaveapi/synthesize/v1/training.pb.d.ts +0 -58
  111. package/dist/weaveapi/synthesize/v1/training.pb.js +0 -386
  112. package/dist/weaveapi/testcase/v1/service.pb.d.ts +0 -498
  113. package/dist/weaveapi/testcase/v1/service.pb.js +0 -4728
  114. package/dist/weaveapi/testcase/v1/testcase.pb.d.ts +0 -91
  115. package/dist/weaveapi/testcase/v1/testcase.pb.js +0 -794
  116. package/dist/weaveapi/workflow/v1/service.pb.d.ts +0 -261
  117. package/dist/weaveapi/workflow/v1/service.pb.js +0 -2120
  118. package/dist/weaveapi/workflow/v1/workflow.pb.d.ts +0 -77
  119. package/dist/weaveapi/workflow/v1/workflow.pb.js +0 -555
  120. package/dist/weaveapi/workflowdata/v1/service.pb.d.ts +0 -295
  121. package/dist/weaveapi/workflowdata/v1/service.pb.js +0 -2612
@@ -1,1025 +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.6
5
- // protoc unknown
6
- // source: weaveapi/script/v1/script.proto
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ScriptBinding = exports.TestScriptVersion = exports.TestScript = exports.ScriptSourceLocationType = exports.ScriptStatus = exports.ScriptLanguage = exports.protobufPackage = void 0;
9
- exports.scriptLanguageFromJSON = scriptLanguageFromJSON;
10
- exports.scriptLanguageToJSON = scriptLanguageToJSON;
11
- exports.scriptStatusFromJSON = scriptStatusFromJSON;
12
- exports.scriptStatusToJSON = scriptStatusToJSON;
13
- exports.scriptSourceLocationTypeFromJSON = scriptSourceLocationTypeFromJSON;
14
- exports.scriptSourceLocationTypeToJSON = scriptSourceLocationTypeToJSON;
15
- /* eslint-disable */
16
- const wire_1 = require("@bufbuild/protobuf/wire");
17
- const struct_pb_1 = require("../../../google/protobuf/struct.pb");
18
- const timestamp_pb_1 = require("../../../google/protobuf/timestamp.pb");
19
- exports.protobufPackage = "weaveapi.script.v1";
20
- var ScriptLanguage;
21
- (function (ScriptLanguage) {
22
- ScriptLanguage[ScriptLanguage["SCRIPT_LANGUAGE_UNSPECIFIED"] = 0] = "SCRIPT_LANGUAGE_UNSPECIFIED";
23
- ScriptLanguage[ScriptLanguage["SCRIPT_LANGUAGE_JAVASCRIPT"] = 1] = "SCRIPT_LANGUAGE_JAVASCRIPT";
24
- ScriptLanguage[ScriptLanguage["SCRIPT_LANGUAGE_TYPESCRIPT"] = 2] = "SCRIPT_LANGUAGE_TYPESCRIPT";
25
- ScriptLanguage[ScriptLanguage["SCRIPT_LANGUAGE_PYTHON"] = 3] = "SCRIPT_LANGUAGE_PYTHON";
26
- ScriptLanguage[ScriptLanguage["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
27
- })(ScriptLanguage || (exports.ScriptLanguage = ScriptLanguage = {}));
28
- function scriptLanguageFromJSON(object) {
29
- switch (object) {
30
- case 0:
31
- case "SCRIPT_LANGUAGE_UNSPECIFIED":
32
- return ScriptLanguage.SCRIPT_LANGUAGE_UNSPECIFIED;
33
- case 1:
34
- case "SCRIPT_LANGUAGE_JAVASCRIPT":
35
- return ScriptLanguage.SCRIPT_LANGUAGE_JAVASCRIPT;
36
- case 2:
37
- case "SCRIPT_LANGUAGE_TYPESCRIPT":
38
- return ScriptLanguage.SCRIPT_LANGUAGE_TYPESCRIPT;
39
- case 3:
40
- case "SCRIPT_LANGUAGE_PYTHON":
41
- return ScriptLanguage.SCRIPT_LANGUAGE_PYTHON;
42
- case -1:
43
- case "UNRECOGNIZED":
44
- default:
45
- return ScriptLanguage.UNRECOGNIZED;
46
- }
47
- }
48
- function scriptLanguageToJSON(object) {
49
- switch (object) {
50
- case ScriptLanguage.SCRIPT_LANGUAGE_UNSPECIFIED:
51
- return "SCRIPT_LANGUAGE_UNSPECIFIED";
52
- case ScriptLanguage.SCRIPT_LANGUAGE_JAVASCRIPT:
53
- return "SCRIPT_LANGUAGE_JAVASCRIPT";
54
- case ScriptLanguage.SCRIPT_LANGUAGE_TYPESCRIPT:
55
- return "SCRIPT_LANGUAGE_TYPESCRIPT";
56
- case ScriptLanguage.SCRIPT_LANGUAGE_PYTHON:
57
- return "SCRIPT_LANGUAGE_PYTHON";
58
- case ScriptLanguage.UNRECOGNIZED:
59
- default:
60
- return "UNRECOGNIZED";
61
- }
62
- }
63
- var ScriptStatus;
64
- (function (ScriptStatus) {
65
- ScriptStatus[ScriptStatus["SCRIPT_STATUS_UNSPECIFIED"] = 0] = "SCRIPT_STATUS_UNSPECIFIED";
66
- ScriptStatus[ScriptStatus["SCRIPT_STATUS_GENERATED"] = 1] = "SCRIPT_STATUS_GENERATED";
67
- ScriptStatus[ScriptStatus["SCRIPT_STATUS_EDITED"] = 2] = "SCRIPT_STATUS_EDITED";
68
- ScriptStatus[ScriptStatus["SCRIPT_STATUS_APPROVED"] = 3] = "SCRIPT_STATUS_APPROVED";
69
- ScriptStatus[ScriptStatus["SCRIPT_STATUS_DEPRECATED"] = 4] = "SCRIPT_STATUS_DEPRECATED";
70
- ScriptStatus[ScriptStatus["SCRIPT_STATUS_ARCHIVED"] = 5] = "SCRIPT_STATUS_ARCHIVED";
71
- ScriptStatus[ScriptStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
72
- })(ScriptStatus || (exports.ScriptStatus = ScriptStatus = {}));
73
- function scriptStatusFromJSON(object) {
74
- switch (object) {
75
- case 0:
76
- case "SCRIPT_STATUS_UNSPECIFIED":
77
- return ScriptStatus.SCRIPT_STATUS_UNSPECIFIED;
78
- case 1:
79
- case "SCRIPT_STATUS_GENERATED":
80
- return ScriptStatus.SCRIPT_STATUS_GENERATED;
81
- case 2:
82
- case "SCRIPT_STATUS_EDITED":
83
- return ScriptStatus.SCRIPT_STATUS_EDITED;
84
- case 3:
85
- case "SCRIPT_STATUS_APPROVED":
86
- return ScriptStatus.SCRIPT_STATUS_APPROVED;
87
- case 4:
88
- case "SCRIPT_STATUS_DEPRECATED":
89
- return ScriptStatus.SCRIPT_STATUS_DEPRECATED;
90
- case 5:
91
- case "SCRIPT_STATUS_ARCHIVED":
92
- return ScriptStatus.SCRIPT_STATUS_ARCHIVED;
93
- case -1:
94
- case "UNRECOGNIZED":
95
- default:
96
- return ScriptStatus.UNRECOGNIZED;
97
- }
98
- }
99
- function scriptStatusToJSON(object) {
100
- switch (object) {
101
- case ScriptStatus.SCRIPT_STATUS_UNSPECIFIED:
102
- return "SCRIPT_STATUS_UNSPECIFIED";
103
- case ScriptStatus.SCRIPT_STATUS_GENERATED:
104
- return "SCRIPT_STATUS_GENERATED";
105
- case ScriptStatus.SCRIPT_STATUS_EDITED:
106
- return "SCRIPT_STATUS_EDITED";
107
- case ScriptStatus.SCRIPT_STATUS_APPROVED:
108
- return "SCRIPT_STATUS_APPROVED";
109
- case ScriptStatus.SCRIPT_STATUS_DEPRECATED:
110
- return "SCRIPT_STATUS_DEPRECATED";
111
- case ScriptStatus.SCRIPT_STATUS_ARCHIVED:
112
- return "SCRIPT_STATUS_ARCHIVED";
113
- case ScriptStatus.UNRECOGNIZED:
114
- default:
115
- return "UNRECOGNIZED";
116
- }
117
- }
118
- var ScriptSourceLocationType;
119
- (function (ScriptSourceLocationType) {
120
- ScriptSourceLocationType[ScriptSourceLocationType["SCRIPT_SOURCE_LOCATION_TYPE_UNSPECIFIED"] = 0] = "SCRIPT_SOURCE_LOCATION_TYPE_UNSPECIFIED";
121
- ScriptSourceLocationType[ScriptSourceLocationType["SCRIPT_SOURCE_LOCATION_TYPE_INLINE_DB"] = 1] = "SCRIPT_SOURCE_LOCATION_TYPE_INLINE_DB";
122
- ScriptSourceLocationType[ScriptSourceLocationType["SCRIPT_SOURCE_LOCATION_TYPE_STORAGE_CONNECTION"] = 2] = "SCRIPT_SOURCE_LOCATION_TYPE_STORAGE_CONNECTION";
123
- ScriptSourceLocationType[ScriptSourceLocationType["SCRIPT_SOURCE_LOCATION_TYPE_VCS"] = 3] = "SCRIPT_SOURCE_LOCATION_TYPE_VCS";
124
- ScriptSourceLocationType[ScriptSourceLocationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
125
- })(ScriptSourceLocationType || (exports.ScriptSourceLocationType = ScriptSourceLocationType = {}));
126
- function scriptSourceLocationTypeFromJSON(object) {
127
- switch (object) {
128
- case 0:
129
- case "SCRIPT_SOURCE_LOCATION_TYPE_UNSPECIFIED":
130
- return ScriptSourceLocationType.SCRIPT_SOURCE_LOCATION_TYPE_UNSPECIFIED;
131
- case 1:
132
- case "SCRIPT_SOURCE_LOCATION_TYPE_INLINE_DB":
133
- return ScriptSourceLocationType.SCRIPT_SOURCE_LOCATION_TYPE_INLINE_DB;
134
- case 2:
135
- case "SCRIPT_SOURCE_LOCATION_TYPE_STORAGE_CONNECTION":
136
- return ScriptSourceLocationType.SCRIPT_SOURCE_LOCATION_TYPE_STORAGE_CONNECTION;
137
- case 3:
138
- case "SCRIPT_SOURCE_LOCATION_TYPE_VCS":
139
- return ScriptSourceLocationType.SCRIPT_SOURCE_LOCATION_TYPE_VCS;
140
- case -1:
141
- case "UNRECOGNIZED":
142
- default:
143
- return ScriptSourceLocationType.UNRECOGNIZED;
144
- }
145
- }
146
- function scriptSourceLocationTypeToJSON(object) {
147
- switch (object) {
148
- case ScriptSourceLocationType.SCRIPT_SOURCE_LOCATION_TYPE_UNSPECIFIED:
149
- return "SCRIPT_SOURCE_LOCATION_TYPE_UNSPECIFIED";
150
- case ScriptSourceLocationType.SCRIPT_SOURCE_LOCATION_TYPE_INLINE_DB:
151
- return "SCRIPT_SOURCE_LOCATION_TYPE_INLINE_DB";
152
- case ScriptSourceLocationType.SCRIPT_SOURCE_LOCATION_TYPE_STORAGE_CONNECTION:
153
- return "SCRIPT_SOURCE_LOCATION_TYPE_STORAGE_CONNECTION";
154
- case ScriptSourceLocationType.SCRIPT_SOURCE_LOCATION_TYPE_VCS:
155
- return "SCRIPT_SOURCE_LOCATION_TYPE_VCS";
156
- case ScriptSourceLocationType.UNRECOGNIZED:
157
- default:
158
- return "UNRECOGNIZED";
159
- }
160
- }
161
- function createBaseTestScript() {
162
- return {
163
- testScriptId: "",
164
- projectId: "",
165
- testCaseId: "",
166
- name: "",
167
- description: "",
168
- language: 0,
169
- framework: "",
170
- status: 0,
171
- currentTestScriptVersionId: "",
172
- metadata: undefined,
173
- createdAt: undefined,
174
- updatedAt: undefined,
175
- archivedAt: undefined,
176
- };
177
- }
178
- exports.TestScript = {
179
- encode(message, writer = new wire_1.BinaryWriter()) {
180
- if (message.testScriptId !== "") {
181
- writer.uint32(10).string(message.testScriptId);
182
- }
183
- if (message.projectId !== "") {
184
- writer.uint32(18).string(message.projectId);
185
- }
186
- if (message.testCaseId !== "") {
187
- writer.uint32(26).string(message.testCaseId);
188
- }
189
- if (message.name !== "") {
190
- writer.uint32(34).string(message.name);
191
- }
192
- if (message.description !== "") {
193
- writer.uint32(42).string(message.description);
194
- }
195
- if (message.language !== 0) {
196
- writer.uint32(48).int32(message.language);
197
- }
198
- if (message.framework !== "") {
199
- writer.uint32(58).string(message.framework);
200
- }
201
- if (message.status !== 0) {
202
- writer.uint32(64).int32(message.status);
203
- }
204
- if (message.currentTestScriptVersionId !== "") {
205
- writer.uint32(74).string(message.currentTestScriptVersionId);
206
- }
207
- if (message.metadata !== undefined) {
208
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.metadata), writer.uint32(82).fork()).join();
209
- }
210
- if (message.createdAt !== undefined) {
211
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(90).fork()).join();
212
- }
213
- if (message.updatedAt !== undefined) {
214
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(98).fork()).join();
215
- }
216
- if (message.archivedAt !== undefined) {
217
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.archivedAt), writer.uint32(106).fork()).join();
218
- }
219
- return writer;
220
- },
221
- decode(input, length) {
222
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
223
- const end = length === undefined ? reader.len : reader.pos + length;
224
- const message = createBaseTestScript();
225
- while (reader.pos < end) {
226
- const tag = reader.uint32();
227
- switch (tag >>> 3) {
228
- case 1: {
229
- if (tag !== 10) {
230
- break;
231
- }
232
- message.testScriptId = reader.string();
233
- continue;
234
- }
235
- case 2: {
236
- if (tag !== 18) {
237
- break;
238
- }
239
- message.projectId = reader.string();
240
- continue;
241
- }
242
- case 3: {
243
- if (tag !== 26) {
244
- break;
245
- }
246
- message.testCaseId = reader.string();
247
- continue;
248
- }
249
- case 4: {
250
- if (tag !== 34) {
251
- break;
252
- }
253
- message.name = reader.string();
254
- continue;
255
- }
256
- case 5: {
257
- if (tag !== 42) {
258
- break;
259
- }
260
- message.description = reader.string();
261
- continue;
262
- }
263
- case 6: {
264
- if (tag !== 48) {
265
- break;
266
- }
267
- message.language = reader.int32();
268
- continue;
269
- }
270
- case 7: {
271
- if (tag !== 58) {
272
- break;
273
- }
274
- message.framework = reader.string();
275
- continue;
276
- }
277
- case 8: {
278
- if (tag !== 64) {
279
- break;
280
- }
281
- message.status = reader.int32();
282
- continue;
283
- }
284
- case 9: {
285
- if (tag !== 74) {
286
- break;
287
- }
288
- message.currentTestScriptVersionId = reader.string();
289
- continue;
290
- }
291
- case 10: {
292
- if (tag !== 82) {
293
- break;
294
- }
295
- message.metadata = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
296
- continue;
297
- }
298
- case 11: {
299
- if (tag !== 90) {
300
- break;
301
- }
302
- message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
303
- continue;
304
- }
305
- case 12: {
306
- if (tag !== 98) {
307
- break;
308
- }
309
- message.updatedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
310
- continue;
311
- }
312
- case 13: {
313
- if (tag !== 106) {
314
- break;
315
- }
316
- message.archivedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
317
- continue;
318
- }
319
- }
320
- if ((tag & 7) === 4 || tag === 0) {
321
- break;
322
- }
323
- reader.skip(tag & 7);
324
- }
325
- return message;
326
- },
327
- fromJSON(object) {
328
- return {
329
- testScriptId: isSet(object.testScriptId)
330
- ? globalThis.String(object.testScriptId)
331
- : isSet(object.test_script_id)
332
- ? globalThis.String(object.test_script_id)
333
- : "",
334
- projectId: isSet(object.projectId)
335
- ? globalThis.String(object.projectId)
336
- : isSet(object.project_id)
337
- ? globalThis.String(object.project_id)
338
- : "",
339
- testCaseId: isSet(object.testCaseId)
340
- ? globalThis.String(object.testCaseId)
341
- : isSet(object.test_case_id)
342
- ? globalThis.String(object.test_case_id)
343
- : "",
344
- name: isSet(object.name) ? globalThis.String(object.name) : "",
345
- description: isSet(object.description) ? globalThis.String(object.description) : "",
346
- language: isSet(object.language) ? scriptLanguageFromJSON(object.language) : 0,
347
- framework: isSet(object.framework) ? globalThis.String(object.framework) : "",
348
- status: isSet(object.status) ? scriptStatusFromJSON(object.status) : 0,
349
- currentTestScriptVersionId: isSet(object.currentTestScriptVersionId)
350
- ? globalThis.String(object.currentTestScriptVersionId)
351
- : isSet(object.current_test_script_version_id)
352
- ? globalThis.String(object.current_test_script_version_id)
353
- : "",
354
- metadata: isObject(object.metadata) ? object.metadata : undefined,
355
- createdAt: isSet(object.createdAt)
356
- ? fromJsonTimestamp(object.createdAt)
357
- : isSet(object.created_at)
358
- ? fromJsonTimestamp(object.created_at)
359
- : undefined,
360
- updatedAt: isSet(object.updatedAt)
361
- ? fromJsonTimestamp(object.updatedAt)
362
- : isSet(object.updated_at)
363
- ? fromJsonTimestamp(object.updated_at)
364
- : undefined,
365
- archivedAt: isSet(object.archivedAt)
366
- ? fromJsonTimestamp(object.archivedAt)
367
- : isSet(object.archived_at)
368
- ? fromJsonTimestamp(object.archived_at)
369
- : undefined,
370
- };
371
- },
372
- toJSON(message) {
373
- const obj = {};
374
- if (message.testScriptId !== "") {
375
- obj.testScriptId = message.testScriptId;
376
- }
377
- if (message.projectId !== "") {
378
- obj.projectId = message.projectId;
379
- }
380
- if (message.testCaseId !== "") {
381
- obj.testCaseId = message.testCaseId;
382
- }
383
- if (message.name !== "") {
384
- obj.name = message.name;
385
- }
386
- if (message.description !== "") {
387
- obj.description = message.description;
388
- }
389
- if (message.language !== 0) {
390
- obj.language = scriptLanguageToJSON(message.language);
391
- }
392
- if (message.framework !== "") {
393
- obj.framework = message.framework;
394
- }
395
- if (message.status !== 0) {
396
- obj.status = scriptStatusToJSON(message.status);
397
- }
398
- if (message.currentTestScriptVersionId !== "") {
399
- obj.currentTestScriptVersionId = message.currentTestScriptVersionId;
400
- }
401
- if (message.metadata !== undefined) {
402
- obj.metadata = message.metadata;
403
- }
404
- if (message.createdAt !== undefined) {
405
- obj.createdAt = message.createdAt.toISOString();
406
- }
407
- if (message.updatedAt !== undefined) {
408
- obj.updatedAt = message.updatedAt.toISOString();
409
- }
410
- if (message.archivedAt !== undefined) {
411
- obj.archivedAt = message.archivedAt.toISOString();
412
- }
413
- return obj;
414
- },
415
- create(base) {
416
- return exports.TestScript.fromPartial(base !== null && base !== void 0 ? base : {});
417
- },
418
- fromPartial(object) {
419
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
420
- const message = createBaseTestScript();
421
- message.testScriptId = (_a = object.testScriptId) !== null && _a !== void 0 ? _a : "";
422
- message.projectId = (_b = object.projectId) !== null && _b !== void 0 ? _b : "";
423
- message.testCaseId = (_c = object.testCaseId) !== null && _c !== void 0 ? _c : "";
424
- message.name = (_d = object.name) !== null && _d !== void 0 ? _d : "";
425
- message.description = (_e = object.description) !== null && _e !== void 0 ? _e : "";
426
- message.language = (_f = object.language) !== null && _f !== void 0 ? _f : 0;
427
- message.framework = (_g = object.framework) !== null && _g !== void 0 ? _g : "";
428
- message.status = (_h = object.status) !== null && _h !== void 0 ? _h : 0;
429
- message.currentTestScriptVersionId = (_j = object.currentTestScriptVersionId) !== null && _j !== void 0 ? _j : "";
430
- message.metadata = (_k = object.metadata) !== null && _k !== void 0 ? _k : undefined;
431
- message.createdAt = (_l = object.createdAt) !== null && _l !== void 0 ? _l : undefined;
432
- message.updatedAt = (_m = object.updatedAt) !== null && _m !== void 0 ? _m : undefined;
433
- message.archivedAt = (_o = object.archivedAt) !== null && _o !== void 0 ? _o : undefined;
434
- return message;
435
- },
436
- };
437
- function createBaseTestScriptVersion() {
438
- return {
439
- testScriptVersionId: "",
440
- testScriptId: "",
441
- versionNumber: 0,
442
- sourceCode: "",
443
- promptVersion: "",
444
- metadata: undefined,
445
- createdAt: undefined,
446
- sourceLocationType: 0,
447
- storageConnectionId: "",
448
- sourceUri: "",
449
- externalRevision: "",
450
- sourceChecksum: "",
451
- sourceSizeBytes: 0,
452
- };
453
- }
454
- exports.TestScriptVersion = {
455
- encode(message, writer = new wire_1.BinaryWriter()) {
456
- if (message.testScriptVersionId !== "") {
457
- writer.uint32(10).string(message.testScriptVersionId);
458
- }
459
- if (message.testScriptId !== "") {
460
- writer.uint32(18).string(message.testScriptId);
461
- }
462
- if (message.versionNumber !== 0) {
463
- writer.uint32(24).int32(message.versionNumber);
464
- }
465
- if (message.sourceCode !== "") {
466
- writer.uint32(34).string(message.sourceCode);
467
- }
468
- if (message.promptVersion !== "") {
469
- writer.uint32(42).string(message.promptVersion);
470
- }
471
- if (message.metadata !== undefined) {
472
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.metadata), writer.uint32(50).fork()).join();
473
- }
474
- if (message.createdAt !== undefined) {
475
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(58).fork()).join();
476
- }
477
- if (message.sourceLocationType !== 0) {
478
- writer.uint32(64).int32(message.sourceLocationType);
479
- }
480
- if (message.storageConnectionId !== "") {
481
- writer.uint32(74).string(message.storageConnectionId);
482
- }
483
- if (message.sourceUri !== "") {
484
- writer.uint32(82).string(message.sourceUri);
485
- }
486
- if (message.externalRevision !== "") {
487
- writer.uint32(90).string(message.externalRevision);
488
- }
489
- if (message.sourceChecksum !== "") {
490
- writer.uint32(98).string(message.sourceChecksum);
491
- }
492
- if (message.sourceSizeBytes !== 0) {
493
- writer.uint32(104).int64(message.sourceSizeBytes);
494
- }
495
- return writer;
496
- },
497
- decode(input, length) {
498
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
499
- const end = length === undefined ? reader.len : reader.pos + length;
500
- const message = createBaseTestScriptVersion();
501
- while (reader.pos < end) {
502
- const tag = reader.uint32();
503
- switch (tag >>> 3) {
504
- case 1: {
505
- if (tag !== 10) {
506
- break;
507
- }
508
- message.testScriptVersionId = reader.string();
509
- continue;
510
- }
511
- case 2: {
512
- if (tag !== 18) {
513
- break;
514
- }
515
- message.testScriptId = reader.string();
516
- continue;
517
- }
518
- case 3: {
519
- if (tag !== 24) {
520
- break;
521
- }
522
- message.versionNumber = reader.int32();
523
- continue;
524
- }
525
- case 4: {
526
- if (tag !== 34) {
527
- break;
528
- }
529
- message.sourceCode = reader.string();
530
- continue;
531
- }
532
- case 5: {
533
- if (tag !== 42) {
534
- break;
535
- }
536
- message.promptVersion = reader.string();
537
- continue;
538
- }
539
- case 6: {
540
- if (tag !== 50) {
541
- break;
542
- }
543
- message.metadata = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
544
- continue;
545
- }
546
- case 7: {
547
- if (tag !== 58) {
548
- break;
549
- }
550
- message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
551
- continue;
552
- }
553
- case 8: {
554
- if (tag !== 64) {
555
- break;
556
- }
557
- message.sourceLocationType = reader.int32();
558
- continue;
559
- }
560
- case 9: {
561
- if (tag !== 74) {
562
- break;
563
- }
564
- message.storageConnectionId = reader.string();
565
- continue;
566
- }
567
- case 10: {
568
- if (tag !== 82) {
569
- break;
570
- }
571
- message.sourceUri = reader.string();
572
- continue;
573
- }
574
- case 11: {
575
- if (tag !== 90) {
576
- break;
577
- }
578
- message.externalRevision = reader.string();
579
- continue;
580
- }
581
- case 12: {
582
- if (tag !== 98) {
583
- break;
584
- }
585
- message.sourceChecksum = reader.string();
586
- continue;
587
- }
588
- case 13: {
589
- if (tag !== 104) {
590
- break;
591
- }
592
- message.sourceSizeBytes = longToNumber(reader.int64());
593
- continue;
594
- }
595
- }
596
- if ((tag & 7) === 4 || tag === 0) {
597
- break;
598
- }
599
- reader.skip(tag & 7);
600
- }
601
- return message;
602
- },
603
- fromJSON(object) {
604
- return {
605
- testScriptVersionId: isSet(object.testScriptVersionId)
606
- ? globalThis.String(object.testScriptVersionId)
607
- : isSet(object.test_script_version_id)
608
- ? globalThis.String(object.test_script_version_id)
609
- : "",
610
- testScriptId: isSet(object.testScriptId)
611
- ? globalThis.String(object.testScriptId)
612
- : isSet(object.test_script_id)
613
- ? globalThis.String(object.test_script_id)
614
- : "",
615
- versionNumber: isSet(object.versionNumber)
616
- ? globalThis.Number(object.versionNumber)
617
- : isSet(object.version_number)
618
- ? globalThis.Number(object.version_number)
619
- : 0,
620
- sourceCode: isSet(object.sourceCode)
621
- ? globalThis.String(object.sourceCode)
622
- : isSet(object.source_code)
623
- ? globalThis.String(object.source_code)
624
- : "",
625
- promptVersion: isSet(object.promptVersion)
626
- ? globalThis.String(object.promptVersion)
627
- : isSet(object.prompt_version)
628
- ? globalThis.String(object.prompt_version)
629
- : "",
630
- metadata: isObject(object.metadata) ? object.metadata : undefined,
631
- createdAt: isSet(object.createdAt)
632
- ? fromJsonTimestamp(object.createdAt)
633
- : isSet(object.created_at)
634
- ? fromJsonTimestamp(object.created_at)
635
- : undefined,
636
- sourceLocationType: isSet(object.sourceLocationType)
637
- ? scriptSourceLocationTypeFromJSON(object.sourceLocationType)
638
- : isSet(object.source_location_type)
639
- ? scriptSourceLocationTypeFromJSON(object.source_location_type)
640
- : 0,
641
- storageConnectionId: isSet(object.storageConnectionId)
642
- ? globalThis.String(object.storageConnectionId)
643
- : isSet(object.storage_connection_id)
644
- ? globalThis.String(object.storage_connection_id)
645
- : "",
646
- sourceUri: isSet(object.sourceUri)
647
- ? globalThis.String(object.sourceUri)
648
- : isSet(object.source_uri)
649
- ? globalThis.String(object.source_uri)
650
- : "",
651
- externalRevision: isSet(object.externalRevision)
652
- ? globalThis.String(object.externalRevision)
653
- : isSet(object.external_revision)
654
- ? globalThis.String(object.external_revision)
655
- : "",
656
- sourceChecksum: isSet(object.sourceChecksum)
657
- ? globalThis.String(object.sourceChecksum)
658
- : isSet(object.source_checksum)
659
- ? globalThis.String(object.source_checksum)
660
- : "",
661
- sourceSizeBytes: isSet(object.sourceSizeBytes)
662
- ? globalThis.Number(object.sourceSizeBytes)
663
- : isSet(object.source_size_bytes)
664
- ? globalThis.Number(object.source_size_bytes)
665
- : 0,
666
- };
667
- },
668
- toJSON(message) {
669
- const obj = {};
670
- if (message.testScriptVersionId !== "") {
671
- obj.testScriptVersionId = message.testScriptVersionId;
672
- }
673
- if (message.testScriptId !== "") {
674
- obj.testScriptId = message.testScriptId;
675
- }
676
- if (message.versionNumber !== 0) {
677
- obj.versionNumber = Math.round(message.versionNumber);
678
- }
679
- if (message.sourceCode !== "") {
680
- obj.sourceCode = message.sourceCode;
681
- }
682
- if (message.promptVersion !== "") {
683
- obj.promptVersion = message.promptVersion;
684
- }
685
- if (message.metadata !== undefined) {
686
- obj.metadata = message.metadata;
687
- }
688
- if (message.createdAt !== undefined) {
689
- obj.createdAt = message.createdAt.toISOString();
690
- }
691
- if (message.sourceLocationType !== 0) {
692
- obj.sourceLocationType = scriptSourceLocationTypeToJSON(message.sourceLocationType);
693
- }
694
- if (message.storageConnectionId !== "") {
695
- obj.storageConnectionId = message.storageConnectionId;
696
- }
697
- if (message.sourceUri !== "") {
698
- obj.sourceUri = message.sourceUri;
699
- }
700
- if (message.externalRevision !== "") {
701
- obj.externalRevision = message.externalRevision;
702
- }
703
- if (message.sourceChecksum !== "") {
704
- obj.sourceChecksum = message.sourceChecksum;
705
- }
706
- if (message.sourceSizeBytes !== 0) {
707
- obj.sourceSizeBytes = Math.round(message.sourceSizeBytes);
708
- }
709
- return obj;
710
- },
711
- create(base) {
712
- return exports.TestScriptVersion.fromPartial(base !== null && base !== void 0 ? base : {});
713
- },
714
- fromPartial(object) {
715
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
716
- const message = createBaseTestScriptVersion();
717
- message.testScriptVersionId = (_a = object.testScriptVersionId) !== null && _a !== void 0 ? _a : "";
718
- message.testScriptId = (_b = object.testScriptId) !== null && _b !== void 0 ? _b : "";
719
- message.versionNumber = (_c = object.versionNumber) !== null && _c !== void 0 ? _c : 0;
720
- message.sourceCode = (_d = object.sourceCode) !== null && _d !== void 0 ? _d : "";
721
- message.promptVersion = (_e = object.promptVersion) !== null && _e !== void 0 ? _e : "";
722
- message.metadata = (_f = object.metadata) !== null && _f !== void 0 ? _f : undefined;
723
- message.createdAt = (_g = object.createdAt) !== null && _g !== void 0 ? _g : undefined;
724
- message.sourceLocationType = (_h = object.sourceLocationType) !== null && _h !== void 0 ? _h : 0;
725
- message.storageConnectionId = (_j = object.storageConnectionId) !== null && _j !== void 0 ? _j : "";
726
- message.sourceUri = (_k = object.sourceUri) !== null && _k !== void 0 ? _k : "";
727
- message.externalRevision = (_l = object.externalRevision) !== null && _l !== void 0 ? _l : "";
728
- message.sourceChecksum = (_m = object.sourceChecksum) !== null && _m !== void 0 ? _m : "";
729
- message.sourceSizeBytes = (_o = object.sourceSizeBytes) !== null && _o !== void 0 ? _o : 0;
730
- return message;
731
- },
732
- };
733
- function createBaseScriptBinding() {
734
- return {
735
- scriptBindingId: "",
736
- testScriptId: "",
737
- bindingKey: "",
738
- bindingType: "",
739
- datasetId: "",
740
- columnName: "",
741
- defaultValue: "",
742
- isRequired: false,
743
- metadata: undefined,
744
- createdAt: undefined,
745
- updatedAt: undefined,
746
- };
747
- }
748
- exports.ScriptBinding = {
749
- encode(message, writer = new wire_1.BinaryWriter()) {
750
- if (message.scriptBindingId !== "") {
751
- writer.uint32(10).string(message.scriptBindingId);
752
- }
753
- if (message.testScriptId !== "") {
754
- writer.uint32(18).string(message.testScriptId);
755
- }
756
- if (message.bindingKey !== "") {
757
- writer.uint32(26).string(message.bindingKey);
758
- }
759
- if (message.bindingType !== "") {
760
- writer.uint32(34).string(message.bindingType);
761
- }
762
- if (message.datasetId !== "") {
763
- writer.uint32(42).string(message.datasetId);
764
- }
765
- if (message.columnName !== "") {
766
- writer.uint32(50).string(message.columnName);
767
- }
768
- if (message.defaultValue !== "") {
769
- writer.uint32(58).string(message.defaultValue);
770
- }
771
- if (message.isRequired !== false) {
772
- writer.uint32(64).bool(message.isRequired);
773
- }
774
- if (message.metadata !== undefined) {
775
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.metadata), writer.uint32(74).fork()).join();
776
- }
777
- if (message.createdAt !== undefined) {
778
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(82).fork()).join();
779
- }
780
- if (message.updatedAt !== undefined) {
781
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(90).fork()).join();
782
- }
783
- return writer;
784
- },
785
- decode(input, length) {
786
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
787
- const end = length === undefined ? reader.len : reader.pos + length;
788
- const message = createBaseScriptBinding();
789
- while (reader.pos < end) {
790
- const tag = reader.uint32();
791
- switch (tag >>> 3) {
792
- case 1: {
793
- if (tag !== 10) {
794
- break;
795
- }
796
- message.scriptBindingId = reader.string();
797
- continue;
798
- }
799
- case 2: {
800
- if (tag !== 18) {
801
- break;
802
- }
803
- message.testScriptId = reader.string();
804
- continue;
805
- }
806
- case 3: {
807
- if (tag !== 26) {
808
- break;
809
- }
810
- message.bindingKey = reader.string();
811
- continue;
812
- }
813
- case 4: {
814
- if (tag !== 34) {
815
- break;
816
- }
817
- message.bindingType = reader.string();
818
- continue;
819
- }
820
- case 5: {
821
- if (tag !== 42) {
822
- break;
823
- }
824
- message.datasetId = reader.string();
825
- continue;
826
- }
827
- case 6: {
828
- if (tag !== 50) {
829
- break;
830
- }
831
- message.columnName = reader.string();
832
- continue;
833
- }
834
- case 7: {
835
- if (tag !== 58) {
836
- break;
837
- }
838
- message.defaultValue = reader.string();
839
- continue;
840
- }
841
- case 8: {
842
- if (tag !== 64) {
843
- break;
844
- }
845
- message.isRequired = reader.bool();
846
- continue;
847
- }
848
- case 9: {
849
- if (tag !== 74) {
850
- break;
851
- }
852
- message.metadata = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
853
- continue;
854
- }
855
- case 10: {
856
- if (tag !== 82) {
857
- break;
858
- }
859
- message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
860
- continue;
861
- }
862
- case 11: {
863
- if (tag !== 90) {
864
- break;
865
- }
866
- message.updatedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
867
- continue;
868
- }
869
- }
870
- if ((tag & 7) === 4 || tag === 0) {
871
- break;
872
- }
873
- reader.skip(tag & 7);
874
- }
875
- return message;
876
- },
877
- fromJSON(object) {
878
- return {
879
- scriptBindingId: isSet(object.scriptBindingId)
880
- ? globalThis.String(object.scriptBindingId)
881
- : isSet(object.script_binding_id)
882
- ? globalThis.String(object.script_binding_id)
883
- : "",
884
- testScriptId: isSet(object.testScriptId)
885
- ? globalThis.String(object.testScriptId)
886
- : isSet(object.test_script_id)
887
- ? globalThis.String(object.test_script_id)
888
- : "",
889
- bindingKey: isSet(object.bindingKey)
890
- ? globalThis.String(object.bindingKey)
891
- : isSet(object.binding_key)
892
- ? globalThis.String(object.binding_key)
893
- : "",
894
- bindingType: isSet(object.bindingType)
895
- ? globalThis.String(object.bindingType)
896
- : isSet(object.binding_type)
897
- ? globalThis.String(object.binding_type)
898
- : "",
899
- datasetId: isSet(object.datasetId)
900
- ? globalThis.String(object.datasetId)
901
- : isSet(object.dataset_id)
902
- ? globalThis.String(object.dataset_id)
903
- : "",
904
- columnName: isSet(object.columnName)
905
- ? globalThis.String(object.columnName)
906
- : isSet(object.column_name)
907
- ? globalThis.String(object.column_name)
908
- : "",
909
- defaultValue: isSet(object.defaultValue)
910
- ? globalThis.String(object.defaultValue)
911
- : isSet(object.default_value)
912
- ? globalThis.String(object.default_value)
913
- : "",
914
- isRequired: isSet(object.isRequired)
915
- ? globalThis.Boolean(object.isRequired)
916
- : isSet(object.is_required)
917
- ? globalThis.Boolean(object.is_required)
918
- : false,
919
- metadata: isObject(object.metadata) ? object.metadata : undefined,
920
- createdAt: isSet(object.createdAt)
921
- ? fromJsonTimestamp(object.createdAt)
922
- : isSet(object.created_at)
923
- ? fromJsonTimestamp(object.created_at)
924
- : undefined,
925
- updatedAt: isSet(object.updatedAt)
926
- ? fromJsonTimestamp(object.updatedAt)
927
- : isSet(object.updated_at)
928
- ? fromJsonTimestamp(object.updated_at)
929
- : undefined,
930
- };
931
- },
932
- toJSON(message) {
933
- const obj = {};
934
- if (message.scriptBindingId !== "") {
935
- obj.scriptBindingId = message.scriptBindingId;
936
- }
937
- if (message.testScriptId !== "") {
938
- obj.testScriptId = message.testScriptId;
939
- }
940
- if (message.bindingKey !== "") {
941
- obj.bindingKey = message.bindingKey;
942
- }
943
- if (message.bindingType !== "") {
944
- obj.bindingType = message.bindingType;
945
- }
946
- if (message.datasetId !== "") {
947
- obj.datasetId = message.datasetId;
948
- }
949
- if (message.columnName !== "") {
950
- obj.columnName = message.columnName;
951
- }
952
- if (message.defaultValue !== "") {
953
- obj.defaultValue = message.defaultValue;
954
- }
955
- if (message.isRequired !== false) {
956
- obj.isRequired = message.isRequired;
957
- }
958
- if (message.metadata !== undefined) {
959
- obj.metadata = message.metadata;
960
- }
961
- if (message.createdAt !== undefined) {
962
- obj.createdAt = message.createdAt.toISOString();
963
- }
964
- if (message.updatedAt !== undefined) {
965
- obj.updatedAt = message.updatedAt.toISOString();
966
- }
967
- return obj;
968
- },
969
- create(base) {
970
- return exports.ScriptBinding.fromPartial(base !== null && base !== void 0 ? base : {});
971
- },
972
- fromPartial(object) {
973
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
974
- const message = createBaseScriptBinding();
975
- message.scriptBindingId = (_a = object.scriptBindingId) !== null && _a !== void 0 ? _a : "";
976
- message.testScriptId = (_b = object.testScriptId) !== null && _b !== void 0 ? _b : "";
977
- message.bindingKey = (_c = object.bindingKey) !== null && _c !== void 0 ? _c : "";
978
- message.bindingType = (_d = object.bindingType) !== null && _d !== void 0 ? _d : "";
979
- message.datasetId = (_e = object.datasetId) !== null && _e !== void 0 ? _e : "";
980
- message.columnName = (_f = object.columnName) !== null && _f !== void 0 ? _f : "";
981
- message.defaultValue = (_g = object.defaultValue) !== null && _g !== void 0 ? _g : "";
982
- message.isRequired = (_h = object.isRequired) !== null && _h !== void 0 ? _h : false;
983
- message.metadata = (_j = object.metadata) !== null && _j !== void 0 ? _j : undefined;
984
- message.createdAt = (_k = object.createdAt) !== null && _k !== void 0 ? _k : undefined;
985
- message.updatedAt = (_l = object.updatedAt) !== null && _l !== void 0 ? _l : undefined;
986
- return message;
987
- },
988
- };
989
- function toTimestamp(date) {
990
- const seconds = Math.trunc(date.getTime() / 1000);
991
- const nanos = (date.getTime() % 1000) * 1000000;
992
- return { seconds, nanos };
993
- }
994
- function fromTimestamp(t) {
995
- let millis = (t.seconds || 0) * 1000;
996
- millis += (t.nanos || 0) / 1000000;
997
- return new globalThis.Date(millis);
998
- }
999
- function fromJsonTimestamp(o) {
1000
- if (o instanceof globalThis.Date) {
1001
- return o;
1002
- }
1003
- else if (typeof o === "string") {
1004
- return new globalThis.Date(o);
1005
- }
1006
- else {
1007
- return fromTimestamp(timestamp_pb_1.Timestamp.fromJSON(o));
1008
- }
1009
- }
1010
- function longToNumber(int64) {
1011
- const num = globalThis.Number(int64.toString());
1012
- if (num > globalThis.Number.MAX_SAFE_INTEGER) {
1013
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
1014
- }
1015
- if (num < globalThis.Number.MIN_SAFE_INTEGER) {
1016
- throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
1017
- }
1018
- return num;
1019
- }
1020
- function isObject(value) {
1021
- return typeof value === "object" && value !== null;
1022
- }
1023
- function isSet(value) {
1024
- return value !== null && value !== undefined;
1025
- }