@twin.org/node 0.0.3-next.32 → 0.0.3-next.33

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.
@@ -437,6 +437,14 @@
437
437
  "streamNotFound": "The stream with the Id \"{notFoundId}\" was not found",
438
438
  "streamEntryNotFound": "The stream entry with the Id \"{notFoundId}\" was not found"
439
439
  },
440
+ "automationService": {
441
+ "actionCreateFailed": "Creating action of type \"{actionType}\" with trigger \"{trigger}\" failed",
442
+ "actionRemoveFailed": "Removing action with id \"{actionId}\" failed",
443
+ "actionFailed": "Triggering action \"{name}\" with trigger \"{trigger}\" failed",
444
+ "actionNotFound": "Action with id \"{notFoundId}\" not found",
445
+ "actionGetFailed": "Getting action with id \"{actionId}\" failed",
446
+ "actionTypeNotFound": "Action type \"{actionType}\" not found for trigger \"{trigger}\""
447
+ },
440
448
  "taskSchedulerService": {
441
449
  "taskFailed": "Task with id \"{id}\" failed to run"
442
450
  },
@@ -977,13 +985,20 @@
977
985
  "creationFailedOutput": "Failed to parse the created notarization from transaction output.",
978
986
  "deleteLockActive": "Deletion is currently locked for this notarization.",
979
987
  "getFailed": "Failed to get the notarization.",
980
- "invalidDate": "The value \"{{value}}\" is not a valid ISO date-time.",
981
- "namespaceMismatch": "The notarization id \"{{id}}\" is not in the expected namespace \"{{namespace}}\".",
988
+ "invalidDate": "The value \"{value}\" is not a valid ISO date-time.",
989
+ "namespaceMismatch": "The notarization id \"{id}\" is not in the expected namespace \"{namespace}\".",
982
990
  "removeFailed": "Failed to remove the notarization.",
983
991
  "transferFailed": "Failed to transfer the notarization.",
984
992
  "transferLockActive": "Transfer is currently locked for this notarization.",
985
993
  "updateFailed": "Failed to update the notarization.",
986
- "updateLockActive": "Updates are currently locked for this notarization."
994
+ "updateLockActive": "Updates are currently locked for this notarization.",
995
+ "updateWhileLocked": "Cannot update state while notarization is locked for updates",
996
+ "destroyWhileLocked": "Cannot destroy notarization while locked for deletion",
997
+ "lockTimeNotSatisfied": "The lock time is not satisfied",
998
+ "untilDestroyedLockNotAllowed": "Delete lock cannot be UntilDestroyed",
999
+ "dynamicNotarizationInvariants": "Invariants for dynamic notarization are broken by the specified",
1000
+ "lockedNotarizationInvariants": "Invariants for locked notarization are broken by the specified",
1001
+ "unknownAbortCode": "An unknown abort code was returned: \"{abortCode}\""
987
1002
  },
