@medalsocial/sdk 1.3.0 → 1.5.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.
@@ -53,6 +53,10 @@
53
53
  {
54
54
  "name": "Webhooks",
55
55
  "description": "Manage webhook endpoints and inspect their deliveries."
56
+ },
57
+ {
58
+ "name": "Channels",
59
+ "description": "Partner channel connect — mint hosted connect links and manage the resulting channel connections."
56
60
  }
57
61
  ],
58
62
  "paths": {
@@ -123,7 +127,7 @@
123
127
  "content": {
124
128
  "application/json": {
125
129
  "schema": {
126
- "$ref": "#/components/schemas/Envelope_PostCreateResult"
130
+ "$ref": "#/components/schemas/ApiResponse_PostCreateResult"
127
131
  }
128
132
  }
129
133
  }
@@ -147,7 +151,7 @@
147
151
  "content": {
148
152
  "application/json": {
149
153
  "schema": {
150
- "$ref": "#/components/schemas/Envelope_ChannelArray"
154
+ "$ref": "#/components/schemas/ApiResponse_ChannelArray"
151
155
  }
152
156
  }
153
157
  }
@@ -176,7 +180,7 @@
176
180
  "content": {
177
181
  "application/json": {
178
182
  "schema": {
179
- "$ref": "#/components/schemas/Envelope_PostDetail"
183
+ "$ref": "#/components/schemas/ApiResponse_PostDetail"
180
184
  }
181
185
  }
182
186
  }
@@ -208,7 +212,7 @@
208
212
  "content": {
209
213
  "application/json": {
210
214
  "schema": {
211
- "$ref": "#/components/schemas/Envelope_Success"
215
+ "$ref": "#/components/schemas/ApiResponse_Success"
212
216
  }
213
217
  }
214
218
  }
@@ -230,7 +234,7 @@
230
234
  "content": {
231
235
  "application/json": {
232
236
  "schema": {
233
- "$ref": "#/components/schemas/Envelope_Success"
237
+ "$ref": "#/components/schemas/ApiResponse_Success"
234
238
  }
235
239
  }
236
240
  }
@@ -269,7 +273,7 @@
269
273
  "content": {
270
274
  "application/json": {
271
275
  "schema": {
272
- "$ref": "#/components/schemas/Envelope_ScheduleResult"
276
+ "$ref": "#/components/schemas/ApiResponse_ScheduleResult"
273
277
  }
274
278
  }
275
279
  }
@@ -298,7 +302,7 @@
298
302
  "content": {
299
303
  "application/json": {
300
304
  "schema": {
301
- "$ref": "#/components/schemas/Envelope_PublishResult"
305
+ "$ref": "#/components/schemas/ApiResponse_PublishResult"
302
306
  }
303
307
  }
304
308
  }
@@ -332,7 +336,7 @@
332
336
  "content": {
333
337
  "application/json": {
334
338
  "schema": {
335
- "$ref": "#/components/schemas/Envelope_EmailSendResult"
339
+ "$ref": "#/components/schemas/ApiResponse_EmailSendResult"
336
340
  }
337
341
  }
338
342
  }
@@ -366,7 +370,7 @@
366
370
  "content": {
367
371
  "application/json": {
368
372
  "schema": {
369
- "$ref": "#/components/schemas/Envelope_BatchSendSummary"
373
+ "$ref": "#/components/schemas/ApiResponse_BatchSendSummary"
370
374
  }
371
375
  }
372
376
  }
@@ -390,7 +394,7 @@
390
394
  "content": {
391
395
  "application/json": {
392
396
  "schema": {
393
- "$ref": "#/components/schemas/Envelope_EmailTemplateArray"
397
+ "$ref": "#/components/schemas/ApiResponse_EmailTemplateArray"
394
398
  }
395
399
  }
396
400
  }
@@ -435,7 +439,7 @@
435
439
  "content": {
436
440
  "application/json": {
437
441
  "schema": {
438
- "$ref": "#/components/schemas/Envelope_EmailTemplateDetail"
442
+ "$ref": "#/components/schemas/ApiResponse_EmailTemplateDetail"
439
443
  }
440
444
  }
441
445
  }
@@ -464,7 +468,7 @@
464
468
  "content": {
465
469
  "application/json": {
466
470
  "schema": {
467
- "$ref": "#/components/schemas/Envelope_EmailSend"
471
+ "$ref": "#/components/schemas/ApiResponse_EmailSend"
468
472
  }
469
473
  }
470
474
  }
@@ -557,7 +561,7 @@
557
561
  "content": {
558
562
  "application/json": {
559
563
  "schema": {
560
- "$ref": "#/components/schemas/Envelope_ContactCreateResult"
564
+ "$ref": "#/components/schemas/ApiResponse_ContactCreateResult"
561
565
  }
562
566
  }
563
567
  }
@@ -603,7 +607,7 @@
603
607
  "content": {
604
608
  "application/json": {
605
609
  "schema": {
606
- "$ref": "#/components/schemas/Envelope_ImportContactsResult"
610
+ "$ref": "#/components/schemas/ApiResponse_ImportContactsResult"
607
611
  }
608
612
  }
609
613
  }
@@ -632,7 +636,7 @@
632
636
  "content": {
633
637
  "application/json": {
634
638
  "schema": {
635
- "$ref": "#/components/schemas/Envelope_Contact"
639
+ "$ref": "#/components/schemas/ApiResponse_Contact"
636
640
  }
637
641
  }
638
642
  }
@@ -664,7 +668,7 @@
664
668
  "content": {
665
669
  "application/json": {
666
670
  "schema": {
667
- "$ref": "#/components/schemas/Envelope_ContactUpdateResult"
671
+ "$ref": "#/components/schemas/ApiResponse_ContactUpdateResult"
668
672
  }
669
673
  }
670
674
  }
@@ -686,7 +690,7 @@
686
690
  "content": {
687
691
  "application/json": {
688
692
  "schema": {
689
- "$ref": "#/components/schemas/Envelope_ContactRemoveResult"
693
+ "$ref": "#/components/schemas/ApiResponse_ContactRemoveResult"
690
694
  }
691
695
  }
692
696
  }
@@ -762,7 +766,7 @@
762
766
  "content": {
763
767
  "application/json": {
764
768
  "schema": {
765
- "$ref": "#/components/schemas/Envelope_ContactNoteResult"
769
+ "$ref": "#/components/schemas/ApiResponse_ContactNoteResult"
766
770
  }
767
771
  }
768
772
  }
@@ -840,7 +844,7 @@
840
844
  "content": {
841
845
  "application/json": {
842
846
  "schema": {
843
- "$ref": "#/components/schemas/Envelope_DealCreateResult"
847
+ "$ref": "#/components/schemas/ApiResponse_DealCreateResult"
844
848
  }
845
849
  }
846
850
  }
@@ -869,7 +873,7 @@
869
873
  "content": {
870
874
  "application/json": {
871
875
  "schema": {
872
- "$ref": "#/components/schemas/Envelope_Deal"
876
+ "$ref": "#/components/schemas/ApiResponse_Deal"
873
877
  }
874
878
  }
875
879
  }
@@ -901,7 +905,7 @@
901
905
  "content": {
902
906
  "application/json": {
903
907
  "schema": {
904
- "$ref": "#/components/schemas/Envelope_DealUpdateResult"
908
+ "$ref": "#/components/schemas/ApiResponse_DealUpdateResult"
905
909
  }
906
910
  }
907
911
  }
@@ -923,7 +927,7 @@
923
927
  "content": {
924
928
  "application/json": {
925
929
  "schema": {
926
- "$ref": "#/components/schemas/Envelope_DealRemoveResult"
930
+ "$ref": "#/components/schemas/ApiResponse_DealRemoveResult"
927
931
  }
928
932
  }
929
933
  }
@@ -947,7 +951,7 @@
947
951
  "content": {
948
952
  "application/json": {
949
953
  "schema": {
950
- "$ref": "#/components/schemas/Envelope_GdprExportRequest"
954
+ "$ref": "#/components/schemas/ApiResponse_GdprExportRequest"
951
955
  }
952
956
  }
953
957
  }
@@ -971,7 +975,7 @@
971
975
  "content": {
972
976
  "application/json": {
973
977
  "schema": {
974
- "$ref": "#/components/schemas/Envelope_GdprExportArray"
978
+ "$ref": "#/components/schemas/ApiResponse_GdprExportArray"
975
979
  }
976
980
  }
977
981
  }
@@ -1000,7 +1004,7 @@
1000
1004
  "content": {
1001
1005
  "application/json": {
1002
1006
  "schema": {
1003
- "$ref": "#/components/schemas/Envelope_GdprExport"
1007
+ "$ref": "#/components/schemas/ApiResponse_GdprExport"
1004
1008
  }
1005
1009
  }
1006
1010
  }
@@ -1034,7 +1038,7 @@
1034
1038
  "content": {
1035
1039
  "application/json": {
1036
1040
  "schema": {
1037
- "$ref": "#/components/schemas/Envelope_ConsentResult"
1041
+ "$ref": "#/components/schemas/ApiResponse_ConsentResult"
1038
1042
  }
1039
1043
  }
1040
1044
  }
@@ -1069,7 +1073,7 @@
1069
1073
  "content": {
1070
1074
  "application/json": {
1071
1075
  "schema": {
1072
- "$ref": "#/components/schemas/Envelope_ConsentRecordArray"
1076
+ "$ref": "#/components/schemas/ApiResponse_ConsentRecordArray"
1073
1077
  }
1074
1078
  }
1075
1079
  }
@@ -1127,7 +1131,7 @@
1127
1131
  "content": {
1128
1132
  "application/json": {
1129
1133
  "schema": {
1130
- "$ref": "#/components/schemas/Envelope_WorkspaceArray"
1134
+ "$ref": "#/components/schemas/ApiResponse_WorkspaceArray"
1131
1135
  }
1132
1136
  }
1133
1137
  }
@@ -1233,7 +1237,7 @@
1233
1237
  "content": {
1234
1238
  "application/json": {
1235
1239
  "schema": {
1236
- "$ref": "#/components/schemas/Envelope_HelpdeskConversation"
1240
+ "$ref": "#/components/schemas/ApiResponse_HelpdeskConversation"
1237
1241
  }
1238
1242
  }
1239
1243
  }
@@ -1266,7 +1270,7 @@
1266
1270
  "content": {
1267
1271
  "application/json": {
1268
1272
  "schema": {
1269
- "$ref": "#/components/schemas/Envelope_HelpdeskConversationUpdateResult"
1273
+ "$ref": "#/components/schemas/ApiResponse_HelpdeskConversationUpdateResult"
1270
1274
  }
1271
1275
  }
1272
1276
  }
@@ -1354,7 +1358,7 @@
1354
1358
  "content": {
1355
1359
  "application/json": {
1356
1360
  "schema": {
1357
- "$ref": "#/components/schemas/Envelope_HelpdeskReplyCreateResult"
1361
+ "$ref": "#/components/schemas/ApiResponse_HelpdeskReplyCreateResult"
1358
1362
  }
1359
1363
  }
1360
1364
  }
@@ -1378,7 +1382,7 @@
1378
1382
  "content": {
1379
1383
  "application/json": {
1380
1384
  "schema": {
1381
- "$ref": "#/components/schemas/Envelope_WebhookEndpointArray"
1385
+ "$ref": "#/components/schemas/ApiResponse_WebhookEndpointArray"
1382
1386
  }
1383
1387
  }
1384
1388
  }
@@ -1411,7 +1415,7 @@
1411
1415
  "content": {
1412
1416
  "application/json": {
1413
1417
  "schema": {
1414
- "$ref": "#/components/schemas/Envelope_WebhookEndpoint"
1418
+ "$ref": "#/components/schemas/ApiResponse_WebhookEndpoint"
1415
1419
  }
1416
1420
  }
1417
1421
  }
@@ -1440,7 +1444,7 @@
1440
1444
  "content": {
1441
1445
  "application/json": {
1442
1446
  "schema": {
1443
- "$ref": "#/components/schemas/Envelope_WebhookEndpoint"
1447
+ "$ref": "#/components/schemas/ApiResponse_WebhookEndpoint"
1444
1448
  }
1445
1449
  }
1446
1450
  }
@@ -1473,7 +1477,7 @@
1473
1477
  "content": {
1474
1478
  "application/json": {
1475
1479
  "schema": {
1476
- "$ref": "#/components/schemas/Envelope_WebhookEndpoint"
1480
+ "$ref": "#/components/schemas/ApiResponse_WebhookEndpoint"
1477
1481
  }
1478
1482
  }
1479
1483
  }
@@ -1496,7 +1500,7 @@
1496
1500
  "content": {
1497
1501
  "application/json": {
1498
1502
  "schema": {
1499
- "$ref": "#/components/schemas/Envelope_WebhookDeleteResult"
1503
+ "$ref": "#/components/schemas/ApiResponse_WebhookDeleteResult"
1500
1504
  }
1501
1505
  }
1502
1506
  }
@@ -1536,7 +1540,7 @@
1536
1540
  "content": {
1537
1541
  "application/json": {
1538
1542
  "schema": {
1539
- "$ref": "#/components/schemas/Envelope_WebhookDeliveryArray"
1543
+ "$ref": "#/components/schemas/ApiResponse_WebhookDeliveryArray"
1540
1544
  }
1541
1545
  }
1542
1546
  }
@@ -1566,7 +1570,165 @@
1566
1570
  "content": {
1567
1571
  "application/json": {
1568
1572
  "schema": {
1569
- "$ref": "#/components/schemas/Envelope_WebhookTestResult"
1573
+ "$ref": "#/components/schemas/ApiResponse_WebhookTestResult"
1574
+ }
1575
+ }
1576
+ }
1577
+ },
1578
+ "default": {
1579
+ "$ref": "#/components/responses/ApiError"
1580
+ }
1581
+ }
1582
+ }
1583
+ },
1584
+ "/api/v1/channels/connect-links": {
1585
+ "post": {
1586
+ "tags": [
1587
+ "Channels"
1588
+ ],
1589
+ "operationId": "createChannelConnectLink",
1590
+ "summary": "Mint a hosted connect link",
1591
+ "description": "Mints a single-use hosted connect link that lets an external person (no Medal account required) attach a channel account (e.g. `telegram_inbox`) to the workspace's helpdesk. The response's `data.url` contains the one-time link token EXACTLY ONCE — an idempotent replay (same `Idempotency-Key`) returns the link WITHOUT `url`. Requires the `channel.connect.manage` scope; OAuth callers additionally need the workspace `admin` role.",
1592
+ "requestBody": {
1593
+ "required": true,
1594
+ "content": {
1595
+ "application/json": {
1596
+ "schema": {
1597
+ "$ref": "#/components/schemas/CreateConnectLinkInput"
1598
+ }
1599
+ }
1600
+ }
1601
+ },
1602
+ "responses": {
1603
+ "201": {
1604
+ "description": "Minted connect link, including the one-time `url`.",
1605
+ "content": {
1606
+ "application/json": {
1607
+ "schema": {
1608
+ "$ref": "#/components/schemas/ApiResponse_ConnectLinkCreateResult"
1609
+ }
1610
+ }
1611
+ }
1612
+ },
1613
+ "default": {
1614
+ "$ref": "#/components/responses/ApiError"
1615
+ }
1616
+ }
1617
+ },
1618
+ "get": {
1619
+ "tags": [
1620
+ "Channels"
1621
+ ],
1622
+ "operationId": "listChannelConnectLinks",
1623
+ "summary": "List connect links",
1624
+ "description": "Link tokens are never returned.",
1625
+ "parameters": [
1626
+ {
1627
+ "name": "channel_type",
1628
+ "in": "query",
1629
+ "schema": {
1630
+ "type": "string"
1631
+ }
1632
+ },
1633
+ {
1634
+ "name": "status",
1635
+ "in": "query",
1636
+ "schema": {
1637
+ "$ref": "#/components/schemas/ConnectLinkStatus"
1638
+ }
1639
+ }
1640
+ ],
1641
+ "responses": {
1642
+ "200": {
1643
+ "description": "The workspace's connect links.",
1644
+ "content": {
1645
+ "application/json": {
1646
+ "schema": {
1647
+ "$ref": "#/components/schemas/ApiResponse_ConnectLinkArray"
1648
+ }
1649
+ }
1650
+ }
1651
+ },
1652
+ "default": {
1653
+ "$ref": "#/components/responses/ApiError"
1654
+ }
1655
+ }
1656
+ }
1657
+ },
1658
+ "/api/v1/channels/connect-links/{id}": {
1659
+ "parameters": [
1660
+ {
1661
+ "$ref": "#/components/parameters/Id"
1662
+ }
1663
+ ],
1664
+ "delete": {
1665
+ "tags": [
1666
+ "Channels"
1667
+ ],
1668
+ "operationId": "revokeChannelConnectLink",
1669
+ "summary": "Revoke a connect link",
1670
+ "description": "Revokes a pending connect link so it can no longer be consumed. OAuth callers need the workspace `admin` role.",
1671
+ "responses": {
1672
+ "200": {
1673
+ "description": "Revoke result.",
1674
+ "content": {
1675
+ "application/json": {
1676
+ "schema": {
1677
+ "$ref": "#/components/schemas/ApiResponse_ConnectLinkRevokeResult"
1678
+ }
1679
+ }
1680
+ }
1681
+ },
1682
+ "default": {
1683
+ "$ref": "#/components/responses/ApiError"
1684
+ }
1685
+ }
1686
+ }
1687
+ },
1688
+ "/api/v1/channels/connections": {
1689
+ "get": {
1690
+ "tags": [
1691
+ "Channels"
1692
+ ],
1693
+ "operationId": "listChannelConnections",
1694
+ "summary": "List channel connections",
1695
+ "responses": {
1696
+ "200": {
1697
+ "description": "The workspace's channel connections (generic shape).",
1698
+ "content": {
1699
+ "application/json": {
1700
+ "schema": {
1701
+ "$ref": "#/components/schemas/ApiResponse_ChannelConnectionArray"
1702
+ }
1703
+ }
1704
+ }
1705
+ },
1706
+ "default": {
1707
+ "$ref": "#/components/responses/ApiError"
1708
+ }
1709
+ }
1710
+ }
1711
+ },
1712
+ "/api/v1/channels/connections/{id}": {
1713
+ "parameters": [
1714
+ {
1715
+ "$ref": "#/components/parameters/Id"
1716
+ }
1717
+ ],
1718
+ "delete": {
1719
+ "tags": [
1720
+ "Channels"
1721
+ ],
1722
+ "operationId": "disconnectChannelConnection",
1723
+ "summary": "Disconnect a channel connection",
1724
+ "description": "Disconnects a connected channel account (best-effort platform logout, then local revoke). Emits a `helpdesk.channel_disconnected` webhook event with `reason: \"api_disconnect\"` if the account was previously connected. OAuth callers need the workspace `admin` role.",
1725
+ "responses": {
1726
+ "200": {
1727
+ "description": "Disconnect result.",
1728
+ "content": {
1729
+ "application/json": {
1730
+ "schema": {
1731
+ "$ref": "#/components/schemas/ApiResponse_ChannelConnectionDisconnectResult"
1570
1732
  }
1571
1733
  }
1572
1734
  }
@@ -2040,6 +2202,17 @@
2040
2202
  },
2041
2203
  "contact_id": {
2042
2204
  "type": "string"
2205
+ },
2206
+ "idempotency_key": {
2207
+ "type": "string"
2208
+ },
2209
+ "copy_to": {
2210
+ "type": "string",
2211
+ "format": "email"
2212
+ },
2213
+ "copy_reply_to": {
2214
+ "type": "string",
2215
+ "format": "email"
2043
2216
  }
2044
2217
  }
2045
2218
  },
@@ -2047,11 +2220,30 @@
2047
2220
  "type": "object",
2048
2221
  "required": [
2049
2222
  "id",
2223
+ "copy_id",
2224
+ "contact_id",
2050
2225
  "status"
2051
2226
  ],
2052
2227
  "properties": {
2053
2228
  "id": {
2054
- "type": "string"
2229
+ "type": [
2230
+ "string",
2231
+ "null"
2232
+ ],
2233
+ "description": "Email send id — poll GET /api/v1/emails/{id} with it."
2234
+ },
2235
+ "copy_id": {
2236
+ "type": [
2237
+ "string",
2238
+ "null"
2239
+ ],
2240
+ "description": "Send id of the copy_to copy, or null when no copy was requested."
2241
+ },
2242
+ "contact_id": {
2243
+ "type": [
2244
+ "string",
2245
+ "null"
2246
+ ]
2055
2247
  },
2056
2248
  "status": {
2057
2249
  "type": "string"
@@ -2202,7 +2394,8 @@
2202
2394
  "batch_id",
2203
2395
  "total",
2204
2396
  "queued",
2205
- "failed"
2397
+ "failed",
2398
+ "results"
2206
2399
  ],
2207
2400
  "properties": {
2208
2401
  "batch_id": {
@@ -2216,6 +2409,49 @@
2216
2409
  },
2217
2410
  "failed": {
2218
2411
  "type": "integer"
2412
+ },
2413
+ "results": {
2414
+ "type": "array",
2415
+ "description": "Per-recipient outcome, in request order.",
2416
+ "items": {
2417
+ "$ref": "#/components/schemas/BatchSendRecipientResult"
2418
+ }
2419
+ }
2420
+ }
2421
+ },
2422
+ "BatchSendRecipientResult": {
2423
+ "type": "object",
2424
+ "required": [
2425
+ "email",
2426
+ "id",
2427
+ "status",
2428
+ "error"
2429
+ ],
2430
+ "properties": {
2431
+ "email": {
2432
+ "type": "string",
2433
+ "format": "email"
2434
+ },
2435
+ "id": {
2436
+ "type": [
2437
+ "string",
2438
+ "null"
2439
+ ],
2440
+ "description": "Email send id — poll GET /api/v1/emails/{id} with it. Null when not queued."
2441
+ },
2442
+ "status": {
2443
+ "type": "string",
2444
+ "enum": [
2445
+ "queued",
2446
+ "failed"
2447
+ ]
2448
+ },
2449
+ "error": {
2450
+ "type": [
2451
+ "string",
2452
+ "null"
2453
+ ],
2454
+ "description": "Failure reason for recipients that were not queued."
2219
2455
  }
2220
2456
  }
2221
2457
  },
@@ -3978,6 +4214,207 @@
3978
4214
  }
