@twin.org/automation-models 0.0.3-next.5 → 0.9.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.
@@ -1 +1 @@
1
- {"version":3,"file":"IAutomationComponent.js","sourceRoot":"","sources":["../../../src/models/IAutomationComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IAutomationActionEntry } from \"./IAutomationActionEntry.js\";\n\n/**\n * Interface describing an automation contract.\n */\nexport interface IAutomationComponent extends IComponent {\n\t/**\n\t * Create an action with the trigger and configuration.\n\t * @param actionType The type of action to create.\n\t * @param trigger The trigger to create the action for.\n\t * @param config Configuration to be passed to the actions.\n\t * @returns The id of the created action.\n\t */\n\tactionCreate(actionType: string, trigger: string, config?: unknown): Promise<string>;\n\n\t/**\n\t * Remove an action by it's id.\n\t * @param actionId The id of the action to remove.\n\t * @returns Nothing.\n\t */\n\tactionRemove(actionId: string): Promise<void>;\n\n\t/**\n\t * Get an action by it's id.\n\t * @param actionId The id of the action to get.\n\t * @returns The action with the given id.\n\t */\n\tactionGet(actionId: string): Promise<IAutomationActionEntry>;\n\n\t/**\n\t * Query the actions with the given parameters.\n\t * @param options The options to query the actions with.\n\t * @param options.trigger The trigger to query the actions for.\n\t * @param options.actionType The type of action to query for.\n\t * @param cursor The cursor to continue the query from.\n\t * @param limit The maximum number of actions to return.\n\t * @returns The actions matching the query and a cursor to continue the query if there are more results.\n\t */\n\tactionsQuery(\n\t\toptions:\n\t\t\t| {\n\t\t\t\t\ttrigger?: string;\n\t\t\t\t\tactionType?: string;\n\t\t\t }\n\t\t\t| undefined,\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{\n\t\tentries: IAutomationActionEntry[];\n\t\tcursor?: string;\n\t}>;\n\n\t/**\n\t * Locate automation actions which match the given trigger and execute them.\n\t * @param trigger The trigger to find the actions for.\n\t * @param data Optional data to be passed to the actions.\n\t * @returns Nothing.\n\t */\n\ttrigger(trigger: string, data?: unknown): Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"IAutomationComponent.js","sourceRoot":"","sources":["../../../src/models/IAutomationComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IAutomationActionEntry } from \"./IAutomationActionEntry.js\";\n\n/**\n * Interface describing an automation contract.\n */\nexport interface IAutomationComponent extends IComponent {\n\t/**\n\t * Create an action with the trigger and configuration.\n\t * @param actionType The type of action to create.\n\t * @param trigger The trigger to create the action for.\n\t * @param config Configuration to be passed to the actions.\n\t * @returns The id of the created action.\n\t */\n\tactionCreate(actionType: string, trigger: string, config?: unknown): Promise<string>;\n\n\t/**\n\t * Remove an action by its id.\n\t * @param actionId The id of the action to remove.\n\t * @returns A promise that resolves when the action is removed.\n\t */\n\tactionRemove(actionId: string): Promise<void>;\n\n\t/**\n\t * Get an action by its id.\n\t * @param actionId The id of the action to get.\n\t * @returns The action with the given id.\n\t */\n\tactionGet(actionId: string): Promise<IAutomationActionEntry>;\n\n\t/**\n\t * Query the actions with the given parameters.\n\t * @param options The options to query the actions with.\n\t * @param options.trigger The trigger to query the actions for.\n\t * @param options.actionType The type of action to query for.\n\t * @param cursor The cursor to continue the query from.\n\t * @param limit The maximum number of actions to return.\n\t * @returns The actions matching the query and a cursor to continue the query if there are more results.\n\t */\n\tactionsQuery(\n\t\toptions:\n\t\t\t| {\n\t\t\t\t\ttrigger?: string;\n\t\t\t\t\tactionType?: string;\n\t\t\t }\n\t\t\t| undefined,\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{\n\t\tentries: IAutomationActionEntry[];\n\t\tcursor?: string;\n\t}>;\n\n\t/**\n\t * Locate automation actions which match the given trigger and execute them.\n\t * @param trigger The trigger to find the actions for.\n\t * @param data Optional data to be passed to the actions.\n\t * @returns A promise that resolves when all matching actions have executed.\n\t */\n\ttrigger(trigger: string, data?: unknown): Promise<void>;\n}\n"]}
@@ -13,13 +13,13 @@ export interface IAutomationComponent extends IComponent {
13
13
  */
14
14
  actionCreate(actionType: string, trigger: string, config?: unknown): Promise<string>;
15
15
  /**
16
- * Remove an action by it's id.
16
+ * Remove an action by its id.
17
17
  * @param actionId The id of the action to remove.
18
- * @returns Nothing.
18
+ * @returns A promise that resolves when the action is removed.
19
19
  */
20
20
  actionRemove(actionId: string): Promise<void>;
21
21
  /**
22
- * Get an action by it's id.
22
+ * Get an action by its id.
23
23
  * @param actionId The id of the action to get.
24
24
  * @returns The action with the given id.
25
25
  */
@@ -44,7 +44,7 @@ export interface IAutomationComponent extends IComponent {
44
44
  * Locate automation actions which match the given trigger and execute them.
45
45
  * @param trigger The trigger to find the actions for.
46
46
  * @param data Optional data to be passed to the actions.
47
- * @returns Nothing.
47
+ * @returns A promise that resolves when all matching actions have executed.
48
48
  */
49
49
  trigger(trigger: string, data?: unknown): Promise<void>;
50
50
  }
package/docs/changelog.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.9.0](https://github.com/iotaledger/twin-automation/compare/automation-models-v0.9.0...automation-models-v0.9.0) (2026-06-24)
4
+
5
+
6
+ ### Features
7
+
8
+ * initial commit ([33ddc12](https://github.com/iotaledger/twin-automation/commit/33ddc12869db11b7f861967f820ac4d5b00dbca2))
9
+ * release to production ([#15](https://github.com/iotaledger/twin-automation/issues/15)) ([fe4baa4](https://github.com/iotaledger/twin-automation/commit/fe4baa495825852b93dab09d5c2b8f7c10899542))
10
+
11
+ ## [0.9.0-next.1](https://github.com/iotaledger/twin-automation/compare/automation-models-v0.9.0-next.0...automation-models-v0.9.0-next.1) (2026-06-23)
12
+
13
+
14
+ ### Features
15
+
16
+ * initial commit ([33ddc12](https://github.com/iotaledger/twin-automation/commit/33ddc12869db11b7f861967f820ac4d5b00dbca2))
17
+ * typescript 6 update ([ee77cab](https://github.com/iotaledger/twin-automation/commit/ee77cab770cd3d2aff6192f146b4b5544c206d52))
18
+ * update dependencies ([e299490](https://github.com/iotaledger/twin-automation/commit/e299490b7dfe3d847a3beb254a609883caec2c98))
19
+
3
20
  ## [0.0.3-next.5](https://github.com/iotaledger/twin-automation/compare/automation-models-v0.0.3-next.4...automation-models-v0.0.3-next.5) (2026-06-11)
4
21
 
5
22
 
@@ -46,7 +46,7 @@ The id of the created action.
46
46
 
47
47
  > **actionRemove**(`actionId`): `Promise`\<`void`\>
48
48
 
49
- Remove an action by it's id.
49
+ Remove an action by its id.
50
50
 
51
51
  #### Parameters
52
52
 
@@ -60,7 +60,7 @@ The id of the action to remove.
60
60
 
61
61
  `Promise`\<`void`\>
62
62
 
63
- Nothing.
63
+ A promise that resolves when the action is removed.
64
64
 
65
65
  ***
66
66
 
@@ -68,7 +68,7 @@ Nothing.
68
68
 
69
69
  > **actionGet**(`actionId`): `Promise`\<[`IAutomationActionEntry`](IAutomationActionEntry.md)\>
70
70
 
71
- Get an action by it's id.
71
+ Get an action by its id.
72
72
 
73
73
  #### Parameters
74
74
 
@@ -166,4 +166,4 @@ Optional data to be passed to the actions.
166
166
 
167
167
  `Promise`\<`void`\>
168
168
 
169
- Nothing.
169
+ A promise that resolves when all matching actions have executed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/automation-models",
3
- "version": "0.0.3-next.5",
3
+ "version": "0.9.0",
4
4
  "description": "Shared data models for automation. Provides a consistent foundation for representing automation entities and enables other packages to build upon a reliable base.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,8 +14,8 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/core": "next",
18
- "@twin.org/nameof": "next"
17
+ "@twin.org/core": "^0.9.0",
18
+ "@twin.org/nameof": "^0.9.0"
19
19
  },
20
20
  "main": "./dist/es/index.js",
21
21
  "types": "./dist/types/index.d.ts",