Skip to content

Commit 5d896d3

Browse files
committed
Update PDC API calls to use BaseFieldsBundle
1 parent 0f38795 commit 5d896d3

3 files changed

Lines changed: 14 additions & 10 deletions

File tree

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"author": "Open Tech Strategies",
1616
"license": "AGPL-3.0-or-later",
1717
"devDependencies": {
18-
"@pdc/sdk": "^0.26.1",
18+
"@pdc/sdk": "^0.35.1",
1919
"@types/node": "^24.12.2",
2020
"@types/yargs": "^17.0.32",
2121
"@typescript-eslint/eslint-plugin": "^5.62.0",

src/pdc-api.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { client } from './client';
22
import type { AccessTokenSet } from './oidc';
33
import type {
44
BaseField, ProposalBundle, ChangemakerBundle, SourceBundle, Source,
5+
BaseFieldBundle,
56
} from '@pdc/sdk';
67

78
const callPdcApi = async <T>(
@@ -27,10 +28,13 @@ const callPdcApi = async <T>(
2728
};
2829

2930
const getBaseFields = (baseUrl: string, token: AccessTokenSet) => (
30-
callPdcApi<BaseField[]>(
31+
callPdcApi<BaseFieldBundle>(
3132
baseUrl,
3233
'/baseFields',
33-
{},
34+
{
35+
_page: '1',
36+
_count: '2147483647',
37+
},
3438
'get',
3539
token,
3640
)

0 commit comments

Comments
 (0)