@semiont/backend 0.4.21 → 0.4.22
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/index.js +307 -628
- package/dist/index.js.map +1 -1
- package/dist/openapi.json +67 -151
- package/package.json +5 -5
package/dist/openapi.json
CHANGED
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"content": {
|
|
157
157
|
"application/json": {
|
|
158
158
|
"schema": {
|
|
159
|
-
"$ref": "#/components/schemas/
|
|
159
|
+
"$ref": "#/components/schemas/TokenRefreshResponse"
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
}
|
|
@@ -1554,63 +1554,6 @@
|
|
|
1554
1554
|
}
|
|
1555
1555
|
}
|
|
1556
1556
|
}
|
|
1557
|
-
},
|
|
1558
|
-
"patch": {
|
|
1559
|
-
"summary": "Update resource metadata",
|
|
1560
|
-
"description": "Archive/unarchive or update entity types. Emits mark:archive / mark:unarchive / mark:update-entity-types on the bus; returns 202 immediately. Frontend reconciles state via SSE domain events.",
|
|
1561
|
-
"tags": [
|
|
1562
|
-
"Resources"
|
|
1563
|
-
],
|
|
1564
|
-
"security": [
|
|
1565
|
-
{
|
|
1566
|
-
"bearerAuth": []
|
|
1567
|
-
}
|
|
1568
|
-
],
|
|
1569
|
-
"parameters": [
|
|
1570
|
-
{
|
|
1571
|
-
"name": "id",
|
|
1572
|
-
"in": "path",
|
|
1573
|
-
"required": true,
|
|
1574
|
-
"schema": {
|
|
1575
|
-
"type": "string"
|
|
1576
|
-
}
|
|
1577
|
-
}
|
|
1578
|
-
],
|
|
1579
|
-
"requestBody": {
|
|
1580
|
-
"required": true,
|
|
1581
|
-
"content": {
|
|
1582
|
-
"application/json": {
|
|
1583
|
-
"schema": {
|
|
1584
|
-
"$ref": "#/components/schemas/UpdateResourceRequest"
|
|
1585
|
-
}
|
|
1586
|
-
}
|
|
1587
|
-
}
|
|
1588
|
-
},
|
|
1589
|
-
"responses": {
|
|
1590
|
-
"202": {
|
|
1591
|
-
"description": "Update accepted"
|
|
1592
|
-
},
|
|
1593
|
-
"401": {
|
|
1594
|
-
"description": "Authentication required",
|
|
1595
|
-
"content": {
|
|
1596
|
-
"application/json": {
|
|
1597
|
-
"schema": {
|
|
1598
|
-
"$ref": "#/components/schemas/ErrorResponse"
|
|
1599
|
-
}
|
|
1600
|
-
}
|
|
1601
|
-
}
|
|
1602
|
-
},
|
|
1603
|
-
"404": {
|
|
1604
|
-
"description": "Resource not found",
|
|
1605
|
-
"content": {
|
|
1606
|
-
"application/json": {
|
|
1607
|
-
"schema": {
|
|
1608
|
-
"$ref": "#/components/schemas/ErrorResponse"
|
|
1609
|
-
}
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
1557
|
}
|
|
1615
1558
|
},
|
|
1616
1559
|
"/api/resources/{id}": {
|
|
@@ -2631,27 +2574,6 @@
|
|
|
2631
2574
|
"newItem"
|
|
2632
2575
|
]
|
|
2633
2576
|
},
|
|
2634
|
-
"BeckonResponse": {
|
|
2635
|
-
"type": "object",
|
|
2636
|
-
"properties": {
|
|
2637
|
-
"participant": {
|
|
2638
|
-
"type": "string",
|
|
2639
|
-
"description": "Username or agent identifier that was beckoned"
|
|
2640
|
-
},
|
|
2641
|
-
"resourceId": {
|
|
2642
|
-
"type": "string",
|
|
2643
|
-
"description": "Resource the attention was directed at"
|
|
2644
|
-
},
|
|
2645
|
-
"annotationId": {
|
|
2646
|
-
"type": "string",
|
|
2647
|
-
"description": "Annotation the attention was directed at (if provided)"
|
|
2648
|
-
}
|
|
2649
|
-
},
|
|
2650
|
-
"required": [
|
|
2651
|
-
"participant",
|
|
2652
|
-
"resourceId"
|
|
2653
|
-
]
|
|
2654
|
-
},
|
|
2655
2577
|
"CloneResourceWithTokenResponse": {
|
|
2656
2578
|
"type": "object",
|
|
2657
2579
|
"properties": {
|
|
@@ -4753,20 +4675,6 @@
|
|
|
4753
4675
|
"operations"
|
|
4754
4676
|
]
|
|
4755
4677
|
},
|
|
4756
|
-
"UpdateResourceRequest": {
|
|
4757
|
-
"type": "object",
|
|
4758
|
-
"properties": {
|
|
4759
|
-
"entityTypes": {
|
|
4760
|
-
"type": "array",
|
|
4761
|
-
"items": {
|
|
4762
|
-
"type": "string"
|
|
4763
|
-
}
|
|
4764
|
-
},
|
|
4765
|
-
"archived": {
|
|
4766
|
-
"type": "boolean"
|
|
4767
|
-
}
|
|
4768
|
-
}
|
|
4769
|
-
},
|
|
4770
4678
|
"UpdateUserRequest": {
|
|
4771
4679
|
"type": "object",
|
|
4772
4680
|
"properties": {
|
|
@@ -4999,6 +4907,10 @@
|
|
|
4999
4907
|
"type": "object",
|
|
5000
4908
|
"description": "Command payload sent on the bind:update-body bus channel to modify annotation bodies.",
|
|
5001
4909
|
"properties": {
|
|
4910
|
+
"_userId": {
|
|
4911
|
+
"type": "string",
|
|
4912
|
+
"description": "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
|
|
4913
|
+
},
|
|
5002
4914
|
"correlationId": {
|
|
5003
4915
|
"type": "string",
|
|
5004
4916
|
"description": "Client-supplied id used to match this command to its result event(s) on the events-stream. Generated by the route handler if absent."
|
|
@@ -5011,10 +4923,6 @@
|
|
|
5011
4923
|
"type": "string",
|
|
5012
4924
|
"description": "Branded ResourceId of the resource the annotation belongs to"
|
|
5013
4925
|
},
|
|
5014
|
-
"userId": {
|
|
5015
|
-
"type": "string",
|
|
5016
|
-
"description": "Branded UserId of the user performing the update"
|
|
5017
|
-
},
|
|
5018
4926
|
"operations": {
|
|
5019
4927
|
"type": "array",
|
|
5020
4928
|
"items": {
|
|
@@ -6051,10 +5959,11 @@
|
|
|
6051
5959
|
"type": "object",
|
|
6052
5960
|
"description": "Command to mark a job as complete",
|
|
6053
5961
|
"properties": {
|
|
6054
|
-
"
|
|
6055
|
-
"type": "string"
|
|
5962
|
+
"_userId": {
|
|
5963
|
+
"type": "string",
|
|
5964
|
+
"description": "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
|
|
6056
5965
|
},
|
|
6057
|
-
"
|
|
5966
|
+
"resourceId": {
|
|
6058
5967
|
"type": "string"
|
|
6059
5968
|
},
|
|
6060
5969
|
"jobId": {
|
|
@@ -6073,7 +5982,6 @@
|
|
|
6073
5982
|
},
|
|
6074
5983
|
"required": [
|
|
6075
5984
|
"resourceId",
|
|
6076
|
-
"userId",
|
|
6077
5985
|
"jobId",
|
|
6078
5986
|
"jobType"
|
|
6079
5987
|
]
|
|
@@ -6082,10 +5990,11 @@
|
|
|
6082
5990
|
"type": "object",
|
|
6083
5991
|
"description": "Command to mark a job as failed",
|
|
6084
5992
|
"properties": {
|
|
6085
|
-
"
|
|
6086
|
-
"type": "string"
|
|
5993
|
+
"_userId": {
|
|
5994
|
+
"type": "string",
|
|
5995
|
+
"description": "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
|
|
6087
5996
|
},
|
|
6088
|
-
"
|
|
5997
|
+
"resourceId": {
|
|
6089
5998
|
"type": "string"
|
|
6090
5999
|
},
|
|
6091
6000
|
"jobId": {
|
|
@@ -6104,7 +6013,6 @@
|
|
|
6104
6013
|
},
|
|
6105
6014
|
"required": [
|
|
6106
6015
|
"resourceId",
|
|
6107
|
-
"userId",
|
|
6108
6016
|
"jobId",
|
|
6109
6017
|
"jobType",
|
|
6110
6018
|
"error"
|
|
@@ -6252,12 +6160,17 @@
|
|
|
6252
6160
|
},
|
|
6253
6161
|
"resourceId": {
|
|
6254
6162
|
"type": "string"
|
|
6163
|
+
},
|
|
6164
|
+
"userId": {
|
|
6165
|
+
"type": "string",
|
|
6166
|
+
"description": "DID of the user who initiated the job (audit)."
|
|
6255
6167
|
}
|
|
6256
6168
|
},
|
|
6257
6169
|
"required": [
|
|
6258
6170
|
"jobId",
|
|
6259
6171
|
"jobType",
|
|
6260
|
-
"resourceId"
|
|
6172
|
+
"resourceId",
|
|
6173
|
+
"userId"
|
|
6261
6174
|
]
|
|
6262
6175
|
},
|
|
6263
6176
|
"JobReferenceAnnotationResult": {
|
|
@@ -6287,10 +6200,11 @@
|
|
|
6287
6200
|
"type": "object",
|
|
6288
6201
|
"description": "Command to report progress on a job",
|
|
6289
6202
|
"properties": {
|
|
6290
|
-
"
|
|
6291
|
-
"type": "string"
|
|
6203
|
+
"_userId": {
|
|
6204
|
+
"type": "string",
|
|
6205
|
+
"description": "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
|
|
6292
6206
|
},
|
|
6293
|
-
"
|
|
6207
|
+
"resourceId": {
|
|
6294
6208
|
"type": "string"
|
|
6295
6209
|
},
|
|
6296
6210
|
"jobId": {
|
|
@@ -6312,7 +6226,6 @@
|
|
|
6312
6226
|
},
|
|
6313
6227
|
"required": [
|
|
6314
6228
|
"resourceId",
|
|
6315
|
-
"userId",
|
|
6316
6229
|
"jobId",
|
|
6317
6230
|
"jobType",
|
|
6318
6231
|
"percentage"
|
|
@@ -6345,10 +6258,11 @@
|
|
|
6345
6258
|
"type": "object",
|
|
6346
6259
|
"description": "Command to start a job",
|
|
6347
6260
|
"properties": {
|
|
6348
|
-
"
|
|
6349
|
-
"type": "string"
|
|
6261
|
+
"_userId": {
|
|
6262
|
+
"type": "string",
|
|
6263
|
+
"description": "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
|
|
6350
6264
|
},
|
|
6351
|
-
"
|
|
6265
|
+
"resourceId": {
|
|
6352
6266
|
"type": "string"
|
|
6353
6267
|
},
|
|
6354
6268
|
"jobId": {
|
|
@@ -6364,7 +6278,6 @@
|
|
|
6364
6278
|
},
|
|
6365
6279
|
"required": [
|
|
6366
6280
|
"resourceId",
|
|
6367
|
-
"userId",
|
|
6368
6281
|
"jobId",
|
|
6369
6282
|
"jobType"
|
|
6370
6283
|
]
|
|
@@ -6432,21 +6345,22 @@
|
|
|
6432
6345
|
"tag": {
|
|
6433
6346
|
"type": "string"
|
|
6434
6347
|
},
|
|
6435
|
-
"
|
|
6436
|
-
"type": "string"
|
|
6348
|
+
"_userId": {
|
|
6349
|
+
"type": "string",
|
|
6350
|
+
"description": "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
|
|
6437
6351
|
}
|
|
6438
6352
|
},
|
|
6439
6353
|
"required": [
|
|
6440
|
-
"tag"
|
|
6441
|
-
"userId"
|
|
6354
|
+
"tag"
|
|
6442
6355
|
]
|
|
6443
6356
|
},
|
|
6444
6357
|
"MarkArchiveCommand": {
|
|
6445
6358
|
"type": "object",
|
|
6446
6359
|
"description": "Bus command to archive a resource and optionally remove its file.",
|
|
6447
6360
|
"properties": {
|
|
6448
|
-
"
|
|
6449
|
-
"type": "string"
|
|
6361
|
+
"_userId": {
|
|
6362
|
+
"type": "string",
|
|
6363
|
+
"description": "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
|
|
6450
6364
|
},
|
|
6451
6365
|
"resourceId": {
|
|
6452
6366
|
"type": "string"
|
|
@@ -6543,6 +6457,10 @@
|
|
|
6543
6457
|
"type": "object",
|
|
6544
6458
|
"description": "Bus command to create an annotation on a resource.",
|
|
6545
6459
|
"properties": {
|
|
6460
|
+
"_userId": {
|
|
6461
|
+
"type": "string",
|
|
6462
|
+
"description": "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
|
|
6463
|
+
},
|
|
6546
6464
|
"correlationId": {
|
|
6547
6465
|
"type": "string",
|
|
6548
6466
|
"description": "Optional correlation id threaded from the originating mark:create-request. Propagated into event metadata by Stower so annotation-assembly can emit mark:create-ok after persistence completes."
|
|
@@ -6550,16 +6468,12 @@
|
|
|
6550
6468
|
"annotation": {
|
|
6551
6469
|
"$ref": "#/components/schemas/Annotation"
|
|
6552
6470
|
},
|
|
6553
|
-
"userId": {
|
|
6554
|
-
"type": "string"
|
|
6555
|
-
},
|
|
6556
6471
|
"resourceId": {
|
|
6557
6472
|
"type": "string"
|
|
6558
6473
|
}
|
|
6559
6474
|
},
|
|
6560
6475
|
"required": [
|
|
6561
6476
|
"annotation",
|
|
6562
|
-
"userId",
|
|
6563
6477
|
"resourceId"
|
|
6564
6478
|
]
|
|
6565
6479
|
},
|
|
@@ -6599,10 +6513,11 @@
|
|
|
6599
6513
|
"type": "object",
|
|
6600
6514
|
"description": "Bus command to delete an annotation.",
|
|
6601
6515
|
"properties": {
|
|
6602
|
-
"
|
|
6603
|
-
"type": "string"
|
|
6516
|
+
"_userId": {
|
|
6517
|
+
"type": "string",
|
|
6518
|
+
"description": "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
|
|
6604
6519
|
},
|
|
6605
|
-
"
|
|
6520
|
+
"annotationId": {
|
|
6606
6521
|
"type": "string"
|
|
6607
6522
|
},
|
|
6608
6523
|
"resourceId": {
|
|
@@ -6769,8 +6684,9 @@
|
|
|
6769
6684
|
"type": "object",
|
|
6770
6685
|
"description": "Bus command to unarchive a previously archived resource.",
|
|
6771
6686
|
"properties": {
|
|
6772
|
-
"
|
|
6773
|
-
"type": "string"
|
|
6687
|
+
"_userId": {
|
|
6688
|
+
"type": "string",
|
|
6689
|
+
"description": "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
|
|
6774
6690
|
},
|
|
6775
6691
|
"resourceId": {
|
|
6776
6692
|
"type": "string"
|
|
@@ -6787,6 +6703,10 @@
|
|
|
6787
6703
|
"type": "object",
|
|
6788
6704
|
"description": "Bus command to update an annotation's body with patch operations.",
|
|
6789
6705
|
"properties": {
|
|
6706
|
+
"_userId": {
|
|
6707
|
+
"type": "string",
|
|
6708
|
+
"description": "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
|
|
6709
|
+
},
|
|
6790
6710
|
"correlationId": {
|
|
6791
6711
|
"type": "string",
|
|
6792
6712
|
"description": "Correlation id threaded from the originating route through to event metadata. Lets the events-stream deliver matched results to the client that initiated the bind."
|
|
@@ -6794,9 +6714,6 @@
|
|
|
6794
6714
|
"annotationId": {
|
|
6795
6715
|
"type": "string"
|
|
6796
6716
|
},
|
|
6797
|
-
"userId": {
|
|
6798
|
-
"type": "string"
|
|
6799
|
-
},
|
|
6800
6717
|
"resourceId": {
|
|
6801
6718
|
"type": "string"
|
|
6802
6719
|
},
|
|
@@ -6819,7 +6736,6 @@
|
|
|
6819
6736
|
},
|
|
6820
6737
|
"required": [
|
|
6821
6738
|
"annotationId",
|
|
6822
|
-
"userId",
|
|
6823
6739
|
"resourceId",
|
|
6824
6740
|
"operations"
|
|
6825
6741
|
]
|
|
@@ -6831,8 +6747,9 @@
|
|
|
6831
6747
|
"resourceId": {
|
|
6832
6748
|
"type": "string"
|
|
6833
6749
|
},
|
|
6834
|
-
"
|
|
6835
|
-
"type": "string"
|
|
6750
|
+
"_userId": {
|
|
6751
|
+
"type": "string",
|
|
6752
|
+
"description": "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
|
|
6836
6753
|
},
|
|
6837
6754
|
"currentEntityTypes": {
|
|
6838
6755
|
"type": "array",
|
|
@@ -6849,7 +6766,6 @@
|
|
|
6849
6766
|
},
|
|
6850
6767
|
"required": [
|
|
6851
6768
|
"resourceId",
|
|
6852
|
-
"userId",
|
|
6853
6769
|
"currentEntityTypes",
|
|
6854
6770
|
"updatedEntityTypes"
|
|
6855
6771
|
]
|
|
@@ -7062,6 +6978,10 @@
|
|
|
7062
6978
|
"type": "object",
|
|
7063
6979
|
"description": "Bus command to create a yielded resource in the knowledge base.",
|
|
7064
6980
|
"properties": {
|
|
6981
|
+
"_userId": {
|
|
6982
|
+
"type": "string",
|
|
6983
|
+
"description": "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
|
|
6984
|
+
},
|
|
7065
6985
|
"name": {
|
|
7066
6986
|
"type": "string"
|
|
7067
6987
|
},
|
|
@@ -7077,9 +6997,6 @@
|
|
|
7077
6997
|
"format": {
|
|
7078
6998
|
"$ref": "#/components/schemas/ContentFormat"
|
|
7079
6999
|
},
|
|
7080
|
-
"userId": {
|
|
7081
|
-
"type": "string"
|
|
7082
|
-
},
|
|
7083
7000
|
"language": {
|
|
7084
7001
|
"type": "string"
|
|
7085
7002
|
},
|
|
@@ -7131,8 +7048,7 @@
|
|
|
7131
7048
|
"storageUri",
|
|
7132
7049
|
"contentChecksum",
|
|
7133
7050
|
"byteSize",
|
|
7134
|
-
"format"
|
|
7135
|
-
"userId"
|
|
7051
|
+
"format"
|
|
7136
7052
|
]
|
|
7137
7053
|
},
|
|
7138
7054
|
"YieldCreateOk": {
|
|
@@ -7167,23 +7083,23 @@
|
|
|
7167
7083
|
"type": "object",
|
|
7168
7084
|
"description": "Bus command to move (rename) a yielded resource.",
|
|
7169
7085
|
"properties": {
|
|
7086
|
+
"_userId": {
|
|
7087
|
+
"type": "string",
|
|
7088
|
+
"description": "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
|
|
7089
|
+
},
|
|
7170
7090
|
"fromUri": {
|
|
7171
7091
|
"type": "string"
|
|
7172
7092
|
},
|
|
7173
7093
|
"toUri": {
|
|
7174
7094
|
"type": "string"
|
|
7175
7095
|
},
|
|
7176
|
-
"userId": {
|
|
7177
|
-
"type": "string"
|
|
7178
|
-
},
|
|
7179
7096
|
"noGit": {
|
|
7180
7097
|
"type": "boolean"
|
|
7181
7098
|
}
|
|
7182
7099
|
},
|
|
7183
7100
|
"required": [
|
|
7184
7101
|
"fromUri",
|
|
7185
|
-
"toUri"
|
|
7186
|
-
"userId"
|
|
7102
|
+
"toUri"
|
|
7187
7103
|
]
|
|
7188
7104
|
},
|
|
7189
7105
|
"YieldRequestCommand": {
|
|
@@ -7241,6 +7157,10 @@
|
|
|
7241
7157
|
"type": "object",
|
|
7242
7158
|
"description": "Bus command to update a yielded resource's storage content.",
|
|
7243
7159
|
"properties": {
|
|
7160
|
+
"_userId": {
|
|
7161
|
+
"type": "string",
|
|
7162
|
+
"description": "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
|
|
7163
|
+
},
|
|
7244
7164
|
"resourceId": {
|
|
7245
7165
|
"type": "string"
|
|
7246
7166
|
},
|
|
@@ -7253,9 +7173,6 @@
|
|
|
7253
7173
|
"byteSize": {
|
|
7254
7174
|
"type": "integer"
|
|
7255
7175
|
},
|
|
7256
|
-
"userId": {
|
|
7257
|
-
"type": "string"
|
|
7258
|
-
},
|
|
7259
7176
|
"noGit": {
|
|
7260
7177
|
"type": "boolean"
|
|
7261
7178
|
}
|
|
@@ -7264,8 +7181,7 @@
|
|
|
7264
7181
|
"resourceId",
|
|
7265
7182
|
"storageUri",
|
|
7266
7183
|
"contentChecksum",
|
|
7267
|
-
"byteSize"
|
|
7268
|
-
"userId"
|
|
7184
|
+
"byteSize"
|
|
7269
7185
|
]
|
|
7270
7186
|
},
|
|
7271
7187
|
"YieldUpdateOk": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semiont/backend",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.22",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Semiont backend server - pre-built for npm consumption",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"@hono/swagger-ui": "^0.6.1",
|
|
21
21
|
"@prisma/adapter-pg": "^7.5.0",
|
|
22
22
|
"@prisma/client": "^7.5.0",
|
|
23
|
-
"@semiont/core": "^0.4.
|
|
24
|
-
"@semiont/event-sourcing": "^0.4.
|
|
25
|
-
"@semiont/jobs": "^0.4.
|
|
26
|
-
"@semiont/make-meaning": "^0.4.
|
|
23
|
+
"@semiont/core": "^0.4.22",
|
|
24
|
+
"@semiont/event-sourcing": "^0.4.22",
|
|
25
|
+
"@semiont/jobs": "^0.4.22",
|
|
26
|
+
"@semiont/make-meaning": "^0.4.22",
|
|
27
27
|
"ajv": "^8.17.1",
|
|
28
28
|
"ajv-formats": "^3.0.1",
|
|
29
29
|
"argon2": "^0.44.0",
|