@withpica/mcp-sdk 3.23.1 → 3.24.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 CHANGED
@@ -11,6 +11,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [3.24.0] - 2026-10-09
15
+
16
+ ### Added
17
+
18
+ - `works.getThemes`, `works.setThemes`, `works.proposeThemes`, `works.reviewThemes` and
19
+ `directory.untaggedThemes` for a song's directory topics.
20
+
21
+ ### Changed — needs a MINOR bump at release
22
+
23
+ - ⚠️ **`PaginatedResult.total` is now `number | null`** (type change). An
24
+ explicit `pagination.total: null` from the server means "unknown" — a
25
+ platform-wide registry the route will not count, or a filter applied
26
+ after the read — and is passed through as `null` instead of being turned
27
+ into the page length. Code that does arithmetic on `total` must handle
28
+ `null`.
29
+ - `requestPaginated`'s fallback `has_more` (when the server sends none) is
30
+ now `offset + page < total`; it ignored the offset, so every last page of
31
+ a multi-page result reported more (row-cap T3).
32
+
33
+ ### Added
34
+
35
+ - **`syncFit` resource**: `query({ work_id?, screen_project_id?,
36
+ song_facts?, limit?, offset? })` (GET `/admin/sync-fit`), with the
37
+ `SyncFitPage`, `SyncFitRow`, `SyncFitProduction`, `SyncFitSongFacts` and
38
+ `SyncFitMeasured` types.
39
+ - `works.getThemes`, `works.setThemes`, `works.proposeThemes`, `works.reviewThemes` and
40
+ `directory.untaggedThemes` for a song's directory topics.
41
+ - Page methods that return `{ data, total, hasMore }` — the real total —
42
+ alongside the existing `list()` calls, whose return types are unchanged:
43
+ `agreements.listPage`, `bookings.listPage`, `licensing.listEnquiriesPage`,
44
+ `partyClaims.listPage`, `releases.listPage`, `sessions.listPage`,
45
+ `collaborators.listInvitesPage` / `listIncomingPage`,
46
+ `publishers.listPage` and `labels.listPage` (total `null`: platform-wide
47
+ rows are not counted; `labels.listPage` also takes `ids` for a lookup by
48
+ id). `custody.list` takes `offset`.
49
+ - `works.getAgreements(workId)` — the agreements linked to one work.
50
+ - `enrichment.previewBulkRejectProposals(input)` — what a bulk reject
51
+ would reject, resolved by the same server-side resolver, writing nothing.
52
+
14
53
  ## [3.23.1] - 2026-10-07
15
54
 
16
55
  ### Fixed
package/dist/index.d.ts CHANGED
@@ -264,7 +264,12 @@ interface PicaClientConfig {
264
264
  }
265
265
  interface PaginatedResult<T> {
266
266
  data: T[];
267
- total: number;
267
+ /**
268
+ * The real total, or null when the server says it is unknown (a
269
+ * platform-wide registry it will not count, or a filter applied after
270
+ * the read). Never the page length dressed up as a total (row-cap T3).
271
+ */
272
+ total: number | null;
268
273
  hasMore: boolean;
269
274
  /**
270
275
  * Server-provided next-step guidance when a search legitimately returns
@@ -1032,6 +1037,12 @@ declare class WorksResource extends BaseResource {
1032
1037
  */
1033
1038
  has_lyrics?: boolean;
1034
1039
  }): Promise<PaginatedResult<Work>>;
1040
+ /**
1041
+ * The agreements linked to ONE work (GET /admin/works/:id/agreements).
1042
+ * Inspect used `agreements.list()`, which returned the org's first page of
1043
+ * agreements under a work's heading (row-cap T3).
1044
+ */
1045
+ getAgreements(workId: string): Promise<any[]>;
1035
1046
  get(id: string): Promise<Work>;
