@zapier/zapier-sdk-core 0.7.1 → 0.8.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/openapi.yaml CHANGED
@@ -16,9 +16,11 @@ tags:
16
16
  - name: Apps
17
17
  description: App-related routes
18
18
  - name: Authentications
19
- description: Authentication-related routes
19
+ description: Authentication-related routes (deprecated, use Connections)
20
20
  - name: Client Credentials
21
21
  description: Client credentials management routes
22
+ - name: Connections
23
+ description: Connection-related routes
22
24
  - name: Deduplication
23
25
  description: Deduplication-related routes
24
26
  - name: Documentation
@@ -378,6 +380,141 @@ components:
378
380
  $ref: "#/components/schemas/AuthenticationItem"
379
381
  required:
380
382
  - data
383
+ ConnectionItem:
384
+ type: object
385
+ properties:
386
+ id:
387
+ type: string
388
+ description: Unique identifier for the connection
389
+ date:
390
+ type: string
391
+ description: Date created
392
+ lastchanged:
393
+ type: string
394
+ description: Date last changed
395
+ account_id:
396
+ type: string
397
+ description: Account ID associated with this connection
398
+ destination_selected_api:
399
+ type:
400
+ - string
401
+ - "null"
402
+ description: Destination API key (if applicable)
403
+ is_invite_only:
404
+ type: boolean
405
+ description: Whether the connection is invite-only
406
+ is_private:
407
+ type: boolean
408
+ description: Whether the connection is private
409
+ shared_with_all:
410
+ type: boolean
411
+ description: Whether the connection is shared with all users
412
+ is_stale:
413
+ type: string
414
+ description: Stale status string
415
+ is_shared:
416
+ type: string
417
+ description: Shared status string
418
+ marked_stale_at:
419
+ type:
420
+ - string
421
+ - "null"
422
+ description: Date when marked stale
423
+ label:
424
+ type:
425
+ - string
426
+ - "null"
427
+ description: User label for the connection
428
+ identifier:
429
+ type:
430
+ - string
431
+ - "null"
432
+ description: Identifier
433
+ title:
434
+ type:
435
+ - string
436
+ - "null"
437
+ description: Title of the connection
438
+ url:
439
+ type: string
440
+ description: URL to the connection resource
441
+ groups:
442
+ type: array
443
+ items:
444
+ type: object
445
+ additionalProperties: {}
446
+ description: Groups associated with the connection
447
+ description: Array of groups associated with the connection
448
+ members:
449
+ type: string
450
+ description: Members associated with the connection
451
+ permissions:
452
+ type: object
453
+ additionalProperties:
454
+ type: boolean
455
+ description: Permissions for the connection
456
+ implementation_id:
457
+ type: string
458
+ description: Implementation ID (was selected_api)
459
+ profile_id:
460
+ type: string
461
+ description: Profile ID (was customuser_id)
462
+ is_expired:
463
+ type: string
464
+ description: Whether the connection is expired (mapped from is_stale)
465
+ expired_at:
466
+ type:
467
+ - string
468
+ - "null"
469
+ description: Date when connection expired (mapped from marked_stale_at)
470
+ app_key:
471
+ type: string
472
+ description: App Key extracted from implementation_id
473
+ app_version:
474
+ type: string
475
+ description: App Version extracted from implementation_id
476
+ required:
477
+ - id
478
+ - date
479
+ - account_id
480
+ - is_invite_only
481
+ - is_private
482
+ - shared_with_all
483
+ description: Normalized connection item returned by getConnection handler
484
+ example:
485
+ id: "12345"
486
+ date: 2023-01-15T10:30:00Z
487
+ lastchanged: 2023-06-20T14:45:00Z
488
+ account_id: "98765"
489
+ destination_selected_api: null
490
+ is_invite_only: false
491
+ is_private: true
492
+ shared_with_all: false
493
+ is_stale: "false"
494
+ is_shared: "false"
495
+ marked_stale_at: null
496
+ label: My Slack Account
497
+ identifier: user@example.com
498
+ title: Slack - Personal Workspace
499
+ url: /api/v0/connections/12345
500
+ groups: []
501
+ members: ""
502
+ permissions:
503
+ can_view: true
504
+ can_delete: true
505
+ implementation_id: SlackCLIAPI@1.0.0
506
+ profile_id: "54321"
507
+ is_expired: "false"
508
+ expired_at: null
509
+ app_key: SlackCLIAPI
510
+ app_version: 1.0.0
511
+ GetConnectionResponse:
512
+ type: object
513
+ properties:
514
+ data:
515
+ $ref: "#/components/schemas/ConnectionItem"
516
+ required:
517
+ - data
381
518
  ListActionsResponse:
