@bikefinder/sdk 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -808,77 +808,7 @@ export const zCellAcquisitionOptions = z
808
808
  .optional(),
809
809
  })
810
810
  .catchall(z.unknown());
811
- export const zCellNeighbourValue = z
812
- .object({
813
- pci: z
814
- .int()
815
- .min(0, { error: "Invalid value: Expected uint32 to be >= 0" })
816
- .max(4294967295, {
817
- error: "Invalid value: Expected uint32 to be <= 4294967295",
818
- }),
819
- earfcn: z
820
- .int()
821
- .min(0, { error: "Invalid value: Expected uint32 to be >= 0" })
822
- .max(4294967295, {
823
- error: "Invalid value: Expected uint32 to be <= 4294967295",
824
- }),
825
- rsrp: z
826
- .union([z.number(), z.enum(["NaN", "Infinity", "-Infinity"])])
827
- .nullable(),
828
- rsrq: z
829
- .union([z.number(), z.enum(["NaN", "Infinity", "-Infinity"])])
830
- .nullable(),
831
- })
832
- .catchall(z.unknown());
833
- export const zCellReadingValue = z
834
- .object({
835
- mcc: z
836
- .int()
837
- .min(0, { error: "Invalid value: Expected uint32 to be >= 0" })
838
- .max(4294967295, {
839
- error: "Invalid value: Expected uint32 to be <= 4294967295",
840
- }),
841
- mnc: z
842
- .int()
843
- .min(0, { error: "Invalid value: Expected uint32 to be >= 0" })
844
- .max(4294967295, {
845
- error: "Invalid value: Expected uint32 to be <= 4294967295",
846
- }),
847
- tac: z
848
- .int()
849
- .min(0, { error: "Invalid value: Expected uint32 to be >= 0" })
850
- .max(4294967295, {
851
- error: "Invalid value: Expected uint32 to be <= 4294967295",
852
- }),
853
- cellId: z
854
- .int()
855
- .min(0, { error: "Invalid value: Expected uint32 to be >= 0" })
856
- .max(4294967295, {
857
- error: "Invalid value: Expected uint32 to be <= 4294967295",
858
- }),
859
- pci: z
860
- .int()
861
- .min(0, { error: "Invalid value: Expected uint32 to be >= 0" })
862
- .max(4294967295, {
863
- error: "Invalid value: Expected uint32 to be <= 4294967295",
864
- })
865
- .nullable(),
866
- earfcn: z
867
- .int()
868
- .min(0, { error: "Invalid value: Expected uint32 to be >= 0" })
869
- .max(4294967295, {
870
- error: "Invalid value: Expected uint32 to be <= 4294967295",
871
- })
872
- .nullable(),
873
- rsrp: z
874
- .union([z.number(), z.enum(["NaN", "Infinity", "-Infinity"])])
875
- .nullable(),
876
- rsrq: z
877
- .union([z.number(), z.enum(["NaN", "Infinity", "-Infinity"])])
878
- .nullable(),
879
- })
880
- .catchall(z.unknown());
881
- export const zCellularEnvironmentValueRat = z.enum(["lteM", "nbIot"]);
811
+ export const zCellReadingValueRat = z.enum(["lteM", "nbIot"]);
882
812
  export const zChargingAdjustmentReasonValue = z.enum([
883
813
  "qualifying",
884
814
  "atCeiling",
@@ -2707,40 +2637,6 @@ export const zCurrentObservationNetworkRetryStatusCurrent = z
2707
2637
  .nullish(),
2708
2638
  })
2709
2639
  .catchall(z.unknown());
2710
- export const zCurrentObservationNetworkRsrpCurrent = z
2711
- .object({
2712
- type: z.enum(["network.rsrp"]),
2713
- value: z.number().gte(-200).lte(0),
2714
- deviceId: z.string(),
2715
- sourceObservationId: z.string(),
2716
- measuredAt: z.iso.datetime({ offset: true }),
2717
- receivedAt: z.iso.datetime({ offset: true }),
2718
- requestId: z
2719
- .int()
2720
- .min(0, { error: "Invalid value: Expected uint32 to be >= 0" })
2721
- .max(4294967295, {
2722
- error: "Invalid value: Expected uint32 to be <= 4294967295",
2723
- })
2724
- .nullish(),
2725
- })
2726
- .catchall(z.unknown());
2727
- export const zCurrentObservationNetworkRsrqCurrent = z
2728
- .object({
2729
- type: z.enum(["network.rsrq"]),
2730
- value: z.number().gte(-60).lte(20),
2731
- deviceId: z.string(),
2732
- sourceObservationId: z.string(),
2733
- measuredAt: z.iso.datetime({ offset: true }),
2734
- receivedAt: z.iso.datetime({ offset: true }),
2735
- requestId: z
2736
- .int()
2737
- .min(0, { error: "Invalid value: Expected uint32 to be >= 0" })
2738
- .max(4294967295, {
2739
- error: "Invalid value: Expected uint32 to be <= 4294967295",
2740
- })
2741
- .nullish(),
2742
- })
2743
- .catchall(z.unknown());
2744
2640
  export const zCurrentObservationOutboxAcknowledgedCurrent = z
