@zapier/zapier-sdk-core 0.3.0 → 0.4.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 +7 -0
- package/dist/index.cjs +162 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +124 -0
- package/dist/index.js.map +1 -0
- package/dist/v0/common/responses.cjs +139 -0
- package/dist/v0/common/responses.cjs.map +1 -0
- package/dist/v0/common/responses.d.cts +157 -0
- package/dist/v0/common/responses.d.ts +157 -0
- package/dist/v0/common/responses.js +112 -0
- package/dist/v0/common/responses.js.map +1 -0
- package/dist/v0/config/metadata.cjs +75 -0
- package/dist/v0/config/metadata.cjs.map +1 -0
- package/dist/v0/config/metadata.d.cts +70 -0
- package/dist/v0/config/metadata.d.ts +70 -0
- package/dist/v0/config/metadata.js +46 -0
- package/dist/v0/config/metadata.js.map +1 -0
- package/dist/v0/schemas/apps.cjs +130 -0
- package/dist/v0/schemas/apps.cjs.map +1 -0
- package/dist/v0/schemas/apps.d.cts +139 -0
- package/dist/v0/schemas/apps.d.ts +139 -0
- package/dist/v0/schemas/apps.js +103 -0
- package/dist/v0/schemas/apps.js.map +1 -0
- package/dist/v0/schemas/authentications.cjs +87 -0
- package/dist/v0/schemas/authentications.cjs.map +1 -0
- package/dist/v0/schemas/authentications.d.cts +112 -0
- package/dist/v0/schemas/authentications.d.ts +112 -0
- package/dist/v0/schemas/authentications.js +59 -0
- package/dist/v0/schemas/authentications.js.map +1 -0
- package/dist/v0/schemas/errors.cjs +77 -0
- package/dist/v0/schemas/errors.cjs.map +1 -0
- package/dist/v0/schemas/errors.d.cts +64 -0
- package/dist/v0/schemas/errors.d.ts +64 -0
- package/dist/v0/schemas/errors.js +49 -0
- package/dist/v0/schemas/errors.js.map +1 -0
- package/dist/v0/schemas/implementations.cjs +93 -0
- package/dist/v0/schemas/implementations.cjs.map +1 -0
- package/dist/v0/schemas/implementations.d.cts +121 -0
- package/dist/v0/schemas/implementations.d.ts +121 -0
- package/dist/v0/schemas/implementations.js +67 -0
- package/dist/v0/schemas/implementations.js.map +1 -0
- package/openapi.yaml +267 -0
- package/package.json +11 -1
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common response definitions for v0 API routes
|
|
3
|
+
*
|
|
4
|
+
* This module provides reusable response definitions for error responses
|
|
5
|
+
* and common headers to reduce duplication across route definitions.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Rate limit headers included in 429 responses
|
|
9
|
+
*/
|
|
10
|
+
declare const rateLimitHeaders: {
|
|
11
|
+
readonly "X-RateLimit-Limit": {
|
|
12
|
+
readonly schema: {
|
|
13
|
+
readonly type: "integer";
|
|
14
|
+
};
|
|
15
|
+
readonly description: "The number of requests remaining in the current rate limit window.";
|
|
16
|
+
};
|
|
17
|
+
readonly "X-RateLimit-Remaining": {
|
|
18
|
+
readonly schema: {
|
|
19
|
+
readonly type: "integer";
|
|
20
|
+
};
|
|
21
|
+
readonly description: "The number of requests remaining in the current rate limit window.";
|
|
22
|
+
};
|
|
23
|
+
readonly "X-RateLimit-Reset": {
|
|
24
|
+
readonly schema: {
|
|
25
|
+
readonly type: "string";
|
|
26
|
+
};
|
|
27
|
+
readonly description: "The timestamp when the rate limit will be reset.";
|
|
28
|
+
};
|
|
29
|
+
readonly "Retry-After": {
|
|
30
|
+
readonly schema: {
|
|
31
|
+
readonly type: "string";
|
|
32
|
+
};
|
|
33
|
+
readonly description: "The number of seconds to wait before retrying.";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Retry-After header included in 503 responses
|
|
38
|
+
*/
|
|
39
|
+
declare const retryAfterHeader: {
|
|
40
|
+
readonly "Retry-After": {
|
|
41
|
+
readonly schema: {
|
|
42
|
+
readonly type: "string";
|
|
43
|
+
};
|
|
44
|
+
readonly description: "The number of seconds to wait before retrying.";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Common error response definitions for all v0 API routes
|
|
49
|
+
*
|
|
50
|
+
* These responses follow the JSON:API error response format and are
|
|
51
|
+
* consistent across all endpoints.
|
|
52
|
+
*/
|
|
53
|
+
declare const commonErrorResponses: {
|
|
54
|
+
/**
|
|
55
|
+
* 400 Bad Request - Invalid request parameters or body
|
|
56
|
+
*/
|
|
57
|
+
readonly 400: {
|
|
58
|
+
readonly description: "Bad Request";
|
|
59
|
+
readonly content: {
|
|
60
|
+
readonly "application/json": {
|
|
61
|
+
readonly schema: {
|
|
62
|
+
readonly $ref: "#/components/schemas/ErrorsResponse";
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* 401 Unauthorized - Missing or invalid authentication
|
|
69
|
+
*/
|
|
70
|
+
readonly 401: {
|
|
71
|
+
readonly description: "Unauthorized";
|
|
72
|
+
readonly content: {
|
|
73
|
+
readonly "application/json": {
|
|
74
|
+
readonly schema: {
|
|
75
|
+
readonly $ref: "#/components/schemas/ErrorsResponse";
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* 429 Too Many Requests - Rate limit exceeded
|
|
82
|
+
* Includes rate limit headers
|
|
83
|
+
*/
|
|
84
|
+
readonly 429: {
|
|
85
|
+
readonly description: "Too Many Requests";
|
|
86
|
+
readonly headers: {
|
|
87
|
+
readonly "X-RateLimit-Limit": {
|
|
88
|
+
readonly schema: {
|
|
89
|
+
readonly type: "integer";
|
|
90
|
+
};
|
|
91
|
+
readonly description: "The number of requests remaining in the current rate limit window.";
|
|
92
|
+
};
|
|
93
|
+
readonly "X-RateLimit-Remaining": {
|
|
94
|
+
readonly schema: {
|
|
95
|
+
readonly type: "integer";
|
|
96
|
+
};
|
|
97
|
+
readonly description: "The number of requests remaining in the current rate limit window.";
|
|
98
|
+
};
|
|
99
|
+
readonly "X-RateLimit-Reset": {
|
|
100
|
+
readonly schema: {
|
|
101
|
+
readonly type: "string";
|
|
102
|
+
};
|
|
103
|
+
readonly description: "The timestamp when the rate limit will be reset.";
|
|
104
|
+
};
|
|
105
|
+
readonly "Retry-After": {
|
|
106
|
+
readonly schema: {
|
|
107
|
+
readonly type: "string";
|
|
108
|
+
};
|
|
109
|
+
readonly description: "The number of seconds to wait before retrying.";
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
readonly content: {
|
|
113
|
+
readonly "application/json": {
|
|
114
|
+
readonly schema: {
|
|
115
|
+
readonly $ref: "#/components/schemas/ErrorsResponse";
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* 500 Server Error - Internal server error
|
|
122
|
+
*/
|
|
123
|
+
readonly 500: {
|
|
124
|
+
readonly description: "Server Error";
|
|
125
|
+
readonly content: {
|
|
126
|
+
readonly "application/json": {
|
|
127
|
+
readonly schema: {
|
|
128
|
+
readonly $ref: "#/components/schemas/ErrorsResponse";
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* 503 Service Unavailable - Service temporarily unavailable
|
|
135
|
+
* Includes Retry-After header
|
|
136
|
+
*/
|
|
137
|
+
readonly 503: {
|
|
138
|
+
readonly description: "Service Unavailable";
|
|
139
|
+
readonly headers: {
|
|
140
|
+
readonly "Retry-After": {
|
|
141
|
+
readonly schema: {
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
};
|
|
144
|
+
readonly description: "The number of seconds to wait before retrying.";
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
readonly content: {
|
|
148
|
+
readonly "application/json": {
|
|
149
|
+
readonly schema: {
|
|
150
|
+
readonly $ref: "#/components/schemas/ErrorsResponse";
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export { commonErrorResponses, rateLimitHeaders, retryAfterHeader };
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common response definitions for v0 API routes
|
|
3
|
+
*
|
|
4
|
+
* This module provides reusable response definitions for error responses
|
|
5
|
+
* and common headers to reduce duplication across route definitions.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Rate limit headers included in 429 responses
|
|
9
|
+
*/
|
|
10
|
+
declare const rateLimitHeaders: {
|
|
11
|
+
readonly "X-RateLimit-Limit": {
|
|
12
|
+
readonly schema: {
|
|
13
|
+
readonly type: "integer";
|
|
14
|
+
};
|
|
15
|
+
readonly description: "The number of requests remaining in the current rate limit window.";
|
|
16
|
+
};
|
|
17
|
+
readonly "X-RateLimit-Remaining": {
|
|
18
|
+
readonly schema: {
|
|
19
|
+
readonly type: "integer";
|
|
20
|
+
};
|
|
21
|
+
readonly description: "The number of requests remaining in the current rate limit window.";
|
|
22
|
+
};
|
|
23
|
+
readonly "X-RateLimit-Reset": {
|
|
24
|
+
readonly schema: {
|
|
25
|
+
readonly type: "string";
|
|
26
|
+
};
|
|
27
|
+
readonly description: "The timestamp when the rate limit will be reset.";
|
|
28
|
+
};
|
|
29
|
+
readonly "Retry-After": {
|
|
30
|
+
readonly schema: {
|
|
31
|
+
readonly type: "string";
|
|
32
|
+
};
|
|
33
|
+
readonly description: "The number of seconds to wait before retrying.";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Retry-After header included in 503 responses
|
|
38
|
+
*/
|
|
39
|
+
declare const retryAfterHeader: {
|
|
40
|
+
readonly "Retry-After": {
|
|
41
|
+
readonly schema: {
|
|
42
|
+
readonly type: "string";
|
|
43
|
+
};
|
|
44
|
+
readonly description: "The number of seconds to wait before retrying.";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Common error response definitions for all v0 API routes
|
|
49
|
+
*
|
|
50
|
+
* These responses follow the JSON:API error response format and are
|
|
51
|
+
* consistent across all endpoints.
|
|
52
|
+
*/
|
|
53
|
+
declare const commonErrorResponses: {
|
|
54
|
+
/**
|
|
55
|
+
* 400 Bad Request - Invalid request parameters or body
|
|
56
|
+
*/
|
|
57
|
+
readonly 400: {
|
|
58
|
+
readonly description: "Bad Request";
|
|
59
|
+
readonly content: {
|
|
60
|
+
readonly "application/json": {
|
|
61
|
+
readonly schema: {
|
|
62
|
+
readonly $ref: "#/components/schemas/ErrorsResponse";
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* 401 Unauthorized - Missing or invalid authentication
|
|
69
|
+
*/
|
|
70
|
+
readonly 401: {
|
|
71
|
+
readonly description: "Unauthorized";
|
|
72
|
+
readonly content: {
|
|
73
|
+
readonly "application/json": {
|
|
74
|
+
readonly schema: {
|
|
75
|
+
readonly $ref: "#/components/schemas/ErrorsResponse";
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* 429 Too Many Requests - Rate limit exceeded
|
|
82
|
+
* Includes rate limit headers
|
|
83
|
+
*/
|
|
84
|
+
readonly 429: {
|
|
85
|
+
readonly description: "Too Many Requests";
|
|
86
|
+
readonly headers: {
|
|
87
|
+
readonly "X-RateLimit-Limit": {
|
|
88
|
+
readonly schema: {
|
|
89
|
+
readonly type: "integer";
|
|
90
|
+
};
|
|
91
|
+
readonly description: "The number of requests remaining in the current rate limit window.";
|
|
92
|
+
};
|
|
93
|
+
readonly "X-RateLimit-Remaining": {
|
|
94
|
+
readonly schema: {
|
|
95
|
+
readonly type: "integer";
|
|
96
|
+
};
|
|
97
|
+
readonly description: "The number of requests remaining in the current rate limit window.";
|
|
98
|
+
};
|
|
99
|
+
readonly "X-RateLimit-Reset": {
|
|
100
|
+
readonly schema: {
|
|
101
|
+
readonly type: "string";
|
|
102
|
+
};
|
|
103
|
+
readonly description: "The timestamp when the rate limit will be reset.";
|
|
104
|
+
};
|
|
105
|
+
readonly "Retry-After": {
|
|
106
|
+
readonly schema: {
|
|
107
|
+
readonly type: "string";
|
|
108
|
+
};
|
|
109
|
+
readonly description: "The number of seconds to wait before retrying.";
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
readonly content: {
|
|
113
|
+
readonly "application/json": {
|
|
114
|
+
readonly schema: {
|
|
115
|
+
readonly $ref: "#/components/schemas/ErrorsResponse";
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* 500 Server Error - Internal server error
|
|
122
|
+
*/
|
|
123
|
+
readonly 500: {
|
|
124
|
+
readonly description: "Server Error";
|
|
125
|
+
readonly content: {
|
|
126
|
+
readonly "application/json": {
|
|
127
|
+
readonly schema: {
|
|
128
|
+
readonly $ref: "#/components/schemas/ErrorsResponse";
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* 503 Service Unavailable - Service temporarily unavailable
|
|
135
|
+
* Includes Retry-After header
|
|
136
|
+
*/
|
|
137
|
+
readonly 503: {
|
|
138
|
+
readonly description: "Service Unavailable";
|
|
139
|
+
readonly headers: {
|
|
140
|
+
readonly "Retry-After": {
|
|
141
|
+
readonly schema: {
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
};
|
|
144
|
+
readonly description: "The number of seconds to wait before retrying.";
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
readonly content: {
|
|
148
|
+
readonly "application/json": {
|
|
149
|
+
readonly schema: {
|
|
150
|
+
readonly $ref: "#/components/schemas/ErrorsResponse";
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export { commonErrorResponses, rateLimitHeaders, retryAfterHeader };
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// src/v0/common/responses.ts
|
|
2
|
+
var rateLimitHeaders = {
|
|
3
|
+
"X-RateLimit-Limit": {
|
|
4
|
+
schema: {
|
|
5
|
+
type: "integer"
|
|
6
|
+
},
|
|
7
|
+
description: "The number of requests remaining in the current rate limit window."
|
|
8
|
+
},
|
|
9
|
+
"X-RateLimit-Remaining": {
|
|
10
|
+
schema: {
|
|
11
|
+
type: "integer"
|
|
12
|
+
},
|
|
13
|
+
description: "The number of requests remaining in the current rate limit window."
|
|
14
|
+
},
|
|
15
|
+
"X-RateLimit-Reset": {
|
|
16
|
+
schema: {
|
|
17
|
+
type: "string"
|
|
18
|
+
},
|
|
19
|
+
description: "The timestamp when the rate limit will be reset."
|
|
20
|
+
},
|
|
21
|
+
"Retry-After": {
|
|
22
|
+
schema: {
|
|
23
|
+
type: "string"
|
|
24
|
+
},
|
|
25
|
+
description: "The number of seconds to wait before retrying."
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var retryAfterHeader = {
|
|
29
|
+
"Retry-After": {
|
|
30
|
+
schema: {
|
|
31
|
+
type: "string"
|
|
32
|
+
},
|
|
33
|
+
description: "The number of seconds to wait before retrying."
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var commonErrorResponses = {
|
|
37
|
+
/**
|
|
38
|
+
* 400 Bad Request - Invalid request parameters or body
|
|
39
|
+
*/
|
|
40
|
+
400: {
|
|
41
|
+
description: "Bad Request",
|
|
42
|
+
content: {
|
|
43
|
+
"application/json": {
|
|
44
|
+
schema: {
|
|
45
|
+
$ref: "#/components/schemas/ErrorsResponse"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* 401 Unauthorized - Missing or invalid authentication
|
|
52
|
+
*/
|
|
53
|
+
401: {
|
|
54
|
+
description: "Unauthorized",
|
|
55
|
+
content: {
|
|
56
|
+
"application/json": {
|
|
57
|
+
schema: {
|
|
58
|
+
$ref: "#/components/schemas/ErrorsResponse"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* 429 Too Many Requests - Rate limit exceeded
|
|
65
|
+
* Includes rate limit headers
|
|
66
|
+
*/
|
|
67
|
+
429: {
|
|
68
|
+
description: "Too Many Requests",
|
|
69
|
+
headers: rateLimitHeaders,
|
|
70
|
+
content: {
|
|
71
|
+
"application/json": {
|
|
72
|
+
schema: {
|
|
73
|
+
$ref: "#/components/schemas/ErrorsResponse"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* 500 Server Error - Internal server error
|
|
80
|
+
*/
|
|
81
|
+
500: {
|
|
82
|
+
description: "Server Error",
|
|
83
|
+
content: {
|
|
84
|
+
"application/json": {
|
|
85
|
+
schema: {
|
|
86
|
+
$ref: "#/components/schemas/ErrorsResponse"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
/**
|
|
92
|
+
* 503 Service Unavailable - Service temporarily unavailable
|
|
93
|
+
* Includes Retry-After header
|
|
94
|
+
*/
|
|
95
|
+
503: {
|
|
96
|
+
description: "Service Unavailable",
|
|
97
|
+
headers: retryAfterHeader,
|
|
98
|
+
content: {
|
|
99
|
+
"application/json": {
|
|
100
|
+
schema: {
|
|
101
|
+
$ref: "#/components/schemas/ErrorsResponse"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
export {
|
|
108
|
+
commonErrorResponses,
|
|
109
|
+
rateLimitHeaders,
|
|
110
|
+
retryAfterHeader
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=responses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/v0/common/responses.ts"],"sourcesContent":["/**\n * Common response definitions for v0 API routes\n *\n * This module provides reusable response definitions for error responses\n * and common headers to reduce duplication across route definitions.\n */\n\n/**\n * Rate limit headers included in 429 responses\n */\nexport const rateLimitHeaders = {\n \"X-RateLimit-Limit\": {\n schema: {\n type: \"integer\" as const,\n },\n description:\n \"The number of requests remaining in the current rate limit window.\",\n },\n \"X-RateLimit-Remaining\": {\n schema: {\n type: \"integer\" as const,\n },\n description:\n \"The number of requests remaining in the current rate limit window.\",\n },\n \"X-RateLimit-Reset\": {\n schema: {\n type: \"string\" as const,\n },\n description: \"The timestamp when the rate limit will be reset.\",\n },\n \"Retry-After\": {\n schema: {\n type: \"string\" as const,\n },\n description: \"The number of seconds to wait before retrying.\",\n },\n} as const;\n\n/**\n * Retry-After header included in 503 responses\n */\nexport const retryAfterHeader = {\n \"Retry-After\": {\n schema: {\n type: \"string\" as const,\n },\n description: \"The number of seconds to wait before retrying.\",\n },\n} as const;\n\n/**\n * Common error response definitions for all v0 API routes\n *\n * These responses follow the JSON:API error response format and are\n * consistent across all endpoints.\n */\nexport const commonErrorResponses = {\n /**\n * 400 Bad Request - Invalid request parameters or body\n */\n 400: {\n description: \"Bad Request\",\n content: {\n \"application/json\": {\n schema: {\n $ref: \"#/components/schemas/ErrorsResponse\",\n },\n },\n },\n },\n /**\n * 401 Unauthorized - Missing or invalid authentication\n */\n 401: {\n description: \"Unauthorized\",\n content: {\n \"application/json\": {\n schema: {\n $ref: \"#/components/schemas/ErrorsResponse\",\n },\n },\n },\n },\n /**\n * 429 Too Many Requests - Rate limit exceeded\n * Includes rate limit headers\n */\n 429: {\n description: \"Too Many Requests\",\n headers: rateLimitHeaders,\n content: {\n \"application/json\": {\n schema: {\n $ref: \"#/components/schemas/ErrorsResponse\",\n },\n },\n },\n },\n /**\n * 500 Server Error - Internal server error\n */\n 500: {\n description: \"Server Error\",\n content: {\n \"application/json\": {\n schema: {\n $ref: \"#/components/schemas/ErrorsResponse\",\n },\n },\n },\n },\n /**\n * 503 Service Unavailable - Service temporarily unavailable\n * Includes Retry-After header\n */\n 503: {\n description: \"Service Unavailable\",\n headers: retryAfterHeader,\n content: {\n \"application/json\": {\n schema: {\n $ref: \"#/components/schemas/ErrorsResponse\",\n },\n },\n },\n },\n} as const;\n"],"mappings":";AAUO,IAAM,mBAAmB;AAAA,EAC9B,qBAAqB;AAAA,IACnB,QAAQ;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,aACE;AAAA,EACJ;AAAA,EACA,yBAAyB;AAAA,IACvB,QAAQ;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,aACE;AAAA,EACJ;AAAA,EACA,qBAAqB;AAAA,IACnB,QAAQ;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,aAAa;AAAA,EACf;AAAA,EACA,eAAe;AAAA,IACb,QAAQ;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,aAAa;AAAA,EACf;AACF;AAKO,IAAM,mBAAmB;AAAA,EAC9B,eAAe;AAAA,IACb,QAAQ;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,aAAa;AAAA,EACf;AACF;AAQO,IAAM,uBAAuB;AAAA;AAAA;AAAA;AAAA,EAIlC,KAAK;AAAA,IACH,aAAa;AAAA,IACb,SAAS;AAAA,MACP,oBAAoB;AAAA,QAClB,QAAQ;AAAA,UACN,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAIA,KAAK;AAAA,IACH,aAAa;AAAA,IACb,SAAS;AAAA,MACP,oBAAoB;AAAA,QAClB,QAAQ;AAAA,UACN,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,KAAK;AAAA,IACH,aAAa;AAAA,IACb,SAAS;AAAA,IACT,SAAS;AAAA,MACP,oBAAoB;AAAA,QAClB,QAAQ;AAAA,UACN,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAIA,KAAK;AAAA,IACH,aAAa;AAAA,IACb,SAAS;AAAA,MACP,oBAAoB;AAAA,QAClB,QAAQ;AAAA,UACN,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,KAAK;AAAA,IACH,aAAa;AAAA,IACb,SAAS;AAAA,IACT,SAAS;AAAA,MACP,oBAAoB;AAAA,QAClB,QAAQ;AAAA,UACN,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/v0/config/metadata.ts
|
|
21
|
+
var metadata_exports = {};
|
|
22
|
+
__export(metadata_exports, {
|
|
23
|
+
apiInfo: () => apiInfo,
|
|
24
|
+
openApiMetadata: () => openApiMetadata,
|
|
25
|
+
securitySchemes: () => securitySchemes,
|
|
26
|
+
servers: () => servers,
|
|
27
|
+
tags: () => tags
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(metadata_exports);
|
|
30
|
+
var apiInfo = {
|
|
31
|
+
title: "Zapier SDK API",
|
|
32
|
+
version: "1.0.0",
|
|
33
|
+
contact: {
|
|
34
|
+
email: "engineering@zapier.com"
|
|
35
|
+
},
|
|
36
|
+
description: "The Zapier SDK API serves as a backend for the Zapier SDK."
|
|
37
|
+
};
|
|
38
|
+
var servers = [];
|
|
39
|
+
var tags = [
|
|
40
|
+
{
|
|
41
|
+
name: "Apps",
|
|
42
|
+
description: "App-related routes"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "Authentications",
|
|
46
|
+
description: "Authentication-related routes"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "Documentation",
|
|
50
|
+
description: "Documentation-related routes"
|
|
51
|
+
}
|
|
52
|
+
];
|
|
53
|
+
var securitySchemes = {
|
|
54
|
+
userJwt: {
|
|
55
|
+
type: "apiKey",
|
|
56
|
+
in: "header",
|
|
57
|
+
name: "Authorization",
|
|
58
|
+
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`"
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
var openApiMetadata = {
|
|
62
|
+
openapi: "3.1.0",
|
|
63
|
+
info: apiInfo,
|
|
64
|
+
servers,
|
|
65
|
+
tags
|
|
66
|
+
};
|
|
67
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
68
|
+
0 && (module.exports = {
|
|
69
|
+
apiInfo,
|
|
70
|
+
openApiMetadata,
|
|
71
|
+
securitySchemes,
|
|
72
|
+
servers,
|
|
73
|
+
tags
|
|
74
|
+
});
|
|
75
|
+
//# sourceMappingURL=metadata.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/v0/config/metadata.ts"],"sourcesContent":["/**\n * OpenAPI specification metadata\n *\n * This file contains all the base metadata for the OpenAPI specification\n * that was previously stored in openapi-base.yaml.\n *\n * Note on 'as const' usage:\n * - We use 'as const' on literal values that should be treated as enums\n * (e.g., \"apiKey\", \"header\", \"3.1.0\") to get precise literal types\n * - We avoid 'as const' on top-level configuration objects to prevent\n * deep readonly types that can cause compatibility issues with libraries\n * expecting mutable types (like zod-to-openapi)\n * - If you encounter readonly type errors, check whether the consuming\n * library expects mutable types and remove 'as const' accordingly\n */\n\nexport const apiInfo = {\n title: \"Zapier SDK API\",\n version: \"1.0.0\",\n contact: {\n email: \"engineering@zapier.com\",\n },\n description: \"The Zapier SDK API serves as a backend for the Zapier SDK.\",\n};\n\nexport const servers: Array<{ url: string; description: string }> = [];\n\nexport const tags = [\n {\n name: \"Apps\",\n description: \"App-related routes\",\n },\n {\n name: \"Authentications\",\n description: \"Authentication-related routes\",\n },\n {\n name: \"Documentation\",\n description: \"Documentation-related routes\",\n },\n];\n\n/**\n * Security schemes for OpenAPI specification\n *\n * Note: 'as const' is used on enum-like literal values (\"apiKey\", \"header\")\n * to ensure TypeScript treats them as literal types rather than generic strings.\n * This provides better type safety when the OpenAPI generator validates these values.\n */\nexport const securitySchemes = {\n userJwt: {\n type: \"apiKey\" as const,\n in: \"header\" as const,\n name: \"Authorization\",\n description:\n \"Format should be `JWT <your-jwt>` (you must ensure that the JWT prefix \" +\n \"is included in your requests).\\\\n\\\\n\" +\n \"Example: `Authorization: JWT your.jwt.value.here`\",\n },\n} as const;\n\n/**\n * Complete OpenAPI metadata for document generation\n */\nexport const openApiMetadata = {\n openapi: \"3.1.0\" as const,\n info: apiInfo,\n servers,\n tags,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBO,IAAM,UAAU;AAAA,EACrB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,aAAa;AACf;AAEO,IAAM,UAAuD,CAAC;AAE9D,IAAM,OAAO;AAAA,EAClB;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AACF;AASO,IAAM,kBAAkB;AAAA,EAC7B,SAAS;AAAA,IACP,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aACE;AAAA,EAGJ;AACF;AAKO,IAAM,kBAAkB;AAAA,EAC7B,SAAS;AAAA,EACT,MAAM;AAAA,EACN;AAAA,EACA;AACF;","names":[]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAPI specification metadata
|
|
3
|
+
*
|
|
4
|
+
* This file contains all the base metadata for the OpenAPI specification
|
|
5
|
+
* that was previously stored in openapi-base.yaml.
|
|
6
|
+
*
|
|
7
|
+
* Note on 'as const' usage:
|
|
8
|
+
* - We use 'as const' on literal values that should be treated as enums
|
|
9
|
+
* (e.g., "apiKey", "header", "3.1.0") to get precise literal types
|
|
10
|
+
* - We avoid 'as const' on top-level configuration objects to prevent
|
|
11
|
+
* deep readonly types that can cause compatibility issues with libraries
|
|
12
|
+
* expecting mutable types (like zod-to-openapi)
|
|
13
|
+
* - If you encounter readonly type errors, check whether the consuming
|
|
14
|
+
* library expects mutable types and remove 'as const' accordingly
|
|
15
|
+
*/
|
|
16
|
+
declare const apiInfo: {
|
|
17
|
+
title: string;
|
|
18
|
+
version: string;
|
|
19
|
+
contact: {
|
|
20
|
+
email: string;
|
|
21
|
+
};
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
declare const servers: Array<{
|
|
25
|
+
url: string;
|
|
26
|
+
description: string;
|
|
27
|
+
}>;
|
|
28
|
+
declare const tags: {
|
|
29
|
+
name: string;
|
|
30
|
+
description: string;
|
|
31
|
+
}[];
|
|
32
|
+
/**
|
|
33
|
+
* Security schemes for OpenAPI specification
|
|
34
|
+
*
|
|
35
|
+
* Note: 'as const' is used on enum-like literal values ("apiKey", "header")
|
|
36
|
+
* to ensure TypeScript treats them as literal types rather than generic strings.
|
|
37
|
+
* This provides better type safety when the OpenAPI generator validates these values.
|
|
38
|
+
*/
|
|
39
|
+
declare const securitySchemes: {
|
|
40
|
+
readonly userJwt: {
|
|
41
|
+
readonly type: "apiKey";
|
|
42
|
+
readonly in: "header";
|
|
43
|
+
readonly name: "Authorization";
|
|
44
|
+
readonly description: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Complete OpenAPI metadata for document generation
|
|
49
|
+
*/
|
|
50
|
+
declare const openApiMetadata: {
|
|
51
|
+
openapi: "3.1.0";
|
|
52
|
+
info: {
|
|
53
|
+
title: string;
|
|
54
|
+
version: string;
|
|
55
|
+
contact: {
|
|
56
|
+
email: string;
|
|
57
|
+
};
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
servers: {
|
|
61
|
+
url: string;
|
|
62
|
+
description: string;
|
|
63
|
+
}[];
|
|
64
|
+
tags: {
|
|
65
|
+
name: string;
|
|
66
|
+
description: string;
|
|
67
|
+
}[];
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export { apiInfo, openApiMetadata, securitySchemes, servers, tags };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAPI specification metadata
|
|
3
|
+
*
|
|
4
|
+
* This file contains all the base metadata for the OpenAPI specification
|
|
5
|
+
* that was previously stored in openapi-base.yaml.
|
|
6
|
+
*
|
|
7
|
+
* Note on 'as const' usage:
|
|
8
|
+
* - We use 'as const' on literal values that should be treated as enums
|
|
9
|
+
* (e.g., "apiKey", "header", "3.1.0") to get precise literal types
|
|
10
|
+
* - We avoid 'as const' on top-level configuration objects to prevent
|
|
11
|
+
* deep readonly types that can cause compatibility issues with libraries
|
|
12
|
+
* expecting mutable types (like zod-to-openapi)
|
|
13
|
+
* - If you encounter readonly type errors, check whether the consuming
|
|
14
|
+
* library expects mutable types and remove 'as const' accordingly
|
|
15
|
+
*/
|
|
16
|
+
declare const apiInfo: {
|
|
17
|
+
title: string;
|
|
18
|
+
version: string;
|
|
19
|
+
contact: {
|
|
20
|
+
email: string;
|
|
21
|
+
};
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
declare const servers: Array<{
|
|
25
|
+
url: string;
|
|
26
|
+
description: string;
|
|
27
|
+
}>;
|
|
28
|
+
declare const tags: {
|
|
29
|
+
name: string;
|
|
30
|
+
description: string;
|
|
31
|
+
}[];
|
|
32
|
+
/**
|
|
33
|
+
* Security schemes for OpenAPI specification
|
|
34
|
+
*
|
|
35
|
+
* Note: 'as const' is used on enum-like literal values ("apiKey", "header")
|
|
36
|
+
* to ensure TypeScript treats them as literal types rather than generic strings.
|
|
37
|
+
* This provides better type safety when the OpenAPI generator validates these values.
|
|
38
|
+
*/
|
|
39
|
+
declare const securitySchemes: {
|
|
40
|
+
readonly userJwt: {
|
|
41
|
+
readonly type: "apiKey";
|
|
42
|
+
readonly in: "header";
|
|
43
|
+
readonly name: "Authorization";
|
|
44
|
+
readonly description: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Complete OpenAPI metadata for document generation
|
|
49
|
+
*/
|
|
50
|
+
declare const openApiMetadata: {
|
|
51
|
+
openapi: "3.1.0";
|
|
52
|
+
info: {
|
|
53
|
+
title: string;
|
|
54
|
+
version: string;
|
|
55
|
+
contact: {
|
|
56
|
+
email: string;
|
|
57
|
+
};
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
servers: {
|
|
61
|
+
url: string;
|
|
62
|
+
description: string;
|
|
63
|
+
}[];
|
|
64
|
+
tags: {
|
|
65
|
+
name: string;
|
|
66
|
+
description: string;
|
|
67
|
+
}[];
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export { apiInfo, openApiMetadata, securitySchemes, servers, tags };
|