@boxa-devops/depo-shared 1.0.5 → 1.1.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.
- package/dist/api.d.ts +273 -0
- package/dist/api.d.ts.map +1 -1
- package/error_codes.json +8 -0
- package/openapi.json +425 -0
- package/package.json +1 -1
- package/src/api.ts +273 -0
package/error_codes.json
CHANGED
|
@@ -134,6 +134,7 @@
|
|
|
134
134
|
"MEASURED_NOT_SYSTEM",
|
|
135
135
|
"MISSING_FIELD",
|
|
136
136
|
"NAIVE_TIMESTAMP",
|
|
137
|
+
"NOMENCLATURE_NOT_FOUND",
|
|
137
138
|
"NOT_A_MEMBER",
|
|
138
139
|
"NOT_FOUND",
|
|
139
140
|
"NOT_FROM_TERMINAL",
|
|
@@ -178,6 +179,7 @@
|
|
|
178
179
|
"SELF_TARGET",
|
|
179
180
|
"SERIAL_NOT_ALLOWED",
|
|
180
181
|
"SERIES_EXISTS",
|
|
182
|
+
"SERIES_NOT_FOUND",
|
|
181
183
|
"SESSION_INVALID",
|
|
182
184
|
"SESSION_MISSING",
|
|
183
185
|
"SESSION_NOT_COUNTING",
|
|
@@ -480,6 +482,9 @@
|
|
|
480
482
|
"routers/work_orders/read.py",
|
|
481
483
|
"services/events.py"
|
|
482
484
|
],
|
|
485
|
+
"NOMENCLATURE_NOT_FOUND": [
|
|
486
|
+
"routers/admin_refs/series_positions.py"
|
|
487
|
+
],
|
|
483
488
|
"NOT_A_MEMBER": [
|
|
484
489
|
"services/scrap_acts.py"
|
|
485
490
|
],
|
|
@@ -649,6 +654,9 @@
|
|
|
649
654
|
"SERIES_EXISTS": [
|
|
650
655
|
"routers/admin_refs/crud.py"
|
|
651
656
|
],
|
|
657
|
+
"SERIES_NOT_FOUND": [
|
|
658
|
+
"routers/admin_refs/series_positions.py"
|
|
659
|
+
],
|
|
652
660
|
"SESSION_INVALID": [
|
|
653
661
|
"routers/admin_auth.py"
|
|
654
662
|
],
|
package/openapi.json
CHANGED
|
@@ -3682,6 +3682,259 @@
|
|
|
3682
3682
|
}
|
|
3683
3683
|
}
|
|
3684
3684
|
},
|
|
3685
|
+
"/api/v1/admin/refs/loco-series/{code}/positions": {
|
|
3686
|
+
"get": {
|
|
3687
|
+
"tags": [
|
|
3688
|
+
"admin-refs"
|
|
3689
|
+
],
|
|
3690
|
+
"summary": "List Series Positions",
|
|
3691
|
+
"description": "Every type bound to this series, with the list it carries there.\n\nTypes with no binding are deliberately absent rather than listed with their\nglobal list: the visualization has to be able to tell «this series says so»\nfrom «the type says so», and a merged view cannot.",
|
|
3692
|
+
"operationId": "list_series_positions_api_v1_admin_refs_loco_series__code__positions_get",
|
|
3693
|
+
"parameters": [
|
|
3694
|
+
{
|
|
3695
|
+
"name": "code",
|
|
3696
|
+
"in": "path",
|
|
3697
|
+
"required": true,
|
|
3698
|
+
"schema": {
|
|
3699
|
+
"type": "string",
|
|
3700
|
+
"title": "Code"
|
|
3701
|
+
}
|
|
3702
|
+
},
|
|
3703
|
+
{
|
|
3704
|
+
"name": "x-debug-person-id",
|
|
3705
|
+
"in": "header",
|
|
3706
|
+
"required": false,
|
|
3707
|
+
"schema": {
|
|
3708
|
+
"anyOf": [
|
|
3709
|
+
{
|
|
3710
|
+
"type": "string",
|
|
3711
|
+
"format": "uuid"
|
|
3712
|
+
},
|
|
3713
|
+
{
|
|
3714
|
+
"type": "null"
|
|
3715
|
+
}
|
|
3716
|
+
],
|
|
3717
|
+
"title": "X-Debug-Person-Id"
|
|
3718
|
+
}
|
|
3719
|
+
},
|
|
3720
|
+
{
|
|
3721
|
+
"name": "depo_admin_session",
|
|
3722
|
+
"in": "cookie",
|
|
3723
|
+
"required": false,
|
|
3724
|
+
"schema": {
|
|
3725
|
+
"anyOf": [
|
|
3726
|
+
{
|
|
3727
|
+
"type": "string"
|
|
3728
|
+
},
|
|
3729
|
+
{
|
|
3730
|
+
"type": "null"
|
|
3731
|
+
}
|
|
3732
|
+
],
|
|
3733
|
+
"title": "Depo Admin Session"
|
|
3734
|
+
}
|
|
3735
|
+
}
|
|
3736
|
+
],
|
|
3737
|
+
"responses": {
|
|
3738
|
+
"200": {
|
|
3739
|
+
"description": "Successful Response",
|
|
3740
|
+
"content": {
|
|
3741
|
+
"application/json": {
|
|
3742
|
+
"schema": {
|
|
3743
|
+
"type": "array",
|
|
3744
|
+
"items": {
|
|
3745
|
+
"$ref": "#/components/schemas/LocoSeriesPositionOut"
|
|
3746
|
+
},
|
|
3747
|
+
"title": "Response List Series Positions Api V1 Admin Refs Loco Series Code Positions Get"
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3750
|
+
}
|
|
3751
|
+
},
|
|
3752
|
+
"422": {
|
|
3753
|
+
"description": "Validation Error",
|
|
3754
|
+
"content": {
|
|
3755
|
+
"application/json": {
|
|
3756
|
+
"schema": {
|
|
3757
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
3758
|
+
}
|
|
3759
|
+
}
|
|
3760
|
+
}
|
|
3761
|
+
}
|
|
3762
|
+
}
|
|
3763
|
+
}
|
|
3764
|
+
},
|
|
3765
|
+
"/api/v1/admin/refs/loco-series/{code}/positions/{nomenclature_id}": {
|
|
3766
|
+
"put": {
|
|
3767
|
+
"tags": [
|
|
3768
|
+
"admin-refs"
|
|
3769
|
+
],
|
|
3770
|
+
"summary": "Bind Series Positions",
|
|
3771
|
+
"description": "Create or replace the binding. Idempotent by (series, type).",
|
|
3772
|
+
"operationId": "bind_series_positions_api_v1_admin_refs_loco_series__code__positions__nomenclature_id__put",
|
|
3773
|
+
"parameters": [
|
|
3774
|
+
{
|
|
3775
|
+
"name": "code",
|
|
3776
|
+
"in": "path",
|
|
3777
|
+
"required": true,
|
|
3778
|
+
"schema": {
|
|
3779
|
+
"type": "string",
|
|
3780
|
+
"title": "Code"
|
|
3781
|
+
}
|
|
3782
|
+
},
|
|
3783
|
+
{
|
|
3784
|
+
"name": "nomenclature_id",
|
|
3785
|
+
"in": "path",
|
|
3786
|
+
"required": true,
|
|
3787
|
+
"schema": {
|
|
3788
|
+
"type": "string",
|
|
3789
|
+
"format": "uuid",
|
|
3790
|
+
"title": "Nomenclature Id"
|
|
3791
|
+
}
|
|
3792
|
+
},
|
|
3793
|
+
{
|
|
3794
|
+
"name": "x-debug-person-id",
|
|
3795
|
+
"in": "header",
|
|
3796
|
+
"required": false,
|
|
3797
|
+
"schema": {
|
|
3798
|
+
"anyOf": [
|
|
3799
|
+
{
|
|
3800
|
+
"type": "string",
|
|
3801
|
+
"format": "uuid"
|
|
3802
|
+
},
|
|
3803
|
+
{
|
|
3804
|
+
"type": "null"
|
|
3805
|
+
}
|
|
3806
|
+
],
|
|
3807
|
+
"title": "X-Debug-Person-Id"
|
|
3808
|
+
}
|
|
3809
|
+
},
|
|
3810
|
+
{
|
|
3811
|
+
"name": "depo_admin_session",
|
|
3812
|
+
"in": "cookie",
|
|
3813
|
+
"required": false,
|
|
3814
|
+
"schema": {
|
|
3815
|
+
"anyOf": [
|
|
3816
|
+
{
|
|
3817
|
+
"type": "string"
|
|
3818
|
+
},
|
|
3819
|
+
{
|
|
3820
|
+
"type": "null"
|
|
3821
|
+
}
|
|
3822
|
+
],
|
|
3823
|
+
"title": "Depo Admin Session"
|
|
3824
|
+
}
|
|
3825
|
+
}
|
|
3826
|
+
],
|
|
3827
|
+
"requestBody": {
|
|
3828
|
+
"required": true,
|
|
3829
|
+
"content": {
|
|
3830
|
+
"application/json": {
|
|
3831
|
+
"schema": {
|
|
3832
|
+
"$ref": "#/components/schemas/LocoSeriesPositionIn"
|
|
3833
|
+
}
|
|
3834
|
+
}
|
|
3835
|
+
}
|
|
3836
|
+
},
|
|
3837
|
+
"responses": {
|
|
3838
|
+
"200": {
|
|
3839
|
+
"description": "Successful Response",
|
|
3840
|
+
"content": {
|
|
3841
|
+
"application/json": {
|
|
3842
|
+
"schema": {
|
|
3843
|
+
"$ref": "#/components/schemas/LocoSeriesPositionOut"
|
|
3844
|
+
}
|
|
3845
|
+
}
|
|
3846
|
+
}
|
|
3847
|
+
},
|
|
3848
|
+
"422": {
|
|
3849
|
+
"description": "Validation Error",
|
|
3850
|
+
"content": {
|
|
3851
|
+
"application/json": {
|
|
3852
|
+
"schema": {
|
|
3853
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
3854
|
+
}
|
|
3855
|
+
}
|
|
3856
|
+
}
|
|
3857
|
+
}
|
|
3858
|
+
}
|
|
3859
|
+
},
|
|
3860
|
+
"delete": {
|
|
3861
|
+
"tags": [
|
|
3862
|
+
"admin-refs"
|
|
3863
|
+
],
|
|
3864
|
+
"summary": "Unbind Series Positions",
|
|
3865
|
+
"description": "Drop the binding: the type falls back to its global positions list.\n\nAbsent binding is not an error — the operator's intent («this series has no\nlist of its own») already holds.",
|
|
3866
|
+
"operationId": "unbind_series_positions_api_v1_admin_refs_loco_series__code__positions__nomenclature_id__delete",
|
|
3867
|
+
"parameters": [
|
|
3868
|
+
{
|
|
3869
|
+
"name": "code",
|
|
3870
|
+
"in": "path",
|
|
3871
|
+
"required": true,
|
|
3872
|
+
"schema": {
|
|
3873
|
+
"type": "string",
|
|
3874
|
+
"title": "Code"
|
|
3875
|
+
}
|
|
3876
|
+
},
|
|
3877
|
+
{
|
|
3878
|
+
"name": "nomenclature_id",
|
|
3879
|
+
"in": "path",
|
|
3880
|
+
"required": true,
|
|
3881
|
+
"schema": {
|
|
3882
|
+
"type": "string",
|
|
3883
|
+
"format": "uuid",
|
|
3884
|
+
"title": "Nomenclature Id"
|
|
3885
|
+
}
|
|
3886
|
+
},
|
|
3887
|
+
{
|
|
3888
|
+
"name": "x-debug-person-id",
|
|
3889
|
+
"in": "header",
|
|
3890
|
+
"required": false,
|
|
3891
|
+
"schema": {
|
|
3892
|
+
"anyOf": [
|
|
3893
|
+
{
|
|
3894
|
+
"type": "string",
|
|
3895
|
+
"format": "uuid"
|
|
3896
|
+
},
|
|
3897
|
+
{
|
|
3898
|
+
"type": "null"
|
|
3899
|
+
}
|
|
3900
|
+
],
|
|
3901
|
+
"title": "X-Debug-Person-Id"
|
|
3902
|
+
}
|
|
3903
|
+
},
|
|
3904
|
+
{
|
|
3905
|
+
"name": "depo_admin_session",
|
|
3906
|
+
"in": "cookie",
|
|
3907
|
+
"required": false,
|
|
3908
|
+
"schema": {
|
|
3909
|
+
"anyOf": [
|
|
3910
|
+
{
|
|
3911
|
+
"type": "string"
|
|
3912
|
+
},
|
|
3913
|
+
{
|
|
3914
|
+
"type": "null"
|
|
3915
|
+
}
|
|
3916
|
+
],
|
|
3917
|
+
"title": "Depo Admin Session"
|
|
3918
|
+
}
|
|
3919
|
+
}
|
|
3920
|
+
],
|
|
3921
|
+
"responses": {
|
|
3922
|
+
"204": {
|
|
3923
|
+
"description": "Successful Response"
|
|
3924
|
+
},
|
|
3925
|
+
"422": {
|
|
3926
|
+
"description": "Validation Error",
|
|
3927
|
+
"content": {
|
|
3928
|
+
"application/json": {
|
|
3929
|
+
"schema": {
|
|
3930
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
3931
|
+
}
|
|
3932
|
+
}
|
|
3933
|
+
}
|
|
3934
|
+
}
|
|
3935
|
+
}
|
|
3936
|
+
}
|
|
3937
|
+
},
|
|
3685
3938
|
"/api/v1/admin/refs/{entity}": {
|
|
3686
3939
|
"get": {
|
|
3687
3940
|
"tags": [
|
|
@@ -13194,6 +13447,93 @@
|
|
|
13194
13447
|
}
|
|
13195
13448
|
}
|
|
13196
13449
|
},
|
|
13450
|
+
"/api/v1/refs/loco-series-positions": {
|
|
13451
|
+
"get": {
|
|
13452
|
+
"tags": [
|
|
13453
|
+
"refs"
|
|
13454
|
+
],
|
|
13455
|
+
"summary": "Loco Series Positions",
|
|
13456
|
+
"description": "Per-series mount positions, for the terminal's chips.\n\nA small dictionary by design: only the types whose positions differ from\nthe global `nomenclature.positions` have a row. The client applies it as an\noverride — series row first, global list otherwise.",
|
|
13457
|
+
"operationId": "loco_series_positions_api_v1_refs_loco_series_positions_get",
|
|
13458
|
+
"parameters": [
|
|
13459
|
+
{
|
|
13460
|
+
"name": "authorization",
|
|
13461
|
+
"in": "header",
|
|
13462
|
+
"required": false,
|
|
13463
|
+
"schema": {
|
|
13464
|
+
"anyOf": [
|
|
13465
|
+
{
|
|
13466
|
+
"type": "string"
|
|
13467
|
+
},
|
|
13468
|
+
{
|
|
13469
|
+
"type": "null"
|
|
13470
|
+
}
|
|
13471
|
+
],
|
|
13472
|
+
"title": "Authorization"
|
|
13473
|
+
}
|
|
13474
|
+
},
|
|
13475
|
+
{
|
|
13476
|
+
"name": "x-debug-person-id",
|
|
13477
|
+
"in": "header",
|
|
13478
|
+
"required": false,
|
|
13479
|
+
"schema": {
|
|
13480
|
+
"anyOf": [
|
|
13481
|
+
{
|
|
13482
|
+
"type": "string",
|
|
13483
|
+
"format": "uuid"
|
|
13484
|
+
},
|
|
13485
|
+
{
|
|
13486
|
+
"type": "null"
|
|
13487
|
+
}
|
|
13488
|
+
],
|
|
13489
|
+
"title": "X-Debug-Person-Id"
|
|
13490
|
+
}
|
|
13491
|
+
},
|
|
13492
|
+
{
|
|
13493
|
+
"name": "depo_admin_session",
|
|
13494
|
+
"in": "cookie",
|
|
13495
|
+
"required": false,
|
|
13496
|
+
"schema": {
|
|
13497
|
+
"anyOf": [
|
|
13498
|
+
{
|
|
13499
|
+
"type": "string"
|
|
13500
|
+
},
|
|
13501
|
+
{
|
|
13502
|
+
"type": "null"
|
|
13503
|
+
}
|
|
13504
|
+
],
|
|
13505
|
+
"title": "Depo Admin Session"
|
|
13506
|
+
}
|
|
13507
|
+
}
|
|
13508
|
+
],
|
|
13509
|
+
"responses": {
|
|
13510
|
+
"200": {
|
|
13511
|
+
"description": "Successful Response",
|
|
13512
|
+
"content": {
|
|
13513
|
+
"application/json": {
|
|
13514
|
+
"schema": {
|
|
13515
|
+
"type": "array",
|
|
13516
|
+
"items": {
|
|
13517
|
+
"$ref": "#/components/schemas/LocoSeriesPositionRef"
|
|
13518
|
+
},
|
|
13519
|
+
"title": "Response Loco Series Positions Api V1 Refs Loco Series Positions Get"
|
|
13520
|
+
}
|
|
13521
|
+
}
|
|
13522
|
+
}
|
|
13523
|
+
},
|
|
13524
|
+
"422": {
|
|
13525
|
+
"description": "Validation Error",
|
|
13526
|
+
"content": {
|
|
13527
|
+
"application/json": {
|
|
13528
|
+
"schema": {
|
|
13529
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
13530
|
+
}
|
|
13531
|
+
}
|
|
13532
|
+
}
|
|
13533
|
+
}
|
|
13534
|
+
}
|
|
13535
|
+
}
|
|
13536
|
+
},
|
|
13197
13537
|
"/api/v1/refs/nomenclature": {
|
|
13198
13538
|
"get": {
|
|
13199
13539
|
"tags": [
|
|
@@ -30288,6 +30628,91 @@
|
|
|
30288
30628
|
"title": "LocoSeriesOut",
|
|
30289
30629
|
"description": "Series dictionary + its picture key (terminal caches both offline)."
|
|
30290
30630
|
},
|
|
30631
|
+
"LocoSeriesPositionIn": {
|
|
30632
|
+
"properties": {
|
|
30633
|
+
"positions": {
|
|
30634
|
+
"items": {
|
|
30635
|
+
"type": "string"
|
|
30636
|
+
},
|
|
30637
|
+
"type": "array",
|
|
30638
|
+
"maxItems": 24,
|
|
30639
|
+
"minItems": 1,
|
|
30640
|
+
"title": "Positions"
|
|
30641
|
+
}
|
|
30642
|
+
},
|
|
30643
|
+
"type": "object",
|
|
30644
|
+
"required": [
|
|
30645
|
+
"positions"
|
|
30646
|
+
],
|
|
30647
|
+
"title": "LocoSeriesPositionIn",
|
|
30648
|
+
"description": "Bind a part type to a series with that machine's own position list.\n\nNormalised by the same validator as nomenclature.positions, so a list means\nthe same thing wherever it was typed. An empty list is rejected: «no\nper-series list» is expressed by DELETEing the binding, which falls the\ntype back to its global list, not by saving emptiness that would read as\n«this series has no positions»."
|
|
30649
|
+
},
|
|
30650
|
+
"LocoSeriesPositionOut": {
|
|
30651
|
+
"properties": {
|
|
30652
|
+
"loco_series": {
|
|
30653
|
+
"type": "string",
|
|
30654
|
+
"title": "Loco Series"
|
|
30655
|
+
},
|
|
30656
|
+
"nomenclature_id": {
|
|
30657
|
+
"type": "string",
|
|
30658
|
+
"format": "uuid",
|
|
30659
|
+
"title": "Nomenclature Id"
|
|
30660
|
+
},
|
|
30661
|
+
"code": {
|
|
30662
|
+
"type": "string",
|
|
30663
|
+
"title": "Code"
|
|
30664
|
+
},
|
|
30665
|
+
"name": {
|
|
30666
|
+
"type": "string",
|
|
30667
|
+
"title": "Name"
|
|
30668
|
+
},
|
|
30669
|
+
"positions": {
|
|
30670
|
+
"items": {
|
|
30671
|
+
"type": "string"
|
|
30672
|
+
},
|
|
30673
|
+
"type": "array",
|
|
30674
|
+
"title": "Positions"
|
|
30675
|
+
}
|
|
30676
|
+
},
|
|
30677
|
+
"type": "object",
|
|
30678
|
+
"required": [
|
|
30679
|
+
"loco_series",
|
|
30680
|
+
"nomenclature_id",
|
|
30681
|
+
"code",
|
|
30682
|
+
"name",
|
|
30683
|
+
"positions"
|
|
30684
|
+
],
|
|
30685
|
+
"title": "LocoSeriesPositionOut",
|
|
30686
|
+
"description": "One binding as the admin visualization draws it."
|
|
30687
|
+
},
|
|
30688
|
+
"LocoSeriesPositionRef": {
|
|
30689
|
+
"properties": {
|
|
30690
|
+
"loco_series": {
|
|
30691
|
+
"type": "string",
|
|
30692
|
+
"title": "Loco Series"
|
|
30693
|
+
},
|
|
30694
|
+
"nomenclature_id": {
|
|
30695
|
+
"type": "string",
|
|
30696
|
+
"format": "uuid",
|
|
30697
|
+
"title": "Nomenclature Id"
|
|
30698
|
+
},
|
|
30699
|
+
"positions": {
|
|
30700
|
+
"items": {
|
|
30701
|
+
"type": "string"
|
|
30702
|
+
},
|
|
30703
|
+
"type": "array",
|
|
30704
|
+
"title": "Positions",
|
|
30705
|
+
"default": []
|
|
30706
|
+
}
|
|
30707
|
+
},
|
|
30708
|
+
"type": "object",
|
|
30709
|
+
"required": [
|
|
30710
|
+
"loco_series",
|
|
30711
|
+
"nomenclature_id"
|
|
30712
|
+
],
|
|
30713
|
+
"title": "LocoSeriesPositionRef",
|
|
30714
|
+
"description": "One binding: what positions a part type has on ONE series.\n\nOverrides NomenclatureRef.positions for that series only. A type with no\nrow here keeps the global list, so this dictionary is usually short and a\ndepot that never needs per-series lists syncs an empty one."
|
|
30715
|
+
},
|
|
30291
30716
|
"LocoUnitCard": {
|
|
30292
30717
|
"properties": {
|
|
30293
30718
|
"series": {
|
package/package.json
CHANGED