Skip to content

Commit ae155ed

Browse files
Merge pull request #86 from objectstack-ai/copilot/add-notification-action-types
2 parents c636886 + 121911c commit ae155ed

21 files changed

+2060
-22
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: CustomScriptAction
3+
description: CustomScriptAction Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Action name |
11+
| **type** | `string` || |
12+
| **language** | `Enum<'javascript' \| 'typescript' \| 'python'>` | optional | Script language |
13+
| **code** | `string` || Script code to execute |
14+
| **timeout** | `number` | optional | Execution timeout in milliseconds |
15+
| **context** | `Record<string, any>` | optional | Additional context variables |
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: HttpCallAction
3+
description: HttpCallAction Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Action name |
11+
| **type** | `string` || |
12+
| **url** | `string` || Target URL |
13+
| **method** | `Enum<'GET' \| 'POST' \| 'PUT' \| 'PATCH' \| 'DELETE'>` || HTTP method |
14+
| **headers** | `Record<string, string>` | optional | Request headers |
15+
| **body** | `any` | optional | Request body (object/string) |
16+
| **authentication** | `object` | optional | Authentication configuration |
17+
| **timeout** | `number` | optional | Request timeout in milliseconds |
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: PushNotificationAction
3+
description: PushNotificationAction Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Action name |
11+
| **type** | `string` || |
12+
| **title** | `string` || Notification title |
13+
| **body** | `string` || Notification body text |
14+
| **recipients** | `string[]` || User IDs or device tokens |
15+
| **data** | `Record<string, any>` | optional | Additional data payload |
16+
| **badge** | `number` | optional | Badge count (iOS) |
17+
| **sound** | `string` | optional | Notification sound |
18+
| **clickAction** | `string` | optional | Action/URL when notification is clicked |
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: SlackMessageAction
3+
description: SlackMessageAction Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Action name |
11+
| **type** | `string` || |
12+
| **channel** | `string` || Slack channel ID or name (#channel) |
13+
| **message** | `string` || Message text with optional markdown |
14+
| **mentions** | `string[]` | optional | User IDs or @username to mention |
15+
| **threadId** | `string` | optional | Thread ID for replies |
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: SmsNotificationAction
3+
description: SmsNotificationAction Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Action name |
11+
| **type** | `string` || |
12+
| **provider** | `Enum<'twilio' \| 'vonage'>` || SMS provider |
13+
| **recipients** | `string[]` || List of phone numbers or user field references |
14+
| **message** | `string` || SMS message text or template |
15+
| **fromNumber** | `string` | optional | Sender phone number (provider-specific) |
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: TaskCreationAction
3+
description: TaskCreationAction Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Action name |
11+
| **type** | `string` || |
12+
| **taskObject** | `string` || Task object name (e.g., "task", "project_task") |
13+
| **subject** | `string` || Task subject/title |
14+
| **description** | `string` | optional | Task description |
15+
| **assignedTo** | `string` | optional | User ID or field reference for assignee |
16+
| **dueDate** | `string` | optional | Due date (ISO string or formula) |
17+
| **priority** | `string` | optional | Task priority |
18+
| **relatedTo** | `string` | optional | Related record ID or field reference |
19+
| **additionalFields** | `Record<string, any>` | optional | Additional custom fields |
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: TeamsMessageAction
3+
description: TeamsMessageAction Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Action name |
11+
| **type** | `string` || |
12+
| **channel** | `string` || Teams channel ID |
13+
| **message** | `string` || Message text with optional markdown |
14+
| **mentions** | `string[]` | optional | User IDs to mention |
15+
| **teamId** | `string` | optional | Team ID (if not in default team) |
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: WebhookTriggerAction
3+
description: WebhookTriggerAction Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Action name |
11+
| **type** | `string` || |
12+
| **url** | `string` || Webhook URL to call |
13+
| **method** | `Enum<'POST' \| 'PUT'>` | optional | HTTP method |
14+
| **headers** | `Record<string, string>` | optional | Custom headers |
15+
| **payload** | `any` | optional | Webhook payload (uses record data if not specified) |
16+
| **retryOnFailure** | `boolean` | optional | Retry if webhook fails |
17+
| **maxRetries** | `number` | optional | Maximum retry attempts |

content/docs/references/data/automation/WorkflowRule.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ description: WorkflowRule Schema Reference
1111
| **objectName** | `string` || Target Object |
1212
| **triggerType** | `Enum<'on_create' \| 'on_update' \| 'on_create_or_update' \| 'on_delete' \| 'schedule'>` || When to evaluate |
1313
| **criteria** | `string` | optional | Formula condition. If TRUE, actions execute. |
14-
| **actions** | `object \| object \| object[]` | optional | Immediate actions |
14+
| **actions** | `object \| object \| object \| object \| object \| object \| object \| object \| object \| object[]` | optional | Immediate actions |
1515
| **active** | `boolean` | optional | Whether this workflow is active |
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"$ref": "#/definitions/CustomScriptAction",
3+
"definitions": {
4+
"CustomScriptAction": {
5+
"type": "object",
6+
"properties": {
7+
"name": {
8+
"type": "string",
9+
"description": "Action name"
10+
},
11+
"type": {
12+
"type": "string",
13+
"const": "custom_script"
14+
},
15+
"language": {
16+
"type": "string",
17+
"enum": [
18+
"javascript",
19+
"typescript",
20+
"python"
21+
],
22+
"default": "javascript",
23+
"description": "Script language"
24+
},
25+
"code": {
26+
"type": "string",
27+
"description": "Script code to execute"
28+
},
29+
"timeout": {
30+
"type": "number",
31+
"default": 30000,
32+
"description": "Execution timeout in milliseconds"
33+
},
34+
"context": {
35+
"type": "object",
36+
"additionalProperties": {},
37+
"description": "Additional context variables"
38+
}
39+
},
40+
"required": [
41+
"name",
42+
"type",
43+
"code"
44+
],
45+
"additionalProperties": false
46+
}
47+
},
48+
"$schema": "http://json-schema.org/draft-07/schema#"
49+
}

0 commit comments

Comments
 (0)