2745
2641
  .object({
2746
2642
  type: z.enum(["outbox.acknowledged"]),
@@ -3464,15 +3360,24 @@ export const zDeviceObservationValuesCellIdentity = z
3464
3360
  earfcn: z.int().gte(0).lte(4294967295).nullable(),
3465
3361
  })
3466
3362
  .catchall(z.unknown());
3467
- export const zCurrentObservationNetworkServingCellCurrent = z
3363
+ export const zDeviceObservationValuesCellReading = z
3468
3364
  .object({
3469
- type: z.enum(["network.servingCell"]),
3470
- value: z
3471
- .object({
3472
- rat: z.enum(["lteM", "nbIot"]).nullable(),
3473
- identity: zDeviceObservationValuesCellIdentity,
3474
- })
3475
- .catchall(z.unknown()),
3365
+ rat: z.enum(["lteM", "nbIot"]).nullable(),
3366
+ identity: zDeviceObservationValuesCellIdentity,
3367
+ rsrp: z.number().gte(-200).lte(0).nullable(),
3368
+ rsrq: z.number().gte(-60).lte(20).nullable(),
3369
+ })
3370
+ .catchall(z.unknown());
3371
+ /**
3372
+ * Serving cell
3373
+ *
3374
+ * One serving-cell reading from readily available modem data, without a neighbor or GCI measurement. Includes available radio technology, identity and signal values; unresolved fields are null.
3375
+ */
3376
+ export const zCellReadingValue = zDeviceObservationValuesCellReading;
3377
+ export const zCurrentObservationRadioCellsCurrent = z
3378
+ .object({
3379
+ type: z.enum(["radio.cells"]),
3380
+ value: z.array(zDeviceObservationValuesCellReading).max(23),
3476
3381
  deviceId: z.string(),
3477
3382
  sourceObservationId: z.string(),
3478
3383
  measuredAt: z.iso.datetime({ offset: true }),
@@ -3486,44 +3391,10 @@ export const zCurrentObservationNetworkServingCellCurrent = z
3486
3391
  .nullish(),
3487
3392
  })
3488
3393
  .catchall(z.unknown());
