@automate.ax/integration-contracts 0.114.4 → 0.115.2
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/dist/asana/index.d.ts +156 -8
- package/dist/asana/semantic-events.d.ts +156 -8
- package/dist/asana/semantic-events.js +27 -4
- package/dist/brevo/index.d.ts +1879 -565
- package/dist/brevo/index.js +46 -45
- package/dist/brevo/schemas.d.ts +600 -1029
- package/dist/brevo/schemas.js +227 -291
- package/dist/close/events.d.ts +2 -2
- package/dist/close/schemas.d.ts +2 -2
- package/dist/convex/index.d.ts +4 -4
- package/dist/convex/schemas.d.ts +2 -2
- package/dist/linear/schemas.d.ts +1 -1
- package/dist/notion/schemas.d.ts +4 -4
- package/dist/resend/action-schemas.d.ts +14 -14
- package/dist/whatsapp/index.d.ts +2 -2
- package/dist/whatsapp/schemas.d.ts +5 -5
- package/package.json +2 -2
- package/src/asana/semantic-events.ts +36 -14
- package/src/brevo/index.ts +99 -55
- package/src/brevo/schemas.ts +266 -395
package/dist/asana/index.d.ts
CHANGED
|
@@ -1556,7 +1556,7 @@ export declare const asanaTriggerContracts: {
|
|
|
1556
1556
|
readonly configSchema: z.ZodObject<{
|
|
1557
1557
|
resourceId: z.ZodString;
|
|
1558
1558
|
}, z.core.$strip>;
|
|
1559
|
-
readonly eventSchema: z.ZodObject<{
|
|
1559
|
+
readonly eventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1560
1560
|
id: z.ZodString;
|
|
1561
1561
|
name: z.ZodOptional<z.ZodString>;
|
|
1562
1562
|
event: z.ZodObject<{
|
|
@@ -1589,13 +1589,50 @@ export declare const asanaTriggerContracts: {
|
|
|
1589
1589
|
resourceType: z.ZodLiteral<"task">;
|
|
1590
1590
|
}, z.core.$strip>;
|
|
1591
1591
|
type: z.ZodLiteral<"task">;
|
|
1592
|
-
}, z.core.$strip
|
|
1592
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1593
|
+
id: z.ZodString;
|
|
1594
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1595
|
+
event: z.ZodObject<{
|
|
1596
|
+
change: z.ZodOptional<z.ZodObject<{
|
|
1597
|
+
action: z.ZodEnum<{
|
|
1598
|
+
added: "added";
|
|
1599
|
+
changed: "changed";
|
|
1600
|
+
removed: "removed";
|
|
1601
|
+
}>;
|
|
1602
|
+
addedValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
1603
|
+
field: z.ZodString;
|
|
1604
|
+
newValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
1605
|
+
removedValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
1606
|
+
}, z.core.$strip>>;
|
|
1607
|
+
createdAt: z.ZodString;
|
|
1608
|
+
resource: z.ZodObject<{
|
|
1609
|
+
id: z.ZodString;
|
|
1610
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1611
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1612
|
+
}, z.core.$strip>;
|
|
1613
|
+
resourceSubtype: z.ZodOptional<z.ZodString>;
|
|
1614
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
1615
|
+
id: z.ZodString;
|
|
1616
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1617
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1618
|
+
}, z.core.$strip>>;
|
|
1619
|
+
watchedResourceId: z.ZodString;
|
|
1620
|
+
action: z.ZodLiteral<"added">;
|
|
1621
|
+
parent: z.ZodObject<{
|
|
1622
|
+
id: z.ZodString;
|
|
1623
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1624
|
+
type: z.ZodLiteral<"project">;
|
|
1625
|
+
}, z.core.$strip>;
|
|
1626
|
+
resourceType: z.ZodLiteral<"task">;
|
|
1627
|
+
}, z.core.$strip>;
|
|
1628
|
+
type: z.ZodLiteral<"task">;
|
|
1629
|
+
}, z.core.$strip>]>;
|
|
1593
1630
|
};
|
|
1594
1631
|
readonly "asana.task.project.removed": {
|
|
1595
1632
|
readonly configSchema: z.ZodObject<{
|
|
1596
1633
|
resourceId: z.ZodString;
|
|
1597
1634
|
}, z.core.$strip>;
|
|
1598
|
-
readonly eventSchema: z.ZodObject<{
|
|
1635
|
+
readonly eventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1599
1636
|
id: z.ZodString;
|
|
1600
1637
|
name: z.ZodOptional<z.ZodString>;
|
|
1601
1638
|
event: z.ZodObject<{
|
|
@@ -1628,7 +1665,44 @@ export declare const asanaTriggerContracts: {
|
|
|
1628
1665
|
resourceType: z.ZodLiteral<"task">;
|
|
1629
1666
|
}, z.core.$strip>;
|
|
1630
1667
|
type: z.ZodLiteral<"task">;
|
|
1631
|
-
}, z.core.$strip
|
|
1668
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1669
|
+
id: z.ZodString;
|
|
1670
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1671
|
+
event: z.ZodObject<{
|
|
1672
|
+
change: z.ZodOptional<z.ZodObject<{
|
|
1673
|
+
action: z.ZodEnum<{
|
|
1674
|
+
added: "added";
|
|
1675
|
+
changed: "changed";
|
|
1676
|
+
removed: "removed";
|
|
1677
|
+
}>;
|
|
1678
|
+
addedValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
1679
|
+
field: z.ZodString;
|
|
1680
|
+
newValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
1681
|
+
removedValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
1682
|
+
}, z.core.$strip>>;
|
|
1683
|
+
createdAt: z.ZodString;
|
|
1684
|
+
resource: z.ZodObject<{
|
|
1685
|
+
id: z.ZodString;
|
|
1686
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1687
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1688
|
+
}, z.core.$strip>;
|
|
1689
|
+
resourceSubtype: z.ZodOptional<z.ZodString>;
|
|
1690
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
1691
|
+
id: z.ZodString;
|
|
1692
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1693
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1694
|
+
}, z.core.$strip>>;
|
|
1695
|
+
watchedResourceId: z.ZodString;
|
|
1696
|
+
action: z.ZodLiteral<"removed">;
|
|
1697
|
+
parent: z.ZodObject<{
|
|
1698
|
+
id: z.ZodString;
|
|
1699
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1700
|
+
type: z.ZodLiteral<"project">;
|
|
1701
|
+
}, z.core.$strip>;
|
|
1702
|
+
resourceType: z.ZodLiteral<"task">;
|
|
1703
|
+
}, z.core.$strip>;
|
|
1704
|
+
type: z.ZodLiteral<"task">;
|
|
1705
|
+
}, z.core.$strip>]>;
|
|
1632
1706
|
};
|
|
1633
1707
|
readonly "asana.task.restored": {
|
|
1634
1708
|
readonly configSchema: z.ZodObject<{
|
|
@@ -1677,7 +1751,7 @@ export declare const asanaTriggerContracts: {
|
|
|
1677
1751
|
readonly configSchema: z.ZodObject<{
|
|
1678
1752
|
resourceId: z.ZodString;
|
|
1679
1753
|
}, z.core.$strip>;
|
|
1680
|
-
readonly eventSchema: z.ZodObject<{
|
|
1754
|
+
readonly eventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1681
1755
|
id: z.ZodString;
|
|
1682
1756
|
name: z.ZodOptional<z.ZodString>;
|
|
1683
1757
|
event: z.ZodObject<{
|
|
@@ -1710,13 +1784,50 @@ export declare const asanaTriggerContracts: {
|
|
|
1710
1784
|
resourceType: z.ZodLiteral<"task">;
|
|
1711
1785
|
}, z.core.$strip>;
|
|
1712
1786
|
type: z.ZodLiteral<"task">;
|
|
1713
|
-
}, z.core.$strip
|
|
1787
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1788
|
+
id: z.ZodString;
|
|
1789
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1790
|
+
event: z.ZodObject<{
|
|
1791
|
+
change: z.ZodOptional<z.ZodObject<{
|
|
1792
|
+
action: z.ZodEnum<{
|
|
1793
|
+
added: "added";
|
|
1794
|
+
changed: "changed";
|
|
1795
|
+
removed: "removed";
|
|
1796
|
+
}>;
|
|
1797
|
+
addedValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
1798
|
+
field: z.ZodString;
|
|
1799
|
+
newValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
1800
|
+
removedValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
1801
|
+
}, z.core.$strip>>;
|
|
1802
|
+
createdAt: z.ZodString;
|
|
1803
|
+
resource: z.ZodObject<{
|
|
1804
|
+
id: z.ZodString;
|
|
1805
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1806
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1807
|
+
}, z.core.$strip>;
|
|
1808
|
+
resourceSubtype: z.ZodOptional<z.ZodString>;
|
|
1809
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
1810
|
+
id: z.ZodString;
|
|
1811
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1812
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1813
|
+
}, z.core.$strip>>;
|
|
1814
|
+
watchedResourceId: z.ZodString;
|
|
1815
|
+
action: z.ZodLiteral<"added">;
|
|
1816
|
+
parent: z.ZodObject<{
|
|
1817
|
+
id: z.ZodString;
|
|
1818
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1819
|
+
type: z.ZodLiteral<"tag">;
|
|
1820
|
+
}, z.core.$strip>;
|
|
1821
|
+
resourceType: z.ZodLiteral<"task">;
|
|
1822
|
+
}, z.core.$strip>;
|
|
1823
|
+
type: z.ZodLiteral<"task">;
|
|
1824
|
+
}, z.core.$strip>]>;
|
|
1714
1825
|
};
|
|
1715
1826
|
readonly "asana.task.tag.removed": {
|
|
1716
1827
|
readonly configSchema: z.ZodObject<{
|
|
1717
1828
|
resourceId: z.ZodString;
|
|
1718
1829
|
}, z.core.$strip>;
|
|
1719
|
-
readonly eventSchema: z.ZodObject<{
|
|
1830
|
+
readonly eventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1720
1831
|
id: z.ZodString;
|
|
1721
1832
|
name: z.ZodOptional<z.ZodString>;
|
|
1722
1833
|
event: z.ZodObject<{
|
|
@@ -1749,7 +1860,44 @@ export declare const asanaTriggerContracts: {
|
|
|
1749
1860
|
resourceType: z.ZodLiteral<"task">;
|
|
1750
1861
|
}, z.core.$strip>;
|
|
1751
1862
|
type: z.ZodLiteral<"task">;
|
|
1752
|
-
}, z.core.$strip
|
|
1863
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1864
|
+
id: z.ZodString;
|
|
1865
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1866
|
+
event: z.ZodObject<{
|
|
1867
|
+
change: z.ZodOptional<z.ZodObject<{
|
|
1868
|
+
action: z.ZodEnum<{
|
|
1869
|
+
added: "added";
|
|
1870
|
+
changed: "changed";
|
|
1871
|
+
removed: "removed";
|
|
1872
|
+
}>;
|
|
1873
|
+
addedValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
1874
|
+
field: z.ZodString;
|
|
1875
|
+
newValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
1876
|
+
removedValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
1877
|
+
}, z.core.$strip>>;
|
|
1878
|
+
createdAt: z.ZodString;
|
|
1879
|
+
resource: z.ZodObject<{
|
|
1880
|
+
id: z.ZodString;
|
|
1881
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1882
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1883
|
+
}, z.core.$strip>;
|
|
1884
|
+
resourceSubtype: z.ZodOptional<z.ZodString>;
|
|
1885
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
1886
|
+
id: z.ZodString;
|
|
1887
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1888
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1889
|
+
}, z.core.$strip>>;
|
|
1890
|
+
watchedResourceId: z.ZodString;
|
|
1891
|
+
action: z.ZodLiteral<"removed">;
|
|
1892
|
+
parent: z.ZodObject<{
|
|
1893
|
+
id: z.ZodString;
|
|
1894
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1895
|
+
type: z.ZodLiteral<"tag">;
|
|
1896
|
+
}, z.core.$strip>;
|
|
1897
|
+
resourceType: z.ZodLiteral<"task">;
|
|
1898
|
+
}, z.core.$strip>;
|
|
1899
|
+
type: z.ZodLiteral<"task">;
|
|
1900
|
+
}, z.core.$strip>]>;
|
|
1753
1901
|
};
|
|
1754
1902
|
readonly "asana.task.unassigned": {
|
|
1755
1903
|
readonly configSchema: z.ZodObject<{
|
|
@@ -392,7 +392,7 @@ export declare const ASANA_TASK_FOLLOWER_REMOVED_EVENT_SCHEMA: z.ZodObject<{
|
|
|
392
392
|
}, z.core.$strip>;
|
|
393
393
|
type: z.ZodLiteral<"task">;
|
|
394
394
|
}, z.core.$strip>;
|
|
395
|
-
export declare const ASANA_TASK_PROJECT_ADDED_EVENT_SCHEMA: z.ZodObject<{
|
|
395
|
+
export declare const ASANA_TASK_PROJECT_ADDED_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodObject<{
|
|
396
396
|
id: z.ZodString;
|
|
397
397
|
name: z.ZodOptional<z.ZodString>;
|
|
398
398
|
event: z.ZodObject<{
|
|
@@ -425,8 +425,45 @@ export declare const ASANA_TASK_PROJECT_ADDED_EVENT_SCHEMA: z.ZodObject<{
|
|
|
425
425
|
resourceType: z.ZodLiteral<"task">;
|
|
426
426
|
}, z.core.$strip>;
|
|
427
427
|
type: z.ZodLiteral<"task">;
|
|
428
|
-
}, z.core.$strip
|
|
429
|
-
|
|
428
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
429
|
+
id: z.ZodString;
|
|
430
|
+
name: z.ZodOptional<z.ZodString>;
|
|
431
|
+
event: z.ZodObject<{
|
|
432
|
+
change: z.ZodOptional<z.ZodObject<{
|
|
433
|
+
action: z.ZodEnum<{
|
|
434
|
+
added: "added";
|
|
435
|
+
changed: "changed";
|
|
436
|
+
removed: "removed";
|
|
437
|
+
}>;
|
|
438
|
+
addedValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
439
|
+
field: z.ZodString;
|
|
440
|
+
newValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
441
|
+
removedValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
442
|
+
}, z.core.$strip>>;
|
|
443
|
+
createdAt: z.ZodString;
|
|
444
|
+
resource: z.ZodObject<{
|
|
445
|
+
id: z.ZodString;
|
|
446
|
+
name: z.ZodOptional<z.ZodString>;
|
|
447
|
+
type: z.ZodOptional<z.ZodString>;
|
|
448
|
+
}, z.core.$strip>;
|
|
449
|
+
resourceSubtype: z.ZodOptional<z.ZodString>;
|
|
450
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
451
|
+
id: z.ZodString;
|
|
452
|
+
name: z.ZodOptional<z.ZodString>;
|
|
453
|
+
type: z.ZodOptional<z.ZodString>;
|
|
454
|
+
}, z.core.$strip>>;
|
|
455
|
+
watchedResourceId: z.ZodString;
|
|
456
|
+
action: z.ZodLiteral<"added">;
|
|
457
|
+
parent: z.ZodObject<{
|
|
458
|
+
id: z.ZodString;
|
|
459
|
+
name: z.ZodOptional<z.ZodString>;
|
|
460
|
+
type: z.ZodLiteral<"project">;
|
|
461
|
+
}, z.core.$strip>;
|
|
462
|
+
resourceType: z.ZodLiteral<"task">;
|
|
463
|
+
}, z.core.$strip>;
|
|
464
|
+
type: z.ZodLiteral<"task">;
|
|
465
|
+
}, z.core.$strip>]>;
|
|
466
|
+
export declare const ASANA_TASK_PROJECT_REMOVED_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodObject<{
|
|
430
467
|
id: z.ZodString;
|
|
431
468
|
name: z.ZodOptional<z.ZodString>;
|
|
432
469
|
event: z.ZodObject<{
|
|
@@ -459,8 +496,45 @@ export declare const ASANA_TASK_PROJECT_REMOVED_EVENT_SCHEMA: z.ZodObject<{
|
|
|
459
496
|
resourceType: z.ZodLiteral<"task">;
|
|
460
497
|
}, z.core.$strip>;
|
|
461
498
|
type: z.ZodLiteral<"task">;
|
|
462
|
-
}, z.core.$strip
|
|
463
|
-
|
|
499
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
500
|
+
id: z.ZodString;
|
|
501
|
+
name: z.ZodOptional<z.ZodString>;
|
|
502
|
+
event: z.ZodObject<{
|
|
503
|
+
change: z.ZodOptional<z.ZodObject<{
|
|
504
|
+
action: z.ZodEnum<{
|
|
505
|
+
added: "added";
|
|
506
|
+
changed: "changed";
|
|
507
|
+
removed: "removed";
|
|
508
|
+
}>;
|
|
509
|
+
addedValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
510
|
+
field: z.ZodString;
|
|
511
|
+
newValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
512
|
+
removedValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
513
|
+
}, z.core.$strip>>;
|
|
514
|
+
createdAt: z.ZodString;
|
|
515
|
+
resource: z.ZodObject<{
|
|
516
|
+
id: z.ZodString;
|
|
517
|
+
name: z.ZodOptional<z.ZodString>;
|
|
518
|
+
type: z.ZodOptional<z.ZodString>;
|
|
519
|
+
}, z.core.$strip>;
|
|
520
|
+
resourceSubtype: z.ZodOptional<z.ZodString>;
|
|
521
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
522
|
+
id: z.ZodString;
|
|
523
|
+
name: z.ZodOptional<z.ZodString>;
|
|
524
|
+
type: z.ZodOptional<z.ZodString>;
|
|
525
|
+
}, z.core.$strip>>;
|
|
526
|
+
watchedResourceId: z.ZodString;
|
|
527
|
+
action: z.ZodLiteral<"removed">;
|
|
528
|
+
parent: z.ZodObject<{
|
|
529
|
+
id: z.ZodString;
|
|
530
|
+
name: z.ZodOptional<z.ZodString>;
|
|
531
|
+
type: z.ZodLiteral<"project">;
|
|
532
|
+
}, z.core.$strip>;
|
|
533
|
+
resourceType: z.ZodLiteral<"task">;
|
|
534
|
+
}, z.core.$strip>;
|
|
535
|
+
type: z.ZodLiteral<"task">;
|
|
536
|
+
}, z.core.$strip>]>;
|
|
537
|
+
export declare const ASANA_TASK_TAG_ADDED_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodObject<{
|
|
464
538
|
id: z.ZodString;
|
|
465
539
|
name: z.ZodOptional<z.ZodString>;
|
|
466
540
|
event: z.ZodObject<{
|
|
@@ -493,8 +567,45 @@ export declare const ASANA_TASK_TAG_ADDED_EVENT_SCHEMA: z.ZodObject<{
|
|
|
493
567
|
resourceType: z.ZodLiteral<"task">;
|
|
494
568
|
}, z.core.$strip>;
|
|
495
569
|
type: z.ZodLiteral<"task">;
|
|
496
|
-
}, z.core.$strip
|
|
497
|
-
|
|
570
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
571
|
+
id: z.ZodString;
|
|
572
|
+
name: z.ZodOptional<z.ZodString>;
|
|
573
|
+
event: z.ZodObject<{
|
|
574
|
+
change: z.ZodOptional<z.ZodObject<{
|
|
575
|
+
action: z.ZodEnum<{
|
|
576
|
+
added: "added";
|
|
577
|
+
changed: "changed";
|
|
578
|
+
removed: "removed";
|
|
579
|
+
}>;
|
|
580
|
+
addedValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
581
|
+
field: z.ZodString;
|
|
582
|
+
newValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
583
|
+
removedValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
584
|
+
}, z.core.$strip>>;
|
|
585
|
+
createdAt: z.ZodString;
|
|
586
|
+
resource: z.ZodObject<{
|
|
587
|
+
id: z.ZodString;
|
|
588
|
+
name: z.ZodOptional<z.ZodString>;
|
|
589
|
+
type: z.ZodOptional<z.ZodString>;
|
|
590
|
+
}, z.core.$strip>;
|
|
591
|
+
resourceSubtype: z.ZodOptional<z.ZodString>;
|
|
592
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
593
|
+
id: z.ZodString;
|
|
594
|
+
name: z.ZodOptional<z.ZodString>;
|
|
595
|
+
type: z.ZodOptional<z.ZodString>;
|
|
596
|
+
}, z.core.$strip>>;
|
|
597
|
+
watchedResourceId: z.ZodString;
|
|
598
|
+
action: z.ZodLiteral<"added">;
|
|
599
|
+
parent: z.ZodObject<{
|
|
600
|
+
id: z.ZodString;
|
|
601
|
+
name: z.ZodOptional<z.ZodString>;
|
|
602
|
+
type: z.ZodLiteral<"tag">;
|
|
603
|
+
}, z.core.$strip>;
|
|
604
|
+
resourceType: z.ZodLiteral<"task">;
|
|
605
|
+
}, z.core.$strip>;
|
|
606
|
+
type: z.ZodLiteral<"task">;
|
|
607
|
+
}, z.core.$strip>]>;
|
|
608
|
+
export declare const ASANA_TASK_TAG_REMOVED_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodObject<{
|
|
498
609
|
id: z.ZodString;
|
|
499
610
|
name: z.ZodOptional<z.ZodString>;
|
|
500
611
|
event: z.ZodObject<{
|
|
@@ -527,7 +638,44 @@ export declare const ASANA_TASK_TAG_REMOVED_EVENT_SCHEMA: z.ZodObject<{
|
|
|
527
638
|
resourceType: z.ZodLiteral<"task">;
|
|
528
639
|
}, z.core.$strip>;
|
|
529
640
|
type: z.ZodLiteral<"task">;
|
|
530
|
-
}, z.core.$strip
|
|
641
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
642
|
+
id: z.ZodString;
|
|
643
|
+
name: z.ZodOptional<z.ZodString>;
|
|
644
|
+
event: z.ZodObject<{
|
|
645
|
+
change: z.ZodOptional<z.ZodObject<{
|
|
646
|
+
action: z.ZodEnum<{
|
|
647
|
+
added: "added";
|
|
648
|
+
changed: "changed";
|
|
649
|
+
removed: "removed";
|
|
650
|
+
}>;
|
|
651
|
+
addedValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
652
|
+
field: z.ZodString;
|
|
653
|
+
newValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
654
|
+
removedValue: z.ZodOptional<z.ZodJSONSchema>;
|
|
655
|
+
}, z.core.$strip>>;
|
|
656
|
+
createdAt: z.ZodString;
|
|
657
|
+
resource: z.ZodObject<{
|
|
658
|
+
id: z.ZodString;
|
|
659
|
+
name: z.ZodOptional<z.ZodString>;
|
|
660
|
+
type: z.ZodOptional<z.ZodString>;
|
|
661
|
+
}, z.core.$strip>;
|
|
662
|
+
resourceSubtype: z.ZodOptional<z.ZodString>;
|
|
663
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
664
|
+
id: z.ZodString;
|
|
665
|
+
name: z.ZodOptional<z.ZodString>;
|
|
666
|
+
type: z.ZodOptional<z.ZodString>;
|
|
667
|
+
}, z.core.$strip>>;
|
|
668
|
+
watchedResourceId: z.ZodString;
|
|
669
|
+
action: z.ZodLiteral<"removed">;
|
|
670
|
+
parent: z.ZodObject<{
|
|
671
|
+
id: z.ZodString;
|
|
672
|
+
name: z.ZodOptional<z.ZodString>;
|
|
673
|
+
type: z.ZodLiteral<"tag">;
|
|
674
|
+
}, z.core.$strip>;
|
|
675
|
+
resourceType: z.ZodLiteral<"task">;
|
|
676
|
+
}, z.core.$strip>;
|
|
677
|
+
type: z.ZodLiteral<"task">;
|
|
678
|
+
}, z.core.$strip>]>;
|
|
531
679
|
export declare const ASANA_COMMENT_UPDATED_EVENT_SCHEMA: z.ZodObject<{
|
|
532
680
|
id: z.ZodString;
|
|
533
681
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -36,6 +36,29 @@ function changedFieldEventSchema(resourceType, field, changeAction) {
|
|
|
36
36
|
type: z.literal(resourceType),
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Builds a task relationship schema for Asana's direct parent tuple and its
|
|
41
|
+
* legacy changed-field representation.
|
|
42
|
+
*
|
|
43
|
+
* @param parentType - Provider resource category for the task relationship.
|
|
44
|
+
* @param field - Legacy normalized changed field.
|
|
45
|
+
* @param action - Provider relationship action.
|
|
46
|
+
*/
|
|
47
|
+
function taskRelationshipEventSchema(parentType, field, action) {
|
|
48
|
+
return z.union([
|
|
49
|
+
changedFieldEventSchema("task", field, action),
|
|
50
|
+
ASANA_RESOURCE_SCHEMA.extend({
|
|
51
|
+
event: ASANA_EVENT_SCHEMA.extend({
|
|
52
|
+
action: z.literal(action),
|
|
53
|
+
parent: ASANA_RESOURCE_SCHEMA.extend({
|
|
54
|
+
type: z.literal(parentType),
|
|
55
|
+
}),
|
|
56
|
+
resourceType: z.literal("task"),
|
|
57
|
+
}),
|
|
58
|
+
type: z.literal("task"),
|
|
59
|
+
}),
|
|
60
|
+
]);
|
|
61
|
+
}
|
|
39
62
|
export const ASANA_TASK_RESTORED_EVENT_SCHEMA = resourceEventSchema("task", "undeleted");
|
|
40
63
|
const ASANA_TASK_COMPLETION_CHANGED_EVENT_SCHEMA = ASANA_EVENT_SCHEMA.extend({
|
|
41
64
|
action: z.literal("changed"),
|
|
@@ -80,10 +103,10 @@ export const ASANA_TASK_DUE_DATE_CHANGED_EVENT_SCHEMA = z.union([
|
|
|
80
103
|
]);
|
|
81
104
|
export const ASANA_TASK_FOLLOWER_ADDED_EVENT_SCHEMA = changedFieldEventSchema("task", "followers", "added");
|
|
82
105
|
export const ASANA_TASK_FOLLOWER_REMOVED_EVENT_SCHEMA = changedFieldEventSchema("task", "followers", "removed");
|
|
83
|
-
export const ASANA_TASK_PROJECT_ADDED_EVENT_SCHEMA =
|
|
84
|
-
export const ASANA_TASK_PROJECT_REMOVED_EVENT_SCHEMA =
|
|
85
|
-
export const ASANA_TASK_TAG_ADDED_EVENT_SCHEMA =
|
|
86
|
-
export const ASANA_TASK_TAG_REMOVED_EVENT_SCHEMA =
|
|
106
|
+
export const ASANA_TASK_PROJECT_ADDED_EVENT_SCHEMA = taskRelationshipEventSchema("project", "projects", "added");
|
|
107
|
+
export const ASANA_TASK_PROJECT_REMOVED_EVENT_SCHEMA = taskRelationshipEventSchema("project", "projects", "removed");
|
|
108
|
+
export const ASANA_TASK_TAG_ADDED_EVENT_SCHEMA = taskRelationshipEventSchema("tag", "tags", "added");
|
|
109
|
+
export const ASANA_TASK_TAG_REMOVED_EVENT_SCHEMA = taskRelationshipEventSchema("tag", "tags", "removed");
|
|
87
110
|
export const ASANA_COMMENT_UPDATED_EVENT_SCHEMA = resourceEventSchema("story", "changed");
|
|
88
111
|
export const ASANA_COMMENT_DELETED_EVENT_SCHEMA = resourceEventSchema("story", "removed");
|
|
89
112
|
export const ASANA_COMMENT_RESTORED_EVENT_SCHEMA = resourceEventSchema("story", "undeleted");
|