@unboundcx/sdk 4.9.0 → 4.9.3
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/package.json +1 -1
- package/schemas/layouts/SCHEMA.md +316 -36
- package/schemas/layouts/section.js +17 -0
- package/services/chat.js +776 -231
- package/services/messaging/CampaignsService.js +27 -0
- package/services/objects.js +21 -2
- package/services/phoneNumbers.js +28 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unboundcx/sdk",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.3",
|
|
4
4
|
"description": "Official JavaScript SDK for the Unbound API - A comprehensive toolkit for integrating with Unbound's communication, AI, and data management services",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -808,25 +808,35 @@ Root document for type:list|detail layouts.
|
|
|
808
808
|
"default": {}
|
|
809
809
|
},
|
|
810
810
|
"orderBy": {
|
|
811
|
-
"
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
"
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
811
|
+
"anyOf": [
|
|
812
|
+
{
|
|
813
|
+
"type": "object",
|
|
814
|
+
"properties": {
|
|
815
|
+
"field": {
|
|
816
|
+
"type": "string",
|
|
817
|
+
"minLength": 1
|
|
818
|
+
},
|
|
819
|
+
"direction": {
|
|
820
|
+
"type": "string",
|
|
821
|
+
"enum": [
|
|
822
|
+
"asc",
|
|
823
|
+
"desc"
|
|
824
|
+
],
|
|
825
|
+
"default": "asc"
|
|
826
|
+
}
|
|
827
|
+
},
|
|
828
|
+
"required": [
|
|
829
|
+
"field"
|
|
822
830
|
],
|
|
823
|
-
"
|
|
831
|
+
"additionalProperties": false
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
"type": "array",
|
|
835
|
+
"items": {
|
|
836
|
+
"$ref": "#/definitions/LayoutDoc/properties/sections/items/anyOf/1/properties/tables/items/properties/orderBy/anyOf/0"
|
|
837
|
+
}
|
|
824
838
|
}
|
|
825
|
-
|
|
826
|
-
"required": [
|
|
827
|
-
"field"
|
|
828
|
-
],
|
|
829
|
-
"additionalProperties": false
|
|
839
|
+
]
|
|
830
840
|
},
|
|
831
841
|
"additionalWhere": {
|
|
832
842
|
"type": "object",
|
|
@@ -992,7 +1002,7 @@ Root document for type:list|detail layouts.
|
|
|
992
1002
|
"additionalProperties": false
|
|
993
1003
|
},
|
|
994
1004
|
"defaultSort": {
|
|
995
|
-
"$ref": "#/definitions/LayoutDoc/properties/sections/items/anyOf/1/properties/tables/items/properties/orderBy"
|
|
1005
|
+
"$ref": "#/definitions/LayoutDoc/properties/sections/items/anyOf/1/properties/tables/items/properties/orderBy/anyOf/0"
|
|
996
1006
|
},
|
|
997
1007
|
"filters": {
|
|
998
1008
|
"type": "object",
|
|
@@ -1483,6 +1493,136 @@ Root document for type:list|detail layouts.
|
|
|
1483
1493
|
"kanban"
|
|
1484
1494
|
],
|
|
1485
1495
|
"additionalProperties": false
|
|
1496
|
+
},
|
|
1497
|
+
{
|
|
1498
|
+
"type": "object",
|
|
1499
|
+
"properties": {
|
|
1500
|
+
"id": {
|
|
1501
|
+
"type": "string",
|
|
1502
|
+
"minLength": 1
|
|
1503
|
+
},
|
|
1504
|
+
"type": {
|
|
1505
|
+
"type": "string",
|
|
1506
|
+
"const": "widget"
|
|
1507
|
+
},
|
|
1508
|
+
"widgetId": {
|
|
1509
|
+
"type": "string",
|
|
1510
|
+
"minLength": 1
|
|
1511
|
+
},
|
|
1512
|
+
"x": {
|
|
1513
|
+
"type": "integer",
|
|
1514
|
+
"minimum": 0,
|
|
1515
|
+
"maximum": 11
|
|
1516
|
+
},
|
|
1517
|
+
"y": {
|
|
1518
|
+
"type": "integer",
|
|
1519
|
+
"minimum": 0
|
|
1520
|
+
},
|
|
1521
|
+
"w": {
|
|
1522
|
+
"type": "integer",
|
|
1523
|
+
"minimum": 1,
|
|
1524
|
+
"maximum": 12
|
|
1525
|
+
},
|
|
1526
|
+
"h": {
|
|
1527
|
+
"type": "integer",
|
|
1528
|
+
"minimum": 1,
|
|
1529
|
+
"maximum": 8
|
|
1530
|
+
},
|
|
1531
|
+
"title": {
|
|
1532
|
+
"type": "string"
|
|
1533
|
+
},
|
|
1534
|
+
"settings": {
|
|
1535
|
+
"type": "object",
|
|
1536
|
+
"additionalProperties": {},
|
|
1537
|
+
"default": {}
|
|
1538
|
+
}
|
|
1539
|
+
},
|
|
1540
|
+
"required": [
|
|
1541
|
+
"id",
|
|
1542
|
+
"type",
|
|
1543
|
+
"widgetId",
|
|
1544
|
+
"x",
|
|
1545
|
+
"y",
|
|
1546
|
+
"w",
|
|
1547
|
+
"h"
|
|
1548
|
+
],
|
|
1549
|
+
"additionalProperties": false
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
"type": "object",
|
|
1553
|
+
"properties": {
|
|
1554
|
+
"id": {
|
|
1555
|
+
"$ref": "#/definitions/LayoutDoc/properties/sections/items/anyOf/0/properties/id"
|
|
1556
|
+
},
|
|
1557
|
+
"header": {
|
|
1558
|
+
"$ref": "#/definitions/LayoutDoc/properties/sections/items/anyOf/0/properties/header"
|
|
1559
|
+
},
|
|
1560
|
+
"editable": {
|
|
1561
|
+
"$ref": "#/definitions/LayoutDoc/properties/sections/items/anyOf/0/properties/editable"
|
|
1562
|
+
},
|
|
1563
|
+
"hideOnCreate": {
|
|
1564
|
+
"$ref": "#/definitions/LayoutDoc/properties/sections/items/anyOf/0/properties/hideOnCreate"
|
|
1565
|
+
},
|
|
1566
|
+
"autoCollapse": {
|
|
1567
|
+
"$ref": "#/definitions/LayoutDoc/properties/sections/items/anyOf/0/properties/autoCollapse"
|
|
1568
|
+
},
|
|
1569
|
+
"showCollapse": {
|
|
1570
|
+
"$ref": "#/definitions/LayoutDoc/properties/sections/items/anyOf/0/properties/showCollapse"
|
|
1571
|
+
},
|
|
1572
|
+
"conditions": {
|
|
1573
|
+
"$ref": "#/definitions/LayoutDoc/properties/sections/items/anyOf/0/properties/conditions"
|
|
1574
|
+
},
|
|
1575
|
+
"type": {
|
|
1576
|
+
"type": "string",
|
|
1577
|
+
"const": "timeline"
|
|
1578
|
+
},
|
|
1579
|
+
"sources": {
|
|
1580
|
+
"type": "array",
|
|
1581
|
+
"items": {
|
|
1582
|
+
"type": "string",
|
|
1583
|
+
"enum": [
|
|
1584
|
+
"web",
|
|
1585
|
+
"ads",
|
|
1586
|
+
"form",
|
|
1587
|
+
"email",
|
|
1588
|
+
"sms",
|
|
1589
|
+
"call",
|
|
1590
|
+
"ticket",
|
|
1591
|
+
"note",
|
|
1592
|
+
"score",
|
|
1593
|
+
"program",
|
|
1594
|
+
"file"
|
|
1595
|
+
]
|
|
1596
|
+
},
|
|
1597
|
+
"default": [
|
|
1598
|
+
"web",
|
|
1599
|
+
"ads",
|
|
1600
|
+
"form",
|
|
1601
|
+
"email",
|
|
1602
|
+
"sms",
|
|
1603
|
+
"call",
|
|
1604
|
+
"ticket",
|
|
1605
|
+
"note",
|
|
1606
|
+
"score",
|
|
1607
|
+
"program",
|
|
1608
|
+
"file"
|
|
1609
|
+
]
|
|
1610
|
+
},
|
|
1611
|
+
"limit": {
|
|
1612
|
+
"type": "integer",
|
|
1613
|
+
"exclusiveMinimum": 0,
|
|
1614
|
+
"default": 50
|
|
1615
|
+
},
|
|
1616
|
+
"showFilters": {
|
|
1617
|
+
"type": "boolean",
|
|
1618
|
+
"default": true
|
|
1619
|
+
}
|
|
1620
|
+
},
|
|
1621
|
+
"required": [
|
|
1622
|
+
"id",
|
|
1623
|
+
"type"
|
|
1624
|
+
],
|
|
1625
|
+
"additionalProperties": false
|
|
1486
1626
|
}
|
|
1487
1627
|
]
|
|
1488
1628
|
},
|
|
@@ -2898,25 +3038,35 @@ One section: content | table | kanban | table-kanban.
|
|
|
2898
3038
|
"default": {}
|
|
2899
3039
|
},
|
|
2900
3040
|
"orderBy": {
|
|
2901
|
-
"
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
"
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
3041
|
+
"anyOf": [
|
|
3042
|
+
{
|
|
3043
|
+
"type": "object",
|
|
3044
|
+
"properties": {
|
|
3045
|
+
"field": {
|
|
3046
|
+
"type": "string",
|
|
3047
|
+
"minLength": 1
|
|
3048
|
+
},
|
|
3049
|
+
"direction": {
|
|
3050
|
+
"type": "string",
|
|
3051
|
+
"enum": [
|
|
3052
|
+
"asc",
|
|
3053
|
+
"desc"
|
|
3054
|
+
],
|
|
3055
|
+
"default": "asc"
|
|
3056
|
+
}
|
|
3057
|
+
},
|
|
3058
|
+
"required": [
|
|
3059
|
+
"field"
|
|
2912
3060
|
],
|
|
2913
|
-
"
|
|
3061
|
+
"additionalProperties": false
|
|
3062
|
+
},
|
|
3063
|
+
{
|
|
3064
|
+
"type": "array",
|
|
3065
|
+
"items": {
|
|
3066
|
+
"$ref": "#/definitions/SectionSpec/anyOf/1/properties/tables/items/properties/orderBy/anyOf/0"
|
|
3067
|
+
}
|
|
2914
3068
|
}
|
|
2915
|
-
|
|
2916
|
-
"required": [
|
|
2917
|
-
"field"
|
|
2918
|
-
],
|
|
2919
|
-
"additionalProperties": false
|
|
3069
|
+
]
|
|
2920
3070
|
},
|
|
2921
3071
|
"additionalWhere": {
|
|
2922
3072
|
"type": "object",
|
|
@@ -3082,7 +3232,7 @@ One section: content | table | kanban | table-kanban.
|
|
|
3082
3232
|
"additionalProperties": false
|
|
3083
3233
|
},
|
|
3084
3234
|
"defaultSort": {
|
|
3085
|
-
"$ref": "#/definitions/SectionSpec/anyOf/1/properties/tables/items/properties/orderBy"
|
|
3235
|
+
"$ref": "#/definitions/SectionSpec/anyOf/1/properties/tables/items/properties/orderBy/anyOf/0"
|
|
3086
3236
|
},
|
|
3087
3237
|
"filters": {
|
|
3088
3238
|
"type": "object",
|
|
@@ -3573,6 +3723,136 @@ One section: content | table | kanban | table-kanban.
|
|
|
3573
3723
|
"kanban"
|
|
3574
3724
|
],
|
|
3575
3725
|
"additionalProperties": false
|
|
3726
|
+
},
|
|
3727
|
+
{
|
|
3728
|
+
"type": "object",
|
|
3729
|
+
"properties": {
|
|
3730
|
+
"id": {
|
|
3731
|
+
"type": "string",
|
|
3732
|
+
"minLength": 1
|
|
3733
|
+
},
|
|
3734
|
+
"type": {
|
|
3735
|
+
"type": "string",
|
|
3736
|
+
"const": "widget"
|
|
3737
|
+
},
|
|
3738
|
+
"widgetId": {
|
|
3739
|
+
"type": "string",
|
|
3740
|
+
"minLength": 1
|
|
3741
|
+
},
|
|
3742
|
+
"x": {
|
|
3743
|
+
"type": "integer",
|
|
3744
|
+
"minimum": 0,
|
|
3745
|
+
"maximum": 11
|
|
3746
|
+
},
|
|
3747
|
+
"y": {
|
|
3748
|
+
"type": "integer",
|
|
3749
|
+
"minimum": 0
|
|
3750
|
+
},
|
|
3751
|
+
"w": {
|
|
3752
|
+
"type": "integer",
|
|
3753
|
+
"minimum": 1,
|
|
3754
|
+
"maximum": 12
|
|
3755
|
+
},
|
|
3756
|
+
"h": {
|
|
3757
|
+
"type": "integer",
|
|
3758
|
+
"minimum": 1,
|
|
3759
|
+
"maximum": 8
|
|
3760
|
+
},
|
|
3761
|
+
"title": {
|
|
3762
|
+
"type": "string"
|
|
3763
|
+
},
|
|
3764
|
+
"settings": {
|
|
3765
|
+
"type": "object",
|
|
3766
|
+
"additionalProperties": {},
|
|
3767
|
+
"default": {}
|
|
3768
|
+
}
|
|
3769
|
+
},
|
|
3770
|
+
"required": [
|
|
3771
|
+
"id",
|
|
3772
|
+
"type",
|
|
3773
|
+
"widgetId",
|
|
3774
|
+
"x",
|
|
3775
|
+
"y",
|
|
3776
|
+
"w",
|
|
3777
|
+
"h"
|
|
3778
|
+
],
|
|
3779
|
+
"additionalProperties": false
|
|
3780
|
+
},
|
|
3781
|
+
{
|
|
3782
|
+
"type": "object",
|
|
3783
|
+
"properties": {
|
|
3784
|
+
"id": {
|
|
3785
|
+
"$ref": "#/definitions/SectionSpec/anyOf/0/properties/id"
|
|
3786
|
+
},
|
|
3787
|
+
"header": {
|
|
3788
|
+
"$ref": "#/definitions/SectionSpec/anyOf/0/properties/header"
|
|
3789
|
+
},
|
|
3790
|
+
"editable": {
|
|
3791
|
+
"$ref": "#/definitions/SectionSpec/anyOf/0/properties/editable"
|
|
3792
|
+
},
|
|
3793
|
+
"hideOnCreate": {
|
|
3794
|
+
"$ref": "#/definitions/SectionSpec/anyOf/0/properties/hideOnCreate"
|
|
3795
|
+
},
|
|
3796
|
+
"autoCollapse": {
|
|
3797
|
+
"$ref": "#/definitions/SectionSpec/anyOf/0/properties/autoCollapse"
|
|
3798
|
+
},
|
|
3799
|
+
"showCollapse": {
|
|
3800
|
+
"$ref": "#/definitions/SectionSpec/anyOf/0/properties/showCollapse"
|
|
3801
|
+
},
|
|
3802
|
+
"conditions": {
|
|
3803
|
+
"$ref": "#/definitions/SectionSpec/anyOf/0/properties/conditions"
|
|
3804
|
+
},
|
|
3805
|
+
"type": {
|
|
3806
|
+
"type": "string",
|
|
3807
|
+
"const": "timeline"
|
|
3808
|
+
},
|
|
3809
|
+
"sources": {
|
|
3810
|
+
"type": "array",
|
|
3811
|
+
"items": {
|
|
3812
|
+
"type": "string",
|
|
3813
|
+
"enum": [
|
|
3814
|
+
"web",
|
|
3815
|
+
"ads",
|
|
3816
|
+
"form",
|
|
3817
|
+
"email",
|
|
3818
|
+
"sms",
|
|
3819
|
+
"call",
|
|
3820
|
+
"ticket",
|
|
3821
|
+
"note",
|
|
3822
|
+
"score",
|
|
3823
|
+
"program",
|
|
3824
|
+
"file"
|
|
3825
|
+
]
|
|
3826
|
+
},
|
|
3827
|
+
"default": [
|
|
3828
|
+
"web",
|
|
3829
|
+
"ads",
|
|
3830
|
+
"form",
|
|
3831
|
+
"email",
|
|
3832
|
+
"sms",
|
|
3833
|
+
"call",
|
|
3834
|
+
"ticket",
|
|
3835
|
+
"note",
|
|
3836
|
+
"score",
|
|
3837
|
+
"program",
|
|
3838
|
+
"file"
|
|
3839
|
+
]
|
|
3840
|
+
},
|
|
3841
|
+
"limit": {
|
|
3842
|
+
"type": "integer",
|
|
3843
|
+
"exclusiveMinimum": 0,
|
|
3844
|
+
"default": 50
|
|
3845
|
+
},
|
|
3846
|
+
"showFilters": {
|
|
3847
|
+
"type": "boolean",
|
|
3848
|
+
"default": true
|
|
3849
|
+
}
|
|
3850
|
+
},
|
|
3851
|
+
"required": [
|
|
3852
|
+
"id",
|
|
3853
|
+
"type"
|
|
3854
|
+
],
|
|
3855
|
+
"additionalProperties": false
|
|
3576
3856
|
}
|
|
3577
3857
|
]
|
|
3578
3858
|
}
|
|
@@ -85,6 +85,22 @@ const KanbanSection = BaseSection.extend({
|
|
|
85
85
|
kanban: KanbanConfigSpec,
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
+
// Activity feed section (people/company/opportunities detail pages) —
|
|
89
|
+
// renders app1-api's GET /object/:id/activity merged feed as a vertical
|
|
90
|
+
// timeline, not a table/kanban query. `sources` filters which item kinds
|
|
91
|
+
// the feed requests; default is every kind the API can produce.
|
|
92
|
+
export const TIMELINE_SOURCES = [
|
|
93
|
+
'web', 'ads', 'form', 'email', 'sms', 'call', 'ticket', 'note', 'score',
|
|
94
|
+
'program', 'file',
|
|
95
|
+
];
|
|
96
|
+
|
|
97
|
+
const TimelineSection = BaseSection.extend({
|
|
98
|
+
type: z.literal('timeline'),
|
|
99
|
+
sources: z.array(z.enum(TIMELINE_SOURCES)).default([...TIMELINE_SOURCES]),
|
|
100
|
+
limit: z.number().int().positive().default(50),
|
|
101
|
+
showFilters: z.boolean().default(true),
|
|
102
|
+
});
|
|
103
|
+
|
|
88
104
|
const TableKanbanSection = BaseSection.extend({
|
|
89
105
|
type: z.literal('table-kanban'),
|
|
90
106
|
defaultView: z.enum(['table', 'kanban']).default('table'),
|
|
@@ -102,4 +118,5 @@ const TableKanbanSection = BaseSection.extend({
|
|
|
102
118
|
// function.
|
|
103
119
|
export const SectionSpec = z.discriminatedUnion('type', [
|
|
104
120
|
ContentSection, TableSection, KanbanSection, TableKanbanSection, WidgetSection,
|
|
121
|
+
TimelineSection,
|
|
105
122
|
]);
|