3489
- export const zDeviceObservationValuesCellNeighbour = z
3490
- .object({
3491
- pci: z.int().gte(0).lte(4294967295),
3492
- earfcn: z.int().gte(0).lte(4294967295),
3493
- rsrp: z.number().gte(-200).lte(0).nullable(),
3494
- rsrq: z.number().gte(-60).lte(20).nullable(),
3495
- })
3496
- .catchall(z.unknown());
3497
- export const zDeviceObservationValuesCellReading = z
3394
+ export const zCurrentObservationRadioServingCellCurrent = z
3498
3395
  .object({
3499
- mcc: z.int().gte(1).lte(999),
3500
- mnc: z.int().gte(0).lte(999),
3501
- tac: z.int().gte(0).lte(4294967295),
3502
- cellId: z.int().gte(0).lte(4294967295),
3503
- pci: z.int().gte(0).lte(4294967295).nullable(),
3504
- earfcn: z.int().gte(0).lte(4294967295).nullable(),
3505
- rsrp: z.number().gte(-200).lte(0).nullable(),
3506
- rsrq: z.number().gte(-60).lte(20).nullable(),
3507
- })
3508
- .catchall(z.unknown());
3509
- export const zDeviceObservationValuesCellularEnvironment = z
3510
- .object({
3511
- serving: zDeviceObservationValuesCellReading,
3512
- rat: z.enum(["lteM", "nbIot"]),
3513
- globalCells: z.array(zDeviceObservationValuesCellReading).max(5),
3514
- neighbours: z.array(zDeviceObservationValuesCellNeighbour).max(17),
3515
- })
3516
- .catchall(z.unknown());
3517
- /**
3518
- * Cellular environment
3519
- *
3520
- * Coherent serving-cell identity, radio technology and signal evidence, with neighbouring or global cells when explicitly requested. Routine tracking reads serving-cell information without an extended cell search.
3521
- */
3522
- export const zCellularEnvironmentValue = zDeviceObservationValuesCellularEnvironment;
3523
- export const zCurrentObservationRadioCellularEnvironmentCurrent = z
3524
- .object({
3525
- type: z.enum(["radio.cellularEnvironment"]),
3526
- value: zDeviceObservationValuesCellularEnvironment,
3396
+ type: z.enum(["radio.servingCell"]),
3397
+ value: zDeviceObservationValuesCellReading,
3527
3398
  deviceId: z.string(),
3528
3399
  sourceObservationId: z.string(),
3529
3400
  measuredAt: z.iso.datetime({ offset: true }),
@@ -5554,14 +5425,8 @@ export const zCurrentObservation = z.discriminatedUnion("type", [
5554
5425
  zCurrentObservationNetworkRetryStatusCurrent.extend({
5555
5426
  type: z.literal("network.retryStatus"),
5556
5427
  }),
5557
- zCurrentObservationNetworkRsrpCurrent.extend({
5558
- type: z.literal("network.rsrp"),
5559
- }),
5560
- zCurrentObservationNetworkRsrqCurrent.extend({
5561
- type: z.literal("network.rsrq"),
5562
- }),
5563
- zCurrentObservationNetworkServingCellCurrent.extend({
5564
- type: z.literal("network.servingCell"),
5428
+ zCurrentObservationRadioServingCellCurrent.extend({
5429
+ type: z.literal("radio.servingCell"),
5565
5430
  }),
5566
5431
  zCurrentObservationOutboxAcknowledgedCurrent.extend({
5567
5432
  type: z.literal("outbox.acknowledged"),
@@ -5671,8 +5536,8 @@ export const zCurrentObservation = z.discriminatedUnion("type", [
5671
5536
  zCurrentObservationRadioBleDevicesCurrent.extend({
5672
5537
  type: z.literal("radio.bleDevices"),
5673
5538
  }),
5674
- zCurrentObservationRadioCellularEnvironmentCurrent.extend({
5675
- type: z.literal("radio.cellularEnvironment"),
5539
+ zCurrentObservationRadioCellsCurrent.extend({
5540
+ type: z.literal("radio.cells"),
5676
5541
  }),
5677
5542
  zCurrentObservationRadioWifiAccessPointsCurrent.extend({
5678
5543
  type: z.literal("radio.wifiAccessPoints"),
@@ -6223,15 +6088,7 @@ export const zDeviceObservationValues = z
6223
6088
  })
6224
6089
  .catchall(z.unknown())
6225
6090
  .optional(),
6226
- "network.rsrp": z.number().gte(-200).lte(0).optional(),
6227
- "network.rsrq": z.number().gte(-60).lte(20).optional(),
6228
- "network.servingCell": z
6229
- .object({
6230
- rat: z.enum(["lteM", "nbIot"]).nullable(),
6231
- identity: zDeviceObservationValuesCellIdentity,
6232
- })
6233
- .catchall(z.unknown())
6234
- .optional(),
6091
+ "radio.servingCell": zDeviceObservationValuesCellReading.optional(),
6235
6092
  "outbox.acknowledged": z.int().gte(0).lte(4294967295).optional(),
6236
6093
  "outbox.enqueued": z.int().gte(0).lte(4294967295).optional(),
6237
6094
  "outbox.evicted": z.int().gte(0).lte(4294967295).optional(),
@@ -6298,7 +6155,10 @@ export const zDeviceObservationValues = z
6298
6155
  .array(zDeviceObservationValuesBleDevice)
6299
6156
  .max(20)
6300
6157
  .optional(),
6301
- "radio.cellularEnvironment": zDeviceObservationValuesCellularEnvironment.optional(),
6158
+ "radio.cells": z
6159
+ .array(zDeviceObservationValuesCellReading)
6160
+ .max(23)
6161
+ .optional(),
6302
6162
  "radio.wifiAccessPoints": z
6303
6163
  .array(zDeviceObservationValuesWifiAccessPoint)
6304
6164
  .max(20)
@@ -7418,18 +7278,6 @@ export const zNetworkRetryStatusValue = z
7418
7278
  consecutiveFailures: z.int().gte(0).lte(4294967295),
7419
7279
  })
7420
7280
  .catchall(z.unknown());
7421
- /**
7422
- * Network serving cell
7423
- *
7424
- * One passive serving-cell identity fact. Identity fields need a consistent cell context; omit unresolved fields instead of filling from an old cell. Independently timed signal measurements and extended scans remain separately selectable.
7425
- */
7426
- export const zNetworkServingCellValue = z
7427
- .object({
7428
- rat: z.enum(["lteM", "nbIot"]).nullable(),
7429
- identity: zDeviceObservationValuesCellIdentity,
7430
- })
7431
- .catchall(z.unknown());
7432
- export const zNetworkServingCellValueRat = z.enum(["lteM", "nbIot"]);
7433
7281
  export const zNotificationContentData = z
7434
7282
  .object({
7435
7283
  title: z.string().nullish(),
@@ -9994,65 +9842,6 @@ export const zObservationNetworkRetryStatusObservation = z
9994
9842
  .nullish(),
9995
9843
  })
9996
9844
  .catchall(z.unknown());
9997
- export const zObservationNetworkRsrpObservation = z
9998
- .object({
9999
- type: z.enum(["network.rsrp"]),
10000
- value: z.number().gte(-200).lte(0),
10001
- deviceId: z.string(),
10002
- observationId: z.string(),
10003
- receivedAt: z.iso.datetime({ offset: true }),
10004
- ageMs: z.int().gte(0).lte(9007199254740991),
10005
- measuredAt: z.iso.datetime({ offset: true }),
10006
- requestId: z
10007
- .int()
10008
- .min(0, { error: "Invalid value: Expected uint32 to be >= 0" })
10009
- .max(4294967295, {
10010
- error: "Invalid value: Expected uint32 to be <= 4294967295",
10011
- })
10012
- .nullish(),
10013
- })
10014
- .catchall(z.unknown());
10015
- export const zObservationNetworkRsrqObservation = z
10016
- .object({
10017
- type: z.enum(["network.rsrq"]),
10018
- value: z.number().gte(-60).lte(20),
10019
- deviceId: z.string(),
10020
- observationId: z.string(),
10021
- receivedAt: z.iso.datetime({ offset: true }),
10022
- ageMs: z.int().gte(0).lte(9007199254740991),
10023
- measuredAt: z.iso.datetime({ offset: true }),
10024
- requestId: z
10025
- .int()
10026
- .min(0, { error: "Invalid value: Expected uint32 to be >= 0" })
10027
- .max(4294967295, {
10028
- error: "Invalid value: Expected uint32 to be <= 4294967295",
10029
- })
10030
- .nullish(),
10031
- })
10032
- .catchall(z.unknown());
10033
- export const zObservationNetworkServingCellObservation = z
10034
- .object({
10035
- type: z.enum(["network.servingCell"]),
10036
- value: z
10037
- .object({
10038
- rat: z.enum(["lteM", "nbIot"]).nullable(),
10039
- identity: zDeviceObservationValuesCellIdentity,
10040
- })
10041
- .catchall(z.unknown()),
10042
- deviceId: z.string(),
10043
- observationId: z.string(),
10044
- receivedAt: z.iso.datetime({ offset: true }),
10045
- ageMs: z.int().gte(0).lte(9007199254740991),
10046
- measuredAt: z.iso.datetime({ offset: true }),
10047
- requestId: z
10048
- .int()
10049
- .min(0, { error: "Invalid value: Expected uint32 to be >= 0" })
10050
- .max(4294967295, {
10051
- error: "Invalid value: Expected uint32 to be <= 4294967295",
10052
- })
10053
- .nullish(),
10054
- })
10055
- .catchall(z.unknown());
10056
9845
  export const zObservationOutboxAcknowledgedObservation = z
10057
9846
  .object({
10058
9847
  type: z.enum(["outbox.acknowledged"]),
@@ -10683,10 +10472,28 @@ export const zObservationRadioBleDevicesObservation = z
10683
10472
  .nullish(),
10684
10473
  })
10685
10474
  .catchall(z.unknown());
10686
- export const zObservationRadioCellularEnvironmentObservation = z
10475
+ export const zObservationRadioCellsObservation = z
10476
+ .object({
10477
+ type: z.enum(["radio.cells"]),
10478
+ value: z.array(zDeviceObservationValuesCellReading).max(23),
10479
+ deviceId: z.string(),
10480
+ observationId: z.string(),
10481
+ receivedAt: z.iso.datetime({ offset: true }),
10482
+ ageMs: z.int().gte(0).lte(9007199254740991),
10483
+ measuredAt: z.iso.datetime({ offset: true }),
10484
+ requestId: z
10485
+ .int()
10486
+ .min(0, { error: "Invalid value: Expected uint32 to be >= 0" })
10487
+ .max(4294967295, {
10488
+ error: "Invalid value: Expected uint32 to be <= 4294967295",
10489
+ })
10490
+ .nullish(),
10491
+ })
10492
+ .catchall(z.unknown());
10493
+ export const zObservationRadioServingCellObservation = z
10687
10494
  .object({
10688
- type: z.enum(["radio.cellularEnvironment"]),
10689
- value: zDeviceObservationValuesCellularEnvironment,
10495
+ type: z.enum(["radio.servingCell"]),
10496
+ value: zDeviceObservationValuesCellReading,
10690
10497
  deviceId: z.string(),
10691
10498
  observationId: z.string(),
10692
10499
  receivedAt: z.iso.datetime({ offset: true }),
@@ -11053,14 +10860,8 @@ export const zObservation = z.discriminatedUnion("type", [
11053
10860
  zObservationNetworkRetryStatusObservation.extend({
11054
10861
  type: z.literal("network.retryStatus"),
11055
10862
  }),
11056
- zObservationNetworkRsrpObservation.extend({
11057
- type: z.literal("network.rsrp"),
11058
- }),
11059
- zObservationNetworkRsrqObservation.extend({
11060
- type: z.literal("network.rsrq"),
11061
- }),
11062
- zObservationNetworkServingCellObservation.extend({
11063
- type: z.literal("network.servingCell"),
10863
+ zObservationRadioServingCellObservation.extend({
10864
+ type: z.literal("radio.servingCell"),
11064
10865
  }),
11065
10866
  zObservationOutboxAcknowledgedObservation.extend({
11066
10867
  type: z.literal("outbox.acknowledged"),
@@ -11164,9 +10965,7 @@ export const zObservation = z.discriminatedUnion("type", [
11164
10965
  zObservationRadioBleDevicesObservation.extend({
11165
10966
  type: z.literal("radio.bleDevices"),
11166
10967
  }),
11167
- zObservationRadioCellularEnvironmentObservation.extend({
11168
- type: z.literal("radio.cellularEnvironment"),
11169
- }),
10968
+ zObservationRadioCellsObservation.extend({ type: z.literal("radio.cells") }),
11170
10969
  zObservationRadioWifiAccessPointsObservation.extend({
11171
10970
  type: z.literal("radio.wifiAccessPoints"),
11172
10971
  }),
@@ -11737,9 +11536,7 @@ export const zSubmitCommandRequest = z.union([
11737
11536
  z.literal(100),
11738
11537
  z.literal(101),
11739
11538
  z.literal(102),
11740
- z.literal(103),
11741
- z.literal(104),
11742
- z.literal(105),
11539
+ z.literal(174),
11743
11540
  z.literal(107),
11744
11541
  z.literal(110),
11745
11542
  z.literal(111),
@@ -11774,7 +11571,7 @@ export const zSubmitCommandRequest = z.union([
11774
11571
  z.literal(149),
11775
11572
  z.literal(150),
11776
11573
  z.literal(151),
11777
- z.literal(152),
11574
+ z.literal(175),
11778
11575
  z.literal(153),
11779
11576
  z.literal(155),
11780
11577
  z.literal(156),
@@ -11947,9 +11744,7 @@ export const zSubmitCommandRequest = z.union([
11947
11744
  z.literal(100),
11948
11745
  z.literal(101),
11949
11746
  z.literal(102),
11950
- z.literal(103),
11951
- z.literal(104),
11952
- z.literal(105),
11747
+ z.literal(174),
11953
11748
  z.literal(107),
11954
11749
  z.literal(110),
11955
11750
  z.literal(111),
@@ -11984,7 +11779,7 @@ export const zSubmitCommandRequest = z.union([
11984
11779
  z.literal(149),
11985
11780
  z.literal(150),
11986
11781
  z.literal(151),
11987
- z.literal(152),
11782
+ z.literal(175),
11988
11783
  z.literal(153),
11989
11784
  z.literal(155),
11990
11785
  z.literal(156),