Skip to content

Commit 3b8c0d8

Browse files
caoxing9claude
andcommitted
revert(zapier): make View a text field again — view list isn't OAuth-accessible
GET /api/table/{tableId}/view returns 403 restricted_resource for OAuth tokens even when the token carries the view|read scope (confirmed via prod logs) — the same restriction as /auth/user/me. So the dynamic View dropdown can't be populated over OAuth. Revert View to a free-text viewId input, drop the hidden views trigger, the altersDynamicFields wiring, and the now-unused view|read scope. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 642c44c commit 3b8c0d8

6 files changed

Lines changed: 4 additions & 53 deletions

File tree

packages/zapier/src/authentication.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const SCOPES = [
1515
'base|read',
1616
'table|read',
1717
'field|read',
18-
'view|read',
1918
'record|read',
2019
'record|create',
2120
'record|update',

packages/zapier/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { rawInstance } from './lib/client';
77
import bases from './triggers/bases';
88
import tables from './triggers/tables';
99
import fields from './triggers/fields';
10-
import views from './triggers/views';
1110
import newRecord from './triggers/new_record';
1211
import newOrUpdatedRecord from './triggers/new_or_updated_record';
1312

@@ -74,7 +73,6 @@ const App = {
7473
bases,
7574
tables,
7675
fields,
77-
views,
7876
new_record: newRecord,
7977
new_or_updated_record: newOrUpdatedRecord,
8078
},

packages/zapier/src/lib/types.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ export interface TeableTable {
3030
name: string;
3131
}
3232

33-
// A view as returned by GET /table/{tableId}/view.
34-
export interface TeableView {
35-
id: string;
36-
name: string;
37-
}
38-
3933
// An { id, name } row used to populate Zapier dynamic dropdowns.
4034
export interface DropdownItem {
4135
id: string;

packages/zapier/src/triggers/new_or_updated_record.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,14 @@ export default {
4646
required: true,
4747
dynamic: 'tables.id.name',
4848
search: 'tables.id',
49-
// Pass the chosen table down so the View dropdown (which depends on
50-
// tableId) re-fetches with it in scope.
51-
altersDynamicFields: true,
5249
},
5350
{
5451
key: 'viewId',
5552
label: 'View',
5653
type: 'string',
5754
required: false,
58-
dynamic: 'views.id.name',
59-
helpText: 'Limit to records in a specific view. Leave blank for all records.',
55+
helpText:
56+
'Optional. The `viw…` id of a view to limit records to (from the view URL). Leave blank for all records.',
6057
},
6158
],
6259
perform,

packages/zapier/src/triggers/new_record.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,14 @@ export default {
3636
required: true,
3737
dynamic: 'tables.id.name',
3838
search: 'tables.id',
39-
// Pass the chosen table down so the View dropdown (which depends on
40-
// tableId) re-fetches with it in scope.
41-
altersDynamicFields: true,
4239
},
4340
{
4441
key: 'viewId',
4542
label: 'View',
4643
type: 'string',
4744
required: false,
48-
dynamic: 'views.id.name',
49-
helpText: 'Limit to records in a specific view. Leave blank for all records.',
45+
helpText:
46+
'Optional. The `viw…` id of a view to limit records to (from the view URL). Leave blank for all records.',
5047
},
5148
],
5249
perform,

packages/zapier/src/triggers/views.ts

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)