@balena/open-balena-api 37.4.0-build-expose-release-assets-v7-ab0d82b768cd3223b1edf5eb721ed520d55f1605-1 → 38.0.0-build-Limit-size-ofl-arge-fields-7b29e06f8391501d61a8512e197634ceadfa93c5-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.
Files changed (28) hide show
  1. package/dist/balena-model.d.ts +14 -20
  2. package/dist/balena.sbvr +100 -8
  3. package/dist/features/device-state/routes/state-get-v3.d.ts +13 -13
  4. package/dist/features/device-state/routes/state-patch-v2.js +2 -2
  5. package/dist/features/device-state/routes/state-patch-v2.js.map +1 -1
  6. package/dist/features/device-state/routes/state-patch-v3.js +2 -2
  7. package/dist/features/device-state/routes/state-patch-v3.js.map +1 -1
  8. package/dist/features/device-state/state-patch-utils.d.ts +6 -3
  9. package/dist/features/device-state/state-patch-utils.js +45 -2
  10. package/dist/features/device-state/state-patch-utils.js.map +1 -1
  11. package/dist/features/devices/hooks/moving.js.map +1 -1
  12. package/dist/features/field-size-limits/hooks.d.ts +1 -0
  13. package/dist/features/field-size-limits/hooks.js +24 -0
  14. package/dist/features/field-size-limits/hooks.js.map +1 -0
  15. package/dist/features/field-size-limits/setup-field-size-limits.d.ts +4 -0
  16. package/dist/features/field-size-limits/setup-field-size-limits.js +37 -0
  17. package/dist/features/field-size-limits/setup-field-size-limits.js.map +1 -0
  18. package/dist/hooks.d.ts +1 -0
  19. package/dist/hooks.js +1 -0
  20. package/dist/hooks.js.map +1 -1
  21. package/dist/index.d.ts +6 -4
  22. package/dist/index.js +2 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/migrations/00104-add-check-constraints-enum-fields.sql +156 -0
  25. package/dist/migrations/00105-add-size-constraints-to-text-fields.sql +719 -0
  26. package/dist/translations/v7/v7.sbvr +0 -14
  27. package/package.json +5 -5
  28. package/dist/migrations/00104-update-index-constraint-for-lf-to-abstract-sql-bump.sql +0 -46
@@ -290,15 +290,14 @@ export interface CpuArchitecture {
290
290
  created_at: Types['Date Time']['Read'];
291
291
  modified_at: Types['Date Time']['Read'];
292
292
  id: Types['Serial']['Read'];
293
- slug: Types['Short Text']['Read'];
294
- device_type?: Array<DeviceType['Read']>;
293
+ slug: 'rpi' | 'armv7hf' | 'aarch64' | 'i386-nlp' | 'i386' | 'amd64';
295
294
  is_supported_by__device_type?: Array<DeviceType['Read']>;
296
295
  };
297
296
  Write: {
298
297
  created_at: Types['Date Time']['Write'];
299
298
  modified_at: Types['Date Time']['Write'];
300
299
  id: Types['Serial']['Write'];
301
- slug: Types['Short Text']['Write'];
300
+ slug: 'rpi' | 'armv7hf' | 'aarch64' | 'i386-nlp' | 'i386' | 'amd64';
302
301
  };
303
302
  }
304
303
  export interface DeviceFamily {
@@ -355,13 +354,9 @@ export interface DeviceType {
355
354
  __id: DeviceFamily['Read']['id'];
356
355
  } | [DeviceFamily['Read']] | [] | null;
357
356
  is_default_for__application?: Array<Application['Read']>;
358
- device?: Array<Device['Read']>;
359
357
  describes__device?: Array<Device['Read']>;
360
358
  device_type__is_referenced_by__alias?: Array<DeviceTypeAlias['Read']>;
361
359
  device_type_alias?: Array<DeviceTypeAlias['Read']>;
362
- supports__cpu_architecture: {
363
- __id: CpuArchitecture['Read']['id'];
364
- } | [CpuArchitecture['Read']];
365
360
  is_referenced_by__alias?: Array<DeviceTypeAlias['Read']>;
366
361
  };