3979
4215
  }
3980
4216
  },
4217
+ "ConnectLinkStatus": {
4218
+ "type": "string",
4219
+ "enum": [
4220
+ "pending",
4221
+ "consumed",
4222
+ "expired",
4223
+ "revoked"
4224
+ ]
4225
+ },
4226
+ "ChannelConnectionState": {
4227
+ "type": "string",
4228
+ "enum": [
4229
+ "connecting",
4230
+ "active",
4231
+ "disconnected",
4232
+ "disabled"
4233
+ ]
4234
+ },
4235
+ "CreateConnectLinkInput": {
4236
+ "type": "object",
4237
+ "required": [
4238
+ "channel_type"
4239
+ ],
4240
+ "properties": {
4241
+ "channel_type": {
4242
+ "type": "string",
4243
+ "maxLength": 64,
4244
+ "description": "Channel type to connect (e.g. `telegram_inbox`)."
4245
+ },
4246
+ "label": {
4247
+ "type": "string",
4248
+ "maxLength": 100,
4249
+ "description": "Display label shown on the hosted connect page."
4250
+ },
4251
+ "redirect_url": {
4252
+ "type": "string",
4253
+ "format": "uri",
4254
+ "maxLength": 2000,
4255
+ "description": "URL the hosted page redirects to after a successful connect — must be https."
4256
+ }
4257
+ }
4258
+ },
4259
+ "ConnectLinkCreateResult": {
4260
+ "type": "object",
4261
+ "required": [
4262
+ "id",
4263
+ "channel_type",
4264
+ "label",
4265
+ "status",
4266
+ "expires_at"
4267
+ ],
4268
+ "properties": {
4269
+ "id": {
4270
+ "type": "string"
4271
+ },
4272
+ "url": {
4273
+ "type": "string",
4274
+ "format": "uri",
4275
+ "description": "Single-use hosted connect URL containing the one-time link token — present ONLY in the live create response. An idempotent replay of the create request omits it; the token can never be retrieved again."
4276
+ },
4277
+ "channel_type": {
4278
+ "type": "string"
4279
+ },
4280
+ "label": {
4281
+ "type": [
4282
+ "string",
4283
+ "null"
4284
+ ]
4285
+ },
4286
+ "status": {
4287
+ "$ref": "#/components/schemas/ConnectLinkStatus"
4288
+ },
4289
+ "expires_at": {
4290
+ "type": "integer",
4291
+ "description": "Unix timestamp in milliseconds."
4292
+ }
4293
+ }
4294
+ },
4295
+ "ConnectLink": {
4296
+ "type": "object",
4297
+ "required": [
4298
+ "id",
4299
+ "channel_type",
4300
+ "label",
4301
+ "status",
4302
+ "consumed_connection_ref",
4303
+ "expires_at",
4304
+ "created_at"
4305
+ ],
4306
+ "properties": {
4307
+ "id": {
4308
+ "type": "string"
4309
+ },
4310
+ "channel_type": {
4311
+ "type": "string"
4312
+ },
4313
+ "label": {
4314
+ "type": [
4315
+ "string",
4316
+ "null"
4317
+ ]
4318
+ },
4319
+ "status": {
4320
+ "$ref": "#/components/schemas/ConnectLinkStatus"
4321
+ },
4322
+ "consumed_connection_ref": {
4323
+ "type": [
4324
+ "string",
4325
+ "null"
4326
+ ],
4327
+ "description": "Stable ref of the connection created by consuming this link, or `null`."
4328
+ },
4329
+ "expires_at": {
4330
+ "type": "integer",
4331
+ "description": "Unix timestamp in milliseconds."
4332
+ },
4333
+ "created_at": {
4334
+ "type": "integer",
4335
+ "description": "Unix timestamp in milliseconds."
4336
+ }
4337
+ }
4338
+ },
4339
+ "ConnectLinkRevokeResult": {
4340
+ "type": "object",
4341
+ "required": [
4342
+ "id",
4343
+ "status"
4344
+ ],
4345
+ "properties": {
4346
+ "id": {
4347
+ "type": "string"
4348
+ },
4349
+ "status": {
4350
+ "type": "string",
4351
+ "const": "revoked"
4352
+ }
4353
+ }
4354
+ },
4355
+ "ChannelConnection": {
4356
+ "type": "object",
4357
+ "required": [
4358
+ "id",
4359
+ "channel_type",
4360
+ "label",
4361
+ "state",
4362
+ "masked_identity",
4363
+ "last_activity_at",
4364
+ "helpdesk_connection_id"
4365
+ ],
4366
+ "properties": {
4367
+ "id": {
4368
+ "type": "string"
4369
+ },
4370
+ "channel_type": {
4371
+ "type": "string"
4372
+ },
4373
+ "label": {
4374
+ "type": [
4375
+ "string",
4376
+ "null"
4377
+ ]
4378
+ },
4379
+ "state": {
4380
+ "$ref": "#/components/schemas/ChannelConnectionState"
4381
+ },
4382
+ "masked_identity": {
4383
+ "type": "string",
4384
+ "description": "Privacy-preserving identity handle (e.g. a masked phone number)."
4385
+ },
4386
+ "last_activity_at": {
4387
+ "type": [
4388
+ "integer",
4389
+ "null"
4390
+ ],
4391
+ "description": "Unix timestamp in milliseconds, or `null` if never active."
4392
+ },
4393
+ "helpdesk_connection_id": {
4394
+ "type": [
4395
+ "string",
4396
+ "null"
4397
+ ],
4398
+ "description": "Linked helpdesk channel connection ID, or `null`."
4399
+ }
4400
+ }
4401
+ },
4402
+ "ChannelConnectionDisconnectResult": {
4403
+ "type": "object",
4404
+ "required": [
4405
+ "id",
4406
+ "state"
4407
+ ],
4408
+ "properties": {
4409
+ "id": {
4410
+ "type": "string"
4411
+ },
4412
+ "state": {
4413
+ "type": "string",
4414
+ "const": "disconnected"
4415
+ }
4416
+ }
4417
+ },
3981
4418
  "ApiResponse_PostCreateResult": {
3982
4419
  "$ref": "#/components/schemas/Envelope_PostCreateResult"
3983
4420
  },