1036
1047
  create(data: Partial<Work> & {
1037
1048
  create_twin?: boolean;
@@ -1177,6 +1188,49 @@ declare class WorksResource extends BaseResource {
1177
1188
  person_id?: string;
1178
1189
  }>;
1179
1190
  }>;
1191
+ /** A song's directory topics: approved, proposed, moods awaiting review, settings. */
1192
+ getThemes(workId: string): Promise<WorkThemeState>;
1193
+ /** Set the song's approved topics directly, and/or its switch and lyric visibility. */
1194
+ setThemes(workId: string, body: {
1195
+ themes?: string[];
1196
+ themes_enabled?: boolean;
1197
+ lyrics_visibility?: "themes" | "snippet" | "full";
1198
+ }): Promise<WorkThemeState>;
1199
+ /** Propose topics (and recording moods) for the owner to review. Nothing goes public. */
1200
+ proposeThemes(workId: string, body: {
1201
+ themes?: string[];
1202
+ moods?: Array<{
1203
+ recording_id: string;
1204
+ moods: string[];
1205
+ }>;
1206
+ }): Promise<WorkThemeState>;
1207
+ /** The owner's review of proposed topics and moods. */
1208
+ reviewThemes(workId: string, body: {
1209
+ approve?: string[] | "all";
1210
+ reject?: string[];
1211
+ approve_moods_for?: string[] | "all";
1212
+ reject_moods_for?: string[] | "all";
1213
+ }): Promise<WorkThemeState>;
1214
+ }
1215
+ /** GET /api/admin/works/[id]/themes (lib/services/directory/themes.ts ThemeState). */
1216
+ export interface WorkThemeState {
1217
+ work_id: string;
1218
+ title: string;
1219
+ has_lyrics: boolean;
1220
+ themes_enabled: boolean;
1221
+ lyrics_visibility: "themes" | "snippet" | "full";
1222
+ approved: Array<{
1223
+ theme: string;
1224
+ source: "owner" | "assistant";
1225
+ }>;
1226
+ proposed: Array<{
1227
+ theme: string;
1228
+ source: "owner" | "assistant";
1229
+ }>;
1230
+ proposed_moods: Array<{
1231
+ recording_id: string;
1232
+ moods: string[];
1233
+ }>;
1180
1234
  }