367
362
  Write: {
@@ -389,11 +384,11 @@ export interface Image {
389
384
  } | [Service['Read']];
390
385
  image_size: Types['Big Integer']['Read'] | null;
391
386
  is_stored_at__image_location: Types['Short Text']['Read'];
392
- project_type: Types['Short Text']['Read'] | null;
387
+ project_type: 'Standard Dockerfile' | 'project type unavailable' | 'NodeJS' | 'node.js' | 'local deploy' | 'external service' | 'Dockerfile.template' | 'dockerfile template' | 'dockerfile' | 'Could not be detected' | 'Architecture-specific Dockerfile' | 'Archicture-specific Dockerfile' | null;
393
388
  error_message: Types['Text']['Read'] | null;
394
389
  build_log: Types['Text']['Read'] | null;
395
390
  push_timestamp: Types['Date Time']['Read'] | null;
396
- status: Types['Short Text']['Read'];
391
+ status: 'running' | 'success' | 'failed' | 'error' | 'cancelled' | 'interrupted';
397
392
  content_hash: Types['Short Text']['Read'] | null;
398
393
  contract: Types['JSON']['Read'] | null;
399
394
  device__installs__image?: Array<ImageInstall['Read']>;
@@ -416,11 +411,11 @@ export interface Image {
416
411
  is_a_build_of__service: Service['Write']['id'];
417
412
  image_size: Types['Big Integer']['Write'] | null;
418
413
  is_stored_at__image_location: Types['Short Text']['Write'];
419
- project_type: Types['Short Text']['Write'] | null;
414
+ project_type: 'Standard Dockerfile' | 'project type unavailable' | 'NodeJS' | 'node.js' | 'local deploy' | 'external service' | 'Dockerfile.template' | 'dockerfile template' | 'dockerfile' | 'Could not be detected' | 'Architecture-specific Dockerfile' | 'Archicture-specific Dockerfile' | null;
420
415
  error_message: Types['Text']['Write'] | null;
421
416
  build_log: Types['Text']['Write'] | null;
422
417
  push_timestamp: Types['Date Time']['Write'] | null;
423
- status: Types['Short Text']['Write'];
418
+ status: 'running' | 'success' | 'failed' | 'error' | 'cancelled' | 'interrupted';
424
419
  content_hash: Types['Short Text']['Write'] | null;
425
420
  contract: Types['JSON']['Write'] | null;
426
421
  };
@@ -435,7 +430,6 @@ export interface Organization {
435
430
  user__is_member_of__organization?: Array<OrganizationMembership['Read']>;
436
431
  organization_membership?: Array<OrganizationMembership['Read']>;
437
432
  includes__user?: Array<OrganizationMembership['Read']>;
438
- is_of__application?: Array<Application['Read']>;
439
433
  application?: Array<Application['Read']>;
440
434
  };
441
435
  Write: {
@@ -726,7 +720,7 @@ export interface Device {
726
720
  download_progress: Types['Integer']['Read'] | null;
727
721
  status: Types['Short Text']['Read'] | null;
728
722
  os_version: Types['Short Text']['Read'] | null;
729
- os_variant: Types['Short Text']['Read'] | null;
723
+ os_variant: 'prod' | 'dev' | null;
730
724
  supervisor_version: Types['Short Text']['Read'] | null;
731
725
  provisioning_progress: Types['Integer']['Read'] | null;
732
726
  provisioning_state: Types['Short Text']['Read'] | null;
@@ -806,7 +800,7 @@ export interface Device {
806
800
  download_progress: Types['Integer']['Write'] | null;
807
801
  status: Types['Short Text']['Write'] | null;
808
802
  os_version: Types['Short Text']['Write'] | null;
809
- os_variant: Types['Short Text']['Write'] | null;
803
+ os_variant: 'prod' | 'dev' | null;
810
804
  supervisor_version: Types['Short Text']['Write'] | null;
811
805
  provisioning_progress: Types['Integer']['Write'] | null;
812
806
  provisioning_state: Types['Short Text']['Write'] | null;
@@ -873,7 +867,7 @@ export interface ImageInstall {
873
867
  id: Types['Serial']['Read'];
874
868
  install_date: Types['Date Time']['Read'];
875
869
  download_progress: Types['Integer']['Read'] | null;
876
- status: Types['Short Text']['Read'];
870
+ status: 'Stopping' | 'Stopped' | 'Downloading' | 'Downloaded' | 'Installing' | 'Installed' | 'Starting' | 'Running' | 'Idle' | 'Handing over' | 'Awaiting handover' | 'Deleting' | 'deleted' | 'Dead' | 'paused' | 'restarting' | 'removing' | 'exited' | 'configuring' | 'Unknown';
877
871
  is_provided_by__release: {
878
872
  __id: Release['Read']['id'];
879
873
  } | [Release['Read']];
@@ -892,7 +886,7 @@ export interface ImageInstall {
892
886
  id: Types['Serial']['Write'];
893
887
  install_date: Types['Date Time']['Write'];
894
888
  download_progress: Types['Integer']['Write'] | null;
895
- status: Types['Short Text']['Write'];
889
+ status: 'Stopping' | 'Stopped' | 'Downloading' | 'Downloaded' | 'Installing' | 'Installed' | 'Starting' | 'Running' | 'Idle' | 'Handing over' | 'Awaiting handover' | 'Deleting' | 'deleted' | 'Dead' | 'paused' | 'restarting' | 'removing' | 'exited' | 'configuring' | 'Unknown';
896
890
  is_provided_by__release: Release['Write']['id'];
897
891
  };
898
892
  }
@@ -999,8 +993,8 @@ export interface Release {
999
993
  } | [Application['Read']];
1000
994
  commit: Types['Short Text']['Read'];
1001
995
  composition: Types['JSON']['Read'];
1002
- status: Types['Short Text']['Read'];
1003
- source: Types['Short Text']['Read'];
996
+ status: 'running' | 'success' | 'failed' | 'error' | 'cancelled' | 'interrupted';
997
+ source: 'cloud' | 'local';
1004
998
  build_log: Types['Text']['Read'] | null;
1005
999
  is_invalidated: Types['Boolean']['Read'];
1006
1000
  start_timestamp: Types['Date Time']['Read'];
@@ -1048,8 +1042,8 @@ export interface Release {
1048
1042
  belongs_to__application: Application['Write']['id'];
1049
1043
  commit: Types['Short Text']['Write'];
1050
1044
  composition: Types['JSON']['Write'];
1051
- status: Types['Short Text']['Write'];
1052
- source: Types['Short Text']['Write'];
1045
+ status: 'running' | 'success' | 'failed' | 'error' | 'cancelled' | 'interrupted';
1046
+ source: 'cloud' | 'local';
1053
1047
  build_log: Types['Text']['Write'] | null;
1054
1048
  is_invalidated: Types['Boolean']['Write'];
1055
1049
  start_timestamp: Types['Date Time']['Write'];
package/dist/balena.sbvr CHANGED
@@ -41,6 +41,7 @@ Term: user
41
41
  Concept Type: actor
42
42
  Fact type: user has username
43
43
  Necessity: Each user has exactly one username.
44
+ Necessity: Each user has a username that has a Length (Type) that is less than or equal to 73.
44
45
  Necessity: Each username is of exactly one user.
45
46
  Fact type: user has password
46
47
  Necessity: Each user has at most one password.
@@ -69,8 +70,12 @@ Fact type: api key is of actor
69
70
  Necessity: each api key is of exactly one actor
70
71
  Fact type: api key has name
71
72
  Necessity: Each api key has at most one name.
73
+ -- TODO: Pitch cleanup and reduce to 50
74
+ Necessity: each api key has a name that has a Length (Type) that is less than or equal to 1564.
72
75
  Fact type: api key has description
73
76
  Necessity: Each api key has at most one description.
77
+ -- TODO: Pitch cleanup and reduce to 150
78
+ Necessity: each api key has a description that has a Length (Type) that is less than or equal to 1244.
74
79
 
75
80
 
76
81
  Vocabulary: balena
@@ -353,6 +358,7 @@ Term: application
353
358
  Fact type: application has service name
354
359
  Term Form: service
355
360
  Database Table Name: service
361
+ Necessity: each service has a service name that has a Length (Type) that is greater than 0 and is less than or equal to 63.
356
362
 
357
363
  Fact type: service has label name
358
364
  Term Form: service label
@@ -365,7 +371,7 @@ Term: application
365
371
  Fact type: application has tag key
366
372
  Term Form: application tag
367
373
  Database Table Name: application tag
368
- Necessity: each application tag has a tag key that has a Length (Type) that is greater than 0.
374
+ Necessity: each application tag has a tag key that has a Length (Type) that is greater than 0 and is less than or equal to 100.
369
375
 
370
376
  Term: device
371
377
  Concept Type: actor (Auth)
@@ -402,14 +408,15 @@ Term: device
402
408
  Fact type: device has tag key
403
409
  Term Form: device tag
404
410
  Database Table Name: device tag
405
- Necessity: each device tag has a tag key that has a Length (Type) that is greater than 0.
411
+ Necessity: each device tag has a tag key that has a Length (Type) that is greater than 0 and is less than or equal to 100.
406
412
 
407
413
  Term: release
408
414
 
409
415
  Fact type: release has tag key
410
416
  Term Form: release tag
411
417
  Database Table Name: release tag
412
- Necessity: each release tag has a tag key that has a Length (Type) that is greater than 0.
418
+ -- TODO: Pitch cleanup and reduce to 100
419
+ Necessity: each release tag has a tag key that has a Length (Type) that is greater than 0 and is less than or equal to 164.
413
420
 
414
421
  Fact type: image is part of release
415
422
  Synonymous Form: release contains image
@@ -433,46 +440,54 @@ Fact type: user (Auth) is member of organization
433
440
 
434
441
  Fact type: organization has name (Auth)
435
442
  Necessity: each organization has exactly one name (Auth).
436
- Necessity: each name (Auth) of an organization, has a Length (Type) that is greater than 0.
443
+ -- TODO: Pitch cleanup and reduce to 100
444
+ Necessity: each name (Auth) of an organization, has a Length (Type) that is greater than 0 and is less than or equal to 220.
437
445
  Fact type: organization has handle
438
446
  Necessity: each organization has exactly one handle.
439
447
  Necessity: each handle is of exactly one organization.
440
- Necessity: each handle of an organization, has a Length (Type) that is greater than 0.
448
+ -- TODO: Pitch cleanup and reduce to 100
449
+ Necessity: each handle of an organization, has a Length (Type) that is greater than 0 and is less than or equal to 220.
441
450
 
442
451
 
443
452
  -- user
444
453
 
445
454
  Fact type: user (Auth) has email
446
455
  Necessity: each user (Auth) has at most one email.
447
- Necessity: each user (Auth) that has an email, has an email that has a Length (Type) that is greater than 4.
456
+ Necessity: each user (Auth) that has an email, has an email that has a Length (Type) that is greater than 4 and is less than or equal to 254.
448
457
  Necessity: each email is of exactly one user (Auth).
449
458
 
450
459
  Fact type: user (Auth) has public key
451
460
  Term Form: user public key
461
+ Necessity: each user public key has a public key that has a Length (Type) that is less than or equal to 2850.
452
462
 
453
463
 
454
464
  -- user public key
455
465
 
456
466
  Fact type: user public key has title
457
467
  Necessity: each user public key has exactly one title
468
+ Necessity: each user public key has a title that has a Length (Type) that is less than or equal to 120.
458
469
 
459
470
 
460
471
  -- application type
461
472
 
462
473
  Fact type: application type has name (Auth)
463
474
  Necessity: each application type has exactly one name (Auth)
475
+ Necessity: each application type has a name (Auth) that has a Length (Type) that is less than or equal to 20.
464
476
  Fact type: application type supports web url
465
477
  Fact type: application type supports multicontainer
466
478
  Fact type: application type supports gateway mode
467
479
  Fact type: application type needs os version range
468
480
  Necessity: each application type needs at most one os version range
481
+ Necessity: each application type that needs an os version range, needs an os version range that has a Length (Type) that is less than or equal to 50.
469
482
  Fact type: application type requires payment
470
483
  Fact type: application type is legacy
471
484
  Fact type: application type has slug
472
485
  Necessity: each application type has exactly one slug
486
+ Necessity: each application type has a slug that has a Length (Type) that is less than or equal to 30.
473
487
  Necessity: each slug is of exactly one application type
474
488
  Fact type: application type has description (Auth)
475
489
  Necessity: each application type has at most one description (Auth).
490
+ Necessity: each application type that has a description (Auth), has a description (Auth) that has a Length (Type) that is less than or equal to 200.
476
491
  Fact type: application type has maximum device count
477
492
  Necessity: each application type has at most one maximum device count
478
493
 
@@ -488,6 +503,8 @@ Fact type: application has app name
488
503
  Fact type: application has slug
489
504
  Necessity: each application has exactly one slug
490
505
  Necessity: each slug is of exactly one application
506
+ -- handle size [1, 220] + '/' + name size [4, 100] => total slug size [6, 321]
507
+ Necessity: each application has a slug that has a Length (Type) that is greater than or equal to 6 and is less than or equal to 321.
491
508
  Fact type: application is for device type
492
509
  Synonymous Form: device type is default for application
493
510
  Necessity: each application is for exactly one device type
@@ -508,10 +525,10 @@ Fact type: application is public
508
525
 
509
526
  Fact type: service instance has service type
510
527
  Necessity: each service instance has exactly one service type.
528
+ Definition: "vpn"
511
529
  Fact type: service instance has ip address
512
530
  Necessity: each service instance has exactly one ip address.
513
- -- TODO: Reduce to 39 in a follow-up major
514
- Necessity: each service instance has an ip address that has a Length (Type) that is less than or equal to 255.
531
+ Necessity: each service instance has an ip address that has a Length (Type) that is less than or equal to 39.
515
532
  Fact type: service instance has last heartbeat
516
533
  Necessity: each service instance has exactly one last heartbeat.
517
534
 
@@ -521,12 +538,16 @@ Fact type: service instance has last heartbeat
521
538
  Fact type: device has uuid
522
539
  Necessity: each device has exactly one uuid.
523
540
  Necessity: each uuid is of exactly one device.
541
+ -- We enforce uuids to be 32 or 62 using a hook b/c of pre-existing data
542
+ Necessity: each device has a uuid that has a Length (Type) that is less than or equal to 62.
524
543
  Fact type: device has local id
525
544
  Necessity: each device has at most one local id.
526
545
  Fact type: device has device name
527
546
  Necessity: each device has exactly one device name.
528
547
  Fact type: device has note
529
548
  Necessity: each device has at most one note.
549
+ -- 1MB
550
+ Necessity: each device that has a note, has a note that has a Length (Type) that is less than or equal to 1000000.
530
551
  Fact type: device is of device type
531
552
  Synonymous Form: device type describes device
532
553
  Necessity: each device is of exactly one device type.
@@ -543,6 +564,7 @@ Fact type: device is locked until date
543
564
  Necessity: each device is locked until at most one date.
544
565
  Fact type: device has public address
545
566
  Necessity: each device has at most one public address
567
+ Necessity: each device that has a public address, has a public address that has a Length (Type) that is less than or equal to 50.
546
568
  Fact type: device has ip address
547
569
  Necessity: each device has at most one ip address
548
570
  -- Enough to fit 50 IPv6 addresses (39 chars long) space delimited
@@ -576,12 +598,17 @@ Fact type: device has download progress
576
598
  Necessity: each device has at most one download progress.
577
599
  Fact type: device has status
578
600
  Necessity: each device has at most one status.
601
+ -- TODO: Pitch changing this to an ENUM
602
+ Necessity: each device that has a status, has a status that has a Length (Type) that is less than or equal to 50.
579
603
  Fact type: device has os version
580
604
  Necessity: each device has at most one os version
605
+ Necessity: each device that has an os version, has an os version that has a Length (Type) that is less than or equal to 70.
581
606
  Fact type: device has os variant
582
607
  Necessity: each device has at most one os variant
608
+ Definition: "prod" or "dev"
583
609
  Fact type: device has supervisor version
584
610
  Necessity: each device has at most one supervisor version
611
+ Necessity: each device that has a supervisor version, has a supervisor version that has a Length (Type) that is less than or equal to 20.
585
612
  Fact type: device has provisioning progress
586
613
  Necessity: each device has at most one provisioning progress
587
614
  Fact type: device has provisioning state
@@ -590,6 +617,7 @@ Fact type: device has api port
590
617
  Necessity: each device has at most one api port
591
618
  Fact type: device has api secret
592
619
  Necessity: each device has at most one api secret
620
+ Necessity: each device that has an api secret, has an api secret that has a Length (Type) that is less than or equal to 64.
593
621
  Fact type: device is managed by service instance
594
622
  Synonymous Form: service instance manages device
595
623
  Necessity: each device is managed by at most one service instance
@@ -617,12 +645,16 @@ Fact type: device has last update status event
617
645
 
618
646
  Fact type: application config variable has value
619
647
  Necessity: each application config variable has exactly one value.
648
+ -- TODO: Pitch cleanup and reduce to 100KB
649
+ Necessity: each application config variable has a value that has a Length (Type) that is less than or equal to 492001.
620
650
 
621
651
 
622
652
  -- device config variable
623
653
 
624
654
  Fact type: device config variable has value
625
655
  Necessity: each device config variable has exactly one value.
656
+ -- TODO: Pitch cleanup and reduce to 100KB
657
+ Necessity: each device config variable has a value that has a Length (Type) that is less than or equal to 372340.
626
658
 
627
659
  -- device type
628
660
 
@@ -640,6 +672,8 @@ Fact type: device type is of cpu architecture
640
672
 
641
673
  Fact type: device type has logo
642
674
  Necessity: each device type has at most one logo
675
+ -- 300KB in base64
676
+ Necessity: each device type that has a logo, has a logo that has a Length (Type) that is less than or equal to 400000.
643
677
 
644
678
  Fact type: device type has contract
645
679
  Necessity: each device type has at most one contract
@@ -658,23 +692,28 @@ Fact type: device type is referenced by alias
658
692
 
659
693
  Fact type: cpu architecture has slug
660
694
  Necessity: each cpu architecture has exactly one slug
695
+ Definition: "rpi" or "armv7hf" or "aarch64" or "i386-nlp" or "i386" or "amd64"
661
696
  Necessity: each slug is of exactly one cpu architecture
662
697
 
663
698
  -- device manufacturer
664
699
 
665
700
  Fact type: device manufacturer has slug
666
701
  Necessity: each device manufacturer has exactly one slug
702
+ Necessity: each device manufacturer has a slug that has a Length (Type) that is less than or equal to 50.
667
703
  Necessity: each slug is of exactly one device manufacturer
668
704
  Fact type: device manufacturer has name (Auth)
669
705
  Necessity: each device manufacturer has exactly one name (Auth)
706
+ Necessity: each device manufacturer has a name (Auth) that has a Length (Type) that is less than or equal to 100.
670
707
 
671
708
  -- device family
672
709
 
673
710
  Fact type: device family has slug
674
711
  Necessity: each device family has exactly one slug
712
+ Necessity: each device family has a slug that has a Length (Type) that is less than or equal to 50.
675
713
  Necessity: each slug is of exactly one device family
676
714
  Fact type: device family has name (Auth)
677
715
  Necessity: each device family has exactly one name (Auth)
716
+ Necessity: each device family has a name (Auth) that has a Length (Type) that is less than or equal to 50.
678
717
  Fact type: device family is manufactured by device manufacturer
679
718
  Synonymous Form: device manufacturer manufactures device family
680
719
  Necessity: each device family is manufactured by at most one device manufacturer
@@ -687,14 +726,20 @@ Fact type: release belongs to application
687
726
  Necessity: each release belongs to exactly one application.
688
727
  Fact type: release has commit
689
728
  Necessity: each release has exactly one commit.
729
+ Necessity: each release has a commit that has a Length (Type) that is less than or equal to 40.
690
730
  Fact type: release has composition
691
731
  Necessity: each release has exactly one composition.
692
732
  Fact type: release has status
693
733
  Necessity: each release has exactly one status.
734
+ -- "interrupted" is a legacy pre-multicontainer status
735
+ Definition: "running" or "success" or "failed" or "error" or "cancelled" or "interrupted"
694
736
  Fact type: release has source
695
737
  Necessity: each release has exactly one source.
738
+ Definition: "cloud" or "local"
696
739
  Fact type: release has build log
697
740
  Necessity: each release has at most one build log.
741
+ -- 1MB
742
+ Necessity: each release that has a build log, has a build log that has a Length (Type) that is less than or equal to 1000000.
698
743
  Fact type: release is invalidated
699
744
  Fact type: release has start timestamp
700
745
  Necessity: each release has exactly one start timestamp.
@@ -704,6 +749,7 @@ Fact type: release has update timestamp
704
749
  Necessity: each release has exactly one update timestamp.
705
750
  Fact type: release has release version
706
751
  Necessity: each release has at most one release version
752
+ Necessity: each release that has a release version, has a release version that has a Length (Type) that is less than or equal to 81.
707
753
  Note: Deprecated.
708
754
  Fact type: release has contract
709
755
  Necessity: each release has at most one contract
@@ -721,19 +767,26 @@ Fact type: release has semver patch
721
767
  Necessity: each release has exactly one semver patch.
722
768
  Fact type: release has semver prerelease
723
769
  Necessity: each release has exactly one semver prerelease.
770
+ Necessity: each release has a semver prerelease that has a Length (Type) that is less than or equal to 100.
724
771
  Fact type: release has semver build
725
772
  Necessity: each release has exactly one semver build.
773
+ Necessity: each release has a semver build that has a Length (Type) that is less than or equal to 50.
726
774
  Fact type: release has variant
727
775
  Necessity: each release has exactly one variant.
776
+ Necessity: each release has a variant that has a Length (Type) that is less than or equal to 50.
728
777
  Fact type: release has revision
729
778
  Necessity: each release has at most one revision.
730
779
  Necessity: each release that has a revision, has a revision that is greater than or equal to 0.
731
780
  Fact type: release has known issue list
732
781
  Necessity: each release has at most one known issue list.
782
+ Necessity: each release that has a known issue list, has a known issue list that has a Length (Type) that is less than or equal to 1000.
733
783
  Fact type: release has note
734
784
  Necessity: each release has at most one note.
785
+ -- 1MB
786
+ Necessity: each release that has a note, has a note that has a Length (Type) that is less than or equal to 1000000.
735
787
  Fact type: release has invalidation reason
736
788
  Necessity: each release has at most one invalidation reason.
789
+ Necessity: each release has an invalidation reason, has an invalidation reason that has a Length (Type) that is less than or equal to 255.
737
790
  Necessity: each release that has an invalidation reason, is invalidated.
738
791
  Fact type: release has asset key
739
792
  Term Form: release asset
@@ -749,6 +802,8 @@ Fact type: release asset has asset
749
802
 
750
803
  Fact type: service environment variable has value
751
804
  Necessity: each service environment variable has exactly one value.
805
+ -- 100KB
806
+ Necessity: each service environment variable has a value that has a Length (Type) that is less than or equal to 100000.
752
807
 
753
808
 
754
809
  -- image
@@ -759,6 +814,8 @@ Fact type: image has end timestamp
759
814
  Necessity: each image has at most one end timestamp.
760
815
  Fact type: image has dockerfile
761
816
  Necessity: each image has at most one dockerfile.
817
+ -- 1MB
818
+ Necessity: each image that has a dockerfile, has a dockerfile that has a Length (Type) that is less than or equal to 1000000.
762
819
  Fact type: image is a build of service
763
820
  Synonymous Form: service is built by image
764
821
  Necessity: each image is a build of exactly one service.
@@ -770,16 +827,25 @@ Fact type: image is stored at image location
770
827
  Necessity: each image location hosts exactly one image.
771
828
  Fact type: image has project type
772
829
  Necessity: each image has at most one project type.
830
+ -- TODO: Pitch cleanup of the legacy buggy/inconsistent values like "Archicture-specific Dockerfile"
831
+ Definition: "Standard Dockerfile" or "project type unavailable" or "NodeJS" or "node.js" or "local deploy" or "external service" or "Dockerfile.template" or "dockerfile template" or "dockerfile" or "Could not be detected" or "Architecture-specific Dockerfile" or "Archicture-specific Dockerfile"
773
832
  Fact type: image has error message
774
833
  Necessity: each image has at most one error message
834
+ -- 300KB
835
+ Necessity: each image that has an error message, has an error message that has a Length (Type) that is less than or equal to 300000.
775
836
  Fact type: image has build log
776
837
  Necessity: each image has at most one build log.
838
+ -- 1.5MB
839
+ Necessity: each image that has a build log, has a build log that has a Length (Type) that is less than or equal to 1500000.
777
840
  Fact type: image has push timestamp
778
841
  Necessity: each image has at most one push timestamp.
779
842
  Fact type: image has status
780
843
  Necessity: each image has exactly one status.
844
+ Definition: "running" or "success" or "failed" or "error" or "cancelled" or "interrupted"
781
845
  Fact type: image has content hash
782
846
  Necessity: each image has at most one content hash.
847
+ -- TODO: Pitch cleanup and change to exactly equal 71
848
+ Necessity: each image that has a content hash, has a content hash that has a Length (Type) that is less than or equal to 71.
783
849
  Fact type: image has contract
784
850
  Necessity: each image has at most one contract
785
851
 
@@ -788,36 +854,48 @@ Fact type: image has contract
788
854
 
789
855
  Fact type: image label has value
790
856
  Necessity: each image label has exactly one value.
857
+ -- TODO: Pitch cleanup and reduce to 255
858
+ Necessity: each image label has a value that has a Length (Type) that is less than or equal to 300.
791
859
 
792
860
 
793
861
  -- service label
794
862
 
795
863
  Fact type: service label has value
796
864
  Necessity: each service label has exactly one value.
865
+ -- TODO: Pitch cleanup and reduce to 255
866
+ Necessity: each service label has a value that has a Length (Type) that is less than or equal to 300.
797
867
 
798
868
 
799
869
  -- device environment variable
800
870
 
801
871
  Fact type: device environment variable has value
802
872
  Necessity: each device environment variable has exactly one value.
873
+ -- TODO: Pitch cleanup and reduce to 100KB
874
+ Necessity: each device environment variable has a value that has a Length (Type) that is less than or equal to 515798.
803
875
 
804
876
 
805
877
  -- application environment variable
806
878
 
807
879
  Fact type: application environment variable has value
808
880
  Necessity: each application environment variable has exactly one value.
881
+ -- TODO: Pitch cleanup and reduce to 100KB
882
+ Necessity: each application environment variable has a value that has a Length (Type) that is less than or equal to 106104.
809
883
 
810
884
 
811
885
  -- image environment variable
812
886
 
813
887
  Fact type: image environment variable has value
814
888
  Necessity: each image environment variable has exactly one value.
889
+ -- 100KB
890
+ Necessity: each image environment variable has a value that has a Length (Type) that is less than or equal to 100000.
815
891
 
816
892
 
817
893
  -- device service environment variable
818
894
 
819
895
  Fact type: device service environment variable has value
820
896
  Necessity: each device service environment variable has exactly one value.
897
+ -- TODO: Pitch cleanup and reduce to 100KB
898
+ Necessity: each device service environment variable has a value that has a Length (Type) that is less than or equal to 278379.
821
899
  Fact type: device service environment variable has service install
822
900
  Necessity: each device service environment variable has exactly one service install.
823
901
 
@@ -826,18 +904,24 @@ Fact type: device service environment variable has service install
826
904
 
827
905
  Fact type: application tag has value
828
906
  Necessity: each application tag has exactly one value.
907
+ -- 1KB
908
+ Necessity: each application tag has a value that has a Length (Type) that is greater than 0 and is less than or equal to 1000.
829
909
 
830
910
 
831
911
  -- device tag
832
912
 
833
913
  Fact type: device tag has value
834
914
  Necessity: each device tag has exactly one value.
915
+ -- TODO: Pitch cleanup and reduce to 10KB
916
+ Necessity: each device tag has a value that has a Length (Type) that is greater than 0 and is less than or equal to 60158.
835
917
 
836
918
 
837
919
  -- release tag
838
920
 
839
921
  Fact type: release tag has value
840
922
  Necessity: each release tag has exactly one value.
923
+ -- 1KB
924
+ Necessity: each release tag has a value that has a Length (Type) that is greater than 0 and is less than or equal to 1000.
841
925
 
842
926
 
843
927
  -- image install
@@ -848,6 +932,14 @@ Fact type: image install has download progress
848
932
  Necessity: each image install has at most one download progress.
849
933
  Fact type: image install has status
850
934
  Necessity: each image install has exactly one status.
935
+ -- It's union of the supervisor's image & service statuses, plus the custom handover statuses.
936
+ -- https://github.com/balena-os/balena-supervisor/blob/v17.0.3/src/compose/application-manager.ts#L989-L1017
937
+ -- https://github.com/balena-os/balena-supervisor/blob/v17.0.3/src/compose/types/service.ts#L341-L374
938
+ -- https://github.com/balena-os/balena-supervisor/blob/v17.0.3/src/compose/types/image.ts#L27
939
+ -- The lower case statuses come unmodified from the docker statuses.
940
+ -- https://docs.docker.com/reference/api/engine/version/v1.49/#tag/Container/operation/ContainerList
941
+ -- Idle, Stopped & configuring seem to be from old (v7) supervisors.
942
+ Definition: "Stopping" or "Stopped" or "Downloading" or "Downloaded" or "Installing" or "Installed" or "Starting" or "Running" or "Idle" or "Handing over" or "Awaiting handover" or "Deleting" or "deleted" or "Dead" or "paused" or "restarting" or "removing" or "exited" or "configuring" or "Unknown"
851
943
  Fact type: image install is provided by release
852
944
  Synonymous Form: release provides image install
853
945
  Necessity: each image install is provided by exactly one release.
@@ -148,7 +148,7 @@ declare const getDevice: (req: import("@balena/pinejs/out/sbvr-api/permissions.j
148
148
  download_progress: import("@balena/sbvr-types").Types["Integer"]["Read"] | null;
149
149
  status: import("@balena/sbvr-types").Types["Short Text"]["Read"] | null;
150
150
  os_version: import("@balena/sbvr-types").Types["Short Text"]["Read"] | null;
151
- os_variant: import("@balena/sbvr-types").Types["Short Text"]["Read"] | null;
151
+ os_variant: "prod" | "dev" | null;
152
152
  supervisor_version: import("@balena/sbvr-types").Types["Short Text"]["Read"] | null;
153
153
  provisioning_progress: import("@balena/sbvr-types").Types["Integer"]["Read"] | null;
154
154
  provisioning_state: import("@balena/sbvr-types").Types["Short Text"]["Read"] | null;
@@ -223,8 +223,8 @@ declare const getDevice: (req: import("@balena/pinejs/out/sbvr-api/permissions.j
223
223
  } | [Application["Read"]];
224
224
  commit: import("@balena/sbvr-types").Types["Short Text"]["Read"];
225
225
  composition: import("@balena/sbvr-types").Types["JSON"]["Read"];
226
- status: import("@balena/sbvr-types").Types["Short Text"]["Read"];
227
- source: import("@balena/sbvr-types").Types["Short Text"]["Read"];
226
+ status: "running" | "success" | "failed" | "error" | "cancelled" | "interrupted";
227
+ source: "cloud" | "local";
228
228
  build_log: import("@balena/sbvr-types").Types["Text"]["Read"] | null;
229
229
  is_invalidated: import("@balena/sbvr-types").Types["Boolean"]["Read"];
230
230
  start_timestamp: import("@balena/sbvr-types").Types["Date Time"]["Read"];
@@ -300,11 +300,11 @@ declare const getDevice: (req: import("@balena/pinejs/out/sbvr-api/permissions.j
300
300
  } | [import("../../../balena-model.js").Service["Read"]];
301
301
  image_size: import("@balena/sbvr-types").Types["Big Integer"]["Read"] | null;
302
302
  is_stored_at__image_location: import("@balena/sbvr-types").Types["Short Text"]["Read"];
303
- project_type: import("@balena/sbvr-types").Types["Short Text"]["Read"] | null;
303
+ project_type: "Standard Dockerfile" | "project type unavailable" | "NodeJS" | "node.js" | "local deploy" | "external service" | "Dockerfile.template" | "dockerfile template" | "dockerfile" | "Could not be detected" | "Architecture-specific Dockerfile" | "Archicture-specific Dockerfile" | null;
304
304
  error_message: import("@balena/sbvr-types").Types["Text"]["Read"] | null;
305
305
  build_log: import("@balena/sbvr-types").Types["Text"]["Read"] | null;
306
306
  push_timestamp: import("@balena/sbvr-types").Types["Date Time"]["Read"] | null;
307
- status: import("@balena/sbvr-types").Types["Short Text"]["Read"];
307
+ status: "running" | "success" | "failed" | "error" | "cancelled" | "interrupted";
308
308
  content_hash: import("@balena/sbvr-types").Types["Short Text"]["Read"] | null;
309
309
  contract: import("@balena/sbvr-types").Types["JSON"]["Read"] | null;
310
310
  device__installs__image?: Array<import("../../../balena-model.js").ImageInstall["Read"]>;
@@ -491,8 +491,8 @@ declare const getDevice: (req: import("@balena/pinejs/out/sbvr-api/permissions.j
491
491
  } | [Application["Read"]];
492
492
  commit: import("@balena/sbvr-types").Types["Short Text"]["Read"];
493
493
  composition: import("@balena/sbvr-types").Types["JSON"]["Read"];
494
- status: import("@balena/sbvr-types").Types["Short Text"]["Read"];
495
- source: import("@balena/sbvr-types").Types["Short Text"]["Read"];
494
+ status: "running" | "success" | "failed" | "error" | "cancelled" | "interrupted";
495
+ source: "cloud" | "local";
496
496
  build_log: import("@balena/sbvr-types").Types["Text"]["Read"] | null;
497
497
  is_invalidated: import("@balena/sbvr-types").Types["Boolean"]["Read"];
498
498
  start_timestamp: import("@balena/sbvr-types").Types["Date Time"]["Read"];
@@ -618,11 +618,11 @@ declare const getDevice: (req: import("@balena/pinejs/out/sbvr-api/permissions.j
618
618
  } | [import("../../../balena-model.js").Service["Read"]];
619
619
  image_size: import("@balena/sbvr-types").Types["Big Integer"]["Read"] | null;
620
620
  is_stored_at__image_location: import("@balena/sbvr-types").Types["Short Text"]["Read"];
621
- project_type: import("@balena/sbvr-types").Types["Short Text"]["Read"] | null;
621
+ project_type: "Standard Dockerfile" | "project type unavailable" | "NodeJS" | "node.js" | "local deploy" | "external service" | "Dockerfile.template" | "dockerfile template" | "dockerfile" | "Could not be detected" | "Architecture-specific Dockerfile" | "Archicture-specific Dockerfile" | null;
622
622
  error_message: import("@balena/sbvr-types").Types["Text"]["Read"] | null;
623
623
  build_log: import("@balena/sbvr-types").Types["Text"]["Read"] | null;
624
624
  push_timestamp: import("@balena/sbvr-types").Types["Date Time"]["Read"] | null;
625
- status: import("@balena/sbvr-types").Types["Short Text"]["Read"];
625
+ status: "running" | "success" | "failed" | "error" | "cancelled" | "interrupted";
626
626
  content_hash: import("@balena/sbvr-types").Types["Short Text"]["Read"] | null;
627
627
  contract: import("@balena/sbvr-types").Types["JSON"]["Read"] | null;
628
628
  device__installs__image?: Array<import("../../../balena-model.js").ImageInstall["Read"]>;
@@ -724,8 +724,8 @@ declare const getDevice: (req: import("@balena/pinejs/out/sbvr-api/permissions.j
724
724
  } | [Application["Read"]];
725
725
  commit: import("@balena/sbvr-types").Types["Short Text"]["Read"];
726
726
  composition: import("@balena/sbvr-types").Types["JSON"]["Read"];
727
- status: import("@balena/sbvr-types").Types["Short Text"]["Read"];
728
- source: import("@balena/sbvr-types").Types["Short Text"]["Read"];
727
+ status: "running" | "success" | "failed" | "error" | "cancelled" | "interrupted";
728
+ source: "cloud" | "local";
729
729
  build_log: import("@balena/sbvr-types").Types["Text"]["Read"] | null;
730
730
  is_invalidated: import("@balena/sbvr-types").Types["Boolean"]["Read"];
731
731
  start_timestamp: import("@balena/sbvr-types").Types["Date Time"]["Read"];
@@ -851,11 +851,11 @@ declare const getDevice: (req: import("@balena/pinejs/out/sbvr-api/permissions.j
851
851
  } | [import("../../../balena-model.js").Service["Read"]];
852
852
  image_size: import("@balena/sbvr-types").Types["Big Integer"]["Read"] | null;
853
853
  is_stored_at__image_location: import("@balena/sbvr-types").Types["Short Text"]["Read"];
854
- project_type: import("@balena/sbvr-types").Types["Short Text"]["Read"] | null;
854
+ project_type: "Standard Dockerfile" | "project type unavailable" | "NodeJS" | "node.js" | "local deploy" | "external service" | "Dockerfile.template" | "dockerfile template" | "dockerfile" | "Could not be detected" | "Architecture-specific Dockerfile" | "Archicture-specific Dockerfile" | null;
855
855
  error_message: import("@balena/sbvr-types").Types["Text"]["Read"] | null;
856
856
  build_log: import("@balena/sbvr-types").Types["Text"]["Read"] | null;
857
857
  push_timestamp: import("@balena/sbvr-types").Types["Date Time"]["Read"] | null;
858
- status: import("@balena/sbvr-types").Types["Short Text"]["Read"];
858
+ status: "running" | "success" | "failed" | "error" | "cancelled" | "interrupted";
859
859
  content_hash: import("@balena/sbvr-types").Types["Short Text"]["Read"] | null;
860
860
  contract: import("@balena/sbvr-types").Types["JSON"]["Read"] | null;
861
861
  device__installs__image?: Array<import("../../../balena-model.js").ImageInstall["Read"]>;