@@ -4083,6 +4520,21 @@
4083
4520
  "ApiResponse_WebhookTestResult": {
4084
4521
  "$ref": "#/components/schemas/Envelope_WebhookTestResult"
4085
4522
  },
4523
+ "ApiResponse_ConnectLinkCreateResult": {
4524
+ "$ref": "#/components/schemas/Envelope_ConnectLinkCreateResult"
4525
+ },
4526
+ "ApiResponse_ConnectLinkArray": {
4527
+ "$ref": "#/components/schemas/Envelope_ConnectLinkArray"
4528
+ },
4529
+ "ApiResponse_ConnectLinkRevokeResult": {
4530
+ "$ref": "#/components/schemas/Envelope_ConnectLinkRevokeResult"
4531
+ },
4532
+ "ApiResponse_ChannelConnectionArray": {
4533
+ "$ref": "#/components/schemas/Envelope_ChannelConnectionArray"
4534
+ },
4535
+ "ApiResponse_ChannelConnectionDisconnectResult": {
4536
+ "$ref": "#/components/schemas/Envelope_ChannelConnectionDisconnectResult"
4537
+ },
4086
4538
  "PaginatedResponse_Post": {
4087
4539
  "type": "object",
4088
4540
  "required": [
@@ -4596,6 +5048,67 @@
4596
5048
  "$ref": "#/components/schemas/WebhookTestResult"
4597
5049
  }
4598
5050
  }
