@mindburn/helm-ai-kernel 0.5.1

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.
@@ -0,0 +1,4174 @@
1
+ // AUTO-GENERATED from api/openapi/helm.openapi.yaml — DO NOT EDIT
2
+ // Regenerate: bash scripts/sdk/gen.sh
3
+ const mapValues = (data, fn) => Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {});
4
+ const stringFromJSONTyped = (json, _ignoreDiscriminator) => json;
5
+ const stringToJSON = (value) => value;
6
+ const instanceOfstring = (value) => typeof value === 'string';
7
+ const numberFromJSONTyped = (json, _ignoreDiscriminator) => json;
8
+ const numberToJSON = (value) => value;
9
+ const instanceOfnumber = (value) => typeof value === 'number';
10
+ /**
11
+ * Check if a given object implements the A2AAgentCard interface.
12
+ */
13
+ export function instanceOfA2AAgentCard(value) {
14
+ if (!('agent_id' in value))
15
+ return false;
16
+ if (!('name' in value))
17
+ return false;
18
+ if (!('endpoint' in value))
19
+ return false;
20
+ if (!('supported_versions' in value))
21
+ return false;
22
+ if (!('skills' in value))
23
+ return false;
24
+ if (!('created_at' in value))
25
+ return false;
26
+ if (!('updated_at' in value))
27
+ return false;
28
+ return true;
29
+ }
30
+ export function A2AAgentCardFromJSON(json) {
31
+ return A2AAgentCardFromJSONTyped(json, false);
32
+ }
33
+ export function A2AAgentCardFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'agent_id': json['agent_id'],
39
+ 'name': json['name'],
40
+ 'description': json['description'] == null ? undefined : json['description'],
41
+ 'endpoint': json['endpoint'],
42
+ 'provider': json['provider'] == null ? undefined : A2AAgentCardProviderFromJSON(json['provider']),
43
+ 'supported_versions': json['supported_versions'],
44
+ 'skills': (json['skills'].map(A2AAgentCardSkillsInnerFromJSON)),
45
+ 'auth_methods': json['auth_methods'] == null ? undefined : json['auth_methods'],
46
+ 'features': json['features'] == null ? undefined : json['features'],
47
+ 'defaultInputModes': json['defaultInputModes'] == null ? undefined : json['defaultInputModes'],
48
+ 'defaultOutputModes': json['defaultOutputModes'] == null ? undefined : json['defaultOutputModes'],
49
+ 'capabilities': json['capabilities'] == null ? undefined : A2AAgentCardCapabilitiesFromJSON(json['capabilities']),
50
+ 'signature': json['signature'] == null ? undefined : json['signature'],
51
+ 'content_hash': json['content_hash'] == null ? undefined : json['content_hash'],
52
+ 'created_at': (new Date(json['created_at'])),
53
+ 'updated_at': (new Date(json['updated_at'])),
54
+ };
55
+ }
56
+ export function A2AAgentCardToJSON(value) {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+ return {
61
+ 'agent_id': value['agent_id'],
62
+ 'name': value['name'],
63
+ 'description': value['description'],
64
+ 'endpoint': value['endpoint'],
65
+ 'provider': A2AAgentCardProviderToJSON(value['provider']),
66
+ 'supported_versions': value['supported_versions'],
67
+ 'skills': (value['skills'].map(A2AAgentCardSkillsInnerToJSON)),
68
+ 'auth_methods': value['auth_methods'],
69
+ 'features': value['features'],
70
+ 'defaultInputModes': value['defaultInputModes'],
71
+ 'defaultOutputModes': value['defaultOutputModes'],
72
+ 'capabilities': A2AAgentCardCapabilitiesToJSON(value['capabilities']),
73
+ 'signature': value['signature'],
74
+ 'content_hash': value['content_hash'],
75
+ 'created_at': ((value['created_at']).toISOString()),
76
+ 'updated_at': ((value['updated_at']).toISOString()),
77
+ };
78
+ }
79
+ /**
80
+ * Check if a given object implements the A2AAgentCardCapabilities interface.
81
+ */
82
+ export function instanceOfA2AAgentCardCapabilities(value) {
83
+ return true;
84
+ }
85
+ export function A2AAgentCardCapabilitiesFromJSON(json) {
86
+ return A2AAgentCardCapabilitiesFromJSONTyped(json, false);
87
+ }
88
+ export function A2AAgentCardCapabilitiesFromJSONTyped(json, ignoreDiscriminator) {
89
+ if (json == null) {
90
+ return json;
91
+ }
92
+ return {
93
+ 'streaming': json['streaming'] == null ? undefined : json['streaming'],
94
+ 'pushNotifications': json['pushNotifications'] == null ? undefined : json['pushNotifications'],
95
+ 'stateTransitionHistory': json['stateTransitionHistory'] == null ? undefined : json['stateTransitionHistory'],
96
+ };
97
+ }
98
+ export function A2AAgentCardCapabilitiesToJSON(value) {
99
+ if (value == null) {
100
+ return value;
101
+ }
102
+ return {
103
+ 'streaming': value['streaming'],
104
+ 'pushNotifications': value['pushNotifications'],
105
+ 'stateTransitionHistory': value['stateTransitionHistory'],
106
+ };
107
+ }
108
+ /**
109
+ * Check if a given object implements the A2AAgentCardProvider interface.
110
+ */
111
+ export function instanceOfA2AAgentCardProvider(value) {
112
+ return true;
113
+ }
114
+ export function A2AAgentCardProviderFromJSON(json) {
115
+ return A2AAgentCardProviderFromJSONTyped(json, false);
116
+ }
117
+ export function A2AAgentCardProviderFromJSONTyped(json, ignoreDiscriminator) {
118
+ if (json == null) {
119
+ return json;
120
+ }
121
+ return {
122
+ 'organization': json['organization'] == null ? undefined : json['organization'],
123
+ 'url': json['url'] == null ? undefined : json['url'],
124
+ };
125
+ }
126
+ export function A2AAgentCardProviderToJSON(value) {
127
+ if (value == null) {
128
+ return value;
129
+ }
130
+ return {
131
+ 'organization': value['organization'],
132
+ 'url': value['url'],
133
+ };
134
+ }
135
+ /**
136
+ * Check if a given object implements the A2AAgentCardSkillsInner interface.
137
+ */
138
+ export function instanceOfA2AAgentCardSkillsInner(value) {
139
+ if (!('id' in value))
140
+ return false;
141
+ if (!('name' in value))
142
+ return false;
143
+ return true;
144
+ }
145
+ export function A2AAgentCardSkillsInnerFromJSON(json) {
146
+ return A2AAgentCardSkillsInnerFromJSONTyped(json, false);
147
+ }
148
+ export function A2AAgentCardSkillsInnerFromJSONTyped(json, ignoreDiscriminator) {
149
+ if (json == null) {
150
+ return json;
151
+ }
152
+ return {
153
+ 'id': json['id'],
154
+ 'name': json['name'],
155
+ 'description': json['description'] == null ? undefined : json['description'],
156
+ 'examples': json['examples'] == null ? undefined : json['examples'],
157
+ 'input_modes': json['input_modes'] == null ? undefined : json['input_modes'],
158
+ 'output_modes': json['output_modes'] == null ? undefined : json['output_modes'],
159
+ };
160
+ }
161
+ export function A2AAgentCardSkillsInnerToJSON(value) {
162
+ if (value == null) {
163
+ return value;
164
+ }
165
+ return {
166
+ 'id': value['id'],
167
+ 'name': value['name'],
168
+ 'description': value['description'],
169
+ 'examples': value['examples'],
170
+ 'input_modes': value['input_modes'],
171
+ 'output_modes': value['output_modes'],
172
+ };
173
+ }
174
+ /**
175
+ * Check if a given object implements the AddTrustKey200Response interface.
176
+ */
177
+ export function instanceOfAddTrustKey200Response(value) {
178
+ return true;
179
+ }
180
+ export function AddTrustKey200ResponseFromJSON(json) {
181
+ return AddTrustKey200ResponseFromJSONTyped(json, false);
182
+ }
183
+ export function AddTrustKey200ResponseFromJSONTyped(json, ignoreDiscriminator) {
184
+ if (json == null) {
185
+ return json;
186
+ }
187
+ return {
188
+ 'status': json['status'] == null ? undefined : json['status'],
189
+ 'tenant_id': json['tenant_id'] == null ? undefined : json['tenant_id'],
190
+ 'key_id': json['key_id'] == null ? undefined : json['key_id'],
191
+ };
192
+ }
193
+ export function AddTrustKey200ResponseToJSON(value) {
194
+ if (value == null) {
195
+ return value;
196
+ }
197
+ return {
198
+ 'status': value['status'],
199
+ 'tenant_id': value['tenant_id'],
200
+ 'key_id': value['key_id'],
201
+ };
202
+ }
203
+ /**
204
+ * Check if a given object implements the AddTrustKeyRequest interface.
205
+ */
206
+ export function instanceOfAddTrustKeyRequest(value) {
207
+ if (!('tenant_id' in value))
208
+ return false;
209
+ if (!('key_id' in value))
210
+ return false;
211
+ if (!('public_key' in value))
212
+ return false;
213
+ return true;
214
+ }
215
+ export function AddTrustKeyRequestFromJSON(json) {
216
+ return AddTrustKeyRequestFromJSONTyped(json, false);
217
+ }
218
+ export function AddTrustKeyRequestFromJSONTyped(json, ignoreDiscriminator) {
219
+ if (json == null) {
220
+ return json;
221
+ }
222
+ return {
223
+ 'tenant_id': json['tenant_id'],
224
+ 'key_id': json['key_id'],
225
+ 'public_key': json['public_key'],
226
+ };
227
+ }
228
+ export function AddTrustKeyRequestToJSON(value) {
229
+ if (value == null) {
230
+ return value;
231
+ }
232
+ return {
233
+ 'tenant_id': value['tenant_id'],
234
+ 'key_id': value['key_id'],
235
+ 'public_key': value['public_key'],
236
+ };
237
+ }
238
+ /**
239
+ * Check if a given object implements the AgentIdentityProfile interface.
240
+ */
241
+ export function instanceOfAgentIdentityProfile(value) {
242
+ return true;
243
+ }
244
+ export function AgentIdentityProfileFromJSON(json) {
245
+ return AgentIdentityProfileFromJSONTyped(json, false);
246
+ }
247
+ export function AgentIdentityProfileFromJSONTyped(json, ignoreDiscriminator) {
248
+ if (json == null) {
249
+ return json;
250
+ }
251
+ return {
252
+ 'agent_id': json['agent_id'] == null ? undefined : json['agent_id'],
253
+ 'identity_type': json['identity_type'] == null ? undefined : json['identity_type'],
254
+ 'subject': json['subject'] == null ? undefined : json['subject'],
255
+ 'issuer': json['issuer'] == null ? undefined : json['issuer'],
256
+ 'jwks_uri': json['jwks_uri'] == null ? undefined : json['jwks_uri'],
257
+ 'spiffe_id': json['spiffe_id'] == null ? undefined : json['spiffe_id'],
258
+ 'scopes': json['scopes'] == null ? undefined : json['scopes'],
259
+ 'anonymous_dev_mode': json['anonymous_dev_mode'] == null ? undefined : json['anonymous_dev_mode'],
260
+ 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
261
+ };
262
+ }
263
+ export function AgentIdentityProfileToJSON(value) {
264
+ if (value == null) {
265
+ return value;
266
+ }
267
+ return {
268
+ 'agent_id': value['agent_id'],
269
+ 'identity_type': value['identity_type'],
270
+ 'subject': value['subject'],
271
+ 'issuer': value['issuer'],
272
+ 'jwks_uri': value['jwks_uri'],
273
+ 'spiffe_id': value['spiffe_id'],
274
+ 'scopes': value['scopes'],
275
+ 'anonymous_dev_mode': value['anonymous_dev_mode'],
276
+ 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()),
277
+ };
278
+ }
279
+ /**
280
+ * @export
281
+ */
282
+ export const ApprovalCeremonyStateEnum = {
283
+ Pending: 'pending',
284
+ Approved: 'approved',
285
+ Denied: 'denied',
286
+ Revoked: 'revoked',
287
+ Expired: 'expired'
288
+ };
289
+ /**
290
+ * Check if a given object implements the ApprovalCeremony interface.
291
+ */
292
+ export function instanceOfApprovalCeremony(value) {
293
+ return true;
294
+ }
295
+ export function ApprovalCeremonyFromJSON(json) {
296
+ return ApprovalCeremonyFromJSONTyped(json, false);
297
+ }
298
+ export function ApprovalCeremonyFromJSONTyped(json, ignoreDiscriminator) {
299
+ if (json == null) {
300
+ return json;
301
+ }
302
+ return {
303
+ 'approval_id': json['approval_id'] == null ? undefined : json['approval_id'],
304
+ 'subject': json['subject'] == null ? undefined : json['subject'],
305
+ 'action': json['action'] == null ? undefined : json['action'],
306
+ 'state': json['state'] == null ? undefined : json['state'],
307
+ 'requested_by': json['requested_by'] == null ? undefined : json['requested_by'],
308
+ 'approvers': json['approvers'] == null ? undefined : json['approvers'],
309
+ 'quorum': json['quorum'] == null ? undefined : json['quorum'],
310
+ 'timelock_until': json['timelock_until'] == null ? undefined : (new Date(json['timelock_until'])),
311
+ 'expires_at': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
312
+ 'break_glass': json['break_glass'] == null ? undefined : json['break_glass'],
313
+ 'reason': json['reason'] == null ? undefined : json['reason'],
314
+ 'receipt_id': json['receipt_id'] == null ? undefined : json['receipt_id'],
315
+ 'ceremony_hash': json['ceremony_hash'] == null ? undefined : json['ceremony_hash'],
316
+ 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
317
+ 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
318
+ };
319
+ }
320
+ export function ApprovalCeremonyToJSON(value) {
321
+ if (value == null) {
322
+ return value;
323
+ }
324
+ return {
325
+ 'approval_id': value['approval_id'],
326
+ 'subject': value['subject'],
327
+ 'action': value['action'],
328
+ 'state': value['state'],
329
+ 'requested_by': value['requested_by'],
330
+ 'approvers': value['approvers'],
331
+ 'quorum': value['quorum'],
332
+ 'timelock_until': value['timelock_until'] == null ? undefined : ((value['timelock_until']).toISOString()),
333
+ 'expires_at': value['expires_at'] == null ? undefined : ((value['expires_at']).toISOString()),
334
+ 'break_glass': value['break_glass'],
335
+ 'reason': value['reason'],
336
+ 'receipt_id': value['receipt_id'],
337
+ 'ceremony_hash': value['ceremony_hash'],
338
+ 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()),
339
+ 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()),
340
+ };
341
+ }
342
+ /**
343
+ * Check if a given object implements the ApprovalRequest interface.
344
+ */
345
+ export function instanceOfApprovalRequest(value) {
346
+ if (!('intent_hash' in value))
347
+ return false;
348
+ if (!('signature_b64' in value))
349
+ return false;
350
+ if (!('public_key_b64' in value))
351
+ return false;
352
+ return true;
353
+ }
354
+ export function ApprovalRequestFromJSON(json) {
355
+ return ApprovalRequestFromJSONTyped(json, false);
356
+ }
357
+ export function ApprovalRequestFromJSONTyped(json, ignoreDiscriminator) {
358
+ if (json == null) {
359
+ return json;
360
+ }
361
+ return {
362
+ 'intent_hash': json['intent_hash'],
363
+ 'signature_b64': json['signature_b64'],
364
+ 'public_key_b64': json['public_key_b64'],
365
+ 'challenge_response': json['challenge_response'] == null ? undefined : json['challenge_response'],
366
+ };
367
+ }
368
+ export function ApprovalRequestToJSON(value) {
369
+ if (value == null) {
370
+ return value;
371
+ }
372
+ return {
373
+ 'intent_hash': value['intent_hash'],
374
+ 'signature_b64': value['signature_b64'],
375
+ 'public_key_b64': value['public_key_b64'],
376
+ 'challenge_response': value['challenge_response'],
377
+ };
378
+ }
379
+ /**
380
+ * Check if a given object implements the AssertApprovalWebAuthnChallengeRequest interface.
381
+ */
382
+ export function instanceOfAssertApprovalWebAuthnChallengeRequest(value) {
383
+ if (!('challenge_id' in value))
384
+ return false;
385
+ if (!('actor' in value))
386
+ return false;
387
+ if (!('assertion' in value))
388
+ return false;
389
+ return true;
390
+ }
391
+ export function AssertApprovalWebAuthnChallengeRequestFromJSON(json) {
392
+ return AssertApprovalWebAuthnChallengeRequestFromJSONTyped(json, false);
393
+ }
394
+ export function AssertApprovalWebAuthnChallengeRequestFromJSONTyped(json, ignoreDiscriminator) {
395
+ if (json == null) {
396
+ return json;
397
+ }
398
+ return {
399
+ 'challenge_id': json['challenge_id'],
400
+ 'actor': json['actor'],
401
+ 'assertion': json['assertion'],
402
+ 'receipt_id': json['receipt_id'] == null ? undefined : json['receipt_id'],
403
+ 'reason': json['reason'] == null ? undefined : json['reason'],
404
+ };
405
+ }
406
+ export function AssertApprovalWebAuthnChallengeRequestToJSON(value) {
407
+ if (value == null) {
408
+ return value;
409
+ }
410
+ return {
411
+ 'challenge_id': value['challenge_id'],
412
+ 'actor': value['actor'],
413
+ 'assertion': value['assertion'],
414
+ 'receipt_id': value['receipt_id'],
415
+ 'reason': value['reason'],
416
+ };
417
+ }
418
+ /**
419
+ * Check if a given object implements the AuthzHealth interface.
420
+ */
421
+ export function instanceOfAuthzHealth(value) {
422
+ return true;
423
+ }
424
+ export function AuthzHealthFromJSON(json) {
425
+ return AuthzHealthFromJSONTyped(json, false);
426
+ }
427
+ export function AuthzHealthFromJSONTyped(json, ignoreDiscriminator) {
428
+ if (json == null) {
429
+ return json;
430
+ }
431
+ return {
432
+ 'status': json['status'] == null ? undefined : json['status'],
433
+ 'resolver': json['resolver'] == null ? undefined : json['resolver'],
434
+ 'model_id': json['model_id'] == null ? undefined : json['model_id'],
435
+ 'relationship_hash': json['relationship_hash'] == null ? undefined : json['relationship_hash'],
436
+ 'checked_at': json['checked_at'] == null ? undefined : (new Date(json['checked_at'])),
437
+ };
438
+ }
439
+ export function AuthzHealthToJSON(value) {
440
+ if (value == null) {
441
+ return value;
442
+ }
443
+ return {
444
+ 'status': value['status'],
445
+ 'resolver': value['resolver'],
446
+ 'model_id': value['model_id'],
447
+ 'relationship_hash': value['relationship_hash'],
448
+ 'checked_at': value['checked_at'] == null ? undefined : ((value['checked_at']).toISOString()),
449
+ };
450
+ }
451
+ /**
452
+ * Check if a given object implements the AuthzSnapshot interface.
453
+ */
454
+ export function instanceOfAuthzSnapshot(value) {
455
+ return true;
456
+ }
457
+ export function AuthzSnapshotFromJSON(json) {
458
+ return AuthzSnapshotFromJSONTyped(json, false);
459
+ }
460
+ export function AuthzSnapshotFromJSONTyped(json, ignoreDiscriminator) {
461
+ if (json == null) {
462
+ return json;
463
+ }
464
+ return {
465
+ 'snapshot_id': json['snapshot_id'] == null ? undefined : json['snapshot_id'],
466
+ 'model_id': json['model_id'] == null ? undefined : json['model_id'],
467
+ 'relationship_hash': json['relationship_hash'] == null ? undefined : json['relationship_hash'],
468
+ 'tuple_count': json['tuple_count'] == null ? undefined : json['tuple_count'],
469
+ 'resolver': json['resolver'] == null ? undefined : json['resolver'],
470
+ 'stale': json['stale'] == null ? undefined : json['stale'],
471
+ 'snapshot_token': json['snapshot_token'] == null ? undefined : json['snapshot_token'],
472
+ 'checked_at': json['checked_at'] == null ? undefined : (new Date(json['checked_at'])),
473
+ 'snapshot_hash': json['snapshot_hash'] == null ? undefined : json['snapshot_hash'],
474
+ };
475
+ }
476
+ export function AuthzSnapshotToJSON(value) {
477
+ if (value == null) {
478
+ return value;
479
+ }
480
+ return {
481
+ 'snapshot_id': value['snapshot_id'],
482
+ 'model_id': value['model_id'],
483
+ 'relationship_hash': value['relationship_hash'],
484
+ 'tuple_count': value['tuple_count'],
485
+ 'resolver': value['resolver'],
486
+ 'stale': value['stale'],
487
+ 'snapshot_token': value['snapshot_token'],
488
+ 'checked_at': value['checked_at'] == null ? undefined : ((value['checked_at']).toISOString()),
489
+ 'snapshot_hash': value['snapshot_hash'],
490
+ };
491
+ }
492
+ /**
493
+ * Check if a given object implements the BoundaryCapabilitySummary interface.
494
+ */
495
+ export function instanceOfBoundaryCapabilitySummary(value) {
496
+ return true;
497
+ }
498
+ export function BoundaryCapabilitySummaryFromJSON(json) {
499
+ return BoundaryCapabilitySummaryFromJSONTyped(json, false);
500
+ }
501
+ export function BoundaryCapabilitySummaryFromJSONTyped(json, ignoreDiscriminator) {
502
+ if (json == null) {
503
+ return json;
504
+ }
505
+ return {
506
+ 'capability_id': json['capability_id'] == null ? undefined : json['capability_id'],
507
+ 'category': json['category'] == null ? undefined : json['category'],
508
+ 'status': json['status'] == null ? undefined : json['status'],
509
+ 'authority': json['authority'] == null ? undefined : json['authority'],
510
+ 'public_routes': json['public_routes'] == null ? undefined : json['public_routes'],
511
+ 'cli_commands': json['cli_commands'] == null ? undefined : json['cli_commands'],
512
+ 'receipt_bindings': json['receipt_bindings'] == null ? undefined : json['receipt_bindings'],
513
+ 'conformance_level': json['conformance_level'] == null ? undefined : json['conformance_level'],
514
+ };
515
+ }
516
+ export function BoundaryCapabilitySummaryToJSON(value) {
517
+ if (value == null) {
518
+ return value;
519
+ }
520
+ return {
521
+ 'capability_id': value['capability_id'],
522
+ 'category': value['category'],
523
+ 'status': value['status'],
524
+ 'authority': value['authority'],
525
+ 'public_routes': value['public_routes'],
526
+ 'cli_commands': value['cli_commands'],
527
+ 'receipt_bindings': value['receipt_bindings'],
528
+ 'conformance_level': value['conformance_level'],
529
+ };
530
+ }
531
+ /**
532
+ * Check if a given object implements the BoundaryCheckpoint interface.
533
+ */
534
+ export function instanceOfBoundaryCheckpoint(value) {
535
+ return true;
536
+ }
537
+ export function BoundaryCheckpointFromJSON(json) {
538
+ return BoundaryCheckpointFromJSONTyped(json, false);
539
+ }
540
+ export function BoundaryCheckpointFromJSONTyped(json, ignoreDiscriminator) {
541
+ if (json == null) {
542
+ return json;
543
+ }
544
+ return {
545
+ 'checkpoint_id': json['checkpoint_id'] == null ? undefined : json['checkpoint_id'],
546
+ 'sequence': json['sequence'] == null ? undefined : json['sequence'],
547
+ 'previous_checkpoint_hash': json['previous_checkpoint_hash'] == null ? undefined : json['previous_checkpoint_hash'],
548
+ 'receipt_count': json['receipt_count'] == null ? undefined : json['receipt_count'],
549
+ 'record_count': json['record_count'] == null ? undefined : json['record_count'],
550
+ 'root_hash': json['root_hash'] == null ? undefined : json['root_hash'],
551
+ 'checkpoint_hash': json['checkpoint_hash'] == null ? undefined : json['checkpoint_hash'],
552
+ 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
553
+ };
554
+ }
555
+ export function BoundaryCheckpointToJSON(value) {
556
+ if (value == null) {
557
+ return value;
558
+ }
559
+ return {
560
+ 'checkpoint_id': value['checkpoint_id'],
561
+ 'sequence': value['sequence'],
562
+ 'previous_checkpoint_hash': value['previous_checkpoint_hash'],
563
+ 'receipt_count': value['receipt_count'],
564
+ 'record_count': value['record_count'],
565
+ 'root_hash': value['root_hash'],
566
+ 'checkpoint_hash': value['checkpoint_hash'],
567
+ 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()),
568
+ };
569
+ }
570
+ /**
571
+ * Check if a given object implements the BoundaryRecordVerification interface.
572
+ */
573
+ export function instanceOfBoundaryRecordVerification(value) {
574
+ return true;
575
+ }
576
+ export function BoundaryRecordVerificationFromJSON(json) {
577
+ return BoundaryRecordVerificationFromJSONTyped(json, false);
578
+ }
579
+ export function BoundaryRecordVerificationFromJSONTyped(json, ignoreDiscriminator) {
580
+ if (json == null) {
581
+ return json;
582
+ }
583
+ return {
584
+ 'record_id': json['record_id'] == null ? undefined : json['record_id'],
585
+ 'record_hash': json['record_hash'] == null ? undefined : json['record_hash'],
586
+ 'receipt_id': json['receipt_id'] == null ? undefined : json['receipt_id'],
587
+ 'verified': json['verified'] == null ? undefined : json['verified'],
588
+ 'errors': json['errors'] == null ? undefined : json['errors'],
589
+ 'checked_at': json['checked_at'] == null ? undefined : (new Date(json['checked_at'])),
590
+ };
591
+ }
592
+ export function BoundaryRecordVerificationToJSON(value) {
593
+ if (value == null) {
594
+ return value;
595
+ }
596
+ return {
597
+ 'record_id': value['record_id'],
598
+ 'record_hash': value['record_hash'],
599
+ 'receipt_id': value['receipt_id'],
600
+ 'verified': value['verified'],
601
+ 'errors': value['errors'],
602
+ 'checked_at': value['checked_at'] == null ? undefined : ((value['checked_at']).toISOString()),
603
+ };
604
+ }
605
+ /**
606
+ * Check if a given object implements the BoundaryStatus interface.
607
+ */
608
+ export function instanceOfBoundaryStatus(value) {
609
+ return true;
610
+ }
611
+ export function BoundaryStatusFromJSON(json) {
612
+ return BoundaryStatusFromJSONTyped(json, false);
613
+ }
614
+ export function BoundaryStatusFromJSONTyped(json, ignoreDiscriminator) {
615
+ if (json == null) {
616
+ return json;
617
+ }
618
+ return {
619
+ 'version': json['version'] == null ? undefined : json['version'],
620
+ 'status': json['status'] == null ? undefined : json['status'],
621
+ 'receipt_store_ready': json['receipt_store_ready'] == null ? undefined : json['receipt_store_ready'],
622
+ 'signer_ready': json['signer_ready'] == null ? undefined : json['signer_ready'],
623
+ 'open_approvals': json['open_approvals'] == null ? undefined : json['open_approvals'],
624
+ 'quarantined_mcp_servers': json['quarantined_mcp_servers'] == null ? undefined : json['quarantined_mcp_servers'],
625
+ 'last_checkpoint_id': json['last_checkpoint_id'] == null ? undefined : json['last_checkpoint_id'],
626
+ 'checked_at': json['checked_at'] == null ? undefined : (new Date(json['checked_at'])),
627
+ };
628
+ }
629
+ export function BoundaryStatusToJSON(value) {
630
+ if (value == null) {
631
+ return value;
632
+ }
633
+ return {
634
+ 'version': value['version'],
635
+ 'status': value['status'],
636
+ 'receipt_store_ready': value['receipt_store_ready'],
637
+ 'signer_ready': value['signer_ready'],
638
+ 'open_approvals': value['open_approvals'],
639
+ 'quarantined_mcp_servers': value['quarantined_mcp_servers'],
640
+ 'last_checkpoint_id': value['last_checkpoint_id'],
641
+ 'checked_at': value['checked_at'] == null ? undefined : ((value['checked_at']).toISOString()),
642
+ };
643
+ }
644
+ /**
645
+ * Check if a given object implements the BudgetCeiling interface.
646
+ */
647
+ export function instanceOfBudgetCeiling(value) {
648
+ return true;
649
+ }
650
+ export function BudgetCeilingFromJSON(json) {
651
+ return BudgetCeilingFromJSONTyped(json, false);
652
+ }
653
+ export function BudgetCeilingFromJSONTyped(json, ignoreDiscriminator) {
654
+ if (json == null) {
655
+ return json;
656
+ }
657
+ return {
658
+ 'budget_id': json['budget_id'] == null ? undefined : json['budget_id'],
659
+ 'subject': json['subject'] == null ? undefined : json['subject'],
660
+ 'window': json['window'] == null ? undefined : json['window'],
661
+ 'max_tool_calls': json['max_tool_calls'] == null ? undefined : json['max_tool_calls'],
662
+ 'max_spend_minor': json['max_spend_minor'] == null ? undefined : json['max_spend_minor'],
663
+ 'max_egress_bytes': json['max_egress_bytes'] == null ? undefined : json['max_egress_bytes'],
664
+ 'max_write_ops': json['max_write_ops'] == null ? undefined : json['max_write_ops'],
665
+ 'approval_required_after': json['approval_required_after'] == null ? undefined : json['approval_required_after'],
666
+ 'policy_epoch': json['policy_epoch'] == null ? undefined : json['policy_epoch'],
667
+ };
668
+ }
669
+ export function BudgetCeilingToJSON(value) {
670
+ if (value == null) {
671
+ return value;
672
+ }
673
+ return {
674
+ 'budget_id': value['budget_id'],
675
+ 'subject': value['subject'],
676
+ 'window': value['window'],
677
+ 'max_tool_calls': value['max_tool_calls'],
678
+ 'max_spend_minor': value['max_spend_minor'],
679
+ 'max_egress_bytes': value['max_egress_bytes'],
680
+ 'max_write_ops': value['max_write_ops'],
681
+ 'approval_required_after': value['approval_required_after'],
682
+ 'policy_epoch': value['policy_epoch'],
683
+ };
684
+ }
685
+ /**
686
+ * Check if a given object implements the ChatCompletionRequest interface.
687
+ */
688
+ export function instanceOfChatCompletionRequest(value) {
689
+ if (!('model' in value))
690
+ return false;
691
+ if (!('messages' in value))
692
+ return false;
693
+ return true;
694
+ }
695
+ export function ChatCompletionRequestFromJSON(json) {
696
+ return ChatCompletionRequestFromJSONTyped(json, false);
697
+ }
698
+ export function ChatCompletionRequestFromJSONTyped(json, ignoreDiscriminator) {
699
+ if (json == null) {
700
+ return json;
701
+ }
702
+ return {
703
+ 'model': json['model'],
704
+ 'messages': (json['messages'].map(ChatCompletionRequestMessagesInnerFromJSON)),
705
+ 'tools': json['tools'] == null ? undefined : (json['tools'].map(ChatCompletionRequestToolsInnerFromJSON)),
706
+ 'temperature': json['temperature'] == null ? undefined : json['temperature'],
707
+ 'max_tokens': json['max_tokens'] == null ? undefined : json['max_tokens'],
708
+ 'stream': json['stream'] == null ? undefined : json['stream'],
709
+ };
710
+ }
711
+ export function ChatCompletionRequestToJSON(value) {
712
+ if (value == null) {
713
+ return value;
714
+ }
715
+ return {
716
+ 'model': value['model'],
717
+ 'messages': (value['messages'].map(ChatCompletionRequestMessagesInnerToJSON)),
718
+ 'tools': value['tools'] == null ? undefined : (value['tools'].map(ChatCompletionRequestToolsInnerToJSON)),
719
+ 'temperature': value['temperature'],
720
+ 'max_tokens': value['max_tokens'],
721
+ 'stream': value['stream'],
722
+ };
723
+ }
724
+ /**
725
+ * @export
726
+ */
727
+ export const ChatCompletionRequestMessagesInnerRoleEnum = {
728
+ System: 'system',
729
+ User: 'user',
730
+ Assistant: 'assistant',
731
+ Tool: 'tool'
732
+ };
733
+ /**
734
+ * Check if a given object implements the ChatCompletionRequestMessagesInner interface.
735
+ */
736
+ export function instanceOfChatCompletionRequestMessagesInner(value) {
737
+ if (!('role' in value))
738
+ return false;
739
+ if (!('content' in value))
740
+ return false;
741
+ return true;
742
+ }
743
+ export function ChatCompletionRequestMessagesInnerFromJSON(json) {
744
+ return ChatCompletionRequestMessagesInnerFromJSONTyped(json, false);
745
+ }
746
+ export function ChatCompletionRequestMessagesInnerFromJSONTyped(json, ignoreDiscriminator) {
747
+ if (json == null) {
748
+ return json;
749
+ }
750
+ return {
751
+ 'role': json['role'],
752
+ 'content': json['content'],
753
+ 'tool_call_id': json['tool_call_id'] == null ? undefined : json['tool_call_id'],
754
+ };
755
+ }
756
+ export function ChatCompletionRequestMessagesInnerToJSON(value) {
757
+ if (value == null) {
758
+ return value;
759
+ }
760
+ return {
761
+ 'role': value['role'],
762
+ 'content': value['content'],
763
+ 'tool_call_id': value['tool_call_id'],
764
+ };
765
+ }
766
+ /**
767
+ * @export
768
+ */
769
+ export const ChatCompletionRequestToolsInnerTypeEnum = {
770
+ Function: 'function'
771
+ };
772
+ /**
773
+ * Check if a given object implements the ChatCompletionRequestToolsInner interface.
774
+ */
775
+ export function instanceOfChatCompletionRequestToolsInner(value) {
776
+ return true;
777
+ }
778
+ export function ChatCompletionRequestToolsInnerFromJSON(json) {
779
+ return ChatCompletionRequestToolsInnerFromJSONTyped(json, false);
780
+ }
781
+ export function ChatCompletionRequestToolsInnerFromJSONTyped(json, ignoreDiscriminator) {
782
+ if (json == null) {
783
+ return json;
784
+ }
785
+ return {
786
+ 'type': json['type'] == null ? undefined : json['type'],
787
+ '_function': json['function'] == null ? undefined : ChatCompletionRequestToolsInnerFunctionFromJSON(json['function']),
788
+ };
789
+ }
790
+ export function ChatCompletionRequestToolsInnerToJSON(value) {
791
+ if (value == null) {
792
+ return value;
793
+ }
794
+ return {
795
+ 'type': value['type'],
796
+ 'function': ChatCompletionRequestToolsInnerFunctionToJSON(value['_function']),
797
+ };
798
+ }
799
+ /**
800
+ * Check if a given object implements the ChatCompletionRequestToolsInnerFunction interface.
801
+ */
802
+ export function instanceOfChatCompletionRequestToolsInnerFunction(value) {
803
+ return true;
804
+ }
805
+ export function ChatCompletionRequestToolsInnerFunctionFromJSON(json) {
806
+ return ChatCompletionRequestToolsInnerFunctionFromJSONTyped(json, false);
807
+ }
808
+ export function ChatCompletionRequestToolsInnerFunctionFromJSONTyped(json, ignoreDiscriminator) {
809
+ if (json == null) {
810
+ return json;
811
+ }
812
+ return {
813
+ 'name': json['name'] == null ? undefined : json['name'],
814
+ 'description': json['description'] == null ? undefined : json['description'],
815
+ 'parameters': json['parameters'] == null ? undefined : json['parameters'],
816
+ };
817
+ }
818
+ export function ChatCompletionRequestToolsInnerFunctionToJSON(value) {
819
+ if (value == null) {
820
+ return value;
821
+ }
822
+ return {
823
+ 'name': value['name'],
824
+ 'description': value['description'],
825
+ 'parameters': value['parameters'],
826
+ };
827
+ }
828
+ /**
829
+ * Check if a given object implements the ChatCompletionResponse interface.
830
+ */
831
+ export function instanceOfChatCompletionResponse(value) {
832
+ return true;
833
+ }
834
+ export function ChatCompletionResponseFromJSON(json) {
835
+ return ChatCompletionResponseFromJSONTyped(json, false);
836
+ }
837
+ export function ChatCompletionResponseFromJSONTyped(json, ignoreDiscriminator) {
838
+ if (json == null) {
839
+ return json;
840
+ }
841
+ return {
842
+ 'id': json['id'] == null ? undefined : json['id'],
843
+ 'object': json['object'] == null ? undefined : json['object'],
844
+ 'created': json['created'] == null ? undefined : json['created'],
845
+ 'model': json['model'] == null ? undefined : json['model'],
846
+ 'choices': json['choices'] == null ? undefined : (json['choices'].map(ChatCompletionResponseChoicesInnerFromJSON)),
847
+ 'usage': json['usage'] == null ? undefined : ChatCompletionResponseUsageFromJSON(json['usage']),
848
+ };
849
+ }
850
+ export function ChatCompletionResponseToJSON(value) {
851
+ if (value == null) {
852
+ return value;
853
+ }
854
+ return {
855
+ 'id': value['id'],
856
+ 'object': value['object'],
857
+ 'created': value['created'],
858
+ 'model': value['model'],
859
+ 'choices': value['choices'] == null ? undefined : (value['choices'].map(ChatCompletionResponseChoicesInnerToJSON)),
860
+ 'usage': ChatCompletionResponseUsageToJSON(value['usage']),
861
+ };
862
+ }
863
+ /**
864
+ * Check if a given object implements the ChatCompletionResponseChoicesInner interface.
865
+ */
866
+ export function instanceOfChatCompletionResponseChoicesInner(value) {
867
+ return true;
868
+ }
869
+ export function ChatCompletionResponseChoicesInnerFromJSON(json) {
870
+ return ChatCompletionResponseChoicesInnerFromJSONTyped(json, false);
871
+ }
872
+ export function ChatCompletionResponseChoicesInnerFromJSONTyped(json, ignoreDiscriminator) {
873
+ if (json == null) {
874
+ return json;
875
+ }
876
+ return {
877
+ 'index': json['index'] == null ? undefined : json['index'],
878
+ 'message': json['message'] == null ? undefined : ChatCompletionResponseChoicesInnerMessageFromJSON(json['message']),
879
+ 'finish_reason': json['finish_reason'] == null ? undefined : json['finish_reason'],
880
+ };
881
+ }
882
+ export function ChatCompletionResponseChoicesInnerToJSON(value) {
883
+ if (value == null) {
884
+ return value;
885
+ }
886
+ return {
887
+ 'index': value['index'],
888
+ 'message': ChatCompletionResponseChoicesInnerMessageToJSON(value['message']),
889
+ 'finish_reason': value['finish_reason'],
890
+ };
891
+ }
892
+ /**
893
+ * Check if a given object implements the ChatCompletionResponseChoicesInnerMessage interface.
894
+ */
895
+ export function instanceOfChatCompletionResponseChoicesInnerMessage(value) {
896
+ return true;
897
+ }
898
+ export function ChatCompletionResponseChoicesInnerMessageFromJSON(json) {
899
+ return ChatCompletionResponseChoicesInnerMessageFromJSONTyped(json, false);
900
+ }
901
+ export function ChatCompletionResponseChoicesInnerMessageFromJSONTyped(json, ignoreDiscriminator) {
902
+ if (json == null) {
903
+ return json;
904
+ }
905
+ return {
906
+ 'role': json['role'] == null ? undefined : json['role'],
907
+ 'content': json['content'] == null ? undefined : json['content'],
908
+ 'tool_calls': json['tool_calls'] == null ? undefined : (json['tool_calls'].map(ChatCompletionResponseChoicesInnerMessageToolCallsInnerFromJSON)),
909
+ };
910
+ }
911
+ export function ChatCompletionResponseChoicesInnerMessageToJSON(value) {
912
+ if (value == null) {
913
+ return value;
914
+ }
915
+ return {
916
+ 'role': value['role'],
917
+ 'content': value['content'],
918
+ 'tool_calls': value['tool_calls'] == null ? undefined : (value['tool_calls'].map(ChatCompletionResponseChoicesInnerMessageToolCallsInnerToJSON)),
919
+ };
920
+ }
921
+ /**
922
+ * Check if a given object implements the ChatCompletionResponseChoicesInnerMessageToolCallsInner interface.
923
+ */
924
+ export function instanceOfChatCompletionResponseChoicesInnerMessageToolCallsInner(value) {
925
+ return true;
926
+ }
927
+ export function ChatCompletionResponseChoicesInnerMessageToolCallsInnerFromJSON(json) {
928
+ return ChatCompletionResponseChoicesInnerMessageToolCallsInnerFromJSONTyped(json, false);
929
+ }
930
+ export function ChatCompletionResponseChoicesInnerMessageToolCallsInnerFromJSONTyped(json, ignoreDiscriminator) {
931
+ if (json == null) {
932
+ return json;
933
+ }
934
+ return {
935
+ 'id': json['id'] == null ? undefined : json['id'],
936
+ 'type': json['type'] == null ? undefined : json['type'],
937
+ '_function': json['function'] == null ? undefined : ChatCompletionResponseChoicesInnerMessageToolCallsInnerFunctionFromJSON(json['function']),
938
+ };
939
+ }
940
+ export function ChatCompletionResponseChoicesInnerMessageToolCallsInnerToJSON(value) {
941
+ if (value == null) {
942
+ return value;
943
+ }
944
+ return {
945
+ 'id': value['id'],
946
+ 'type': value['type'],
947
+ 'function': ChatCompletionResponseChoicesInnerMessageToolCallsInnerFunctionToJSON(value['_function']),
948
+ };
949
+ }
950
+ /**
951
+ * Check if a given object implements the ChatCompletionResponseChoicesInnerMessageToolCallsInnerFunction interface.
952
+ */
953
+ export function instanceOfChatCompletionResponseChoicesInnerMessageToolCallsInnerFunction(value) {
954
+ return true;
955
+ }
956
+ export function ChatCompletionResponseChoicesInnerMessageToolCallsInnerFunctionFromJSON(json) {
957
+ return ChatCompletionResponseChoicesInnerMessageToolCallsInnerFunctionFromJSONTyped(json, false);
958
+ }
959
+ export function ChatCompletionResponseChoicesInnerMessageToolCallsInnerFunctionFromJSONTyped(json, ignoreDiscriminator) {
960
+ if (json == null) {
961
+ return json;
962
+ }
963
+ return {
964
+ 'name': json['name'] == null ? undefined : json['name'],
965
+ 'arguments': json['arguments'] == null ? undefined : json['arguments'],
966
+ };
967
+ }
968
+ export function ChatCompletionResponseChoicesInnerMessageToolCallsInnerFunctionToJSON(value) {
969
+ if (value == null) {
970
+ return value;
971
+ }
972
+ return {
973
+ 'name': value['name'],
974
+ 'arguments': value['arguments'],
975
+ };
976
+ }
977
+ /**
978
+ * Check if a given object implements the ChatCompletionResponseUsage interface.
979
+ */
980
+ export function instanceOfChatCompletionResponseUsage(value) {
981
+ return true;
982
+ }
983
+ export function ChatCompletionResponseUsageFromJSON(json) {
984
+ return ChatCompletionResponseUsageFromJSONTyped(json, false);
985
+ }
986
+ export function ChatCompletionResponseUsageFromJSONTyped(json, ignoreDiscriminator) {
987
+ if (json == null) {
988
+ return json;
989
+ }
990
+ return {
991
+ 'prompt_tokens': json['prompt_tokens'] == null ? undefined : json['prompt_tokens'],
992
+ 'completion_tokens': json['completion_tokens'] == null ? undefined : json['completion_tokens'],
993
+ 'total_tokens': json['total_tokens'] == null ? undefined : json['total_tokens'],
994
+ };
995
+ }
996
+ export function ChatCompletionResponseUsageToJSON(value) {
997
+ if (value == null) {
998
+ return value;
999
+ }
1000
+ return {
1001
+ 'prompt_tokens': value['prompt_tokens'],
1002
+ 'completion_tokens': value['completion_tokens'],
1003
+ 'total_tokens': value['total_tokens'],
1004
+ };
1005
+ }
1006
+ /**
1007
+ * Check if a given object implements the CoexistenceCapabilityManifest interface.
1008
+ */
1009
+ export function instanceOfCoexistenceCapabilityManifest(value) {
1010
+ return true;
1011
+ }
1012
+ export function CoexistenceCapabilityManifestFromJSON(json) {
1013
+ return CoexistenceCapabilityManifestFromJSONTyped(json, false);
1014
+ }
1015
+ export function CoexistenceCapabilityManifestFromJSONTyped(json, ignoreDiscriminator) {
1016
+ if (json == null) {
1017
+ return json;
1018
+ }
1019
+ return {
1020
+ 'manifest_id': json['manifest_id'] == null ? undefined : json['manifest_id'],
1021
+ 'authority': json['authority'] == null ? undefined : json['authority'],
1022
+ 'boundary_role': json['boundary_role'] == null ? undefined : json['boundary_role'],
1023
+ 'supported_inputs': json['supported_inputs'] == null ? undefined : json['supported_inputs'],
1024
+ 'export_surfaces': json['export_surfaces'] == null ? undefined : json['export_surfaces'],
1025
+ 'receipt_bindings': json['receipt_bindings'] == null ? undefined : json['receipt_bindings'],
1026
+ 'generated_at': json['generated_at'] == null ? undefined : (new Date(json['generated_at'])),
1027
+ };
1028
+ }
1029
+ export function CoexistenceCapabilityManifestToJSON(value) {
1030
+ if (value == null) {
1031
+ return value;
1032
+ }
1033
+ return {
1034
+ 'manifest_id': value['manifest_id'],
1035
+ 'authority': value['authority'],
1036
+ 'boundary_role': value['boundary_role'],
1037
+ 'supported_inputs': value['supported_inputs'],
1038
+ 'export_surfaces': value['export_surfaces'],
1039
+ 'receipt_bindings': value['receipt_bindings'],
1040
+ 'generated_at': value['generated_at'] == null ? undefined : ((value['generated_at']).toISOString()),
1041
+ };
1042
+ }
1043
+ /**
1044
+ * @export
1045
+ */
1046
+ export const ConformanceRequestLevelEnum = {
1047
+ L1: 'L1',
1048
+ L2: 'L2'
1049
+ };
1050
+ /**
1051
+ * Check if a given object implements the ConformanceRequest interface.
1052
+ */
1053
+ export function instanceOfConformanceRequest(value) {
1054
+ if (!('level' in value))
1055
+ return false;
1056
+ return true;
1057
+ }
1058
+ export function ConformanceRequestFromJSON(json) {
1059
+ return ConformanceRequestFromJSONTyped(json, false);
1060
+ }
1061
+ export function ConformanceRequestFromJSONTyped(json, ignoreDiscriminator) {
1062
+ if (json == null) {
1063
+ return json;
1064
+ }
1065
+ return {
1066
+ 'level': json['level'],
1067
+ 'profile': json['profile'] == null ? undefined : json['profile'],
1068
+ };
1069
+ }
1070
+ export function ConformanceRequestToJSON(value) {
1071
+ if (value == null) {
1072
+ return value;
1073
+ }
1074
+ return {
1075
+ 'level': value['level'],
1076
+ 'profile': value['profile'],
1077
+ };
1078
+ }
1079
+ /**
1080
+ * @export
1081
+ */
1082
+ export const ConformanceResultVerdictEnum = {
1083
+ Pass: 'PASS',
1084
+ Fail: 'FAIL'
1085
+ };
1086
+ /**
1087
+ * Check if a given object implements the ConformanceResult interface.
1088
+ */
1089
+ export function instanceOfConformanceResult(value) {
1090
+ return true;
1091
+ }
1092
+ export function ConformanceResultFromJSON(json) {
1093
+ return ConformanceResultFromJSONTyped(json, false);
1094
+ }
1095
+ export function ConformanceResultFromJSONTyped(json, ignoreDiscriminator) {
1096
+ if (json == null) {
1097
+ return json;
1098
+ }
1099
+ return {
1100
+ 'report_id': json['report_id'] == null ? undefined : json['report_id'],
1101
+ 'level': json['level'] == null ? undefined : json['level'],
1102
+ 'verdict': json['verdict'] == null ? undefined : json['verdict'],
1103
+ 'gates': json['gates'] == null ? undefined : json['gates'],
1104
+ 'failed': json['failed'] == null ? undefined : json['failed'],
1105
+ 'details': json['details'] == null ? undefined : json['details'],
1106
+ };
1107
+ }
1108
+ export function ConformanceResultToJSON(value) {
1109
+ if (value == null) {
1110
+ return value;
1111
+ }
1112
+ return {
1113
+ 'report_id': value['report_id'],
1114
+ 'level': value['level'],
1115
+ 'verdict': value['verdict'],
1116
+ 'gates': value['gates'],
1117
+ 'failed': value['failed'],
1118
+ 'details': value['details'],
1119
+ };
1120
+ }
1121
+ /**
1122
+ * Check if a given object implements the ConsoleBootstrap interface.
1123
+ */
1124
+ export function instanceOfConsoleBootstrap(value) {
1125
+ if (!('version' in value))
1126
+ return false;
1127
+ if (!('workspace' in value))
1128
+ return false;
1129
+ if (!('health' in value))
1130
+ return false;
1131
+ if (!('counts' in value))
1132
+ return false;
1133
+ if (!('receipts' in value))
1134
+ return false;
1135
+ if (!('conformance' in value))
1136
+ return false;
1137
+ if (!('mcp' in value))
1138
+ return false;
1139
+ return true;
1140
+ }
1141
+ export function ConsoleBootstrapFromJSON(json) {
1142
+ return ConsoleBootstrapFromJSONTyped(json, false);
1143
+ }
1144
+ export function ConsoleBootstrapFromJSONTyped(json, ignoreDiscriminator) {
1145
+ if (json == null) {
1146
+ return json;
1147
+ }
1148
+ return {
1149
+ 'version': VersionInfoFromJSON(json['version']),
1150
+ 'workspace': ConsoleBootstrapWorkspaceFromJSON(json['workspace']),
1151
+ 'health': ConsoleBootstrapHealthFromJSON(json['health']),
1152
+ 'counts': ConsoleBootstrapCountsFromJSON(json['counts']),
1153
+ 'receipts': (json['receipts'].map(ReceiptFromJSON)),
1154
+ 'conformance': ConsoleBootstrapConformanceFromJSON(json['conformance']),
1155
+ 'mcp': ConsoleBootstrapMcpFromJSON(json['mcp']),
1156
+ };
1157
+ }
1158
+ export function ConsoleBootstrapToJSON(value) {
1159
+ if (value == null) {
1160
+ return value;
1161
+ }
1162
+ return {
1163
+ 'version': VersionInfoToJSON(value['version']),
1164
+ 'workspace': ConsoleBootstrapWorkspaceToJSON(value['workspace']),
1165
+ 'health': ConsoleBootstrapHealthToJSON(value['health']),
1166
+ 'counts': ConsoleBootstrapCountsToJSON(value['counts']),
1167
+ 'receipts': (value['receipts'].map(ReceiptToJSON)),
1168
+ 'conformance': ConsoleBootstrapConformanceToJSON(value['conformance']),
1169
+ 'mcp': ConsoleBootstrapMcpToJSON(value['mcp']),
1170
+ };
1171
+ }
1172
+ /**
1173
+ * Check if a given object implements the ConsoleBootstrapConformance interface.
1174
+ */
1175
+ export function instanceOfConsoleBootstrapConformance(value) {
1176
+ if (!('level' in value))
1177
+ return false;
1178
+ if (!('status' in value))
1179
+ return false;
1180
+ return true;
1181
+ }
1182
+ export function ConsoleBootstrapConformanceFromJSON(json) {
1183
+ return ConsoleBootstrapConformanceFromJSONTyped(json, false);
1184
+ }
1185
+ export function ConsoleBootstrapConformanceFromJSONTyped(json, ignoreDiscriminator) {
1186
+ if (json == null) {
1187
+ return json;
1188
+ }
1189
+ return {
1190
+ 'level': json['level'],
1191
+ 'status': json['status'],
1192
+ 'report_id': json['report_id'] == null ? undefined : json['report_id'],
1193
+ };
1194
+ }
1195
+ export function ConsoleBootstrapConformanceToJSON(value) {
1196
+ if (value == null) {
1197
+ return value;
1198
+ }
1199
+ return {
1200
+ 'level': value['level'],
1201
+ 'status': value['status'],
1202
+ 'report_id': value['report_id'],
1203
+ };
1204
+ }
1205
+ /**
1206
+ * Check if a given object implements the ConsoleBootstrapCounts interface.
1207
+ */
1208
+ export function instanceOfConsoleBootstrapCounts(value) {
1209
+ if (!('receipts' in value))
1210
+ return false;
1211
+ if (!('pending_approvals' in value))
1212
+ return false;
1213
+ if (!('open_incidents' in value))
1214
+ return false;
1215
+ if (!('mcp_tools' in value))
1216
+ return false;
1217
+ return true;
1218
+ }
1219
+ export function ConsoleBootstrapCountsFromJSON(json) {
1220
+ return ConsoleBootstrapCountsFromJSONTyped(json, false);
1221
+ }
1222
+ export function ConsoleBootstrapCountsFromJSONTyped(json, ignoreDiscriminator) {
1223
+ if (json == null) {
1224
+ return json;
1225
+ }
1226
+ return {
1227
+ 'receipts': json['receipts'],
1228
+ 'pending_approvals': json['pending_approvals'],
1229
+ 'open_incidents': json['open_incidents'],
1230
+ 'mcp_tools': json['mcp_tools'],
1231
+ };
1232
+ }
1233
+ export function ConsoleBootstrapCountsToJSON(value) {
1234
+ if (value == null) {
1235
+ return value;
1236
+ }
1237
+ return {
1238
+ 'receipts': value['receipts'],
1239
+ 'pending_approvals': value['pending_approvals'],
1240
+ 'open_incidents': value['open_incidents'],
1241
+ 'mcp_tools': value['mcp_tools'],
1242
+ };
1243
+ }
1244
+ /**
1245
+ * Check if a given object implements the ConsoleBootstrapHealth interface.
1246
+ */
1247
+ export function instanceOfConsoleBootstrapHealth(value) {
1248
+ if (!('kernel' in value))
1249
+ return false;
1250
+ if (!('policy' in value))
1251
+ return false;
1252
+ if (!('store' in value))
1253
+ return false;
1254
+ if (!('conformance' in value))
1255
+ return false;
1256
+ return true;
1257
+ }
1258
+ export function ConsoleBootstrapHealthFromJSON(json) {
1259
+ return ConsoleBootstrapHealthFromJSONTyped(json, false);
1260
+ }
1261
+ export function ConsoleBootstrapHealthFromJSONTyped(json, ignoreDiscriminator) {
1262
+ if (json == null) {
1263
+ return json;
1264
+ }
1265
+ return {
1266
+ 'kernel': json['kernel'],
1267
+ 'policy': json['policy'],
1268
+ 'store': json['store'],
1269
+ 'conformance': json['conformance'],
1270
+ };
1271
+ }
1272
+ export function ConsoleBootstrapHealthToJSON(value) {
1273
+ if (value == null) {
1274
+ return value;
1275
+ }
1276
+ return {
1277
+ 'kernel': value['kernel'],
1278
+ 'policy': value['policy'],
1279
+ 'store': value['store'],
1280
+ 'conformance': value['conformance'],
1281
+ };
1282
+ }
1283
+ /**
1284
+ * Check if a given object implements the ConsoleBootstrapMcp interface.
1285
+ */
1286
+ export function instanceOfConsoleBootstrapMcp(value) {
1287
+ if (!('authorization' in value))
1288
+ return false;
1289
+ if (!('scopes' in value))
1290
+ return false;
1291
+ return true;
1292
+ }
1293
+ export function ConsoleBootstrapMcpFromJSON(json) {
1294
+ return ConsoleBootstrapMcpFromJSONTyped(json, false);
1295
+ }
1296
+ export function ConsoleBootstrapMcpFromJSONTyped(json, ignoreDiscriminator) {
1297
+ if (json == null) {
1298
+ return json;
1299
+ }
1300
+ return {
1301
+ 'authorization': json['authorization'],
1302
+ 'scopes': json['scopes'],
1303
+ };
1304
+ }
1305
+ export function ConsoleBootstrapMcpToJSON(value) {
1306
+ if (value == null) {
1307
+ return value;
1308
+ }
1309
+ return {
1310
+ 'authorization': value['authorization'],
1311
+ 'scopes': value['scopes'],
1312
+ };
1313
+ }
1314
+ /**
1315
+ * Check if a given object implements the ConsoleBootstrapWorkspace interface.
1316
+ */
1317
+ export function instanceOfConsoleBootstrapWorkspace(value) {
1318
+ if (!('organization' in value))
1319
+ return false;
1320
+ if (!('project' in value))
1321
+ return false;
1322
+ if (!('environment' in value))
1323
+ return false;
1324
+ if (!('mode' in value))
1325
+ return false;
1326
+ return true;
1327
+ }
1328
+ export function ConsoleBootstrapWorkspaceFromJSON(json) {
1329
+ return ConsoleBootstrapWorkspaceFromJSONTyped(json, false);
1330
+ }
1331
+ export function ConsoleBootstrapWorkspaceFromJSONTyped(json, ignoreDiscriminator) {
1332
+ if (json == null) {
1333
+ return json;
1334
+ }
1335
+ return {
1336
+ 'organization': json['organization'],
1337
+ 'project': json['project'],
1338
+ 'environment': json['environment'],
1339
+ 'mode': json['mode'],
1340
+ };
1341
+ }
1342
+ export function ConsoleBootstrapWorkspaceToJSON(value) {
1343
+ if (value == null) {
1344
+ return value;
1345
+ }
1346
+ return {
1347
+ 'organization': value['organization'],
1348
+ 'project': value['project'],
1349
+ 'environment': value['environment'],
1350
+ 'mode': value['mode'],
1351
+ };
1352
+ }
1353
+ /**
1354
+ * Check if a given object implements the ConsoleSurfaceRef interface.
1355
+ */
1356
+ export function instanceOfConsoleSurfaceRef(value) {
1357
+ if (!('id' in value))
1358
+ return false;
1359
+ if (!('source' in value))
1360
+ return false;
1361
+ return true;
1362
+ }
1363
+ export function ConsoleSurfaceRefFromJSON(json) {
1364
+ return ConsoleSurfaceRefFromJSONTyped(json, false);
1365
+ }
1366
+ export function ConsoleSurfaceRefFromJSONTyped(json, ignoreDiscriminator) {
1367
+ if (json == null) {
1368
+ return json;
1369
+ }
1370
+ return {
1371
+ 'id': json['id'],
1372
+ 'source': json['source'],
1373
+ };
1374
+ }
1375
+ export function ConsoleSurfaceRefToJSON(value) {
1376
+ if (value == null) {
1377
+ return value;
1378
+ }
1379
+ return {
1380
+ 'id': value['id'],
1381
+ 'source': value['source'],
1382
+ };
1383
+ }
1384
+ /**
1385
+ * Check if a given object implements the ConsoleSurfaceState interface.
1386
+ */
1387
+ export function instanceOfConsoleSurfaceState(value) {
1388
+ if (!('id' in value))
1389
+ return false;
1390
+ if (!('status' in value))
1391
+ return false;
1392
+ if (!('source' in value))
1393
+ return false;
1394
+ if (!('generated_at' in value))
1395
+ return false;
1396
+ return true;
1397
+ }
1398
+ export function ConsoleSurfaceStateFromJSON(json) {
1399
+ return ConsoleSurfaceStateFromJSONTyped(json, false);
1400
+ }
1401
+ export function ConsoleSurfaceStateFromJSONTyped(json, ignoreDiscriminator) {
1402
+ if (json == null) {
1403
+ return json;
1404
+ }
1405
+ return {
1406
+ 'id': json['id'],
1407
+ 'status': json['status'],
1408
+ 'source': json['source'],
1409
+ 'generated_at': (new Date(json['generated_at'])),
1410
+ 'summary': json['summary'] == null ? undefined : json['summary'],
1411
+ 'records': json['records'] == null ? undefined : json['records'],
1412
+ };
1413
+ }
1414
+ export function ConsoleSurfaceStateToJSON(value) {
1415
+ if (value == null) {
1416
+ return value;
1417
+ }
1418
+ return {
1419
+ 'id': value['id'],
1420
+ 'status': value['status'],
1421
+ 'source': value['source'],
1422
+ 'generated_at': ((value['generated_at']).toISOString()),
1423
+ 'summary': value['summary'],
1424
+ 'records': value['records'],
1425
+ };
1426
+ }
1427
+ /**
1428
+ * Check if a given object implements the CreateApprovalWebAuthnChallengeRequest interface.
1429
+ */
1430
+ export function instanceOfCreateApprovalWebAuthnChallengeRequest(value) {
1431
+ return true;
1432
+ }
1433
+ export function CreateApprovalWebAuthnChallengeRequestFromJSON(json) {
1434
+ return CreateApprovalWebAuthnChallengeRequestFromJSONTyped(json, false);
1435
+ }
1436
+ export function CreateApprovalWebAuthnChallengeRequestFromJSONTyped(json, ignoreDiscriminator) {
1437
+ if (json == null) {
1438
+ return json;
1439
+ }
1440
+ return {
1441
+ 'method': json['method'] == null ? undefined : json['method'],
1442
+ 'ttl_ms': json['ttl_ms'] == null ? undefined : json['ttl_ms'],
1443
+ };
1444
+ }
1445
+ export function CreateApprovalWebAuthnChallengeRequestToJSON(value) {
1446
+ if (value == null) {
1447
+ return value;
1448
+ }
1449
+ return {
1450
+ 'method': value['method'],
1451
+ 'ttl_ms': value['ttl_ms'],
1452
+ };
1453
+ }
1454
+ /**
1455
+ * Check if a given object implements the CreateSandboxGrantRequest interface.
1456
+ */
1457
+ export function instanceOfCreateSandboxGrantRequest(value) {
1458
+ return true;
1459
+ }
1460
+ export function CreateSandboxGrantRequestFromJSON(json) {
1461
+ return CreateSandboxGrantRequestFromJSONTyped(json, false);
1462
+ }
1463
+ export function CreateSandboxGrantRequestFromJSONTyped(json, ignoreDiscriminator) {
1464
+ if (json == null) {
1465
+ return json;
1466
+ }
1467
+ return {
1468
+ 'runtime': json['runtime'] == null ? undefined : json['runtime'],
1469
+ 'profile': json['profile'] == null ? undefined : json['profile'],
1470
+ 'image_digest': json['image_digest'] == null ? undefined : json['image_digest'],
1471
+ 'policy_epoch': json['policy_epoch'] == null ? undefined : json['policy_epoch'],
1472
+ };
1473
+ }
1474
+ export function CreateSandboxGrantRequestToJSON(value) {
1475
+ if (value == null) {
1476
+ return value;
1477
+ }
1478
+ return {
1479
+ 'runtime': value['runtime'],
1480
+ 'profile': value['profile'],
1481
+ 'image_digest': value['image_digest'],
1482
+ 'policy_epoch': value['policy_epoch'],
1483
+ };
1484
+ }
1485
+ /**
1486
+ * Check if a given object implements the DecisionRecord interface.
1487
+ */
1488
+ export function instanceOfDecisionRecord(value) {
1489
+ return true;
1490
+ }
1491
+ export function DecisionRecordFromJSON(json) {
1492
+ return DecisionRecordFromJSONTyped(json, false);
1493
+ }
1494
+ export function DecisionRecordFromJSONTyped(json, ignoreDiscriminator) {
1495
+ if (json == null) {
1496
+ return json;
1497
+ }
1498
+ return {
1499
+ 'id': json['id'] == null ? undefined : json['id'],
1500
+ 'action': json['action'] == null ? undefined : json['action'],
1501
+ 'resource': json['resource'] == null ? undefined : json['resource'],
1502
+ 'verdict': json['verdict'] == null ? undefined : json['verdict'],
1503
+ 'reason': json['reason'] == null ? undefined : json['reason'],
1504
+ 'policy_version': json['policy_version'] == null ? undefined : json['policy_version'],
1505
+ 'policy_decision_hash': json['policy_decision_hash'] == null ? undefined : json['policy_decision_hash'],
1506
+ 'signature': json['signature'] == null ? undefined : json['signature'],
1507
+ };
1508
+ }
1509
+ export function DecisionRecordToJSON(value) {
1510
+ if (value == null) {
1511
+ return value;
1512
+ }
1513
+ return {
1514
+ 'id': value['id'],
1515
+ 'action': value['action'],
1516
+ 'resource': value['resource'],
1517
+ 'verdict': value['verdict'],
1518
+ 'reason': value['reason'],
1519
+ 'policy_version': value['policy_version'],
1520
+ 'policy_decision_hash': value['policy_decision_hash'],
1521
+ 'signature': value['signature'],
1522
+ };
1523
+ }
1524
+ /**
1525
+ * Check if a given object implements the DecisionRequest interface.
1526
+ */
1527
+ export function instanceOfDecisionRequest(value) {
1528
+ if (!('action' in value))
1529
+ return false;
1530
+ if (!('resource' in value))
1531
+ return false;
1532
+ return true;
1533
+ }
1534
+ export function DecisionRequestFromJSON(json) {
1535
+ return DecisionRequestFromJSONTyped(json, false);
1536
+ }
1537
+ export function DecisionRequestFromJSONTyped(json, ignoreDiscriminator) {
1538
+ if (json == null) {
1539
+ return json;
1540
+ }
1541
+ return {
1542
+ 'principal': json['principal'] == null ? undefined : json['principal'],
1543
+ 'action': json['action'],
1544
+ 'resource': json['resource'],
1545
+ 'context': json['context'] == null ? undefined : json['context'],
1546
+ };
1547
+ }
1548
+ export function DecisionRequestToJSON(value) {
1549
+ if (value == null) {
1550
+ return value;
1551
+ }
1552
+ return {
1553
+ 'principal': value['principal'],
1554
+ 'action': value['action'],
1555
+ 'resource': value['resource'],
1556
+ 'context': value['context'],
1557
+ };
1558
+ }
1559
+ /**
1560
+ * Check if a given object implements the Effect interface.
1561
+ */
1562
+ export function instanceOfEffect(value) {
1563
+ if (!('effect_type' in value))
1564
+ return false;
1565
+ if (!('effect_id' in value))
1566
+ return false;
1567
+ if (!('params' in value))
1568
+ return false;
1569
+ return true;
1570
+ }
1571
+ export function EffectFromJSON(json) {
1572
+ return EffectFromJSONTyped(json, false);
1573
+ }
1574
+ export function EffectFromJSONTyped(json, ignoreDiscriminator) {
1575
+ if (json == null) {
1576
+ return json;
1577
+ }
1578
+ return {
1579
+ 'effect_type': json['effect_type'],
1580
+ 'effect_id': json['effect_id'],
1581
+ 'params': json['params'],
1582
+ 'budget_id': json['budget_id'] == null ? undefined : json['budget_id'],
1583
+ };
1584
+ }
1585
+ export function EffectToJSON(value) {
1586
+ if (value == null) {
1587
+ return value;
1588
+ }
1589
+ return {
1590
+ 'effect_type': value['effect_type'],
1591
+ 'effect_id': value['effect_id'],
1592
+ 'params': value['params'],
1593
+ 'budget_id': value['budget_id'],
1594
+ };
1595
+ }
1596
+ /**
1597
+ * Check if a given object implements the EffectBoundary interface.
1598
+ */
1599
+ export function instanceOfEffectBoundary(value) {
1600
+ if (!('effect' in value))
1601
+ return false;
1602
+ if (!('principal' in value))
1603
+ return false;
1604
+ return true;
1605
+ }
1606
+ export function EffectBoundaryFromJSON(json) {
1607
+ return EffectBoundaryFromJSONTyped(json, false);
1608
+ }
1609
+ export function EffectBoundaryFromJSONTyped(json, ignoreDiscriminator) {
1610
+ if (json == null) {
1611
+ return json;
1612
+ }
1613
+ return {
1614
+ 'effect': EffectFromJSON(json['effect']),
1615
+ 'principal': json['principal'],
1616
+ 'context': json['context'] == null ? undefined : json['context'],
1617
+ };
1618
+ }
1619
+ export function EffectBoundaryToJSON(value) {
1620
+ if (value == null) {
1621
+ return value;
1622
+ }
1623
+ return {
1624
+ 'effect': EffectToJSON(value['effect']),
1625
+ 'principal': value['principal'],
1626
+ 'context': value['context'],
1627
+ };
1628
+ }
1629
+ /**
1630
+ * @export
1631
+ */
1632
+ export const EnvExposurePolicyModeEnum = {
1633
+ DenyAll: 'deny-all',
1634
+ Allowlist: 'allowlist',
1635
+ Redacted: 'redacted'
1636
+ };
1637
+ /**
1638
+ * Check if a given object implements the EnvExposurePolicy interface.
1639
+ */
1640
+ export function instanceOfEnvExposurePolicy(value) {
1641
+ if (!('mode' in value))
1642
+ return false;
1643
+ return true;
1644
+ }
1645
+ export function EnvExposurePolicyFromJSON(json) {
1646
+ return EnvExposurePolicyFromJSONTyped(json, false);
1647
+ }
1648
+ export function EnvExposurePolicyFromJSONTyped(json, ignoreDiscriminator) {
1649
+ if (json == null) {
1650
+ return json;
1651
+ }
1652
+ return {
1653
+ 'mode': json['mode'],
1654
+ 'names': json['names'] == null ? undefined : json['names'],
1655
+ 'names_hash': json['names_hash'] == null ? undefined : json['names_hash'],
1656
+ 'redacted': json['redacted'] == null ? undefined : json['redacted'],
1657
+ };
1658
+ }
1659
+ export function EnvExposurePolicyToJSON(value) {
1660
+ if (value == null) {
1661
+ return value;
1662
+ }
1663
+ return {
1664
+ 'mode': value['mode'],
1665
+ 'names': value['names'],
1666
+ 'names_hash': value['names_hash'],
1667
+ 'redacted': value['redacted'],
1668
+ };
1669
+ }
1670
+ /**
1671
+ * @export
1672
+ */
1673
+ export const EvidenceEnvelopeExportRequestEnvelopeEnum = {
1674
+ Dsse: 'dsse',
1675
+ Jws: 'jws',
1676
+ InToto: 'in-toto',
1677
+ Slsa: 'slsa',
1678
+ Sigstore: 'sigstore',
1679
+ Scitt: 'scitt',
1680
+ Cose: 'cose'
1681
+ };
1682
+ /**
1683
+ * Check if a given object implements the EvidenceEnvelopeExportRequest interface.
1684
+ */
1685
+ export function instanceOfEvidenceEnvelopeExportRequest(value) {
1686
+ if (!('manifest_id' in value))
1687
+ return false;
1688
+ if (!('envelope' in value))
1689
+ return false;
1690
+ if (!('native_evidence_hash' in value))
1691
+ return false;
1692
+ return true;
1693
+ }
1694
+ export function EvidenceEnvelopeExportRequestFromJSON(json) {
1695
+ return EvidenceEnvelopeExportRequestFromJSONTyped(json, false);
1696
+ }
1697
+ export function EvidenceEnvelopeExportRequestFromJSONTyped(json, ignoreDiscriminator) {
1698
+ if (json == null) {
1699
+ return json;
1700
+ }
1701
+ return {
1702
+ 'manifest_id': json['manifest_id'],
1703
+ 'envelope': json['envelope'],
1704
+ 'native_evidence_hash': json['native_evidence_hash'],
1705
+ 'subject': json['subject'] == null ? undefined : json['subject'],
1706
+ 'experimental': json['experimental'] == null ? undefined : json['experimental'],
1707
+ };
1708
+ }
1709
+ export function EvidenceEnvelopeExportRequestToJSON(value) {
1710
+ if (value == null) {
1711
+ return value;
1712
+ }
1713
+ return {
1714
+ 'manifest_id': value['manifest_id'],
1715
+ 'envelope': value['envelope'],
1716
+ 'native_evidence_hash': value['native_evidence_hash'],
1717
+ 'subject': value['subject'],
1718
+ 'experimental': value['experimental'],
1719
+ };
1720
+ }
1721
+ /**
1722
+ * @export
1723
+ */
1724
+ export const EvidenceEnvelopeManifestEnvelopeEnum = {
1725
+ Dsse: 'dsse',
1726
+ Jws: 'jws',
1727
+ InToto: 'in-toto',
1728
+ Slsa: 'slsa',
1729
+ Sigstore: 'sigstore',
1730
+ Scitt: 'scitt',
1731
+ Cose: 'cose'
1732
+ };
1733
+ /**
1734
+ * Check if a given object implements the EvidenceEnvelopeManifest interface.
1735
+ */
1736
+ export function instanceOfEvidenceEnvelopeManifest(value) {
1737
+ if (!('manifest_id' in value))
1738
+ return false;
1739
+ if (!('envelope' in value))
1740
+ return false;
1741
+ if (!('native_evidence_hash' in value))
1742
+ return false;
1743
+ if (!('native_authority' in value))
1744
+ return false;
1745
+ if (!('created_at' in value))
1746
+ return false;
1747
+ return true;
1748
+ }
1749
+ export function EvidenceEnvelopeManifestFromJSON(json) {
1750
+ return EvidenceEnvelopeManifestFromJSONTyped(json, false);
1751
+ }
1752
+ export function EvidenceEnvelopeManifestFromJSONTyped(json, ignoreDiscriminator) {
1753
+ if (json == null) {
1754
+ return json;
1755
+ }
1756
+ return {
1757
+ 'manifest_id': json['manifest_id'],
1758
+ 'envelope': json['envelope'],
1759
+ 'native_evidence_hash': json['native_evidence_hash'],
1760
+ 'native_authority': json['native_authority'],
1761
+ 'subject': json['subject'] == null ? undefined : json['subject'],
1762
+ 'statement_hash': json['statement_hash'] == null ? undefined : json['statement_hash'],
1763
+ 'experimental': json['experimental'] == null ? undefined : json['experimental'],
1764
+ 'created_at': (new Date(json['created_at'])),
1765
+ 'manifest_hash': json['manifest_hash'] == null ? undefined : json['manifest_hash'],
1766
+ };
1767
+ }
1768
+ export function EvidenceEnvelopeManifestToJSON(value) {
1769
+ if (value == null) {
1770
+ return value;
1771
+ }
1772
+ return {
1773
+ 'manifest_id': value['manifest_id'],
1774
+ 'envelope': value['envelope'],
1775
+ 'native_evidence_hash': value['native_evidence_hash'],
1776
+ 'native_authority': value['native_authority'],
1777
+ 'subject': value['subject'],
1778
+ 'statement_hash': value['statement_hash'],
1779
+ 'experimental': value['experimental'],
1780
+ 'created_at': ((value['created_at']).toISOString()),
1781
+ 'manifest_hash': value['manifest_hash'],
1782
+ };
1783
+ }
1784
+ /**
1785
+ * Check if a given object implements the EvidenceEnvelopeVerification interface.
1786
+ */
1787
+ export function instanceOfEvidenceEnvelopeVerification(value) {
1788
+ return true;
1789
+ }
1790
+ export function EvidenceEnvelopeVerificationFromJSON(json) {
1791
+ return EvidenceEnvelopeVerificationFromJSONTyped(json, false);
1792
+ }
1793
+ export function EvidenceEnvelopeVerificationFromJSONTyped(json, ignoreDiscriminator) {
1794
+ if (json == null) {
1795
+ return json;
1796
+ }
1797
+ return {
1798
+ 'manifest_id': json['manifest_id'] == null ? undefined : json['manifest_id'],
1799
+ 'manifest_hash': json['manifest_hash'] == null ? undefined : json['manifest_hash'],
1800
+ 'native_evidence_hash': json['native_evidence_hash'] == null ? undefined : json['native_evidence_hash'],
1801
+ 'verified': json['verified'] == null ? undefined : json['verified'],
1802
+ 'authoritative': json['authoritative'] == null ? undefined : json['authoritative'],
1803
+ 'errors': json['errors'] == null ? undefined : json['errors'],
1804
+ 'checked_at': json['checked_at'] == null ? undefined : (new Date(json['checked_at'])),
1805
+ };
1806
+ }
1807
+ export function EvidenceEnvelopeVerificationToJSON(value) {
1808
+ if (value == null) {
1809
+ return value;
1810
+ }
1811
+ return {
1812
+ 'manifest_id': value['manifest_id'],
1813
+ 'manifest_hash': value['manifest_hash'],
1814
+ 'native_evidence_hash': value['native_evidence_hash'],
1815
+ 'verified': value['verified'],
1816
+ 'authoritative': value['authoritative'],
1817
+ 'errors': value['errors'],
1818
+ 'checked_at': value['checked_at'] == null ? undefined : ((value['checked_at']).toISOString()),
1819
+ };
1820
+ }
1821
+ /**
1822
+ * @export
1823
+ */
1824
+ export const ExecutionBoundaryRecordVerdictEnum = {
1825
+ Allow: 'ALLOW',
1826
+ Deny: 'DENY',
1827
+ Escalate: 'ESCALATE'
1828
+ };
1829
+ /**
1830
+ * Check if a given object implements the ExecutionBoundaryRecord interface.
1831
+ */
1832
+ export function instanceOfExecutionBoundaryRecord(value) {
1833
+ return true;
1834
+ }
1835
+ export function ExecutionBoundaryRecordFromJSON(json) {
1836
+ return ExecutionBoundaryRecordFromJSONTyped(json, false);
1837
+ }
1838
+ export function ExecutionBoundaryRecordFromJSONTyped(json, ignoreDiscriminator) {
1839
+ if (json == null) {
1840
+ return json;
1841
+ }
1842
+ return {
1843
+ 'record_id': json['record_id'] == null ? undefined : json['record_id'],
1844
+ 'verdict': json['verdict'] == null ? undefined : json['verdict'],
1845
+ 'reason_code': json['reason_code'] == null ? undefined : json['reason_code'],
1846
+ 'tool_name': json['tool_name'] == null ? undefined : json['tool_name'],
1847
+ 'args_hash': json['args_hash'] == null ? undefined : json['args_hash'],
1848
+ 'policy_epoch': json['policy_epoch'] == null ? undefined : json['policy_epoch'],
1849
+ 'mcp_server_id': json['mcp_server_id'] == null ? undefined : json['mcp_server_id'],
1850
+ 'oauth_resource': json['oauth_resource'] == null ? undefined : json['oauth_resource'],
1851
+ 'oauth_scopes': json['oauth_scopes'] == null ? undefined : json['oauth_scopes'],
1852
+ 'sandbox_grant_hash': json['sandbox_grant_hash'] == null ? undefined : json['sandbox_grant_hash'],
1853
+ 'authz_snapshot_hash': json['authz_snapshot_hash'] == null ? undefined : json['authz_snapshot_hash'],
1854
+ 'approval_receipt_id': json['approval_receipt_id'] == null ? undefined : json['approval_receipt_id'],
1855
+ 'receipt_id': json['receipt_id'] == null ? undefined : json['receipt_id'],
1856
+ 'record_hash': json['record_hash'] == null ? undefined : json['record_hash'],
1857
+ 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
1858
+ };
1859
+ }
1860
+ export function ExecutionBoundaryRecordToJSON(value) {
1861
+ if (value == null) {
1862
+ return value;
1863
+ }
1864
+ return {
1865
+ 'record_id': value['record_id'],
1866
+ 'verdict': value['verdict'],
1867
+ 'reason_code': value['reason_code'],
1868
+ 'tool_name': value['tool_name'],
1869
+ 'args_hash': value['args_hash'],
1870
+ 'policy_epoch': value['policy_epoch'],
1871
+ 'mcp_server_id': value['mcp_server_id'],
1872
+ 'oauth_resource': value['oauth_resource'],
1873
+ 'oauth_scopes': value['oauth_scopes'],
1874
+ 'sandbox_grant_hash': value['sandbox_grant_hash'],
1875
+ 'authz_snapshot_hash': value['authz_snapshot_hash'],
1876
+ 'approval_receipt_id': value['approval_receipt_id'],
1877
+ 'receipt_id': value['receipt_id'],
1878
+ 'record_hash': value['record_hash'],
1879
+ 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()),
1880
+ };
1881
+ }
1882
+ /**
1883
+ * @export
1884
+ */
1885
+ export const ExportRequestFormatEnum = {
1886
+ TarGz: 'tar.gz'
1887
+ };
1888
+ /**
1889
+ * Check if a given object implements the ExportRequest interface.
1890
+ */
1891
+ export function instanceOfExportRequest(value) {
1892
+ return true;
1893
+ }
1894
+ export function ExportRequestFromJSON(json) {
1895
+ return ExportRequestFromJSONTyped(json, false);
1896
+ }
1897
+ export function ExportRequestFromJSONTyped(json, ignoreDiscriminator) {
1898
+ if (json == null) {
1899
+ return json;
1900
+ }
1901
+ return {
1902
+ 'session_id': json['session_id'] == null ? undefined : json['session_id'],
1903
+ 'format': json['format'] == null ? undefined : json['format'],
1904
+ };
1905
+ }
1906
+ export function ExportRequestToJSON(value) {
1907
+ if (value == null) {
1908
+ return value;
1909
+ }
1910
+ return {
1911
+ 'session_id': value['session_id'],
1912
+ 'format': value['format'],
1913
+ };
1914
+ }
1915
+ /**
1916
+ * @export
1917
+ */
1918
+ export const FilesystemPreopenModeEnum = {
1919
+ Ro: 'ro',
1920
+ Rw: 'rw'
1921
+ };
1922
+ /**
1923
+ * Check if a given object implements the FilesystemPreopen interface.
1924
+ */
1925
+ export function instanceOfFilesystemPreopen(value) {
1926
+ if (!('path' in value))
1927
+ return false;
1928
+ if (!('mode' in value))
1929
+ return false;
1930
+ return true;
1931
+ }
1932
+ export function FilesystemPreopenFromJSON(json) {
1933
+ return FilesystemPreopenFromJSONTyped(json, false);
1934
+ }
1935
+ export function FilesystemPreopenFromJSONTyped(json, ignoreDiscriminator) {
1936
+ if (json == null) {
1937
+ return json;
1938
+ }
1939
+ return {
1940
+ 'path': json['path'],
1941
+ 'mode': json['mode'],
1942
+ 'content_hash': json['content_hash'] == null ? undefined : json['content_hash'],
1943
+ };
1944
+ }
1945
+ export function FilesystemPreopenToJSON(value) {
1946
+ if (value == null) {
1947
+ return value;
1948
+ }
1949
+ return {
1950
+ 'path': value['path'],
1951
+ 'mode': value['mode'],
1952
+ 'content_hash': value['content_hash'],
1953
+ };
1954
+ }
1955
+ /**
1956
+ * Check if a given object implements the GetAgentUIRuntimeInfo200Response interface.
1957
+ */
1958
+ export function instanceOfGetAgentUIRuntimeInfo200Response(value) {
1959
+ if (!('runtime' in value))
1960
+ return false;
1961
+ if (!('protocol' in value))
1962
+ return false;
1963
+ if (!('transport' in value))
1964
+ return false;
1965
+ if (!('tools' in value))
1966
+ return false;
1967
+ return true;
1968
+ }
1969
+ export function GetAgentUIRuntimeInfo200ResponseFromJSON(json) {
1970
+ return GetAgentUIRuntimeInfo200ResponseFromJSONTyped(json, false);
1971
+ }
1972
+ export function GetAgentUIRuntimeInfo200ResponseFromJSONTyped(json, ignoreDiscriminator) {
1973
+ if (json == null) {
1974
+ return json;
1975
+ }
1976
+ return {
1977
+ 'runtime': json['runtime'],
1978
+ 'protocol': json['protocol'],
1979
+ 'transport': json['transport'],
1980
+ 'tools': json['tools'],
1981
+ };
1982
+ }
1983
+ export function GetAgentUIRuntimeInfo200ResponseToJSON(value) {
1984
+ if (value == null) {
1985
+ return value;
1986
+ }
1987
+ return {
1988
+ 'runtime': value['runtime'],
1989
+ 'protocol': value['protocol'],
1990
+ 'transport': value['transport'],
1991
+ 'tools': value['tools'],
1992
+ };
1993
+ }
1994
+ /**
1995
+ * Check if a given object implements the GetPublicDemoHealth200Response interface.
1996
+ */
1997
+ export function instanceOfGetPublicDemoHealth200Response(value) {
1998
+ if (!('version' in value))
1999
+ return false;
2000
+ if (!('commit' in value))
2001
+ return false;
2002
+ if (!('helm_ai_kernel_version' in value))
2003
+ return false;
2004
+ if (!('status' in value))
2005
+ return false;
2006
+ if (!('build_time' in value))
2007
+ return false;
2008
+ if (!('git_sha' in value))
2009
+ return false;
2010
+ if (!('deployment_id' in value))
2011
+ return false;
2012
+ return true;
2013
+ }
2014
+ export function GetPublicDemoHealth200ResponseFromJSON(json) {
2015
+ return GetPublicDemoHealth200ResponseFromJSONTyped(json, false);
2016
+ }
2017
+ export function GetPublicDemoHealth200ResponseFromJSONTyped(json, ignoreDiscriminator) {
2018
+ if (json == null) {
2019
+ return json;
2020
+ }
2021
+ return {
2022
+ 'version': json['version'],
2023
+ 'commit': json['commit'],
2024
+ 'helm_ai_kernel_version': json['helm_ai_kernel_version'],
2025
+ 'status': json['status'],
2026
+ 'build_time': json['build_time'],
2027
+ 'git_sha': json['git_sha'],
2028
+ 'deployment_id': json['deployment_id'],
2029
+ };
2030
+ }
2031
+ export function GetPublicDemoHealth200ResponseToJSON(value) {
2032
+ if (value == null) {
2033
+ return value;
2034
+ }
2035
+ return {
2036
+ 'version': value['version'],
2037
+ 'commit': value['commit'],
2038
+ 'helm_ai_kernel_version': value['helm_ai_kernel_version'],
2039
+ 'status': value['status'],
2040
+ 'build_time': value['build_time'],
2041
+ 'git_sha': value['git_sha'],
2042
+ 'deployment_id': value['deployment_id'],
2043
+ };
2044
+ }
2045
+ /**
2046
+ * @export
2047
+ */
2048
+ export const GovernanceDecisionVerdictEnum = {
2049
+ Allow: 'ALLOW',
2050
+ Deny: 'DENY',
2051
+ Escalate: 'ESCALATE'
2052
+ };
2053
+ /**
2054
+ * Check if a given object implements the GovernanceDecision interface.
2055
+ */
2056
+ export function instanceOfGovernanceDecision(value) {
2057
+ if (!('decision_id' in value))
2058
+ return false;
2059
+ if (!('effect_id' in value))
2060
+ return false;
2061
+ if (!('verdict' in value))
2062
+ return false;
2063
+ return true;
2064
+ }
2065
+ export function GovernanceDecisionFromJSON(json) {
2066
+ return GovernanceDecisionFromJSONTyped(json, false);
2067
+ }
2068
+ export function GovernanceDecisionFromJSONTyped(json, ignoreDiscriminator) {
2069
+ if (json == null) {
2070
+ return json;
2071
+ }
2072
+ return {
2073
+ 'decision_id': json['decision_id'],
2074
+ 'effect_id': json['effect_id'],
2075
+ 'verdict': json['verdict'],
2076
+ 'reason_code': json['reason_code'] == null ? undefined : json['reason_code'],
2077
+ 'receipt': json['receipt'] == null ? undefined : ReceiptFromJSON(json['receipt']),
2078
+ 'active_packs': json['active_packs'] == null ? undefined : json['active_packs'],
2079
+ };
2080
+ }
2081
+ export function GovernanceDecisionToJSON(value) {
2082
+ if (value == null) {
2083
+ return value;
2084
+ }
2085
+ return {
2086
+ 'decision_id': value['decision_id'],
2087
+ 'effect_id': value['effect_id'],
2088
+ 'verdict': value['verdict'],
2089
+ 'reason_code': value['reason_code'],
2090
+ 'receipt': ReceiptToJSON(value['receipt']),
2091
+ 'active_packs': value['active_packs'],
2092
+ };
2093
+ }
2094
+ /**
2095
+ * Check if a given object implements the HealthCheck200Response interface.
2096
+ */
2097
+ export function instanceOfHealthCheck200Response(value) {
2098
+ return true;
2099
+ }
2100
+ export function HealthCheck200ResponseFromJSON(json) {
2101
+ return HealthCheck200ResponseFromJSONTyped(json, false);
2102
+ }
2103
+ export function HealthCheck200ResponseFromJSONTyped(json, ignoreDiscriminator) {
2104
+ if (json == null) {
2105
+ return json;
2106
+ }
2107
+ return {
2108
+ 'status': json['status'] == null ? undefined : json['status'],
2109
+ 'version': json['version'] == null ? undefined : json['version'],
2110
+ };
2111
+ }
2112
+ export function HealthCheck200ResponseToJSON(value) {
2113
+ if (value == null) {
2114
+ return value;
2115
+ }
2116
+ return {
2117
+ 'status': value['status'],
2118
+ 'version': value['version'],
2119
+ };
2120
+ }
2121
+ /**
2122
+ * Check if a given object implements the HelmError interface.
2123
+ */
2124
+ export function instanceOfHelmError(value) {
2125
+ if (!('error' in value))
2126
+ return false;
2127
+ return true;
2128
+ }
2129
+ export function HelmErrorFromJSON(json) {
2130
+ return HelmErrorFromJSONTyped(json, false);
2131
+ }
2132
+ export function HelmErrorFromJSONTyped(json, ignoreDiscriminator) {
2133
+ if (json == null) {
2134
+ return json;
2135
+ }
2136
+ return {
2137
+ 'error': HelmErrorErrorFromJSON(json['error']),
2138
+ };
2139
+ }
2140
+ export function HelmErrorToJSON(value) {
2141
+ if (value == null) {
2142
+ return value;
2143
+ }
2144
+ return {
2145
+ 'error': HelmErrorErrorToJSON(value['error']),
2146
+ };
2147
+ }
2148
+ /**
2149
+ * @export
2150
+ */
2151
+ export const HelmErrorErrorTypeEnum = {
2152
+ InvalidRequest: 'invalid_request',
2153
+ AuthenticationError: 'authentication_error',
2154
+ PermissionDenied: 'permission_denied',
2155
+ NotFound: 'not_found',
2156
+ InternalError: 'internal_error'
2157
+ };
2158
+ /**
2159
+ * @export
2160
+ */
2161
+ export const HelmErrorErrorReasonCodeEnum = {
2162
+ DenyToolNotFound: 'DENY_TOOL_NOT_FOUND',
2163
+ DenySchemaMismatch: 'DENY_SCHEMA_MISMATCH',
2164
+ DenyOutputDrift: 'DENY_OUTPUT_DRIFT',
2165
+ DenyBudgetExceeded: 'DENY_BUDGET_EXCEEDED',
2166
+ DenyApprovalRequired: 'DENY_APPROVAL_REQUIRED',
2167
+ DenyApprovalTimeout: 'DENY_APPROVAL_TIMEOUT',
2168
+ DenySandboxTrap: 'DENY_SANDBOX_TRAP',
2169
+ DenyGasExhaustion: 'DENY_GAS_EXHAUSTION',
2170
+ DenyTimeLimit: 'DENY_TIME_LIMIT',
2171
+ DenyMemoryLimit: 'DENY_MEMORY_LIMIT',
2172
+ DenyPolicyViolation: 'DENY_POLICY_VIOLATION',
2173
+ DenyTrustKeyRevoked: 'DENY_TRUST_KEY_REVOKED',
2174
+ DenyIdempotencyDuplicate: 'DENY_IDEMPOTENCY_DUPLICATE',
2175
+ ErrorInternal: 'ERROR_INTERNAL'
2176
+ };
2177
+ /**
2178
+ * Check if a given object implements the HelmErrorError interface.
2179
+ */
2180
+ export function instanceOfHelmErrorError(value) {
2181
+ if (!('message' in value))
2182
+ return false;
2183
+ if (!('type' in value))
2184
+ return false;
2185
+ if (!('code' in value))
2186
+ return false;
2187
+ if (!('reason_code' in value))
2188
+ return false;
2189
+ return true;
2190
+ }
2191
+ export function HelmErrorErrorFromJSON(json) {
2192
+ return HelmErrorErrorFromJSONTyped(json, false);
2193
+ }
2194
+ export function HelmErrorErrorFromJSONTyped(json, ignoreDiscriminator) {
2195
+ if (json == null) {
2196
+ return json;
2197
+ }
2198
+ return {
2199
+ 'message': json['message'],
2200
+ 'type': json['type'],
2201
+ 'code': json['code'],
2202
+ 'reason_code': json['reason_code'],
2203
+ 'details': json['details'] == null ? undefined : json['details'],
2204
+ };
2205
+ }
2206
+ export function HelmErrorErrorToJSON(value) {
2207
+ if (value == null) {
2208
+ return value;
2209
+ }
2210
+ return {
2211
+ 'message': value['message'],
2212
+ 'type': value['type'],
2213
+ 'code': value['code'],
2214
+ 'reason_code': value['reason_code'],
2215
+ 'details': value['details'],
2216
+ };
2217
+ }
2218
+ /**
2219
+ * Check if a given object implements the ListConsoleSurfaces200Response interface.
2220
+ */
2221
+ export function instanceOfListConsoleSurfaces200Response(value) {
2222
+ return true;
2223
+ }
2224
+ export function ListConsoleSurfaces200ResponseFromJSON(json) {
2225
+ return ListConsoleSurfaces200ResponseFromJSONTyped(json, false);
2226
+ }
2227
+ export function ListConsoleSurfaces200ResponseFromJSONTyped(json, ignoreDiscriminator) {
2228
+ if (json == null) {
2229
+ return json;
2230
+ }
2231
+ return {
2232
+ 'surfaces': json['surfaces'] == null ? undefined : (json['surfaces'].map(ConsoleSurfaceRefFromJSON)),
2233
+ };
2234
+ }
2235
+ export function ListConsoleSurfaces200ResponseToJSON(value) {
2236
+ if (value == null) {
2237
+ return value;
2238
+ }
2239
+ return {
2240
+ 'surfaces': value['surfaces'] == null ? undefined : (value['surfaces'].map(ConsoleSurfaceRefToJSON)),
2241
+ };
2242
+ }
2243
+ /**
2244
+ * Check if a given object implements the MCPAuthorizationProfile interface.
2245
+ */
2246
+ export function instanceOfMCPAuthorizationProfile(value) {
2247
+ return true;
2248
+ }
2249
+ export function MCPAuthorizationProfileFromJSON(json) {
2250
+ return MCPAuthorizationProfileFromJSONTyped(json, false);
2251
+ }
2252
+ export function MCPAuthorizationProfileFromJSONTyped(json, ignoreDiscriminator) {
2253
+ if (json == null) {
2254
+ return json;
2255
+ }
2256
+ return {
2257
+ 'profile_id': json['profile_id'] == null ? undefined : json['profile_id'],
2258
+ 'protocol_version': json['protocol_version'] == null ? undefined : json['protocol_version'],
2259
+ 'resource': json['resource'] == null ? undefined : json['resource'],
2260
+ 'authorization_servers': json['authorization_servers'] == null ? undefined : json['authorization_servers'],
2261
+ 'scopes_supported': json['scopes_supported'] == null ? undefined : json['scopes_supported'],
2262
+ 'tool_scopes': json['tool_scopes'] == null ? undefined : json['tool_scopes'],
2263
+ 'required_audience': json['required_audience'] == null ? undefined : json['required_audience'],
2264
+ 'stale_after': json['stale_after'] == null ? undefined : (new Date(json['stale_after'])),
2265
+ 'profile_hash': json['profile_hash'] == null ? undefined : json['profile_hash'],
2266
+ };
2267
+ }
2268
+ export function MCPAuthorizationProfileToJSON(value) {
2269
+ if (value == null) {
2270
+ return value;
2271
+ }
2272
+ return {
2273
+ 'profile_id': value['profile_id'],
2274
+ 'protocol_version': value['protocol_version'],
2275
+ 'resource': value['resource'],
2276
+ 'authorization_servers': value['authorization_servers'],
2277
+ 'scopes_supported': value['scopes_supported'],
2278
+ 'tool_scopes': value['tool_scopes'],
2279
+ 'required_audience': value['required_audience'],
2280
+ 'stale_after': value['stale_after'] == null ? undefined : ((value['stale_after']).toISOString()),
2281
+ 'profile_hash': value['profile_hash'],
2282
+ };
2283
+ }
2284
+ /**
2285
+ * Check if a given object implements the MCPAuthorizeCallRequest interface.
2286
+ */
2287
+ export function instanceOfMCPAuthorizeCallRequest(value) {
2288
+ if (!('server_id' in value))
2289
+ return false;
2290
+ if (!('tool_name' in value))
2291
+ return false;
2292
+ return true;
2293
+ }
2294
+ export function MCPAuthorizeCallRequestFromJSON(json) {
2295
+ return MCPAuthorizeCallRequestFromJSONTyped(json, false);
2296
+ }
2297
+ export function MCPAuthorizeCallRequestFromJSONTyped(json, ignoreDiscriminator) {
2298
+ if (json == null) {
2299
+ return json;
2300
+ }
2301
+ return {
2302
+ 'server_id': json['server_id'],
2303
+ 'tool_name': json['tool_name'],
2304
+ 'args_hash': json['args_hash'] == null ? undefined : json['args_hash'],
2305
+ 'granted_scopes': json['granted_scopes'] == null ? undefined : json['granted_scopes'],
2306
+ 'pinned_schema_hash': json['pinned_schema_hash'] == null ? undefined : json['pinned_schema_hash'],
2307
+ 'tool_schema': json['tool_schema'] == null ? undefined : json['tool_schema'],
2308
+ 'output_schema': json['output_schema'] == null ? undefined : json['output_schema'],
2309
+ 'oauth_resource': json['oauth_resource'] == null ? undefined : json['oauth_resource'],
2310
+ 'receipt_id': json['receipt_id'] == null ? undefined : json['receipt_id'],
2311
+ };
2312
+ }
2313
+ export function MCPAuthorizeCallRequestToJSON(value) {
2314
+ if (value == null) {
2315
+ return value;
2316
+ }
2317
+ return {
2318
+ 'server_id': value['server_id'],
2319
+ 'tool_name': value['tool_name'],
2320
+ 'args_hash': value['args_hash'],
2321
+ 'granted_scopes': value['granted_scopes'],
2322
+ 'pinned_schema_hash': value['pinned_schema_hash'],
2323
+ 'tool_schema': value['tool_schema'],
2324
+ 'output_schema': value['output_schema'],
2325
+ 'oauth_resource': value['oauth_resource'],
2326
+ 'receipt_id': value['receipt_id'],
2327
+ };
2328
+ }
2329
+ /**
2330
+ * Check if a given object implements the MCPCapabilityManifest interface.
2331
+ */
2332
+ export function instanceOfMCPCapabilityManifest(value) {
2333
+ return true;
2334
+ }
2335
+ export function MCPCapabilityManifestFromJSON(json) {
2336
+ return MCPCapabilityManifestFromJSONTyped(json, false);
2337
+ }
2338
+ export function MCPCapabilityManifestFromJSONTyped(json, ignoreDiscriminator) {
2339
+ if (json == null) {
2340
+ return json;
2341
+ }
2342
+ return {
2343
+ 'server_name': json['server_name'] == null ? undefined : json['server_name'],
2344
+ 'version': json['version'] == null ? undefined : json['version'],
2345
+ 'governance': json['governance'] == null ? undefined : json['governance'],
2346
+ 'tools': json['tools'] == null ? undefined : (json['tools'].map(MCPToolRefFromJSON)),
2347
+ };
2348
+ }
2349
+ export function MCPCapabilityManifestToJSON(value) {
2350
+ if (value == null) {
2351
+ return value;
2352
+ }
2353
+ return {
2354
+ 'server_name': value['server_name'],
2355
+ 'version': value['version'],
2356
+ 'governance': value['governance'],
2357
+ 'tools': value['tools'] == null ? undefined : (value['tools'].map(MCPToolRefToJSON)),
2358
+ };
2359
+ }
2360
+ /**
2361
+ * Check if a given object implements the MCPJSONRPCError interface.
2362
+ */
2363
+ export function instanceOfMCPJSONRPCError(value) {
2364
+ return true;
2365
+ }
2366
+ export function MCPJSONRPCErrorFromJSON(json) {
2367
+ return MCPJSONRPCErrorFromJSONTyped(json, false);
2368
+ }
2369
+ export function MCPJSONRPCErrorFromJSONTyped(json, ignoreDiscriminator) {
2370
+ if (json == null) {
2371
+ return json;
2372
+ }
2373
+ return {
2374
+ 'code': json['code'] == null ? undefined : json['code'],
2375
+ 'message': json['message'] == null ? undefined : json['message'],
2376
+ };
2377
+ }
2378
+ export function MCPJSONRPCErrorToJSON(value) {
2379
+ if (value == null) {
2380
+ return value;
2381
+ }
2382
+ return {
2383
+ 'code': value['code'],
2384
+ 'message': value['message'],
2385
+ };
2386
+ }
2387
+ /**
2388
+ * @export
2389
+ */
2390
+ export const MCPJSONRPCRequestJsonrpcEnum = {
2391
+ _20: '2.0'
2392
+ };
2393
+ /**
2394
+ * Check if a given object implements the MCPJSONRPCRequest interface.
2395
+ */
2396
+ export function instanceOfMCPJSONRPCRequest(value) {
2397
+ if (!('jsonrpc' in value))
2398
+ return false;
2399
+ if (!('method' in value))
2400
+ return false;
2401
+ return true;
2402
+ }
2403
+ export function MCPJSONRPCRequestFromJSON(json) {
2404
+ return MCPJSONRPCRequestFromJSONTyped(json, false);
2405
+ }
2406
+ export function MCPJSONRPCRequestFromJSONTyped(json, ignoreDiscriminator) {
2407
+ if (json == null) {
2408
+ return json;
2409
+ }
2410
+ return {
2411
+ 'jsonrpc': json['jsonrpc'],
2412
+ 'id': json['id'] == null ? undefined : MCPJSONRPCRequestIdFromJSON(json['id']),
2413
+ 'method': json['method'],
2414
+ 'params': json['params'] == null ? undefined : json['params'],
2415
+ };
2416
+ }
2417
+ export function MCPJSONRPCRequestToJSON(value) {
2418
+ if (value == null) {
2419
+ return value;
2420
+ }
2421
+ return {
2422
+ 'jsonrpc': value['jsonrpc'],
2423
+ 'id': MCPJSONRPCRequestIdToJSON(value['id']),
2424
+ 'method': value['method'],
2425
+ 'params': value['params'],
2426
+ };
2427
+ }
2428
+ export function MCPJSONRPCRequestIdFromJSON(json) {
2429
+ return MCPJSONRPCRequestIdFromJSONTyped(json, false);
2430
+ }
2431
+ export function MCPJSONRPCRequestIdFromJSONTyped(json, ignoreDiscriminator) {
2432
+ if (json == null) {
2433
+ return json;
2434
+ }
2435
+ return json;
2436
+ }
2437
+ export function MCPJSONRPCRequestIdToJSON(value) {
2438
+ if (value == null) {
2439
+ return value;
2440
+ }
2441
+ return value;
2442
+ }
2443
+ /**
2444
+ * @export
2445
+ */
2446
+ export const MCPJSONRPCResponseJsonrpcEnum = {
2447
+ _20: '2.0'
2448
+ };
2449
+ /**
2450
+ * Check if a given object implements the MCPJSONRPCResponse interface.
2451
+ */
2452
+ export function instanceOfMCPJSONRPCResponse(value) {
2453
+ return true;
2454
+ }
2455
+ export function MCPJSONRPCResponseFromJSON(json) {
2456
+ return MCPJSONRPCResponseFromJSONTyped(json, false);
2457
+ }
2458
+ export function MCPJSONRPCResponseFromJSONTyped(json, ignoreDiscriminator) {
2459
+ if (json == null) {
2460
+ return json;
2461
+ }
2462
+ return {
2463
+ 'jsonrpc': json['jsonrpc'] == null ? undefined : json['jsonrpc'],
2464
+ 'id': json['id'] == null ? undefined : MCPJSONRPCResponseIdFromJSON(json['id']),
2465
+ 'result': json['result'] == null ? undefined : json['result'],
2466
+ 'error': json['error'] == null ? undefined : MCPJSONRPCErrorFromJSON(json['error']),
2467
+ };
2468
+ }
2469
+ export function MCPJSONRPCResponseToJSON(value) {
2470
+ if (value == null) {
2471
+ return value;
2472
+ }
2473
+ return {
2474
+ 'jsonrpc': value['jsonrpc'],
2475
+ 'id': MCPJSONRPCResponseIdToJSON(value['id']),
2476
+ 'result': value['result'],
2477
+ 'error': MCPJSONRPCErrorToJSON(value['error']),
2478
+ };
2479
+ }
2480
+ export function MCPJSONRPCResponseIdFromJSON(json) {
2481
+ return MCPJSONRPCResponseIdFromJSONTyped(json, false);
2482
+ }
2483
+ export function MCPJSONRPCResponseIdFromJSONTyped(json, ignoreDiscriminator) {
2484
+ if (json == null) {
2485
+ return json;
2486
+ }
2487
+ return json;
2488
+ }
2489
+ export function MCPJSONRPCResponseIdToJSON(value) {
2490
+ if (value == null) {
2491
+ return value;
2492
+ }
2493
+ return value;
2494
+ }
2495
+ /**
2496
+ * Check if a given object implements the MCPProtectedResourceMetadata interface.
2497
+ */
2498
+ export function instanceOfMCPProtectedResourceMetadata(value) {
2499
+ return true;
2500
+ }
2501
+ export function MCPProtectedResourceMetadataFromJSON(json) {
2502
+ return MCPProtectedResourceMetadataFromJSONTyped(json, false);
2503
+ }
2504
+ export function MCPProtectedResourceMetadataFromJSONTyped(json, ignoreDiscriminator) {
2505
+ if (json == null) {
2506
+ return json;
2507
+ }
2508
+ return {
2509
+ 'resource': json['resource'] == null ? undefined : json['resource'],
2510
+ 'authorization_servers': json['authorization_servers'] == null ? undefined : json['authorization_servers'],
2511
+ 'scopes_supported': json['scopes_supported'] == null ? undefined : json['scopes_supported'],
2512
+ 'bearer_methods_supported': json['bearer_methods_supported'] == null ? undefined : json['bearer_methods_supported'],
2513
+ 'resource_documentation': json['resource_documentation'] == null ? undefined : json['resource_documentation'],
2514
+ };
2515
+ }
2516
+ export function MCPProtectedResourceMetadataToJSON(value) {
2517
+ if (value == null) {
2518
+ return value;
2519
+ }
2520
+ return {
2521
+ 'resource': value['resource'],
2522
+ 'authorization_servers': value['authorization_servers'],
2523
+ 'scopes_supported': value['scopes_supported'],
2524
+ 'bearer_methods_supported': value['bearer_methods_supported'],
2525
+ 'resource_documentation': value['resource_documentation'],
2526
+ };
2527
+ }
2528
+ /**
2529
+ * @export
2530
+ */
2531
+ export const MCPQuarantineRecordRiskEnum = {
2532
+ Unknown: 'unknown',
2533
+ Low: 'low',
2534
+ Medium: 'medium',
2535
+ High: 'high',
2536
+ Critical: 'critical'
2537
+ };
2538
+ /**
2539
+ * @export
2540
+ */
2541
+ export const MCPQuarantineRecordStateEnum = {
2542
+ Discovered: 'discovered',
2543
+ Quarantined: 'quarantined',
2544
+ Approved: 'approved',
2545
+ Revoked: 'revoked',
2546
+ Expired: 'expired'
2547
+ };
2548
+ /**
2549
+ * Check if a given object implements the MCPQuarantineRecord interface.
2550
+ */
2551
+ export function instanceOfMCPQuarantineRecord(value) {
2552
+ if (!('server_id' in value))
2553
+ return false;
2554
+ if (!('risk' in value))
2555
+ return false;
2556
+ if (!('state' in value))
2557
+ return false;
2558
+ if (!('discovered_at' in value))
2559
+ return false;
2560
+ return true;
2561
+ }
2562
+ export function MCPQuarantineRecordFromJSON(json) {
2563
+ return MCPQuarantineRecordFromJSONTyped(json, false);
2564
+ }
2565
+ export function MCPQuarantineRecordFromJSONTyped(json, ignoreDiscriminator) {
2566
+ if (json == null) {
2567
+ return json;
2568
+ }
2569
+ return {
2570
+ 'server_id': json['server_id'],
2571
+ 'name': json['name'] == null ? undefined : json['name'],
2572
+ 'transport': json['transport'] == null ? undefined : json['transport'],
2573
+ 'endpoint': json['endpoint'] == null ? undefined : json['endpoint'],
2574
+ 'tool_names': json['tool_names'] == null ? undefined : json['tool_names'],
2575
+ 'risk': json['risk'],
2576
+ 'state': json['state'],
2577
+ 'discovered_at': (new Date(json['discovered_at'])),
2578
+ 'approved_at': json['approved_at'] == null ? undefined : (new Date(json['approved_at'])),
2579
+ 'approved_by': json['approved_by'] == null ? undefined : json['approved_by'],
2580
+ 'approval_receipt_id': json['approval_receipt_id'] == null ? undefined : json['approval_receipt_id'],
2581
+ 'revoked_at': json['revoked_at'] == null ? undefined : (new Date(json['revoked_at'])),
2582
+ 'expires_at': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
2583
+ 'reason': json['reason'] == null ? undefined : json['reason'],
2584
+ };
2585
+ }
2586
+ export function MCPQuarantineRecordToJSON(value) {
2587
+ if (value == null) {
2588
+ return value;
2589
+ }
2590
+ return {
2591
+ 'server_id': value['server_id'],
2592
+ 'name': value['name'],
2593
+ 'transport': value['transport'],
2594
+ 'endpoint': value['endpoint'],
2595
+ 'tool_names': value['tool_names'],
2596
+ 'risk': value['risk'],
2597
+ 'state': value['state'],
2598
+ 'discovered_at': ((value['discovered_at']).toISOString()),
2599
+ 'approved_at': value['approved_at'] == null ? undefined : ((value['approved_at']).toISOString()),
2600
+ 'approved_by': value['approved_by'],
2601
+ 'approval_receipt_id': value['approval_receipt_id'],
2602
+ 'revoked_at': value['revoked_at'] == null ? undefined : ((value['revoked_at']).toISOString()),
2603
+ 'expires_at': value['expires_at'] == null ? undefined : ((value['expires_at']).toISOString()),
2604
+ 'reason': value['reason'],
2605
+ };
2606
+ }
2607
+ /**
2608
+ * Check if a given object implements the MCPRegistryApprovalRequest interface.
2609
+ */
2610
+ export function instanceOfMCPRegistryApprovalRequest(value) {
2611
+ if (!('server_id' in value))
2612
+ return false;
2613
+ if (!('approver_id' in value))
2614
+ return false;
2615
+ if (!('approval_receipt_id' in value))
2616
+ return false;
2617
+ return true;
2618
+ }
2619
+ export function MCPRegistryApprovalRequestFromJSON(json) {
2620
+ return MCPRegistryApprovalRequestFromJSONTyped(json, false);
2621
+ }
2622
+ export function MCPRegistryApprovalRequestFromJSONTyped(json, ignoreDiscriminator) {
2623
+ if (json == null) {
2624
+ return json;
2625
+ }
2626
+ return {
2627
+ 'server_id': json['server_id'],
2628
+ 'approver_id': json['approver_id'],
2629
+ 'approval_receipt_id': json['approval_receipt_id'],
2630
+ 'reason': json['reason'] == null ? undefined : json['reason'],
2631
+ };
2632
+ }
2633
+ export function MCPRegistryApprovalRequestToJSON(value) {
2634
+ if (value == null) {
2635
+ return value;
2636
+ }
2637
+ return {
2638
+ 'server_id': value['server_id'],
2639
+ 'approver_id': value['approver_id'],
2640
+ 'approval_receipt_id': value['approval_receipt_id'],
2641
+ 'reason': value['reason'],
2642
+ };
2643
+ }
2644
+ /**
2645
+ * @export
2646
+ */
2647
+ export const MCPRegistryDiscoverRequestRiskEnum = {
2648
+ Unknown: 'unknown',
2649
+ Low: 'low',
2650
+ Medium: 'medium',
2651
+ High: 'high',
2652
+ Critical: 'critical'
2653
+ };
2654
+ /**
2655
+ * Check if a given object implements the MCPRegistryDiscoverRequest interface.
2656
+ */
2657
+ export function instanceOfMCPRegistryDiscoverRequest(value) {
2658
+ if (!('server_id' in value))
2659
+ return false;
2660
+ return true;
2661
+ }
2662
+ export function MCPRegistryDiscoverRequestFromJSON(json) {
2663
+ return MCPRegistryDiscoverRequestFromJSONTyped(json, false);
2664
+ }
2665
+ export function MCPRegistryDiscoverRequestFromJSONTyped(json, ignoreDiscriminator) {
2666
+ if (json == null) {
2667
+ return json;
2668
+ }
2669
+ return {
2670
+ 'server_id': json['server_id'],
2671
+ 'name': json['name'] == null ? undefined : json['name'],
2672
+ 'transport': json['transport'] == null ? undefined : json['transport'],
2673
+ 'endpoint': json['endpoint'] == null ? undefined : json['endpoint'],
2674
+ 'tool_names': json['tool_names'] == null ? undefined : json['tool_names'],
2675
+ 'risk': json['risk'] == null ? undefined : json['risk'],
2676
+ 'reason': json['reason'] == null ? undefined : json['reason'],
2677
+ };
2678
+ }
2679
+ export function MCPRegistryDiscoverRequestToJSON(value) {
2680
+ if (value == null) {
2681
+ return value;
2682
+ }
2683
+ return {
2684
+ 'server_id': value['server_id'],
2685
+ 'name': value['name'],
2686
+ 'transport': value['transport'],
2687
+ 'endpoint': value['endpoint'],
2688
+ 'tool_names': value['tool_names'],
2689
+ 'risk': value['risk'],
2690
+ 'reason': value['reason'],
2691
+ };
2692
+ }
2693
+ /**
2694
+ * Check if a given object implements the MCPRemoteDiscovery interface.
2695
+ */
2696
+ export function instanceOfMCPRemoteDiscovery(value) {
2697
+ return true;
2698
+ }
2699
+ export function MCPRemoteDiscoveryFromJSON(json) {
2700
+ return MCPRemoteDiscoveryFromJSONTyped(json, false);
2701
+ }
2702
+ export function MCPRemoteDiscoveryFromJSONTyped(json, ignoreDiscriminator) {
2703
+ if (json == null) {
2704
+ return json;
2705
+ }
2706
+ return {
2707
+ 'server_name': json['server_name'] == null ? undefined : json['server_name'],
2708
+ 'version': json['version'] == null ? undefined : json['version'],
2709
+ 'capabilities_url': json['capabilities_url'] == null ? undefined : json['capabilities_url'],
2710
+ 'execute_url': json['execute_url'] == null ? undefined : json['execute_url'],
2711
+ 'mcp_endpoint': json['mcp_endpoint'] == null ? undefined : json['mcp_endpoint'],
2712
+ 'supported_protocol_versions': json['supported_protocol_versions'] == null ? undefined : json['supported_protocol_versions'],
2713
+ 'auth_mode': json['auth_mode'] == null ? undefined : json['auth_mode'],
2714
+ 'governance': json['governance'] == null ? undefined : json['governance'],
2715
+ };
2716
+ }
2717
+ export function MCPRemoteDiscoveryToJSON(value) {
2718
+ if (value == null) {
2719
+ return value;
2720
+ }
2721
+ return {
2722
+ 'server_name': value['server_name'],
2723
+ 'version': value['version'],
2724
+ 'capabilities_url': value['capabilities_url'],
2725
+ 'execute_url': value['execute_url'],
2726
+ 'mcp_endpoint': value['mcp_endpoint'],
2727
+ 'supported_protocol_versions': value['supported_protocol_versions'],
2728
+ 'auth_mode': value['auth_mode'],
2729
+ 'governance': value['governance'],
2730
+ };
2731
+ }
2732
+ /**
2733
+ * Check if a given object implements the MCPScanRequest interface.
2734
+ */
2735
+ export function instanceOfMCPScanRequest(value) {
2736
+ if (!('server_id' in value))
2737
+ return false;
2738
+ return true;
2739
+ }
2740
+ export function MCPScanRequestFromJSON(json) {
2741
+ return MCPScanRequestFromJSONTyped(json, false);
2742
+ }
2743
+ export function MCPScanRequestFromJSONTyped(json, ignoreDiscriminator) {
2744
+ if (json == null) {
2745
+ return json;
2746
+ }
2747
+ return {
2748
+ 'server_id': json['server_id'],
2749
+ 'name': json['name'] == null ? undefined : json['name'],
2750
+ 'transport': json['transport'] == null ? undefined : json['transport'],
2751
+ 'endpoint': json['endpoint'] == null ? undefined : json['endpoint'],
2752
+ 'tool_names': json['tool_names'] == null ? undefined : json['tool_names'],
2753
+ 'manifest': json['manifest'] == null ? undefined : json['manifest'],
2754
+ };
2755
+ }
2756
+ export function MCPScanRequestToJSON(value) {
2757
+ if (value == null) {
2758
+ return value;
2759
+ }
2760
+ return {
2761
+ 'server_id': value['server_id'],
2762
+ 'name': value['name'],
2763
+ 'transport': value['transport'],
2764
+ 'endpoint': value['endpoint'],
2765
+ 'tool_names': value['tool_names'],
2766
+ 'manifest': value['manifest'],
2767
+ };
2768
+ }
2769
+ /**
2770
+ * Check if a given object implements the MCPScanResult interface.
2771
+ */
2772
+ export function instanceOfMCPScanResult(value) {
2773
+ return true;
2774
+ }
2775
+ export function MCPScanResultFromJSON(json) {
2776
+ return MCPScanResultFromJSONTyped(json, false);
2777
+ }
2778
+ export function MCPScanResultFromJSONTyped(json, ignoreDiscriminator) {
2779
+ if (json == null) {
2780
+ return json;
2781
+ }
2782
+ return {
2783
+ 'server_id': json['server_id'] == null ? undefined : json['server_id'],
2784
+ 'risk': json['risk'] == null ? undefined : json['risk'],
2785
+ 'state': json['state'] == null ? undefined : json['state'],
2786
+ 'tool_count': json['tool_count'] == null ? undefined : json['tool_count'],
2787
+ 'findings': json['findings'] == null ? undefined : json['findings'],
2788
+ 'recommended_action': json['recommended_action'] == null ? undefined : json['recommended_action'],
2789
+ 'quarantine_record_id': json['quarantine_record_id'] == null ? undefined : json['quarantine_record_id'],
2790
+ 'requires_approval': json['requires_approval'] == null ? undefined : json['requires_approval'],
2791
+ 'schema_pin_required': json['schema_pin_required'] == null ? undefined : json['schema_pin_required'],
2792
+ 'authorization_needed': json['authorization_needed'] == null ? undefined : json['authorization_needed'],
2793
+ 'scanned_at': json['scanned_at'] == null ? undefined : (new Date(json['scanned_at'])),
2794
+ };
2795
+ }
2796
+ export function MCPScanResultToJSON(value) {
2797
+ if (value == null) {
2798
+ return value;
2799
+ }
2800
+ return {
2801
+ 'server_id': value['server_id'],
2802
+ 'risk': value['risk'],
2803
+ 'state': value['state'],
2804
+ 'tool_count': value['tool_count'],
2805
+ 'findings': value['findings'],
2806
+ 'recommended_action': value['recommended_action'],
2807
+ 'quarantine_record_id': value['quarantine_record_id'],
2808
+ 'requires_approval': value['requires_approval'],
2809
+ 'schema_pin_required': value['schema_pin_required'],
2810
+ 'authorization_needed': value['authorization_needed'],
2811
+ 'scanned_at': value['scanned_at'] == null ? undefined : ((value['scanned_at']).toISOString()),
2812
+ };
2813
+ }
2814
+ /**
2815
+ * Check if a given object implements the MCPToolCallRequest interface.
2816
+ */
2817
+ export function instanceOfMCPToolCallRequest(value) {
2818
+ if (!('method' in value))
2819
+ return false;
2820
+ return true;
2821
+ }
2822
+ export function MCPToolCallRequestFromJSON(json) {
2823
+ return MCPToolCallRequestFromJSONTyped(json, false);
2824
+ }
2825
+ export function MCPToolCallRequestFromJSONTyped(json, ignoreDiscriminator) {
2826
+ if (json == null) {
2827
+ return json;
2828
+ }
2829
+ return {
2830
+ 'method': json['method'],
2831
+ 'params': json['params'] == null ? undefined : json['params'],
2832
+ };
2833
+ }
2834
+ export function MCPToolCallRequestToJSON(value) {
2835
+ if (value == null) {
2836
+ return value;
2837
+ }
2838
+ return {
2839
+ 'method': value['method'],
2840
+ 'params': value['params'],
2841
+ };
2842
+ }
2843
+ /**
2844
+ * Check if a given object implements the MCPToolCallResponse interface.
2845
+ */
2846
+ export function instanceOfMCPToolCallResponse(value) {
2847
+ return true;
2848
+ }
2849
+ export function MCPToolCallResponseFromJSON(json) {
2850
+ return MCPToolCallResponseFromJSONTyped(json, false);
2851
+ }
2852
+ export function MCPToolCallResponseFromJSONTyped(json, ignoreDiscriminator) {
2853
+ if (json == null) {
2854
+ return json;
2855
+ }
2856
+ return {
2857
+ 'result': json['result'] == null ? undefined : MCPToolCallResponseResultFromJSON(json['result']),
2858
+ 'error': json['error'] == null ? undefined : json['error'],
2859
+ 'reason_code': json['reason_code'] == null ? undefined : json['reason_code'],
2860
+ 'args_hash': json['args_hash'] == null ? undefined : json['args_hash'],
2861
+ 'proofgraph_node': json['proofgraph_node'] == null ? undefined : json['proofgraph_node'],
2862
+ 'receipt_id': json['receipt_id'] == null ? undefined : json['receipt_id'],
2863
+ };
2864
+ }
2865
+ export function MCPToolCallResponseToJSON(value) {
2866
+ if (value == null) {
2867
+ return value;
2868
+ }
2869
+ return {
2870
+ 'result': MCPToolCallResponseResultToJSON(value['result']),
2871
+ 'error': value['error'],
2872
+ 'reason_code': value['reason_code'],
2873
+ 'args_hash': value['args_hash'],
2874
+ 'proofgraph_node': value['proofgraph_node'],
2875
+ 'receipt_id': value['receipt_id'],
2876
+ };
2877
+ }
2878
+ export function MCPToolCallResponseResultFromJSON(json) {
2879
+ return MCPToolCallResponseResultFromJSONTyped(json, false);
2880
+ }
2881
+ export function MCPToolCallResponseResultFromJSONTyped(json, ignoreDiscriminator) {
2882
+ if (json == null) {
2883
+ return json;
2884
+ }
2885
+ return json;
2886
+ }
2887
+ export function MCPToolCallResponseResultToJSON(value) {
2888
+ if (value == null) {
2889
+ return value;
2890
+ }
2891
+ return value;
2892
+ }
2893
+ /**
2894
+ * Check if a given object implements the MCPToolRef interface.
2895
+ */
2896
+ export function instanceOfMCPToolRef(value) {
2897
+ return true;
2898
+ }
2899
+ export function MCPToolRefFromJSON(json) {
2900
+ return MCPToolRefFromJSONTyped(json, false);
2901
+ }
2902
+ export function MCPToolRefFromJSONTyped(json, ignoreDiscriminator) {
2903
+ if (json == null) {
2904
+ return json;
2905
+ }
2906
+ return {
2907
+ 'name': json['name'] == null ? undefined : json['name'],
2908
+ 'description': json['description'] == null ? undefined : json['description'],
2909
+ 'server_id': json['server_id'] == null ? undefined : json['server_id'],
2910
+ 'schema': json['schema'] == null ? undefined : json['schema'],
2911
+ };
2912
+ }
2913
+ export function MCPToolRefToJSON(value) {
2914
+ if (value == null) {
2915
+ return value;
2916
+ }
2917
+ return {
2918
+ 'name': value['name'],
2919
+ 'description': value['description'],
2920
+ 'server_id': value['server_id'],
2921
+ 'schema': value['schema'],
2922
+ };
2923
+ }
2924
+ /**
2925
+ * @export
2926
+ */
2927
+ export const NegativeBoundaryVectorExpectedVerdictEnum = {
2928
+ Allow: 'ALLOW',
2929
+ Deny: 'DENY',
2930
+ Escalate: 'ESCALATE'
2931
+ };
2932
+ /**
2933
+ * Check if a given object implements the NegativeBoundaryVector interface.
2934
+ */
2935
+ export function instanceOfNegativeBoundaryVector(value) {
2936
+ if (!('id' in value))
2937
+ return false;
2938
+ if (!('category' in value))
2939
+ return false;
2940
+ if (!('trigger' in value))
2941
+ return false;
2942
+ if (!('expected_verdict' in value))
2943
+ return false;
2944
+ if (!('expected_reason_code' in value))
2945
+ return false;
2946
+ if (!('must_emit_receipt' in value))
2947
+ return false;
2948
+ if (!('must_not_dispatch' in value))
2949
+ return false;
2950
+ return true;
2951
+ }
2952
+ export function NegativeBoundaryVectorFromJSON(json) {
2953
+ return NegativeBoundaryVectorFromJSONTyped(json, false);
2954
+ }
2955
+ export function NegativeBoundaryVectorFromJSONTyped(json, ignoreDiscriminator) {
2956
+ if (json == null) {
2957
+ return json;
2958
+ }
2959
+ return {
2960
+ 'id': json['id'],
2961
+ 'category': json['category'],
2962
+ 'trigger': json['trigger'],
2963
+ 'expected_verdict': json['expected_verdict'],
2964
+ 'expected_reason_code': json['expected_reason_code'],
2965
+ 'must_emit_receipt': json['must_emit_receipt'],
2966
+ 'must_not_dispatch': json['must_not_dispatch'],
2967
+ 'must_bind_evidence': json['must_bind_evidence'] == null ? undefined : json['must_bind_evidence'],
2968
+ };
2969
+ }
2970
+ export function NegativeBoundaryVectorToJSON(value) {
2971
+ if (value == null) {
2972
+ return value;
2973
+ }
2974
+ return {
2975
+ 'id': value['id'],
2976
+ 'category': value['category'],
2977
+ 'trigger': value['trigger'],
2978
+ 'expected_verdict': value['expected_verdict'],
2979
+ 'expected_reason_code': value['expected_reason_code'],
2980
+ 'must_emit_receipt': value['must_emit_receipt'],
2981
+ 'must_not_dispatch': value['must_not_dispatch'],
2982
+ 'must_bind_evidence': value['must_bind_evidence'],
2983
+ };
2984
+ }
2985
+ /**
2986
+ * @export
2987
+ */
2988
+ export const NetworkGrantModeEnum = {
2989
+ DenyAll: 'deny-all',
2990
+ Allowlist: 'allowlist'
2991
+ };
2992
+ /**
2993
+ * Check if a given object implements the NetworkGrant interface.
2994
+ */
2995
+ export function instanceOfNetworkGrant(value) {
2996
+ if (!('mode' in value))
2997
+ return false;
2998
+ return true;
2999
+ }
3000
+ export function NetworkGrantFromJSON(json) {
3001
+ return NetworkGrantFromJSONTyped(json, false);
3002
+ }
3003
+ export function NetworkGrantFromJSONTyped(json, ignoreDiscriminator) {
3004
+ if (json == null) {
3005
+ return json;
3006
+ }
3007
+ return {
3008
+ 'mode': json['mode'],
3009
+ 'destinations': json['destinations'] == null ? undefined : json['destinations'],
3010
+ 'cidrs': json['cidrs'] == null ? undefined : json['cidrs'],
3011
+ };
3012
+ }
3013
+ export function NetworkGrantToJSON(value) {
3014
+ if (value == null) {
3015
+ return value;
3016
+ }
3017
+ return {
3018
+ 'mode': value['mode'],
3019
+ 'destinations': value['destinations'],
3020
+ 'cidrs': value['cidrs'],
3021
+ };
3022
+ }
3023
+ /**
3024
+ * Check if a given object implements the PDPRequest interface.
3025
+ */
3026
+ export function instanceOfPDPRequest(value) {
3027
+ if (!('boundary' in value))
3028
+ return false;
3029
+ return true;
3030
+ }
3031
+ export function PDPRequestFromJSON(json) {
3032
+ return PDPRequestFromJSONTyped(json, false);
3033
+ }
3034
+ export function PDPRequestFromJSONTyped(json, ignoreDiscriminator) {
3035
+ if (json == null) {
3036
+ return json;
3037
+ }
3038
+ return {
3039
+ 'boundary': EffectBoundaryFromJSON(json['boundary']),
3040
+ };
3041
+ }
3042
+ export function PDPRequestToJSON(value) {
3043
+ if (value == null) {
3044
+ return value;
3045
+ }
3046
+ return {
3047
+ 'boundary': EffectBoundaryToJSON(value['boundary']),
3048
+ };
3049
+ }
3050
+ /**
3051
+ * Check if a given object implements the PDPResponse interface.
3052
+ */
3053
+ export function instanceOfPDPResponse(value) {
3054
+ if (!('decision' in value))
3055
+ return false;
3056
+ return true;
3057
+ }
3058
+ export function PDPResponseFromJSON(json) {
3059
+ return PDPResponseFromJSONTyped(json, false);
3060
+ }
3061
+ export function PDPResponseFromJSONTyped(json, ignoreDiscriminator) {
3062
+ if (json == null) {
3063
+ return json;
3064
+ }
3065
+ return {
3066
+ 'decision': GovernanceDecisionFromJSON(json['decision']),
3067
+ };
3068
+ }
3069
+ export function PDPResponseToJSON(value) {
3070
+ if (value == null) {
3071
+ return value;
3072
+ }
3073
+ return {
3074
+ 'decision': GovernanceDecisionToJSON(value['decision']),
3075
+ };
3076
+ }
3077
+ /**
3078
+ * @export
3079
+ */
3080
+ export const PolicyBundlePackTypeEnum = {
3081
+ Jurisdiction: 'jurisdiction',
3082
+ Industry: 'industry',
3083
+ Business: 'business',
3084
+ Custom: 'custom'
3085
+ };
3086
+ /**
3087
+ * Check if a given object implements the PolicyBundle interface.
3088
+ */
3089
+ export function instanceOfPolicyBundle(value) {
3090
+ if (!('name' in value))
3091
+ return false;
3092
+ if (!('version' in value))
3093
+ return false;
3094
+ if (!('content_hash' in value))
3095
+ return false;
3096
+ return true;
3097
+ }
3098
+ export function PolicyBundleFromJSON(json) {
3099
+ return PolicyBundleFromJSONTyped(json, false);
3100
+ }
3101
+ export function PolicyBundleFromJSONTyped(json, ignoreDiscriminator) {
3102
+ if (json == null) {
3103
+ return json;
3104
+ }
3105
+ return {
3106
+ 'name': json['name'],
3107
+ 'version': json['version'],
3108
+ 'content_hash': json['content_hash'],
3109
+ 'signature': json['signature'] == null ? undefined : json['signature'],
3110
+ 'pack_type': json['pack_type'] == null ? undefined : json['pack_type'],
3111
+ };
3112
+ }
3113
+ export function PolicyBundleToJSON(value) {
3114
+ if (value == null) {
3115
+ return value;
3116
+ }
3117
+ return {
3118
+ 'name': value['name'],
3119
+ 'version': value['version'],
3120
+ 'content_hash': value['content_hash'],
3121
+ 'signature': value['signature'],
3122
+ 'pack_type': value['pack_type'],
3123
+ };
3124
+ }
3125
+ /**
3126
+ * Check if a given object implements the Receipt interface.
3127
+ */
3128
+ export function instanceOfReceipt(value) {
3129
+ return true;
3130
+ }
3131
+ export function ReceiptFromJSON(json) {
3132
+ return ReceiptFromJSONTyped(json, false);
3133
+ }
3134
+ export function ReceiptFromJSONTyped(json, ignoreDiscriminator) {
3135
+ if (json == null) {
3136
+ return json;
3137
+ }
3138
+ return {
3139
+ 'receipt_id': json['receipt_id'] == null ? undefined : json['receipt_id'],
3140
+ 'decision_id': json['decision_id'] == null ? undefined : json['decision_id'],
3141
+ 'effect_id': json['effect_id'] == null ? undefined : json['effect_id'],
3142
+ 'status': json['status'] == null ? undefined : json['status'],
3143
+ 'reason_code': json['reason_code'] == null ? undefined : json['reason_code'],
3144
+ 'output_hash': json['output_hash'] == null ? undefined : json['output_hash'],
3145
+ 'blob_hash': json['blob_hash'] == null ? undefined : json['blob_hash'],
3146
+ 'prev_hash': json['prev_hash'] == null ? undefined : json['prev_hash'],
3147
+ 'lamport_clock': json['lamport_clock'] == null ? undefined : json['lamport_clock'],
3148
+ 'signature': json['signature'] == null ? undefined : json['signature'],
3149
+ 'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
3150
+ 'principal': json['principal'] == null ? undefined : json['principal'],
3151
+ 'executor_id': json['executor_id'] == null ? undefined : json['executor_id'],
3152
+ 'args_hash': json['args_hash'] == null ? undefined : json['args_hash'],
3153
+ 'metadata': json['metadata'] == null ? undefined : json['metadata'],
3154
+ };
3155
+ }
3156
+ export function ReceiptToJSON(value) {
3157
+ if (value == null) {
3158
+ return value;
3159
+ }
3160
+ return {
3161
+ 'receipt_id': value['receipt_id'],
3162
+ 'decision_id': value['decision_id'],
3163
+ 'effect_id': value['effect_id'],
3164
+ 'status': value['status'],
3165
+ 'reason_code': value['reason_code'],
3166
+ 'output_hash': value['output_hash'],
3167
+ 'blob_hash': value['blob_hash'],
3168
+ 'prev_hash': value['prev_hash'],
3169
+ 'lamport_clock': value['lamport_clock'],
3170
+ 'signature': value['signature'],
3171
+ 'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
3172
+ 'principal': value['principal'],
3173
+ 'executor_id': value['executor_id'],
3174
+ 'args_hash': value['args_hash'],
3175
+ 'metadata': value['metadata'],
3176
+ };
3177
+ }
3178
+ /**
3179
+ * Check if a given object implements the ReceiptListResponse interface.
3180
+ */
3181
+ export function instanceOfReceiptListResponse(value) {
3182
+ return true;
3183
+ }
3184
+ export function ReceiptListResponseFromJSON(json) {
3185
+ return ReceiptListResponseFromJSONTyped(json, false);
3186
+ }
3187
+ export function ReceiptListResponseFromJSONTyped(json, ignoreDiscriminator) {
3188
+ if (json == null) {
3189
+ return json;
3190
+ }
3191
+ return {
3192
+ 'receipts': json['receipts'] == null ? undefined : (json['receipts'].map(ReceiptFromJSON)),
3193
+ 'count': json['count'] == null ? undefined : json['count'],
3194
+ 'next_cursor': json['next_cursor'] == null ? undefined : json['next_cursor'],
3195
+ 'has_more': json['has_more'] == null ? undefined : json['has_more'],
3196
+ };
3197
+ }
3198
+ export function ReceiptListResponseToJSON(value) {
3199
+ if (value == null) {
3200
+ return value;
3201
+ }
3202
+ return {
3203
+ 'receipts': value['receipts'] == null ? undefined : (value['receipts'].map(ReceiptToJSON)),
3204
+ 'count': value['count'],
3205
+ 'next_cursor': value['next_cursor'],
3206
+ 'has_more': value['has_more'],
3207
+ };
3208
+ }
3209
+ /**
3210
+ * Check if a given object implements the RevokeMcpRegistryRecordRequest interface.
3211
+ */
3212
+ export function instanceOfRevokeMcpRegistryRecordRequest(value) {
3213
+ return true;
3214
+ }
3215
+ export function RevokeMcpRegistryRecordRequestFromJSON(json) {
3216
+ return RevokeMcpRegistryRecordRequestFromJSONTyped(json, false);
3217
+ }
3218
+ export function RevokeMcpRegistryRecordRequestFromJSONTyped(json, ignoreDiscriminator) {
3219
+ if (json == null) {
3220
+ return json;
3221
+ }
3222
+ return {
3223
+ 'reason': json['reason'] == null ? undefined : json['reason'],
3224
+ };
3225
+ }
3226
+ export function RevokeMcpRegistryRecordRequestToJSON(value) {
3227
+ if (value == null) {
3228
+ return value;
3229
+ }
3230
+ return {
3231
+ 'reason': value['reason'],
3232
+ };
3233
+ }
3234
+ /**
3235
+ * Check if a given object implements the RevokeTrustKeyRequest interface.
3236
+ */
3237
+ export function instanceOfRevokeTrustKeyRequest(value) {
3238
+ if (!('tenant_id' in value))
3239
+ return false;
3240
+ if (!('key_id' in value))
3241
+ return false;
3242
+ return true;
3243
+ }
3244
+ export function RevokeTrustKeyRequestFromJSON(json) {
3245
+ return RevokeTrustKeyRequestFromJSONTyped(json, false);
3246
+ }
3247
+ export function RevokeTrustKeyRequestFromJSONTyped(json, ignoreDiscriminator) {
3248
+ if (json == null) {
3249
+ return json;
3250
+ }
3251
+ return {
3252
+ 'tenant_id': json['tenant_id'],
3253
+ 'key_id': json['key_id'],
3254
+ };
3255
+ }
3256
+ export function RevokeTrustKeyRequestToJSON(value) {
3257
+ if (value == null) {
3258
+ return value;
3259
+ }
3260
+ return {
3261
+ 'tenant_id': value['tenant_id'],
3262
+ 'key_id': value['key_id'],
3263
+ };
3264
+ }
3265
+ /**
3266
+ * Check if a given object implements the RunAgentUIRuntimeRequest interface.
3267
+ */
3268
+ export function instanceOfRunAgentUIRuntimeRequest(value) {
3269
+ return true;
3270
+ }
3271
+ export function RunAgentUIRuntimeRequestFromJSON(json) {
3272
+ return RunAgentUIRuntimeRequestFromJSONTyped(json, false);
3273
+ }
3274
+ export function RunAgentUIRuntimeRequestFromJSONTyped(json, ignoreDiscriminator) {
3275
+ if (json == null) {
3276
+ return json;
3277
+ }
3278
+ return {
3279
+ 'threadId': json['threadId'] == null ? undefined : json['threadId'],
3280
+ 'runId': json['runId'] == null ? undefined : json['runId'],
3281
+ 'workspaceId': json['workspaceId'] == null ? undefined : json['workspaceId'],
3282
+ 'currentSurface': json['currentSurface'] == null ? undefined : json['currentSurface'],
3283
+ 'state': json['state'] == null ? undefined : json['state'],
3284
+ 'messages': json['messages'] == null ? undefined : json['messages'],
3285
+ };
3286
+ }
3287
+ export function RunAgentUIRuntimeRequestToJSON(value) {
3288
+ if (value == null) {
3289
+ return value;
3290
+ }
3291
+ return {
3292
+ 'threadId': value['threadId'],
3293
+ 'runId': value['runId'],
3294
+ 'workspaceId': value['workspaceId'],
3295
+ 'currentSurface': value['currentSurface'],
3296
+ 'state': value['state'],
3297
+ 'messages': value['messages'],
3298
+ };
3299
+ }
3300
+ /**
3301
+ * @export
3302
+ */
3303
+ export const RunPublicDemo200ResponseVerdictEnum = {
3304
+ Allow: 'ALLOW',
3305
+ Deny: 'DENY',
3306
+ Escalate: 'ESCALATE'
3307
+ };
3308
+ /**
3309
+ * Check if a given object implements the RunPublicDemo200Response interface.
3310
+ */
3311
+ export function instanceOfRunPublicDemo200Response(value) {
3312
+ if (!('verdict' in value))
3313
+ return false;
3314
+ if (!('reason_code' in value))
3315
+ return false;
3316
+ if (!('receipt' in value))
3317
+ return false;
3318
+ if (!('proof_refs' in value))
3319
+ return false;
3320
+ if (!('verification_hint' in value))
3321
+ return false;
3322
+ if (!('sandbox_label' in value))
3323
+ return false;
3324
+ if (!('helm_ai_kernel_version' in value))
3325
+ return false;
3326
+ return true;
3327
+ }
3328
+ export function RunPublicDemo200ResponseFromJSON(json) {
3329
+ return RunPublicDemo200ResponseFromJSONTyped(json, false);
3330
+ }
3331
+ export function RunPublicDemo200ResponseFromJSONTyped(json, ignoreDiscriminator) {
3332
+ if (json == null) {
3333
+ return json;
3334
+ }
3335
+ return {
3336
+ 'verdict': json['verdict'],
3337
+ 'reason_code': json['reason_code'],
3338
+ 'receipt': ReceiptFromJSON(json['receipt']),
3339
+ 'proof_refs': RunPublicDemo200ResponseProofRefsFromJSON(json['proof_refs']),
3340
+ 'verification_hint': json['verification_hint'],
3341
+ 'sandbox_label': json['sandbox_label'],
3342
+ 'helm_ai_kernel_version': json['helm_ai_kernel_version'],
3343
+ };
3344
+ }
3345
+ export function RunPublicDemo200ResponseToJSON(value) {
3346
+ if (value == null) {
3347
+ return value;
3348
+ }
3349
+ return {
3350
+ 'verdict': value['verdict'],
3351
+ 'reason_code': value['reason_code'],
3352
+ 'receipt': ReceiptToJSON(value['receipt']),
3353
+ 'proof_refs': RunPublicDemo200ResponseProofRefsToJSON(value['proof_refs']),
3354
+ 'verification_hint': value['verification_hint'],
3355
+ 'sandbox_label': value['sandbox_label'],
3356
+ 'helm_ai_kernel_version': value['helm_ai_kernel_version'],
3357
+ };
3358
+ }
3359
+ /**
3360
+ * Check if a given object implements the RunPublicDemo200ResponseProofRefs interface.
3361
+ */
3362
+ export function instanceOfRunPublicDemo200ResponseProofRefs(value) {
3363
+ if (!('decision_id' in value))
3364
+ return false;
3365
+ if (!('receipt_id' in value))
3366
+ return false;
3367
+ if (!('receipt_hash' in value))
3368
+ return false;
3369
+ return true;
3370
+ }
3371
+ export function RunPublicDemo200ResponseProofRefsFromJSON(json) {
3372
+ return RunPublicDemo200ResponseProofRefsFromJSONTyped(json, false);
3373
+ }
3374
+ export function RunPublicDemo200ResponseProofRefsFromJSONTyped(json, ignoreDiscriminator) {
3375
+ if (json == null) {
3376
+ return json;
3377
+ }
3378
+ return {
3379
+ 'decision_id': json['decision_id'],
3380
+ 'receipt_id': json['receipt_id'],
3381
+ 'receipt_hash': json['receipt_hash'],
3382
+ };
3383
+ }
3384
+ export function RunPublicDemo200ResponseProofRefsToJSON(value) {
3385
+ if (value == null) {
3386
+ return value;
3387
+ }
3388
+ return {
3389
+ 'decision_id': value['decision_id'],
3390
+ 'receipt_id': value['receipt_id'],
3391
+ 'receipt_hash': value['receipt_hash'],
3392
+ };
3393
+ }
3394
+ /**
3395
+ * @export
3396
+ */
3397
+ export const RunPublicDemoRequestActionIdEnum = {
3398
+ ReadTicket: 'read_ticket',
3399
+ DraftReply: 'draft_reply',
3400
+ SmallRefund: 'small_refund',
3401
+ LargeRefund: 'large_refund',
3402
+ DangerousShell: 'dangerous_shell',
3403
+ ExportCustomerList: 'export_customer_list',
3404
+ ModifyPolicy: 'modify_policy'
3405
+ };
3406
+ /**
3407
+ * Check if a given object implements the RunPublicDemoRequest interface.
3408
+ */
3409
+ export function instanceOfRunPublicDemoRequest(value) {
3410
+ if (!('action_id' in value))
3411
+ return false;
3412
+ return true;
3413
+ }
3414
+ export function RunPublicDemoRequestFromJSON(json) {
3415
+ return RunPublicDemoRequestFromJSONTyped(json, false);
3416
+ }
3417
+ export function RunPublicDemoRequestFromJSONTyped(json, ignoreDiscriminator) {
3418
+ if (json == null) {
3419
+ return json;
3420
+ }
3421
+ return {
3422
+ 'action_id': json['action_id'],
3423
+ 'policy_id': json['policy_id'] == null ? undefined : json['policy_id'],
3424
+ 'args': json['args'] == null ? undefined : json['args'],
3425
+ };
3426
+ }
3427
+ export function RunPublicDemoRequestToJSON(value) {
3428
+ if (value == null) {
3429
+ return value;
3430
+ }
3431
+ return {
3432
+ 'action_id': value['action_id'],
3433
+ 'policy_id': value['policy_id'],
3434
+ 'args': value['args'],
3435
+ };
3436
+ }
3437
+ /**
3438
+ * @export
3439
+ */
3440
+ export const SandboxBackendProfileKindEnum = {
3441
+ WasiWazero: 'wasi-wazero',
3442
+ WasiWasmtime: 'wasi-wasmtime',
3443
+ NativeNsjail: 'native-nsjail',
3444
+ NativeGvisor: 'native-gvisor',
3445
+ NativeFirecracker: 'native-firecracker',
3446
+ HostedAdapter: 'hosted-adapter'
3447
+ };
3448
+ /**
3449
+ * Check if a given object implements the SandboxBackendProfile interface.
3450
+ */
3451
+ export function instanceOfSandboxBackendProfile(value) {
3452
+ if (!('name' in value))
3453
+ return false;
3454
+ if (!('kind' in value))
3455
+ return false;
3456
+ if (!('runtime' in value))
3457
+ return false;
3458
+ if (!('hosted' in value))
3459
+ return false;
3460
+ if (!('deny_network_by_default' in value))
3461
+ return false;
3462
+ if (!('native_isolation' in value))
3463
+ return false;
3464
+ return true;
3465
+ }
3466
+ export function SandboxBackendProfileFromJSON(json) {
3467
+ return SandboxBackendProfileFromJSONTyped(json, false);
3468
+ }
3469
+ export function SandboxBackendProfileFromJSONTyped(json, ignoreDiscriminator) {
3470
+ if (json == null) {
3471
+ return json;
3472
+ }
3473
+ return {
3474
+ 'name': json['name'],
3475
+ 'kind': json['kind'],
3476
+ 'runtime': json['runtime'],
3477
+ 'hosted': json['hosted'],
3478
+ 'deny_network_by_default': json['deny_network_by_default'],
3479
+ 'native_isolation': json['native_isolation'],
3480
+ 'experimental': json['experimental'] == null ? undefined : json['experimental'],
3481
+ };
3482
+ }
3483
+ export function SandboxBackendProfileToJSON(value) {
3484
+ if (value == null) {
3485
+ return value;
3486
+ }
3487
+ return {
3488
+ 'name': value['name'],
3489
+ 'kind': value['kind'],
3490
+ 'runtime': value['runtime'],
3491
+ 'hosted': value['hosted'],
3492
+ 'deny_network_by_default': value['deny_network_by_default'],
3493
+ 'native_isolation': value['native_isolation'],
3494
+ 'experimental': value['experimental'],
3495
+ };
3496
+ }
3497
+ /**
3498
+ * Check if a given object implements the SandboxGrant interface.
3499
+ */
3500
+ export function instanceOfSandboxGrant(value) {
3501
+ if (!('grant_id' in value))
3502
+ return false;
3503
+ if (!('runtime' in value))
3504
+ return false;
3505
+ if (!('profile' in value))
3506
+ return false;
3507
+ if (!('env' in value))
3508
+ return false;
3509
+ if (!('network' in value))
3510
+ return false;
3511
+ if (!('declared_at' in value))
3512
+ return false;
3513
+ return true;
3514
+ }
3515
+ export function SandboxGrantFromJSON(json) {
3516
+ return SandboxGrantFromJSONTyped(json, false);
3517
+ }
3518
+ export function SandboxGrantFromJSONTyped(json, ignoreDiscriminator) {
3519
+ if (json == null) {
3520
+ return json;
3521
+ }
3522
+ return {
3523
+ 'grant_id': json['grant_id'],
3524
+ 'runtime': json['runtime'],
3525
+ 'runtime_version': json['runtime_version'] == null ? undefined : json['runtime_version'],
3526
+ 'profile': json['profile'],
3527
+ 'image_digest': json['image_digest'] == null ? undefined : json['image_digest'],
3528
+ 'template_digest': json['template_digest'] == null ? undefined : json['template_digest'],
3529
+ 'filesystem_preopens': json['filesystem_preopens'] == null ? undefined : (json['filesystem_preopens'].map(FilesystemPreopenFromJSON)),
3530
+ 'env': EnvExposurePolicyFromJSON(json['env']),
3531
+ 'network': NetworkGrantFromJSON(json['network']),
3532
+ 'limits': json['limits'] == null ? undefined : SandboxGrantLimitsFromJSON(json['limits']),
3533
+ 'declared_at': (new Date(json['declared_at'])),
3534
+ 'policy_epoch': json['policy_epoch'] == null ? undefined : json['policy_epoch'],
3535
+ 'grant_hash': json['grant_hash'] == null ? undefined : json['grant_hash'],
3536
+ };
3537
+ }
3538
+ export function SandboxGrantToJSON(value) {
3539
+ if (value == null) {
3540
+ return value;
3541
+ }
3542
+ return {
3543
+ 'grant_id': value['grant_id'],
3544
+ 'runtime': value['runtime'],
3545
+ 'runtime_version': value['runtime_version'],
3546
+ 'profile': value['profile'],
3547
+ 'image_digest': value['image_digest'],
3548
+ 'template_digest': value['template_digest'],
3549
+ 'filesystem_preopens': value['filesystem_preopens'] == null ? undefined : (value['filesystem_preopens'].map(FilesystemPreopenToJSON)),
3550
+ 'env': EnvExposurePolicyToJSON(value['env']),
3551
+ 'network': NetworkGrantToJSON(value['network']),
3552
+ 'limits': SandboxGrantLimitsToJSON(value['limits']),
3553
+ 'declared_at': ((value['declared_at']).toISOString()),
3554
+ 'policy_epoch': value['policy_epoch'],
3555
+ 'grant_hash': value['grant_hash'],
3556
+ };
3557
+ }
3558
+ export function SandboxGrantInspectionFromJSON(json) {
3559
+ return SandboxGrantInspectionFromJSONTyped(json, false);
3560
+ }
3561
+ export function SandboxGrantInspectionFromJSONTyped(json, ignoreDiscriminator) {
3562
+ if (json == null) {
3563
+ return json;
3564
+ }
3565
+ if (Array.isArray(json)) {
3566
+ return json.map((item) => SandboxBackendProfileFromJSONTyped(item, true));
3567
+ }
3568
+ return SandboxGrantFromJSONTyped(json, true);
3569
+ }
3570
+ export function SandboxGrantInspectionToJSON(value) {
3571
+ if (value == null) {
3572
+ return value;
3573
+ }
3574
+ if (Array.isArray(value)) {
3575
+ return value.map((item) => SandboxBackendProfileToJSON(item));
3576
+ }
3577
+ return SandboxGrantToJSON(value);
3578
+ }
3579
+ /**
3580
+ * Check if a given object implements the SandboxGrantLimits interface.
3581
+ */
3582
+ export function instanceOfSandboxGrantLimits(value) {
3583
+ return true;
3584
+ }
3585
+ export function SandboxGrantLimitsFromJSON(json) {
3586
+ return SandboxGrantLimitsFromJSONTyped(json, false);
3587
+ }
3588
+ export function SandboxGrantLimitsFromJSONTyped(json, ignoreDiscriminator) {
3589
+ if (json == null) {
3590
+ return json;
3591
+ }
3592
+ return {
3593
+ 'memory_bytes': json['memory_bytes'] == null ? undefined : json['memory_bytes'],
3594
+ 'cpu_time': json['cpu_time'] == null ? undefined : json['cpu_time'],
3595
+ 'output_bytes': json['output_bytes'] == null ? undefined : json['output_bytes'],
3596
+ 'open_files': json['open_files'] == null ? undefined : json['open_files'],
3597
+ };
3598
+ }
3599
+ export function SandboxGrantLimitsToJSON(value) {
3600
+ if (value == null) {
3601
+ return value;
3602
+ }
3603
+ return {
3604
+ 'memory_bytes': value['memory_bytes'],
3605
+ 'cpu_time': value['cpu_time'],
3606
+ 'output_bytes': value['output_bytes'],
3607
+ 'open_files': value['open_files'],
3608
+ };
3609
+ }
3610
+ /**
3611
+ * Check if a given object implements the SandboxPreflightRequest interface.
3612
+ */
3613
+ export function instanceOfSandboxPreflightRequest(value) {
3614
+ return true;
3615
+ }
3616
+ export function SandboxPreflightRequestFromJSON(json) {
3617
+ return SandboxPreflightRequestFromJSONTyped(json, false);
3618
+ }
3619
+ export function SandboxPreflightRequestFromJSONTyped(json, ignoreDiscriminator) {
3620
+ if (json == null) {
3621
+ return json;
3622
+ }
3623
+ return {
3624
+ 'runtime': json['runtime'] == null ? undefined : json['runtime'],
3625
+ 'profile': json['profile'] == null ? undefined : json['profile'],
3626
+ 'image_digest': json['image_digest'] == null ? undefined : json['image_digest'],
3627
+ 'policy_epoch': json['policy_epoch'] == null ? undefined : json['policy_epoch'],
3628
+ 'requested_grant': json['requested_grant'] == null ? undefined : SandboxGrantFromJSON(json['requested_grant']),
3629
+ 'expected_grant_hash': json['expected_grant_hash'] == null ? undefined : json['expected_grant_hash'],
3630
+ };
3631
+ }
3632
+ export function SandboxPreflightRequestToJSON(value) {
3633
+ if (value == null) {
3634
+ return value;
3635
+ }
3636
+ return {
3637
+ 'runtime': value['runtime'],
3638
+ 'profile': value['profile'],
3639
+ 'image_digest': value['image_digest'],
3640
+ 'policy_epoch': value['policy_epoch'],
3641
+ 'requested_grant': SandboxGrantToJSON(value['requested_grant']),
3642
+ 'expected_grant_hash': value['expected_grant_hash'],
3643
+ };
3644
+ }
3645
+ /**
3646
+ * @export
3647
+ */
3648
+ export const SandboxPreflightResultVerdictEnum = {
3649
+ Allow: 'ALLOW',
3650
+ Deny: 'DENY',
3651
+ Escalate: 'ESCALATE'
3652
+ };
3653
+ /**
3654
+ * Check if a given object implements the SandboxPreflightResult interface.
3655
+ */
3656
+ export function instanceOfSandboxPreflightResult(value) {
3657
+ return true;
3658
+ }
3659
+ export function SandboxPreflightResultFromJSON(json) {
3660
+ return SandboxPreflightResultFromJSONTyped(json, false);
3661
+ }
3662
+ export function SandboxPreflightResultFromJSONTyped(json, ignoreDiscriminator) {
3663
+ if (json == null) {
3664
+ return json;
3665
+ }
3666
+ return {
3667
+ 'verdict': json['verdict'] == null ? undefined : json['verdict'],
3668
+ 'reason_code': json['reason_code'] == null ? undefined : json['reason_code'],
3669
+ 'grant_id': json['grant_id'] == null ? undefined : json['grant_id'],
3670
+ 'grant_hash': json['grant_hash'] == null ? undefined : json['grant_hash'],
3671
+ 'dispatch_ready': json['dispatch_ready'] == null ? undefined : json['dispatch_ready'],
3672
+ 'findings': json['findings'] == null ? undefined : json['findings'],
3673
+ 'checked_at': json['checked_at'] == null ? undefined : (new Date(json['checked_at'])),
3674
+ };
3675
+ }
3676
+ export function SandboxPreflightResultToJSON(value) {
3677
+ if (value == null) {
3678
+ return value;
3679
+ }
3680
+ return {
3681
+ 'verdict': value['verdict'],
3682
+ 'reason_code': value['reason_code'],
3683
+ 'grant_id': value['grant_id'],
3684
+ 'grant_hash': value['grant_hash'],
3685
+ 'dispatch_ready': value['dispatch_ready'],
3686
+ 'findings': value['findings'],
3687
+ 'checked_at': value['checked_at'] == null ? undefined : ((value['checked_at']).toISOString()),
3688
+ };
3689
+ }
3690
+ /**
3691
+ * Check if a given object implements the Session interface.
3692
+ */
3693
+ export function instanceOfSession(value) {
3694
+ return true;
3695
+ }
3696
+ export function SessionFromJSON(json) {
3697
+ return SessionFromJSONTyped(json, false);
3698
+ }
3699
+ export function SessionFromJSONTyped(json, ignoreDiscriminator) {
3700
+ if (json == null) {
3701
+ return json;
3702
+ }
3703
+ return {
3704
+ 'session_id': json['session_id'] == null ? undefined : json['session_id'],
3705
+ 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
3706
+ 'receipt_count': json['receipt_count'] == null ? undefined : json['receipt_count'],
3707
+ 'last_lamport_clock': json['last_lamport_clock'] == null ? undefined : json['last_lamport_clock'],
3708
+ };
3709
+ }
3710
+ export function SessionToJSON(value) {
3711
+ if (value == null) {
3712
+ return value;
3713
+ }
3714
+ return {
3715
+ 'session_id': value['session_id'],
3716
+ 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()),
3717
+ 'receipt_count': value['receipt_count'],
3718
+ 'last_lamport_clock': value['last_lamport_clock'],
3719
+ };
3720
+ }
3721
+ /**
3722
+ * Check if a given object implements the TamperPublicDemoReceipt200Response interface.
3723
+ */
3724
+ export function instanceOfTamperPublicDemoReceipt200Response(value) {
3725
+ if (!('valid' in value))
3726
+ return false;
3727
+ if (!('signature_valid' in value))
3728
+ return false;
3729
+ if (!('hash_matches' in value))
3730
+ return false;
3731
+ if (!('reason' in value))
3732
+ return false;
3733
+ if (!('receipt_hash' in value))
3734
+ return false;
3735
+ if (!('expected_receipt_hash' in value))
3736
+ return false;
3737
+ if (!('original_hash' in value))
3738
+ return false;
3739
+ if (!('tampered_hash' in value))
3740
+ return false;
3741
+ return true;
3742
+ }
3743
+ export function TamperPublicDemoReceipt200ResponseFromJSON(json) {
3744
+ return TamperPublicDemoReceipt200ResponseFromJSONTyped(json, false);
3745
+ }
3746
+ export function TamperPublicDemoReceipt200ResponseFromJSONTyped(json, ignoreDiscriminator) {
3747
+ if (json == null) {
3748
+ return json;
3749
+ }
3750
+ return {
3751
+ 'valid': json['valid'],
3752
+ 'signature_valid': json['signature_valid'],
3753
+ 'hash_matches': json['hash_matches'],
3754
+ 'reason': json['reason'],
3755
+ 'receipt_hash': json['receipt_hash'],
3756
+ 'expected_receipt_hash': json['expected_receipt_hash'],
3757
+ 'original_hash': json['original_hash'],
3758
+ 'tampered_hash': json['tampered_hash'],
3759
+ };
3760
+ }
3761
+ export function TamperPublicDemoReceipt200ResponseToJSON(value) {
3762
+ if (value == null) {
3763
+ return value;
3764
+ }
3765
+ return {
3766
+ 'valid': value['valid'],
3767
+ 'signature_valid': value['signature_valid'],
3768
+ 'hash_matches': value['hash_matches'],
3769
+ 'reason': value['reason'],
3770
+ 'receipt_hash': value['receipt_hash'],
3771
+ 'expected_receipt_hash': value['expected_receipt_hash'],
3772
+ 'original_hash': value['original_hash'],
3773
+ 'tampered_hash': value['tampered_hash'],
3774
+ };
3775
+ }
3776
+ /**
3777
+ * Check if a given object implements the TamperPublicDemoReceiptRequest interface.
3778
+ */
3779
+ export function instanceOfTamperPublicDemoReceiptRequest(value) {
3780
+ if (!('receipt' in value))
3781
+ return false;
3782
+ if (!('expected_receipt_hash' in value))
3783
+ return false;
3784
+ return true;
3785
+ }
3786
+ export function TamperPublicDemoReceiptRequestFromJSON(json) {
3787
+ return TamperPublicDemoReceiptRequestFromJSONTyped(json, false);
3788
+ }
3789
+ export function TamperPublicDemoReceiptRequestFromJSONTyped(json, ignoreDiscriminator) {
3790
+ if (json == null) {
3791
+ return json;
3792
+ }
3793
+ return {
3794
+ 'receipt': ReceiptFromJSON(json['receipt']),
3795
+ 'expected_receipt_hash': json['expected_receipt_hash'],
3796
+ 'mutation': json['mutation'] == null ? undefined : json['mutation'],
3797
+ };
3798
+ }
3799
+ export function TamperPublicDemoReceiptRequestToJSON(value) {
3800
+ if (value == null) {
3801
+ return value;
3802
+ }
3803
+ return {
3804
+ 'receipt': ReceiptToJSON(value['receipt']),
3805
+ 'expected_receipt_hash': value['expected_receipt_hash'],
3806
+ 'mutation': value['mutation'],
3807
+ };
3808
+ }
3809
+ /**
3810
+ * Check if a given object implements the TelemetryExportRequest interface.
3811
+ */
3812
+ export function instanceOfTelemetryExportRequest(value) {
3813
+ return true;
3814
+ }
3815
+ export function TelemetryExportRequestFromJSON(json) {
3816
+ return TelemetryExportRequestFromJSONTyped(json, false);
3817
+ }
3818
+ export function TelemetryExportRequestFromJSONTyped(json, ignoreDiscriminator) {
3819
+ if (json == null) {
3820
+ return json;
3821
+ }
3822
+ return {
3823
+ 'format': json['format'] == null ? undefined : json['format'],
3824
+ 'receipt_id': json['receipt_id'] == null ? undefined : json['receipt_id'],
3825
+ 'record_hash': json['record_hash'] == null ? undefined : json['record_hash'],
3826
+ 'policy_epoch': json['policy_epoch'] == null ? undefined : json['policy_epoch'],
3827
+ 'verdict': json['verdict'] == null ? undefined : json['verdict'],
3828
+ 'reason_code': json['reason_code'] == null ? undefined : json['reason_code'],
3829
+ 'sandbox_grant_hash': json['sandbox_grant_hash'] == null ? undefined : json['sandbox_grant_hash'],
3830
+ 'authz_snapshot_hash': json['authz_snapshot_hash'] == null ? undefined : json['authz_snapshot_hash'],
3831
+ 'attributes': json['attributes'] == null ? undefined : json['attributes'],
3832
+ };
3833
+ }
3834
+ export function TelemetryExportRequestToJSON(value) {
3835
+ if (value == null) {
3836
+ return value;
3837
+ }
3838
+ return {
3839
+ 'format': value['format'],
3840
+ 'receipt_id': value['receipt_id'],
3841
+ 'record_hash': value['record_hash'],
3842
+ 'policy_epoch': value['policy_epoch'],
3843
+ 'verdict': value['verdict'],
3844
+ 'reason_code': value['reason_code'],
3845
+ 'sandbox_grant_hash': value['sandbox_grant_hash'],
3846
+ 'authz_snapshot_hash': value['authz_snapshot_hash'],
3847
+ 'attributes': value['attributes'],
3848
+ };
3849
+ }
3850
+ /**
3851
+ * Check if a given object implements the TelemetryExportResult interface.
3852
+ */
3853
+ export function instanceOfTelemetryExportResult(value) {
3854
+ return true;
3855
+ }
3856
+ export function TelemetryExportResultFromJSON(json) {
3857
+ return TelemetryExportResultFromJSONTyped(json, false);
3858
+ }
3859
+ export function TelemetryExportResultFromJSONTyped(json, ignoreDiscriminator) {
3860
+ if (json == null) {
3861
+ return json;
3862
+ }
3863
+ return {
3864
+ 'export_id': json['export_id'] == null ? undefined : json['export_id'],
3865
+ 'format': json['format'] == null ? undefined : json['format'],
3866
+ 'authoritative': json['authoritative'] == null ? undefined : json['authoritative'],
3867
+ 'attributes': json['attributes'] == null ? undefined : json['attributes'],
3868
+ 'exported_at': json['exported_at'] == null ? undefined : (new Date(json['exported_at'])),
3869
+ };
3870
+ }
3871
+ export function TelemetryExportResultToJSON(value) {
3872
+ if (value == null) {
3873
+ return value;
3874
+ }
3875
+ return {
3876
+ 'export_id': value['export_id'],
3877
+ 'format': value['format'],
3878
+ 'authoritative': value['authoritative'],
3879
+ 'attributes': value['attributes'],
3880
+ 'exported_at': value['exported_at'] == null ? undefined : ((value['exported_at']).toISOString()),
3881
+ };
3882
+ }
3883
+ /**
3884
+ * Check if a given object implements the TelemetryOTelConfig interface.
3885
+ */
3886
+ export function instanceOfTelemetryOTelConfig(value) {
3887
+ return true;
3888
+ }
3889
+ export function TelemetryOTelConfigFromJSON(json) {
3890
+ return TelemetryOTelConfigFromJSONTyped(json, false);
3891
+ }
3892
+ export function TelemetryOTelConfigFromJSONTyped(json, ignoreDiscriminator) {
3893
+ if (json == null) {
3894
+ return json;
3895
+ }
3896
+ return {
3897
+ 'service_name': json['service_name'] == null ? undefined : json['service_name'],
3898
+ 'signal_type': json['signal_type'] == null ? undefined : json['signal_type'],
3899
+ 'authoritative': json['authoritative'] == null ? undefined : json['authoritative'],
3900
+ 'span_attributes': json['span_attributes'] == null ? undefined : json['span_attributes'],
3901
+ 'exported_signals': json['exported_signals'] == null ? undefined : json['exported_signals'],
3902
+ };
3903
+ }
3904
+ export function TelemetryOTelConfigToJSON(value) {
3905
+ if (value == null) {
3906
+ return value;
3907
+ }
3908
+ return {
3909
+ 'service_name': value['service_name'],
3910
+ 'signal_type': value['signal_type'],
3911
+ 'authoritative': value['authoritative'],
3912
+ 'span_attributes': value['span_attributes'],
3913
+ 'exported_signals': value['exported_signals'],
3914
+ };
3915
+ }
3916
+ /**
3917
+ * Check if a given object implements the TransitionApprovalCeremonyRequest interface.
3918
+ */
3919
+ export function instanceOfTransitionApprovalCeremonyRequest(value) {
3920
+ return true;
3921
+ }
3922
+ export function TransitionApprovalCeremonyRequestFromJSON(json) {
3923
+ return TransitionApprovalCeremonyRequestFromJSONTyped(json, false);
3924
+ }
3925
+ export function TransitionApprovalCeremonyRequestFromJSONTyped(json, ignoreDiscriminator) {
3926
+ if (json == null) {
3927
+ return json;
3928
+ }
3929
+ return {
3930
+ 'actor': json['actor'] == null ? undefined : json['actor'],
3931
+ 'receipt_id': json['receipt_id'] == null ? undefined : json['receipt_id'],
3932
+ 'reason': json['reason'] == null ? undefined : json['reason'],
3933
+ };
3934
+ }
3935
+ export function TransitionApprovalCeremonyRequestToJSON(value) {
3936
+ if (value == null) {
3937
+ return value;
3938
+ }
3939
+ return {
3940
+ 'actor': value['actor'],
3941
+ 'receipt_id': value['receipt_id'],
3942
+ 'reason': value['reason'],
3943
+ };
3944
+ }
3945
+ /**
3946
+ * @export
3947
+ */
3948
+ export const VerificationResultVerdictEnum = {
3949
+ Pass: 'PASS',
3950
+ Fail: 'FAIL'
3951
+ };
3952
+ /**
3953
+ * Check if a given object implements the VerificationResult interface.
3954
+ */
3955
+ export function instanceOfVerificationResult(value) {
3956
+ return true;
3957
+ }
3958
+ export function VerificationResultFromJSON(json) {
3959
+ return VerificationResultFromJSONTyped(json, false);
3960
+ }
3961
+ export function VerificationResultFromJSONTyped(json, ignoreDiscriminator) {
3962
+ if (json == null) {
3963
+ return json;
3964
+ }
3965
+ return {
3966
+ 'verdict': json['verdict'] == null ? undefined : json['verdict'],
3967
+ 'checks': json['checks'] == null ? undefined : VerificationResultChecksFromJSON(json['checks']),
3968
+ 'roots': json['roots'] == null ? undefined : VerificationResultRootsFromJSON(json['roots']),
3969
+ 'errors': json['errors'] == null ? undefined : json['errors'],
3970
+ };
3971
+ }
3972
+ export function VerificationResultToJSON(value) {
3973
+ if (value == null) {
3974
+ return value;
3975
+ }
3976
+ return {
3977
+ 'verdict': value['verdict'],
3978
+ 'checks': VerificationResultChecksToJSON(value['checks']),
3979
+ 'roots': VerificationResultRootsToJSON(value['roots']),
3980
+ 'errors': value['errors'],
3981
+ };
3982
+ }
3983
+ /**
3984
+ * @export
3985
+ */
3986
+ export const VerificationResultChecksSignaturesEnum = {
3987
+ Pass: 'PASS',
3988
+ Fail: 'FAIL'
3989
+ };
3990
+ /**
3991
+ * @export
3992
+ */
3993
+ export const VerificationResultChecksCausalChainEnum = {
3994
+ Pass: 'PASS',
3995
+ Fail: 'FAIL'
3996
+ };
3997
+ /**
3998
+ * @export
3999
+ */
4000
+ export const VerificationResultChecksPolicyComplianceEnum = {
4001
+ Pass: 'PASS',
4002
+ Fail: 'FAIL'
4003
+ };
4004
+ /**
4005
+ * Check if a given object implements the VerificationResultChecks interface.
4006
+ */
4007
+ export function instanceOfVerificationResultChecks(value) {
4008
+ return true;
4009
+ }
4010
+ export function VerificationResultChecksFromJSON(json) {
4011
+ return VerificationResultChecksFromJSONTyped(json, false);
4012
+ }
4013
+ export function VerificationResultChecksFromJSONTyped(json, ignoreDiscriminator) {
4014
+ if (json == null) {
4015
+ return json;
4016
+ }
4017
+ return {
4018
+ 'signatures': json['signatures'] == null ? undefined : json['signatures'],
4019
+ 'causal_chain': json['causal_chain'] == null ? undefined : json['causal_chain'],
4020
+ 'policy_compliance': json['policy_compliance'] == null ? undefined : json['policy_compliance'],
4021
+ };
4022
+ }
4023
+ export function VerificationResultChecksToJSON(value) {
4024
+ if (value == null) {
4025
+ return value;
4026
+ }
4027
+ return {
4028
+ 'signatures': value['signatures'],
4029
+ 'causal_chain': value['causal_chain'],
4030
+ 'policy_compliance': value['policy_compliance'],
4031
+ };
4032
+ }
4033
+ /**
4034
+ * Check if a given object implements the VerificationResultRoots interface.
4035
+ */
4036
+ export function instanceOfVerificationResultRoots(value) {
4037
+ return true;
4038
+ }
4039
+ export function VerificationResultRootsFromJSON(json) {
4040
+ return VerificationResultRootsFromJSONTyped(json, false);
4041
+ }
4042
+ export function VerificationResultRootsFromJSONTyped(json, ignoreDiscriminator) {
4043
+ if (json == null) {
4044
+ return json;
4045
+ }
4046
+ return {
4047
+ 'manifest_root_hash': json['manifest_root_hash'] == null ? undefined : json['manifest_root_hash'],
4048
+ 'merkle_root': json['merkle_root'] == null ? undefined : json['merkle_root'],
4049
+ 'entry_count': json['entry_count'] == null ? undefined : json['entry_count'],
4050
+ };
4051
+ }
4052
+ export function VerificationResultRootsToJSON(value) {
4053
+ if (value == null) {
4054
+ return value;
4055
+ }
4056
+ return {
4057
+ 'manifest_root_hash': value['manifest_root_hash'],
4058
+ 'merkle_root': value['merkle_root'],
4059
+ 'entry_count': value['entry_count'],
4060
+ };
4061
+ }
4062
+ /**
4063
+ * Check if a given object implements the VerifyPublicDemoReceipt200Response interface.
4064
+ */
4065
+ export function instanceOfVerifyPublicDemoReceipt200Response(value) {
4066
+ if (!('valid' in value))
4067
+ return false;
4068
+ if (!('signature_valid' in value))
4069
+ return false;
4070
+ if (!('hash_matches' in value))
4071
+ return false;
4072
+ if (!('reason' in value))
4073
+ return false;
4074
+ if (!('verified_fields' in value))
4075
+ return false;
4076
+ if (!('receipt_hash' in value))
4077
+ return false;
4078
+ if (!('expected_receipt_hash' in value))
4079
+ return false;
4080
+ return true;
4081
+ }
4082
+ export function VerifyPublicDemoReceipt200ResponseFromJSON(json) {
4083
+ return VerifyPublicDemoReceipt200ResponseFromJSONTyped(json, false);
4084
+ }
4085
+ export function VerifyPublicDemoReceipt200ResponseFromJSONTyped(json, ignoreDiscriminator) {
4086
+ if (json == null) {
4087
+ return json;
4088
+ }
4089
+ return {
4090
+ 'valid': json['valid'],
4091
+ 'signature_valid': json['signature_valid'],
4092
+ 'hash_matches': json['hash_matches'],
4093
+ 'reason': json['reason'],
4094
+ 'verified_fields': json['verified_fields'],
4095
+ 'receipt_hash': json['receipt_hash'],
4096
+ 'expected_receipt_hash': json['expected_receipt_hash'],
4097
+ };
4098
+ }
4099
+ export function VerifyPublicDemoReceipt200ResponseToJSON(value) {
4100
+ if (value == null) {
4101
+ return value;
4102
+ }
4103
+ return {
4104
+ 'valid': value['valid'],
4105
+ 'signature_valid': value['signature_valid'],
4106
+ 'hash_matches': value['hash_matches'],
4107
+ 'reason': value['reason'],
4108
+ 'verified_fields': value['verified_fields'],
4109
+ 'receipt_hash': value['receipt_hash'],
4110
+ 'expected_receipt_hash': value['expected_receipt_hash'],
4111
+ };
4112
+ }
4113
+ /**
4114
+ * Check if a given object implements the VerifyPublicDemoReceiptRequest interface.
4115
+ */
4116
+ export function instanceOfVerifyPublicDemoReceiptRequest(value) {
4117
+ if (!('receipt' in value))
4118
+ return false;
4119
+ if (!('expected_receipt_hash' in value))
4120
+ return false;
4121
+ return true;
4122
+ }
4123
+ export function VerifyPublicDemoReceiptRequestFromJSON(json) {
4124
+ return VerifyPublicDemoReceiptRequestFromJSONTyped(json, false);
4125
+ }
4126
+ export function VerifyPublicDemoReceiptRequestFromJSONTyped(json, ignoreDiscriminator) {
4127
+ if (json == null) {
4128
+ return json;
4129
+ }
4130
+ return {
4131
+ 'receipt': ReceiptFromJSON(json['receipt']),
4132
+ 'expected_receipt_hash': json['expected_receipt_hash'],
4133
+ };
4134
+ }
4135
+ export function VerifyPublicDemoReceiptRequestToJSON(value) {
4136
+ if (value == null) {
4137
+ return value;
4138
+ }
4139
+ return {
4140
+ 'receipt': ReceiptToJSON(value['receipt']),
4141
+ 'expected_receipt_hash': value['expected_receipt_hash'],
4142
+ };
4143
+ }
4144
+ /**
4145
+ * Check if a given object implements the VersionInfo interface.
4146
+ */
4147
+ export function instanceOfVersionInfo(value) {
4148
+ return true;
4149
+ }
4150
+ export function VersionInfoFromJSON(json) {
4151
+ return VersionInfoFromJSONTyped(json, false);
4152
+ }
4153
+ export function VersionInfoFromJSONTyped(json, ignoreDiscriminator) {
4154
+ if (json == null) {
4155
+ return json;
4156
+ }
4157
+ return {
4158
+ 'version': json['version'] == null ? undefined : json['version'],
4159
+ 'commit': json['commit'] == null ? undefined : json['commit'],
4160
+ 'build_time': json['build_time'] == null ? undefined : json['build_time'],
4161
+ 'go_version': json['go_version'] == null ? undefined : json['go_version'],
4162
+ };
4163
+ }
4164
+ export function VersionInfoToJSON(value) {
4165
+ if (value == null) {
4166
+ return value;
4167
+ }
4168
+ return {
4169
+ 'version': value['version'],
4170
+ 'commit': value['commit'],
4171
+ 'build_time': value['build_time'],
4172
+ 'go_version': value['go_version'],
4173
+ };
4174
+ }