@gpt-platform/client 0.6.3 → 0.7.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/dist/index.js CHANGED
@@ -1333,7 +1333,7 @@ function buildUserAgent(sdkVersion, appInfo) {
1333
1333
  }
1334
1334
 
1335
1335
  // src/version.ts
1336
- var SDK_VERSION = "0.6.3";
1336
+ var SDK_VERSION = "0.7.0";
1337
1337
  var DEFAULT_API_VERSION = "2026-03-11";
1338
1338
 
1339
1339
  // src/base-client.ts
@@ -1794,6 +1794,20 @@ var getCrmRelationshipsById = (options) => (options.client ?? client).get({
1794
1794
  url: "/crm/relationships/{id}",
1795
1795
  ...options
1796
1796
  });
1797
+ var getClinicalSessions = (options) => (options.client ?? client).get({
1798
+ security: [{ scheme: "bearer", type: "http" }],
1799
+ url: "/clinical/sessions",
1800
+ ...options
1801
+ });
1802
+ var postClinicalSessions = (options) => (options.client ?? client).post({
1803
+ security: [{ scheme: "bearer", type: "http" }],
1804
+ url: "/clinical/sessions",
1805
+ ...options,
1806
+ headers: {
1807
+ "Content-Type": "application/vnd.api+json",
1808
+ ...options.headers
1809
+ }
1810
+ });
1797
1811
  var getWatcherEventsById = (options) => (options.client ?? client).get({
1798
1812
  security: [{ scheme: "bearer", type: "http" }],
1799
1813
  url: "/watcher/events/{id}",
@@ -1855,6 +1869,30 @@ var getCatalogTaxonomyNodesTaxonomyByTaxonomyId = (options) => (options.client ?
1855
1869
  url: "/catalog/taxonomy-nodes/taxonomy/{taxonomy_id}",
1856
1870
  ...options
1857
1871
  });
1872
+ var getClinicalNotesByNoteIdVersionsById = (options) => (options.client ?? client).get({
1873
+ security: [{ scheme: "bearer", type: "http" }],
1874
+ url: "/clinical/notes/{note_id}/versions/{id}",
1875
+ ...options
1876
+ });
1877
+ var deleteClinicalMealPlansById = (options) => (options.client ?? client).delete({
1878
+ security: [{ scheme: "bearer", type: "http" }],
1879
+ url: "/clinical/meal-plans/{id}",
1880
+ ...options
1881
+ });
1882
+ var getClinicalMealPlansById = (options) => (options.client ?? client).get({
1883
+ security: [{ scheme: "bearer", type: "http" }],
1884
+ url: "/clinical/meal-plans/{id}",
1885
+ ...options
1886
+ });
1887
+ var patchClinicalMealPlansById = (options) => (options.client ?? client).patch({
1888
+ security: [{ scheme: "bearer", type: "http" }],
1889
+ url: "/clinical/meal-plans/{id}",
1890
+ ...options,
1891
+ headers: {
1892
+ "Content-Type": "application/vnd.api+json",
1893
+ ...options.headers
1894
+ }
1895
+ });
1858
1896
  var deleteSocialAccountsById = (options) => (options.client ?? client).delete({
1859
1897
  security: [{ scheme: "bearer", type: "http" }],
1860
1898
  url: "/social/accounts/{id}",
@@ -1958,6 +1996,11 @@ var getAgentsByIdStats = (options) => (options.client ?? client).get({
1958
1996
  url: "/agents/{id}/stats",
1959
1997
  ...options
1960
1998
  });
1999
+ var getClinicalPatientsByIdHealthMetrics = (options) => (options.client ?? client).get({
2000
+ security: [{ scheme: "bearer", type: "http" }],
2001
+ url: "/clinical/patients/{id}/health_metrics",
2002
+ ...options
2003
+ });
1961
2004
  var patchCrmExportsByIdRefreshUrl = (options) => (options.client ?? client).patch({
1962
2005
  security: [{ scheme: "bearer", type: "http" }],
1963
2006
  url: "/crm/exports/{id}/refresh-url",
@@ -2001,6 +2044,25 @@ var getCrmExportsById = (options) => (options.client ?? client).get({
2001
2044
  url: "/crm/exports/{id}",
2002
2045
  ...options
2003
2046
  });
2047
+ var deleteClinicalPracticeResourcesById = (options) => (options.client ?? client).delete({
2048
+ security: [{ scheme: "bearer", type: "http" }],
2049
+ url: "/clinical/practice-resources/{id}",
2050
+ ...options
2051
+ });
2052
+ var getClinicalPracticeResourcesById = (options) => (options.client ?? client).get({
2053
+ security: [{ scheme: "bearer", type: "http" }],
2054
+ url: "/clinical/practice-resources/{id}",
2055
+ ...options
2056
+ });
2057
+ var patchClinicalPracticeResourcesById = (options) => (options.client ?? client).patch({
2058
+ security: [{ scheme: "bearer", type: "http" }],
2059
+ url: "/clinical/practice-resources/{id}",
2060
+ ...options,
2061
+ headers: {
2062
+ "Content-Type": "application/vnd.api+json",
2063
+ ...options.headers
2064
+ }
2065
+ });
2004
2066
  var patchSocialAccountsByIdDeactivate = (options) => (options.client ?? client).patch({
2005
2067
  security: [{ scheme: "bearer", type: "http" }],
2006
2068
  url: "/social/accounts/{id}/deactivate",
@@ -2119,6 +2181,39 @@ var postExtractionBatches = (options) => (options.client ?? client).post({
2119
2181
  ...options.headers
2120
2182
  }
2121
2183
  });
2184
+ var getClinicalNotes = (options) => (options.client ?? client).get({
2185
+ security: [{ scheme: "bearer", type: "http" }],
2186
+ url: "/clinical/notes",
2187
+ ...options
2188
+ });
2189
+ var postClinicalNotes = (options) => (options.client ?? client).post({
2190
+ security: [{ scheme: "bearer", type: "http" }],
2191
+ url: "/clinical/notes",
2192
+ ...options,
2193
+ headers: {
2194
+ "Content-Type": "application/vnd.api+json",
2195
+ ...options.headers
2196
+ }
2197
+ });
2198
+ var deleteClinicalClientGoalsById = (options) => (options.client ?? client).delete({
2199
+ security: [{ scheme: "bearer", type: "http" }],
2200
+ url: "/clinical/client-goals/{id}",
2201
+ ...options
2202
+ });
2203
+ var getClinicalClientGoalsById = (options) => (options.client ?? client).get({
2204
+ security: [{ scheme: "bearer", type: "http" }],
2205
+ url: "/clinical/client-goals/{id}",
2206
+ ...options
2207
+ });
2208
+ var patchClinicalClientGoalsById = (options) => (options.client ?? client).patch({
2209
+ security: [{ scheme: "bearer", type: "http" }],
2210
+ url: "/clinical/client-goals/{id}",
2211
+ ...options,
2212
+ headers: {
2213
+ "Content-Type": "application/vnd.api+json",
2214
+ ...options.headers
2215
+ }
2216
+ });
2122
2217
  var postAgentsImport = (options) => (options.client ?? client).post({
2123
2218
  security: [{ scheme: "bearer", type: "http" }],
2124
2219
  url: "/agents/import",
@@ -2184,6 +2279,15 @@ var postEmailOutboundEmailsComposeWithAi = (options) => (options.client ?? clien
2184
2279
  ...options.headers
2185
2280
  }
2186
2281
  });
2282
+ var postWebhookDeliveriesByIdRetry = (options) => (options.client ?? client).post({
2283
+ security: [{ scheme: "bearer", type: "http" }],
2284
+ url: "/webhook-deliveries/{id}/retry",
2285
+ ...options,
2286
+ headers: {
2287
+ "Content-Type": "application/vnd.api+json",
2288
+ ...options.headers
2289
+ }
2290
+ });
2187
2291
  var patchSocialPostsByIdPublish = (options) => (options.client ?? client).patch({
2188
2292
  security: [{ scheme: "bearer", type: "http" }],
2189
2293
  url: "/social/posts/{id}/publish",
@@ -2365,6 +2469,16 @@ var postConnectorsCredentialsByIdRefresh = (options) => (options.client ?? clien
2365
2469
  ...options.headers
2366
2470
  }
2367
2471
  });
2472
+ var deleteClinicalSupplementRecCacheById = (options) => (options.client ?? client).delete({
2473
+ security: [{ scheme: "bearer", type: "http" }],
2474
+ url: "/clinical/supplement-rec-cache/{id}",
2475
+ ...options
2476
+ });
2477
+ var getClinicalSupplementRecCacheById = (options) => (options.client ?? client).get({
2478
+ security: [{ scheme: "bearer", type: "http" }],
2479
+ url: "/clinical/supplement-rec-cache/{id}",
2480
+ ...options
2481
+ });
2368
2482
  var postWorkspacesByWorkspaceIdExtractionDocumentsDismissAllTrained = (options) => (options.client ?? client).post({
2369
2483
  security: [{ scheme: "bearer", type: "http" }],
2370
2484
  url: "/workspaces/{workspace_id}/extraction/documents/dismiss-all-trained",
@@ -2374,6 +2488,11 @@ var postWorkspacesByWorkspaceIdExtractionDocumentsDismissAllTrained = (options)
2374
2488
  ...options.headers
2375
2489
  }
2376
2490
  });
2491
+ var getClinicalSessionsByIdSessionNotes = (options) => (options.client ?? client).get({
2492
+ security: [{ scheme: "bearer", type: "http" }],
2493
+ url: "/clinical/sessions/{id}/session_notes",
2494
+ ...options
2495
+ });
2377
2496
  var postExtractionDocumentsFindOrBeginUpload = (options) => (options.client ?? client).post({
2378
2497
  security: [{ scheme: "bearer", type: "http" }],
2379
2498
  url: "/extraction/documents/find-or-begin-upload",
@@ -2406,6 +2525,11 @@ var postConfigs = (options) => (options.client ?? client).post({
2406
2525
  ...options.headers
2407
2526
  }
2408
2527
  });
2528
+ var getClinicalSupplementRecCache = (options) => (options.client ?? client).get({
2529
+ security: [{ scheme: "bearer", type: "http" }],
2530
+ url: "/clinical/supplement-rec-cache",
2531
+ ...options
2532
+ });
2409
2533
  var deleteCrmCustomEntitiesById = (options) => (options.client ?? client).delete({
2410
2534
  security: [{ scheme: "bearer", type: "http" }],
2411
2535
  url: "/crm/custom-entities/{id}",
@@ -2452,6 +2576,11 @@ var postTokens = (options) => (options.client ?? client).post({
2452
2576
  ...options.headers
2453
2577
  }
2454
2578
  });
2579
+ var getClinicalPatientsByIdSupplements = (options) => (options.client ?? client).get({
2580
+ security: [{ scheme: "bearer", type: "http" }],
2581
+ url: "/clinical/patients/{id}/supplements",
2582
+ ...options
2583
+ });
2455
2584
  var postAgentsByIdPublishVersion = (options) => (options.client ?? client).post({
2456
2585
  security: [{ scheme: "bearer", type: "http" }],
2457
2586
  url: "/agents/{id}/publish-version",
@@ -2591,6 +2720,25 @@ var postCrmRelationshipTypes = (options) => (options.client ?? client).post({
2591
2720
  ...options.headers
2592
2721
  }
2593
2722
  });
2723
+ var deleteClinicalSessionsById = (options) => (options.client ?? client).delete({
2724
+ security: [{ scheme: "bearer", type: "http" }],
2725
+ url: "/clinical/sessions/{id}",
2726
+ ...options
2727
+ });
2728
+ var getClinicalSessionsById = (options) => (options.client ?? client).get({
2729
+ security: [{ scheme: "bearer", type: "http" }],
2730
+ url: "/clinical/sessions/{id}",
2731
+ ...options
2732
+ });
2733
+ var patchClinicalSessionsById = (options) => (options.client ?? client).patch({
2734
+ security: [{ scheme: "bearer", type: "http" }],
2735
+ url: "/clinical/sessions/{id}",
2736
+ ...options,
2737
+ headers: {
2738
+ "Content-Type": "application/vnd.api+json",
2739
+ ...options.headers
2740
+ }
2741
+ });
2594
2742
  var getAgentsUsage = (options) => (options.client ?? client).get({
2595
2743
  security: [{ scheme: "bearer", type: "http" }],
2596
2744
  url: "/agents/usage",
@@ -2722,6 +2870,25 @@ var patchSocialCampaignsByIdCancel = (options) => (options.client ?? client).pat
2722
2870
  ...options.headers
2723
2871
  }
2724
2872
  });
2873
+ var deleteClinicalPracticeToolsById = (options) => (options.client ?? client).delete({
2874
+ security: [{ scheme: "bearer", type: "http" }],
2875
+ url: "/clinical/practice-tools/{id}",
2876
+ ...options
2877
+ });
2878
+ var getClinicalPracticeToolsById = (options) => (options.client ?? client).get({
2879
+ security: [{ scheme: "bearer", type: "http" }],
2880
+ url: "/clinical/practice-tools/{id}",
2881
+ ...options
2882
+ });
2883
+ var patchClinicalPracticeToolsById = (options) => (options.client ?? client).patch({
2884
+ security: [{ scheme: "bearer", type: "http" }],
2885
+ url: "/clinical/practice-tools/{id}",
2886
+ ...options,
2887
+ headers: {
2888
+ "Content-Type": "application/vnd.api+json",
2889
+ ...options.headers
2890
+ }
2891
+ });
2725
2892
  var getFeatureUsagesById = (options) => (options.client ?? client).get({
2726
2893
  security: [{ scheme: "bearer", type: "http" }],
2727
2894
  url: "/feature-usages/{id}",
@@ -2736,6 +2903,11 @@ var patchSchedulingCalendarSyncsByIdPause = (options) => (options.client ?? clie
2736
2903
  ...options.headers
2737
2904
  }
2738
2905
  });
2906
+ var getWebhookConfigsStats = (options) => (options.client ?? client).get({
2907
+ security: [{ scheme: "bearer", type: "http" }],
2908
+ url: "/webhook-configs/stats",
2909
+ ...options
2910
+ });
2739
2911
  var getEmailMarketingCampaignsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
2740
2912
  security: [{ scheme: "bearer", type: "http" }],
2741
2913
  url: "/email-marketing/campaigns/workspace/{workspace_id}",
@@ -2945,6 +3117,25 @@ var patchCrawlerJobsByIdCancel = (options) => (options.client ?? client).patch({
2945
3117
  ...options.headers
2946
3118
  }
2947
3119
  });
3120
+ var deleteClinicalNotesById = (options) => (options.client ?? client).delete({
3121
+ security: [{ scheme: "bearer", type: "http" }],
3122
+ url: "/clinical/notes/{id}",
3123
+ ...options
3124
+ });
3125
+ var getClinicalNotesById = (options) => (options.client ?? client).get({
3126
+ security: [{ scheme: "bearer", type: "http" }],
3127
+ url: "/clinical/notes/{id}",
3128
+ ...options
3129
+ });
3130
+ var patchClinicalNotesById = (options) => (options.client ?? client).patch({
3131
+ security: [{ scheme: "bearer", type: "http" }],
3132
+ url: "/clinical/notes/{id}",
3133
+ ...options,
3134
+ headers: {
3135
+ "Content-Type": "application/vnd.api+json",
3136
+ ...options.headers
3137
+ }
3138
+ });
2948
3139
  var patchSchedulingBookingsByIdConfirm = (options) => (options.client ?? client).patch({
2949
3140
  security: [{ scheme: "bearer", type: "http" }],
2950
3141
  url: "/scheduling/bookings/{id}/confirm",
@@ -2954,6 +3145,15 @@ var patchSchedulingBookingsByIdConfirm = (options) => (options.client ?? client)
2954
3145
  ...options.headers
2955
3146
  }
2956
3147
  });
3148
+ var patchClinicalNotesByIdApprove = (options) => (options.client ?? client).patch({
3149
+ security: [{ scheme: "bearer", type: "http" }],
3150
+ url: "/clinical/notes/{id}/approve",
3151
+ ...options,
3152
+ headers: {
3153
+ "Content-Type": "application/vnd.api+json",
3154
+ ...options.headers
3155
+ }
3156
+ });
2957
3157
  var postAgentVersionsByIdAddSystemField = (options) => (options.client ?? client).post({
2958
3158
  security: [{ scheme: "bearer", type: "http" }],
2959
3159
  url: "/agent-versions/{id}/add-system-field",
@@ -2995,6 +3195,11 @@ var patchEmailMarketingGeneratedEmailsByIdApprove = (options) => (options.client
2995
3195
  ...options.headers
2996
3196
  }
2997
3197
  });
3198
+ var getClinicalNotesByNoteIdVersions = (options) => (options.client ?? client).get({
3199
+ security: [{ scheme: "bearer", type: "http" }],
3200
+ url: "/clinical/notes/{note_id}/versions",
3201
+ ...options
3202
+ });
2998
3203
  var postSupportTickets = (options) => (options.client ?? client).post({
2999
3204
  security: [{ scheme: "bearer", type: "http" }],
3000
3205
  url: "/support/tickets",
@@ -3160,6 +3365,11 @@ var patchSchedulingParticipantsById = (options) => (options.client ?? client).pa
3160
3365
  ...options.headers
3161
3366
  }
3162
3367
  });
3368
+ var getClinicalSessionsByIdMealPlans = (options) => (options.client ?? client).get({
3369
+ security: [{ scheme: "bearer", type: "http" }],
3370
+ url: "/clinical/sessions/{id}/meal_plans",
3371
+ ...options
3372
+ });
3163
3373
  var postTenantsByIdCredit = (options) => (options.client ?? client).post({
3164
3374
  security: [{ scheme: "bearer", type: "http" }],
3165
3375
  url: "/tenants/{id}/credit",
@@ -3249,6 +3459,11 @@ var postSchedulingParticipants = (options) => (options.client ?? client).post({
3249
3459
  ...options.headers
3250
3460
  }
3251
3461
  });
3462
+ var getWebhookDeliveriesStats = (options) => (options.client ?? client).get({
3463
+ security: [{ scheme: "bearer", type: "http" }],
3464
+ url: "/webhook-deliveries/stats",
3465
+ ...options
3466
+ });
3252
3467
  var getNotificationLogsById = (options) => (options.client ?? client).get({
3253
3468
  security: [{ scheme: "bearer", type: "http" }],
3254
3469
  url: "/notification-logs/{id}",
@@ -3416,6 +3631,20 @@ var getSearchSemantic = (options) => (options.client ?? client).get({
3416
3631
  url: "/search/semantic",
3417
3632
  ...options
3418
3633
  });
3634
+ var getClinicalPracticeTools = (options) => (options.client ?? client).get({
3635
+ security: [{ scheme: "bearer", type: "http" }],
3636
+ url: "/clinical/practice-tools",
3637
+ ...options
3638
+ });
3639
+ var postClinicalPracticeTools = (options) => (options.client ?? client).post({
3640
+ security: [{ scheme: "bearer", type: "http" }],
3641
+ url: "/clinical/practice-tools",
3642
+ ...options,
3643
+ headers: {
3644
+ "Content-Type": "application/vnd.api+json",
3645
+ ...options.headers
3646
+ }
3647
+ });
3419
3648
  var patchCampaignsSequencesByIdResume = (options) => (options.client ?? client).patch({
3420
3649
  security: [{ scheme: "bearer", type: "http" }],
3421
3650
  url: "/campaigns/sequences/{id}/resume",
@@ -3505,6 +3734,25 @@ var getCrmPipelinesWorkspaceByWorkspaceId = (options) => (options.client ?? clie
3505
3734
  url: "/crm/pipelines/workspace/{workspace_id}",
3506
3735
  ...options
3507
3736
  });
3737
+ var deleteClinicalClientResourceAssignmentsById = (options) => (options.client ?? client).delete({
3738
+ security: [{ scheme: "bearer", type: "http" }],
3739
+ url: "/clinical/client-resource-assignments/{id}",
3740
+ ...options
3741
+ });
3742
+ var getClinicalClientResourceAssignmentsById = (options) => (options.client ?? client).get({
3743
+ security: [{ scheme: "bearer", type: "http" }],
3744
+ url: "/clinical/client-resource-assignments/{id}",
3745
+ ...options
3746
+ });
3747
+ var patchClinicalClientResourceAssignmentsById = (options) => (options.client ?? client).patch({
3748
+ security: [{ scheme: "bearer", type: "http" }],
3749
+ url: "/clinical/client-resource-assignments/{id}",
3750
+ ...options,
3751
+ headers: {
3752
+ "Content-Type": "application/vnd.api+json",
3753
+ ...options.headers
3754
+ }
3755
+ });
3508
3756
  var patchExtractionDocumentsByIdReprocess = (options) => (options.client ?? client).patch({
3509
3757
  security: [{ scheme: "bearer", type: "http" }],
3510
3758
  url: "/extraction/documents/{id}/reprocess",
@@ -3684,6 +3932,20 @@ var getSocialMetricsPostBySocialPostIdLatest = (options) => (options.client ?? c
3684
3932
  url: "/social/metrics/post/{social_post_id}/latest",
3685
3933
  ...options
3686
3934
  });
3935
+ var getClinicalDeliveries = (options) => (options.client ?? client).get({
3936
+ security: [{ scheme: "bearer", type: "http" }],
3937
+ url: "/clinical/deliveries",
3938
+ ...options
3939
+ });
3940
+ var postClinicalDeliveries = (options) => (options.client ?? client).post({
3941
+ security: [{ scheme: "bearer", type: "http" }],
3942
+ url: "/clinical/deliveries",
3943
+ ...options,
3944
+ headers: {
3945
+ "Content-Type": "application/vnd.api+json",
3946
+ ...options.headers
3947
+ }
3948
+ });
3687
3949
  var getDataSubjectRequests = (options) => (options.client ?? client).get({
3688
3950
  security: [{ scheme: "bearer", type: "http" }],
3689
3951
  url: "/data-subject-requests",
@@ -3726,6 +3988,11 @@ var getVoiceTranscriptionResultsSessionBySessionId = (options) => (options.clien
3726
3988
  url: "/voice/transcription-results/session/{session_id}",
3727
3989
  ...options
3728
3990
  });
3991
+ var getMessagesSearch = (options) => (options.client ?? client).get({
3992
+ security: [{ scheme: "bearer", type: "http" }],
3993
+ url: "/messages/search",
3994
+ ...options
3995
+ });
3729
3996
  var postAgentsByIdTeach = (options) => (options.client ?? client).post({
3730
3997
  security: [{ scheme: "bearer", type: "http" }],
3731
3998
  url: "/agents/{id}/teach",
@@ -3744,6 +4011,25 @@ var postSocialPosts = (options) => (options.client ?? client).post({
3744
4011
  ...options.headers
3745
4012
  }
3746
4013
  });
4014
+ var deleteClinicalPatientsById = (options) => (options.client ?? client).delete({
4015
+ security: [{ scheme: "bearer", type: "http" }],
4016
+ url: "/clinical/patients/{id}",
4017
+ ...options
4018
+ });
4019
+ var getClinicalPatientsById = (options) => (options.client ?? client).get({
4020
+ security: [{ scheme: "bearer", type: "http" }],
4021
+ url: "/clinical/patients/{id}",
4022
+ ...options
4023
+ });
4024
+ var patchClinicalPatientsById = (options) => (options.client ?? client).patch({
4025
+ security: [{ scheme: "bearer", type: "http" }],
4026
+ url: "/clinical/patients/{id}",
4027
+ ...options,
4028
+ headers: {
4029
+ "Content-Type": "application/vnd.api+json",
4030
+ ...options.headers
4031
+ }
4032
+ });
3747
4033
  var patchInvitationsByIdDecline = (options) => (options.client ?? client).patch({
3748
4034
  security: [{ scheme: "bearer", type: "http" }],
3749
4035
  url: "/invitations/{id}/decline",
@@ -3809,6 +4095,20 @@ var getDataSubjectRequestsById = (options) => (options.client ?? client).get({
3809
4095
  url: "/data-subject-requests/{id}",
3810
4096
  ...options
3811
4097
  });
4098
+ var getClinicalClientResourceAssignments = (options) => (options.client ?? client).get({
4099
+ security: [{ scheme: "bearer", type: "http" }],
4100
+ url: "/clinical/client-resource-assignments",
4101
+ ...options
4102
+ });
4103
+ var postClinicalClientResourceAssignments = (options) => (options.client ?? client).post({
4104
+ security: [{ scheme: "bearer", type: "http" }],
4105
+ url: "/clinical/client-resource-assignments",
4106
+ ...options,
4107
+ headers: {
4108
+ "Content-Type": "application/vnd.api+json",
4109
+ ...options.headers
4110
+ }
4111
+ });
3812
4112
  var postUsersRegisterIsv = (options) => (options.client ?? client).post({
3813
4113
  security: [{ scheme: "bearer", type: "http" }],
3814
4114
  url: "/users/register-isv",
@@ -4072,6 +4372,25 @@ var postSchedulingEventTypes = (options) => (options.client ?? client).post({
4072
4372
  ...options.headers
4073
4373
  }
4074
4374
  });
4375
+ var deleteClinicalClientSupplementsById = (options) => (options.client ?? client).delete({
4376
+ security: [{ scheme: "bearer", type: "http" }],
4377
+ url: "/clinical/client-supplements/{id}",
4378
+ ...options
4379
+ });
4380
+ var getClinicalClientSupplementsById = (options) => (options.client ?? client).get({
4381
+ security: [{ scheme: "bearer", type: "http" }],
4382
+ url: "/clinical/client-supplements/{id}",
4383
+ ...options
4384
+ });
4385
+ var patchClinicalClientSupplementsById = (options) => (options.client ?? client).patch({
4386
+ security: [{ scheme: "bearer", type: "http" }],
4387
+ url: "/clinical/client-supplements/{id}",
4388
+ ...options,
4389
+ headers: {
4390
+ "Content-Type": "application/vnd.api+json",
4391
+ ...options.headers
4392
+ }
4393
+ });
4075
4394
  var deleteCrmPipelinesById = (options) => (options.client ?? client).delete({
4076
4395
  security: [{ scheme: "bearer", type: "http" }],
4077
4396
  url: "/crm/pipelines/{id}",
@@ -4189,6 +4508,11 @@ var postTenantsByIdSchedulePurge = (options) => (options.client ?? client).post(
4189
4508
  ...options.headers
4190
4509
  }
4191
4510
  });
4511
+ var getMessagesSemanticSearch = (options) => (options.client ?? client).get({
4512
+ security: [{ scheme: "bearer", type: "http" }],
4513
+ url: "/messages/semantic-search",
4514
+ ...options
4515
+ });
4192
4516
  var deleteCrmActivitiesById = (options) => (options.client ?? client).delete({
4193
4517
  security: [{ scheme: "bearer", type: "http" }],
4194
4518
  url: "/crm/activities/{id}",
@@ -4372,6 +4696,20 @@ var patchUserProfilesByIdDismissWelcome = (options) => (options.client ?? client
4372
4696
  ...options.headers
4373
4697
  }
4374
4698
  });
4699
+ var getClinicalHealthMetrics = (options) => (options.client ?? client).get({
4700
+ security: [{ scheme: "bearer", type: "http" }],
4701
+ url: "/clinical/health-metrics",
4702
+ ...options
4703
+ });
4704
+ var postClinicalHealthMetrics = (options) => (options.client ?? client).post({
4705
+ security: [{ scheme: "bearer", type: "http" }],
4706
+ url: "/clinical/health-metrics",
4707
+ ...options,
4708
+ headers: {
4709
+ "Content-Type": "application/vnd.api+json",
4710
+ ...options.headers
4711
+ }
4712
+ });
4375
4713
  var patchWalletAddonsByAddonSlugCancel = (options) => (options.client ?? client).patch({
4376
4714
  security: [{ scheme: "bearer", type: "http" }],
4377
4715
  url: "/wallet/addons/{addon_slug}/cancel",
@@ -4409,6 +4747,20 @@ var patchEmailOutboundEmailsByIdSchedule = (options) => (options.client ?? clien
4409
4747
  ...options.headers
4410
4748
  }
4411
4749
  });
4750
+ var getClinicalPatients = (options) => (options.client ?? client).get({
4751
+ security: [{ scheme: "bearer", type: "http" }],
4752
+ url: "/clinical/patients",
4753
+ ...options
4754
+ });
4755
+ var postClinicalPatients = (options) => (options.client ?? client).post({
4756
+ security: [{ scheme: "bearer", type: "http" }],
4757
+ url: "/clinical/patients",
4758
+ ...options,
4759
+ headers: {
4760
+ "Content-Type": "application/vnd.api+json",
4761
+ ...options.headers
4762
+ }
4763
+ });
4412
4764
  var patchExtractionDocumentsByIdVerification = (options) => (options.client ?? client).patch({
4413
4765
  security: [{ scheme: "bearer", type: "http" }],
4414
4766
  url: "/extraction/documents/{id}/verification",
@@ -4437,6 +4789,11 @@ var getTransactions = (options) => (options.client ?? client).get({
4437
4789
  url: "/transactions",
4438
4790
  ...options
4439
4791
  });
4792
+ var getThreadsSearch = (options) => (options.client ?? client).get({
4793
+ security: [{ scheme: "bearer", type: "http" }],
4794
+ url: "/threads/search",
4795
+ ...options
4796
+ });
4440
4797
  var patchSocialAccountsByIdEnablePosting = (options) => (options.client ?? client).patch({
4441
4798
  security: [{ scheme: "bearer", type: "http" }],
4442
4799
  url: "/social/accounts/{id}/enable-posting",
@@ -4570,6 +4927,20 @@ var patchSupportTicketsByIdClose = (options) => (options.client ?? client).patch
4570
4927
  ...options.headers
4571
4928
  }
4572
4929
  });
4930
+ var getClinicalClientGoals = (options) => (options.client ?? client).get({
4931
+ security: [{ scheme: "bearer", type: "http" }],
4932
+ url: "/clinical/client-goals",
4933
+ ...options
4934
+ });
4935
+ var postClinicalClientGoals = (options) => (options.client ?? client).post({
4936
+ security: [{ scheme: "bearer", type: "http" }],
4937
+ url: "/clinical/client-goals",
4938
+ ...options,
4939
+ headers: {
4940
+ "Content-Type": "application/vnd.api+json",
4941
+ ...options.headers
4942
+ }
4943
+ });
4573
4944
  var getWalletSeats = (options) => (options.client ?? client).get({
4574
4945
  security: [{ scheme: "bearer", type: "http" }],
4575
4946
  url: "/wallet/seats",
@@ -4621,12 +4992,26 @@ var patchSchedulingEventsByIdReschedule = (options) => (options.client ?? client
4621
4992
  ...options.headers
4622
4993
  }
4623
4994
  });
4624
- var getCampaignsSequencesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
4995
+ var getClinicalPracticeResources = (options) => (options.client ?? client).get({
4625
4996
  security: [{ scheme: "bearer", type: "http" }],
4626
- url: "/campaigns/sequences/workspace/{workspace_id}",
4997
+ url: "/clinical/practice-resources",
4627
4998
  ...options
4628
4999
  });
4629
- var patchUserProfilesByIdDismissAnnouncement = (options) => (options.client ?? client).patch({
5000
+ var postClinicalPracticeResources = (options) => (options.client ?? client).post({
5001
+ security: [{ scheme: "bearer", type: "http" }],
5002
+ url: "/clinical/practice-resources",
5003
+ ...options,
5004
+ headers: {
5005
+ "Content-Type": "application/vnd.api+json",
5006
+ ...options.headers
5007
+ }
5008
+ });
5009
+ var getCampaignsSequencesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
5010
+ security: [{ scheme: "bearer", type: "http" }],
5011
+ url: "/campaigns/sequences/workspace/{workspace_id}",
5012
+ ...options
5013
+ });
5014
+ var patchUserProfilesByIdDismissAnnouncement = (options) => (options.client ?? client).patch({
4630
5015
  security: [{ scheme: "bearer", type: "http" }],
4631
5016
  url: "/user-profiles/{id}/dismiss-announcement",
4632
5017
  ...options,
@@ -4667,6 +5052,11 @@ var postEmailMarketingSenderProfiles = (options) => (options.client ?? client).p
4667
5052
  ...options.headers
4668
5053
  }
4669
5054
  });
5055
+ var getClinicalPatientsByIdResourceAssignments = (options) => (options.client ?? client).get({
5056
+ security: [{ scheme: "bearer", type: "http" }],
5057
+ url: "/clinical/patients/{id}/resource_assignments",
5058
+ ...options
5059
+ });
4670
5060
  var getWatcherClaimsById = (options) => (options.client ?? client).get({
4671
5061
  security: [{ scheme: "bearer", type: "http" }],
4672
5062
  url: "/watcher/claims/{id}",
@@ -4690,6 +5080,25 @@ var postUsersAuthLogin = (options) => (options.client ?? client).post({
4690
5080
  ...options.headers
4691
5081
  }
4692
5082
  });
5083
+ var deleteClinicalHealthMetricsById = (options) => (options.client ?? client).delete({
5084
+ security: [{ scheme: "bearer", type: "http" }],
5085
+ url: "/clinical/health-metrics/{id}",
5086
+ ...options
5087
+ });
5088
+ var getClinicalHealthMetricsById = (options) => (options.client ?? client).get({
5089
+ security: [{ scheme: "bearer", type: "http" }],
5090
+ url: "/clinical/health-metrics/{id}",
5091
+ ...options
5092
+ });
5093
+ var patchClinicalHealthMetricsById = (options) => (options.client ?? client).patch({
5094
+ security: [{ scheme: "bearer", type: "http" }],
5095
+ url: "/clinical/health-metrics/{id}",
5096
+ ...options,
5097
+ headers: {
5098
+ "Content-Type": "application/vnd.api+json",
5099
+ ...options.headers
5100
+ }
5101
+ });
4693
5102
  var getSocialMetricsPostBySocialPostId = (options) => (options.client ?? client).get({
4694
5103
  security: [{ scheme: "bearer", type: "http" }],
4695
5104
  url: "/social/metrics/post/{social_post_id}",
@@ -4792,6 +5201,20 @@ var patchExtractionResultsByIdRegenerate = (options) => (options.client ?? clien
4792
5201
  ...options.headers
4793
5202
  }
4794
5203
  });
5204
+ var getClinicalClientSupplements = (options) => (options.client ?? client).get({
5205
+ security: [{ scheme: "bearer", type: "http" }],
5206
+ url: "/clinical/client-supplements",
5207
+ ...options
5208
+ });
5209
+ var postClinicalClientSupplements = (options) => (options.client ?? client).post({
5210
+ security: [{ scheme: "bearer", type: "http" }],
5211
+ url: "/clinical/client-supplements",
5212
+ ...options,
5213
+ headers: {
5214
+ "Content-Type": "application/vnd.api+json",
5215
+ ...options.headers
5216
+ }
5217
+ });
4795
5218
  var postUsersAuthConfirm = (options) => (options.client ?? client).post({
4796
5219
  security: [{ scheme: "bearer", type: "http" }],
4797
5220
  url: "/users/auth/confirm",
@@ -4986,6 +5409,20 @@ var getExtractionDocumentsWorkspaceByWorkspaceId = (options) => (options.client
4986
5409
  url: "/extraction/documents/workspace/{workspace_id}",
4987
5410
  ...options
4988
5411
  });
5412
+ var getClinicalDeliveriesById = (options) => (options.client ?? client).get({
5413
+ security: [{ scheme: "bearer", type: "http" }],
5414
+ url: "/clinical/deliveries/{id}",
5415
+ ...options
5416
+ });
5417
+ var patchClinicalDeliveriesById = (options) => (options.client ?? client).patch({
5418
+ security: [{ scheme: "bearer", type: "http" }],
5419
+ url: "/clinical/deliveries/{id}",
5420
+ ...options,
5421
+ headers: {
5422
+ "Content-Type": "application/vnd.api+json",
5423
+ ...options.headers
5424
+ }
5425
+ });
4989
5426
  var postUsersAuthMagicLinkRequest = (options) => (options.client ?? client).post({
4990
5427
  security: [{ scheme: "bearer", type: "http" }],
4991
5428
  url: "/users/auth/magic-link/request",
@@ -5187,6 +5624,20 @@ var getFeatureUsages = (options) => (options.client ?? client).get({
5187
5624
  url: "/feature-usages",
5188
5625
  ...options
5189
5626
  });
5627
+ var getClinicalMealPlans = (options) => (options.client ?? client).get({
5628
+ security: [{ scheme: "bearer", type: "http" }],
5629
+ url: "/clinical/meal-plans",
5630
+ ...options
5631
+ });
5632
+ var postClinicalMealPlans = (options) => (options.client ?? client).post({
5633
+ security: [{ scheme: "bearer", type: "http" }],
5634
+ url: "/clinical/meal-plans",
5635
+ ...options,
5636
+ headers: {
5637
+ "Content-Type": "application/vnd.api+json",
5638
+ ...options.headers
5639
+ }
5640
+ });
5190
5641
  var getAiMessages = (options) => (options.client ?? client).get({
5191
5642
  security: [{ scheme: "bearer", type: "http" }],
5192
5643
  url: "/ai/messages",
@@ -5364,11 +5815,25 @@ var getAgentVersionsByIdRevisions = (options) => (options.client ?? client).get(
5364
5815
  url: "/agent-versions/{id}/revisions",
5365
5816
  ...options
5366
5817
  });
5818
+ var patchClinicalNotesByIdReject = (options) => (options.client ?? client).patch({
5819
+ security: [{ scheme: "bearer", type: "http" }],
5820
+ url: "/clinical/notes/{id}/reject",
5821
+ ...options,
5822
+ headers: {
5823
+ "Content-Type": "application/vnd.api+json",
5824
+ ...options.headers
5825
+ }
5826
+ });
5367
5827
  var getLegalDocumentsForApplication = (options) => (options.client ?? client).get({
5368
5828
  security: [{ scheme: "bearer", type: "http" }],
5369
5829
  url: "/legal-documents/for-application",
5370
5830
  ...options
5371
5831
  });
5832
+ var getClinicalPatientsByIdGoals = (options) => (options.client ?? client).get({
5833
+ security: [{ scheme: "bearer", type: "http" }],
5834
+ url: "/clinical/patients/{id}/goals",
5835
+ ...options
5836
+ });
5372
5837
  var patchStorageFilesByIdTag = (options) => (options.client ?? client).patch({
5373
5838
  security: [{ scheme: "bearer", type: "http" }],
5374
5839
  url: "/storage-files/{id}/tag",
@@ -6726,7 +7191,7 @@ function createAgentsNamespace(rb) {
6726
7191
  *
6727
7192
  * @example
6728
7193
  * const sv = await client.agents.versions.schemaVersions.create('agt_01...', {
6729
- * fields: [{ name: 'amount', type: 'currency' }],
7194
+ * output_schema: { type: 'object', properties: { amount: { type: 'number' } } },
6730
7195
  * });
6731
7196
  */
6732
7197
  create: async (agentId, attributes, options) => {
@@ -6768,7 +7233,7 @@ function createAgentsNamespace(rb) {
6768
7233
  *
6769
7234
  * @example
6770
7235
  * await client.agents.versions.schemaVersions.update('agt_01...', 'ver_01...', {
6771
- * fields: [{ name: 'total', type: 'number' }],
7236
+ * output_schema: { type: 'object', properties: { total: { type: 'number' } } },
6772
7237
  * });
6773
7238
  */
6774
7239
  update: async (agentId, versionId, attributes, options) => {
@@ -7330,10 +7795,10 @@ function createAgentsNamespace(rb) {
7330
7795
  * @example
7331
7796
  * await client.agents.executions.approve('exec_01...');
7332
7797
  */
7333
- approve: async (id, options) => {
7798
+ approve: async (id, approvedData, options) => {
7334
7799
  return rb.rawPost(
7335
7800
  `/agent-executions/${id}/approve`,
7336
- void 0,
7801
+ approvedData !== void 0 ? { approved_data: approvedData } : void 0,
7337
7802
  options
7338
7803
  );
7339
7804
  },
@@ -9355,43 +9820,1143 @@ function createCatalogNamespace(rb) {
9355
9820
  * console.log(node.attributes.name); // 'Apparel'
9356
9821
  * ```
9357
9822
  */
9358
- update: async (id, attributes, options) => {
9359
- return rb.execute(
9360
- patchCatalogTaxonomyNodesById,
9361
- {
9362
- path: { id },
9363
- body: {
9364
- data: { type: "catalog_taxonomy_node", id, attributes }
9365
- }
9366
- },
9367
- options
9368
- );
9369
- },
9823
+ update: async (id, attributes, options) => {
9824
+ return rb.execute(
9825
+ patchCatalogTaxonomyNodesById,
9826
+ {
9827
+ path: { id },
9828
+ body: {
9829
+ data: { type: "catalog_taxonomy_node", id, attributes }
9830
+ }
9831
+ },
9832
+ options
9833
+ );
9834
+ },
9835
+ /**
9836
+ * Permanently delete a taxonomy node.
9837
+ *
9838
+ * If the node has child nodes, those children will also be removed
9839
+ * recursively. Ensure products are re-categorised before deleting a node
9840
+ * that has products assigned to it.
9841
+ *
9842
+ * @param id - The unique identifier of the node to delete.
9843
+ * @param options - Optional request-level overrides.
9844
+ * @returns A promise that resolves to `true` on successful deletion.
9845
+ *
9846
+ * @example
9847
+ * ```typescript
9848
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
9849
+ *
9850
+ * await client.catalog.taxonomyNodes.delete('node_abc123');
9851
+ * ```
9852
+ */
9853
+ delete: async (id, options) => {
9854
+ return rb.executeDelete(
9855
+ deleteCatalogTaxonomyNodesById,
9856
+ { path: { id } },
9857
+ options
9858
+ );
9859
+ }
9860
+ }
9861
+ };
9862
+ }
9863
+
9864
+ // src/namespaces/clinical.ts
9865
+ function createClinicalNamespace(rb) {
9866
+ return {
9867
+ /**
9868
+ * Manage clinical patients (end users of the platform's health service).
9869
+ */
9870
+ patients: {
9871
+ /**
9872
+ * List patients in a workspace.
9873
+ *
9874
+ * @param params - Filter/pagination parameters (must include `filter[workspace_id]`)
9875
+ * @param options - Request options
9876
+ * @returns Array of {@link ClinicalPatient} records
9877
+ *
9878
+ * @example
9879
+ * ```typescript
9880
+ * const patients = await client.clinical.patients.list({
9881
+ * filter: { workspace_id: 'ws_123' },
9882
+ * });
9883
+ * ```
9884
+ */
9885
+ list: async (params, options) => rb.execute(
9886
+ getClinicalPatients,
9887
+ params ?? {},
9888
+ options
9889
+ ),
9890
+ /**
9891
+ * Get a single patient by ID.
9892
+ *
9893
+ * @param id - Patient UUID
9894
+ * @param options - Request options
9895
+ * @returns {@link ClinicalPatient} record
9896
+ *
9897
+ * @example
9898
+ * ```typescript
9899
+ * const patient = await client.clinical.patients.get('pat_abc123');
9900
+ * ```
9901
+ */
9902
+ get: async (id, options) => rb.execute(
9903
+ getClinicalPatientsById,
9904
+ { path: { id } },
9905
+ options
9906
+ ),
9907
+ /**
9908
+ * Create a new clinical patient.
9909
+ *
9910
+ * @param attributes - Patient creation attributes. Must include `workspace_id`.
9911
+ * @param options - Request options
9912
+ * @returns Created {@link ClinicalPatient} record
9913
+ *
9914
+ * @example
9915
+ * ```typescript
9916
+ * const patient = await client.clinical.patients.create({
9917
+ * workspace_id: 'ws_123',
9918
+ * contact_id: 'contact_abc',
9919
+ * status: 'active',
9920
+ * });
9921
+ * ```
9922
+ */
9923
+ create: async (attributes, options) => rb.execute(
9924
+ postClinicalPatients,
9925
+ { body: { data: { type: "clinical-patient", attributes } } },
9926
+ options
9927
+ ),
9928
+ /**
9929
+ * Update a clinical patient.
9930
+ *
9931
+ * @param id - Patient UUID
9932
+ * @param attributes - Fields to update (PATCH semantics)
9933
+ * @param options - Request options
9934
+ * @returns Updated {@link ClinicalPatient} record
9935
+ *
9936
+ * @example
9937
+ * ```typescript
9938
+ * const updated = await client.clinical.patients.update('pat_abc123', {
9939
+ * status: 'inactive',
9940
+ * });
9941
+ * ```
9942
+ */
9943
+ update: async (id, attributes, options) => rb.execute(
9944
+ patchClinicalPatientsById,
9945
+ {
9946
+ path: { id },
9947
+ body: { data: { type: "clinical-patient", id, attributes } }
9948
+ },
9949
+ options
9950
+ ),
9951
+ /**
9952
+ * Delete a clinical patient.
9953
+ *
9954
+ * @param id - Patient UUID
9955
+ * @param options - Request options
9956
+ * @returns `true` on successful deletion
9957
+ *
9958
+ * @example
9959
+ * ```typescript
9960
+ * await client.clinical.patients.delete('pat_abc123');
9961
+ * ```
9962
+ */
9963
+ delete: async (id, options) => rb.executeDelete(deleteClinicalPatientsById, { path: { id } }, options),
9964
+ /**
9965
+ * List health metrics for a patient (related resource).
9966
+ *
9967
+ * @param patientId - Patient UUID
9968
+ * @param options - Request options
9969
+ * @returns Array of {@link ClinicalHealthMetric} records
9970
+ */
9971
+ healthMetrics: async (patientId, options) => rb.execute(
9972
+ getClinicalPatientsByIdHealthMetrics,
9973
+ { path: { id: patientId } },
9974
+ options
9975
+ ),
9976
+ /**
9977
+ * List goals for a patient (related resource).
9978
+ *
9979
+ * @param patientId - Patient UUID
9980
+ * @param options - Request options
9981
+ * @returns Array of {@link ClinicalClientGoal} records
9982
+ */
9983
+ goals: async (patientId, options) => rb.execute(
9984
+ getClinicalPatientsByIdGoals,
9985
+ { path: { id: patientId } },
9986
+ options
9987
+ ),
9988
+ /**
9989
+ * List supplements for a patient (related resource).
9990
+ *
9991
+ * @param patientId - Patient UUID
9992
+ * @param options - Request options
9993
+ * @returns Array of {@link ClinicalClientSupplement} records
9994
+ */
9995
+ supplements: async (patientId, options) => rb.execute(
9996
+ getClinicalPatientsByIdSupplements,
9997
+ { path: { id: patientId } },
9998
+ options
9999
+ ),
10000
+ /**
10001
+ * List resource assignments for a patient (related resource).
10002
+ *
10003
+ * @param patientId - Patient UUID
10004
+ * @param options - Request options
10005
+ * @returns Array of {@link ClinicalClientResourceAssignment} records
10006
+ */
10007
+ resourceAssignments: async (patientId, options) => rb.execute(
10008
+ getClinicalPatientsByIdResourceAssignments,
10009
+ { path: { id: patientId } },
10010
+ options
10011
+ ),
10012
+ /**
10013
+ * Get patient adherence summary for a given period.
10014
+ *
10015
+ * Returns goal completion rates and health metric tracking stats.
10016
+ *
10017
+ * @param patientId - Patient UUID
10018
+ * @param workspaceId - Workspace UUID (required)
10019
+ * @param days - Number of days to look back (default: 30, max: 365)
10020
+ * @param options - Request options
10021
+ * @returns {@link PatientAdherenceResponse} with goal and metric breakdowns
10022
+ *
10023
+ * @example
10024
+ * ```typescript
10025
+ * const adherence = await client.clinical.patients.getAdherence(
10026
+ * 'pat_abc123',
10027
+ * 'ws_123',
10028
+ * 30,
10029
+ * );
10030
+ * console.log(adherence.goals.completion_rate); // 0.75
10031
+ * ```
10032
+ */
10033
+ getAdherence: async (patientId, workspaceId, days, options) => {
10034
+ const qs = new URLSearchParams({ workspace_id: workspaceId });
10035
+ if (days !== void 0) qs.set("days", String(days));
10036
+ return rb.rawGet(
10037
+ `/clinical/patients/${patientId}/adherence?${qs.toString()}`,
10038
+ options
10039
+ );
10040
+ }
10041
+ },
10042
+ /**
10043
+ * Manage clinical sessions (practitioner–patient encounters).
10044
+ */
10045
+ sessions: {
10046
+ /**
10047
+ * List sessions in a workspace.
10048
+ *
10049
+ * @param params - Filter/pagination parameters
10050
+ * @param options - Request options
10051
+ * @returns Array of {@link ClinicalSession} records
10052
+ */
10053
+ list: async (params, options) => rb.execute(
10054
+ getClinicalSessions,
10055
+ params ?? {},
10056
+ options
10057
+ ),
10058
+ /**
10059
+ * Get a single session by ID.
10060
+ *
10061
+ * @param id - Session UUID
10062
+ * @param options - Request options
10063
+ * @returns {@link ClinicalSession} record
10064
+ */
10065
+ get: async (id, options) => rb.execute(
10066
+ getClinicalSessionsById,
10067
+ { path: { id } },
10068
+ options
10069
+ ),
10070
+ /**
10071
+ * Create a new clinical session.
10072
+ *
10073
+ * @param attributes - Session creation attributes. Must include `workspace_id` and `patient_id`.
10074
+ * @param options - Request options
10075
+ * @returns Created {@link ClinicalSession} record
10076
+ */
10077
+ create: async (attributes, options) => rb.execute(
10078
+ postClinicalSessions,
10079
+ { body: { data: { type: "clinical-session", attributes } } },
10080
+ options
10081
+ ),
10082
+ /**
10083
+ * Update a clinical session.
10084
+ *
10085
+ * @param id - Session UUID
10086
+ * @param attributes - Fields to update (PATCH semantics)
10087
+ * @param options - Request options
10088
+ * @returns Updated {@link ClinicalSession} record
10089
+ */
10090
+ update: async (id, attributes, options) => rb.execute(
10091
+ patchClinicalSessionsById,
10092
+ {
10093
+ path: { id },
10094
+ body: { data: { type: "clinical-session", id, attributes } }
10095
+ },
10096
+ options
10097
+ ),
10098
+ /**
10099
+ * Delete a clinical session.
10100
+ *
10101
+ * @param id - Session UUID
10102
+ * @param options - Request options
10103
+ * @returns `true` on successful deletion
10104
+ */
10105
+ delete: async (id, options) => rb.executeDelete(deleteClinicalSessionsById, { path: { id } }, options),
10106
+ /**
10107
+ * List notes for a session (related resource).
10108
+ *
10109
+ * @param sessionId - Session UUID
10110
+ * @param options - Request options
10111
+ * @returns Array of {@link ClinicalNote} records
10112
+ */
10113
+ notes: async (sessionId, options) => rb.execute(
10114
+ getClinicalSessionsByIdSessionNotes,
10115
+ { path: { id: sessionId } },
10116
+ options
10117
+ ),
10118
+ /**
10119
+ * List meal plans for a session (related resource).
10120
+ *
10121
+ * @param sessionId - Session UUID
10122
+ * @param options - Request options
10123
+ * @returns Array of {@link ClinicalMealPlan} records
10124
+ */
10125
+ mealPlans: async (sessionId, options) => rb.execute(
10126
+ getClinicalSessionsByIdMealPlans,
10127
+ { path: { id: sessionId } },
10128
+ options
10129
+ ),
10130
+ /**
10131
+ * Trigger the AI processing pipeline for a session.
10132
+ *
10133
+ * Processes the session transcript to extract clinical insights and generate notes.
10134
+ * Returns immediately with an execution ID; poll `client.agents.executions.get(id)` for results.
10135
+ *
10136
+ * @param sessionId - Session UUID
10137
+ * @param workspaceId - Workspace UUID
10138
+ * @param options - Request options
10139
+ * @returns {@link TriggerPipelineResponse} with execution_id (may be null if pipeline not configured)
10140
+ *
10141
+ * @example
10142
+ * ```typescript
10143
+ * const { execution_id } = await client.clinical.sessions.triggerPipeline(
10144
+ * 'sess_xyz',
10145
+ * 'ws_123',
10146
+ * );
10147
+ * ```
10148
+ */
10149
+ triggerPipeline: async (sessionId, workspaceId, options) => rb.rawPost(
10150
+ `/clinical/sessions/${sessionId}/trigger-pipeline`,
10151
+ { workspace_id: workspaceId },
10152
+ options
10153
+ )
10154
+ },
10155
+ /**
10156
+ * Manage clinical notes (SOAP notes, progress notes, AI-generated summaries).
10157
+ *
10158
+ * Notes support a HITL (Human-In-The-Loop) approval workflow: AI-generated
10159
+ * notes start with `status: "pending_review"` and must be approved or rejected
10160
+ * by a clinician before they are finalized.
10161
+ */
10162
+ notes: {
10163
+ /**
10164
+ * List notes, optionally filtered by patient or session.
10165
+ *
10166
+ * @param params - Filter/pagination parameters
10167
+ * @param options - Request options
10168
+ * @returns Array of {@link ClinicalNote} records
10169
+ */
10170
+ list: async (params, options) => rb.execute(getClinicalNotes, params ?? {}, options),
10171
+ /**
10172
+ * Get a single note by ID.
10173
+ *
10174
+ * @param id - Note UUID
10175
+ * @param options - Request options
10176
+ * @returns {@link ClinicalNote} record
10177
+ */
10178
+ get: async (id, options) => rb.execute(
10179
+ getClinicalNotesById,
10180
+ { path: { id } },
10181
+ options
10182
+ ),
10183
+ /**
10184
+ * Create a new clinical note.
10185
+ *
10186
+ * @param attributes - Note creation attributes. Must include `workspace_id`, `patient_id`, and `content`.
10187
+ * @param options - Request options
10188
+ * @returns Created {@link ClinicalNote} record
10189
+ */
10190
+ create: async (attributes, options) => rb.execute(
10191
+ postClinicalNotes,
10192
+ { body: { data: { type: "clinical-note", attributes } } },
10193
+ options
10194
+ ),
10195
+ /**
10196
+ * Update a clinical note.
10197
+ *
10198
+ * @param id - Note UUID
10199
+ * @param attributes - Fields to update (PATCH semantics)
10200
+ * @param options - Request options
10201
+ * @returns Updated {@link ClinicalNote} record
10202
+ */
10203
+ update: async (id, attributes, options) => rb.execute(
10204
+ patchClinicalNotesById,
10205
+ {
10206
+ path: { id },
10207
+ body: { data: { type: "clinical-note", id, attributes } }
10208
+ },
10209
+ options
10210
+ ),
10211
+ /**
10212
+ * Delete a clinical note.
10213
+ *
10214
+ * @param id - Note UUID
10215
+ * @param options - Request options
10216
+ * @returns `true` on successful deletion
10217
+ */
10218
+ delete: async (id, options) => rb.executeDelete(deleteClinicalNotesById, { path: { id } }, options),
10219
+ /**
10220
+ * Approve a clinical note (HITL workflow).
10221
+ *
10222
+ * Marks the note as clinician-reviewed and approved, transitioning it
10223
+ * to `status: "approved"`. Only notes in `pending_review` status can be approved.
10224
+ *
10225
+ * @param id - Note UUID
10226
+ * @param options - Request options
10227
+ * @returns Updated {@link ClinicalNote} record
10228
+ *
10229
+ * @example
10230
+ * ```typescript
10231
+ * const approved = await client.clinical.notes.approve('note_abc');
10232
+ * console.log(approved.attributes.status); // 'approved'
10233
+ * ```
10234
+ */
10235
+ approve: async (id, options) => rb.execute(
10236
+ patchClinicalNotesByIdApprove,
10237
+ { path: { id } },
10238
+ options
10239
+ ),
10240
+ /**
10241
+ * Reject a clinical note (HITL workflow).
10242
+ *
10243
+ * Marks the note as rejected, transitioning it to `status: "rejected"`.
10244
+ * Only notes in `pending_review` status can be rejected.
10245
+ *
10246
+ * @param id - Note UUID
10247
+ * @param options - Request options
10248
+ * @returns Updated {@link ClinicalNote} record
10249
+ *
10250
+ * @example
10251
+ * ```typescript
10252
+ * const rejected = await client.clinical.notes.reject('note_abc');
10253
+ * console.log(rejected.attributes.status); // 'rejected'
10254
+ * ```
10255
+ */
10256
+ reject: async (id, options) => rb.execute(
10257
+ patchClinicalNotesByIdReject,
10258
+ { path: { id } },
10259
+ options
10260
+ ),
10261
+ /**
10262
+ * List versions for a note (related resource).
10263
+ *
10264
+ * Each edit to an approved note creates a version record for audit purposes.
10265
+ *
10266
+ * @param noteId - Note UUID
10267
+ * @param options - Request options
10268
+ * @returns Array of {@link ClinicalNoteVersion} records
10269
+ */
10270
+ versions: async (noteId, options) => rb.execute(
10271
+ getClinicalNotesByNoteIdVersions,
10272
+ { path: { note_id: noteId } },
10273
+ options
10274
+ ),
10275
+ /**
10276
+ * Get a specific note version.
10277
+ *
10278
+ * @param noteId - Note UUID
10279
+ * @param versionId - NoteVersion UUID
10280
+ * @param options - Request options
10281
+ * @returns {@link ClinicalNoteVersion} record
10282
+ */
10283
+ getVersion: async (noteId, versionId, options) => rb.execute(
10284
+ getClinicalNotesByNoteIdVersionsById,
10285
+ { path: { note_id: noteId, id: versionId } },
10286
+ options
10287
+ )
10288
+ },
10289
+ /**
10290
+ * Manage clinical health metrics (weight, blood pressure, glucose, etc.).
10291
+ */
10292
+ healthMetrics: {
10293
+ /**
10294
+ * List health metrics, filtered by patient/workspace/date range.
10295
+ *
10296
+ * @param params - Filter/pagination parameters
10297
+ * @param options - Request options
10298
+ * @returns Array of {@link ClinicalHealthMetric} records
10299
+ */
10300
+ list: async (params, options) => rb.execute(
10301
+ getClinicalHealthMetrics,
10302
+ params ?? {},
10303
+ options
10304
+ ),
10305
+ /**
10306
+ * Get a single health metric by ID.
10307
+ *
10308
+ * @param id - HealthMetric UUID
10309
+ * @param options - Request options
10310
+ * @returns {@link ClinicalHealthMetric} record
10311
+ */
10312
+ get: async (id, options) => rb.execute(
10313
+ getClinicalHealthMetricsById,
10314
+ { path: { id } },
10315
+ options
10316
+ ),
10317
+ /**
10318
+ * Record a new health metric entry.
10319
+ *
10320
+ * @param attributes - Metric creation attributes. Must include `workspace_id`, `patient_id`,
10321
+ * `metric_category`, `metric_name`, and `value`.
10322
+ * @param options - Request options
10323
+ * @returns Created {@link ClinicalHealthMetric} record
10324
+ *
10325
+ * @example
10326
+ * ```typescript
10327
+ * const metric = await client.clinical.healthMetrics.create({
10328
+ * workspace_id: 'ws_123',
10329
+ * patient_id: 'pat_abc',
10330
+ * metric_category: 'vitals',
10331
+ * metric_name: 'weight_kg',
10332
+ * value: 82.5,
10333
+ * unit: 'kg',
10334
+ * });
10335
+ * ```
10336
+ */
10337
+ create: async (attributes, options) => rb.execute(
10338
+ postClinicalHealthMetrics,
10339
+ { body: { data: { type: "clinical-health-metric", attributes } } },
10340
+ options
10341
+ ),
10342
+ /**
10343
+ * Update a health metric entry.
10344
+ *
10345
+ * @param id - HealthMetric UUID
10346
+ * @param attributes - Fields to update (PATCH semantics)
10347
+ * @param options - Request options
10348
+ * @returns Updated {@link ClinicalHealthMetric} record
10349
+ */
10350
+ update: async (id, attributes, options) => rb.execute(
10351
+ patchClinicalHealthMetricsById,
10352
+ {
10353
+ path: { id },
10354
+ body: { data: { type: "clinical-health-metric", id, attributes } }
10355
+ },
10356
+ options
10357
+ ),
10358
+ /**
10359
+ * Delete a health metric entry.
10360
+ *
10361
+ * @param id - HealthMetric UUID
10362
+ * @param options - Request options
10363
+ * @returns `true` on successful deletion
10364
+ */
10365
+ delete: async (id, options) => rb.executeDelete(
10366
+ deleteClinicalHealthMetricsById,
10367
+ { path: { id } },
10368
+ options
10369
+ )
10370
+ },
10371
+ /**
10372
+ * Manage meal plans for clinical patients.
10373
+ */
10374
+ mealPlans: {
10375
+ /**
10376
+ * List meal plans, filtered by patient/workspace.
10377
+ *
10378
+ * @param params - Filter/pagination parameters
10379
+ * @param options - Request options
10380
+ * @returns Array of {@link ClinicalMealPlan} records
10381
+ */
10382
+ list: async (params, options) => rb.execute(
10383
+ getClinicalMealPlans,
10384
+ params ?? {},
10385
+ options
10386
+ ),
10387
+ /**
10388
+ * Get a single meal plan by ID.
10389
+ *
10390
+ * @param id - MealPlan UUID
10391
+ * @param options - Request options
10392
+ * @returns {@link ClinicalMealPlan} record
10393
+ */
10394
+ get: async (id, options) => rb.execute(
10395
+ getClinicalMealPlansById,
10396
+ { path: { id } },
10397
+ options
10398
+ ),
10399
+ /**
10400
+ * Create a new meal plan.
10401
+ *
10402
+ * @param attributes - Meal plan creation attributes. Must include `workspace_id`, `patient_id`, and `title`.
10403
+ * @param options - Request options
10404
+ * @returns Created {@link ClinicalMealPlan} record
10405
+ */
10406
+ create: async (attributes, options) => rb.execute(
10407
+ postClinicalMealPlans,
10408
+ { body: { data: { type: "clinical-meal-plan", attributes } } },
10409
+ options
10410
+ ),
10411
+ /**
10412
+ * Update a meal plan.
10413
+ *
10414
+ * @param id - MealPlan UUID
10415
+ * @param attributes - Fields to update (PATCH semantics)
10416
+ * @param options - Request options
10417
+ * @returns Updated {@link ClinicalMealPlan} record
10418
+ */
10419
+ update: async (id, attributes, options) => rb.execute(
10420
+ patchClinicalMealPlansById,
10421
+ {
10422
+ path: { id },
10423
+ body: { data: { type: "clinical-meal-plan", id, attributes } }
10424
+ },
10425
+ options
10426
+ ),
10427
+ /**
10428
+ * Delete a meal plan.
10429
+ *
10430
+ * @param id - MealPlan UUID
10431
+ * @param options - Request options
10432
+ * @returns `true` on successful deletion
10433
+ */
10434
+ delete: async (id, options) => rb.executeDelete(
10435
+ deleteClinicalMealPlansById,
10436
+ { path: { id } },
10437
+ options
10438
+ )
10439
+ },
10440
+ /**
10441
+ * Manage client goals (therapeutic targets and wellness milestones).
10442
+ */
10443
+ clientGoals: {
10444
+ /**
10445
+ * List client goals, filtered by patient/workspace.
10446
+ *
10447
+ * @param params - Filter/pagination parameters
10448
+ * @param options - Request options
10449
+ * @returns Array of {@link ClinicalClientGoal} records
10450
+ */
10451
+ list: async (params, options) => rb.execute(
10452
+ getClinicalClientGoals,
10453
+ params ?? {},
10454
+ options
10455
+ ),
10456
+ /**
10457
+ * Get a single client goal by ID.
10458
+ *
10459
+ * @param id - ClientGoal UUID
10460
+ * @param options - Request options
10461
+ * @returns {@link ClinicalClientGoal} record
10462
+ */
10463
+ get: async (id, options) => rb.execute(
10464
+ getClinicalClientGoalsById,
10465
+ { path: { id } },
10466
+ options
10467
+ ),
10468
+ /**
10469
+ * Create a new client goal.
10470
+ *
10471
+ * @param attributes - Goal creation attributes. Must include `workspace_id`, `patient_id`, and `title`.
10472
+ * @param options - Request options
10473
+ * @returns Created {@link ClinicalClientGoal} record
10474
+ */
10475
+ create: async (attributes, options) => rb.execute(
10476
+ postClinicalClientGoals,
10477
+ { body: { data: { type: "clinical-client-goal", attributes } } },
10478
+ options
10479
+ ),
10480
+ /**
10481
+ * Update a client goal.
10482
+ *
10483
+ * @param id - ClientGoal UUID
10484
+ * @param attributes - Fields to update (PATCH semantics)
10485
+ * @param options - Request options
10486
+ * @returns Updated {@link ClinicalClientGoal} record
10487
+ */
10488
+ update: async (id, attributes, options) => rb.execute(
10489
+ patchClinicalClientGoalsById,
10490
+ {
10491
+ path: { id },
10492
+ body: { data: { type: "clinical-client-goal", id, attributes } }
10493
+ },
10494
+ options
10495
+ ),
10496
+ /**
10497
+ * Delete a client goal.
10498
+ *
10499
+ * @param id - ClientGoal UUID
10500
+ * @param options - Request options
10501
+ * @returns `true` on successful deletion
10502
+ */
10503
+ delete: async (id, options) => rb.executeDelete(
10504
+ deleteClinicalClientGoalsById,
10505
+ { path: { id } },
10506
+ options
10507
+ )
10508
+ },
10509
+ /**
10510
+ * Manage supplement prescriptions for clinical patients.
10511
+ */
10512
+ clientSupplements: {
10513
+ /**
10514
+ * List supplement prescriptions, filtered by patient/workspace.
10515
+ *
10516
+ * @param params - Filter/pagination parameters
10517
+ * @param options - Request options
10518
+ * @returns Array of {@link ClinicalClientSupplement} records
10519
+ */
10520
+ list: async (params, options) => rb.execute(
10521
+ getClinicalClientSupplements,
10522
+ params ?? {},
10523
+ options
10524
+ ),
10525
+ /**
10526
+ * Get a single supplement prescription by ID.
10527
+ *
10528
+ * @param id - ClientSupplement UUID
10529
+ * @param options - Request options
10530
+ * @returns {@link ClinicalClientSupplement} record
10531
+ */
10532
+ get: async (id, options) => rb.execute(
10533
+ getClinicalClientSupplementsById,
10534
+ { path: { id } },
10535
+ options
10536
+ ),
10537
+ /**
10538
+ * Create a new supplement prescription.
10539
+ *
10540
+ * @param attributes - Supplement creation attributes. Must include `workspace_id`,
10541
+ * `patient_id`, and `supplement_name`.
10542
+ * @param options - Request options
10543
+ * @returns Created {@link ClinicalClientSupplement} record
10544
+ */
10545
+ create: async (attributes, options) => rb.execute(
10546
+ postClinicalClientSupplements,
10547
+ {
10548
+ body: { data: { type: "clinical-client-supplement", attributes } }
10549
+ },
10550
+ options
10551
+ ),
10552
+ /**
10553
+ * Update a supplement prescription.
10554
+ *
10555
+ * @param id - ClientSupplement UUID
10556
+ * @param attributes - Fields to update (PATCH semantics)
10557
+ * @param options - Request options
10558
+ * @returns Updated {@link ClinicalClientSupplement} record
10559
+ */
10560
+ update: async (id, attributes, options) => rb.execute(
10561
+ patchClinicalClientSupplementsById,
10562
+ {
10563
+ path: { id },
10564
+ body: {
10565
+ data: { type: "clinical-client-supplement", id, attributes }
10566
+ }
10567
+ },
10568
+ options
10569
+ ),
10570
+ /**
10571
+ * Delete a supplement prescription.
10572
+ *
10573
+ * @param id - ClientSupplement UUID
10574
+ * @param options - Request options
10575
+ * @returns `true` on successful deletion
10576
+ */
10577
+ delete: async (id, options) => rb.executeDelete(
10578
+ deleteClinicalClientSupplementsById,
10579
+ { path: { id } },
10580
+ options
10581
+ )
10582
+ },
10583
+ /**
10584
+ * Manage clinical deliveries (care plan items sent to patients).
10585
+ */
10586
+ deliveries: {
10587
+ /**
10588
+ * List deliveries, filtered by patient/workspace.
10589
+ *
10590
+ * @param params - Filter/pagination parameters
10591
+ * @param options - Request options
10592
+ * @returns Array of {@link ClinicalDelivery} records
10593
+ */
10594
+ list: async (params, options) => rb.execute(
10595
+ getClinicalDeliveries,
10596
+ params ?? {},
10597
+ options
10598
+ ),
10599
+ /**
10600
+ * Get a single delivery by ID.
10601
+ *
10602
+ * @param id - Delivery UUID
10603
+ * @param options - Request options
10604
+ * @returns {@link ClinicalDelivery} record
10605
+ */
10606
+ get: async (id, options) => rb.execute(
10607
+ getClinicalDeliveriesById,
10608
+ { path: { id } },
10609
+ options
10610
+ ),
10611
+ /**
10612
+ * Create a new delivery.
10613
+ *
10614
+ * @param attributes - Delivery creation attributes. Must include `workspace_id`,
10615
+ * `patient_id`, and `delivery_type`.
10616
+ * @param options - Request options
10617
+ * @returns Created {@link ClinicalDelivery} record
10618
+ */
10619
+ create: async (attributes, options) => rb.execute(
10620
+ postClinicalDeliveries,
10621
+ { body: { data: { type: "clinical-delivery", attributes } } },
10622
+ options
10623
+ ),
10624
+ /**
10625
+ * Update a delivery (e.g., change status to `delivered`).
10626
+ *
10627
+ * @param id - Delivery UUID
10628
+ * @param attributes - Fields to update (PATCH semantics)
10629
+ * @param options - Request options
10630
+ * @returns Updated {@link ClinicalDelivery} record
10631
+ */
10632
+ update: async (id, attributes, options) => rb.execute(
10633
+ patchClinicalDeliveriesById,
10634
+ {
10635
+ path: { id },
10636
+ body: { data: { type: "clinical-delivery", id, attributes } }
10637
+ },
10638
+ options
10639
+ )
10640
+ },
10641
+ /**
10642
+ * Manage practice-level educational resources.
10643
+ */
10644
+ practiceResources: {
10645
+ /**
10646
+ * List practice resources in a workspace.
10647
+ *
10648
+ * @param params - Filter/pagination parameters
10649
+ * @param options - Request options
10650
+ * @returns Array of {@link ClinicalPracticeResource} records
10651
+ */
10652
+ list: async (params, options) => rb.execute(
10653
+ getClinicalPracticeResources,
10654
+ params ?? {},
10655
+ options
10656
+ ),
10657
+ /**
10658
+ * Get a single practice resource by ID.
10659
+ *
10660
+ * @param id - PracticeResource UUID
10661
+ * @param options - Request options
10662
+ * @returns {@link ClinicalPracticeResource} record
10663
+ */
10664
+ get: async (id, options) => rb.execute(
10665
+ getClinicalPracticeResourcesById,
10666
+ { path: { id } },
10667
+ options
10668
+ ),
10669
+ /**
10670
+ * Create a new practice resource.
10671
+ *
10672
+ * @param attributes - Resource creation attributes. Must include `workspace_id` and `title`.
10673
+ * @param options - Request options
10674
+ * @returns Created {@link ClinicalPracticeResource} record
10675
+ */
10676
+ create: async (attributes, options) => rb.execute(
10677
+ postClinicalPracticeResources,
10678
+ {
10679
+ body: { data: { type: "clinical-practice-resource", attributes } }
10680
+ },
10681
+ options
10682
+ ),
10683
+ /**
10684
+ * Update a practice resource.
10685
+ *
10686
+ * @param id - PracticeResource UUID
10687
+ * @param attributes - Fields to update (PATCH semantics)
10688
+ * @param options - Request options
10689
+ * @returns Updated {@link ClinicalPracticeResource} record
10690
+ */
10691
+ update: async (id, attributes, options) => rb.execute(
10692
+ patchClinicalPracticeResourcesById,
10693
+ {
10694
+ path: { id },
10695
+ body: {
10696
+ data: { type: "clinical-practice-resource", id, attributes }
10697
+ }
10698
+ },
10699
+ options
10700
+ ),
10701
+ /**
10702
+ * Delete a practice resource.
10703
+ *
10704
+ * @param id - PracticeResource UUID
10705
+ * @param options - Request options
10706
+ * @returns `true` on successful deletion
10707
+ */
10708
+ delete: async (id, options) => rb.executeDelete(
10709
+ deleteClinicalPracticeResourcesById,
10710
+ { path: { id } },
10711
+ options
10712
+ )
10713
+ },
10714
+ /**
10715
+ * Manage practice-level assessment and therapeutic tools.
10716
+ */
10717
+ practiceTools: {
10718
+ /**
10719
+ * List practice tools in a workspace.
10720
+ *
10721
+ * @param params - Filter/pagination parameters
10722
+ * @param options - Request options
10723
+ * @returns Array of {@link ClinicalPracticeTool} records
10724
+ */
10725
+ list: async (params, options) => rb.execute(
10726
+ getClinicalPracticeTools,
10727
+ params ?? {},
10728
+ options
10729
+ ),
10730
+ /**
10731
+ * Get a single practice tool by ID.
10732
+ *
10733
+ * @param id - PracticeTool UUID
10734
+ * @param options - Request options
10735
+ * @returns {@link ClinicalPracticeTool} record
10736
+ */
10737
+ get: async (id, options) => rb.execute(
10738
+ getClinicalPracticeToolsById,
10739
+ { path: { id } },
10740
+ options
10741
+ ),
10742
+ /**
10743
+ * Create a new practice tool.
10744
+ *
10745
+ * @param attributes - Tool creation attributes. Must include `workspace_id` and `name`.
10746
+ * @param options - Request options
10747
+ * @returns Created {@link ClinicalPracticeTool} record
10748
+ */
10749
+ create: async (attributes, options) => rb.execute(
10750
+ postClinicalPracticeTools,
10751
+ { body: { data: { type: "clinical-practice-tool", attributes } } },
10752
+ options
10753
+ ),
10754
+ /**
10755
+ * Update a practice tool.
10756
+ *
10757
+ * @param id - PracticeTool UUID
10758
+ * @param attributes - Fields to update (PATCH semantics)
10759
+ * @param options - Request options
10760
+ * @returns Updated {@link ClinicalPracticeTool} record
10761
+ */
10762
+ update: async (id, attributes, options) => rb.execute(
10763
+ patchClinicalPracticeToolsById,
10764
+ {
10765
+ path: { id },
10766
+ body: { data: { type: "clinical-practice-tool", id, attributes } }
10767
+ },
10768
+ options
10769
+ ),
10770
+ /**
10771
+ * Delete a practice tool.
10772
+ *
10773
+ * @param id - PracticeTool UUID
10774
+ * @param options - Request options
10775
+ * @returns `true` on successful deletion
10776
+ */
10777
+ delete: async (id, options) => rb.executeDelete(
10778
+ deleteClinicalPracticeToolsById,
10779
+ { path: { id } },
10780
+ options
10781
+ )
10782
+ },
10783
+ /**
10784
+ * Manage assignments of practice resources to patients.
10785
+ */
10786
+ clientResourceAssignments: {
10787
+ /**
10788
+ * List resource assignments, filtered by patient/workspace.
10789
+ *
10790
+ * @param params - Filter/pagination parameters
10791
+ * @param options - Request options
10792
+ * @returns Array of {@link ClinicalClientResourceAssignment} records
10793
+ */
10794
+ list: async (params, options) => rb.execute(
10795
+ getClinicalClientResourceAssignments,
10796
+ params ?? {},
10797
+ options
10798
+ ),
10799
+ /**
10800
+ * Get a single resource assignment by ID.
10801
+ *
10802
+ * @param id - ClientResourceAssignment UUID
10803
+ * @param options - Request options
10804
+ * @returns {@link ClinicalClientResourceAssignment} record
10805
+ */
10806
+ get: async (id, options) => rb.execute(
10807
+ getClinicalClientResourceAssignmentsById,
10808
+ { path: { id } },
10809
+ options
10810
+ ),
10811
+ /**
10812
+ * Assign a practice resource to a patient.
10813
+ *
10814
+ * @param attributes - Assignment creation attributes. Must include `workspace_id`,
10815
+ * `patient_id`, and `resource_id`.
10816
+ * @param options - Request options
10817
+ * @returns Created {@link ClinicalClientResourceAssignment} record
10818
+ */
10819
+ create: async (attributes, options) => rb.execute(
10820
+ postClinicalClientResourceAssignments,
10821
+ {
10822
+ body: {
10823
+ data: { type: "clinical-client-resource-assignment", attributes }
10824
+ }
10825
+ },
10826
+ options
10827
+ ),
10828
+ /**
10829
+ * Update a resource assignment (e.g., mark as completed).
10830
+ *
10831
+ * @param id - ClientResourceAssignment UUID
10832
+ * @param attributes - Fields to update (PATCH semantics)
10833
+ * @param options - Request options
10834
+ * @returns Updated {@link ClinicalClientResourceAssignment} record
10835
+ */
10836
+ update: async (id, attributes, options) => rb.execute(
10837
+ patchClinicalClientResourceAssignmentsById,
10838
+ {
10839
+ path: { id },
10840
+ body: {
10841
+ data: {
10842
+ type: "clinical-client-resource-assignment",
10843
+ id,
10844
+ attributes
10845
+ }
10846
+ }
10847
+ },
10848
+ options
10849
+ ),
10850
+ /**
10851
+ * Delete a resource assignment.
10852
+ *
10853
+ * @param id - ClientResourceAssignment UUID
10854
+ * @param options - Request options
10855
+ * @returns `true` on successful deletion
10856
+ */
10857
+ delete: async (id, options) => rb.executeDelete(
10858
+ deleteClinicalClientResourceAssignmentsById,
10859
+ { path: { id } },
10860
+ options
10861
+ )
10862
+ },
10863
+ /**
10864
+ * Read-only access to the AI-generated supplement recommendation cache.
10865
+ *
10866
+ * This resource is server-managed — entries are created and updated
10867
+ * exclusively by the AI post-session pipeline. Direct create/update
10868
+ * operations are not supported.
10869
+ */
10870
+ supplementRecCache: {
10871
+ /**
10872
+ * List supplement recommendation cache entries, filtered by patient/workspace.
10873
+ *
10874
+ * @param params - Filter/pagination parameters
10875
+ * @param options - Request options
10876
+ * @returns Array of {@link ClinicalSupplementRecCache} records
10877
+ */
10878
+ list: async (params, options) => rb.execute(
10879
+ getClinicalSupplementRecCache,
10880
+ params ?? {},
10881
+ options
10882
+ ),
10883
+ /**
10884
+ * Get a single supplement recommendation cache entry by ID.
10885
+ *
10886
+ * @param id - SupplementRecCache UUID
10887
+ * @param options - Request options
10888
+ * @returns {@link ClinicalSupplementRecCache} record
10889
+ */
10890
+ get: async (id, options) => rb.execute(
10891
+ getClinicalSupplementRecCacheById,
10892
+ { path: { id } },
10893
+ options
10894
+ ),
10895
+ /**
10896
+ * Generate supplement recommendations for a patient via the AI pipeline.
10897
+ *
10898
+ * Returns immediately with an execution ID; poll executions for results.
10899
+ * The AI pipeline populates the supplement recommendation cache entries
10900
+ * once the execution completes.
10901
+ *
10902
+ * @param patientId - Patient UUID
10903
+ * @param sessionId - Session UUID to base recommendations on
10904
+ * @param workspaceId - Workspace UUID
10905
+ * @param options - Request options
10906
+ * @returns {@link GenerateSupplementRecsResponse} with execution_id
10907
+ *
10908
+ * @example
10909
+ * ```typescript
10910
+ * const { execution_id } = await client.clinical.supplementRecCache.generate(
10911
+ * 'pat_abc123',
10912
+ * 'sess_xyz',
10913
+ * 'ws_123',
10914
+ * );
10915
+ * ```
10916
+ */
10917
+ generate: async (patientId, sessionId, workspaceId, options) => rb.rawPost(
10918
+ `/clinical/patients/${patientId}/supplement-recommendations/generate`,
10919
+ { session_id: sessionId, workspace_id: workspaceId },
10920
+ options
10921
+ ),
9370
10922
  /**
9371
- * Permanently delete a taxonomy node.
10923
+ * Delete a supplement recommendation cache entry.
9372
10924
  *
9373
- * If the node has child nodes, those children will also be removed
9374
- * recursively. Ensure products are re-categorised before deleting a node
9375
- * that has products assigned to it.
10925
+ * @param id - SupplementRecCache UUID
10926
+ * @param options - Request options
10927
+ * @returns `true` on successful deletion
10928
+ */
10929
+ delete: async (id, options) => rb.executeDelete(
10930
+ deleteClinicalSupplementRecCacheById,
10931
+ { path: { id } },
10932
+ options
10933
+ )
10934
+ },
10935
+ /**
10936
+ * Recipe search via configured Edamam connector.
10937
+ */
10938
+ recipes: {
10939
+ /**
10940
+ * Search recipes using a connected Edamam API integration.
9376
10941
  *
9377
- * @param id - The unique identifier of the node to delete.
9378
- * @param options - Optional request-level overrides.
9379
- * @returns A promise that resolves to `true` on successful deletion.
10942
+ * Requires an Edamam connector to be configured in the workspace.
10943
+ * Returns raw Edamam API response data.
10944
+ *
10945
+ * @param params - Search parameters. Must include `query`, `connector_id`, and `workspace_id`.
10946
+ * @param options - Request options
10947
+ * @returns Edamam API search results
9380
10948
  *
9381
10949
  * @example
9382
10950
  * ```typescript
9383
- * const client = new GptClient({ apiKey: 'sk_app_...' });
9384
- *
9385
- * await client.catalog.taxonomyNodes.delete('node_abc123');
10951
+ * const results = await client.clinical.recipes.search({
10952
+ * query: 'high protein lunch',
10953
+ * connector_id: 'conn_edamam_123',
10954
+ * workspace_id: 'ws_123',
10955
+ * diet: 'high-protein',
10956
+ * });
9386
10957
  * ```
9387
10958
  */
9388
- delete: async (id, options) => {
9389
- return rb.executeDelete(
9390
- deleteCatalogTaxonomyNodesById,
9391
- { path: { id } },
9392
- options
9393
- );
9394
- }
10959
+ search: async (params, options) => rb.rawPost(`/clinical/recipes/search`, params, options)
9395
10960
  }
9396
10961
  };
9397
10962
  }
@@ -21775,6 +23340,46 @@ function createThreadsNamespace(rb) {
21775
23340
  options,
21776
23341
  streamOptions
21777
23342
  );
23343
+ },
23344
+ /**
23345
+ * Full-text substring search across message content.
23346
+ *
23347
+ * @param query - Substring to match against message content.
23348
+ * @param options - Optional request options.
23349
+ * @returns A promise resolving to an array of matching `Message` objects.
23350
+ *
23351
+ * @example
23352
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
23353
+ * const results = await client.threads.messages.search('deadline');
23354
+ */
23355
+ search: async (query, options) => {
23356
+ return rb.execute(
23357
+ getMessagesSearch,
23358
+ { query: { filter: { query } } },
23359
+ options
23360
+ );
23361
+ },
23362
+ /**
23363
+ * Vector similarity search across messages using a generated embedding.
23364
+ *
23365
+ * Returns messages ranked by cosine similarity (threshold > 0.6).
23366
+ * Requires embeddings to have been generated via the async vectorization pipeline.
23367
+ *
23368
+ * @param query - Natural-language query string to embed and search.
23369
+ * @param limit - Maximum number of results (default: 10).
23370
+ * @param options - Optional request options.
23371
+ * @returns A promise resolving to an array of semantically similar `Message` objects.
23372
+ *
23373
+ * @example
23374
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
23375
+ * const results = await client.threads.messages.semanticSearch('unpaid invoices', 5);
23376
+ */
23377
+ semanticSearch: async (query, limit = 10, options) => {
23378
+ return rb.execute(
23379
+ getMessagesSemanticSearch,
23380
+ { query: { filter: { query, limit } } },
23381
+ options
23382
+ );
21778
23383
  }
21779
23384
  },
21780
23385
  /**
@@ -21845,6 +23450,26 @@ function createThreadsNamespace(rb) {
21845
23450
  options,
21846
23451
  streamOptions
21847
23452
  );
23453
+ },
23454
+ /**
23455
+ * Full-text search threads by title or context summary.
23456
+ *
23457
+ * @param query - The search query string.
23458
+ * @param options - Optional request options.
23459
+ * @returns A promise resolving to an array of matching `Thread` objects.
23460
+ *
23461
+ * @example
23462
+ * ```typescript
23463
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
23464
+ * const results = await client.threads.search('invoice review');
23465
+ * ```
23466
+ */
23467
+ search: async (query, options) => {
23468
+ return rb.execute(
23469
+ getThreadsSearch,
23470
+ { query: { filter: { query } } },
23471
+ options
23472
+ );
21848
23473
  }
21849
23474
  };
21850
23475
  }
@@ -24457,8 +26082,52 @@ function createWebhooksNamespace(rb) {
24457
26082
  { path: { id }, body: {} },
24458
26083
  options
24459
26084
  );
26085
+ },
26086
+ /**
26087
+ * Returns aggregated statistics across all webhook configurations.
26088
+ *
26089
+ * Provides counts of total, enabled, and disabled configs along with
26090
+ * the overall delivery success rate. Useful for monitoring webhook
26091
+ * health at a glance.
26092
+ *
26093
+ * @param options - Optional request options.
26094
+ * @returns An object containing webhook config statistics.
26095
+ *
26096
+ * @example
26097
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
26098
+ * const stats = await client.webhooks.configs.stats();
26099
+ * console.log(`Total: ${stats.total}, Enabled: ${stats.enabled}`);
26100
+ */
26101
+ stats: async (options) => {
26102
+ return rb.execute(
26103
+ getWebhookConfigsStats,
26104
+ {},
26105
+ options
26106
+ );
24460
26107
  }
24461
26108
  },
26109
+ /**
26110
+ * Lists all available webhook event types supported by the platform.
26111
+ *
26112
+ * Returns the complete event catalog. Use this to discover which event
26113
+ * types exist, understand their payload shape, and validate the `events`
26114
+ * array when registering or updating webhook configs. The endpoint does
26115
+ * not require authentication.
26116
+ *
26117
+ * @param options - Optional request options.
26118
+ * @returns A promise that resolves to an array of event type descriptors,
26119
+ * each with `type` (the event name string), `description`, and
26120
+ * `data_object` (the resource type the payload describes).
26121
+ *
26122
+ * @example
26123
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
26124
+ * const types = await client.webhooks.listEventTypes();
26125
+ * console.log(types.map(t => t.type));
26126
+ * // ['agent.execution.completed', 'document.processed', ...]
26127
+ */
26128
+ listEventTypes: async (options) => {
26129
+ return rb.rawGet("/webhook-event-types", options);
26130
+ },
24462
26131
  /**
24463
26132
  * Sub-namespace for inspecting and retrying webhook delivery records.
24464
26133
  *
@@ -24526,53 +26195,26 @@ function createWebhooksNamespace(rb) {
24526
26195
  );
24527
26196
  },
24528
26197
  /**
24529
- * Creates a new webhook delivery record manually.
24530
- *
24531
- * In most cases delivery records are created automatically by the platform
24532
- * when events are dispatched. This lower-level method is provided for
24533
- * advanced use cases such as re-importing delivery history or triggering
24534
- * synthetic deliveries in testing environments.
24535
- *
24536
- * @param attributes - Delivery attributes including at minimum
24537
- * `webhook_config_id` and `event_type`.
24538
- * @param options - Optional request options.
24539
- * @returns A promise that resolves to the created `WebhookDelivery` object.
24540
- *
24541
- * @example
24542
- * const client = new GptClient({ apiKey: 'sk_app_...' });
24543
- * const delivery = await client.webhooks.deliveries.create({
24544
- * webhook_config_id: 'whc_01HXYZ...',
24545
- * event_type: 'agent.execution.completed',
24546
- * });
24547
- */
24548
- create: async (attributes, options) => {
24549
- return rb.execute(
24550
- postWebhookDeliveriesBulkRetry,
24551
- { body: { data: { type: "webhook_delivery", attributes } } },
24552
- options
24553
- );
24554
- },
24555
- /**
24556
- * Retries a specific failed webhook delivery.
26198
+ * Retries a specific failed webhook delivery by its ID.
24557
26199
  *
24558
26200
  * Triggers a new HTTP POST attempt to the webhook endpoint using the
24559
26201
  * original event payload. The delivery record is updated with the result
24560
26202
  * of the retry attempt.
24561
26203
  *
24562
- * @param options - Optional request options. Pass the delivery ID via
24563
- * request parameters to target a specific failed delivery.
26204
+ * @param id - The UUID of the webhook delivery record to retry.
26205
+ * @param options - Optional request options.
24564
26206
  * @returns A promise that resolves to the updated `WebhookDelivery` object
24565
26207
  * after the retry attempt.
24566
26208
  *
24567
26209
  * @example
24568
26210
  * const client = new GptClient({ apiKey: 'sk_app_...' });
24569
- * const retried = await client.webhooks.deliveries.retry();
26211
+ * const retried = await client.webhooks.deliveries.retry('wdl_01HXYZ...');
24570
26212
  * console.log(`Retry status: ${retried.attributes.response_status}`);
24571
26213
  */
24572
- retry: async (options) => {
26214
+ retry: async (id, options) => {
24573
26215
  return rb.execute(
24574
- postWebhookDeliveriesBulkRetry,
24575
- {},
26216
+ postWebhookDeliveriesByIdRetry,
26217
+ { path: { id }, body: {} },
24576
26218
  options
24577
26219
  );
24578
26220
  },
@@ -24623,6 +26265,27 @@ function createWebhooksNamespace(rb) {
24623
26265
  { path: { id } },
24624
26266
  options
24625
26267
  );
26268
+ },
26269
+ /**
26270
+ * Returns aggregate delivery counts by status.
26271
+ *
26272
+ * Provides total, delivered, failed, and retrying counts. Useful for
26273
+ * monitoring dashboards and health checks.
26274
+ *
26275
+ * @param options - Optional request options.
26276
+ * @returns An object with `total`, `delivered`, `failed`, and `retrying` counts.
26277
+ *
26278
+ * @example
26279
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
26280
+ * const stats = await client.webhooks.deliveries.stats();
26281
+ * console.log(`Failed deliveries: ${stats.failed}`);
26282
+ */
26283
+ stats: async (options) => {
26284
+ return rb.execute(
26285
+ getWebhookDeliveriesStats,
26286
+ {},
26287
+ options
26288
+ );
24626
26289
  }
24627
26290
  }
24628
26291
  };
@@ -24679,6 +26342,218 @@ function createPipelinesNamespace(rb) {
24679
26342
  };
24680
26343
  }
24681
26344
 
26345
+ // src/namespaces/access-grants.ts
26346
+ function createAccessGrantsNamespace(rb) {
26347
+ return {
26348
+ /**
26349
+ * List access grants for the authenticated user's workspace.
26350
+ *
26351
+ * @param params - Optional filter parameters (subject_id, object_id, object_type, relation)
26352
+ * @returns Paginated list of access grants
26353
+ * @example
26354
+ * const grants = await client.accessGrants.list({ object_id: workspaceId });
26355
+ */
26356
+ async list(params) {
26357
+ const query = params ? `?${new URLSearchParams(params).toString()}` : "";
26358
+ return rb.rawGet(`/access-grants${query}`);
26359
+ },
26360
+ /**
26361
+ * Get a single access grant by ID.
26362
+ *
26363
+ * @param id - AccessGrant UUID
26364
+ * @returns The access grant record
26365
+ * @example
26366
+ * const grant = await client.accessGrants.get("grant-uuid");
26367
+ */
26368
+ async get(id) {
26369
+ return rb.rawGet(`/access-grants/${id}`);
26370
+ },
26371
+ /**
26372
+ * Create a new access grant, giving a subject a relation to an object.
26373
+ *
26374
+ * @param attrs - Grant attributes (subject_type, subject_id, relation, object_type, object_id)
26375
+ * @returns The created access grant
26376
+ * @example
26377
+ * const grant = await client.accessGrants.create({
26378
+ * data: {
26379
+ * type: "access-grant",
26380
+ * attributes: {
26381
+ * subject_type: "user",
26382
+ * subject_id: "user-uuid",
26383
+ * relation: "workspace_editor",
26384
+ * object_type: "workspace",
26385
+ * object_id: "workspace-uuid",
26386
+ * },
26387
+ * },
26388
+ * });
26389
+ */
26390
+ async create(attrs) {
26391
+ return rb.rawPost(`/access-grants`, attrs);
26392
+ },
26393
+ /**
26394
+ * Update an existing access grant (relation, custom_permissions, expires_at).
26395
+ *
26396
+ * @param id - AccessGrant UUID
26397
+ * @param attrs - Attributes to update
26398
+ * @returns The updated access grant
26399
+ * @example
26400
+ * const updated = await client.accessGrants.update("grant-uuid", { data: { ... } });
26401
+ */
26402
+ async update(id, attrs) {
26403
+ return rb.rawPatch(`/access-grants/${id}`, attrs);
26404
+ },
26405
+ /**
26406
+ * Revoke (delete) an access grant.
26407
+ *
26408
+ * @param id - AccessGrant UUID
26409
+ * @example
26410
+ * await client.accessGrants.revoke("grant-uuid");
26411
+ */
26412
+ async revoke(id) {
26413
+ return rb.rawDelete(`/access-grants/${id}`);
26414
+ }
26415
+ };
26416
+ }
26417
+
26418
+ // src/namespaces/roles.ts
26419
+ function createRolesNamespace(rb) {
26420
+ return {
26421
+ /**
26422
+ * List roles available in the current context (system defaults + application roles).
26423
+ *
26424
+ * @param params - Optional filter parameters
26425
+ * @returns Paginated list of roles
26426
+ * @example
26427
+ * const roles = await client.roles.list();
26428
+ */
26429
+ async list(params) {
26430
+ const query = params ? `?${new URLSearchParams(params).toString()}` : "";
26431
+ return rb.rawGet(`/roles${query}`);
26432
+ },
26433
+ /**
26434
+ * Get a single role by ID.
26435
+ *
26436
+ * @param id - Role UUID
26437
+ * @returns The role record
26438
+ * @example
26439
+ * const role = await client.roles.get("role-uuid");
26440
+ */
26441
+ async get(id) {
26442
+ return rb.rawGet(`/roles/${id}`);
26443
+ },
26444
+ /**
26445
+ * Create a new custom role (permission bundle) for the application.
26446
+ *
26447
+ * @param attrs - Role attributes (name, description, permissions, application_id)
26448
+ * @returns The created role
26449
+ * @example
26450
+ * const role = await client.roles.create({
26451
+ * data: {
26452
+ * type: "role",
26453
+ * attributes: { name: "Content Editor", permissions: ["extract:document:read:all"] },
26454
+ * },
26455
+ * });
26456
+ */
26457
+ async create(attrs) {
26458
+ return rb.rawPost(`/roles`, attrs);
26459
+ },
26460
+ /**
26461
+ * Update a role's name, description, or permissions.
26462
+ *
26463
+ * @param id - Role UUID
26464
+ * @param attrs - Attributes to update
26465
+ * @returns The updated role
26466
+ * @example
26467
+ * const updated = await client.roles.update("role-uuid", { data: { ... } });
26468
+ */
26469
+ async update(id, attrs) {
26470
+ return rb.rawPatch(`/roles/${id}`, attrs);
26471
+ },
26472
+ /**
26473
+ * Delete a custom role. System default roles cannot be deleted.
26474
+ *
26475
+ * @param id - Role UUID
26476
+ * @example
26477
+ * await client.roles.delete("role-uuid");
26478
+ */
26479
+ async delete(id) {
26480
+ return rb.rawDelete(`/roles/${id}`);
26481
+ }
26482
+ };
26483
+ }
26484
+
26485
+ // src/namespaces/permissions.ts
26486
+ function createPermissionsNamespace(rb) {
26487
+ return {
26488
+ /**
26489
+ * List all registered platform permissions.
26490
+ *
26491
+ * Optionally filter by `app`, `context`, or `category` query params.
26492
+ *
26493
+ * @param params - Optional filter parameters (app, context, category)
26494
+ * @returns List of permissions
26495
+ * @example
26496
+ * const perms = await client.permissions.list({ context: "workspace" });
26497
+ */
26498
+ async list(params) {
26499
+ const query = params ? `?${new URLSearchParams(params).toString()}` : "";
26500
+ return rb.rawGet(`/permissions${query}`);
26501
+ },
26502
+ /**
26503
+ * Get a single permission by its ID string (e.g., "extract:document:read:all").
26504
+ *
26505
+ * @param id - Permission ID string
26506
+ * @returns The permission record
26507
+ * @example
26508
+ * const perm = await client.permissions.get("extract:document:read:all");
26509
+ */
26510
+ async get(id) {
26511
+ return rb.rawGet(
26512
+ `/permissions/${encodeURIComponent(id)}`
26513
+ );
26514
+ },
26515
+ /**
26516
+ * Get permission system metadata (version, apps, scopes, categories, cache TTL).
26517
+ *
26518
+ * @returns Permission system metadata
26519
+ * @example
26520
+ * const meta = await client.permissions.meta();
26521
+ */
26522
+ async meta() {
26523
+ return rb.rawGet(`/permissions/meta`);
26524
+ },
26525
+ /**
26526
+ * List permission presets (pre-defined role bundles).
26527
+ *
26528
+ * Optionally filter by `context` (tenant, workspace) or `app`.
26529
+ *
26530
+ * @param params - Optional filter parameters (context, app)
26531
+ * @returns List of permission presets
26532
+ * @example
26533
+ * const presets = await client.permissions.listPresets({ context: "workspace" });
26534
+ */
26535
+ async listPresets(params) {
26536
+ const query = params ? `?${new URLSearchParams(params).toString()}` : "";
26537
+ return rb.rawGet(
26538
+ `/permissions/presets${query}`
26539
+ );
26540
+ },
26541
+ /**
26542
+ * Get a single permission preset by its composite ID (e.g., "workspace:org:admin").
26543
+ *
26544
+ * @param id - Preset composite ID
26545
+ * @returns The permission preset
26546
+ * @example
26547
+ * const preset = await client.permissions.getPreset("workspace:org:admin");
26548
+ */
26549
+ async getPreset(id) {
26550
+ return rb.rawGet(
26551
+ `/permissions/presets/${encodeURIComponent(id)}`
26552
+ );
26553
+ }
26554
+ };
26555
+ }
26556
+
24682
26557
  // src/streaming.ts
24683
26558
  var DEFAULT_STREAM_TIMEOUT = 3e5;
24684
26559
  var DEFAULT_MAX_CHUNKS = 1e4;
@@ -24922,6 +26797,25 @@ var RequestBuilder = class {
24922
26797
  throw handleApiError(error);
24923
26798
  }
24924
26799
  }
26800
+ /**
26801
+ * Execute a raw PATCH request to a custom (non-generated) endpoint.
26802
+ */
26803
+ async rawPatch(url, body, options) {
26804
+ const headers = buildHeaders(this.getHeaders, options);
26805
+ try {
26806
+ const { data } = await this.requestWithRetry(
26807
+ () => this.clientInstance.patch({
26808
+ url,
26809
+ headers,
26810
+ ...body !== void 0 && { body },
26811
+ ...options?.signal && { signal: options.signal }
26812
+ })
26813
+ );
26814
+ return this.unwrap(data?.data);
26815
+ } catch (error) {
26816
+ throw handleApiError(error);
26817
+ }
26818
+ }
24925
26819
  /**
24926
26820
  * Execute a raw DELETE request to a custom (non-generated) endpoint.
24927
26821
  */
@@ -25077,6 +26971,7 @@ var GptClient = class extends BaseClient {
25077
26971
  this.ai = createAiNamespace(rb);
25078
26972
  this.billing = createBillingNamespace(rb);
25079
26973
  this.catalog = createCatalogNamespace(rb);
26974
+ this.clinical = createClinicalNamespace(rb);
25080
26975
  this.compliance = createComplianceNamespace(rb);
25081
26976
  this.communication = createCommunicationNamespace(rb);
25082
26977
  this.connectors = createConnectorsNamespace(rb);
@@ -25102,6 +26997,9 @@ var GptClient = class extends BaseClient {
25102
26997
  this.models = createModelsNamespace(rb);
25103
26998
  this.crmClusters = createCrmClustersNamespace(rb);
25104
26999
  this.pipelines = createPipelinesNamespace(rb);
27000
+ this.accessGrants = createAccessGrantsNamespace(rb);
27001
+ this.roles = createRolesNamespace(rb);
27002
+ this.permissions = createPermissionsNamespace(rb);
25105
27003
  }
25106
27004
  /**
25107
27005
  * Subscribe to SDK lifecycle events.