@zapier/zapier-sdk-core 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ # @zapier/zapier-sdk-core
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - c387335: Initial publish
package/LICENSE ADDED
@@ -0,0 +1,2 @@
1
+ Copyright (c) Zapier, Inc.
2
+ The Zapier SDK is part of Zapier's services. By downloading, installing, accessing, or using any part of the Zapier SDK you agree to the Zapier Terms of Service, which can be found at: https://zapier.com/tos, or such other agreement between you and Zapier governing Zapier services (as applicable). If you do not agree to the Zapier Terms of Service (or do not have another governing agreement in place with Zapier), you may not download, install, access, or use the Zapier SDK.
package/README.md ADDED
@@ -0,0 +1,123 @@
1
+ # @zapier/zapier-sdk-core
2
+
3
+ Core schemas and TypeScript types for the Zapier SDK API. This package provides Zod schemas for building type-safe integrations with Zapier.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @zapier/zapier-sdk-core
9
+ # or
10
+ pnpm add @zapier/zapier-sdk-core
11
+ ```
12
+
13
+ ## Requirements
14
+
15
+ - **Zod 4.0+** - Runtime schema validation (peer dependency)
16
+
17
+ ## Usage
18
+
19
+ This package provides schemas in **two formats**:
20
+
21
+ ### 1. JavaScript/TypeScript (Zod Schemas)
22
+
23
+ For consumers who want runtime validation and type safety:
24
+
25
+ ```typescript
26
+ // Import from main entry point
27
+ import {
28
+ AuthenticationSchema,
29
+ AuthenticationItemSchema,
30
+ type Authentication,
31
+ type AuthenticationItem,
32
+ } from "@zapier/zapier-sdk-core";
33
+
34
+ // Or import specific schema files
35
+ import { AuthenticationSchema } from "@zapier/zapier-sdk-core/v0/schemas/authentications";
36
+
37
+ // Use Zod schema for validation
38
+ const result = AuthenticationSchema.parse(data);
39
+
40
+ // Use TypeScript type for type safety
41
+ const myAuth: Authentication = {
42
+ id: 12345,
43
+ date: "2023-01-01T00:00:00Z",
44
+ account_id: 123,
45
+ selected_api: "SlackCLIAPI@1.0.0",
46
+ is_invite_only: false,
47
+ is_private: true,
48
+ shared_with_all: false,
49
+ label: "My Slack Account",
50
+ };
51
+ ```
52
+
53
+ ### 2. OpenAPI Specification
54
+
55
+ For SDK generation, documentation tools, and non-TypeScript consumers:
56
+
57
+ ```typescript
58
+ // Node.js / TypeScript
59
+ import { readFileSync } from "fs";
60
+ import { resolve } from "path";
61
+
62
+ const specPath = resolve(
63
+ require.resolve("@zapier/zapier-sdk-core/package.json"),
64
+ "../openapi.yaml",
65
+ );
66
+ const spec = readFileSync(specPath, "utf-8");
67
+
68
+ // Or with a YAML parser
69
+ import yaml from "yaml";
70
+ const openapiSpec = yaml.parse(spec);
71
+ ```
72
+
73
+ The OpenAPI spec is auto-generated from the Zod schemas and kept in sync via the `prepublishOnly` script.
74
+
75
+ ## Available Schemas
76
+
77
+ ### Main Entry Point
78
+
79
+ - `AuthenticationSchema` - Raw authentication data from API
80
+ - `AuthenticationItemSchema` - Normalized authentication with computed fields
81
+ - `ErrorCodeSchema`, `ErrorSourceSchema`, `ErrorObjectSchema`, `ErrorsResponseSchema` - Error handling
82
+
83
+ ### Direct Imports
84
+
85
+ - `@zapier/zapier-sdk-core/v0/schemas/authentications` - Authentication schemas
86
+ - `@zapier/zapier-sdk-core/v0/schemas/errors` - Error schemas
87
+ - `@zapier/zapier-sdk-core/v0/common/responses` - Common response utilities
88
+
89
+ ## Package Structure
90
+
91
+ This package is designed for minimal dependencies:
92
+
93
+ - **Runtime:** Only Zod is required
94
+ - **Compiled output:** Ships as JavaScript + TypeScript declarations
95
+ - **Dual format:** Both ESM and CommonJS supported
96
+ - **OpenAPI spec:** Pre-generated `openapi.yaml` included for SDK generation tools
97
+
98
+ The package contains:
99
+
100
+ - `dist/` - Compiled JavaScript + TypeScript declarations
101
+ - `openapi.yaml` - Generated OpenAPI 3.1 specification
102
+
103
+ ## For SDK Developers
104
+
105
+ This package is consumed by `@zapier/zapier-sdk` and is the source of truth for API schemas.
106
+
107
+ **Key use cases:**
108
+
109
+ - **TypeScript SDK**: Import Zod schemas directly for runtime validation
110
+ - **Multi-language SDK generation**: Use `openapi.yaml` with code generators (openapi-generator, Kiota, etc.)
111
+ - **Documentation**: Use `openapi.yaml` with tools like Redoc, Stoplight, Swagger UI
112
+
113
+ The OpenAPI spec is automatically generated from TypeScript Zod schemas, ensuring both formats stay in sync.
114
+
115
+ ## License
116
+
117
+ Copyright (c) Zapier, Inc.
118
+
119
+ By using this package, you agree to the [Zapier Terms of Service](https://zapier.com/tos). See the LICENSE file for full details.
120
+
121
+ ## Support
122
+
123
+ This is a pre-release version (0.x). APIs may change before 1.0.0 release.
package/openapi.yaml ADDED
@@ -0,0 +1,642 @@
1
+ # This file is auto-generated by @zapier/zapier-sdk-core
2
+ # DO NOT EDIT DIRECTLY - Edit Zod schemas in packages/zapier-sdk-core/src/v0/
3
+ # To regenerate: pnpm --filter @zapier/zapier-sdk-core generate
4
+
5
+ openapi: 3.1.0
6
+ info:
7
+ title: Zapier SDK API
8
+ version: 1.0.0
9
+ contact:
10
+ email: engineering@zapier.com
11
+ description: The Zapier SDK API serves as a backend for the Zapier SDK.
12
+ servers: []
13
+ tags:
14
+ - name: Authentications
15
+ description: Authentication-related routes
16
+ - name: Documentation
17
+ description: Documentation-related routes
18
+ components:
19
+ schemas:
20
+ ErrorCode:
21
+ type: string
22
+ description: An application-specific error code, expressed as a string value.
23
+ ErrorSource:
24
+ type:
25
+ - object
26
+ - "null"
27
+ properties:
28
+ pointer:
29
+ type: string
30
+ description: A JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901) to the associated entity in the request document [e.g. `/data` for a primary data object, or `/data/attributes/title` for a specific attribute].
31
+ parameter:
32
+ type: string
33
+ description: A string indicating which URI query parameter caused the error.
34
+ header:
35
+ type: string
36
+ description: A string indicating the header that caused the error.
37
+ additionalProperties: false
38
+ description: Identifies the source of the error within the request payload, if relevant.
39
+ ErrorObject:
40
+ type: object
41
+ properties:
42
+ id:
43
+ type:
44
+ - string
45
+ - "null"
46
+ description: A unique identifier for this particular occurrence of the problem.
47
+ links:
48
+ type:
49
+ - object
50
+ - "null"
51
+ properties:
52
+ about:
53
+ type: string
54
+ format: uri
55
+ description: A link that leads to further details about this particular occurrence of the problem.
56
+ required:
57
+ - about
58
+ additionalProperties: false
59
+ description: Relevant links about the error
60
+ status:
61
+ type: string
62
+ description: The HTTP status code applicable to this problem, expressed as a string value.
63
+ code:
64
+ type: string
65
+ description: An application-specific error code, expressed as a string value.
66
+ title:
67
+ type: string
68
+ description: A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
69
+ detail:
70
+ type: string
71
+ description: A human-readable explanation specific to this occurrence of the problem. Like `title`, this field's value can be localized.
72
+ source:
73
+ type:
74
+ - object
75
+ - "null"
76
+ properties:
77
+ pointer:
78
+ type: string
79
+ description: A JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901) to the associated entity in the request document [e.g. `/data` for a primary data object, or `/data/attributes/title` for a specific attribute].
80
+ parameter:
81
+ type: string
82
+ description: A string indicating which URI query parameter caused the error.
83
+ header:
84
+ type: string
85
+ description: A string indicating the header that caused the error.
86
+ additionalProperties: false
87
+ description: Identifies the source of the error within the request payload, if relevant.
88
+ additionalProperties: false
89
+ description: An error object provides additional information about problems encountered while performing an operation. Error objects MUST be returned as an array keyed by `errors` in the top level of a JSON:API document.
90
+ ErrorsResponse:
91
+ type: object
92
+ properties:
93
+ errors:
94
+ type: array
95
+ items:
96
+ type: object
97
+ properties:
98
+ id:
99
+ type:
100
+ - string
101
+ - "null"
102
+ description: A unique identifier for this particular occurrence of the problem.
103
+ links:
104
+ type:
105
+ - object
106
+ - "null"
107
+ properties:
108
+ about:
109
+ type: string
110
+ format: uri
111
+ description: A link that leads to further details about this particular occurrence of the problem.
112
+ required:
113
+ - about
114
+ additionalProperties: false
115
+ description: Relevant links about the error
116
+ status:
117
+ type: string
118
+ description: The HTTP status code applicable to this problem, expressed as a string value.
119
+ code:
120
+ type: string
121
+ description: An application-specific error code, expressed as a string value.
122
+ title:
123
+ type: string
124
+ description: A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
125
+ detail:
126
+ type: string
127
+ description: A human-readable explanation specific to this occurrence of the problem. Like `title`, this field's value can be localized.
128
+ source:
129
+ type:
130
+ - object
131
+ - "null"
132
+ properties:
133
+ pointer:
134
+ type: string
135
+ description: A JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901) to the associated entity in the request document [e.g. `/data` for a primary data object, or `/data/attributes/title` for a specific attribute].
136
+ parameter:
137
+ type: string
138
+ description: A string indicating which URI query parameter caused the error.
139
+ header:
140
+ type: string
141
+ description: A string indicating the header that caused the error.
142
+ additionalProperties: false
143
+ description: Identifies the source of the error within the request payload, if relevant.
144
+ additionalProperties: false
145
+ description: An error object provides additional information about problems encountered while performing an operation. Error objects MUST be returned as an array keyed by `errors` in the top level of a JSON:API document.
146
+ description: A collection of the errors returned.
147
+ required:
148
+ - errors
149
+ description: A JSON:API error response document containing an array of error objects.
150
+ AuthenticationItem:
151
+ type: object
152
+ properties:
153
+ id:
154
+ type: number
155
+ description: Unique identifier for the authentication
156
+ date:
157
+ type: string
158
+ description: Date created
159
+ lastchanged:
160
+ type: string
161
+ description: Date last changed
162
+ account_id:
163
+ type: number
164
+ description: Account ID associated with this authentication
165
+ destination_selected_api:
166
+ type:
167
+ - string
168
+ - "null"
169
+ description: Destination API key (if applicable)
170
+ is_invite_only:
171
+ type: boolean
172
+ description: Whether the authentication is invite-only
173
+ is_private:
174
+ type: boolean
175
+ description: Whether the authentication is private
176
+ shared_with_all:
177
+ type: boolean
178
+ description: Whether the authentication is shared with all users
179
+ is_stale:
180
+ type: string
181
+ description: Stale status string
182
+ is_shared:
183
+ type: string
184
+ description: Shared status string
185
+ marked_stale_at:
186
+ type:
187
+ - string
188
+ - "null"
189
+ description: Date when marked stale
190
+ label:
191
+ type:
192
+ - string
193
+ - "null"
194
+ description: User label for the authentication
195
+ identifier:
196
+ type:
197
+ - string
198
+ - "null"
199
+ description: Identifier
200
+ title:
201
+ type:
202
+ - string
203
+ - "null"
204
+ description: Title of the authentication
205
+ url:
206
+ type: string
207
+ description: URL to the authentication resource
208
+ groups:
209
+ type: array
210
+ items:
211
+ type: object
212
+ additionalProperties: {}
213
+ description: Groups associated with the authentication
214
+ description: Array of groups associated with the authentication
215
+ members:
216
+ type: string
217
+ description: Members associated with the authentication
218
+ permissions:
219
+ type: object
220
+ additionalProperties:
221
+ type: boolean
222
+ description: Permissions for the authentication
223
+ implementation_id:
224
+ type: string
225
+ description: Implementation ID (was selected_api)
226
+ user_id:
227
+ type: number
228
+ description: User ID (was customuser_id)
229
+ is_expired:
230
+ type: string
231
+ description: Whether the authentication is expired (mapped from is_stale)
232
+ expired_at:
233
+ type:
234
+ - string
235
+ - "null"
236
+ description: Date when authentication expired (mapped from marked_stale_at)
237
+ app_key:
238
+ type: string
239
+ description: App Key extracted from implementation_id
240
+ app_version:
241
+ type: string
242
+ description: App Version extracted from implementation_id
243
+ required:
244
+ - id
245
+ - date
246
+ - account_id
247
+ - is_invite_only
248
+ - is_private
249
+ - shared_with_all
250
+ description: Normalized authentication item returned by getAuthentication handler
251
+ example:
252
+ id: 12345
253
+ date: 2023-01-15T10:30:00Z
254
+ lastchanged: 2023-06-20T14:45:00Z
255
+ account_id: 98765
256
+ destination_selected_api: null
257
+ is_invite_only: false
258
+ is_private: true
259
+ shared_with_all: false
260
+ is_stale: "false"
261
+ is_shared: "false"
262
+ marked_stale_at: null
263
+ label: My Slack Account
264
+ identifier: user@example.com
265
+ title: Slack - Personal Workspace
266
+ url: /api/v0/authentications/12345
267
+ groups: []
268
+ members: ""
269
+ permissions:
270
+ can_view: true
271
+ can_delete: true
272
+ implementation_id: SlackCLIAPI@1.0.0
273
+ user_id: 54321
274
+ is_expired: "false"
275
+ expired_at: null
276
+ app_key: SlackCLIAPI
277
+ app_version: 1.0.0
278
+ GetAuthenticationResponse:
279
+ type: object
280
+ properties:
281
+ data:
282
+ $ref: "#/components/schemas/AuthenticationItem"
283
+ required:
284
+ - data
285
+ ListAuthenticationsResponse:
286
+ type: object
287
+ properties:
288
+ data:
289
+ type: array
290
+ items:
291
+ type: object
292
+ properties:
293
+ id:
294
+ type: number
295
+ description: Unique identifier for the authentication
296
+ date:
297
+ type: string
298
+ description: Date created
299
+ lastchanged:
300
+ type: string
301
+ description: Date last changed
302
+ account_id:
303
+ type: number
304
+ description: Account ID associated with this authentication
305
+ destination_selected_api:
306
+ type:
307
+ - string
308
+ - "null"
309
+ description: Destination API key (if applicable)
310
+ is_invite_only:
311
+ type: boolean
312
+ description: Whether the authentication is invite-only
313
+ is_private:
314
+ type: boolean
315
+ description: Whether the authentication is private
316
+ shared_with_all:
317
+ type: boolean
318
+ description: Whether the authentication is shared with all users
319
+ is_stale:
320
+ type: string
321
+ description: Stale status string
322
+ is_shared:
323
+ type: string
324
+ description: Shared status string
325
+ marked_stale_at:
326
+ type:
327
+ - string
328
+ - "null"
329
+ description: Date when marked stale
330
+ label:
331
+ type:
332
+ - string
333
+ - "null"
334
+ description: User label for the authentication
335
+ identifier:
336
+ type:
337
+ - string
338
+ - "null"
339
+ description: Identifier
340
+ title:
341
+ type:
342
+ - string
343
+ - "null"
344
+ description: Title of the authentication
345
+ url:
346
+ type: string
347
+ description: URL to the authentication resource
348
+ groups:
349
+ type: array
350
+ items:
351
+ type: object
352
+ additionalProperties: {}
353
+ description: Groups associated with the authentication
354
+ description: Array of groups associated with the authentication
355
+ members:
356
+ type: string
357
+ description: Members associated with the authentication
358
+ permissions:
359
+ type: object
360
+ additionalProperties:
361
+ type: boolean
362
+ description: Permissions for the authentication
363
+ implementation_id:
364
+ type: string
365
+ description: Implementation ID (was selected_api)
366
+ user_id:
367
+ type: number
368
+ description: User ID (was customuser_id)
369
+ is_expired:
370
+ type: string
371
+ description: Whether the authentication is expired (mapped from is_stale)
372
+ expired_at:
373
+ type:
374
+ - string
375
+ - "null"
376
+ description: Date when authentication expired (mapped from marked_stale_at)
377
+ app_key:
378
+ type: string
379
+ description: App Key extracted from implementation_id
380
+ app_version:
381
+ type: string
382
+ description: App Version extracted from implementation_id
383
+ required:
384
+ - id
385
+ - date
386
+ - account_id
387
+ - is_invite_only
388
+ - is_private
389
+ - shared_with_all
390
+ description: Array of authentication items
391
+ links:
392
+ type: object
393
+ properties:
394
+ next:
395
+ type:
396
+ - string
397
+ - "null"
398
+ description: Fully qualified URL for the next page of results (if available), e.g. https://sdkapi.zapier.com/api/v0/authentications?offset=100&pageSize=50
399
+ description: Pagination links for navigating through results
400
+ meta:
401
+ type: object
402
+ properties:
403
+ count:
404
+ type: number
405
+ description: Total number of items
406
+ limit:
407
+ type: number
408
+ description: Number of items per page
409
+ offset:
410
+ type: number
411
+ description: Offset of the current page
412
+ required:
413
+ - count
414
+ - limit
415
+ - offset
416
+ description: Metadata for the paginated result set
417
+ required:
418
+ - data
419
+ - links
420
+ - meta
421
+ parameters: {}
422
+ securitySchemes:
423
+ userJwt:
424
+ type: apiKey
425
+ in: header
426
+ name: Authorization
427
+ 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`"
428
+ paths:
429
+ /api/v0/docs/openapi-spec:
430
+ get:
431
+ summary: OpenAPI Specification
432
+ description: Serves the OpenAPI specification file
433
+ tags:
434
+ - Documentation
435
+ operationId: v0_docs_openapi_spec
436
+ security: []
437
+ responses:
438
+ "200":
439
+ description: OpenAPI specification
440
+ content:
441
+ text/yaml:
442
+ schema:
443
+ type: string
444
+ description: OpenAPI specification in YAML format
445
+ "400":
446
+ description: Bad Request
447
+ content:
448
+ application/json: &a1
449
+ schema:
450
+ $ref: "#/components/schemas/ErrorsResponse"
451
+ "401":
452
+ description: Unauthorized
453
+ content:
454
+ application/json: &a2
455
+ schema:
456
+ $ref: "#/components/schemas/ErrorsResponse"
457
+ "429":
458
+ description: Too Many Requests
459
+ headers: &a3
460
+ X-RateLimit-Limit:
461
+ schema:
462
+ type: integer
463
+ description: The number of requests remaining in the current rate limit window.
464
+ X-RateLimit-Remaining:
465
+ schema:
466
+ type: integer
467
+ description: The number of requests remaining in the current rate limit window.
468
+ X-RateLimit-Reset:
469
+ schema:
470
+ type: string
471
+ description: The timestamp when the rate limit will be reset.
472
+ Retry-After:
473
+ schema:
474
+ type: string
475
+ description: The number of seconds to wait before retrying.
476
+ content:
477
+ application/json: &a4
478
+ schema:
479
+ $ref: "#/components/schemas/ErrorsResponse"
480
+ "500":
481
+ description: Server Error
482
+ content:
483
+ application/json: &a5
484
+ schema:
485
+ $ref: "#/components/schemas/ErrorsResponse"
486
+ "503":
487
+ description: Service Unavailable
488
+ headers: &a6
489
+ Retry-After:
490
+ schema:
491
+ type: string
492
+ description: The number of seconds to wait before retrying.
493
+ content:
494
+ application/json: &a7
495
+ schema:
496
+ $ref: "#/components/schemas/ErrorsResponse"
497
+ /api/v0/authentications/{authenticationId}:
498
+ get:
499
+ summary: Get an authentication
500
+ description: Returns a single authentication by ID.
501
+ tags:
502
+ - Authentications
503
+ operationId: v0_get_authentication
504
+ security:
505
+ - userJwt: []
506
+ parameters:
507
+ - schema:
508
+ type: integer
509
+ exclusiveMinimum: 0
510
+ description: Authentication ID to retrieve
511
+ required: true
512
+ description: Authentication ID to retrieve
513
+ name: authenticationId
514
+ in: path
515
+ responses:
516
+ "200":
517
+ description: Success
518
+ content:
519
+ application/json:
520
+ schema:
521
+ $ref: "#/components/schemas/GetAuthenticationResponse"
522
+ "400":
523
+ description: Bad Request
524
+ content:
525
+ application/json: *a1
526
+ "401":
527
+ description: Unauthorized
528
+ content:
529
+ application/json: *a2
530
+ "429":
531
+ description: Too Many Requests
532
+ headers: *a3
533
+ content:
534
+ application/json: *a4
535
+ "500":
536
+ description: Server Error
537
+ content:
538
+ application/json: *a5
539
+ "503":
540
+ description: Service Unavailable
541
+ headers: *a6
542
+ content:
543
+ application/json: *a7
544
+ /api/v0/authentications:
545
+ get:
546
+ summary: List authentications
547
+ description: Returns a paginated list of authentications with optional filtering by app, search term, owner, etc.
548
+ tags:
549
+ - Authentications
550
+ operationId: v0_list_authentications
551
+ security:
552
+ - userJwt: []
553
+ parameters:
554
+ - schema:
555
+ type: string
556
+ description: Filter authentications by app key (e.g., 'SlackCLIAPI' or slug like 'github')
557
+ required: false
558
+ description: Filter authentications by app key (e.g., 'SlackCLIAPI' or slug like 'github')
559
+ name: appKey
560
+ in: query
561
+ - schema:
562
+ type: string
563
+ description: Comma-separated list of authentication IDs to filter by
564
+ required: false
565
+ description: Comma-separated list of authentication IDs to filter by
566
+ name: authenticationIds
567
+ in: query
568
+ - schema:
569
+ type: string
570
+ description: Search term to filter authentications by title
571
+ required: false
572
+ description: Search term to filter authentications by title
573
+ name: search
574
+ in: query
575
+ - schema:
576
+ type: string
577
+ description: Filter authentications by exact title match (searches first, then filters locally)
578
+ required: false
579
+ description: Filter authentications by exact title match (searches first, then filters locally)
580
+ name: title
581
+ in: query
582
+ - schema:
583
+ type: string
584
+ description: Filter authentications by account ID
585
+ required: false
586
+ description: Filter authentications by account ID
587
+ name: accountId
588
+ in: query
589
+ - schema:
590
+ type: string
591
+ description: Filter by owner - 'me' for your own authentications or a specific user ID
592
+ required: false
593
+ description: Filter by owner - 'me' for your own authentications or a specific user ID
594
+ name: owner
595
+ in: query
596
+ - schema:
597
+ type: integer
598
+ minimum: 1
599
+ maximum: 100
600
+ default: 50
601
+ description: Number of authentications per page (1-100)
602
+ required: false
603
+ description: Number of authentications per page (1-100)
604
+ name: pageSize
605
+ in: query
606
+ - schema:
607
+ type: string
608
+ description: Pagination offset from previous response
609
+ required: false
610
+ description: Pagination offset from previous response
611
+ name: offset
612
+ in: query
613
+ responses:
614
+ "200":
615
+ description: Successfully retrieved authentications list
616
+ content:
617
+ application/json:
618
+ schema:
619
+ $ref: "#/components/schemas/ListAuthenticationsResponse"
620
+ "400":
621
+ description: Bad Request
622
+ content:
623
+ application/json: *a1
624
+ "401":
625
+ description: Unauthorized
626
+ content:
627
+ application/json: *a2
628
+ "429":
629
+ description: Too Many Requests
630
+ headers: *a3
631
+ content:
632
+ application/json: *a4
633
+ "500":
634
+ description: Server Error
635
+ content:
636
+ application/json: *a5
637
+ "503":
638
+ description: Service Unavailable
639
+ headers: *a6
640
+ content:
641
+ application/json: *a7
642
+ webhooks: {}
package/package.json ADDED
@@ -0,0 +1,84 @@
1
+ {
2
+ "name": "@zapier/zapier-sdk-core",
3
+ "version": "0.1.0",
4
+ "description": "Core schemas and TypeScript types for the Zapier SDK API",
5
+ "license": "SEE LICENSE IN LICENSE",
6
+ "author": "Zapier, Inc.",
7
+ "keywords": [
8
+ "zapier",
9
+ "sdk",
10
+ "openapi",
11
+ "zod",
12
+ "schemas",
13
+ "api",
14
+ "typescript"
15
+ ],
16
+ "type": "module",
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "main": "dist/index.cjs",
21
+ "module": "dist/index.mjs",
22
+ "types": "dist/index.d.ts",
23
+ "exports": {
24
+ ".": {
25
+ "types": "./dist/index.d.ts",
26
+ "import": "./dist/index.js",
27
+ "require": "./dist/index.cjs"
28
+ },
29
+ "./v0/schemas/authentications": {
30
+ "types": "./dist/v0/schemas/authentications.d.ts",
31
+ "import": "./dist/v0/schemas/authentications.js",
32
+ "require": "./dist/v0/schemas/authentications.cjs"
33
+ },
34
+ "./v0/schemas/errors": {
35
+ "types": "./dist/v0/schemas/errors.d.ts",
36
+ "import": "./dist/v0/schemas/errors.js",
37
+ "require": "./dist/v0/schemas/errors.cjs"
38
+ },
39
+ "./v0/common/responses": {
40
+ "types": "./dist/v0/common/responses.d.ts",
41
+ "import": "./dist/v0/common/responses.js",
42
+ "require": "./dist/v0/common/responses.cjs"
43
+ },
44
+ "./v0/config/metadata": {
45
+ "types": "./dist/v0/config/metadata.d.ts",
46
+ "import": "./dist/v0/config/metadata.js",
47
+ "require": "./dist/v0/config/metadata.cjs"
48
+ },
49
+ "./openapi.yaml": "./openapi.yaml",
50
+ "./v0/index": "./src/v0/index.ts",
51
+ "./v0/routes/*": "./src/v0/routes/*.ts"
52
+ },
53
+ "files": [
54
+ "dist",
55
+ "openapi.yaml",
56
+ "README.md",
57
+ "CHANGELOG.md",
58
+ "LICENSE"
59
+ ],
60
+ "dependencies": {
61
+ "zod": "^4.0.0"
62
+ },
63
+ "devDependencies": {
64
+ "@asteasolutions/zod-to-openapi": "^8.1.0",
65
+ "yaml": "^2.6.1",
66
+ "nodemon": "^3.1.10",
67
+ "tsup": "^8.5.0",
68
+ "tsx": "^4.19.2",
69
+ "typescript": "^5.8.3"
70
+ },
71
+ "scripts": {
72
+ "build": "tsup",
73
+ "clean": "rm -rf dist",
74
+ "generate": "tsx src/generator.ts",
75
+ "dev": "nodemon --watch src --ext ts --exec 'pnpm generate'",
76
+ "lint": "eslint src",
77
+ "fmt": "prettier --write \"**/*.ts\"",
78
+ "fmt:check": "prettier --check \"**/*.ts\"",
79
+ "test": "vitest run",
80
+ "test:watch": "vitest watch --clearScreen=false",
81
+ "types": "tsc",
82
+ "types:watch": "tsc --watch"
83
+ }
84
+ }