1181
1235
  declare class PeopleResource extends BaseResource {
1182
1236
  list(params?: {
@@ -1256,6 +1310,14 @@ declare class PeopleResource extends BaseResource {
1256
1310
  musicbrainz_id?: string;
1257
1311
  }): Promise<Record<string, unknown>>;
1258
1312
  }
1313
+ export interface LicenseEnquiryListParams {
1314
+ work_id?: string;
1315
+ status?: string;
1316
+ project_type?: string;
1317
+ territory?: string;
1318
+ limit?: number;
1319
+ offset?: number;
1320
+ }
1259
1321
  declare class LicensingResource extends BaseResource {
1260
1322
  /**
1261
1323
  * Search for sync-licensable tracks by audio characteristics
@@ -1266,16 +1328,16 @@ declare class LicensingResource extends BaseResource {
1266
1328
  */
1267
1329
  submitEnquiry(enquiry: LicenseEnquiryInput): Promise<LicenseEnquiry>;
1268
1330
  /**
1269
- * List license enquiries with optional filters
1331
+ * List license enquiries with optional filters (one page, the bare array;
1332
+ * see listEnquiriesPage for the real total).
1270
1333
  */
1271
- listEnquiries(params?: {
1272
- work_id?: string;
1273
- status?: string;
1274
- project_type?: string;
1275
- territory?: string;
1276
- limit?: number;
1277
- offset?: number;
1278
- }): Promise<LicenseEnquiry[]>;
1334
+ listEnquiries(params?: LicenseEnquiryListParams): Promise<LicenseEnquiry[]>;
1335
+ /**
1336
+ * One page of license enquiries WITH the real total and has_more
1337
+ * (row-cap T3): `listEnquiries()` returns the bare array, so callers
1338
+ * reported the page length as the total.
1339
+ */
1340
+ listEnquiriesPage(params?: LicenseEnquiryListParams): Promise<PaginatedResult<LicenseEnquiry>>;
1279
1341
  /**
1280
1342
  * Get a specific license enquiry by ID
1281
1343
  */
@@ -1297,20 +1359,27 @@ declare class LicensingResource extends BaseResource {
1297
1359
  * bookings, distinct from `LicensingResource`'s sync-license enquiries).
1298
1360
  * Wraps `/admin/bookings` + `/admin/bookings/[id]`.
1299
1361
  */
1362
+ export interface BookingListParams {
1363
+ status?: string;
1364
+ priority?: string;
1365
+ query?: string;
1366
+ enquiry_type?: string;
1367
+ follow_up_required?: boolean;
1368
+ limit?: number;
1369
+ offset?: number;
1370
+ }
1300
1371
  declare class BookingsResource extends BaseResource {
1301
1372
  /**
1302
- * List/search booking enquiries. `GET /admin/bookings` returns the raw
1303
- * array (not `{data, count}`) — `request()` unwraps to that array.
1373
+ * One page of booking enquiries (the bare array; see listPage for the real
1374
+ * total). `request()` unwraps the route's `{ data, count }` envelope.
1304
1375
  */
1305
- list(params?: {
1306
- status?: string;
1307
- priority?: string;
1308
- query?: string;
1309
- enquiry_type?: string;
1310
- follow_up_required?: boolean;
1311
- limit?: number;
1312
- offset?: number;
1313
- }): Promise<BookingEnquiry[]>;
1376
+ list(params?: BookingListParams): Promise<BookingEnquiry[]>;
1377
+ /**
1378
+ * One page of booking enquiries WITH the real total and has_more
1379
+ * (row-cap T3): `list()` returns the bare array, so callers reported the
1380
+ * page length as the total.
1381
+ */
1382
+ listPage(params?: BookingListParams): Promise<PaginatedResult<BookingEnquiry>>;
1314
1383
  get(id: string): Promise<BookingEnquiry>;
1315
1384
  /**
1316
1385
  * `PATCH /admin/bookings/[id]` only processes ONE update mode per call
@@ -1827,36 +1896,44 @@ declare class MultimediaResource extends BaseResource {
1827
1896
  }): Promise<MultimediaItem>;
1828
1897
  linkWork(id: string, workId: string, relationshipType: string, notes?: string): Promise<Record<string, unknown>>;
1829
1898
  }
1899
+ export interface AgreementListParams {
1900
+ query?: string;
1901
+ agreement_type?: string;
1902
+ status?: string;
1903
+ party_name?: string;
1904
+ includeWorkCounts?: boolean;
1905
+ /**
1906
+ * ADR-289 Wave B1 item 4 — filter to agreements in `pending_signature`
1907
+ * or `partially_signed` (ports the bespoke assistant's
1908
+ * `list_pending_signatures`). Maps to `?awaiting_signature=true` on the
1909
+ * route, which already had multi-status filtering (`statuses[]`) under
1910
+ * the hood.
1911
+ */
1912
+ awaiting_signature?: boolean;
1913
+ /** Agreements with start_date on/after this ISO date (YYYY-MM-DD). */
1914
+ start_date_from?: string;
1915
+ /** Agreements with start_date on/before this ISO date. */
1916
+ start_date_to?: string;
1917
+ /** Agreements with end_date on/after this ISO date. */
1918
+ end_date_from?: string;
1919
+ /** Agreements with end_date on/before this ISO date. */
1920
+ end_date_to?: string;
1921
+ /** Active agreements whose end_date falls within N days from today. */
1922
+ expiring_within_days?: number;
1923
+ /** true → only agreements that have an end_date; false → only open-ended. */
1924
+ has_end_date?: boolean;
1925
+ limit?: number;
1926
+ offset?: number;
1927
+ }
1830
1928
  declare class AgreementsResource extends BaseResource {
1831
- list(params?: {
1832
- query?: string;
1833
- agreement_type?: string;
1834
- status?: string;
1835
- party_name?: string;
1836
- includeWorkCounts?: boolean;
1837
- /**
1838
- * ADR-289 Wave B1 item 4 — filter to agreements in `pending_signature`
1839
- * or `partially_signed` (ports the bespoke assistant's
1840
- * `list_pending_signatures`). Maps to `?awaiting_signature=true` on the
1841
- * route, which already had multi-status filtering (`statuses[]`) under
1842
- * the hood.
1843
- */
1844
- awaiting_signature?: boolean;
1845
- /** Agreements with start_date on/after this ISO date (YYYY-MM-DD). */
1846
- start_date_from?: string;
1847
- /** Agreements with start_date on/before this ISO date. */
1848
- start_date_to?: string;
1849
- /** Agreements with end_date on/after this ISO date. */
1850
- end_date_from?: string;
1851
- /** Agreements with end_date on/before this ISO date. */
1852
- end_date_to?: string;
1853
- /** Active agreements whose end_date falls within N days from today. */
1854
- expiring_within_days?: number;
1855
- /** true → only agreements that have an end_date; false → only open-ended. */
1856
- has_end_date?: boolean;
1857
- limit?: number;
1858
- offset?: number;
1859
- }): Promise<Agreement[]>;
1929
+ /** One page of agreements (the bare array; see listPage for the real total). */
1930
+ list(params?: AgreementListParams): Promise<Agreement[]>;
1931
+ /**
1932
+ * One page of agreements WITH the real total and has_more (row-cap T3):
1933
+ * `list()` returns the bare array, so callers reported the page length
1934
+ * as the total.
1935
+ */
1936
+ listPage(params?: AgreementListParams): Promise<PaginatedResult<Agreement>>;
1860
1937
  get(id: string): Promise<{
1861
1938
  agreement: Agreement;
1862
1939
  signatureStatus: unknown;
@@ -1921,6 +1998,59 @@ declare class AgreementsResource extends BaseResource {
1921
1998
  expires_in_days?: number;
1922
1999
  }): Promise<AgreementSendForSignatureResult>;
1923
2000
  }
2001
+ /** One production behind a sync-fit match (TMDB and Wikidata facts). */
2002
+ export interface SyncFitProduction {
2003
+ tmdb_id: number | null;
2004
+ release_date: string | null;
2005
+ genres: string[];
2006
+ themes: string[];
2007
+ countries: string[];
2008
+ language: string | null;
2009
+ companies: string[];
2010
+ networks: string[];
2011
+ }
2012
+ /** One analysed master's measured facts (the MCPs' shared `measured` names). */
2013
+ export interface SyncFitMeasured {
2014
+ audio_file_id: string;
2015
+ tempo_bpm: number | null;
2016
+ key: string | null;
2017
+ mode: "major" | "minor" | null;
2018
+ duration_seconds: number | null;
2019
+ }
2020
+ export interface SyncFitSongFacts {
2021
+ genres: string[];
2022
+ language: string | null;
2023
+ measured: SyncFitMeasured[];
2024
+ }
2025
+ export interface SyncFitRow {
2026
+ work_id: string;
2027
+ screen_project_id: string;
2028
+ work_title: string | null;
2029
+ production_title: string | null;
2030
+ production_type: string | null;
2031
+ production_status: string | null;
2032
+ band: "strong" | "possible";
2033
+ reasons: string[];
2034
+ production: SyncFitProduction;
2035
+ song?: SyncFitSongFacts;
2036
+ }
2037
+ export interface SyncFitPage {
2038
+ rows: SyncFitRow[];
2039
+ total: number;
2040
+ songs: number;
2041
+ offset: number;
2042
+ limit: number;
2043
+ }
2044
+ /** Sync fit: GET /admin/sync-fit, the same read as /inspect/sync. */
2045
+ declare class SyncFitResource extends BaseResource {
2046
+ query(params?: {
2047
+ work_id?: string;
2048
+ screen_project_id?: string;
2049
+ song_facts?: boolean;
2050
+ limit?: number;
2051
+ offset?: number;
2052
+ }): Promise<SyncFitPage>;
2053
+ }
1924
2054
  declare class SyncPlacementsResource extends BaseResource {
1925
2055
  list(params?: SyncPlacementQueryParams): Promise<PaginatedResult<SyncPlacement>>;
1926
2056
  get(id: string): Promise<SyncPlacementWithRelations>;
@@ -2339,6 +2469,26 @@ declare class EnrichmentResource extends BaseResource {
2339
2469
  rejected: number;
2340
2470
  skipped: string[];
2341
2471
  }>;
2472
+ /**
2473
+ * What bulkRejectProposals would reject, without rejecting: the route
2474
+ * resolves the same pending set the real call would (row-cap T3).
2475
+ */
2476
+ previewBulkRejectProposals(input: {
2477
+ proposal_ids?: string[];
2478
+ filter?: {
2479
+ rule_id?: string;
2480
+ source?: string;
2481
+ max_confidence?: number;
2482
+ };
2483
+ }): Promise<{
2484
+ dry_run: true;
2485
+ would_affect: string[];
2486
+ /** null when exceeds_cap: the count past the cap is not read. */
2487
+ count: number | null;
2488
+ skipped: string[];
2489
+ exceeds_cap: boolean;
2490
+ cap: number;
2491
+ }>;
2342
2492
  /**
2343
2493
  * Apply many pending proposals in one call — the accept side of the
2344
2494
  * /inspect/found queue.
@@ -4031,6 +4181,22 @@ declare class CollaboratorsResource extends BaseResource {
4031
4181
  workId?: string;
4032
4182
  limit?: number;
4033
4183
  }): Promise<CollaboratorInvite[]>;
4184
+ /**
4185
+ * One page of the invites this org sent WITH the real total and has_more
4186
+ * (row-cap T3). `listInvites()` is typed as an array but the route nests
4187
+ * its rows as `data: { data, count }`, so it never carried a usable total.
4188
+ */
4189
+ listInvitesPage(params?: {
4190
+ status?: "pending" | "verified" | "confirmed" | "expired" | "cancelled" | "disputed";
4191
+ workId?: string;
4192
+ limit?: number;
4193
+ offset?: number;
4194
+ }): Promise<PaginatedResult<CollaboratorInvite>>;
4195
+ /**
4196
+ * Reads a collaborator list route, whose rows sit at `data.data` (kept
4197
+ * for published SDKs) with the total in the top-level `pagination`.
4198
+ */
4199
+ private requestNestedPage;
4034
4200
  resendInvite(inviteId: string): Promise<Record<string, unknown>>;
4035
4201
  /**
4036
4202
  * ADR-157 warm path — list invites addressed to the authenticated
@@ -4046,6 +4212,20 @@ declare class CollaboratorsResource extends BaseResource {
4046
4212
  credit_type: string;
4047
4213
  percentage_split: number | null;
4048
4214
  }>>;
4215
+ /**
4216
+ * One page of the invites addressed to the caller WITH the real total and
4217
+ * has_more (row-cap T3: `listIncoming()` returns only the rows).
4218
+ */
4219
+ listIncomingPage(params?: {
4220
+ status?: "pending" | "verified" | "confirmed" | "expired" | "cancelled" | "disputed";
4221
+ limit?: number;
4222
+ offset?: number;
4223
+ }): Promise<PaginatedResult<CollaboratorInvite & {
4224
+ work_title: string | null;
4225
+ inviter_org_name: string | null;
4226
+ credit_type: string;
4227
+ percentage_split: number | null;
4228
+ }>>;
4049
4229
  /**
4050
4230
  * ADR-157 warm path — accept an invite addressed to the authenticated
4051
4231
  * user, and flip its status to confirmed. The credit write is
@@ -4279,6 +4459,15 @@ declare class DirectoryResource extends BaseResource {
4279
4459
  eligible_work_count: number;
4280
4460
  }>;
4281
4461
  updateSettings(updates: Partial<DirectorySettings>): Promise<DirectorySettings>;
4462
+ /** Listed songs with lyrics and topics on, but no approved topic yet. */
4463
+ untaggedThemes(): Promise<{
4464
+ count: number;
4465
+ songs: Array<{
4466
+ work_id: string;
4467
+ title: string;
4468
+ pending_proposals: number;
4469
+ }>;
4470
+ }>;
4282
4471
  }
4283
4472
  declare class ProjectsResource extends BaseResource {
4284
4473
  list(params?: {
@@ -4601,6 +4790,15 @@ declare class RecordingSplitsResource extends BaseResource {
4601
4790
  verify(recordingId: string, splitId: string): Promise<any>;
4602
4791
  }
4603
4792
  declare class PublishersResource extends BaseResource {
4793
+ /**
4794
+ * One page of the publisher registry with an honest has_more. The total
4795
+ * is null: the route does not count the platform-wide registry.
4796
+ */
4797
+ listPage(params?: {
4798
+ query?: string;
4799
+ limit?: number;
4800
+ offset?: number;
4801
+ }): Promise<PaginatedResult<any>>;
4604
4802
  list(params?: {
4605
4803
  query?: string;
4606
4804
  limit?: number;
@@ -4629,6 +4827,18 @@ export interface LabelIdentifiers {
4629
4827
  deezer_label_id?: string;
4630
4828
  }
4631
4829
  declare class LabelsResource extends BaseResource {
4830
+ /**
4831
+ * One page of label/distributor organisations with an honest has_more.
4832
+ * The total is null: the route does not count platform-wide rows.
4833
+ */
4834
+ listPage(params?: {
4835
+ query?: string;
4836
+ limit?: number;
4837
+ offset?: number;
4838
+ org_type?: "label" | "distributor";
4839
+ /** Only these organisation ids — a lookup by id. */
4840
+ ids?: string[];
4841
+ }): Promise<PaginatedResult<LabelOrganisation>>;
4632
4842
  list(params?: {
4633
4843
  query?: string;
4634
4844
  limit?: number;
@@ -4684,6 +4894,12 @@ export interface PartyClaimInviteResult {
4684
4894
  * Typed against the UNWRAPPED reality (ADR-265 lesson): BaseResource.request
4685
4895
  * auto-unwraps the `{success,data}` envelope, so methods see `data` itself.
4686
4896
  */
4897
+ export interface PartyClaimListParams {
4898
+ target_organisation_id?: string;
4899
+ status?: string;
4900
+ limit?: number;
4901
+ offset?: number;
4902
+ }
4687
4903
  declare class PartyClaimsResource extends BaseResource {
4688
4904
  invite(params: {
4689
4905
  target_organisation_id: string;
@@ -4691,11 +4907,13 @@ declare class PartyClaimsResource extends BaseResource {
4691
4907
  release_id?: string;
4692
4908
  recording_id?: string;
4693
4909
  }): Promise<PartyClaimInviteResult | null>;
4694
- list(params?: {
4695
- target_organisation_id?: string;
4696
- status?: string;
4697
- limit?: number;
4698
- }): Promise<PartyClaimInviteSummary[]>;
4910
+ list(params?: PartyClaimListParams): Promise<PartyClaimInviteSummary[]>;
4911
+ /**
4912
+ * One page of sent claim invites WITH the real total and has_more
4913
+ * (row-cap T3): `list()` returns the bare array, so callers reported the
4914
+ * page length as the total.
4915
+ */
4916
+ listPage(params?: PartyClaimListParams): Promise<PaginatedResult<PartyClaimInviteSummary>>;
4699
4917
  }
4700
4918
  /** One person's outcome from POST /admin/people/claim-invites. */
4701
4919
  export interface ProfileClaimInviteOutcome {
@@ -4754,16 +4972,25 @@ declare class ProfileClaimsResource extends BaseResource {
4754
4972
  limit?: number;
4755
4973
  }): Promise<ProfileClaimStatusResult>;
4756
4974
  }
4975
+ export interface ReleaseListParams {
4976
+ limit?: number;
4977
+ offset?: number;
4978
+ query?: string;
4979
+ upc?: string;
4980
+ spotify_album_id?: string;
4981
+ release_date_from?: string;
4982
+ release_date_to?: string;
4983
+ }
4757
4984
  declare class ReleasesResource extends BaseResource {
4758
- list(params?: {
4759
- limit?: number;
4760
- offset?: number;
4761
- query?: string;
4762
- upc?: string;
4763
- spotify_album_id?: string;
4764
- release_date_from?: string;
4765
- release_date_to?: string;
4766
- }): Promise<any>;
4985
+ /** One page of releases (the bare array; see listPage for the real total). */
4986
+ list(params?: ReleaseListParams): Promise<any>;
4987
+ /**
4988
+ * One page of releases WITH the real total and has_more (row-cap T3):
4989
+ * `list()` returns the bare array, so callers guessed has_more from "the
4990
+ * page came back full". `total` is null when the server cannot count (a
4991
+ * title search past its match cap); has_more is the server's own answer.
4992
+ */
4993
+ listPage(params?: ReleaseListParams): Promise<PaginatedResult<any>>;
4767
4994
  get(id: string): Promise<any>;
4768
4995
  /**
4769
4996
  * ADR-208 Phase 3 Primitive D — fetch a server-resized ≤512px JPEG
@@ -4897,10 +5124,20 @@ declare class ReleasesResource extends BaseResource {
4897
5124
  }): Promise<any>;
4898
5125
  }
4899
5126
  declare class SessionsResource extends BaseResource {
5127
+ /** One page of upcoming sessions (see listPage for the real total). */
4900
5128
  list(params?: {
4901
5129
  limit?: number;
4902
5130
  offset?: number;
4903
5131
  }): Promise<any>;
5132
+ /**
5133
+ * One page of the next 7 days' sessions WITH the real total and has_more
5134
+ * (row-cap T3): `list()` returns the bare array, so callers could only
5135
+ * guess has_more from "the page came back full".
5136
+ */
5137
+ listPage(params?: {
5138
+ limit?: number;
5139
+ offset?: number;
5140
+ }): Promise<PaginatedResult<any>>;
4904
5141
  get(id: string): Promise<any>;
4905
5142
  create(data: Record<string, any>): Promise<any>;
4906
5143
  update(id: string, data: Record<string, any>): Promise<any>;
@@ -5209,10 +5446,16 @@ declare class CustodyResource extends BaseResource {
5209
5446
  action: "accept" | "decline" | "dispute";
5210
5447
  reason?: string;
5211
5448
  }): Promise<any>;
5449
+ /**
5450
+ * Custody claims, one page per direction. Since row-cap T3 the result also
5451
+ * carries `totals: { incoming, outgoing }` (null for a direction not asked
5452
+ * for), `has_more: { incoming, outgoing }`, `limit` and `offset`.
5453
+ */
5212
5454
  list(params?: {
5213
5455
  direction?: "incoming" | "outgoing" | "both";
5214
5456
  status?: string;
5215
5457
  limit?: number;
5458
+ offset?: number;
5216
5459
  }): Promise<any>;
5217
5460
  history(params: {
5218
5461
  work_id: string;
@@ -5459,6 +5702,7 @@ export declare class PicaClient {
5459
5702
  multimedia: MultimediaResource;
5460
5703
  agreements: AgreementsResource;
5461
5704
  syncPlacements: SyncPlacementsResource;
5705
+ syncFit: SyncFitResource;
5462
5706
  workspace: WorkspaceResource;
5463
5707
  memory: MemoryResource;
5464
5708
  audit: AuditResource;