digital-tools 2.1.3 → 2.3.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/CHANGELOG.md +9 -0
- package/README.md +2 -0
- package/dist/client.d.ts +109 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +69 -0
- package/dist/client.js.map +1 -0
- package/dist/define.d.ts +2 -2
- package/dist/define.d.ts.map +1 -1
- package/dist/define.js +21 -11
- package/dist/define.js.map +1 -1
- package/dist/function-ref.d.ts +229 -0
- package/dist/function-ref.d.ts.map +1 -0
- package/dist/function-ref.js +28 -0
- package/dist/function-ref.js.map +1 -0
- package/dist/function-sugar.d.ts +57 -0
- package/dist/function-sugar.d.ts.map +1 -0
- package/dist/function-sugar.js +79 -0
- package/dist/function-sugar.js.map +1 -0
- package/dist/index.d.ts +10 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -4
- package/dist/index.js.map +1 -1
- package/dist/providers/analytics/mixpanel.d.ts.map +1 -1
- package/dist/providers/analytics/mixpanel.js +21 -18
- package/dist/providers/analytics/mixpanel.js.map +1 -1
- package/dist/providers/calendar/cal-com.d.ts.map +1 -1
- package/dist/providers/calendar/cal-com.js +10 -10
- package/dist/providers/calendar/cal-com.js.map +1 -1
- package/dist/providers/calendar/google-calendar.d.ts.map +1 -1
- package/dist/providers/calendar/google-calendar.js +4 -4
- package/dist/providers/calendar/google-calendar.js.map +1 -1
- package/dist/providers/crm/hubspot.d.ts.map +1 -1
- package/dist/providers/crm/hubspot.js +107 -85
- package/dist/providers/crm/hubspot.js.map +1 -1
- package/dist/providers/development/github.d.ts.map +1 -1
- package/dist/providers/development/github.js +40 -43
- package/dist/providers/development/github.js.map +1 -1
- package/dist/providers/ecommerce/shopify.d.ts.map +1 -1
- package/dist/providers/ecommerce/shopify.js +79 -62
- package/dist/providers/ecommerce/shopify.js.map +1 -1
- package/dist/providers/email/resend.d.ts.map +1 -1
- package/dist/providers/email/resend.js +20 -16
- package/dist/providers/email/resend.js.map +1 -1
- package/dist/providers/email/sendgrid.d.ts.map +1 -1
- package/dist/providers/email/sendgrid.js +12 -9
- package/dist/providers/email/sendgrid.js.map +1 -1
- package/dist/providers/finance/stripe.d.ts.map +1 -1
- package/dist/providers/finance/stripe.js +44 -42
- package/dist/providers/finance/stripe.js.map +1 -1
- package/dist/providers/forms/typeform.d.ts.map +1 -1
- package/dist/providers/forms/typeform.js +68 -58
- package/dist/providers/forms/typeform.js.map +1 -1
- package/dist/providers/knowledge/notion.d.ts.map +1 -1
- package/dist/providers/knowledge/notion.js +75 -41
- package/dist/providers/knowledge/notion.js.map +1 -1
- package/dist/providers/marketing/mailchimp.d.ts.map +1 -1
- package/dist/providers/marketing/mailchimp.js +74 -61
- package/dist/providers/marketing/mailchimp.js.map +1 -1
- package/dist/providers/media/cloudinary.d.ts.map +1 -1
- package/dist/providers/media/cloudinary.js +30 -28
- package/dist/providers/media/cloudinary.js.map +1 -1
- package/dist/providers/messaging/slack.d.ts.map +1 -1
- package/dist/providers/messaging/slack.js +75 -58
- package/dist/providers/messaging/slack.js.map +1 -1
- package/dist/providers/messaging/twilio-sms.d.ts.map +1 -1
- package/dist/providers/messaging/twilio-sms.js +33 -15
- package/dist/providers/messaging/twilio-sms.js.map +1 -1
- package/dist/providers/project-management/linear.d.ts.map +1 -1
- package/dist/providers/project-management/linear.js +31 -27
- package/dist/providers/project-management/linear.js.map +1 -1
- package/dist/providers/spreadsheet/google-sheets.d.ts.map +1 -1
- package/dist/providers/spreadsheet/google-sheets.js +21 -18
- package/dist/providers/spreadsheet/google-sheets.js.map +1 -1
- package/dist/providers/spreadsheet/xlsx.d.ts.map +1 -1
- package/dist/providers/spreadsheet/xlsx.js +4 -4
- package/dist/providers/spreadsheet/xlsx.js.map +1 -1
- package/dist/providers/storage/index.js +1 -0
- package/dist/providers/storage/index.js.map +1 -1
- package/dist/providers/storage/s3.d.ts.map +1 -1
- package/dist/providers/storage/s3.js +36 -27
- package/dist/providers/storage/s3.js.map +1 -1
- package/dist/providers/support/zendesk.d.ts.map +1 -1
- package/dist/providers/support/zendesk.js +24 -25
- package/dist/providers/support/zendesk.js.map +1 -1
- package/dist/providers/tasks/todoist.d.ts.map +1 -1
- package/dist/providers/tasks/todoist.js +18 -18
- package/dist/providers/tasks/todoist.js.map +1 -1
- package/dist/providers/video-conferencing/google-meet.d.ts.map +1 -1
- package/dist/providers/video-conferencing/google-meet.js +11 -11
- package/dist/providers/video-conferencing/google-meet.js.map +1 -1
- package/dist/providers/video-conferencing/jitsi.js +14 -14
- package/dist/providers/video-conferencing/jitsi.js.map +1 -1
- package/dist/providers/video-conferencing/teams.d.ts.map +1 -1
- package/dist/providers/video-conferencing/teams.js +9 -7
- package/dist/providers/video-conferencing/teams.js.map +1 -1
- package/dist/providers/video-conferencing/zoom.d.ts.map +1 -1
- package/dist/providers/video-conferencing/zoom.js +26 -24
- package/dist/providers/video-conferencing/zoom.js.map +1 -1
- package/dist/tools/data.d.ts.map +1 -1
- package/dist/tools/data.js +5 -12
- package/dist/tools/data.js.map +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/system.d.ts +289 -0
- package/dist/tools/system.d.ts.map +1 -0
- package/dist/tools/system.js +752 -0
- package/dist/tools/system.js.map +1 -0
- package/dist/tools/web.d.ts.map +1 -1
- package/dist/tools/web.js +22 -10
- package/dist/tools/web.js.map +1 -1
- package/dist/track-record.d.ts +101 -0
- package/dist/track-record.d.ts.map +1 -0
- package/dist/track-record.js +17 -0
- package/dist/track-record.js.map +1 -0
- package/dist/types.d.ts +210 -9
- package/dist/types.d.ts.map +1 -1
- package/dist/verb-registration.d.ts +122 -0
- package/dist/verb-registration.d.ts.map +1 -0
- package/dist/verb-registration.js +176 -0
- package/dist/verb-registration.js.map +1 -0
- package/dist/worker.d.ts +93 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +315 -0
- package/dist/worker.js.map +1 -0
- package/dist/wrap.d.ts +89 -0
- package/dist/wrap.d.ts.map +1 -0
- package/dist/wrap.js +225 -0
- package/dist/wrap.js.map +1 -0
- package/package.json +31 -14
- package/src/client.ts +136 -0
- package/src/define.ts +30 -24
- package/src/function-ref.ts +264 -0
- package/src/function-sugar.ts +134 -0
- package/src/index.ts +132 -10
- package/src/providers/analytics/mixpanel.ts +19 -18
- package/src/providers/calendar/cal-com.ts +29 -18
- package/src/providers/calendar/google-calendar.ts +20 -14
- package/src/providers/crm/hubspot.ts +225 -99
- package/src/providers/development/github.ts +206 -135
- package/src/providers/ecommerce/shopify.ts +250 -89
- package/src/providers/email/resend.ts +101 -28
- package/src/providers/email/sendgrid.ts +12 -9
- package/src/providers/finance/stripe.ts +128 -49
- package/src/providers/forms/typeform.ts +74 -58
- package/src/providers/knowledge/notion.ts +340 -88
- package/src/providers/marketing/mailchimp.ts +86 -70
- package/src/providers/media/cloudinary.ts +99 -41
- package/src/providers/messaging/slack.ts +283 -85
- package/src/providers/messaging/twilio-sms.ts +35 -15
- package/src/providers/project-management/linear.ts +143 -55
- package/src/providers/spreadsheet/google-sheets.ts +222 -56
- package/src/providers/spreadsheet/xlsx.ts +47 -16
- package/src/providers/storage/s3.ts +119 -47
- package/src/providers/support/zendesk.ts +196 -46
- package/src/providers/tasks/todoist.ts +20 -26
- package/src/providers/video-conferencing/google-meet.ts +17 -20
- package/src/providers/video-conferencing/jitsi.ts +14 -14
- package/src/providers/video-conferencing/teams.ts +14 -13
- package/src/providers/video-conferencing/zoom.ts +54 -49
- package/src/tools/data.ts +6 -16
- package/src/tools/index.ts +1 -0
- package/src/tools/system.ts +887 -0
- package/src/tools/web.ts +22 -10
- package/src/track-record.ts +106 -0
- package/src/types.ts +241 -13
- package/src/verb-registration.ts +197 -0
- package/src/worker.ts +370 -0
- package/src/wrap.ts +260 -0
- package/test/client.test.ts +146 -0
- package/test/communication-tools-extended.test.ts +734 -0
- package/test/data-tools-extended.test.ts +743 -0
- package/test/define-extended.test.ts +819 -0
- package/test/define.test.ts +150 -41
- package/test/entities.test.ts +623 -0
- package/test/extended-entities.test.ts +1228 -0
- package/test/provider-implementations.test.ts +725 -0
- package/test/provider-registry-extended.test.ts +583 -0
- package/test/providers/google-sheets.test.ts +851 -0
- package/test/providers/helpers.ts +554 -0
- package/test/providers/hubspot.test.ts +576 -0
- package/test/providers/slack.test.ts +932 -0
- package/test/providers/stripe.test.ts +701 -0
- package/test/providers.test.ts +578 -0
- package/test/system-tools-extended.test.ts +632 -0
- package/test/system.test.ts +673 -0
- package/test/tools.test.ts +15 -11
- package/test/types.test.ts +402 -0
- package/test/verb-registration.test.ts +395 -0
- package/test/web-tools.test.ts +553 -0
- package/test/worker-extended.test.ts +699 -0
- package/test/worker.test.ts +576 -0
- package/test/wrap.test.ts +366 -0
- package/tsconfig.json +3 -13
- package/vitest.config.ts +37 -0
- package/wrangler.jsonc +9 -0
- package/.turbo/turbo-build.log +0 -4
- package/LICENSE +0 -21
- package/dist/providers/voice/vapi.d.ts +0 -27
- package/dist/providers/voice/vapi.d.ts.map +0 -1
- package/dist/providers/voice/vapi.js +0 -440
- package/dist/providers/voice/vapi.js.map +0 -1
- package/src/define.js +0 -259
- package/src/entities/advertising.js +0 -999
- package/src/entities/ai.js +0 -756
- package/src/entities/analytics.js +0 -1588
- package/src/entities/automation.js +0 -601
- package/src/entities/communication.js +0 -1150
- package/src/entities/crm.js +0 -1386
- package/src/entities/design.js +0 -546
- package/src/entities/development.js +0 -2212
- package/src/entities/document.js +0 -874
- package/src/entities/ecommerce.js +0 -1429
- package/src/entities/experiment.js +0 -1039
- package/src/entities/finance.js +0 -3478
- package/src/entities/forms.js +0 -1892
- package/src/entities/hr.js +0 -661
- package/src/entities/identity.js +0 -997
- package/src/entities/index.js +0 -282
- package/src/entities/infrastructure.js +0 -1153
- package/src/entities/knowledge.js +0 -1438
- package/src/entities/marketing.js +0 -1610
- package/src/entities/media.js +0 -1634
- package/src/entities/notification.js +0 -1199
- package/src/entities/presentation.js +0 -1274
- package/src/entities/productivity.js +0 -1317
- package/src/entities/project-management.js +0 -1136
- package/src/entities/recruiting.js +0 -736
- package/src/entities/shipping.js +0 -509
- package/src/entities/signature.js +0 -1102
- package/src/entities/site.js +0 -222
- package/src/entities/spreadsheet.js +0 -1341
- package/src/entities/storage.js +0 -1198
- package/src/entities/support.js +0 -1166
- package/src/entities/video-conferencing.js +0 -1750
- package/src/entities/video.js +0 -950
- package/src/entities.js +0 -1663
- package/src/index.js +0 -74
- package/src/providers/analytics/index.js +0 -17
- package/src/providers/analytics/mixpanel.js +0 -255
- package/src/providers/calendar/cal-com.js +0 -303
- package/src/providers/calendar/google-calendar.js +0 -335
- package/src/providers/calendar/index.js +0 -20
- package/src/providers/crm/hubspot.js +0 -566
- package/src/providers/crm/index.js +0 -17
- package/src/providers/development/github.js +0 -472
- package/src/providers/development/index.js +0 -17
- package/src/providers/ecommerce/index.js +0 -17
- package/src/providers/ecommerce/shopify.js +0 -378
- package/src/providers/email/index.js +0 -20
- package/src/providers/email/resend.js +0 -258
- package/src/providers/email/sendgrid.js +0 -161
- package/src/providers/finance/index.js +0 -17
- package/src/providers/finance/stripe.js +0 -549
- package/src/providers/forms/index.js +0 -17
- package/src/providers/forms/typeform.js +0 -500
- package/src/providers/index.js +0 -123
- package/src/providers/knowledge/index.js +0 -17
- package/src/providers/knowledge/notion.js +0 -389
- package/src/providers/marketing/index.js +0 -17
- package/src/providers/marketing/mailchimp.js +0 -443
- package/src/providers/media/cloudinary.js +0 -318
- package/src/providers/media/index.js +0 -17
- package/src/providers/messaging/index.js +0 -20
- package/src/providers/messaging/slack.js +0 -393
- package/src/providers/messaging/twilio-sms.js +0 -249
- package/src/providers/project-management/index.js +0 -17
- package/src/providers/project-management/linear.js +0 -575
- package/src/providers/registry.js +0 -86
- package/src/providers/spreadsheet/google-sheets.js +0 -375
- package/src/providers/spreadsheet/index.js +0 -20
- package/src/providers/spreadsheet/xlsx.js +0 -423
- package/src/providers/storage/index.js +0 -24
- package/src/providers/storage/s3.js +0 -419
- package/src/providers/support/index.js +0 -17
- package/src/providers/support/zendesk.js +0 -373
- package/src/providers/tasks/index.js +0 -17
- package/src/providers/tasks/todoist.js +0 -286
- package/src/providers/types.js +0 -9
- package/src/providers/video-conferencing/google-meet.js +0 -286
- package/src/providers/video-conferencing/index.js +0 -31
- package/src/providers/video-conferencing/jitsi.js +0 -254
- package/src/providers/video-conferencing/teams.js +0 -270
- package/src/providers/video-conferencing/zoom.js +0 -332
- package/src/registry.js +0 -128
- package/src/tools/communication.js +0 -184
- package/src/tools/data.js +0 -205
- package/src/tools/index.js +0 -11
- package/src/tools/web.js +0 -137
- package/src/types.js +0 -10
- package/test/define.test.js +0 -306
- package/test/registry.test.js +0 -357
- package/test/tools.test.js +0 -363
|
@@ -1,601 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Automation Entity Types (Nouns)
|
|
3
|
-
*
|
|
4
|
-
* Workflow automation entities for triggers, actions,
|
|
5
|
-
* workflows, and integrations (Zapier, n8n, Make, etc.).
|
|
6
|
-
*
|
|
7
|
-
* @packageDocumentation
|
|
8
|
-
*/
|
|
9
|
-
// =============================================================================
|
|
10
|
-
// Workflow
|
|
11
|
-
// =============================================================================
|
|
12
|
-
/**
|
|
13
|
-
* Workflow entity (Automation)
|
|
14
|
-
*
|
|
15
|
-
* Represents an automated workflow.
|
|
16
|
-
*/
|
|
17
|
-
export const AutomationWorkflow = {
|
|
18
|
-
singular: 'automation-workflow',
|
|
19
|
-
plural: 'automation-workflows',
|
|
20
|
-
description: 'An automated workflow',
|
|
21
|
-
properties: {
|
|
22
|
-
// Identity
|
|
23
|
-
name: {
|
|
24
|
-
type: 'string',
|
|
25
|
-
description: 'Workflow name',
|
|
26
|
-
},
|
|
27
|
-
description: {
|
|
28
|
-
type: 'string',
|
|
29
|
-
optional: true,
|
|
30
|
-
description: 'Workflow description',
|
|
31
|
-
},
|
|
32
|
-
// Status
|
|
33
|
-
status: {
|
|
34
|
-
type: 'string',
|
|
35
|
-
description: 'Workflow status',
|
|
36
|
-
examples: ['draft', 'active', 'paused', 'error', 'archived'],
|
|
37
|
-
},
|
|
38
|
-
isActive: {
|
|
39
|
-
type: 'boolean',
|
|
40
|
-
description: 'Whether workflow is active',
|
|
41
|
-
},
|
|
42
|
-
// Configuration
|
|
43
|
-
triggerType: {
|
|
44
|
-
type: 'string',
|
|
45
|
-
description: 'Type of trigger',
|
|
46
|
-
examples: ['webhook', 'schedule', 'event', 'manual', 'app'],
|
|
47
|
-
},
|
|
48
|
-
triggerConfig: {
|
|
49
|
-
type: 'json',
|
|
50
|
-
optional: true,
|
|
51
|
-
description: 'Trigger configuration',
|
|
52
|
-
},
|
|
53
|
-
// Execution
|
|
54
|
-
lastRunAt: {
|
|
55
|
-
type: 'datetime',
|
|
56
|
-
optional: true,
|
|
57
|
-
description: 'Last execution time',
|
|
58
|
-
},
|
|
59
|
-
lastRunStatus: {
|
|
60
|
-
type: 'string',
|
|
61
|
-
optional: true,
|
|
62
|
-
description: 'Last run status',
|
|
63
|
-
},
|
|
64
|
-
runCount: {
|
|
65
|
-
type: 'number',
|
|
66
|
-
optional: true,
|
|
67
|
-
description: 'Total run count',
|
|
68
|
-
},
|
|
69
|
-
successCount: {
|
|
70
|
-
type: 'number',
|
|
71
|
-
optional: true,
|
|
72
|
-
description: 'Successful runs',
|
|
73
|
-
},
|
|
74
|
-
errorCount: {
|
|
75
|
-
type: 'number',
|
|
76
|
-
optional: true,
|
|
77
|
-
description: 'Failed runs',
|
|
78
|
-
},
|
|
79
|
-
// Settings
|
|
80
|
-
retryOnFailure: {
|
|
81
|
-
type: 'boolean',
|
|
82
|
-
optional: true,
|
|
83
|
-
description: 'Retry on failure',
|
|
84
|
-
},
|
|
85
|
-
maxRetries: {
|
|
86
|
-
type: 'number',
|
|
87
|
-
optional: true,
|
|
88
|
-
description: 'Max retry attempts',
|
|
89
|
-
},
|
|
90
|
-
timeout: {
|
|
91
|
-
type: 'number',
|
|
92
|
-
optional: true,
|
|
93
|
-
description: 'Timeout in seconds',
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
relationships: {
|
|
97
|
-
triggers: {
|
|
98
|
-
type: 'Trigger[]',
|
|
99
|
-
description: 'Workflow triggers',
|
|
100
|
-
},
|
|
101
|
-
actions: {
|
|
102
|
-
type: 'Action[]',
|
|
103
|
-
description: 'Workflow actions',
|
|
104
|
-
},
|
|
105
|
-
runs: {
|
|
106
|
-
type: 'WorkflowRun[]',
|
|
107
|
-
description: 'Execution history',
|
|
108
|
-
},
|
|
109
|
-
owner: {
|
|
110
|
-
type: 'User',
|
|
111
|
-
description: 'Workflow owner',
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
actions: [
|
|
115
|
-
'create',
|
|
116
|
-
'update',
|
|
117
|
-
'activate',
|
|
118
|
-
'pause',
|
|
119
|
-
'archive',
|
|
120
|
-
'duplicate',
|
|
121
|
-
'run',
|
|
122
|
-
'test',
|
|
123
|
-
],
|
|
124
|
-
events: [
|
|
125
|
-
'created',
|
|
126
|
-
'updated',
|
|
127
|
-
'activated',
|
|
128
|
-
'paused',
|
|
129
|
-
'archived',
|
|
130
|
-
'duplicated',
|
|
131
|
-
'runStarted',
|
|
132
|
-
'runCompleted',
|
|
133
|
-
'runFailed',
|
|
134
|
-
],
|
|
135
|
-
};
|
|
136
|
-
// =============================================================================
|
|
137
|
-
// Trigger
|
|
138
|
-
// =============================================================================
|
|
139
|
-
/**
|
|
140
|
-
* Trigger entity
|
|
141
|
-
*
|
|
142
|
-
* Represents a workflow trigger.
|
|
143
|
-
*/
|
|
144
|
-
export const Trigger = {
|
|
145
|
-
singular: 'trigger',
|
|
146
|
-
plural: 'triggers',
|
|
147
|
-
description: 'A workflow trigger',
|
|
148
|
-
properties: {
|
|
149
|
-
// Type
|
|
150
|
-
type: {
|
|
151
|
-
type: 'string',
|
|
152
|
-
description: 'Trigger type',
|
|
153
|
-
examples: ['webhook', 'schedule', 'event', 'manual', 'email', 'form'],
|
|
154
|
-
},
|
|
155
|
-
// Configuration
|
|
156
|
-
config: {
|
|
157
|
-
type: 'json',
|
|
158
|
-
optional: true,
|
|
159
|
-
description: 'Trigger configuration',
|
|
160
|
-
},
|
|
161
|
-
// Schedule (for scheduled triggers)
|
|
162
|
-
schedule: {
|
|
163
|
-
type: 'string',
|
|
164
|
-
optional: true,
|
|
165
|
-
description: 'Cron schedule expression',
|
|
166
|
-
},
|
|
167
|
-
timezone: {
|
|
168
|
-
type: 'string',
|
|
169
|
-
optional: true,
|
|
170
|
-
description: 'Schedule timezone',
|
|
171
|
-
},
|
|
172
|
-
// Webhook (for webhook triggers)
|
|
173
|
-
webhookUrl: {
|
|
174
|
-
type: 'url',
|
|
175
|
-
optional: true,
|
|
176
|
-
description: 'Webhook URL',
|
|
177
|
-
},
|
|
178
|
-
webhookSecret: {
|
|
179
|
-
type: 'string',
|
|
180
|
-
optional: true,
|
|
181
|
-
description: 'Webhook secret',
|
|
182
|
-
},
|
|
183
|
-
// Event (for event triggers)
|
|
184
|
-
eventType: {
|
|
185
|
-
type: 'string',
|
|
186
|
-
optional: true,
|
|
187
|
-
description: 'Event type to listen for',
|
|
188
|
-
},
|
|
189
|
-
eventSource: {
|
|
190
|
-
type: 'string',
|
|
191
|
-
optional: true,
|
|
192
|
-
description: 'Event source app',
|
|
193
|
-
},
|
|
194
|
-
// Filters
|
|
195
|
-
filters: {
|
|
196
|
-
type: 'json',
|
|
197
|
-
optional: true,
|
|
198
|
-
description: 'Trigger filters/conditions',
|
|
199
|
-
},
|
|
200
|
-
// Status
|
|
201
|
-
isActive: {
|
|
202
|
-
type: 'boolean',
|
|
203
|
-
description: 'Whether trigger is active',
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
relationships: {
|
|
207
|
-
workflow: {
|
|
208
|
-
type: 'AutomationWorkflow',
|
|
209
|
-
description: 'Parent workflow',
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
actions: [
|
|
213
|
-
'create',
|
|
214
|
-
'update',
|
|
215
|
-
'activate',
|
|
216
|
-
'deactivate',
|
|
217
|
-
'test',
|
|
218
|
-
],
|
|
219
|
-
events: [
|
|
220
|
-
'created',
|
|
221
|
-
'updated',
|
|
222
|
-
'activated',
|
|
223
|
-
'deactivated',
|
|
224
|
-
'fired',
|
|
225
|
-
],
|
|
226
|
-
};
|
|
227
|
-
// =============================================================================
|
|
228
|
-
// Action
|
|
229
|
-
// =============================================================================
|
|
230
|
-
/**
|
|
231
|
-
* Action entity
|
|
232
|
-
*
|
|
233
|
-
* Represents a workflow action/step.
|
|
234
|
-
*/
|
|
235
|
-
export const Action = {
|
|
236
|
-
singular: 'action',
|
|
237
|
-
plural: 'actions',
|
|
238
|
-
description: 'A workflow action or step',
|
|
239
|
-
properties: {
|
|
240
|
-
// Identity
|
|
241
|
-
name: {
|
|
242
|
-
type: 'string',
|
|
243
|
-
optional: true,
|
|
244
|
-
description: 'Action name',
|
|
245
|
-
},
|
|
246
|
-
// Type
|
|
247
|
-
type: {
|
|
248
|
-
type: 'string',
|
|
249
|
-
description: 'Action type',
|
|
250
|
-
examples: ['http', 'email', 'database', 'transform', 'condition', 'loop', 'delay', 'app'],
|
|
251
|
-
},
|
|
252
|
-
app: {
|
|
253
|
-
type: 'string',
|
|
254
|
-
optional: true,
|
|
255
|
-
description: 'App/integration name',
|
|
256
|
-
},
|
|
257
|
-
operation: {
|
|
258
|
-
type: 'string',
|
|
259
|
-
optional: true,
|
|
260
|
-
description: 'Operation to perform',
|
|
261
|
-
},
|
|
262
|
-
// Configuration
|
|
263
|
-
config: {
|
|
264
|
-
type: 'json',
|
|
265
|
-
optional: true,
|
|
266
|
-
description: 'Action configuration',
|
|
267
|
-
},
|
|
268
|
-
inputs: {
|
|
269
|
-
type: 'json',
|
|
270
|
-
optional: true,
|
|
271
|
-
description: 'Input mappings',
|
|
272
|
-
},
|
|
273
|
-
// Position
|
|
274
|
-
order: {
|
|
275
|
-
type: 'number',
|
|
276
|
-
optional: true,
|
|
277
|
-
description: 'Order in workflow',
|
|
278
|
-
},
|
|
279
|
-
// Error handling
|
|
280
|
-
continueOnError: {
|
|
281
|
-
type: 'boolean',
|
|
282
|
-
optional: true,
|
|
283
|
-
description: 'Continue on error',
|
|
284
|
-
},
|
|
285
|
-
retryOnFailure: {
|
|
286
|
-
type: 'boolean',
|
|
287
|
-
optional: true,
|
|
288
|
-
description: 'Retry on failure',
|
|
289
|
-
},
|
|
290
|
-
},
|
|
291
|
-
relationships: {
|
|
292
|
-
workflow: {
|
|
293
|
-
type: 'AutomationWorkflow',
|
|
294
|
-
description: 'Parent workflow',
|
|
295
|
-
},
|
|
296
|
-
nextAction: {
|
|
297
|
-
type: 'Action',
|
|
298
|
-
required: false,
|
|
299
|
-
description: 'Next action',
|
|
300
|
-
},
|
|
301
|
-
},
|
|
302
|
-
actions: [
|
|
303
|
-
'create',
|
|
304
|
-
'update',
|
|
305
|
-
'delete',
|
|
306
|
-
'test',
|
|
307
|
-
'reorder',
|
|
308
|
-
],
|
|
309
|
-
events: [
|
|
310
|
-
'created',
|
|
311
|
-
'updated',
|
|
312
|
-
'deleted',
|
|
313
|
-
'executed',
|
|
314
|
-
'failed',
|
|
315
|
-
],
|
|
316
|
-
};
|
|
317
|
-
// =============================================================================
|
|
318
|
-
// AutomationRun
|
|
319
|
-
// =============================================================================
|
|
320
|
-
/**
|
|
321
|
-
* AutomationRun entity
|
|
322
|
-
*
|
|
323
|
-
* Represents a workflow execution.
|
|
324
|
-
*/
|
|
325
|
-
export const AutomationRun = {
|
|
326
|
-
singular: 'automation-run',
|
|
327
|
-
plural: 'automation-runs',
|
|
328
|
-
description: 'A workflow execution',
|
|
329
|
-
properties: {
|
|
330
|
-
// Status
|
|
331
|
-
status: {
|
|
332
|
-
type: 'string',
|
|
333
|
-
description: 'Run status',
|
|
334
|
-
examples: ['pending', 'running', 'completed', 'failed', 'cancelled', 'waiting'],
|
|
335
|
-
},
|
|
336
|
-
// Timing
|
|
337
|
-
startedAt: {
|
|
338
|
-
type: 'datetime',
|
|
339
|
-
optional: true,
|
|
340
|
-
description: 'Start time',
|
|
341
|
-
},
|
|
342
|
-
completedAt: {
|
|
343
|
-
type: 'datetime',
|
|
344
|
-
optional: true,
|
|
345
|
-
description: 'Completion time',
|
|
346
|
-
},
|
|
347
|
-
duration: {
|
|
348
|
-
type: 'number',
|
|
349
|
-
optional: true,
|
|
350
|
-
description: 'Duration in milliseconds',
|
|
351
|
-
},
|
|
352
|
-
// Input/Output
|
|
353
|
-
triggerData: {
|
|
354
|
-
type: 'json',
|
|
355
|
-
optional: true,
|
|
356
|
-
description: 'Trigger input data',
|
|
357
|
-
},
|
|
358
|
-
output: {
|
|
359
|
-
type: 'json',
|
|
360
|
-
optional: true,
|
|
361
|
-
description: 'Final output',
|
|
362
|
-
},
|
|
363
|
-
// Progress
|
|
364
|
-
currentStep: {
|
|
365
|
-
type: 'number',
|
|
366
|
-
optional: true,
|
|
367
|
-
description: 'Current step number',
|
|
368
|
-
},
|
|
369
|
-
totalSteps: {
|
|
370
|
-
type: 'number',
|
|
371
|
-
optional: true,
|
|
372
|
-
description: 'Total steps',
|
|
373
|
-
},
|
|
374
|
-
// Error
|
|
375
|
-
error: {
|
|
376
|
-
type: 'string',
|
|
377
|
-
optional: true,
|
|
378
|
-
description: 'Error message',
|
|
379
|
-
},
|
|
380
|
-
errorStep: {
|
|
381
|
-
type: 'number',
|
|
382
|
-
optional: true,
|
|
383
|
-
description: 'Step that failed',
|
|
384
|
-
},
|
|
385
|
-
// Retry
|
|
386
|
-
attempt: {
|
|
387
|
-
type: 'number',
|
|
388
|
-
optional: true,
|
|
389
|
-
description: 'Attempt number',
|
|
390
|
-
},
|
|
391
|
-
},
|
|
392
|
-
relationships: {
|
|
393
|
-
workflow: {
|
|
394
|
-
type: 'AutomationWorkflow',
|
|
395
|
-
description: 'Parent workflow',
|
|
396
|
-
},
|
|
397
|
-
stepResults: {
|
|
398
|
-
type: 'StepResult[]',
|
|
399
|
-
description: 'Step execution results',
|
|
400
|
-
},
|
|
401
|
-
},
|
|
402
|
-
actions: [
|
|
403
|
-
'start',
|
|
404
|
-
'cancel',
|
|
405
|
-
'retry',
|
|
406
|
-
'resume',
|
|
407
|
-
],
|
|
408
|
-
events: [
|
|
409
|
-
'started',
|
|
410
|
-
'stepCompleted',
|
|
411
|
-
'stepFailed',
|
|
412
|
-
'completed',
|
|
413
|
-
'failed',
|
|
414
|
-
'cancelled',
|
|
415
|
-
'retried',
|
|
416
|
-
],
|
|
417
|
-
};
|
|
418
|
-
// =============================================================================
|
|
419
|
-
// StepResult
|
|
420
|
-
// =============================================================================
|
|
421
|
-
/**
|
|
422
|
-
* StepResult entity
|
|
423
|
-
*
|
|
424
|
-
* Represents the result of a workflow step execution.
|
|
425
|
-
*/
|
|
426
|
-
export const StepResult = {
|
|
427
|
-
singular: 'step-result',
|
|
428
|
-
plural: 'step-results',
|
|
429
|
-
description: 'Result of a workflow step execution',
|
|
430
|
-
properties: {
|
|
431
|
-
// Status
|
|
432
|
-
status: {
|
|
433
|
-
type: 'string',
|
|
434
|
-
description: 'Step status',
|
|
435
|
-
examples: ['pending', 'running', 'completed', 'failed', 'skipped'],
|
|
436
|
-
},
|
|
437
|
-
// Step info
|
|
438
|
-
stepNumber: {
|
|
439
|
-
type: 'number',
|
|
440
|
-
description: 'Step number',
|
|
441
|
-
},
|
|
442
|
-
actionType: {
|
|
443
|
-
type: 'string',
|
|
444
|
-
optional: true,
|
|
445
|
-
description: 'Action type',
|
|
446
|
-
},
|
|
447
|
-
// Timing
|
|
448
|
-
startedAt: {
|
|
449
|
-
type: 'datetime',
|
|
450
|
-
optional: true,
|
|
451
|
-
description: 'Start time',
|
|
452
|
-
},
|
|
453
|
-
completedAt: {
|
|
454
|
-
type: 'datetime',
|
|
455
|
-
optional: true,
|
|
456
|
-
description: 'Completion time',
|
|
457
|
-
},
|
|
458
|
-
duration: {
|
|
459
|
-
type: 'number',
|
|
460
|
-
optional: true,
|
|
461
|
-
description: 'Duration in milliseconds',
|
|
462
|
-
},
|
|
463
|
-
// Data
|
|
464
|
-
input: {
|
|
465
|
-
type: 'json',
|
|
466
|
-
optional: true,
|
|
467
|
-
description: 'Step input',
|
|
468
|
-
},
|
|
469
|
-
output: {
|
|
470
|
-
type: 'json',
|
|
471
|
-
optional: true,
|
|
472
|
-
description: 'Step output',
|
|
473
|
-
},
|
|
474
|
-
// Error
|
|
475
|
-
error: {
|
|
476
|
-
type: 'string',
|
|
477
|
-
optional: true,
|
|
478
|
-
description: 'Error message',
|
|
479
|
-
},
|
|
480
|
-
},
|
|
481
|
-
relationships: {
|
|
482
|
-
run: {
|
|
483
|
-
type: 'AutomationRun',
|
|
484
|
-
description: 'Parent run',
|
|
485
|
-
},
|
|
486
|
-
action: {
|
|
487
|
-
type: 'Action',
|
|
488
|
-
description: 'Related action',
|
|
489
|
-
},
|
|
490
|
-
},
|
|
491
|
-
actions: [],
|
|
492
|
-
events: [
|
|
493
|
-
'started',
|
|
494
|
-
'completed',
|
|
495
|
-
'failed',
|
|
496
|
-
],
|
|
497
|
-
};
|
|
498
|
-
// =============================================================================
|
|
499
|
-
// Integration
|
|
500
|
-
// =============================================================================
|
|
501
|
-
/**
|
|
502
|
-
* Integration entity
|
|
503
|
-
*
|
|
504
|
-
* Represents a connected app/service integration.
|
|
505
|
-
*/
|
|
506
|
-
export const Integration = {
|
|
507
|
-
singular: 'integration',
|
|
508
|
-
plural: 'integrations',
|
|
509
|
-
description: 'A connected app or service integration',
|
|
510
|
-
properties: {
|
|
511
|
-
// Identity
|
|
512
|
-
name: {
|
|
513
|
-
type: 'string',
|
|
514
|
-
description: 'Integration name',
|
|
515
|
-
},
|
|
516
|
-
app: {
|
|
517
|
-
type: 'string',
|
|
518
|
-
description: 'App identifier',
|
|
519
|
-
},
|
|
520
|
-
// Status
|
|
521
|
-
status: {
|
|
522
|
-
type: 'string',
|
|
523
|
-
description: 'Connection status',
|
|
524
|
-
examples: ['connected', 'disconnected', 'error', 'expired'],
|
|
525
|
-
},
|
|
526
|
-
isActive: {
|
|
527
|
-
type: 'boolean',
|
|
528
|
-
description: 'Whether integration is active',
|
|
529
|
-
},
|
|
530
|
-
// Auth
|
|
531
|
-
authType: {
|
|
532
|
-
type: 'string',
|
|
533
|
-
optional: true,
|
|
534
|
-
description: 'Authentication type',
|
|
535
|
-
examples: ['oauth2', 'api_key', 'basic', 'token'],
|
|
536
|
-
},
|
|
537
|
-
expiresAt: {
|
|
538
|
-
type: 'datetime',
|
|
539
|
-
optional: true,
|
|
540
|
-
description: 'Token expiration',
|
|
541
|
-
},
|
|
542
|
-
// Metadata
|
|
543
|
-
accountName: {
|
|
544
|
-
type: 'string',
|
|
545
|
-
optional: true,
|
|
546
|
-
description: 'Connected account name',
|
|
547
|
-
},
|
|
548
|
-
accountId: {
|
|
549
|
-
type: 'string',
|
|
550
|
-
optional: true,
|
|
551
|
-
description: 'Connected account ID',
|
|
552
|
-
},
|
|
553
|
-
// Last activity
|
|
554
|
-
lastUsedAt: {
|
|
555
|
-
type: 'datetime',
|
|
556
|
-
optional: true,
|
|
557
|
-
description: 'Last used',
|
|
558
|
-
},
|
|
559
|
-
},
|
|
560
|
-
relationships: {
|
|
561
|
-
owner: {
|
|
562
|
-
type: 'User',
|
|
563
|
-
description: 'Integration owner',
|
|
564
|
-
},
|
|
565
|
-
workflows: {
|
|
566
|
-
type: 'AutomationWorkflow[]',
|
|
567
|
-
description: 'Workflows using this integration',
|
|
568
|
-
},
|
|
569
|
-
},
|
|
570
|
-
actions: [
|
|
571
|
-
'connect',
|
|
572
|
-
'disconnect',
|
|
573
|
-
'refresh',
|
|
574
|
-
'test',
|
|
575
|
-
],
|
|
576
|
-
events: [
|
|
577
|
-
'connected',
|
|
578
|
-
'disconnected',
|
|
579
|
-
'refreshed',
|
|
580
|
-
'expired',
|
|
581
|
-
'error',
|
|
582
|
-
],
|
|
583
|
-
};
|
|
584
|
-
// =============================================================================
|
|
585
|
-
// Exports
|
|
586
|
-
// =============================================================================
|
|
587
|
-
export const AutomationEntities = {
|
|
588
|
-
AutomationWorkflow,
|
|
589
|
-
Trigger,
|
|
590
|
-
Action,
|
|
591
|
-
AutomationRun,
|
|
592
|
-
StepResult,
|
|
593
|
-
Integration,
|
|
594
|
-
};
|
|
595
|
-
export const AutomationCategories = {
|
|
596
|
-
workflows: ['AutomationWorkflow'],
|
|
597
|
-
triggers: ['Trigger'],
|
|
598
|
-
actions: ['Action'],
|
|
599
|
-
execution: ['AutomationRun', 'StepResult'],
|
|
600
|
-
integrations: ['Integration'],
|
|
601
|
-
};
|