5051
+ },
5052
+ "Envelope_ConnectLinkCreateResult": {
5053
+ "type": "object",
5054
+ "required": [
5055
+ "data"
5056
+ ],
5057
+ "properties": {
5058
+ "data": {
5059
+ "$ref": "#/components/schemas/ConnectLinkCreateResult"
5060
+ }
5061
+ }
5062
+ },
5063
+ "Envelope_ConnectLinkArray": {
5064
+ "type": "object",
5065
+ "required": [
5066
+ "data"
5067
+ ],
5068
+ "properties": {
5069
+ "data": {
5070
+ "type": "array",
5071
+ "items": {
5072
+ "$ref": "#/components/schemas/ConnectLink"
5073
+ }
5074
+ }
5075
+ }
5076
+ },
5077
+ "Envelope_ConnectLinkRevokeResult": {
5078
+ "type": "object",
5079
+ "required": [
5080
+ "data"
5081
+ ],
5082
+ "properties": {
5083
+ "data": {
5084
+ "$ref": "#/components/schemas/ConnectLinkRevokeResult"
5085
+ }
5086
+ }
5087
+ },
5088
+ "Envelope_ChannelConnectionArray": {
5089
+ "type": "object",
5090
+ "required": [
5091
+ "data"
5092
+ ],
5093
+ "properties": {
5094
+ "data": {
5095
+ "type": "array",
5096
+ "items": {
5097
+ "$ref": "#/components/schemas/ChannelConnection"
5098
+ }
5099
+ }
5100
+ }
5101
+ },
5102
+ "Envelope_ChannelConnectionDisconnectResult": {
5103
+ "type": "object",
5104
+ "required": [
5105
+ "data"
5106
+ ],
5107
+ "properties": {
5108
+ "data": {
5109
+ "$ref": "#/components/schemas/ChannelConnectionDisconnectResult"
5110
+ }
5111
+ }
4599
5112
  }
4600
5113
  }
4601
5114
  }