988
1003
  "notarizationService": {
989
1004
  "namespaceMismatch": "The namespace in the urn \"{id}\" does not match the namespace of the notarization service \"{namespace}\"",
@@ -1911,6 +1926,13 @@
1911
1926
  "engineTypes": {
1912
1927
  "configuringEntityStorage": "Configuring {element} with name \"{storageName}\" using \"{storageType}\" connector"
1913
1928
  },
1929
+ "fetchAction": {
1930
+ "fetch": "Fetch \"{url}\" with method \"{method}\""
1931
+ },
1932
+ "automationService": {
1933
+ "trigger": "Triggering automation action with trigger \"{trigger}\"",
1934
+ "actionTriggered": "Triggered action \"{name}\" with trigger \"{trigger}\""
1935
+ },
1914
1936
  "taskSchedulerService": {
1915
1937
  "taskAdded": "Task with id \"{id}\" added",
1916
1938
  "taskRemoved": "Task with id \"{id}\" removed",
package/docs/changelog.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.3-next.33](https://github.com/twinfoundation/node/compare/node-v0.0.3-next.32...node-v0.0.3-next.33) (2026-04-24)
4
+
5
+
6
+ ### Features
7
+
8
+ * add automation ([cfc63b4](https://github.com/twinfoundation/node/commit/cfc63b465c139280f696877df21d54dc6a065a7e))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/node-core bumped from 0.0.3-next.32 to 0.0.3-next.33
16
+
3
17
  ## [0.0.3-next.32](https://github.com/twinfoundation/node/compare/node-v0.0.3-next.31...node-v0.0.3-next.32) (2026-04-16)
4
18
 
5
19
 
@@ -47,6 +47,10 @@
47
47
  "name": "Telemetry",
48
48
  "description": "Endpoints which are modelled to access a telemetry contract."
49
49
  },
50
+ {
51
+ "name": "Automation",
52
+ "description": "Endpoints which are modelled to access an automation contract."
53
+ },
50
54
  {
51
55
  "name": "Logging",
52
56
  "description": "Endpoints which are modelled to access a logging contract."
@@ -5707,25 +5711,590 @@
5707
5711
  }
5708
5712
  }
5709
5713
  }
5710
- },
5711
- "put": {
5712
- "operationId": "telemetryUpdateMetric",
5713
- "summary": "Update a telemetry metric",
5714
+ },
5715
+ "put": {
5716
+ "operationId": "telemetryUpdateMetric",
5717
+ "summary": "Update a telemetry metric",
5718
+ "tags": [
5719
+ "Telemetry"
5720
+ ],
5721
+ "parameters": [
5722
+ {
5723
+ "name": "id",
5724
+ "description": "The id of the metric.",
5725
+ "in": "path",
5726
+ "required": true,
5727
+ "schema": {
5728
+ "type": "string"
5729
+ },
5730
+ "style": "simple",
5731
+ "example": "my-counter"
5732
+ }
5733
+ ],
5734
+ "security": [
5735
+ {
5736
+ "jwtBearerAuthScheme": []
5737
+ }
5738
+ ],
5739
+ "requestBody": {
5740
+ "description": "Update a telemetry metric.",
5741
+ "required": true,
5742
+ "content": {
5743
+ "application/json": {
5744
+ "schema": {
5745
+ "$ref": "#/components/schemas/TelemetryUpdateMetricRequest"
5746
+ },
5747
+ "examples": {
5748
+ "telemetryUpdateMetricRequestExample": {
5749
+ "value": {
5750
+ "label": "My New Label"
5751
+ }
5752
+ }
5753
+ }
5754
+ }
5755
+ }
5756
+ },
5757
+ "responses": {
5758
+ "204": {
5759
+ "description": "The rest request ended in success with no data."
5760
+ },
5761
+ "400": {
5762
+ "description": "The server cannot process the request, see the content for more details.",
5763
+ "content": {
5764
+ "application/json": {
5765
+ "schema": {
5766
+ "$ref": "#/components/schemas/Error"
5767
+ },
5768
+ "examples": {
5769
+ "exampleResponse": {
5770
+ "value": {
5771
+ "name": "GeneralError",
5772
+ "message": "errorMessage",
5773
+ "properties": {
5774
+ "foo": "bar"
5775
+ }
5776
+ }
5777
+ }
5778
+ }
5779
+ }
5780
+ }
5781
+ },
5782
+ "401": {
5783
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
5784
+ "content": {
5785
+ "application/json": {
5786
+ "schema": {
5787
+ "$ref": "#/components/schemas/Error"
5788
+ },
5789
+ "examples": {
5790
+ "exampleResponse": {
5791
+ "value": {
5792
+ "name": "UnauthorizedError",
5793
+ "message": "errorMessage"
5794
+ }
5795
+ }
5796
+ }
5797
+ }
5798
+ }
5799
+ },
5800
+ "500": {
5801
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
5802
+ "content": {
5803
+ "application/json": {
5804
+ "schema": {
5805
+ "$ref": "#/components/schemas/Error"
5806
+ },
5807
+ "examples": {
5808
+ "exampleResponse": {
5809
+ "value": {
5810
+ "name": "InternalServerError",
5811
+ "message": "errorMessage"
5812
+ }
5813
+ }
5814
+ }
5815
+ }
5816
+ }
5817
+ }
5818
+ }
5819
+ },
5820
+ "delete": {
5821
+ "operationId": "telemetryRemoveMetric",
5822
+ "summary": "Remove a telemetry metric and it's values.",
5823
+ "tags": [
5824
+ "Telemetry"
5825
+ ],
5826
+ "parameters": [
5827
+ {
5828
+ "name": "id",
5829
+ "description": "The id of the metric.",
5830
+ "in": "path",
5831
+ "required": true,
5832
+ "schema": {
5833
+ "type": "string"
5834
+ },
5835
+ "style": "simple",
5836
+ "example": "my-counter"
5837
+ }
5838
+ ],
5839
+ "security": [
5840
+ {
5841
+ "jwtBearerAuthScheme": []
5842
+ }
5843
+ ],
5844
+ "responses": {
5845
+ "204": {
5846
+ "description": "The rest request ended in success with no data."
5847
+ },
5848
+ "400": {
5849
+ "description": "The server cannot process the request, see the content for more details.",
5850
+ "content": {
5851
+ "application/json": {
5852
+ "schema": {
5853
+ "$ref": "#/components/schemas/Error"
5854
+ },
5855
+ "examples": {
5856
+ "exampleResponse": {
5857
+ "value": {
5858
+ "name": "GeneralError",
5859
+ "message": "errorMessage",
5860
+ "properties": {
5861
+ "foo": "bar"
5862
+ }
5863
+ }
5864
+ }
5865
+ }
5866
+ }
5867
+ }
5868
+ },
5869
+ "401": {
5870
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
5871
+ "content": {
5872
+ "application/json": {
5873
+ "schema": {
5874
+ "$ref": "#/components/schemas/Error"
5875
+ },
5876
+ "examples": {
5877
+ "exampleResponse": {
5878
+ "value": {
5879
+ "name": "UnauthorizedError",
5880
+ "message": "errorMessage"
5881
+ }
5882
+ }
5883
+ }
5884
+ }
5885
+ }
5886
+ },
5887
+ "500": {
5888
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
5889
+ "content": {
5890
+ "application/json": {
5891
+ "schema": {
5892
+ "$ref": "#/components/schemas/Error"
5893
+ },
5894
+ "examples": {
5895
+ "exampleResponse": {
5896
+ "value": {
5897
+ "name": "InternalServerError",
5898
+ "message": "errorMessage"
5899
+ }
5900
+ }
5901
+ }
5902
+ }
5903
+ }
5904
+ }
5905
+ }
5906
+ }
5907
+ },
5908
+ "/telemetry/metric/{id}/value": {
5909
+ "post": {
5910
+ "operationId": "telemetryAddMetricValue",
5911
+ "summary": "Add a telemetry metric value",
5912
+ "tags": [
5913
+ "Telemetry"
5914
+ ],
5915
+ "parameters": [
5916
+ {
5917
+ "name": "id",
5918
+ "description": "The id of the metric.",
5919
+ "in": "path",
5920
+ "required": true,
5921
+ "schema": {
5922
+ "type": "string"
5923
+ },
5924
+ "style": "simple",
5925
+ "example": "my-counter"
5926
+ }
5927
+ ],
5928
+ "security": [
5929
+ {
5930
+ "jwtBearerAuthScheme": []
5931
+ }
5932
+ ],
5933
+ "requestBody": {
5934
+ "description": "Add a telemetry metric value.",
5935
+ "required": true,
5936
+ "content": {
5937
+ "application/json": {
5938
+ "schema": {
5939
+ "$ref": "#/components/schemas/TelemetryAddMetricValueRequest"
5940
+ },
5941
+ "examples": {
5942
+ "telemetryAddMetricValueRequestExample": {
5943
+ "value": {
5944
+ "value": 10
5945
+ }
5946
+ },
5947
+ "telemetryAddMetricValueIncRequestExample": {
5948
+ "value": {
5949
+ "value": "inc"
5950
+ }
5951
+ }
5952
+ }
5953
+ }
5954
+ }
5955
+ },
5956
+ "responses": {
5957
+ "201": {
5958
+ "description": "The rest request ended in created response.",
5959
+ "headers": {
5960
+ "location": {
5961
+ "schema": {
5962
+ "type": "string"
5963
+ },
5964
+ "description": "e.g. aabbccdd11223445566"
5965
+ }
5966
+ }
5967
+ },
5968
+ "400": {
5969
+ "description": "The server cannot process the request, see the content for more details.",
5970
+ "content": {
5971
+ "application/json": {
5972
+ "schema": {
5973
+ "$ref": "#/components/schemas/Error"
5974
+ },
5975
+ "examples": {
5976
+ "exampleResponse": {
5977
+ "value": {
5978
+ "name": "GeneralError",
5979
+ "message": "errorMessage",
5980
+ "properties": {
5981
+ "foo": "bar"
5982
+ }
5983
+ }
5984
+ }
5985
+ }
5986
+ }
5987
+ }
5988
+ },
5989
+ "401": {
5990
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
5991
+ "content": {
5992
+ "application/json": {
5993
+ "schema": {
5994
+ "$ref": "#/components/schemas/Error"
5995
+ },
5996
+ "examples": {
5997
+ "exampleResponse": {
5998
+ "value": {
5999
+ "name": "UnauthorizedError",
6000
+ "message": "errorMessage"
6001
+ }
6002
+ }
6003
+ }
6004
+ }
6005
+ }
6006
+ },
6007
+ "500": {
6008
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
6009
+ "content": {
6010
+ "application/json": {
6011
+ "schema": {
6012
+ "$ref": "#/components/schemas/Error"
6013
+ },
6014
+ "examples": {
6015
+ "exampleResponse": {
6016
+ "value": {
6017
+ "name": "InternalServerError",
6018
+ "message": "errorMessage"
6019
+ }
6020
+ }
6021
+ }
6022
+ }
6023
+ }
6024
+ }
6025
+ }
6026
+ },
6027
+ "get": {
6028
+ "operationId": "telemetryValuesListEntries",
6029
+ "summary": "Get a list of the values for a telemetry metric",
6030
+ "tags": [
6031
+ "Telemetry"
6032
+ ],
6033
+ "parameters": [
6034
+ {
6035
+ "name": "id",
6036
+ "description": "The id of the metric.",
6037
+ "in": "path",
6038
+ "required": true,
6039
+ "schema": {
6040
+ "type": "string"
6041
+ },
6042
+ "style": "simple",
6043
+ "example": "my-counter"
6044
+ },
6045
+ {
6046
+ "name": "timeStart",
6047
+ "description": "The start time of the metrics to retrieve as a timestamp in ms.",
6048
+ "in": "query",
6049
+ "required": false,
6050
+ "schema": {
6051
+ "type": "string"
6052
+ }
6053
+ },
6054
+ {
6055
+ "name": "timeEnd",
6056
+ "description": "The end time of the metrics to retrieve as a timestamp in ms.",
6057
+ "in": "query",
6058
+ "required": false,
6059
+ "schema": {
6060
+ "type": "string"
6061
+ }
6062
+ },
6063
+ {
6064
+ "name": "cursor",
6065
+ "description": "The optional cursor to get next chunk.",
6066
+ "in": "query",
6067
+ "required": false,
6068
+ "schema": {
6069
+ "type": "string"
6070
+ }
6071
+ },
6072
+ {
6073
+ "name": "limit",
6074
+ "description": "Limit the number of entities to return.",
6075
+ "in": "query",
6076
+ "required": false,
6077
+ "schema": {
6078
+ "type": "string"
6079
+ }
6080
+ }
6081
+ ],
6082
+ "security": [
6083
+ {
6084
+ "jwtBearerAuthScheme": []
6085
+ }
6086
+ ],
6087
+ "responses": {
6088
+ "200": {
6089
+ "description": "Response for telemetry list request.",
6090
+ "content": {
6091
+ "application/json": {
6092
+ "schema": {
6093
+ "$ref": "#/components/schemas/TelemetryValuesListResponse"
6094
+ },
6095
+ "examples": {
6096
+ "telemetryValuesListResponseExample": {
6097
+ "value": {
6098
+ "metric": {
6099
+ "id": "my-counter",
6100
+ "label": "My Counter",
6101
+ "type": 0,
6102
+ "unit": "KG"
6103
+ },
6104
+ "entities": [
6105
+ {
6106
+ "id": "aabbccdd11223445566",
6107
+ "ts": 1715252922273,
6108
+ "value": 10
6109
+ },
6110
+ {
6111
+ "id": "aabbccdd11223445566",
6112
+ "ts": 1715252922274,
6113
+ "value": 11
6114
+ }
6115
+ ],
6116
+ "cursor": "1"
6117
+ }
6118
+ }
6119
+ }
6120
+ }
6121
+ }
6122
+ },
6123
+ "400": {
6124
+ "description": "The server cannot process the request, see the content for more details.",
6125
+ "content": {
6126
+ "application/json": {
6127
+ "schema": {
6128
+ "$ref": "#/components/schemas/Error"
6129
+ },
6130
+ "examples": {
6131
+ "exampleResponse": {
6132
+ "value": {
6133
+ "name": "GeneralError",
6134
+ "message": "errorMessage",
6135
+ "properties": {
6136
+ "foo": "bar"
6137
+ }
6138
+ }
6139
+ }
6140
+ }
6141
+ }
6142
+ }
6143
+ },
6144
+ "401": {
6145
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
6146
+ "content": {
6147
+ "application/json": {
6148
+ "schema": {
6149
+ "$ref": "#/components/schemas/Error"
6150
+ },
6151
+ "examples": {
6152
+ "exampleResponse": {
6153
+ "value": {
6154
+ "name": "UnauthorizedError",
6155
+ "message": "errorMessage"
6156
+ }
6157
+ }
6158
+ }
6159
+ }
6160
+ }
6161
+ },
6162
+ "500": {
6163
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
6164
+ "content": {
6165
+ "application/json": {
6166
+ "schema": {
6167
+ "$ref": "#/components/schemas/Error"
6168
+ },
6169
+ "examples": {
6170
+ "exampleResponse": {
6171
+ "value": {
6172
+ "name": "InternalServerError",
6173
+ "message": "errorMessage"
6174
+ }
6175
+ }
6176
+ }
6177
+ }
6178
+ }
6179
+ }
6180
+ }
6181
+ }
6182
+ },
6183
+ "/automation/trigger/{trigger}": {
6184
+ "post": {
6185
+ "operationId": "AutomationTrigger",
6186
+ "summary": "Trigger an automation process.",
6187
+ "tags": [
6188
+ "Automation"
6189
+ ],
6190
+ "parameters": [
6191
+ {
6192
+ "name": "trigger",
6193
+ "description": "The trigger for the actions.",
6194
+ "in": "path",
6195
+ "required": true,
6196
+ "schema": {
6197
+ "type": "string"
6198
+ },
6199
+ "style": "simple",
6200
+ "example": "my-trigger"
6201
+ }
6202
+ ],
6203
+ "security": [
6204
+ {
6205
+ "jwtBearerAuthScheme": []
6206
+ }
6207
+ ],
6208
+ "requestBody": {
6209
+ "description": "Request to trigger an automation action.",
6210
+ "required": true,
6211
+ "content": {
6212
+ "application/json": {
6213
+ "schema": {
6214
+ "$ref": "#/components/schemas/AutomationTriggerRequest"
6215
+ },
6216
+ "examples": {
6217
+ "AutomationTriggerRequestExample": {
6218
+ "value": {
6219
+ "data": {
6220
+ "key": "value"
6221
+ }
6222
+ }
6223
+ }
6224
+ }
6225
+ }
6226
+ }
6227
+ },
6228
+ "responses": {
6229
+ "204": {
6230
+ "description": "The rest request ended in success with no data."
6231
+ },
6232
+ "400": {
6233
+ "description": "The server cannot process the request, see the content for more details.",
6234
+ "content": {
6235
+ "application/json": {
6236
+ "schema": {
6237
+ "$ref": "#/components/schemas/Error"
6238
+ },
6239
+ "examples": {
6240
+ "exampleResponse": {
6241
+ "value": {
6242
+ "name": "GeneralError",
6243
+ "message": "errorMessage",
6244
+ "properties": {
6245
+ "foo": "bar"
6246
+ }
6247
+ }
6248
+ }
6249
+ }
6250
+ }
6251
+ }
6252
+ },
6253
+ "401": {
6254
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
6255
+ "content": {
6256
+ "application/json": {
6257
+ "schema": {
6258
+ "$ref": "#/components/schemas/Error"
6259
+ },
6260
+ "examples": {
6261
+ "exampleResponse": {
6262
+ "value": {
6263
+ "name": "UnauthorizedError",
6264
+ "message": "errorMessage"
6265
+ }
6266
+ }
6267
+ }
6268
+ }
6269
+ }
6270
+ },
6271
+ "500": {
6272
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
6273
+ "content": {
6274
+ "application/json": {
6275
+ "schema": {
6276
+ "$ref": "#/components/schemas/Error"
6277
+ },
6278
+ "examples": {
6279
+ "exampleResponse": {
6280
+ "value": {
6281
+ "name": "InternalServerError",
6282
+ "message": "errorMessage"
6283
+ }
6284
+ }
6285
+ }
6286
+ }
6287
+ }
6288
+ }
6289
+ }
6290
+ }
6291
+ },
6292
+ "/automation": {
6293
+ "post": {
6294
+ "operationId": "AutomationActionCreate",
6295
+ "summary": "Create an automation action.",
5714
6296
  "tags": [
5715
- "Telemetry"
5716
- ],
5717
- "parameters": [
5718
- {
5719
- "name": "id",
5720
- "description": "The id of the metric.",
5721
- "in": "path",
5722
- "required": true,
5723
- "schema": {
5724
- "type": "string"
5725
- },
5726
- "style": "simple",
5727
- "example": "my-counter"
5728
- }
6297
+ "Automation"
5729
6298
  ],
5730
6299
  "security": [
5731
6300
  {
@@ -5733,17 +6302,21 @@
5733
6302
  }
5734
6303
  ],
5735
6304
  "requestBody": {
5736
- "description": "Update a telemetry metric.",
6305
+ "description": "Request to create an automation action.",
5737
6306
  "required": true,
5738
6307
  "content": {
5739
6308
  "application/json": {
5740
6309
  "schema": {
5741
- "$ref": "#/components/schemas/TelemetryUpdateMetricRequest"
6310
+ "$ref": "#/components/schemas/AutomationActionCreateRequest"
5742
6311
  },
5743
6312
  "examples": {
5744
- "telemetryUpdateMetricRequestExample": {
6313
+ "AutomationActionCreateRequestExample": {
5745
6314
  "value": {
5746
- "label": "My New Label"
6315
+ "actionType": "log",
6316
+ "trigger": "onCreate",
6317
+ "configuration": {
6318
+ "message": "Created!"
6319
+ }
5747
6320
  }
5748
6321
  }
5749
6322
  }
@@ -5751,8 +6324,16 @@
5751
6324
  }
5752
6325
  },
5753
6326
  "responses": {
5754
- "204": {
5755
- "description": "The rest request ended in success with no data."
6327
+ "201": {
6328
+ "description": "The rest request ended in created response.",
6329
+ "headers": {
6330
+ "location": {
6331
+ "schema": {
6332
+ "type": "string"
6333
+ },
6334
+ "description": "e.g. action-123"
6335
+ }
6336
+ }
5756
6337
  },
5757
6338
  "400": {
5758
6339
  "description": "The server cannot process the request, see the content for more details.",
@@ -5813,23 +6394,52 @@
5813
6394
  }
5814
6395
  }
5815
6396
  },
5816
- "delete": {
5817
- "operationId": "telemetryRemoveMetric",
5818
- "summary": "Remove a telemetry metric and it's values.",
6397
+ "get": {
6398
+ "operationId": "AutomationActionsQuery",
6399
+ "summary": "Query automation actions.",
5819
6400
  "tags": [
5820
- "Telemetry"
6401
+ "Automation"
5821
6402
  ],
5822
6403
  "parameters": [
5823
6404
  {
5824
- "name": "id",
5825
- "description": "The id of the metric.",
5826
- "in": "path",
5827
- "required": true,
6405
+ "name": "trigger",
6406
+ "description": "Filter by trigger type.",
6407
+ "in": "query",
6408
+ "required": false,
5828
6409
  "schema": {
5829
6410
  "type": "string"
5830
6411
  },
5831
- "style": "simple",
5832
- "example": "my-counter"
6412
+ "example": "onCreate"
6413
+ },
6414
+ {
6415
+ "name": "actionType",
6416
+ "description": "Filter by action type.",
6417
+ "in": "query",
6418
+ "required": false,
6419
+ "schema": {
6420
+ "type": "string"
6421
+ },
6422
+ "example": "log"
6423
+ },
6424
+ {
6425
+ "name": "cursor",
6426
+ "description": "Cursor for pagination.",
6427
+ "in": "query",
6428
+ "required": false,
6429
+ "schema": {
6430
+ "type": "string"
6431
+ },
6432
+ "example": "abc"
6433
+ },
6434
+ {
6435
+ "name": "limit",
6436
+ "description": "Limit the number of results returned.",
6437
+ "in": "query",
6438
+ "required": false,
6439
+ "schema": {
6440
+ "type": "string"
6441
+ },
6442
+ "example": "10"
5833
6443
  }
5834
6444
  ],
5835
6445
  "security": [
@@ -5838,8 +6448,32 @@
5838
6448
  }
5839
6449
  ],
5840
6450
  "responses": {
5841
- "204": {
5842
- "description": "The rest request ended in success with no data."
6451
+ "200": {
6452
+ "description": "Response for querying automation actions.",
6453
+ "content": {
6454
+ "application/json": {
6455
+ "schema": {
6456
+ "$ref": "#/components/schemas/AutomationActionsQueryResponse"
6457
+ },
6458
+ "examples": {
6459
+ "AutomationActionsQueryResponseExample": {
6460
+ "value": {
6461
+ "entries": [
6462
+ {
6463
+ "id": "action-123",
6464
+ "actionType": "log",
6465
+ "trigger": "onCreate",
6466
+ "configuration": {
6467
+ "message": "Created!"
6468
+ }
6469
+ }
6470
+ ],
6471
+ "cursor": "next-cursor"
6472
+ }
6473
+ }
6474
+ }
6475
+ }
6476
+ }
5843
6477
  },
5844
6478
  "400": {
5845
6479
  "description": "The server cannot process the request, see the content for more details.",
@@ -5901,24 +6535,24 @@
5901
6535
  }
5902
6536
  }
5903
6537
  },
5904
- "/telemetry/metric/{id}/value": {
5905
- "post": {
5906
- "operationId": "telemetryAddMetricValue",
5907
- "summary": "Add a telemetry metric value",
6538
+ "/automation/{actionId}": {
6539
+ "delete": {
6540
+ "operationId": "AutomationActionRemove",
6541
+ "summary": "Remove an automation action.",
5908
6542
  "tags": [
5909
- "Telemetry"
6543
+ "Automation"
5910
6544
  ],
5911
6545
  "parameters": [
5912
6546
  {
5913
- "name": "id",
5914
- "description": "The id of the metric.",
6547
+ "name": "actionId",
6548
+ "description": "The unique identifier of the action to remove.",
5915
6549
  "in": "path",
5916
6550
  "required": true,
5917
6551
  "schema": {
5918
6552
  "type": "string"
5919
6553
  },
5920
6554
  "style": "simple",
5921
- "example": "my-counter"
6555
+ "example": "action-123"
5922
6556
  }
5923
6557
  ],
5924
6558
  "security": [
@@ -5926,40 +6560,9 @@
5926
6560
  "jwtBearerAuthScheme": []
5927
6561
  }
5928
6562
  ],
5929
- "requestBody": {
5930
- "description": "Add a telemetry metric value.",
5931
- "required": true,
5932
- "content": {
5933
- "application/json": {
5934
- "schema": {
5935
- "$ref": "#/components/schemas/TelemetryAddMetricValueRequest"
5936
- },
5937
- "examples": {
5938
- "telemetryAddMetricValueRequestExample": {
5939
- "value": {
5940
- "value": 10
5941
- }
5942
- },
5943
- "telemetryAddMetricValueIncRequestExample": {
5944
- "value": {
5945
- "value": "inc"
5946
- }
5947
- }
5948
- }
5949
- }
5950
- }
5951
- },
5952
6563
  "responses": {
5953
- "201": {
5954
- "description": "The rest request ended in created response.",
5955
- "headers": {
5956
- "location": {
5957
- "schema": {
5958
- "type": "string"
5959
- },
5960
- "description": "e.g. aabbccdd11223445566"
5961
- }
5962
- }
6564
+ "204": {
6565
+ "description": "The rest request ended in success with no data."
5963
6566
  },
5964
6567
  "400": {
5965
6568
  "description": "The server cannot process the request, see the content for more details.",
@@ -6021,58 +6624,22 @@
6021
6624
  }
6022
6625
  },
6023
6626
  "get": {
6024
- "operationId": "telemetryValuesListEntries",
6025
- "summary": "Get a list of the values for a telemetry metric",
6627
+ "operationId": "AutomationActionGet",
6628
+ "summary": "Get an automation action by id.",
6026
6629
  "tags": [
6027
- "Telemetry"
6630
+ "Automation"
6028
6631
  ],
6029
6632
  "parameters": [
6030
6633
  {
6031
- "name": "id",
6032
- "description": "The id of the metric.",
6634
+ "name": "actionId",
6635
+ "description": "The unique identifier of the action to get.",
6033
6636
  "in": "path",
6034
6637
  "required": true,
6035
6638
  "schema": {
6036
6639
  "type": "string"
6037
6640
  },
6038
6641
  "style": "simple",
6039
- "example": "my-counter"
6040
- },
6041
- {
6042
- "name": "timeStart",
6043
- "description": "The start time of the metrics to retrieve as a timestamp in ms.",
6044
- "in": "query",
6045
- "required": false,
6046
- "schema": {
6047
- "type": "string"
6048
- }
6049
- },
6050
- {
6051
- "name": "timeEnd",
6052
- "description": "The end time of the metrics to retrieve as a timestamp in ms.",
6053
- "in": "query",
6054
- "required": false,
6055
- "schema": {
6056
- "type": "string"
6057
- }
6058
- },
6059
- {
6060
- "name": "cursor",
6061
- "description": "The optional cursor to get next chunk.",
6062
- "in": "query",
6063
- "required": false,
6064
- "schema": {
6065
- "type": "string"
6066
- }
6067
- },
6068
- {
6069
- "name": "limit",
6070
- "description": "Limit the number of entities to return.",
6071
- "in": "query",
6072
- "required": false,
6073
- "schema": {
6074
- "type": "string"
6075
- }
6642
+ "example": "action-123"
6076
6643
  }
6077
6644
  ],
6078
6645
  "security": [
@@ -6082,34 +6649,21 @@
6082
6649
  ],
6083
6650
  "responses": {
6084
6651
  "200": {
6085
- "description": "Response for telemetry list request.",
6652
+ "description": "Response for getting an automation action.",
6086
6653
  "content": {
6087
6654
  "application/json": {
6088
6655
  "schema": {
6089
- "$ref": "#/components/schemas/TelemetryValuesListResponse"
6656
+ "$ref": "#/components/schemas/AutomationActionEntry"
6090
6657
  },
6091
6658
  "examples": {
6092
- "telemetryValuesListResponseExample": {
6659
+ "AutomationActionGetResponseExample": {
6093
6660
  "value": {
6094
- "metric": {
6095
- "id": "my-counter",
6096
- "label": "My Counter",
6097
- "type": 0,
6098
- "unit": "KG"
6099
- },
6100
- "entities": [
6101
- {
6102
- "id": "aabbccdd11223445566",
6103
- "ts": 1715252922273,
6104
- "value": 10
6105
- },
6106
- {
6107
- "id": "aabbccdd11223445566",
6108
- "ts": 1715252922274,
6109
- "value": 11
6110
- }
6111
- ],
6112
- "cursor": "1"
6661
+ "id": "action-123",
6662
+ "actionType": "log",
6663
+ "trigger": "onCreate",
6664
+ "configuration": {
6665
+ "message": "Created!"
6666
+ }
6113
6667
  }
6114
6668
  }
6115
6669
  }
@@ -6587,8 +7141,8 @@
6587
7141
  "examples": {
6588
7142
  "nftResolveResponseExample": {
6589
7143
  "value": {
6590
- "issuer": "did:iota:tst:0x85ef62ea94fc4eeeeeddf6acc3b566e988e613081d0b93cc54ed831ed4c18d44",
6591
- "owner": "did:iota:tst:0x85ef62ea94fc4eeeeeddf6acc3b566e988e613081d0b93cc54ed831ed4c18d44",
7144
+ "issuer": "0x85ef62ea94fc4eeeeeddf6acc3b566e988e613081d0b93cc54ed831ed4c18d44",
7145
+ "issuerIdentityId": "0xa1d80bee7fdb4fd91ae45c6e539209f73cb743b7da9db3e21322ea75af1878c0",
6592
7146
  "tag": "MY-NFT",
6593
7147
  "immutableMetadata": {
6594
7148
  "docName": "bill-of-lading",
@@ -6894,7 +7448,6 @@
6894
7448
  "examples": {
6895
7449
  "nftTransferExample": {
6896
7450
  "value": {
6897
- "recipientIdentity": "did:iota:tst:0x85ef62ea94fc4eeeeeddf6acc3b566e988e613081d0b93cc54ed831ed4c18d44",
6898
7451
  "recipientAddress": "tst1prctjk5ck0dutnsunnje6u90jk5htx03qznjjmkd6843pzltlgz87srjzzv",
6899
7452
  "metadata": {
6900
7453
  "data": "AAAAA"
@@ -19190,6 +19743,82 @@
19190
19743
  "dateCreated"
19191
19744
  ]
19192
19745
  },
19746
+ "AutomationActionCreateRequest": {
19747
+ "description": "The body parameters for the request.",
19748
+ "type": "object",
19749
+ "properties": {
19750
+ "actionType": {
19751
+ "type": "string",
19752
+ "description": "The type of the automation action."
19753
+ },
19754
+ "trigger": {
19755
+ "type": "string",
19756
+ "description": "The trigger of the automation action."
19757
+ },
19758
+ "configuration": {
19759
+ "description": "The configuration of the automation action."
19760
+ }
19761
+ },
19762
+ "required": [
19763
+ "actionType",
19764
+ "trigger"
19765
+ ]
19766
+ },
19767
+ "AutomationActionEntry": {
19768
+ "description": "Interface describing an automation action entry.",
19769
+ "type": "object",
19770
+ "properties": {
19771
+ "id": {
19772
+ "type": "string",
19773
+ "description": "The id of the automation action."
19774
+ },
19775
+ "actionType": {
19776
+ "type": "string",
19777
+ "description": "The type of the automation action."
19778
+ },
19779
+ "trigger": {
19780
+ "type": "string",
19781
+ "description": "The trigger of the automation action."
19782
+ },
19783
+ "configuration": {
19784
+ "description": "The configuration of the automation action."
19785
+ }
19786
+ },
19787
+ "required": [
19788
+ "id",
19789
+ "actionType",
19790
+ "trigger"
19791
+ ]
19792
+ },
19793
+ "AutomationActionsQueryResponse": {
19794
+ "type": "object",
19795
+ "properties": {
19796
+ "entries": {
19797
+ "type": "array",
19798
+ "items": {
19799
+ "$ref": "#/components/schemas/AutomationActionEntry"
19800
+ },
19801
+ "description": "List of automation action entries matching the query."
19802
+ },
19803
+ "cursor": {
19804
+ "type": "string",
19805
+ "description": "Optional cursor for pagination."
19806
+ }
19807
+ },
19808
+ "required": [
19809
+ "entries"
19810
+ ],
19811
+ "description": "The body of the response."
19812
+ },
19813
+ "AutomationTriggerRequest": {
19814
+ "type": "object",
19815
+ "properties": {
19816
+ "data": {
19817
+ "description": "Optional data to be passed to the actions."
19818
+ }
19819
+ },
19820
+ "description": "The body parameters."
19821
+ },
19193
19822
  "BlobStorageCreateRequest": {
19194
19823
  "type": "object",
19195
19824
  "properties": {
@@ -20175,9 +20804,9 @@
20175
20804
  "type": "string",
20176
20805
  "description": "The issuer of the NFT."
20177
20806
  },
20178
- "owner": {
20807
+ "issuerIdentityId": {
20179
20808
  "type": "string",
20180
- "description": "The owner of the NFT."
20809
+ "description": "The on-chain Object ID of the verified IOTA Identity that minted this NFT.\nEmpty string when not minted with identity verification."
20181
20810
  },
20182
20811
  "tag": {
20183
20812
  "type": "string",
@@ -20192,7 +20821,7 @@
20192
20821
  },
20193
20822
  "required": [
20194
20823
  "issuer",
20195
- "owner",
20824
+ "issuerIdentityId",
20196
20825
  "tag"
20197
20826
  ],
20198
20827
  "description": "The data that was resolved."
@@ -20200,10 +20829,6 @@
20200
20829
  "NftTransferRequest": {
20201
20830
  "type": "object",
20202
20831
  "properties": {
20203
- "recipientIdentity": {
20204
- "type": "string",
20205
- "description": "The recipient identity for the NFT."
20206
- },
20207
20832
  "recipientAddress": {
20208
20833
  "type": "string",
20209
20834
  "description": "The recipient address for the NFT."
@@ -20213,7 +20838,6 @@
20213
20838
  }
20214
20839
  },
20215
20840
  "required": [
20216
- "recipientIdentity",
20217
20841
  "recipientAddress"
20218
20842
  ],
20219
20843
  "description": "The data to be used in the transfer."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/node",
3
- "version": "0.0.3-next.32",
3
+ "version": "0.0.3-next.33",
4
4
  "description": "TWIN Node serving APIs using the specified configuration",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,7 +14,7 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/node-core": "0.0.3-next.32"
17
+ "@twin.org/node-core": "0.0.3-next.33"
18
18
  },
19
19
  "bugs": {
20
20
  "url": "git+https://github.com/twinfoundation/node/issues"