382
519
  type: object
383
520
  properties:
@@ -841,6 +978,143 @@ components:
841
978
  - links
842
979
  - meta
843
980
  description: Response for listing client credentials
981
+ ListConnectionsResponse:
982
+ type: object
983
+ properties:
984
+ data:
985
+ type: array
986
+ items:
987
+ type: object
988
+ properties:
989
+ id:
990
+ type: string
991
+ description: Unique identifier for the connection
992
+ date:
993
+ type: string
994
+ description: Date created
995
+ lastchanged:
996
+ type: string
997
+ description: Date last changed
998
+ account_id:
999
+ type: string
1000
+ description: Account ID associated with this connection
1001
+ destination_selected_api:
1002
+ type:
1003
+ - string
1004
+ - "null"
1005
+ description: Destination API key (if applicable)
1006
+ is_invite_only:
1007
+ type: boolean
1008
+ description: Whether the connection is invite-only
1009
+ is_private:
1010
+ type: boolean
1011
+ description: Whether the connection is private
1012
+ shared_with_all:
1013
+ type: boolean
1014
+ description: Whether the connection is shared with all users
1015
+ is_stale:
1016
+ type: string
1017
+ description: Stale status string
1018
+ is_shared:
1019
+ type: string
1020
+ description: Shared status string
1021
+ marked_stale_at:
1022
+ type:
1023
+ - string
1024
+ - "null"
1025
+ description: Date when marked stale
1026
+ label:
1027
+ type:
1028
+ - string
1029
+ - "null"
1030
+ description: User label for the connection
1031
+ identifier:
1032
+ type:
1033
+ - string
1034
+ - "null"
1035
+ description: Identifier
1036
+ title:
1037
+ type:
1038
+ - string
1039
+ - "null"
1040
+ description: Title of the connection
1041
+ url:
1042
+ type: string
1043
+ description: URL to the connection resource
1044
+ groups:
1045
+ type: array
1046
+ items:
1047
+ type: object
1048
+ additionalProperties: {}
1049
+ description: Groups associated with the connection
1050
+ description: Array of groups associated with the connection
1051
+ members:
1052
+ type: string
1053
+ description: Members associated with the connection
1054
+ permissions:
1055
+ type: object
1056
+ additionalProperties:
1057
+ type: boolean
1058
+ description: Permissions for the connection
1059
+ implementation_id:
1060
+ type: string
1061
+ description: Implementation ID (was selected_api)
1062
+ profile_id:
1063
+ type: string
1064
+ description: Profile ID (was customuser_id)
1065
+ is_expired:
1066
+ type: string
1067
+ description: Whether the connection is expired (mapped from is_stale)
1068
+ expired_at:
1069
+ type:
1070
+ - string
1071
+ - "null"
1072
+ description: Date when connection expired (mapped from marked_stale_at)
1073
+ app_key:
1074
+ type: string
1075
+ description: App Key extracted from implementation_id
1076
+ app_version:
1077
+ type: string
1078
+ description: App Version extracted from implementation_id
1079
+ required:
1080
+ - id
1081
+ - date
1082
+ - account_id
1083
+ - is_invite_only
1084
+ - is_private
1085
+ - shared_with_all
1086
+ description: Array of connection items
1087
+ links:
1088
+ type: object
1089
+ properties:
1090
+ next:
1091
+ type:
1092
+ - string
1093
+ - "null"
1094
+ description: Fully qualified URL for the next page of results (if available), e.g. https://sdkapi.zapier.com/api/v0/connections?offset=100&page_size=50
1095
+ description: Pagination links for navigating through results
1096
+ meta:
1097
+ type: object
1098
+ properties:
1099
+ count:
1100
+ type: number
1101
+ description: Total number of items
1102
+ limit:
1103
+ type: number
1104
+ description: Number of items per page
1105
+ offset:
1106
+ type: number
1107
+ description: Offset of the current page
1108
+ required:
1109
+ - count
1110
+ - limit
1111
+ - offset
1112
+ description: Metadata for the paginated result set
1113
+ required:
1114
+ - data
1115
+ - links
1116
+ - meta
1117
+ description: Response schema for listing connections
844
1118
  parameters: {}
