@zapier/zapier-sdk-core 0.6.0 → 0.7.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/CHANGELOG.md +6 -0
- package/dist/v0/config/metadata.cjs +4 -0
- package/dist/v0/config/metadata.cjs.map +1 -1
- package/dist/v0/config/metadata.js +4 -0
- package/dist/v0/config/metadata.js.map +1 -1
- package/dist/v0/schemas/actions.d.cts +28 -28
- package/dist/v0/schemas/actions.d.ts +28 -28
- package/dist/v0/schemas/apps.d.cts +30 -30
- package/dist/v0/schemas/apps.d.ts +30 -30
- package/dist/v0/schemas/client-credentials.cjs +113 -0
- package/dist/v0/schemas/client-credentials.cjs.map +1 -0
- package/dist/v0/schemas/client-credentials.d.cts +135 -0
- package/dist/v0/schemas/client-credentials.d.ts +135 -0
- package/dist/v0/schemas/client-credentials.js +78 -0
- package/dist/v0/schemas/client-credentials.js.map +1 -0
- package/openapi.yaml +287 -12
- package/package.json +6 -1
package/openapi.yaml
CHANGED
|
@@ -17,6 +17,8 @@ tags:
|
|
|
17
17
|
description: App-related routes
|
|
18
18
|
- name: Authentications
|
|
19
19
|
description: Authentication-related routes
|
|
20
|
+
- name: Client Credentials
|
|
21
|
+
description: Client credentials management routes
|
|
20
22
|
- name: Documentation
|
|
21
23
|
description: Documentation-related routes
|
|
22
24
|
components:
|
|
@@ -151,6 +153,50 @@ components:
|
|
|
151
153
|
required:
|
|
152
154
|
- errors
|
|
153
155
|
description: A JSON:API error response document containing an array of error objects.
|
|
156
|
+
CreateClientCredentialsResponse:
|
|
157
|
+
type: object
|
|
158
|
+
properties:
|
|
159
|
+
data:
|
|
160
|
+
type: object
|
|
161
|
+
properties:
|
|
162
|
+
client_id:
|
|
163
|
+
type: string
|
|
164
|
+
description: The public identifier (Client ID) of the OAuth application
|
|
165
|
+
name:
|
|
166
|
+
type: string
|
|
167
|
+
description: Human-readable name of the OAuth application
|
|
168
|
+
client_secret:
|
|
169
|
+
type: string
|
|
170
|
+
description: The client secret (only shown once on creation)
|
|
171
|
+
required:
|
|
172
|
+
- client_id
|
|
173
|
+
- name
|
|
174
|
+
- client_secret
|
|
175
|
+
description: The created client credentials (includes client_secret)
|
|
176
|
+
required:
|
|
177
|
+
- data
|
|
178
|
+
description: Response for creating client credentials
|
|
179
|
+
CreateClientCredentialsRequest:
|
|
180
|
+
type: object
|
|
181
|
+
properties:
|
|
182
|
+
name:
|
|
183
|
+
type: string
|
|
184
|
+
minLength: 1
|
|
185
|
+
maxLength: 255
|
|
186
|
+
description: Human-readable name for the client credentials
|
|
187
|
+
allowed_scopes:
|
|
188
|
+
type: array
|
|
189
|
+
items:
|
|
190
|
+
type: string
|
|
191
|
+
enum:
|
|
192
|
+
- credentials
|
|
193
|
+
- external
|
|
194
|
+
minItems: 1
|
|
195
|
+
description: List of OAuth scopes that this application will be allowed to request
|
|
196
|
+
required:
|
|
197
|
+
- name
|
|
198
|
+
- allowed_scopes
|
|
199
|
+
description: Request body for creating client credentials
|
|
154
200
|
AuthenticationItem:
|
|
155
201
|
type: object
|
|
156
202
|
properties:
|
|
@@ -681,6 +727,74 @@ components:
|
|
|
681
727
|
- links
|
|
682
728
|
- meta
|
|
683
729
|
description: Response schema for listing authentications
|
|
730
|
+
ListClientCredentialsResponse:
|
|
731
|
+
type: object
|
|
732
|
+
properties:
|
|
733
|
+
data:
|
|
734
|
+
type: array
|
|
735
|
+
items:
|
|
736
|
+
type: object
|
|
737
|
+
properties:
|
|
738
|
+
client_id:
|
|
739
|
+
type: string
|
|
740
|
+
description: The public identifier (Client ID) of the OAuth application
|
|
741
|
+
name:
|
|
742
|
+
type: string
|
|
743
|
+
description: Human-readable name of the OAuth application
|
|
744
|
+
allowed_scopes:
|
|
745
|
+
type: array
|
|
746
|
+
items:
|
|
747
|
+
type: string
|
|
748
|
+
enum:
|
|
749
|
+
- credentials
|
|
750
|
+
- external
|
|
751
|
+
description: List of OAuth scopes that this application is allowed to request
|
|
752
|
+
created_at:
|
|
753
|
+
type:
|
|
754
|
+
- string
|
|
755
|
+
- "null"
|
|
756
|
+
format: date-time
|
|
757
|
+
description: When the application was created (ISO 8601)
|
|
758
|
+
updated_at:
|
|
759
|
+
type: string
|
|
760
|
+
format: date-time
|
|
761
|
+
description: When the application was last updated (ISO 8601)
|
|
762
|
+
required:
|
|
763
|
+
- client_id
|
|
764
|
+
- name
|
|
765
|
+
- allowed_scopes
|
|
766
|
+
description: Array of client credentials
|
|
767
|
+
links:
|
|
768
|
+
type: object
|
|
769
|
+
properties:
|
|
770
|
+
next:
|
|
771
|
+
type:
|
|
772
|
+
- string
|
|
773
|
+
- "null"
|
|
774
|
+
description: URL for the next page of results (if available)
|
|
775
|
+
description: Pagination links
|
|
776
|
+
meta:
|
|
777
|
+
type: object
|
|
778
|
+
properties:
|
|
779
|
+
count:
|
|
780
|
+
type: number
|
|
781
|
+
description: Total number of items
|
|
782
|
+
limit:
|
|
783
|
+
type: number
|
|
784
|
+
description: Number of items per page
|
|
785
|
+
offset:
|
|
786
|
+
type: number
|
|
787
|
+
description: Offset of the current page
|
|
788
|
+
required:
|
|
789
|
+
- count
|
|
790
|
+
- limit
|
|
791
|
+
- offset
|
|
792
|
+
description: Pagination metadata
|
|
793
|
+
required:
|
|
794
|
+
- data
|
|
795
|
+
- links
|
|
796
|
+
- meta
|
|
797
|
+
description: Response for listing client credentials
|
|
684
798
|
parameters: {}
|
|
685
799
|
securitySchemes:
|
|
686
800
|
userJwt:
|
|
@@ -689,22 +803,36 @@ components:
|
|
|
689
803
|
name: Authorization
|
|
690
804
|
description: "Format should be `JWT <your-jwt>` (you must ensure that the JWT prefix is included in your requests).\\n\\nExample: `Authorization: JWT your.jwt.value.here`"
|
|
691
805
|
paths:
|
|
692
|
-
/api/v0/
|
|
693
|
-
|
|
694
|
-
summary:
|
|
695
|
-
description:
|
|
806
|
+
/api/v0/client-credentials:
|
|
807
|
+
post:
|
|
808
|
+
summary: Create client credentials
|
|
809
|
+
description: Creates new client credentials for the authenticated user. The client_secret is only returned once in this response and cannot be retrieved again.
|
|
696
810
|
tags:
|
|
697
|
-
-
|
|
698
|
-
operationId:
|
|
699
|
-
security:
|
|
811
|
+
- Client Credentials
|
|
812
|
+
operationId: v0_create_client_credentials
|
|
813
|
+
security:
|
|
814
|
+
- userJwt: []
|
|
815
|
+
x-required-scopes:
|
|
816
|
+
- credentials
|
|
817
|
+
requestBody:
|
|
818
|
+
content:
|
|
819
|
+
application/json:
|
|
820
|
+
schema:
|
|
821
|
+
$ref: "#/components/schemas/CreateClientCredentialsRequest"
|
|
822
|
+
examples:
|
|
823
|
+
default:
|
|
824
|
+
summary: Create credentials with external scope
|
|
825
|
+
value:
|
|
826
|
+
name: My App Credentials
|
|
827
|
+
allowed_scopes:
|
|
828
|
+
- external
|
|
700
829
|
responses:
|
|
701
|
-
"
|
|
702
|
-
description:
|
|
830
|
+
"201":
|
|
831
|
+
description: Client credentials created successfully
|
|
703
832
|
content:
|
|
704
|
-
|
|
833
|
+
application/json:
|
|
705
834
|
schema:
|
|
706
|
-
|
|
707
|
-
description: OpenAPI specification in YAML format
|
|
835
|
+
$ref: "#/components/schemas/CreateClientCredentialsResponse"
|
|
708
836
|
"400":
|
|
709
837
|
description: Bad Request
|
|
710
838
|
content:
|
|
@@ -757,6 +885,153 @@ paths:
|
|
|
757
885
|
application/json: &a7
|
|
758
886
|
schema:
|
|
759
887
|
$ref: "#/components/schemas/ErrorsResponse"
|
|
888
|
+
get:
|
|
889
|
+
summary: List client credentials
|
|
890
|
+
description: Returns a paginated list of client credentials for the authenticated user.
|
|
891
|
+
tags:
|
|
892
|
+
- Client Credentials
|
|
893
|
+
operationId: v0_list_client_credentials
|
|
894
|
+
security:
|
|
895
|
+
- userJwt: []
|
|
896
|
+
x-required-scopes:
|
|
897
|
+
- credentials
|
|
898
|
+
parameters:
|
|
899
|
+
- schema:
|
|
900
|
+
type: integer
|
|
901
|
+
minimum: 1
|
|
902
|
+
maximum: 100
|
|
903
|
+
description: "Number of items per page (default: 100, max: 100)"
|
|
904
|
+
required: false
|
|
905
|
+
description: "Number of items per page (default: 100, max: 100)"
|
|
906
|
+
name: pageSize
|
|
907
|
+
in: query
|
|
908
|
+
- schema:
|
|
909
|
+
type:
|
|
910
|
+
- integer
|
|
911
|
+
- "null"
|
|
912
|
+
minimum: 0
|
|
913
|
+
description: Pagination offset
|
|
914
|
+
required: false
|
|
915
|
+
description: Pagination offset
|
|
916
|
+
name: offset
|
|
917
|
+
in: query
|
|
918
|
+
responses:
|
|
919
|
+
"200":
|
|
920
|
+
description: Successfully retrieved client credentials list
|
|
921
|
+
content:
|
|
922
|
+
application/json:
|
|
923
|
+
schema:
|
|
924
|
+
$ref: "#/components/schemas/ListClientCredentialsResponse"
|
|
925
|
+
"400":
|
|
926
|
+
description: Bad Request
|
|
927
|
+
content:
|
|
928
|
+
application/json: *a1
|
|
929
|
+
"401":
|
|
930
|
+
description: Unauthorized
|
|
931
|
+
content:
|
|
932
|
+
application/json: *a2
|
|
933
|
+
"429":
|
|
934
|
+
description: Too Many Requests
|
|
935
|
+
headers: *a3
|
|
936
|
+
content:
|
|
937
|
+
application/json: *a4
|
|
938
|
+
"500":
|
|
939
|
+
description: Server Error
|
|
940
|
+
content:
|
|
941
|
+
application/json: *a5
|
|
942
|
+
"503":
|
|
943
|
+
description: Service Unavailable
|
|
944
|
+
headers: *a6
|
|
945
|
+
content:
|
|
946
|
+
application/json: *a7
|
|
947
|
+
/api/v0/client-credentials/{clientId}:
|
|
948
|
+
delete:
|
|
949
|
+
summary: Delete client credentials
|
|
950
|
+
description: Deletes client credentials by client ID. Returns 404 if the credentials do not exist or are not owned by the authenticated user.
|
|
951
|
+
tags:
|
|
952
|
+
- Client Credentials
|
|
953
|
+
operationId: v0_delete_client_credentials
|
|
954
|
+
security:
|
|
955
|
+
- userJwt: []
|
|
956
|
+
x-required-scopes:
|
|
957
|
+
- credentials
|
|
958
|
+
parameters:
|
|
959
|
+
- schema:
|
|
960
|
+
type: string
|
|
961
|
+
description: The client ID of the credentials to delete
|
|
962
|
+
required: true
|
|
963
|
+
description: The client ID of the credentials to delete
|
|
964
|
+
name: clientId
|
|
965
|
+
in: path
|
|
966
|
+
responses:
|
|
967
|
+
"204":
|
|
968
|
+
description: Client credentials deleted successfully
|
|
969
|
+
"400":
|
|
970
|
+
description: Bad Request
|
|
971
|
+
content:
|
|
972
|
+
application/json: *a1
|
|
973
|
+
"401":
|
|
974
|
+
description: Unauthorized
|
|
975
|
+
content:
|
|
976
|
+
application/json: *a2
|
|
977
|
+
"404":
|
|
978
|
+
description: Client credentials not found
|
|
979
|
+
content:
|
|
980
|
+
application/json:
|
|
981
|
+
schema:
|
|
982
|
+
$ref: "#/components/schemas/ErrorsResponse"
|
|
983
|
+
"429":
|
|
984
|
+
description: Too Many Requests
|
|
985
|
+
headers: *a3
|
|
986
|
+
content:
|
|
987
|
+
application/json: *a4
|
|
988
|
+
"500":
|
|
989
|
+
description: Server Error
|
|
990
|
+
content:
|
|
991
|
+
application/json: *a5
|
|
992
|
+
"503":
|
|
993
|
+
description: Service Unavailable
|
|
994
|
+
headers: *a6
|
|
995
|
+
content:
|
|
996
|
+
application/json: *a7
|
|
997
|
+
/api/v0/docs/openapi-spec:
|
|
998
|
+
get:
|
|
999
|
+
summary: OpenAPI Specification
|
|
1000
|
+
description: Serves the OpenAPI specification file
|
|
1001
|
+
tags:
|
|
1002
|
+
- Documentation
|
|
1003
|
+
operationId: v0_docs_openapi_spec
|
|
1004
|
+
security: []
|
|
1005
|
+
responses:
|
|
1006
|
+
"200":
|
|
1007
|
+
description: OpenAPI specification
|
|
1008
|
+
content:
|
|
1009
|
+
text/yaml:
|
|
1010
|
+
schema:
|
|
1011
|
+
type: string
|
|
1012
|
+
description: OpenAPI specification in YAML format
|
|
1013
|
+
"400":
|
|
1014
|
+
description: Bad Request
|
|
1015
|
+
content:
|
|
1016
|
+
application/json: *a1
|
|
1017
|
+
"401":
|
|
1018
|
+
description: Unauthorized
|
|
1019
|
+
content:
|
|
1020
|
+
application/json: *a2
|
|
1021
|
+
"429":
|
|
1022
|
+
description: Too Many Requests
|
|
1023
|
+
headers: *a3
|
|
1024
|
+
content:
|
|
1025
|
+
application/json: *a4
|
|
1026
|
+
"500":
|
|
1027
|
+
description: Server Error
|
|
1028
|
+
content:
|
|
1029
|
+
application/json: *a5
|
|
1030
|
+
"503":
|
|
1031
|
+
description: Service Unavailable
|
|
1032
|
+
headers: *a6
|
|
1033
|
+
content:
|
|
1034
|
+
application/json: *a7
|
|
760
1035
|
/api/v0/authentications/{authenticationId}:
|
|
761
1036
|
get:
|
|
762
1037
|
summary: Get an authentication
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zapier/zapier-sdk-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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.",
|
|
@@ -51,6 +51,11 @@
|
|
|
51
51
|
"import": "./dist/v0/schemas/actions.js",
|
|
52
52
|
"require": "./dist/v0/schemas/actions.cjs"
|
|
53
53
|
},
|
|
54
|
+
"./v0/schemas/client-credentials": {
|
|
55
|
+
"types": "./dist/v0/schemas/client-credentials.d.ts",
|
|
56
|
+
"import": "./dist/v0/schemas/client-credentials.js",
|
|
57
|
+
"require": "./dist/v0/schemas/client-credentials.cjs"
|
|
58
|
+
},
|
|
54
59
|
"./v0/common/responses": {
|
|
55
60
|
"types": "./dist/v0/common/responses.d.ts",
|
|
56
61
|
"import": "./dist/v0/common/responses.js",
|