@utdk/airtable 0.1.0-20260530.2-dev.646adf4

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.json ADDED
@@ -0,0 +1,903 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "Airtable REST API",
5
+ "version": "0.1.0",
6
+ "description": "Airtable is a low-code platform for building collaborative apps. The REST API allows you to create, read, update, and delete records in Airtable bases, manage tables and fields, and automate workflows. Each Airtable base has a unique API that mirrors its structure.",
7
+ "contact": {
8
+ "name": "Airtable Developer Community",
9
+ "url": "https://community.airtable.com/c/developer-questions"
10
+ },
11
+ "license": {
12
+ "name": "MIT"
13
+ },
14
+ "x-logo": {
15
+ "url": "https://airtable.com/favicon.ico"
16
+ }
17
+ },
18
+ "externalDocs": {
19
+ "description": "Airtable API Documentation",
20
+ "url": "https://airtable.com/developers/web/api/introduction"
21
+ },
22
+ "servers": [
23
+ {
24
+ "url": "https://api.airtable.com/v0",
25
+ "description": "Airtable REST API v0"
26
+ }
27
+ ],
28
+ "security": [
29
+ {
30
+ "BearerAuth": []
31
+ }
32
+ ],
33
+ "paths": {
34
+ "/{baseId}/{tableIdOrName}": {
35
+ "get": {
36
+ "operationId": "listRecords",
37
+ "summary": "List records",
38
+ "description": "Returns a list of records in a specified table. Records are returned in the order they appear in the table view. You can filter, sort, and paginate the results using query parameters.",
39
+ "tags": [
40
+ "Records"
41
+ ],
42
+ "parameters": [
43
+ {
44
+ "name": "baseId",
45
+ "in": "path",
46
+ "required": true,
47
+ "description": "The Airtable base ID (starts with 'app')",
48
+ "schema": {
49
+ "type": "string",
50
+ "pattern": "^app[a-zA-Z0-9]+$"
51
+ }
52
+ },
53
+ {
54
+ "name": "tableIdOrName",
55
+ "in": "path",
56
+ "required": true,
57
+ "description": "The table ID (starts with 'tbl') or table name",
58
+ "schema": {
59
+ "type": "string"
60
+ }
61
+ },
62
+ {
63
+ "name": "fields[]",
64
+ "in": "query",
65
+ "description": "Field names to include in the response. If not specified, all fields are returned.",
66
+ "schema": {
67
+ "type": "array",
68
+ "items": {
69
+ "type": "string"
70
+ }
71
+ }
72
+ },
73
+ {
74
+ "name": "filterByFormula",
75
+ "in": "query",
76
+ "description": "An Airtable formula to filter records (e.g. '{Status}=\"Done\"')",
77
+ "schema": {
78
+ "type": "string"
79
+ }
80
+ },
81
+ {
82
+ "name": "maxRecords",
83
+ "in": "query",
84
+ "description": "Maximum number of records to return (max 100)",
85
+ "schema": {
86
+ "type": "integer",
87
+ "minimum": 1,
88
+ "maximum": 100
89
+ }
90
+ },
91
+ {
92
+ "name": "pageSize",
93
+ "in": "query",
94
+ "description": "Number of records per page (default 100, max 100)",
95
+ "schema": {
96
+ "type": "integer",
97
+ "minimum": 1,
98
+ "maximum": 100,
99
+ "default": 100
100
+ }
101
+ },
102
+ {
103
+ "name": "offset",
104
+ "in": "query",
105
+ "description": "Pagination offset string returned from a previous request",
106
+ "schema": {
107
+ "type": "string"
108
+ }
109
+ },
110
+ {
111
+ "name": "view",
112
+ "in": "query",
113
+ "description": "Name or ID of a view to filter and sort records",
114
+ "schema": {
115
+ "type": "string"
116
+ }
117
+ },
118
+ {
119
+ "name": "sort[0][field]",
120
+ "in": "query",
121
+ "description": "Field name to sort by",
122
+ "schema": {
123
+ "type": "string"
124
+ }
125
+ },
126
+ {
127
+ "name": "sort[0][direction]",
128
+ "in": "query",
129
+ "description": "Sort direction",
130
+ "schema": {
131
+ "type": "string",
132
+ "enum": [
133
+ "asc",
134
+ "desc"
135
+ ]
136
+ }
137
+ }
138
+ ],
139
+ "responses": {
140
+ "200": {
141
+ "description": "List of records",
142
+ "content": {
143
+ "application/json": {
144
+ "schema": {
145
+ "$ref": "#/components/schemas/RecordList"
146
+ }
147
+ }
148
+ }
149
+ },
150
+ "401": {
151
+ "$ref": "#/components/responses/Unauthorized"
152
+ },
153
+ "403": {
154
+ "$ref": "#/components/responses/Forbidden"
155
+ },
156
+ "404": {
157
+ "$ref": "#/components/responses/NotFound"
158
+ },
159
+ "422": {
160
+ "$ref": "#/components/responses/UnprocessableEntity"
161
+ }
162
+ }
163
+ },
164
+ "post": {
165
+ "operationId": "createRecord",
166
+ "summary": "Create a record",
167
+ "description": "Create one or more new records in a table. Pass fields as an object where keys are field names and values are the field data. Airtable will return the created records with their assigned IDs.",
168
+ "tags": [
169
+ "Records"
170
+ ],
171
+ "parameters": [
172
+ {
173
+ "name": "baseId",
174
+ "in": "path",
175
+ "required": true,
176
+ "description": "The Airtable base ID",
177
+ "schema": {
178
+ "type": "string"
179
+ }
180
+ },
181
+ {
182
+ "name": "tableIdOrName",
183
+ "in": "path",
184
+ "required": true,
185
+ "description": "The table ID or name",
186
+ "schema": {
187
+ "type": "string"
188
+ }
189
+ }
190
+ ],
191
+ "requestBody": {
192
+ "required": true,
193
+ "content": {
194
+ "application/json": {
195
+ "schema": {
196
+ "$ref": "#/components/schemas/CreateRecordsRequest"
197
+ }
198
+ }
199
+ }
200
+ },
201
+ "responses": {
202
+ "200": {
203
+ "description": "Created records",
204
+ "content": {
205
+ "application/json": {
206
+ "schema": {
207
+ "$ref": "#/components/schemas/CreateRecordsResponse"
208
+ }
209
+ }
210
+ }
211
+ },
212
+ "401": {
213
+ "$ref": "#/components/responses/Unauthorized"
214
+ },
215
+ "403": {
216
+ "$ref": "#/components/responses/Forbidden"
217
+ },
218
+ "422": {
219
+ "$ref": "#/components/responses/UnprocessableEntity"
220
+ }
221
+ }
222
+ },
223
+ "patch": {
224
+ "operationId": "updateRecords",
225
+ "summary": "Update multiple records",
226
+ "description": "Update multiple records in a table. Pass an array of objects, each with an 'id' and 'fields' property. Only the specified fields are updated; other fields are unchanged (partial update).",
227
+ "tags": [
228
+ "Records"
229
+ ],
230
+ "parameters": [
231
+ {
232
+ "name": "baseId",
233
+ "in": "path",
234
+ "required": true,
235
+ "description": "The Airtable base ID",
236
+ "schema": {
237
+ "type": "string"
238
+ }
239
+ },
240
+ {
241
+ "name": "tableIdOrName",
242
+ "in": "path",
243
+ "required": true,
244
+ "description": "The table ID or name",
245
+ "schema": {
246
+ "type": "string"
247
+ }
248
+ }
249
+ ],
250
+ "requestBody": {
251
+ "required": true,
252
+ "content": {
253
+ "application/json": {
254
+ "schema": {
255
+ "$ref": "#/components/schemas/UpdateRecordsRequest"
256
+ }
257
+ }
258
+ }
259
+ },
260
+ "responses": {
261
+ "200": {
262
+ "description": "Updated records",
263
+ "content": {
264
+ "application/json": {
265
+ "schema": {
266
+ "$ref": "#/components/schemas/UpdateRecordsResponse"
267
+ }
268
+ }
269
+ }
270
+ },
271
+ "401": {
272
+ "$ref": "#/components/responses/Unauthorized"
273
+ },
274
+ "422": {
275
+ "$ref": "#/components/responses/UnprocessableEntity"
276
+ }
277
+ }
278
+ },
279
+ "delete": {
280
+ "operationId": "deleteRecords",
281
+ "summary": "Delete records",
282
+ "description": "Delete one or more records from a table by their record IDs. This operation is permanent and cannot be undone.",
283
+ "tags": [
284
+ "Records"
285
+ ],
286
+ "parameters": [
287
+ {
288
+ "name": "baseId",
289
+ "in": "path",
290
+ "required": true,
291
+ "description": "The Airtable base ID",
292
+ "schema": {
293
+ "type": "string"
294
+ }
295
+ },
296
+ {
297
+ "name": "tableIdOrName",
298
+ "in": "path",
299
+ "required": true,
300
+ "description": "The table ID or name",
301
+ "schema": {
302
+ "type": "string"
303
+ }
304
+ },
305
+ {
306
+ "name": "records[]",
307
+ "in": "query",
308
+ "required": true,
309
+ "description": "Record IDs to delete",
310
+ "schema": {
311
+ "type": "array",
312
+ "items": {
313
+ "type": "string"
314
+ },
315
+ "maxItems": 10
316
+ }
317
+ }
318
+ ],
319
+ "responses": {
320
+ "200": {
321
+ "description": "Records deleted",
322
+ "content": {
323
+ "application/json": {
324
+ "schema": {
325
+ "$ref": "#/components/schemas/DeleteRecordsResponse"
326
+ }
327
+ }
328
+ }
329
+ },
330
+ "401": {
331
+ "$ref": "#/components/responses/Unauthorized"
332
+ },
333
+ "422": {
334
+ "$ref": "#/components/responses/UnprocessableEntity"
335
+ }
336
+ }
337
+ }
338
+ },
339
+ "/{baseId}/{tableIdOrName}/{recordId}": {
340
+ "get": {
341
+ "operationId": "getRecord",
342
+ "summary": "Get a record",
343
+ "description": "Retrieve a single record by its ID from a specified table. Returns the record's fields and metadata.",
344
+ "tags": [
345
+ "Records"
346
+ ],
347
+ "parameters": [
348
+ {
349
+ "name": "baseId",
350
+ "in": "path",
351
+ "required": true,
352
+ "description": "The Airtable base ID",
353
+ "schema": {
354
+ "type": "string"
355
+ }
356
+ },
357
+ {
358
+ "name": "tableIdOrName",
359
+ "in": "path",
360
+ "required": true,
361
+ "description": "The table ID or name",
362
+ "schema": {
363
+ "type": "string"
364
+ }
365
+ },
366
+ {
367
+ "name": "recordId",
368
+ "in": "path",
369
+ "required": true,
370
+ "description": "The record ID (starts with 'rec')",
371
+ "schema": {
372
+ "type": "string",
373
+ "pattern": "^rec[a-zA-Z0-9]+$"
374
+ }
375
+ }
376
+ ],
377
+ "responses": {
378
+ "200": {
379
+ "description": "Record details",
380
+ "content": {
381
+ "application/json": {
382
+ "schema": {
383
+ "$ref": "#/components/schemas/Record"
384
+ }
385
+ }
386
+ }
387
+ },
388
+ "401": {
389
+ "$ref": "#/components/responses/Unauthorized"
390
+ },
391
+ "404": {
392
+ "$ref": "#/components/responses/NotFound"
393
+ }
394
+ }
395
+ },
396
+ "put": {
397
+ "operationId": "replaceRecord",
398
+ "summary": "Replace a record",
399
+ "description": "Replace all fields in a record. Unlike PATCH, any fields not included in the request will be cleared to their default empty state.",
400
+ "tags": [
401
+ "Records"
402
+ ],
403
+ "parameters": [
404
+ {
405
+ "name": "baseId",
406
+ "in": "path",
407
+ "required": true,
408
+ "description": "The Airtable base ID",
409
+ "schema": {
410
+ "type": "string"
411
+ }
412
+ },
413
+ {
414
+ "name": "tableIdOrName",
415
+ "in": "path",
416
+ "required": true,
417
+ "description": "The table ID or name",
418
+ "schema": {
419
+ "type": "string"
420
+ }
421
+ },
422
+ {
423
+ "name": "recordId",
424
+ "in": "path",
425
+ "required": true,
426
+ "description": "The record ID",
427
+ "schema": {
428
+ "type": "string"
429
+ }
430
+ }
431
+ ],
432
+ "requestBody": {
433
+ "required": true,
434
+ "content": {
435
+ "application/json": {
436
+ "schema": {
437
+ "$ref": "#/components/schemas/UpdateRecordRequest"
438
+ }
439
+ }
440
+ }
441
+ },
442
+ "responses": {
443
+ "200": {
444
+ "description": "Updated record",
445
+ "content": {
446
+ "application/json": {
447
+ "schema": {
448
+ "$ref": "#/components/schemas/Record"
449
+ }
450
+ }
451
+ }
452
+ },
453
+ "404": {
454
+ "$ref": "#/components/responses/NotFound"
455
+ }
456
+ }
457
+ },
458
+ "delete": {
459
+ "operationId": "deleteRecord",
460
+ "summary": "Delete a record",
461
+ "description": "Permanently delete a single record from the specified table by its record ID.",
462
+ "tags": [
463
+ "Records"
464
+ ],
465
+ "parameters": [
466
+ {
467
+ "name": "baseId",
468
+ "in": "path",
469
+ "required": true,
470
+ "description": "The Airtable base ID",
471
+ "schema": {
472
+ "type": "string"
473
+ }
474
+ },
475
+ {
476
+ "name": "tableIdOrName",
477
+ "in": "path",
478
+ "required": true,
479
+ "description": "The table ID or name",
480
+ "schema": {
481
+ "type": "string"
482
+ }
483
+ },
484
+ {
485
+ "name": "recordId",
486
+ "in": "path",
487
+ "required": true,
488
+ "description": "The record ID to delete",
489
+ "schema": {
490
+ "type": "string"
491
+ }
492
+ }
493
+ ],
494
+ "responses": {
495
+ "200": {
496
+ "description": "Record deleted",
497
+ "content": {
498
+ "application/json": {
499
+ "schema": {
500
+ "$ref": "#/components/schemas/DeleteRecordResponse"
501
+ }
502
+ }
503
+ }
504
+ },
505
+ "404": {
506
+ "$ref": "#/components/responses/NotFound"
507
+ }
508
+ }
509
+ }
510
+ },
511
+ "/meta/bases": {
512
+ "get": {
513
+ "operationId": "listBases",
514
+ "summary": "List bases",
515
+ "description": "Returns a list of bases that the current API token has access to. Includes base ID, name, and permission level.",
516
+ "tags": [
517
+ "Metadata"
518
+ ],
519
+ "parameters": [
520
+ {
521
+ "name": "offset",
522
+ "in": "query",
523
+ "description": "Pagination offset for fetching the next page",
524
+ "schema": {
525
+ "type": "string"
526
+ }
527
+ }
528
+ ],
529
+ "responses": {
530
+ "200": {
531
+ "description": "List of accessible bases",
532
+ "content": {
533
+ "application/json": {
534
+ "schema": {
535
+ "$ref": "#/components/schemas/BaseList"
536
+ }
537
+ }
538
+ }
539
+ },
540
+ "401": {
541
+ "$ref": "#/components/responses/Unauthorized"
542
+ }
543
+ }
544
+ }
545
+ },
546
+ "/meta/bases/{baseId}/tables": {
547
+ "get": {
548
+ "operationId": "listTables",
549
+ "summary": "List tables in a base",
550
+ "description": "Returns schema information for all tables in the specified base, including table names, field definitions, and view configurations.",
551
+ "tags": [
552
+ "Metadata"
553
+ ],
554
+ "parameters": [
555
+ {
556
+ "name": "baseId",
557
+ "in": "path",
558
+ "required": true,
559
+ "description": "The Airtable base ID",
560
+ "schema": {
561
+ "type": "string"
562
+ }
563
+ }
564
+ ],
565
+ "responses": {
566
+ "200": {
567
+ "description": "Table schemas",
568
+ "content": {
569
+ "application/json": {
570
+ "schema": {
571
+ "$ref": "#/components/schemas/TableList"
572
+ }
573
+ }
574
+ }
575
+ },
576
+ "401": {
577
+ "$ref": "#/components/responses/Unauthorized"
578
+ },
579
+ "404": {
580
+ "$ref": "#/components/responses/NotFound"
581
+ }
582
+ }
583
+ }
584
+ }
585
+ },
586
+ "components": {
587
+ "securitySchemes": {
588
+ "BearerAuth": {
589
+ "type": "http",
590
+ "scheme": "bearer",
591
+ "description": "Airtable personal access token or OAuth 2.0 access token"
592
+ }
593
+ },
594
+ "responses": {
595
+ "Unauthorized": {
596
+ "description": "Authentication required — provide a valid API token",
597
+ "content": {
598
+ "application/json": {
599
+ "schema": {
600
+ "$ref": "#/components/schemas/Error"
601
+ }
602
+ }
603
+ }
604
+ },
605
+ "Forbidden": {
606
+ "description": "Insufficient permissions to access this resource",
607
+ "content": {
608
+ "application/json": {
609
+ "schema": {
610
+ "$ref": "#/components/schemas/Error"
611
+ }
612
+ }
613
+ }
614
+ },
615
+ "NotFound": {
616
+ "description": "Base, table, or record not found",
617
+ "content": {
618
+ "application/json": {
619
+ "schema": {
620
+ "$ref": "#/components/schemas/Error"
621
+ }
622
+ }
623
+ }
624
+ },
625
+ "UnprocessableEntity": {
626
+ "description": "Invalid field values or formula",
627
+ "content": {
628
+ "application/json": {
629
+ "schema": {
630
+ "$ref": "#/components/schemas/Error"
631
+ }
632
+ }
633
+ }
634
+ }
635
+ },
636
+ "schemas": {
637
+ "Record": {
638
+ "type": "object",
639
+ "properties": {
640
+ "id": {
641
+ "type": "string",
642
+ "description": "The record ID (starts with 'rec')"
643
+ },
644
+ "fields": {
645
+ "type": "object",
646
+ "additionalProperties": true,
647
+ "description": "Field values keyed by field name"
648
+ },
649
+ "createdTime": {
650
+ "type": "string",
651
+ "format": "date-time",
652
+ "description": "Timestamp when the record was created"
653
+ }
654
+ }
655
+ },
656
+ "RecordList": {
657
+ "type": "object",
658
+ "properties": {
659
+ "records": {
660
+ "type": "array",
661
+ "items": {
662
+ "$ref": "#/components/schemas/Record"
663
+ }
664
+ },
665
+ "offset": {
666
+ "type": "string",
667
+ "description": "Pagination cursor for the next page of results"
668
+ }
669
+ }
670
+ },
671
+ "CreateRecordsRequest": {
672
+ "type": "object",
673
+ "properties": {
674
+ "records": {
675
+ "type": "array",
676
+ "items": {
677
+ "type": "object",
678
+ "properties": {
679
+ "fields": {
680
+ "type": "object",
681
+ "additionalProperties": true,
682
+ "description": "Field values for the new record"
683
+ }
684
+ }
685
+ },
686
+ "description": "Array of records to create (max 10)"
687
+ },
688
+ "typecast": {
689
+ "type": "boolean",
690
+ "description": "Automatically convert string values to the appropriate field type"
691
+ },
692
+ "returnFieldsByFieldId": {
693
+ "type": "boolean",
694
+ "description": "Return field keys as field IDs instead of names"
695
+ }
696
+ }
697
+ },
698
+ "CreateRecordsResponse": {
699
+ "type": "object",
700
+ "properties": {
701
+ "records": {
702
+ "type": "array",
703
+ "items": {
704
+ "$ref": "#/components/schemas/Record"
705
+ }
706
+ }
707
+ }
708
+ },
709
+ "UpdateRecordRequest": {
710
+ "type": "object",
711
+ "properties": {
712
+ "fields": {
713
+ "type": "object",
714
+ "additionalProperties": true,
715
+ "description": "Fields to update"
716
+ }
717
+ }
718
+ },
719
+ "UpdateRecordsRequest": {
720
+ "type": "object",
721
+ "properties": {
722
+ "records": {
723
+ "type": "array",
724
+ "items": {
725
+ "type": "object",
726
+ "required": [
727
+ "id"
728
+ ],
729
+ "properties": {
730
+ "id": {
731
+ "type": "string",
732
+ "description": "Record ID to update"
733
+ },
734
+ "fields": {
735
+ "type": "object",
736
+ "additionalProperties": true,
737
+ "description": "Fields to update"
738
+ }
739
+ }
740
+ }
741
+ }
742
+ }
743
+ },
744
+ "UpdateRecordsResponse": {
745
+ "type": "object",
746
+ "properties": {
747
+ "records": {
748
+ "type": "array",
749
+ "items": {
750
+ "$ref": "#/components/schemas/Record"
751
+ }
752
+ }
753
+ }
754
+ },
755
+ "DeleteRecordResponse": {
756
+ "type": "object",
757
+ "properties": {
758
+ "id": {
759
+ "type": "string"
760
+ },
761
+ "deleted": {
762
+ "type": "boolean"
763
+ }
764
+ }
765
+ },
766
+ "DeleteRecordsResponse": {
767
+ "type": "object",
768
+ "properties": {
769
+ "records": {
770
+ "type": "array",
771
+ "items": {
772
+ "$ref": "#/components/schemas/DeleteRecordResponse"
773
+ }
774
+ }
775
+ }
776
+ },
777
+ "Base": {
778
+ "type": "object",
779
+ "properties": {
780
+ "id": {
781
+ "type": "string",
782
+ "description": "Base ID"
783
+ },
784
+ "name": {
785
+ "type": "string",
786
+ "description": "Base name"
787
+ },
788
+ "permissionLevel": {
789
+ "type": "string",
790
+ "enum": [
791
+ "none",
792
+ "read",
793
+ "comment",
794
+ "edit",
795
+ "create"
796
+ ],
797
+ "description": "Permission level for the current user"
798
+ }
799
+ }
800
+ },
801
+ "BaseList": {
802
+ "type": "object",
803
+ "properties": {
804
+ "bases": {
805
+ "type": "array",
806
+ "items": {
807
+ "$ref": "#/components/schemas/Base"
808
+ }
809
+ },
810
+ "offset": {
811
+ "type": "string"
812
+ }
813
+ }
814
+ },
815
+ "Field": {
816
+ "type": "object",
817
+ "properties": {
818
+ "id": {
819
+ "type": "string"
820
+ },
821
+ "name": {
822
+ "type": "string"
823
+ },
824
+ "type": {
825
+ "type": "string",
826
+ "description": "Field type (singleLineText, multilineText, number, date, etc.)"
827
+ },
828
+ "description": {
829
+ "type": "string"
830
+ },
831
+ "options": {
832
+ "type": "object",
833
+ "additionalProperties": true
834
+ }
835
+ }
836
+ },
837
+ "Table": {
838
+ "type": "object",
839
+ "properties": {
840
+ "id": {
841
+ "type": "string"
842
+ },
843
+ "name": {
844
+ "type": "string"
845
+ },
846
+ "description": {
847
+ "type": "string"
848
+ },
849
+ "fields": {
850
+ "type": "array",
851
+ "items": {
852
+ "$ref": "#/components/schemas/Field"
853
+ }
854
+ },
855
+ "views": {
856
+ "type": "array",
857
+ "items": {
858
+ "type": "object",
859
+ "properties": {
860
+ "id": {
861
+ "type": "string"
862
+ },
863
+ "name": {
864
+ "type": "string"
865
+ },
866
+ "type": {
867
+ "type": "string"
868
+ }
869
+ }
870
+ }
871
+ }
872
+ }
873
+ },
874
+ "TableList": {
875
+ "type": "object",
876
+ "properties": {
877
+ "tables": {
878
+ "type": "array",
879
+ "items": {
880
+ "$ref": "#/components/schemas/Table"
881
+ }
882
+ }
883
+ }
884
+ },
885
+ "Error": {
886
+ "type": "object",
887
+ "properties": {
888
+ "error": {
889
+ "type": "object",
890
+ "properties": {
891
+ "type": {
892
+ "type": "string"
893
+ },
894
+ "message": {
895
+ "type": "string"
896
+ }
897
+ }
898
+ }
899
+ }
900
+ }
901
+ }
902
+ }
903
+ }