845
1119
  securitySchemes:
846
1120
  userJwt:
@@ -939,8 +1213,9 @@ paths:
939
1213
  operationId: v0_create_client_credentials
940
1214
  security:
941
1215
  - userJwt: []
942
- x-required-scopes:
943
- - credentials
1216
+ x-fastify-config:
1217
+ requiredScopes:
1218
+ - credentials
944
1219
  requestBody:
945
1220
  content:
946
1221
  application/json:
@@ -990,8 +1265,9 @@ paths:
990
1265
  operationId: v0_list_client_credentials
991
1266
  security:
992
1267
  - userJwt: []
993
- x-required-scopes:
994
- - credentials
1268
+ x-fastify-config:
1269
+ requiredScopes:
1270
+ - credentials
995
1271
  parameters:
996
1272
  - schema:
997
1273
  type: integer
@@ -1050,8 +1326,9 @@ paths:
1050
1326
  operationId: v0_delete_client_credentials
1051
1327
  security:
1052
1328
  - userJwt: []
1053
- x-required-scopes:
1054
- - credentials
1329
+ x-fastify-config:
1330
+ requiredScopes:
1331
+ - credentials
1055
1332
  parameters:
1056
1333
  - schema:
1057
1334
  type: string
@@ -1132,7 +1409,8 @@ paths:
1132
1409
  /api/v0/authentications/{authenticationId}:
1133
1410
  get:
1134
1411
  summary: Get an authentication
1135
- description: Returns a single authentication by ID.
1412
+ description: "Returns a single authentication by ID. Deprecated: Use /api/v0/connections/{connectionId} instead."
1413
+ deprecated: true
1136
1414
  tags:
1137
1415
  - Authentications
1138
1416
  operationId: v0_get_authentication
@@ -1175,6 +1453,52 @@ paths:
1175
1453
  headers: *a6
1176
1454
  content:
1177
1455
  application/json: *a7
1456
+ /api/v0/connections/{connectionId}:
1457
+ get:
1458
+ summary: Get a connection
1459
+ description: Returns a single connection by ID.
1460
+ tags:
1461
+ - Connections
1462
+ operationId: v0_get_connection
1463
+ security:
1464
+ - userJwt: []
1465
+ parameters:
1466
+ - schema:
1467
+ type: string
1468
+ description: Connection ID to retrieve
1469
+ required: true
1470
+ description: Connection ID to retrieve
1471
+ name: connectionId
1472
+ in: path
1473
+ responses:
1474
+ "200":
1475
+ description: Success
1476
+ content:
1477
+ application/json:
1478
+ schema:
1479
+ $ref: "#/components/schemas/GetConnectionResponse"
1480
+ "400":
1481
+ description: Bad Request
1482
+ content:
1483
+ application/json: *a1
1484
+ "401":
1485
+ description: Unauthorized
1486
+ content:
1487
+ application/json: *a2
1488
+ "429":
1489
+ description: Too Many Requests
1490
+ headers: *a3
1491
+ content:
1492
+ application/json: *a4
1493
+ "500":
1494
+ description: Server Error
1495
+ content:
1496
+ application/json: *a5
1497
+ "503":
1498
+ description: Service Unavailable
1499
+ headers: *a6
1500
+ content:
1501
+ application/json: *a7
1178
1502
  /api/v0/actions:
1179
1503
  get:
1180
1504
  summary: List actions
@@ -1308,7 +1632,8 @@ paths:
1308
1632
  /api/v0/authentications:
1309
1633
  get:
1310
1634
  summary: List authentications
1311
- description: Returns a paginated list of authentications with optional filtering by app, search term, owner, etc.
1635
+ description: "Returns a paginated list of authentications with optional filtering by app, search term, owner, etc. Deprecated: Use /api/v0/connections instead."
1636
+ deprecated: true
1312
1637
  tags:
1313
1638
  - Authentications
1314
1639
  operationId: v0_list_authentications
@@ -1408,4 +1733,107 @@ paths:
1408
1733
  headers: *a6
1409
1734
  content:
