digital-tools 2.0.2 → 2.1.1

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.
Files changed (93) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/package.json +3 -4
  3. package/src/define.js +267 -0
  4. package/src/entities/advertising.js +999 -0
  5. package/src/entities/ai.js +756 -0
  6. package/src/entities/analytics.js +1588 -0
  7. package/src/entities/automation.js +601 -0
  8. package/src/entities/communication.js +1150 -0
  9. package/src/entities/crm.js +1386 -0
  10. package/src/entities/design.js +546 -0
  11. package/src/entities/development.js +2212 -0
  12. package/src/entities/document.js +874 -0
  13. package/src/entities/ecommerce.js +1429 -0
  14. package/src/entities/experiment.js +1039 -0
  15. package/src/entities/finance.js +3478 -0
  16. package/src/entities/forms.js +1892 -0
  17. package/src/entities/hr.js +661 -0
  18. package/src/entities/identity.js +997 -0
  19. package/src/entities/index.js +282 -0
  20. package/src/entities/infrastructure.js +1153 -0
  21. package/src/entities/knowledge.js +1438 -0
  22. package/src/entities/marketing.js +1610 -0
  23. package/src/entities/media.js +1634 -0
  24. package/src/entities/notification.js +1199 -0
  25. package/src/entities/presentation.js +1274 -0
  26. package/src/entities/productivity.js +1317 -0
  27. package/src/entities/project-management.js +1136 -0
  28. package/src/entities/recruiting.js +736 -0
  29. package/src/entities/shipping.js +509 -0
  30. package/src/entities/signature.js +1102 -0
  31. package/src/entities/site.js +222 -0
  32. package/src/entities/spreadsheet.js +1341 -0
  33. package/src/entities/storage.js +1198 -0
  34. package/src/entities/support.js +1166 -0
  35. package/src/entities/video-conferencing.js +1750 -0
  36. package/src/entities/video.js +950 -0
  37. package/src/entities.js +1663 -0
  38. package/src/index.js +74 -0
  39. package/src/providers/analytics/index.js +17 -0
  40. package/src/providers/analytics/mixpanel.js +255 -0
  41. package/src/providers/calendar/cal-com.js +303 -0
  42. package/src/providers/calendar/google-calendar.js +335 -0
  43. package/src/providers/calendar/index.js +20 -0
  44. package/src/providers/crm/hubspot.js +566 -0
  45. package/src/providers/crm/index.js +17 -0
  46. package/src/providers/development/github.js +472 -0
  47. package/src/providers/development/index.js +17 -0
  48. package/src/providers/ecommerce/index.js +17 -0
  49. package/src/providers/ecommerce/shopify.js +378 -0
  50. package/src/providers/email/index.js +20 -0
  51. package/src/providers/email/resend.js +258 -0
  52. package/src/providers/email/sendgrid.js +161 -0
  53. package/src/providers/finance/index.js +17 -0
  54. package/src/providers/finance/stripe.js +549 -0
  55. package/src/providers/forms/index.js +17 -0
  56. package/src/providers/forms/typeform.js +500 -0
  57. package/src/providers/index.js +123 -0
  58. package/src/providers/knowledge/index.js +17 -0
  59. package/src/providers/knowledge/notion.js +389 -0
  60. package/src/providers/marketing/index.js +17 -0
  61. package/src/providers/marketing/mailchimp.js +443 -0
  62. package/src/providers/media/cloudinary.js +318 -0
  63. package/src/providers/media/index.js +17 -0
  64. package/src/providers/messaging/index.js +20 -0
  65. package/src/providers/messaging/slack.js +393 -0
  66. package/src/providers/messaging/twilio-sms.js +249 -0
  67. package/src/providers/project-management/index.js +17 -0
  68. package/src/providers/project-management/linear.js +575 -0
  69. package/src/providers/registry.js +86 -0
  70. package/src/providers/spreadsheet/google-sheets.js +375 -0
  71. package/src/providers/spreadsheet/index.js +20 -0
  72. package/src/providers/spreadsheet/xlsx.js +423 -0
  73. package/src/providers/storage/index.js +24 -0
  74. package/src/providers/storage/s3.js +419 -0
  75. package/src/providers/support/index.js +17 -0
  76. package/src/providers/support/zendesk.js +373 -0
  77. package/src/providers/tasks/index.js +17 -0
  78. package/src/providers/tasks/todoist.js +286 -0
  79. package/src/providers/types.js +9 -0
  80. package/src/providers/video-conferencing/google-meet.js +286 -0
  81. package/src/providers/video-conferencing/index.js +31 -0
  82. package/src/providers/video-conferencing/jitsi.js +254 -0
  83. package/src/providers/video-conferencing/teams.js +270 -0
  84. package/src/providers/video-conferencing/zoom.js +332 -0
  85. package/src/registry.js +128 -0
  86. package/src/tools/communication.js +184 -0
  87. package/src/tools/data.js +205 -0
  88. package/src/tools/index.js +11 -0
  89. package/src/tools/web.js +137 -0
  90. package/src/types.js +10 -0
  91. package/test/define.test.js +306 -0
  92. package/test/registry.test.js +357 -0
  93. package/test/tools.test.js +363 -0
@@ -0,0 +1,601 @@
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
+ };