-
Notifications
You must be signed in to change notification settings - Fork 12
/
Api.ts
8514 lines (7830 loc) · 227 KB
/
Api.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* eslint-disable */
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* Copyright Oxide Computer Company
*/
import { HttpClient, toQueryString, type FetchParams } from './http-client'
export type { ApiConfig, ApiResult, ErrorBody, ErrorResult } from './http-client'
/**
* An IPv4 subnet
*
* An IPv4 subnet, including prefix and prefix length
*/
export type Ipv4Net = string
/**
* An IPv6 subnet
*
* An IPv6 subnet, including prefix and subnet mask
*/
export type Ipv6Net = string
export type IpNet = Ipv4Net | Ipv6Net
/**
* A name unique within the parent collection
*
* Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Names cannot be a UUID, but they may contain a UUID. They can be at most 63 characters long.
*/
export type Name = string
export type NameOrId = string | Name
/**
* An address tied to an address lot.
*/
export type Address = {
/** The address and prefix length of this address. */
address: IpNet
/** The address lot this address is drawn from. */
addressLot: NameOrId
/** Optional VLAN ID for this address */
vlanId?: number
}
/**
* A set of addresses associated with a port configuration.
*/
export type AddressConfig = {
/** The set of addresses assigned to the port configuration. */
addresses: Address[]
}
/**
* The kind associated with an address lot.
*/
export type AddressLotKind =
/** Infrastructure address lots are used for network infrastructure like addresses assigned to rack switches. */
| 'infra'
/** Pool address lots are used by IP pools. */
| 'pool'
/**
* Represents an address lot object, containing the id of the lot that can be used in other API calls.
*/
export type AddressLot = {
/** human-readable free-form text about a resource */
description: string
/** unique, immutable, system-controlled identifier for each resource */
id: string
/** Desired use of `AddressLot` */
kind: AddressLotKind
/** unique, mutable, user-controlled identifier for each resource */
name: Name
/** timestamp when this resource was created */
timeCreated: Date
/** timestamp when this resource was last modified */
timeModified: Date
}
/**
* An address lot block is a part of an address lot and contains a range of addresses. The range is inclusive.
*/
export type AddressLotBlock = {
/** The first address of the block (inclusive). */
firstAddress: string
/** The id of the address lot block. */
id: string
/** The last address of the block (inclusive). */
lastAddress: string
}
/**
* Parameters for creating an address lot block. Fist and last addresses are inclusive.
*/
export type AddressLotBlockCreate = {
/** The first address in the lot (inclusive). */
firstAddress: string
/** The last address in the lot (inclusive). */
lastAddress: string
}
/**
* A single page of results
*/
export type AddressLotBlockResultsPage = {
/** list of items on this page of results */
items: AddressLotBlock[]
/** token used to fetch the next page of results (if any) */
nextPage?: string
}
/**
* Parameters for creating an address lot.
*/
export type AddressLotCreate = {
/** The blocks to add along with the new address lot. */
blocks: AddressLotBlockCreate[]
description: string
/** The kind of address lot to create. */
kind: AddressLotKind
name: Name
}
/**
* An address lot and associated blocks resulting from creating an address lot.
*/
export type AddressLotCreateResponse = {
/** The address lot blocks that were created. */
blocks: AddressLotBlock[]
/** The address lot that was created. */
lot: AddressLot
}
/**
* A single page of results
*/
export type AddressLotResultsPage = {
/** list of items on this page of results */
items: AddressLot[]
/** token used to fetch the next page of results (if any) */
nextPage?: string
}
export type BgpMessageHistory = Record<string, unknown>
/**
* Identifies switch physical location
*/
export type SwitchLocation =
/** Switch in upper slot */
| 'switch0'
/** Switch in lower slot */
| 'switch1'
/**
* BGP message history for a particular switch.
*/
export type SwitchBgpHistory = {
/** Message history indexed by peer address. */
history: Record<string, BgpMessageHistory>
/** Switch this message history is associated with. */
switch: SwitchLocation
}
/**
* BGP message history for rack switches.
*/
export type AggregateBgpMessageHistory = {
/** BGP history organized by switch. */
switchHistories: SwitchBgpHistory[]
}
/**
* Description of source IPs allowed to reach rack services.
*/
export type AllowedSourceIps =
/** Allow traffic from any external IP address. */
| { allow: 'any' }
/** Restrict access to a specific set of source IP addresses or subnets.
All others are prevented from reaching rack services. */
| { allow: 'list'; ips: IpNet[] }
/**
* Allowlist of IPs or subnets that can make requests to user-facing services.
*/
export type AllowList = {
/** The allowlist of IPs or subnets. */
allowedIps: AllowedSourceIps
/** Time the list was created. */
timeCreated: Date
/** Time the list was last modified. */
timeModified: Date
}
/**
* Parameters for updating allowed source IPs
*/
export type AllowListUpdate = {
/** The new list of allowed source IPs. */
allowedIps: AllowedSourceIps
}
/**
* Authorization scope for a timeseries.
*
* This describes the level at which a user must be authorized to read data from a timeseries. For example, fleet-scoping means the data is only visible to an operator or fleet reader. Project-scoped, on the other hand, indicates that a user will see data limited to the projects on which they have read permissions.
*/
export type AuthzScope =
/** Timeseries data is limited to fleet readers. */
| 'fleet'
/** Timeseries data is limited to the authorized silo for a user. */
| 'silo'
/** Timeseries data is limited to the authorized projects for a user. */
| 'project'
/** The timeseries is viewable to all without limitation. */
| 'viewable_to_all'
/**
* Properties that uniquely identify an Oxide hardware component
*/
export type Baseboard = { part: string; revision: number; serial: string }
/**
* BFD connection mode.
*/
export type BfdMode = 'single_hop' | 'multi_hop'
/**
* Information needed to disable a BFD session
*/
export type BfdSessionDisable = {
/** Address of the remote peer to disable a BFD session for. */
remote: string
/** The switch to enable this session on. Must be `switch0` or `switch1`. */
switch: Name
}
/**
* Information about a bidirectional forwarding detection (BFD) session.
*/
export type BfdSessionEnable = {
/** The negotiated Control packet transmission interval, multiplied by this variable, will be the Detection Time for this session (as seen by the remote system) */
detectionThreshold: number
/** Address the Oxide switch will listen on for BFD traffic. If `None` then the unspecified address (0.0.0.0 or ::) is used. */
local?: string
/** Select either single-hop (RFC 5881) or multi-hop (RFC 5883) */
mode: BfdMode
/** Address of the remote peer to establish a BFD session with. */
remote: string
/** The minimum interval, in microseconds, between received BFD Control packets that this system requires */
requiredRx: number
/** The switch to enable this session on. Must be `switch0` or `switch1`. */
switch: Name
}
export type BfdState =
/** A stable down state. Non-responsive to incoming messages. */
| 'admin_down'
/** The initial state. */
| 'down'
/** The peer has detected a remote peer in the down state. */
| 'init'
/** The peer has detected a remote peer in the up or init state while in the init state. */
| 'up'
export type BfdStatus = {
detectionThreshold: number
local?: string
mode: BfdMode
peer: string
requiredRx: number
state: BfdState
switch: Name
}
/**
* Represents a BGP announce set by id. The id can be used with other API calls to view and manage the announce set.
*/
export type BgpAnnounceSet = {
/** human-readable free-form text about a resource */
description: string
/** unique, immutable, system-controlled identifier for each resource */
id: string
/** unique, mutable, user-controlled identifier for each resource */
name: Name
/** timestamp when this resource was created */
timeCreated: Date
/** timestamp when this resource was last modified */
timeModified: Date
}
/**
* A BGP announcement tied to a particular address lot block.
*/
export type BgpAnnouncementCreate = {
/** Address lot this announcement is drawn from. */
addressLotBlock: NameOrId
/** The network being announced. */
network: IpNet
}
/**
* Parameters for creating a named set of BGP announcements.
*/
export type BgpAnnounceSetCreate = {
/** The announcements in this set. */
announcement: BgpAnnouncementCreate[]
description: string
name: Name
}
/**
* A BGP announcement tied to an address lot block.
*/
export type BgpAnnouncement = {
/** The address block the IP network being announced is drawn from. */
addressLotBlockId: string
/** The id of the set this announcement is a part of. */
announceSetId: string
/** The IP network being announced. */
network: IpNet
}
/**
* A base BGP configuration.
*/
export type BgpConfig = {
/** The autonomous system number of this BGP configuration. */
asn: number
/** human-readable free-form text about a resource */
description: string
/** unique, immutable, system-controlled identifier for each resource */
id: string
/** unique, mutable, user-controlled identifier for each resource */
name: Name
/** timestamp when this resource was created */
timeCreated: Date
/** timestamp when this resource was last modified */
timeModified: Date
/** Optional virtual routing and forwarding identifier for this BGP configuration. */
vrf?: string
}
/**
* Parameters for creating a BGP configuration. This includes and autonomous system number (ASN) and a virtual routing and forwarding (VRF) identifier.
*/
export type BgpConfigCreate = {
/** The autonomous system number of this BGP configuration. */
asn: number
bgpAnnounceSetId: NameOrId
description: string
name: Name
/** Optional virtual routing and forwarding identifier for this BGP configuration. */
vrf?: Name
}
/**
* A single page of results
*/
export type BgpConfigResultsPage = {
/** list of items on this page of results */
items: BgpConfig[]
/** token used to fetch the next page of results (if any) */
nextPage?: string
}
/**
* The current status of a BGP peer.
*/
export type BgpExported = {
/** Exported routes indexed by peer address. */
exports: Record<string, Ipv4Net[]>
}
/**
* A route imported from a BGP peer.
*/
export type BgpImportedRouteIpv4 = {
/** BGP identifier of the originating router. */
id: number
/** The nexthop the prefix is reachable through. */
nexthop: string
/** The destination network prefix. */
prefix: Ipv4Net
/** Switch the route is imported into. */
switch: SwitchLocation
}
/**
* Define policy relating to the import and export of prefixes from a BGP peer.
*/
export type ImportExportPolicy =
/** Do not perform any filtering. */
{ type: 'no_filtering' } | { type: 'allow'; value: IpNet[] }
/**
* A BGP peer configuration for an interface. Includes the set of announcements that will be advertised to the peer identified by `addr`. The `bgp_config` parameter is a reference to global BGP parameters. The `interface_name` indicates what interface the peer should be contacted on.
*/
export type BgpPeer = {
/** The address of the host to peer with. */
addr: string
/** Define export policy for a peer. */
allowedExport: ImportExportPolicy
/** Define import policy for a peer. */
allowedImport: ImportExportPolicy
/** The global BGP configuration used for establishing a session with this peer. */
bgpConfig: NameOrId
/** Include the provided communities in updates sent to the peer. */
communities: number[]
/** How long to to wait between TCP connection retries (seconds). */
connectRetry: number
/** How long to delay sending an open request after establishing a TCP session (seconds). */
delayOpen: number
/** Enforce that the first AS in paths received from this peer is the peer's AS. */
enforceFirstAs: boolean
/** How long to hold peer connections between keepalives (seconds). */
holdTime: number
/** How long to hold a peer in idle before attempting a new session (seconds). */
idleHoldTime: number
/** The name of interface to peer on. This is relative to the port configuration this BGP peer configuration is a part of. For example this value could be phy0 to refer to a primary physical interface. Or it could be vlan47 to refer to a VLAN interface. */
interfaceName: string
/** How often to send keepalive requests (seconds). */
keepalive: number
/** Apply a local preference to routes received from this peer. */
localPref?: number
/** Use the given key for TCP-MD5 authentication with the peer. */
md5AuthKey?: string
/** Require messages from a peer have a minimum IP time to live field. */
minTtl?: number
/** Apply the provided multi-exit discriminator (MED) updates sent to the peer. */
multiExitDiscriminator?: number
/** Require that a peer has a specified ASN. */
remoteAsn?: number
/** Associate a VLAN ID with a peer. */
vlanId?: number
}
export type BgpPeerConfig = { peers: BgpPeer[] }
/**
* The current state of a BGP peer.
*/
export type BgpPeerState =
/** Initial state. Refuse all incoming BGP connections. No resources allocated to peer. */
| 'idle'
/** Waiting for the TCP connection to be completed. */
| 'connect'
/** Trying to acquire peer by listening for and accepting a TCP connection. */
| 'active'
/** Waiting for open message from peer. */
| 'open_sent'
/** Waiting for keepaliave or notification from peer. */
| 'open_confirm'
/** Synchronizing with peer. */
| 'session_setup'
/** Session established. Able to exchange update, notification and keepalive messages with peers. */
| 'established'
/**
* The current status of a BGP peer.
*/
export type BgpPeerStatus = {
/** IP address of the peer. */
addr: string
/** Local autonomous system number. */
localAsn: number
/** Remote autonomous system number. */
remoteAsn: number
/** State of the peer. */
state: BgpPeerState
/** Time of last state change. */
stateDurationMillis: number
/** Switch with the peer session. */
switch: SwitchLocation
}
/**
* A type storing a range over `T`.
*
* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively.
*/
export type BinRangedouble =
/** A range unbounded below and exclusively above, `..end`. */
| { end: number; type: 'range_to' }
/** A range bounded inclusively below and exclusively above, `start..end`. */
| { end: number; start: number; type: 'range' }
/** A range bounded inclusively below and unbounded above, `start..`. */
| { start: number; type: 'range_from' }
/**
* A type storing a range over `T`.
*
* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively.
*/
export type BinRangefloat =
/** A range unbounded below and exclusively above, `..end`. */
| { end: number; type: 'range_to' }
/** A range bounded inclusively below and exclusively above, `start..end`. */
| { end: number; start: number; type: 'range' }
/** A range bounded inclusively below and unbounded above, `start..`. */
| { start: number; type: 'range_from' }
/**
* A type storing a range over `T`.
*
* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively.
*/
export type BinRangeint16 =
/** A range unbounded below and exclusively above, `..end`. */
| { end: number; type: 'range_to' }
/** A range bounded inclusively below and exclusively above, `start..end`. */
| { end: number; start: number; type: 'range' }
/** A range bounded inclusively below and unbounded above, `start..`. */
| { start: number; type: 'range_from' }
/**
* A type storing a range over `T`.
*
* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively.
*/
export type BinRangeint32 =
/** A range unbounded below and exclusively above, `..end`. */
| { end: number; type: 'range_to' }
/** A range bounded inclusively below and exclusively above, `start..end`. */
| { end: number; start: number; type: 'range' }
/** A range bounded inclusively below and unbounded above, `start..`. */
| { start: number; type: 'range_from' }
/**
* A type storing a range over `T`.
*
* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively.
*/
export type BinRangeint64 =
/** A range unbounded below and exclusively above, `..end`. */
| { end: number; type: 'range_to' }
/** A range bounded inclusively below and exclusively above, `start..end`. */
| { end: number; start: number; type: 'range' }
/** A range bounded inclusively below and unbounded above, `start..`. */
| { start: number; type: 'range_from' }
/**
* A type storing a range over `T`.
*
* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively.
*/
export type BinRangeint8 =
/** A range unbounded below and exclusively above, `..end`. */
| { end: number; type: 'range_to' }
/** A range bounded inclusively below and exclusively above, `start..end`. */
| { end: number; start: number; type: 'range' }
/** A range bounded inclusively below and unbounded above, `start..`. */
| { start: number; type: 'range_from' }
/**
* A type storing a range over `T`.
*
* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively.
*/
export type BinRangeuint16 =
/** A range unbounded below and exclusively above, `..end`. */
| { end: number; type: 'range_to' }
/** A range bounded inclusively below and exclusively above, `start..end`. */
| { end: number; start: number; type: 'range' }
/** A range bounded inclusively below and unbounded above, `start..`. */
| { start: number; type: 'range_from' }
/**
* A type storing a range over `T`.
*
* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively.
*/
export type BinRangeuint32 =
/** A range unbounded below and exclusively above, `..end`. */
| { end: number; type: 'range_to' }
/** A range bounded inclusively below and exclusively above, `start..end`. */
| { end: number; start: number; type: 'range' }
/** A range bounded inclusively below and unbounded above, `start..`. */
| { start: number; type: 'range_from' }
/**
* A type storing a range over `T`.
*
* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively.
*/
export type BinRangeuint64 =
/** A range unbounded below and exclusively above, `..end`. */
| { end: number; type: 'range_to' }
/** A range bounded inclusively below and exclusively above, `start..end`. */
| { end: number; start: number; type: 'range' }
/** A range bounded inclusively below and unbounded above, `start..`. */
| { start: number; type: 'range_from' }
/**
* A type storing a range over `T`.
*
* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively.
*/
export type BinRangeuint8 =
/** A range unbounded below and exclusively above, `..end`. */
| { end: number; type: 'range_to' }
/** A range bounded inclusively below and exclusively above, `start..end`. */
| { end: number; start: number; type: 'range' }
/** A range bounded inclusively below and unbounded above, `start..`. */
| { start: number; type: 'range_from' }
/**
* Type storing bin edges and a count of samples within it.
*/
export type Bindouble = {
/** The total count of samples in this bin. */
count: number
/** The range of the support covered by this bin. */
range: BinRangedouble
}
/**
* Type storing bin edges and a count of samples within it.
*/
export type Binfloat = {
/** The total count of samples in this bin. */
count: number
/** The range of the support covered by this bin. */
range: BinRangefloat
}
/**
* Type storing bin edges and a count of samples within it.
*/
export type Binint16 = {
/** The total count of samples in this bin. */
count: number
/** The range of the support covered by this bin. */
range: BinRangeint16
}
/**
* Type storing bin edges and a count of samples within it.
*/
export type Binint32 = {
/** The total count of samples in this bin. */
count: number
/** The range of the support covered by this bin. */
range: BinRangeint32
}
/**
* Type storing bin edges and a count of samples within it.
*/
export type Binint64 = {
/** The total count of samples in this bin. */
count: number
/** The range of the support covered by this bin. */
range: BinRangeint64
}
/**
* Type storing bin edges and a count of samples within it.
*/
export type Binint8 = {
/** The total count of samples in this bin. */
count: number
/** The range of the support covered by this bin. */
range: BinRangeint8
}
/**
* Type storing bin edges and a count of samples within it.
*/
export type Binuint16 = {
/** The total count of samples in this bin. */
count: number
/** The range of the support covered by this bin. */
range: BinRangeuint16
}
/**
* Type storing bin edges and a count of samples within it.
*/
export type Binuint32 = {
/** The total count of samples in this bin. */
count: number
/** The range of the support covered by this bin. */
range: BinRangeuint32
}
/**
* Type storing bin edges and a count of samples within it.
*/
export type Binuint64 = {
/** The total count of samples in this bin. */
count: number
/** The range of the support covered by this bin. */
range: BinRangeuint64
}
/**
* Type storing bin edges and a count of samples within it.
*/
export type Binuint8 = {
/** The total count of samples in this bin. */
count: number
/** The range of the support covered by this bin. */
range: BinRangeuint8
}
/**
* disk block size in bytes
*/
export type BlockSize = 512 | 2048 | 4096
/**
* Byte count to express memory or storage capacity.
*/
export type ByteCount = number
/**
* The service intended to use this certificate.
*/
export type ServiceUsingCertificate = 'external_api'
/**
* View of a Certificate
*/
export type Certificate = {
/** PEM-formatted string containing public certificate chain */
cert: string
/** human-readable free-form text about a resource */
description: string
/** unique, immutable, system-controlled identifier for each resource */
id: string
/** unique, mutable, user-controlled identifier for each resource */
name: Name
/** The service using this certificate */
service: ServiceUsingCertificate
/** timestamp when this resource was created */
timeCreated: Date
/** timestamp when this resource was last modified */
timeModified: Date
}
/**
* Create-time parameters for a `Certificate`
*/
export type CertificateCreate = {
/** PEM-formatted string containing public certificate chain */
cert: string
description: string
/** PEM-formatted string containing private key */
key: string
name: Name
/** The service using this certificate */
service: ServiceUsingCertificate
}
/**
* A single page of results
*/
export type CertificateResultsPage = {
/** list of items on this page of results */
items: Certificate[]
/** token used to fetch the next page of results (if any) */
nextPage?: string
}
/**
* A cumulative or counter data type.
*/
export type Cumulativedouble = { startTime: Date; value: number }
/**
* A cumulative or counter data type.
*/
export type Cumulativefloat = { startTime: Date; value: number }
/**
* A cumulative or counter data type.
*/
export type Cumulativeint64 = { startTime: Date; value: number }
/**
* A cumulative or counter data type.
*/
export type Cumulativeuint64 = { startTime: Date; value: number }
/**
* Info about the current user
*/
export type CurrentUser = {
/** Human-readable name that can identify the user */
displayName: string
id: string
/** Uuid of the silo to which this user belongs */
siloId: string
/** Name of the silo to which this user belongs. */
siloName: Name
}
/**
* Structure for estimating the p-quantile of a population.
*
* This is based on the P² algorithm for estimating quantiles using constant space.
*
* The algorithm consists of maintaining five markers: the minimum, the p/2-, p-, and (1 + p)/2 quantiles, and the maximum.
*/
export type Quantile = {
/** The desired marker positions. */
desiredMarkerPositions: number[]
/** The heights of the markers. */
markerHeights: number[]
/** The positions of the markers.
We track sample size in the 5th position, as useful observations won't start until we've filled the heights at the 6th sample anyway This does deviate from the paper, but it's a more useful representation that works according to the paper's algorithm. */
markerPositions: number[]
/** The p value for the quantile. */
p: number
}
/**
* Histogram metric
*
* A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support.
*
* Note that any gaps, unsorted bins, or non-finite values will result in an error.
*/
export type Histogramint8 = {
/** The bins of the histogram. */
bins: Binint8[]
/** The maximum value of all samples in the histogram. */
max: number
/** The minimum value of all samples in the histogram. */
min: number
/** The total number of samples in the histogram. */
nSamples: number
/** p50 Quantile */
p50: Quantile
/** p95 Quantile */
p90: Quantile
/** p99 Quantile */
p99: Quantile
/** M2 for Welford's algorithm for variance calculation.
Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */
squaredMean: number
/** The start time of the histogram. */
startTime: Date
/** The sum of all samples in the histogram. */
sumOfSamples: number
}
/**
* Histogram metric
*
* A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support.
*
* Note that any gaps, unsorted bins, or non-finite values will result in an error.
*/
export type Histogramuint8 = {
/** The bins of the histogram. */
bins: Binuint8[]
/** The maximum value of all samples in the histogram. */
max: number
/** The minimum value of all samples in the histogram. */
min: number
/** The total number of samples in the histogram. */
nSamples: number
/** p50 Quantile */
p50: Quantile
/** p95 Quantile */
p90: Quantile
/** p99 Quantile */
p99: Quantile
/** M2 for Welford's algorithm for variance calculation.
Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */
squaredMean: number
/** The start time of the histogram. */
startTime: Date
/** The sum of all samples in the histogram. */
sumOfSamples: number
}
/**
* Histogram metric
*
* A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support.
*
* Note that any gaps, unsorted bins, or non-finite values will result in an error.
*/
export type Histogramint16 = {
/** The bins of the histogram. */
bins: Binint16[]
/** The maximum value of all samples in the histogram. */
max: number
/** The minimum value of all samples in the histogram. */
min: number
/** The total number of samples in the histogram. */
nSamples: number
/** p50 Quantile */
p50: Quantile
/** p95 Quantile */
p90: Quantile
/** p99 Quantile */
p99: Quantile
/** M2 for Welford's algorithm for variance calculation.
Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */
squaredMean: number
/** The start time of the histogram. */
startTime: Date
/** The sum of all samples in the histogram. */
sumOfSamples: number
}
/**
* Histogram metric
*
* A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support.
*
* Note that any gaps, unsorted bins, or non-finite values will result in an error.
*/
export type Histogramuint16 = {
/** The bins of the histogram. */
bins: Binuint16[]
/** The maximum value of all samples in the histogram. */
max: number
/** The minimum value of all samples in the histogram. */
min: number
/** The total number of samples in the histogram. */
nSamples: number
/** p50 Quantile */
p50: Quantile
/** p95 Quantile */
p90: Quantile
/** p99 Quantile */
p99: Quantile
/** M2 for Welford's algorithm for variance calculation.
Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */
squaredMean: number
/** The start time of the histogram. */
startTime: Date
/** The sum of all samples in the histogram. */
sumOfSamples: number
}
/**
* Histogram metric
*
* A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support.
*
* Note that any gaps, unsorted bins, or non-finite values will result in an error.
*/
export type Histogramint32 = {
/** The bins of the histogram. */
bins: Binint32[]
/** The maximum value of all samples in the histogram. */
max: number
/** The minimum value of all samples in the histogram. */
min: number
/** The total number of samples in the histogram. */
nSamples: number
/** p50 Quantile */
p50: Quantile
/** p95 Quantile */
p90: Quantile
/** p99 Quantile */
p99: Quantile
/** M2 for Welford's algorithm for variance calculation.
Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */
squaredMean: number
/** The start time of the histogram. */
startTime: Date
/** The sum of all samples in the histogram. */
sumOfSamples: number
}