1410
1735
  application/json: *a7
1736
+ /api/v0/connections:
1737
+ get:
1738
+ summary: List connections
1739
+ description: Returns a paginated list of connections with optional filtering by app, search term, owner, etc.
1740
+ tags:
1741
+ - Connections
1742
+ operationId: v0_list_connections
1743
+ security:
1744
+ - userJwt: []
1745
+ parameters:
1746
+ - schema:
1747
+ type: string
1748
+ description: Filter connections by app key (e.g., 'SlackCLIAPI' or slug like 'github')
1749
+ required: false
1750
+ description: Filter connections by app key (e.g., 'SlackCLIAPI' or slug like 'github')
1751
+ name: app_key
1752
+ in: query
1753
+ - schema:
1754
+ type: string
1755
+ description: Comma-separated list of connection IDs to filter by
1756
+ required: false
1757
+ description: Comma-separated list of connection IDs to filter by
1758
+ name: connection_ids
1759
+ in: query
1760
+ - schema:
1761
+ type: string
1762
+ description: Search term to filter connections by title
1763
+ required: false
1764
+ description: Search term to filter connections by title
1765
+ name: search
1766
+ in: query
1767
+ - schema:
1768
+ type: string
1769
+ description: Filter connections by exact title match (searches first, then filters locally)
1770
+ required: false
1771
+ description: Filter connections by exact title match (searches first, then filters locally)
1772
+ name: title
1773
+ in: query
1774
+ - schema:
1775
+ type: string
1776
+ description: Filter connections by account ID
1777
+ required: false
1778
+ description: Filter connections by account ID
1779
+ name: account_id
1780
+ in: query
1781
+ - schema:
1782
+ type: string
1783
+ description: Filter by owner, 'me' for your own connections or a specific user ID
1784
+ required: false
1785
+ description: Filter by owner, 'me' for your own connections or a specific user ID
1786
+ name: owner
1787
+ in: query
1788
+ - schema:
1789
+ type: boolean
1790
+ description: Filter by expired status (true = expired only, false = non-expired only)
1791
+ required: false
1792
+ description: Filter by expired status (true = expired only, false = non-expired only)
1793
+ name: is_expired
1794
+ in: query
1795
+ - schema:
1796
+ type: number
1797
+ minimum: 1
1798
+ description: Number of connections per page
1799
+ required: false
1800
+ description: Number of connections per page
1801
+ name: page_size
1802
+ in: query
1803
+ - schema:
1804
+ type: string
1805
+ description: Pagination offset from previous response
1806
+ required: false
1807
+ description: Pagination offset from previous response
1808
+ name: offset
1809
+ in: query
1810
+ responses:
1811
+ "200":
1812
+ description: Successfully retrieved connections list
1813
+ content:
1814
+ application/json:
1815
+ schema:
1816
+ $ref: "#/components/schemas/ListConnectionsResponse"
1817
+ "400":
1818
+ description: Bad Request
1819
+ content:
1820
+ application/json: *a1
1821
+ "401":
1822
+ description: Unauthorized
1823
+ content:
1824
+ application/json: *a2
1825
+ "429":
1826
+ description: Too Many Requests
1827
+ headers: *a3
1828
+ content:
1829
+ application/json: *a4
1830
+ "500":
1831
+ description: Server Error
1832
+ content:
1833
+ application/json: *a5
1834
+ "503":
1835
+ description: Service Unavailable
1836
+ headers: *a6
1837
+ content:
1838
+ application/json: *a7
1411
1839
  webhooks: {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/zapier-sdk-core",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "description": "Core schemas and TypeScript types for the Zapier SDK API",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Zapier, Inc.",
@@ -31,6 +31,11 @@
31
31
  "import": "./dist/v0/schemas/authentications.js",
32
32
  "require": "./dist/v0/schemas/authentications.cjs"
33
33
  },
34
+ "./v0/schemas/connections": {
35
+ "types": "./dist/v0/schemas/connections.d.ts",
36
+ "import": "./dist/v0/schemas/connections.js",
37
+ "require": "./dist/v0/schemas/connections.cjs"
38
+ },
34
39
  "./v0/schemas/apps": {
35
40
  "types": "./dist/v0/schemas/apps.d.ts",
36
41
  "import": "./dist/v0/schemas/apps.js",