@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.d.mts +10691 -8473
- package/dist/index.d.ts +10691 -8473
- package/dist/index.js +1969 -71
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1969 -71
- package/dist/index.mjs.map +1 -1
- package/llms.txt +110 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1269,7 +1269,7 @@ function buildUserAgent(sdkVersion, appInfo) {
|
|
|
1269
1269
|
}
|
|
1270
1270
|
|
|
1271
1271
|
// src/version.ts
|
|
1272
|
-
var SDK_VERSION = "0.
|
|
1272
|
+
var SDK_VERSION = "0.7.0";
|
|
1273
1273
|
var DEFAULT_API_VERSION = "2026-03-11";
|
|
1274
1274
|
|
|
1275
1275
|
// src/base-client.ts
|
|
@@ -1730,6 +1730,20 @@ var getCrmRelationshipsById = (options) => (options.client ?? client).get({
|
|
|
1730
1730
|
url: "/crm/relationships/{id}",
|
|
1731
1731
|
...options
|
|
1732
1732
|
});
|
|
1733
|
+
var getClinicalSessions = (options) => (options.client ?? client).get({
|
|
1734
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1735
|
+
url: "/clinical/sessions",
|
|
1736
|
+
...options
|
|
1737
|
+
});
|
|
1738
|
+
var postClinicalSessions = (options) => (options.client ?? client).post({
|
|
1739
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1740
|
+
url: "/clinical/sessions",
|
|
1741
|
+
...options,
|
|
1742
|
+
headers: {
|
|
1743
|
+
"Content-Type": "application/vnd.api+json",
|
|
1744
|
+
...options.headers
|
|
1745
|
+
}
|
|
1746
|
+
});
|
|
1733
1747
|
var getWatcherEventsById = (options) => (options.client ?? client).get({
|
|
1734
1748
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1735
1749
|
url: "/watcher/events/{id}",
|
|
@@ -1791,6 +1805,30 @@ var getCatalogTaxonomyNodesTaxonomyByTaxonomyId = (options) => (options.client ?
|
|
|
1791
1805
|
url: "/catalog/taxonomy-nodes/taxonomy/{taxonomy_id}",
|
|
1792
1806
|
...options
|
|
1793
1807
|
});
|
|
1808
|
+
var getClinicalNotesByNoteIdVersionsById = (options) => (options.client ?? client).get({
|
|
1809
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1810
|
+
url: "/clinical/notes/{note_id}/versions/{id}",
|
|
1811
|
+
...options
|
|
1812
|
+
});
|
|
1813
|
+
var deleteClinicalMealPlansById = (options) => (options.client ?? client).delete({
|
|
1814
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1815
|
+
url: "/clinical/meal-plans/{id}",
|
|
1816
|
+
...options
|
|
1817
|
+
});
|
|
1818
|
+
var getClinicalMealPlansById = (options) => (options.client ?? client).get({
|
|
1819
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1820
|
+
url: "/clinical/meal-plans/{id}",
|
|
1821
|
+
...options
|
|
1822
|
+
});
|
|
1823
|
+
var patchClinicalMealPlansById = (options) => (options.client ?? client).patch({
|
|
1824
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1825
|
+
url: "/clinical/meal-plans/{id}",
|
|
1826
|
+
...options,
|
|
1827
|
+
headers: {
|
|
1828
|
+
"Content-Type": "application/vnd.api+json",
|
|
1829
|
+
...options.headers
|
|
1830
|
+
}
|
|
1831
|
+
});
|
|
1794
1832
|
var deleteSocialAccountsById = (options) => (options.client ?? client).delete({
|
|
1795
1833
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1796
1834
|
url: "/social/accounts/{id}",
|
|
@@ -1894,6 +1932,11 @@ var getAgentsByIdStats = (options) => (options.client ?? client).get({
|
|
|
1894
1932
|
url: "/agents/{id}/stats",
|
|
1895
1933
|
...options
|
|
1896
1934
|
});
|
|
1935
|
+
var getClinicalPatientsByIdHealthMetrics = (options) => (options.client ?? client).get({
|
|
1936
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1937
|
+
url: "/clinical/patients/{id}/health_metrics",
|
|
1938
|
+
...options
|
|
1939
|
+
});
|
|
1897
1940
|
var patchCrmExportsByIdRefreshUrl = (options) => (options.client ?? client).patch({
|
|
1898
1941
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1899
1942
|
url: "/crm/exports/{id}/refresh-url",
|
|
@@ -1937,6 +1980,25 @@ var getCrmExportsById = (options) => (options.client ?? client).get({
|
|
|
1937
1980
|
url: "/crm/exports/{id}",
|
|
1938
1981
|
...options
|
|
1939
1982
|
});
|
|
1983
|
+
var deleteClinicalPracticeResourcesById = (options) => (options.client ?? client).delete({
|
|
1984
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1985
|
+
url: "/clinical/practice-resources/{id}",
|
|
1986
|
+
...options
|
|
1987
|
+
});
|
|
1988
|
+
var getClinicalPracticeResourcesById = (options) => (options.client ?? client).get({
|
|
1989
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1990
|
+
url: "/clinical/practice-resources/{id}",
|
|
1991
|
+
...options
|
|
1992
|
+
});
|
|
1993
|
+
var patchClinicalPracticeResourcesById = (options) => (options.client ?? client).patch({
|
|
1994
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1995
|
+
url: "/clinical/practice-resources/{id}",
|
|
1996
|
+
...options,
|
|
1997
|
+
headers: {
|
|
1998
|
+
"Content-Type": "application/vnd.api+json",
|
|
1999
|
+
...options.headers
|
|
2000
|
+
}
|
|
2001
|
+
});
|
|
1940
2002
|
var patchSocialAccountsByIdDeactivate = (options) => (options.client ?? client).patch({
|
|
1941
2003
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1942
2004
|
url: "/social/accounts/{id}/deactivate",
|
|
@@ -2055,6 +2117,39 @@ var postExtractionBatches = (options) => (options.client ?? client).post({
|
|
|
2055
2117
|
...options.headers
|
|
2056
2118
|
}
|
|
2057
2119
|
});
|
|
2120
|
+
var getClinicalNotes = (options) => (options.client ?? client).get({
|
|
2121
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2122
|
+
url: "/clinical/notes",
|
|
2123
|
+
...options
|
|
2124
|
+
});
|
|
2125
|
+
var postClinicalNotes = (options) => (options.client ?? client).post({
|
|
2126
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2127
|
+
url: "/clinical/notes",
|
|
2128
|
+
...options,
|
|
2129
|
+
headers: {
|
|
2130
|
+
"Content-Type": "application/vnd.api+json",
|
|
2131
|
+
...options.headers
|
|
2132
|
+
}
|
|
2133
|
+
});
|
|
2134
|
+
var deleteClinicalClientGoalsById = (options) => (options.client ?? client).delete({
|
|
2135
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2136
|
+
url: "/clinical/client-goals/{id}",
|
|
2137
|
+
...options
|
|
2138
|
+
});
|
|
2139
|
+
var getClinicalClientGoalsById = (options) => (options.client ?? client).get({
|
|
2140
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2141
|
+
url: "/clinical/client-goals/{id}",
|
|
2142
|
+
...options
|
|
2143
|
+
});
|
|
2144
|
+
var patchClinicalClientGoalsById = (options) => (options.client ?? client).patch({
|
|
2145
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2146
|
+
url: "/clinical/client-goals/{id}",
|
|
2147
|
+
...options,
|
|
2148
|
+
headers: {
|
|
2149
|
+
"Content-Type": "application/vnd.api+json",
|
|
2150
|
+
...options.headers
|
|
2151
|
+
}
|
|
2152
|
+
});
|
|
2058
2153
|
var postAgentsImport = (options) => (options.client ?? client).post({
|
|
2059
2154
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2060
2155
|
url: "/agents/import",
|
|
@@ -2120,6 +2215,15 @@ var postEmailOutboundEmailsComposeWithAi = (options) => (options.client ?? clien
|
|
|
2120
2215
|
...options.headers
|
|
2121
2216
|
}
|
|
2122
2217
|
});
|
|
2218
|
+
var postWebhookDeliveriesByIdRetry = (options) => (options.client ?? client).post({
|
|
2219
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2220
|
+
url: "/webhook-deliveries/{id}/retry",
|
|
2221
|
+
...options,
|
|
2222
|
+
headers: {
|
|
2223
|
+
"Content-Type": "application/vnd.api+json",
|
|
2224
|
+
...options.headers
|
|
2225
|
+
}
|
|
2226
|
+
});
|
|
2123
2227
|
var patchSocialPostsByIdPublish = (options) => (options.client ?? client).patch({
|
|
2124
2228
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2125
2229
|
url: "/social/posts/{id}/publish",
|
|
@@ -2301,6 +2405,16 @@ var postConnectorsCredentialsByIdRefresh = (options) => (options.client ?? clien
|
|
|
2301
2405
|
...options.headers
|
|
2302
2406
|
}
|
|
2303
2407
|
});
|
|
2408
|
+
var deleteClinicalSupplementRecCacheById = (options) => (options.client ?? client).delete({
|
|
2409
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2410
|
+
url: "/clinical/supplement-rec-cache/{id}",
|
|
2411
|
+
...options
|
|
2412
|
+
});
|
|
2413
|
+
var getClinicalSupplementRecCacheById = (options) => (options.client ?? client).get({
|
|
2414
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2415
|
+
url: "/clinical/supplement-rec-cache/{id}",
|
|
2416
|
+
...options
|
|
2417
|
+
});
|
|
2304
2418
|
var postWorkspacesByWorkspaceIdExtractionDocumentsDismissAllTrained = (options) => (options.client ?? client).post({
|
|
2305
2419
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2306
2420
|
url: "/workspaces/{workspace_id}/extraction/documents/dismiss-all-trained",
|
|
@@ -2310,6 +2424,11 @@ var postWorkspacesByWorkspaceIdExtractionDocumentsDismissAllTrained = (options)
|
|
|
2310
2424
|
...options.headers
|
|
2311
2425
|
}
|
|
2312
2426
|
});
|
|
2427
|
+
var getClinicalSessionsByIdSessionNotes = (options) => (options.client ?? client).get({
|
|
2428
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2429
|
+
url: "/clinical/sessions/{id}/session_notes",
|
|
2430
|
+
...options
|
|
2431
|
+
});
|
|
2313
2432
|
var postExtractionDocumentsFindOrBeginUpload = (options) => (options.client ?? client).post({
|
|
2314
2433
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2315
2434
|
url: "/extraction/documents/find-or-begin-upload",
|
|
@@ -2342,6 +2461,11 @@ var postConfigs = (options) => (options.client ?? client).post({
|
|
|
2342
2461
|
...options.headers
|
|
2343
2462
|
}
|
|
2344
2463
|
});
|
|
2464
|
+
var getClinicalSupplementRecCache = (options) => (options.client ?? client).get({
|
|
2465
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2466
|
+
url: "/clinical/supplement-rec-cache",
|
|
2467
|
+
...options
|
|
2468
|
+
});
|
|
2345
2469
|
var deleteCrmCustomEntitiesById = (options) => (options.client ?? client).delete({
|
|
2346
2470
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2347
2471
|
url: "/crm/custom-entities/{id}",
|
|
@@ -2388,6 +2512,11 @@ var postTokens = (options) => (options.client ?? client).post({
|
|
|
2388
2512
|
...options.headers
|
|
2389
2513
|
}
|
|
2390
2514
|
});
|
|
2515
|
+
var getClinicalPatientsByIdSupplements = (options) => (options.client ?? client).get({
|
|
2516
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2517
|
+
url: "/clinical/patients/{id}/supplements",
|
|
2518
|
+
...options
|
|
2519
|
+
});
|
|
2391
2520
|
var postAgentsByIdPublishVersion = (options) => (options.client ?? client).post({
|
|
2392
2521
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2393
2522
|
url: "/agents/{id}/publish-version",
|
|
@@ -2527,6 +2656,25 @@ var postCrmRelationshipTypes = (options) => (options.client ?? client).post({
|
|
|
2527
2656
|
...options.headers
|
|
2528
2657
|
}
|
|
2529
2658
|
});
|
|
2659
|
+
var deleteClinicalSessionsById = (options) => (options.client ?? client).delete({
|
|
2660
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2661
|
+
url: "/clinical/sessions/{id}",
|
|
2662
|
+
...options
|
|
2663
|
+
});
|
|
2664
|
+
var getClinicalSessionsById = (options) => (options.client ?? client).get({
|
|
2665
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2666
|
+
url: "/clinical/sessions/{id}",
|
|
2667
|
+
...options
|
|
2668
|
+
});
|
|
2669
|
+
var patchClinicalSessionsById = (options) => (options.client ?? client).patch({
|
|
2670
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2671
|
+
url: "/clinical/sessions/{id}",
|
|
2672
|
+
...options,
|
|
2673
|
+
headers: {
|
|
2674
|
+
"Content-Type": "application/vnd.api+json",
|
|
2675
|
+
...options.headers
|
|
2676
|
+
}
|
|
2677
|
+
});
|
|
2530
2678
|
var getAgentsUsage = (options) => (options.client ?? client).get({
|
|
2531
2679
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2532
2680
|
url: "/agents/usage",
|
|
@@ -2658,6 +2806,25 @@ var patchSocialCampaignsByIdCancel = (options) => (options.client ?? client).pat
|
|
|
2658
2806
|
...options.headers
|
|
2659
2807
|
}
|
|
2660
2808
|
});
|
|
2809
|
+
var deleteClinicalPracticeToolsById = (options) => (options.client ?? client).delete({
|
|
2810
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2811
|
+
url: "/clinical/practice-tools/{id}",
|
|
2812
|
+
...options
|
|
2813
|
+
});
|
|
2814
|
+
var getClinicalPracticeToolsById = (options) => (options.client ?? client).get({
|
|
2815
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2816
|
+
url: "/clinical/practice-tools/{id}",
|
|
2817
|
+
...options
|
|
2818
|
+
});
|
|
2819
|
+
var patchClinicalPracticeToolsById = (options) => (options.client ?? client).patch({
|
|
2820
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2821
|
+
url: "/clinical/practice-tools/{id}",
|
|
2822
|
+
...options,
|
|
2823
|
+
headers: {
|
|
2824
|
+
"Content-Type": "application/vnd.api+json",
|
|
2825
|
+
...options.headers
|
|
2826
|
+
}
|
|
2827
|
+
});
|
|
2661
2828
|
var getFeatureUsagesById = (options) => (options.client ?? client).get({
|
|
2662
2829
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2663
2830
|
url: "/feature-usages/{id}",
|
|
@@ -2672,6 +2839,11 @@ var patchSchedulingCalendarSyncsByIdPause = (options) => (options.client ?? clie
|
|
|
2672
2839
|
...options.headers
|
|
2673
2840
|
}
|
|
2674
2841
|
});
|
|
2842
|
+
var getWebhookConfigsStats = (options) => (options.client ?? client).get({
|
|
2843
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2844
|
+
url: "/webhook-configs/stats",
|
|
2845
|
+
...options
|
|
2846
|
+
});
|
|
2675
2847
|
var getEmailMarketingCampaignsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
2676
2848
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2677
2849
|
url: "/email-marketing/campaigns/workspace/{workspace_id}",
|
|
@@ -2881,6 +3053,25 @@ var patchCrawlerJobsByIdCancel = (options) => (options.client ?? client).patch({
|
|
|
2881
3053
|
...options.headers
|
|
2882
3054
|
}
|
|
2883
3055
|
});
|
|
3056
|
+
var deleteClinicalNotesById = (options) => (options.client ?? client).delete({
|
|
3057
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3058
|
+
url: "/clinical/notes/{id}",
|
|
3059
|
+
...options
|
|
3060
|
+
});
|
|
3061
|
+
var getClinicalNotesById = (options) => (options.client ?? client).get({
|
|
3062
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3063
|
+
url: "/clinical/notes/{id}",
|
|
3064
|
+
...options
|
|
3065
|
+
});
|
|
3066
|
+
var patchClinicalNotesById = (options) => (options.client ?? client).patch({
|
|
3067
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3068
|
+
url: "/clinical/notes/{id}",
|
|
3069
|
+
...options,
|
|
3070
|
+
headers: {
|
|
3071
|
+
"Content-Type": "application/vnd.api+json",
|
|
3072
|
+
...options.headers
|
|
3073
|
+
}
|
|
3074
|
+
});
|
|
2884
3075
|
var patchSchedulingBookingsByIdConfirm = (options) => (options.client ?? client).patch({
|
|
2885
3076
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2886
3077
|
url: "/scheduling/bookings/{id}/confirm",
|
|
@@ -2890,6 +3081,15 @@ var patchSchedulingBookingsByIdConfirm = (options) => (options.client ?? client)
|
|
|
2890
3081
|
...options.headers
|
|
2891
3082
|
}
|
|
2892
3083
|
});
|
|
3084
|
+
var patchClinicalNotesByIdApprove = (options) => (options.client ?? client).patch({
|
|
3085
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3086
|
+
url: "/clinical/notes/{id}/approve",
|
|
3087
|
+
...options,
|
|
3088
|
+
headers: {
|
|
3089
|
+
"Content-Type": "application/vnd.api+json",
|
|
3090
|
+
...options.headers
|
|
3091
|
+
}
|
|
3092
|
+
});
|
|
2893
3093
|
var postAgentVersionsByIdAddSystemField = (options) => (options.client ?? client).post({
|
|
2894
3094
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2895
3095
|
url: "/agent-versions/{id}/add-system-field",
|
|
@@ -2931,6 +3131,11 @@ var patchEmailMarketingGeneratedEmailsByIdApprove = (options) => (options.client
|
|
|
2931
3131
|
...options.headers
|
|
2932
3132
|
}
|
|
2933
3133
|
});
|
|
3134
|
+
var getClinicalNotesByNoteIdVersions = (options) => (options.client ?? client).get({
|
|
3135
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3136
|
+
url: "/clinical/notes/{note_id}/versions",
|
|
3137
|
+
...options
|
|
3138
|
+
});
|
|
2934
3139
|
var postSupportTickets = (options) => (options.client ?? client).post({
|
|
2935
3140
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2936
3141
|
url: "/support/tickets",
|
|
@@ -3096,6 +3301,11 @@ var patchSchedulingParticipantsById = (options) => (options.client ?? client).pa
|
|
|
3096
3301
|
...options.headers
|
|
3097
3302
|
}
|
|
3098
3303
|
});
|
|
3304
|
+
var getClinicalSessionsByIdMealPlans = (options) => (options.client ?? client).get({
|
|
3305
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3306
|
+
url: "/clinical/sessions/{id}/meal_plans",
|
|
3307
|
+
...options
|
|
3308
|
+
});
|
|
3099
3309
|
var postTenantsByIdCredit = (options) => (options.client ?? client).post({
|
|
3100
3310
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3101
3311
|
url: "/tenants/{id}/credit",
|
|
@@ -3185,6 +3395,11 @@ var postSchedulingParticipants = (options) => (options.client ?? client).post({
|
|
|
3185
3395
|
...options.headers
|
|
3186
3396
|
}
|
|
3187
3397
|
});
|
|
3398
|
+
var getWebhookDeliveriesStats = (options) => (options.client ?? client).get({
|
|
3399
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3400
|
+
url: "/webhook-deliveries/stats",
|
|
3401
|
+
...options
|
|
3402
|
+
});
|
|
3188
3403
|
var getNotificationLogsById = (options) => (options.client ?? client).get({
|
|
3189
3404
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3190
3405
|
url: "/notification-logs/{id}",
|
|
@@ -3352,6 +3567,20 @@ var getSearchSemantic = (options) => (options.client ?? client).get({
|
|
|
3352
3567
|
url: "/search/semantic",
|
|
3353
3568
|
...options
|
|
3354
3569
|
});
|
|
3570
|
+
var getClinicalPracticeTools = (options) => (options.client ?? client).get({
|
|
3571
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3572
|
+
url: "/clinical/practice-tools",
|
|
3573
|
+
...options
|
|
3574
|
+
});
|
|
3575
|
+
var postClinicalPracticeTools = (options) => (options.client ?? client).post({
|
|
3576
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3577
|
+
url: "/clinical/practice-tools",
|
|
3578
|
+
...options,
|
|
3579
|
+
headers: {
|
|
3580
|
+
"Content-Type": "application/vnd.api+json",
|
|
3581
|
+
...options.headers
|
|
3582
|
+
}
|
|
3583
|
+
});
|
|
3355
3584
|
var patchCampaignsSequencesByIdResume = (options) => (options.client ?? client).patch({
|
|
3356
3585
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3357
3586
|
url: "/campaigns/sequences/{id}/resume",
|
|
@@ -3441,6 +3670,25 @@ var getCrmPipelinesWorkspaceByWorkspaceId = (options) => (options.client ?? clie
|
|
|
3441
3670
|
url: "/crm/pipelines/workspace/{workspace_id}",
|
|
3442
3671
|
...options
|
|
3443
3672
|
});
|
|
3673
|
+
var deleteClinicalClientResourceAssignmentsById = (options) => (options.client ?? client).delete({
|
|
3674
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3675
|
+
url: "/clinical/client-resource-assignments/{id}",
|
|
3676
|
+
...options
|
|
3677
|
+
});
|
|
3678
|
+
var getClinicalClientResourceAssignmentsById = (options) => (options.client ?? client).get({
|
|
3679
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3680
|
+
url: "/clinical/client-resource-assignments/{id}",
|
|
3681
|
+
...options
|
|
3682
|
+
});
|
|
3683
|
+
var patchClinicalClientResourceAssignmentsById = (options) => (options.client ?? client).patch({
|
|
3684
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3685
|
+
url: "/clinical/client-resource-assignments/{id}",
|
|
3686
|
+
...options,
|
|
3687
|
+
headers: {
|
|
3688
|
+
"Content-Type": "application/vnd.api+json",
|
|
3689
|
+
...options.headers
|
|
3690
|
+
}
|
|
3691
|
+
});
|
|
3444
3692
|
var patchExtractionDocumentsByIdReprocess = (options) => (options.client ?? client).patch({
|
|
3445
3693
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3446
3694
|
url: "/extraction/documents/{id}/reprocess",
|
|
@@ -3620,6 +3868,20 @@ var getSocialMetricsPostBySocialPostIdLatest = (options) => (options.client ?? c
|
|
|
3620
3868
|
url: "/social/metrics/post/{social_post_id}/latest",
|
|
3621
3869
|
...options
|
|
3622
3870
|
});
|
|
3871
|
+
var getClinicalDeliveries = (options) => (options.client ?? client).get({
|
|
3872
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3873
|
+
url: "/clinical/deliveries",
|
|
3874
|
+
...options
|
|
3875
|
+
});
|
|
3876
|
+
var postClinicalDeliveries = (options) => (options.client ?? client).post({
|
|
3877
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3878
|
+
url: "/clinical/deliveries",
|
|
3879
|
+
...options,
|
|
3880
|
+
headers: {
|
|
3881
|
+
"Content-Type": "application/vnd.api+json",
|
|
3882
|
+
...options.headers
|
|
3883
|
+
}
|
|
3884
|
+
});
|
|
3623
3885
|
var getDataSubjectRequests = (options) => (options.client ?? client).get({
|
|
3624
3886
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3625
3887
|
url: "/data-subject-requests",
|
|
@@ -3662,6 +3924,11 @@ var getVoiceTranscriptionResultsSessionBySessionId = (options) => (options.clien
|
|
|
3662
3924
|
url: "/voice/transcription-results/session/{session_id}",
|
|
3663
3925
|
...options
|
|
3664
3926
|
});
|
|
3927
|
+
var getMessagesSearch = (options) => (options.client ?? client).get({
|
|
3928
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3929
|
+
url: "/messages/search",
|
|
3930
|
+
...options
|
|
3931
|
+
});
|
|
3665
3932
|
var postAgentsByIdTeach = (options) => (options.client ?? client).post({
|
|
3666
3933
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3667
3934
|
url: "/agents/{id}/teach",
|
|
@@ -3680,6 +3947,25 @@ var postSocialPosts = (options) => (options.client ?? client).post({
|
|
|
3680
3947
|
...options.headers
|
|
3681
3948
|
}
|
|
3682
3949
|
});
|
|
3950
|
+
var deleteClinicalPatientsById = (options) => (options.client ?? client).delete({
|
|
3951
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3952
|
+
url: "/clinical/patients/{id}",
|
|
3953
|
+
...options
|
|
3954
|
+
});
|
|
3955
|
+
var getClinicalPatientsById = (options) => (options.client ?? client).get({
|
|
3956
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3957
|
+
url: "/clinical/patients/{id}",
|
|
3958
|
+
...options
|
|
3959
|
+
});
|
|
3960
|
+
var patchClinicalPatientsById = (options) => (options.client ?? client).patch({
|
|
3961
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3962
|
+
url: "/clinical/patients/{id}",
|
|
3963
|
+
...options,
|
|
3964
|
+
headers: {
|
|
3965
|
+
"Content-Type": "application/vnd.api+json",
|
|
3966
|
+
...options.headers
|
|
3967
|
+
}
|
|
3968
|
+
});
|
|
3683
3969
|
var patchInvitationsByIdDecline = (options) => (options.client ?? client).patch({
|
|
3684
3970
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3685
3971
|
url: "/invitations/{id}/decline",
|
|
@@ -3745,6 +4031,20 @@ var getDataSubjectRequestsById = (options) => (options.client ?? client).get({
|
|
|
3745
4031
|
url: "/data-subject-requests/{id}",
|
|
3746
4032
|
...options
|
|
3747
4033
|
});
|
|
4034
|
+
var getClinicalClientResourceAssignments = (options) => (options.client ?? client).get({
|
|
4035
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4036
|
+
url: "/clinical/client-resource-assignments",
|
|
4037
|
+
...options
|
|
4038
|
+
});
|
|
4039
|
+
var postClinicalClientResourceAssignments = (options) => (options.client ?? client).post({
|
|
4040
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4041
|
+
url: "/clinical/client-resource-assignments",
|
|
4042
|
+
...options,
|
|
4043
|
+
headers: {
|
|
4044
|
+
"Content-Type": "application/vnd.api+json",
|
|
4045
|
+
...options.headers
|
|
4046
|
+
}
|
|
4047
|
+
});
|
|
3748
4048
|
var postUsersRegisterIsv = (options) => (options.client ?? client).post({
|
|
3749
4049
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3750
4050
|
url: "/users/register-isv",
|
|
@@ -4008,6 +4308,25 @@ var postSchedulingEventTypes = (options) => (options.client ?? client).post({
|
|
|
4008
4308
|
...options.headers
|
|
4009
4309
|
}
|
|
4010
4310
|
});
|
|
4311
|
+
var deleteClinicalClientSupplementsById = (options) => (options.client ?? client).delete({
|
|
4312
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4313
|
+
url: "/clinical/client-supplements/{id}",
|
|
4314
|
+
...options
|
|
4315
|
+
});
|
|
4316
|
+
var getClinicalClientSupplementsById = (options) => (options.client ?? client).get({
|
|
4317
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4318
|
+
url: "/clinical/client-supplements/{id}",
|
|
4319
|
+
...options
|
|
4320
|
+
});
|
|
4321
|
+
var patchClinicalClientSupplementsById = (options) => (options.client ?? client).patch({
|
|
4322
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4323
|
+
url: "/clinical/client-supplements/{id}",
|
|
4324
|
+
...options,
|
|
4325
|
+
headers: {
|
|
4326
|
+
"Content-Type": "application/vnd.api+json",
|
|
4327
|
+
...options.headers
|
|
4328
|
+
}
|
|
4329
|
+
});
|
|
4011
4330
|
var deleteCrmPipelinesById = (options) => (options.client ?? client).delete({
|
|
4012
4331
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4013
4332
|
url: "/crm/pipelines/{id}",
|
|
@@ -4125,6 +4444,11 @@ var postTenantsByIdSchedulePurge = (options) => (options.client ?? client).post(
|
|
|
4125
4444
|
...options.headers
|
|
4126
4445
|
}
|
|
4127
4446
|
});
|
|
4447
|
+
var getMessagesSemanticSearch = (options) => (options.client ?? client).get({
|
|
4448
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4449
|
+
url: "/messages/semantic-search",
|
|
4450
|
+
...options
|
|
4451
|
+
});
|
|
4128
4452
|
var deleteCrmActivitiesById = (options) => (options.client ?? client).delete({
|
|
4129
4453
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4130
4454
|
url: "/crm/activities/{id}",
|
|
@@ -4308,6 +4632,20 @@ var patchUserProfilesByIdDismissWelcome = (options) => (options.client ?? client
|
|
|
4308
4632
|
...options.headers
|
|
4309
4633
|
}
|
|
4310
4634
|
});
|
|
4635
|
+
var getClinicalHealthMetrics = (options) => (options.client ?? client).get({
|
|
4636
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4637
|
+
url: "/clinical/health-metrics",
|
|
4638
|
+
...options
|
|
4639
|
+
});
|
|
4640
|
+
var postClinicalHealthMetrics = (options) => (options.client ?? client).post({
|
|
4641
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4642
|
+
url: "/clinical/health-metrics",
|
|
4643
|
+
...options,
|
|
4644
|
+
headers: {
|
|
4645
|
+
"Content-Type": "application/vnd.api+json",
|
|
4646
|
+
...options.headers
|
|
4647
|
+
}
|
|
4648
|
+
});
|
|
4311
4649
|
var patchWalletAddonsByAddonSlugCancel = (options) => (options.client ?? client).patch({
|
|
4312
4650
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4313
4651
|
url: "/wallet/addons/{addon_slug}/cancel",
|
|
@@ -4345,6 +4683,20 @@ var patchEmailOutboundEmailsByIdSchedule = (options) => (options.client ?? clien
|
|
|
4345
4683
|
...options.headers
|
|
4346
4684
|
}
|
|
4347
4685
|
});
|
|
4686
|
+
var getClinicalPatients = (options) => (options.client ?? client).get({
|
|
4687
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4688
|
+
url: "/clinical/patients",
|
|
4689
|
+
...options
|
|
4690
|
+
});
|
|
4691
|
+
var postClinicalPatients = (options) => (options.client ?? client).post({
|
|
4692
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4693
|
+
url: "/clinical/patients",
|
|
4694
|
+
...options,
|
|
4695
|
+
headers: {
|
|
4696
|
+
"Content-Type": "application/vnd.api+json",
|
|
4697
|
+
...options.headers
|
|
4698
|
+
}
|
|
4699
|
+
});
|
|
4348
4700
|
var patchExtractionDocumentsByIdVerification = (options) => (options.client ?? client).patch({
|
|
4349
4701
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4350
4702
|
url: "/extraction/documents/{id}/verification",
|
|
@@ -4373,6 +4725,11 @@ var getTransactions = (options) => (options.client ?? client).get({
|
|
|
4373
4725
|
url: "/transactions",
|
|
4374
4726
|
...options
|
|
4375
4727
|
});
|
|
4728
|
+
var getThreadsSearch = (options) => (options.client ?? client).get({
|
|
4729
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4730
|
+
url: "/threads/search",
|
|
4731
|
+
...options
|
|
4732
|
+
});
|
|
4376
4733
|
var patchSocialAccountsByIdEnablePosting = (options) => (options.client ?? client).patch({
|
|
4377
4734
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4378
4735
|
url: "/social/accounts/{id}/enable-posting",
|
|
@@ -4506,6 +4863,20 @@ var patchSupportTicketsByIdClose = (options) => (options.client ?? client).patch
|
|
|
4506
4863
|
...options.headers
|
|
4507
4864
|
}
|
|
4508
4865
|
});
|
|
4866
|
+
var getClinicalClientGoals = (options) => (options.client ?? client).get({
|
|
4867
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4868
|
+
url: "/clinical/client-goals",
|
|
4869
|
+
...options
|
|
4870
|
+
});
|
|
4871
|
+
var postClinicalClientGoals = (options) => (options.client ?? client).post({
|
|
4872
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4873
|
+
url: "/clinical/client-goals",
|
|
4874
|
+
...options,
|
|
4875
|
+
headers: {
|
|
4876
|
+
"Content-Type": "application/vnd.api+json",
|
|
4877
|
+
...options.headers
|
|
4878
|
+
}
|
|
4879
|
+
});
|
|
4509
4880
|
var getWalletSeats = (options) => (options.client ?? client).get({
|
|
4510
4881
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4511
4882
|
url: "/wallet/seats",
|
|
@@ -4557,12 +4928,26 @@ var patchSchedulingEventsByIdReschedule = (options) => (options.client ?? client
|
|
|
4557
4928
|
...options.headers
|
|
4558
4929
|
}
|
|
4559
4930
|
});
|
|
4560
|
-
var
|
|
4931
|
+
var getClinicalPracticeResources = (options) => (options.client ?? client).get({
|
|
4561
4932
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4562
|
-
url: "/
|
|
4933
|
+
url: "/clinical/practice-resources",
|
|
4563
4934
|
...options
|
|
4564
4935
|
});
|
|
4565
|
-
var
|
|
4936
|
+
var postClinicalPracticeResources = (options) => (options.client ?? client).post({
|
|
4937
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4938
|
+
url: "/clinical/practice-resources",
|
|
4939
|
+
...options,
|
|
4940
|
+
headers: {
|
|
4941
|
+
"Content-Type": "application/vnd.api+json",
|
|
4942
|
+
...options.headers
|
|
4943
|
+
}
|
|
4944
|
+
});
|
|
4945
|
+
var getCampaignsSequencesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
4946
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4947
|
+
url: "/campaigns/sequences/workspace/{workspace_id}",
|
|
4948
|
+
...options
|
|
4949
|
+
});
|
|
4950
|
+
var patchUserProfilesByIdDismissAnnouncement = (options) => (options.client ?? client).patch({
|
|
4566
4951
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4567
4952
|
url: "/user-profiles/{id}/dismiss-announcement",
|
|
4568
4953
|
...options,
|
|
@@ -4603,6 +4988,11 @@ var postEmailMarketingSenderProfiles = (options) => (options.client ?? client).p
|
|
|
4603
4988
|
...options.headers
|
|
4604
4989
|
}
|
|
4605
4990
|
});
|
|
4991
|
+
var getClinicalPatientsByIdResourceAssignments = (options) => (options.client ?? client).get({
|
|
4992
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4993
|
+
url: "/clinical/patients/{id}/resource_assignments",
|
|
4994
|
+
...options
|
|
4995
|
+
});
|
|
4606
4996
|
var getWatcherClaimsById = (options) => (options.client ?? client).get({
|
|
4607
4997
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4608
4998
|
url: "/watcher/claims/{id}",
|
|
@@ -4626,6 +5016,25 @@ var postUsersAuthLogin = (options) => (options.client ?? client).post({
|
|
|
4626
5016
|
...options.headers
|
|
4627
5017
|
}
|
|
4628
5018
|
});
|
|
5019
|
+
var deleteClinicalHealthMetricsById = (options) => (options.client ?? client).delete({
|
|
5020
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5021
|
+
url: "/clinical/health-metrics/{id}",
|
|
5022
|
+
...options
|
|
5023
|
+
});
|
|
5024
|
+
var getClinicalHealthMetricsById = (options) => (options.client ?? client).get({
|
|
5025
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5026
|
+
url: "/clinical/health-metrics/{id}",
|
|
5027
|
+
...options
|
|
5028
|
+
});
|
|
5029
|
+
var patchClinicalHealthMetricsById = (options) => (options.client ?? client).patch({
|
|
5030
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5031
|
+
url: "/clinical/health-metrics/{id}",
|
|
5032
|
+
...options,
|
|
5033
|
+
headers: {
|
|
5034
|
+
"Content-Type": "application/vnd.api+json",
|
|
5035
|
+
...options.headers
|
|
5036
|
+
}
|
|
5037
|
+
});
|
|
4629
5038
|
var getSocialMetricsPostBySocialPostId = (options) => (options.client ?? client).get({
|
|
4630
5039
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4631
5040
|
url: "/social/metrics/post/{social_post_id}",
|
|
@@ -4728,6 +5137,20 @@ var patchExtractionResultsByIdRegenerate = (options) => (options.client ?? clien
|
|
|
4728
5137
|
...options.headers
|
|
4729
5138
|
}
|
|
4730
5139
|
});
|
|
5140
|
+
var getClinicalClientSupplements = (options) => (options.client ?? client).get({
|
|
5141
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5142
|
+
url: "/clinical/client-supplements",
|
|
5143
|
+
...options
|
|
5144
|
+
});
|
|
5145
|
+
var postClinicalClientSupplements = (options) => (options.client ?? client).post({
|
|
5146
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5147
|
+
url: "/clinical/client-supplements",
|
|
5148
|
+
...options,
|
|
5149
|
+
headers: {
|
|
5150
|
+
"Content-Type": "application/vnd.api+json",
|
|
5151
|
+
...options.headers
|
|
5152
|
+
}
|
|
5153
|
+
});
|
|
4731
5154
|
var postUsersAuthConfirm = (options) => (options.client ?? client).post({
|
|
4732
5155
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4733
5156
|
url: "/users/auth/confirm",
|
|
@@ -4922,6 +5345,20 @@ var getExtractionDocumentsWorkspaceByWorkspaceId = (options) => (options.client
|
|
|
4922
5345
|
url: "/extraction/documents/workspace/{workspace_id}",
|
|
4923
5346
|
...options
|
|
4924
5347
|
});
|
|
5348
|
+
var getClinicalDeliveriesById = (options) => (options.client ?? client).get({
|
|
5349
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5350
|
+
url: "/clinical/deliveries/{id}",
|
|
5351
|
+
...options
|
|
5352
|
+
});
|
|
5353
|
+
var patchClinicalDeliveriesById = (options) => (options.client ?? client).patch({
|
|
5354
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5355
|
+
url: "/clinical/deliveries/{id}",
|
|
5356
|
+
...options,
|
|
5357
|
+
headers: {
|
|
5358
|
+
"Content-Type": "application/vnd.api+json",
|
|
5359
|
+
...options.headers
|
|
5360
|
+
}
|
|
5361
|
+
});
|
|
4925
5362
|
var postUsersAuthMagicLinkRequest = (options) => (options.client ?? client).post({
|
|
4926
5363
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4927
5364
|
url: "/users/auth/magic-link/request",
|
|
@@ -5123,6 +5560,20 @@ var getFeatureUsages = (options) => (options.client ?? client).get({
|
|
|
5123
5560
|
url: "/feature-usages",
|
|
5124
5561
|
...options
|
|
5125
5562
|
});
|
|
5563
|
+
var getClinicalMealPlans = (options) => (options.client ?? client).get({
|
|
5564
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5565
|
+
url: "/clinical/meal-plans",
|
|
5566
|
+
...options
|
|
5567
|
+
});
|
|
5568
|
+
var postClinicalMealPlans = (options) => (options.client ?? client).post({
|
|
5569
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5570
|
+
url: "/clinical/meal-plans",
|
|
5571
|
+
...options,
|
|
5572
|
+
headers: {
|
|
5573
|
+
"Content-Type": "application/vnd.api+json",
|
|
5574
|
+
...options.headers
|
|
5575
|
+
}
|
|
5576
|
+
});
|
|
5126
5577
|
var getAiMessages = (options) => (options.client ?? client).get({
|
|
5127
5578
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5128
5579
|
url: "/ai/messages",
|
|
@@ -5300,11 +5751,25 @@ var getAgentVersionsByIdRevisions = (options) => (options.client ?? client).get(
|
|
|
5300
5751
|
url: "/agent-versions/{id}/revisions",
|
|
5301
5752
|
...options
|
|
5302
5753
|
});
|
|
5754
|
+
var patchClinicalNotesByIdReject = (options) => (options.client ?? client).patch({
|
|
5755
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5756
|
+
url: "/clinical/notes/{id}/reject",
|
|
5757
|
+
...options,
|
|
5758
|
+
headers: {
|
|
5759
|
+
"Content-Type": "application/vnd.api+json",
|
|
5760
|
+
...options.headers
|
|
5761
|
+
}
|
|
5762
|
+
});
|
|
5303
5763
|
var getLegalDocumentsForApplication = (options) => (options.client ?? client).get({
|
|
5304
5764
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5305
5765
|
url: "/legal-documents/for-application",
|
|
5306
5766
|
...options
|
|
5307
5767
|
});
|
|
5768
|
+
var getClinicalPatientsByIdGoals = (options) => (options.client ?? client).get({
|
|
5769
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5770
|
+
url: "/clinical/patients/{id}/goals",
|
|
5771
|
+
...options
|
|
5772
|
+
});
|
|
5308
5773
|
var patchStorageFilesByIdTag = (options) => (options.client ?? client).patch({
|
|
5309
5774
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5310
5775
|
url: "/storage-files/{id}/tag",
|
|
@@ -6662,7 +7127,7 @@ function createAgentsNamespace(rb) {
|
|
|
6662
7127
|
*
|
|
6663
7128
|
* @example
|
|
6664
7129
|
* const sv = await client.agents.versions.schemaVersions.create('agt_01...', {
|
|
6665
|
-
*
|
|
7130
|
+
* output_schema: { type: 'object', properties: { amount: { type: 'number' } } },
|
|
6666
7131
|
* });
|
|
6667
7132
|
*/
|
|
6668
7133
|
create: async (agentId, attributes, options) => {
|
|
@@ -6704,7 +7169,7 @@ function createAgentsNamespace(rb) {
|
|
|
6704
7169
|
*
|
|
6705
7170
|
* @example
|
|
6706
7171
|
* await client.agents.versions.schemaVersions.update('agt_01...', 'ver_01...', {
|
|
6707
|
-
*
|
|
7172
|
+
* output_schema: { type: 'object', properties: { total: { type: 'number' } } },
|
|
6708
7173
|
* });
|
|
6709
7174
|
*/
|
|
6710
7175
|
update: async (agentId, versionId, attributes, options) => {
|
|
@@ -7266,10 +7731,10 @@ function createAgentsNamespace(rb) {
|
|
|
7266
7731
|
* @example
|
|
7267
7732
|
* await client.agents.executions.approve('exec_01...');
|
|
7268
7733
|
*/
|
|
7269
|
-
approve: async (id, options) => {
|
|
7734
|
+
approve: async (id, approvedData, options) => {
|
|
7270
7735
|
return rb.rawPost(
|
|
7271
7736
|
`/agent-executions/${id}/approve`,
|
|
7272
|
-
void 0,
|
|
7737
|
+
approvedData !== void 0 ? { approved_data: approvedData } : void 0,
|
|
7273
7738
|
options
|
|
7274
7739
|
);
|
|
7275
7740
|
},
|
|
@@ -9291,43 +9756,1143 @@ function createCatalogNamespace(rb) {
|
|
|
9291
9756
|
* console.log(node.attributes.name); // 'Apparel'
|
|
9292
9757
|
* ```
|
|
9293
9758
|
*/
|
|
9294
|
-
update: async (id, attributes, options) => {
|
|
9295
|
-
return rb.execute(
|
|
9296
|
-
patchCatalogTaxonomyNodesById,
|
|
9297
|
-
{
|
|
9298
|
-
path: { id },
|
|
9299
|
-
body: {
|
|
9300
|
-
data: { type: "catalog_taxonomy_node", id, attributes }
|
|
9301
|
-
}
|
|
9302
|
-
},
|
|
9303
|
-
options
|
|
9304
|
-
);
|
|
9305
|
-
},
|
|
9759
|
+
update: async (id, attributes, options) => {
|
|
9760
|
+
return rb.execute(
|
|
9761
|
+
patchCatalogTaxonomyNodesById,
|
|
9762
|
+
{
|
|
9763
|
+
path: { id },
|
|
9764
|
+
body: {
|
|
9765
|
+
data: { type: "catalog_taxonomy_node", id, attributes }
|
|
9766
|
+
}
|
|
9767
|
+
},
|
|
9768
|
+
options
|
|
9769
|
+
);
|
|
9770
|
+
},
|
|
9771
|
+
/**
|
|
9772
|
+
* Permanently delete a taxonomy node.
|
|
9773
|
+
*
|
|
9774
|
+
* If the node has child nodes, those children will also be removed
|
|
9775
|
+
* recursively. Ensure products are re-categorised before deleting a node
|
|
9776
|
+
* that has products assigned to it.
|
|
9777
|
+
*
|
|
9778
|
+
* @param id - The unique identifier of the node to delete.
|
|
9779
|
+
* @param options - Optional request-level overrides.
|
|
9780
|
+
* @returns A promise that resolves to `true` on successful deletion.
|
|
9781
|
+
*
|
|
9782
|
+
* @example
|
|
9783
|
+
* ```typescript
|
|
9784
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
9785
|
+
*
|
|
9786
|
+
* await client.catalog.taxonomyNodes.delete('node_abc123');
|
|
9787
|
+
* ```
|
|
9788
|
+
*/
|
|
9789
|
+
delete: async (id, options) => {
|
|
9790
|
+
return rb.executeDelete(
|
|
9791
|
+
deleteCatalogTaxonomyNodesById,
|
|
9792
|
+
{ path: { id } },
|
|
9793
|
+
options
|
|
9794
|
+
);
|
|
9795
|
+
}
|
|
9796
|
+
}
|
|
9797
|
+
};
|
|
9798
|
+
}
|
|
9799
|
+
|
|
9800
|
+
// src/namespaces/clinical.ts
|
|
9801
|
+
function createClinicalNamespace(rb) {
|
|
9802
|
+
return {
|
|
9803
|
+
/**
|
|
9804
|
+
* Manage clinical patients (end users of the platform's health service).
|
|
9805
|
+
*/
|
|
9806
|
+
patients: {
|
|
9807
|
+
/**
|
|
9808
|
+
* List patients in a workspace.
|
|
9809
|
+
*
|
|
9810
|
+
* @param params - Filter/pagination parameters (must include `filter[workspace_id]`)
|
|
9811
|
+
* @param options - Request options
|
|
9812
|
+
* @returns Array of {@link ClinicalPatient} records
|
|
9813
|
+
*
|
|
9814
|
+
* @example
|
|
9815
|
+
* ```typescript
|
|
9816
|
+
* const patients = await client.clinical.patients.list({
|
|
9817
|
+
* filter: { workspace_id: 'ws_123' },
|
|
9818
|
+
* });
|
|
9819
|
+
* ```
|
|
9820
|
+
*/
|
|
9821
|
+
list: async (params, options) => rb.execute(
|
|
9822
|
+
getClinicalPatients,
|
|
9823
|
+
params ?? {},
|
|
9824
|
+
options
|
|
9825
|
+
),
|
|
9826
|
+
/**
|
|
9827
|
+
* Get a single patient by ID.
|
|
9828
|
+
*
|
|
9829
|
+
* @param id - Patient UUID
|
|
9830
|
+
* @param options - Request options
|
|
9831
|
+
* @returns {@link ClinicalPatient} record
|
|
9832
|
+
*
|
|
9833
|
+
* @example
|
|
9834
|
+
* ```typescript
|
|
9835
|
+
* const patient = await client.clinical.patients.get('pat_abc123');
|
|
9836
|
+
* ```
|
|
9837
|
+
*/
|
|
9838
|
+
get: async (id, options) => rb.execute(
|
|
9839
|
+
getClinicalPatientsById,
|
|
9840
|
+
{ path: { id } },
|
|
9841
|
+
options
|
|
9842
|
+
),
|
|
9843
|
+
/**
|
|
9844
|
+
* Create a new clinical patient.
|
|
9845
|
+
*
|
|
9846
|
+
* @param attributes - Patient creation attributes. Must include `workspace_id`.
|
|
9847
|
+
* @param options - Request options
|
|
9848
|
+
* @returns Created {@link ClinicalPatient} record
|
|
9849
|
+
*
|
|
9850
|
+
* @example
|
|
9851
|
+
* ```typescript
|
|
9852
|
+
* const patient = await client.clinical.patients.create({
|
|
9853
|
+
* workspace_id: 'ws_123',
|
|
9854
|
+
* contact_id: 'contact_abc',
|
|
9855
|
+
* status: 'active',
|
|
9856
|
+
* });
|
|
9857
|
+
* ```
|
|
9858
|
+
*/
|
|
9859
|
+
create: async (attributes, options) => rb.execute(
|
|
9860
|
+
postClinicalPatients,
|
|
9861
|
+
{ body: { data: { type: "clinical-patient", attributes } } },
|
|
9862
|
+
options
|
|
9863
|
+
),
|
|
9864
|
+
/**
|
|
9865
|
+
* Update a clinical patient.
|
|
9866
|
+
*
|
|
9867
|
+
* @param id - Patient UUID
|
|
9868
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
9869
|
+
* @param options - Request options
|
|
9870
|
+
* @returns Updated {@link ClinicalPatient} record
|
|
9871
|
+
*
|
|
9872
|
+
* @example
|
|
9873
|
+
* ```typescript
|
|
9874
|
+
* const updated = await client.clinical.patients.update('pat_abc123', {
|
|
9875
|
+
* status: 'inactive',
|
|
9876
|
+
* });
|
|
9877
|
+
* ```
|
|
9878
|
+
*/
|
|
9879
|
+
update: async (id, attributes, options) => rb.execute(
|
|
9880
|
+
patchClinicalPatientsById,
|
|
9881
|
+
{
|
|
9882
|
+
path: { id },
|
|
9883
|
+
body: { data: { type: "clinical-patient", id, attributes } }
|
|
9884
|
+
},
|
|
9885
|
+
options
|
|
9886
|
+
),
|
|
9887
|
+
/**
|
|
9888
|
+
* Delete a clinical patient.
|
|
9889
|
+
*
|
|
9890
|
+
* @param id - Patient UUID
|
|
9891
|
+
* @param options - Request options
|
|
9892
|
+
* @returns `true` on successful deletion
|
|
9893
|
+
*
|
|
9894
|
+
* @example
|
|
9895
|
+
* ```typescript
|
|
9896
|
+
* await client.clinical.patients.delete('pat_abc123');
|
|
9897
|
+
* ```
|
|
9898
|
+
*/
|
|
9899
|
+
delete: async (id, options) => rb.executeDelete(deleteClinicalPatientsById, { path: { id } }, options),
|
|
9900
|
+
/**
|
|
9901
|
+
* List health metrics for a patient (related resource).
|
|
9902
|
+
*
|
|
9903
|
+
* @param patientId - Patient UUID
|
|
9904
|
+
* @param options - Request options
|
|
9905
|
+
* @returns Array of {@link ClinicalHealthMetric} records
|
|
9906
|
+
*/
|
|
9907
|
+
healthMetrics: async (patientId, options) => rb.execute(
|
|
9908
|
+
getClinicalPatientsByIdHealthMetrics,
|
|
9909
|
+
{ path: { id: patientId } },
|
|
9910
|
+
options
|
|
9911
|
+
),
|
|
9912
|
+
/**
|
|
9913
|
+
* List goals for a patient (related resource).
|
|
9914
|
+
*
|
|
9915
|
+
* @param patientId - Patient UUID
|
|
9916
|
+
* @param options - Request options
|
|
9917
|
+
* @returns Array of {@link ClinicalClientGoal} records
|
|
9918
|
+
*/
|
|
9919
|
+
goals: async (patientId, options) => rb.execute(
|
|
9920
|
+
getClinicalPatientsByIdGoals,
|
|
9921
|
+
{ path: { id: patientId } },
|
|
9922
|
+
options
|
|
9923
|
+
),
|
|
9924
|
+
/**
|
|
9925
|
+
* List supplements for a patient (related resource).
|
|
9926
|
+
*
|
|
9927
|
+
* @param patientId - Patient UUID
|
|
9928
|
+
* @param options - Request options
|
|
9929
|
+
* @returns Array of {@link ClinicalClientSupplement} records
|
|
9930
|
+
*/
|
|
9931
|
+
supplements: async (patientId, options) => rb.execute(
|
|
9932
|
+
getClinicalPatientsByIdSupplements,
|
|
9933
|
+
{ path: { id: patientId } },
|
|
9934
|
+
options
|
|
9935
|
+
),
|
|
9936
|
+
/**
|
|
9937
|
+
* List resource assignments for a patient (related resource).
|
|
9938
|
+
*
|
|
9939
|
+
* @param patientId - Patient UUID
|
|
9940
|
+
* @param options - Request options
|
|
9941
|
+
* @returns Array of {@link ClinicalClientResourceAssignment} records
|
|
9942
|
+
*/
|
|
9943
|
+
resourceAssignments: async (patientId, options) => rb.execute(
|
|
9944
|
+
getClinicalPatientsByIdResourceAssignments,
|
|
9945
|
+
{ path: { id: patientId } },
|
|
9946
|
+
options
|
|
9947
|
+
),
|
|
9948
|
+
/**
|
|
9949
|
+
* Get patient adherence summary for a given period.
|
|
9950
|
+
*
|
|
9951
|
+
* Returns goal completion rates and health metric tracking stats.
|
|
9952
|
+
*
|
|
9953
|
+
* @param patientId - Patient UUID
|
|
9954
|
+
* @param workspaceId - Workspace UUID (required)
|
|
9955
|
+
* @param days - Number of days to look back (default: 30, max: 365)
|
|
9956
|
+
* @param options - Request options
|
|
9957
|
+
* @returns {@link PatientAdherenceResponse} with goal and metric breakdowns
|
|
9958
|
+
*
|
|
9959
|
+
* @example
|
|
9960
|
+
* ```typescript
|
|
9961
|
+
* const adherence = await client.clinical.patients.getAdherence(
|
|
9962
|
+
* 'pat_abc123',
|
|
9963
|
+
* 'ws_123',
|
|
9964
|
+
* 30,
|
|
9965
|
+
* );
|
|
9966
|
+
* console.log(adherence.goals.completion_rate); // 0.75
|
|
9967
|
+
* ```
|
|
9968
|
+
*/
|
|
9969
|
+
getAdherence: async (patientId, workspaceId, days, options) => {
|
|
9970
|
+
const qs = new URLSearchParams({ workspace_id: workspaceId });
|
|
9971
|
+
if (days !== void 0) qs.set("days", String(days));
|
|
9972
|
+
return rb.rawGet(
|
|
9973
|
+
`/clinical/patients/${patientId}/adherence?${qs.toString()}`,
|
|
9974
|
+
options
|
|
9975
|
+
);
|
|
9976
|
+
}
|
|
9977
|
+
},
|
|
9978
|
+
/**
|
|
9979
|
+
* Manage clinical sessions (practitioner–patient encounters).
|
|
9980
|
+
*/
|
|
9981
|
+
sessions: {
|
|
9982
|
+
/**
|
|
9983
|
+
* List sessions in a workspace.
|
|
9984
|
+
*
|
|
9985
|
+
* @param params - Filter/pagination parameters
|
|
9986
|
+
* @param options - Request options
|
|
9987
|
+
* @returns Array of {@link ClinicalSession} records
|
|
9988
|
+
*/
|
|
9989
|
+
list: async (params, options) => rb.execute(
|
|
9990
|
+
getClinicalSessions,
|
|
9991
|
+
params ?? {},
|
|
9992
|
+
options
|
|
9993
|
+
),
|
|
9994
|
+
/**
|
|
9995
|
+
* Get a single session by ID.
|
|
9996
|
+
*
|
|
9997
|
+
* @param id - Session UUID
|
|
9998
|
+
* @param options - Request options
|
|
9999
|
+
* @returns {@link ClinicalSession} record
|
|
10000
|
+
*/
|
|
10001
|
+
get: async (id, options) => rb.execute(
|
|
10002
|
+
getClinicalSessionsById,
|
|
10003
|
+
{ path: { id } },
|
|
10004
|
+
options
|
|
10005
|
+
),
|
|
10006
|
+
/**
|
|
10007
|
+
* Create a new clinical session.
|
|
10008
|
+
*
|
|
10009
|
+
* @param attributes - Session creation attributes. Must include `workspace_id` and `patient_id`.
|
|
10010
|
+
* @param options - Request options
|
|
10011
|
+
* @returns Created {@link ClinicalSession} record
|
|
10012
|
+
*/
|
|
10013
|
+
create: async (attributes, options) => rb.execute(
|
|
10014
|
+
postClinicalSessions,
|
|
10015
|
+
{ body: { data: { type: "clinical-session", attributes } } },
|
|
10016
|
+
options
|
|
10017
|
+
),
|
|
10018
|
+
/**
|
|
10019
|
+
* Update a clinical session.
|
|
10020
|
+
*
|
|
10021
|
+
* @param id - Session UUID
|
|
10022
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10023
|
+
* @param options - Request options
|
|
10024
|
+
* @returns Updated {@link ClinicalSession} record
|
|
10025
|
+
*/
|
|
10026
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10027
|
+
patchClinicalSessionsById,
|
|
10028
|
+
{
|
|
10029
|
+
path: { id },
|
|
10030
|
+
body: { data: { type: "clinical-session", id, attributes } }
|
|
10031
|
+
},
|
|
10032
|
+
options
|
|
10033
|
+
),
|
|
10034
|
+
/**
|
|
10035
|
+
* Delete a clinical session.
|
|
10036
|
+
*
|
|
10037
|
+
* @param id - Session UUID
|
|
10038
|
+
* @param options - Request options
|
|
10039
|
+
* @returns `true` on successful deletion
|
|
10040
|
+
*/
|
|
10041
|
+
delete: async (id, options) => rb.executeDelete(deleteClinicalSessionsById, { path: { id } }, options),
|
|
10042
|
+
/**
|
|
10043
|
+
* List notes for a session (related resource).
|
|
10044
|
+
*
|
|
10045
|
+
* @param sessionId - Session UUID
|
|
10046
|
+
* @param options - Request options
|
|
10047
|
+
* @returns Array of {@link ClinicalNote} records
|
|
10048
|
+
*/
|
|
10049
|
+
notes: async (sessionId, options) => rb.execute(
|
|
10050
|
+
getClinicalSessionsByIdSessionNotes,
|
|
10051
|
+
{ path: { id: sessionId } },
|
|
10052
|
+
options
|
|
10053
|
+
),
|
|
10054
|
+
/**
|
|
10055
|
+
* List meal plans for a session (related resource).
|
|
10056
|
+
*
|
|
10057
|
+
* @param sessionId - Session UUID
|
|
10058
|
+
* @param options - Request options
|
|
10059
|
+
* @returns Array of {@link ClinicalMealPlan} records
|
|
10060
|
+
*/
|
|
10061
|
+
mealPlans: async (sessionId, options) => rb.execute(
|
|
10062
|
+
getClinicalSessionsByIdMealPlans,
|
|
10063
|
+
{ path: { id: sessionId } },
|
|
10064
|
+
options
|
|
10065
|
+
),
|
|
10066
|
+
/**
|
|
10067
|
+
* Trigger the AI processing pipeline for a session.
|
|
10068
|
+
*
|
|
10069
|
+
* Processes the session transcript to extract clinical insights and generate notes.
|
|
10070
|
+
* Returns immediately with an execution ID; poll `client.agents.executions.get(id)` for results.
|
|
10071
|
+
*
|
|
10072
|
+
* @param sessionId - Session UUID
|
|
10073
|
+
* @param workspaceId - Workspace UUID
|
|
10074
|
+
* @param options - Request options
|
|
10075
|
+
* @returns {@link TriggerPipelineResponse} with execution_id (may be null if pipeline not configured)
|
|
10076
|
+
*
|
|
10077
|
+
* @example
|
|
10078
|
+
* ```typescript
|
|
10079
|
+
* const { execution_id } = await client.clinical.sessions.triggerPipeline(
|
|
10080
|
+
* 'sess_xyz',
|
|
10081
|
+
* 'ws_123',
|
|
10082
|
+
* );
|
|
10083
|
+
* ```
|
|
10084
|
+
*/
|
|
10085
|
+
triggerPipeline: async (sessionId, workspaceId, options) => rb.rawPost(
|
|
10086
|
+
`/clinical/sessions/${sessionId}/trigger-pipeline`,
|
|
10087
|
+
{ workspace_id: workspaceId },
|
|
10088
|
+
options
|
|
10089
|
+
)
|
|
10090
|
+
},
|
|
10091
|
+
/**
|
|
10092
|
+
* Manage clinical notes (SOAP notes, progress notes, AI-generated summaries).
|
|
10093
|
+
*
|
|
10094
|
+
* Notes support a HITL (Human-In-The-Loop) approval workflow: AI-generated
|
|
10095
|
+
* notes start with `status: "pending_review"` and must be approved or rejected
|
|
10096
|
+
* by a clinician before they are finalized.
|
|
10097
|
+
*/
|
|
10098
|
+
notes: {
|
|
10099
|
+
/**
|
|
10100
|
+
* List notes, optionally filtered by patient or session.
|
|
10101
|
+
*
|
|
10102
|
+
* @param params - Filter/pagination parameters
|
|
10103
|
+
* @param options - Request options
|
|
10104
|
+
* @returns Array of {@link ClinicalNote} records
|
|
10105
|
+
*/
|
|
10106
|
+
list: async (params, options) => rb.execute(getClinicalNotes, params ?? {}, options),
|
|
10107
|
+
/**
|
|
10108
|
+
* Get a single note by ID.
|
|
10109
|
+
*
|
|
10110
|
+
* @param id - Note UUID
|
|
10111
|
+
* @param options - Request options
|
|
10112
|
+
* @returns {@link ClinicalNote} record
|
|
10113
|
+
*/
|
|
10114
|
+
get: async (id, options) => rb.execute(
|
|
10115
|
+
getClinicalNotesById,
|
|
10116
|
+
{ path: { id } },
|
|
10117
|
+
options
|
|
10118
|
+
),
|
|
10119
|
+
/**
|
|
10120
|
+
* Create a new clinical note.
|
|
10121
|
+
*
|
|
10122
|
+
* @param attributes - Note creation attributes. Must include `workspace_id`, `patient_id`, and `content`.
|
|
10123
|
+
* @param options - Request options
|
|
10124
|
+
* @returns Created {@link ClinicalNote} record
|
|
10125
|
+
*/
|
|
10126
|
+
create: async (attributes, options) => rb.execute(
|
|
10127
|
+
postClinicalNotes,
|
|
10128
|
+
{ body: { data: { type: "clinical-note", attributes } } },
|
|
10129
|
+
options
|
|
10130
|
+
),
|
|
10131
|
+
/**
|
|
10132
|
+
* Update a clinical note.
|
|
10133
|
+
*
|
|
10134
|
+
* @param id - Note UUID
|
|
10135
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10136
|
+
* @param options - Request options
|
|
10137
|
+
* @returns Updated {@link ClinicalNote} record
|
|
10138
|
+
*/
|
|
10139
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10140
|
+
patchClinicalNotesById,
|
|
10141
|
+
{
|
|
10142
|
+
path: { id },
|
|
10143
|
+
body: { data: { type: "clinical-note", id, attributes } }
|
|
10144
|
+
},
|
|
10145
|
+
options
|
|
10146
|
+
),
|
|
10147
|
+
/**
|
|
10148
|
+
* Delete a clinical note.
|
|
10149
|
+
*
|
|
10150
|
+
* @param id - Note UUID
|
|
10151
|
+
* @param options - Request options
|
|
10152
|
+
* @returns `true` on successful deletion
|
|
10153
|
+
*/
|
|
10154
|
+
delete: async (id, options) => rb.executeDelete(deleteClinicalNotesById, { path: { id } }, options),
|
|
10155
|
+
/**
|
|
10156
|
+
* Approve a clinical note (HITL workflow).
|
|
10157
|
+
*
|
|
10158
|
+
* Marks the note as clinician-reviewed and approved, transitioning it
|
|
10159
|
+
* to `status: "approved"`. Only notes in `pending_review` status can be approved.
|
|
10160
|
+
*
|
|
10161
|
+
* @param id - Note UUID
|
|
10162
|
+
* @param options - Request options
|
|
10163
|
+
* @returns Updated {@link ClinicalNote} record
|
|
10164
|
+
*
|
|
10165
|
+
* @example
|
|
10166
|
+
* ```typescript
|
|
10167
|
+
* const approved = await client.clinical.notes.approve('note_abc');
|
|
10168
|
+
* console.log(approved.attributes.status); // 'approved'
|
|
10169
|
+
* ```
|
|
10170
|
+
*/
|
|
10171
|
+
approve: async (id, options) => rb.execute(
|
|
10172
|
+
patchClinicalNotesByIdApprove,
|
|
10173
|
+
{ path: { id } },
|
|
10174
|
+
options
|
|
10175
|
+
),
|
|
10176
|
+
/**
|
|
10177
|
+
* Reject a clinical note (HITL workflow).
|
|
10178
|
+
*
|
|
10179
|
+
* Marks the note as rejected, transitioning it to `status: "rejected"`.
|
|
10180
|
+
* Only notes in `pending_review` status can be rejected.
|
|
10181
|
+
*
|
|
10182
|
+
* @param id - Note UUID
|
|
10183
|
+
* @param options - Request options
|
|
10184
|
+
* @returns Updated {@link ClinicalNote} record
|
|
10185
|
+
*
|
|
10186
|
+
* @example
|
|
10187
|
+
* ```typescript
|
|
10188
|
+
* const rejected = await client.clinical.notes.reject('note_abc');
|
|
10189
|
+
* console.log(rejected.attributes.status); // 'rejected'
|
|
10190
|
+
* ```
|
|
10191
|
+
*/
|
|
10192
|
+
reject: async (id, options) => rb.execute(
|
|
10193
|
+
patchClinicalNotesByIdReject,
|
|
10194
|
+
{ path: { id } },
|
|
10195
|
+
options
|
|
10196
|
+
),
|
|
10197
|
+
/**
|
|
10198
|
+
* List versions for a note (related resource).
|
|
10199
|
+
*
|
|
10200
|
+
* Each edit to an approved note creates a version record for audit purposes.
|
|
10201
|
+
*
|
|
10202
|
+
* @param noteId - Note UUID
|
|
10203
|
+
* @param options - Request options
|
|
10204
|
+
* @returns Array of {@link ClinicalNoteVersion} records
|
|
10205
|
+
*/
|
|
10206
|
+
versions: async (noteId, options) => rb.execute(
|
|
10207
|
+
getClinicalNotesByNoteIdVersions,
|
|
10208
|
+
{ path: { note_id: noteId } },
|
|
10209
|
+
options
|
|
10210
|
+
),
|
|
10211
|
+
/**
|
|
10212
|
+
* Get a specific note version.
|
|
10213
|
+
*
|
|
10214
|
+
* @param noteId - Note UUID
|
|
10215
|
+
* @param versionId - NoteVersion UUID
|
|
10216
|
+
* @param options - Request options
|
|
10217
|
+
* @returns {@link ClinicalNoteVersion} record
|
|
10218
|
+
*/
|
|
10219
|
+
getVersion: async (noteId, versionId, options) => rb.execute(
|
|
10220
|
+
getClinicalNotesByNoteIdVersionsById,
|
|
10221
|
+
{ path: { note_id: noteId, id: versionId } },
|
|
10222
|
+
options
|
|
10223
|
+
)
|
|
10224
|
+
},
|
|
10225
|
+
/**
|
|
10226
|
+
* Manage clinical health metrics (weight, blood pressure, glucose, etc.).
|
|
10227
|
+
*/
|
|
10228
|
+
healthMetrics: {
|
|
10229
|
+
/**
|
|
10230
|
+
* List health metrics, filtered by patient/workspace/date range.
|
|
10231
|
+
*
|
|
10232
|
+
* @param params - Filter/pagination parameters
|
|
10233
|
+
* @param options - Request options
|
|
10234
|
+
* @returns Array of {@link ClinicalHealthMetric} records
|
|
10235
|
+
*/
|
|
10236
|
+
list: async (params, options) => rb.execute(
|
|
10237
|
+
getClinicalHealthMetrics,
|
|
10238
|
+
params ?? {},
|
|
10239
|
+
options
|
|
10240
|
+
),
|
|
10241
|
+
/**
|
|
10242
|
+
* Get a single health metric by ID.
|
|
10243
|
+
*
|
|
10244
|
+
* @param id - HealthMetric UUID
|
|
10245
|
+
* @param options - Request options
|
|
10246
|
+
* @returns {@link ClinicalHealthMetric} record
|
|
10247
|
+
*/
|
|
10248
|
+
get: async (id, options) => rb.execute(
|
|
10249
|
+
getClinicalHealthMetricsById,
|
|
10250
|
+
{ path: { id } },
|
|
10251
|
+
options
|
|
10252
|
+
),
|
|
10253
|
+
/**
|
|
10254
|
+
* Record a new health metric entry.
|
|
10255
|
+
*
|
|
10256
|
+
* @param attributes - Metric creation attributes. Must include `workspace_id`, `patient_id`,
|
|
10257
|
+
* `metric_category`, `metric_name`, and `value`.
|
|
10258
|
+
* @param options - Request options
|
|
10259
|
+
* @returns Created {@link ClinicalHealthMetric} record
|
|
10260
|
+
*
|
|
10261
|
+
* @example
|
|
10262
|
+
* ```typescript
|
|
10263
|
+
* const metric = await client.clinical.healthMetrics.create({
|
|
10264
|
+
* workspace_id: 'ws_123',
|
|
10265
|
+
* patient_id: 'pat_abc',
|
|
10266
|
+
* metric_category: 'vitals',
|
|
10267
|
+
* metric_name: 'weight_kg',
|
|
10268
|
+
* value: 82.5,
|
|
10269
|
+
* unit: 'kg',
|
|
10270
|
+
* });
|
|
10271
|
+
* ```
|
|
10272
|
+
*/
|
|
10273
|
+
create: async (attributes, options) => rb.execute(
|
|
10274
|
+
postClinicalHealthMetrics,
|
|
10275
|
+
{ body: { data: { type: "clinical-health-metric", attributes } } },
|
|
10276
|
+
options
|
|
10277
|
+
),
|
|
10278
|
+
/**
|
|
10279
|
+
* Update a health metric entry.
|
|
10280
|
+
*
|
|
10281
|
+
* @param id - HealthMetric UUID
|
|
10282
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10283
|
+
* @param options - Request options
|
|
10284
|
+
* @returns Updated {@link ClinicalHealthMetric} record
|
|
10285
|
+
*/
|
|
10286
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10287
|
+
patchClinicalHealthMetricsById,
|
|
10288
|
+
{
|
|
10289
|
+
path: { id },
|
|
10290
|
+
body: { data: { type: "clinical-health-metric", id, attributes } }
|
|
10291
|
+
},
|
|
10292
|
+
options
|
|
10293
|
+
),
|
|
10294
|
+
/**
|
|
10295
|
+
* Delete a health metric entry.
|
|
10296
|
+
*
|
|
10297
|
+
* @param id - HealthMetric UUID
|
|
10298
|
+
* @param options - Request options
|
|
10299
|
+
* @returns `true` on successful deletion
|
|
10300
|
+
*/
|
|
10301
|
+
delete: async (id, options) => rb.executeDelete(
|
|
10302
|
+
deleteClinicalHealthMetricsById,
|
|
10303
|
+
{ path: { id } },
|
|
10304
|
+
options
|
|
10305
|
+
)
|
|
10306
|
+
},
|
|
10307
|
+
/**
|
|
10308
|
+
* Manage meal plans for clinical patients.
|
|
10309
|
+
*/
|
|
10310
|
+
mealPlans: {
|
|
10311
|
+
/**
|
|
10312
|
+
* List meal plans, filtered by patient/workspace.
|
|
10313
|
+
*
|
|
10314
|
+
* @param params - Filter/pagination parameters
|
|
10315
|
+
* @param options - Request options
|
|
10316
|
+
* @returns Array of {@link ClinicalMealPlan} records
|
|
10317
|
+
*/
|
|
10318
|
+
list: async (params, options) => rb.execute(
|
|
10319
|
+
getClinicalMealPlans,
|
|
10320
|
+
params ?? {},
|
|
10321
|
+
options
|
|
10322
|
+
),
|
|
10323
|
+
/**
|
|
10324
|
+
* Get a single meal plan by ID.
|
|
10325
|
+
*
|
|
10326
|
+
* @param id - MealPlan UUID
|
|
10327
|
+
* @param options - Request options
|
|
10328
|
+
* @returns {@link ClinicalMealPlan} record
|
|
10329
|
+
*/
|
|
10330
|
+
get: async (id, options) => rb.execute(
|
|
10331
|
+
getClinicalMealPlansById,
|
|
10332
|
+
{ path: { id } },
|
|
10333
|
+
options
|
|
10334
|
+
),
|
|
10335
|
+
/**
|
|
10336
|
+
* Create a new meal plan.
|
|
10337
|
+
*
|
|
10338
|
+
* @param attributes - Meal plan creation attributes. Must include `workspace_id`, `patient_id`, and `title`.
|
|
10339
|
+
* @param options - Request options
|
|
10340
|
+
* @returns Created {@link ClinicalMealPlan} record
|
|
10341
|
+
*/
|
|
10342
|
+
create: async (attributes, options) => rb.execute(
|
|
10343
|
+
postClinicalMealPlans,
|
|
10344
|
+
{ body: { data: { type: "clinical-meal-plan", attributes } } },
|
|
10345
|
+
options
|
|
10346
|
+
),
|
|
10347
|
+
/**
|
|
10348
|
+
* Update a meal plan.
|
|
10349
|
+
*
|
|
10350
|
+
* @param id - MealPlan UUID
|
|
10351
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10352
|
+
* @param options - Request options
|
|
10353
|
+
* @returns Updated {@link ClinicalMealPlan} record
|
|
10354
|
+
*/
|
|
10355
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10356
|
+
patchClinicalMealPlansById,
|
|
10357
|
+
{
|
|
10358
|
+
path: { id },
|
|
10359
|
+
body: { data: { type: "clinical-meal-plan", id, attributes } }
|
|
10360
|
+
},
|
|
10361
|
+
options
|
|
10362
|
+
),
|
|
10363
|
+
/**
|
|
10364
|
+
* Delete a meal plan.
|
|
10365
|
+
*
|
|
10366
|
+
* @param id - MealPlan UUID
|
|
10367
|
+
* @param options - Request options
|
|
10368
|
+
* @returns `true` on successful deletion
|
|
10369
|
+
*/
|
|
10370
|
+
delete: async (id, options) => rb.executeDelete(
|
|
10371
|
+
deleteClinicalMealPlansById,
|
|
10372
|
+
{ path: { id } },
|
|
10373
|
+
options
|
|
10374
|
+
)
|
|
10375
|
+
},
|
|
10376
|
+
/**
|
|
10377
|
+
* Manage client goals (therapeutic targets and wellness milestones).
|
|
10378
|
+
*/
|
|
10379
|
+
clientGoals: {
|
|
10380
|
+
/**
|
|
10381
|
+
* List client goals, filtered by patient/workspace.
|
|
10382
|
+
*
|
|
10383
|
+
* @param params - Filter/pagination parameters
|
|
10384
|
+
* @param options - Request options
|
|
10385
|
+
* @returns Array of {@link ClinicalClientGoal} records
|
|
10386
|
+
*/
|
|
10387
|
+
list: async (params, options) => rb.execute(
|
|
10388
|
+
getClinicalClientGoals,
|
|
10389
|
+
params ?? {},
|
|
10390
|
+
options
|
|
10391
|
+
),
|
|
10392
|
+
/**
|
|
10393
|
+
* Get a single client goal by ID.
|
|
10394
|
+
*
|
|
10395
|
+
* @param id - ClientGoal UUID
|
|
10396
|
+
* @param options - Request options
|
|
10397
|
+
* @returns {@link ClinicalClientGoal} record
|
|
10398
|
+
*/
|
|
10399
|
+
get: async (id, options) => rb.execute(
|
|
10400
|
+
getClinicalClientGoalsById,
|
|
10401
|
+
{ path: { id } },
|
|
10402
|
+
options
|
|
10403
|
+
),
|
|
10404
|
+
/**
|
|
10405
|
+
* Create a new client goal.
|
|
10406
|
+
*
|
|
10407
|
+
* @param attributes - Goal creation attributes. Must include `workspace_id`, `patient_id`, and `title`.
|
|
10408
|
+
* @param options - Request options
|
|
10409
|
+
* @returns Created {@link ClinicalClientGoal} record
|
|
10410
|
+
*/
|
|
10411
|
+
create: async (attributes, options) => rb.execute(
|
|
10412
|
+
postClinicalClientGoals,
|
|
10413
|
+
{ body: { data: { type: "clinical-client-goal", attributes } } },
|
|
10414
|
+
options
|
|
10415
|
+
),
|
|
10416
|
+
/**
|
|
10417
|
+
* Update a client goal.
|
|
10418
|
+
*
|
|
10419
|
+
* @param id - ClientGoal UUID
|
|
10420
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10421
|
+
* @param options - Request options
|
|
10422
|
+
* @returns Updated {@link ClinicalClientGoal} record
|
|
10423
|
+
*/
|
|
10424
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10425
|
+
patchClinicalClientGoalsById,
|
|
10426
|
+
{
|
|
10427
|
+
path: { id },
|
|
10428
|
+
body: { data: { type: "clinical-client-goal", id, attributes } }
|
|
10429
|
+
},
|
|
10430
|
+
options
|
|
10431
|
+
),
|
|
10432
|
+
/**
|
|
10433
|
+
* Delete a client goal.
|
|
10434
|
+
*
|
|
10435
|
+
* @param id - ClientGoal UUID
|
|
10436
|
+
* @param options - Request options
|
|
10437
|
+
* @returns `true` on successful deletion
|
|
10438
|
+
*/
|
|
10439
|
+
delete: async (id, options) => rb.executeDelete(
|
|
10440
|
+
deleteClinicalClientGoalsById,
|
|
10441
|
+
{ path: { id } },
|
|
10442
|
+
options
|
|
10443
|
+
)
|
|
10444
|
+
},
|
|
10445
|
+
/**
|
|
10446
|
+
* Manage supplement prescriptions for clinical patients.
|
|
10447
|
+
*/
|
|
10448
|
+
clientSupplements: {
|
|
10449
|
+
/**
|
|
10450
|
+
* List supplement prescriptions, filtered by patient/workspace.
|
|
10451
|
+
*
|
|
10452
|
+
* @param params - Filter/pagination parameters
|
|
10453
|
+
* @param options - Request options
|
|
10454
|
+
* @returns Array of {@link ClinicalClientSupplement} records
|
|
10455
|
+
*/
|
|
10456
|
+
list: async (params, options) => rb.execute(
|
|
10457
|
+
getClinicalClientSupplements,
|
|
10458
|
+
params ?? {},
|
|
10459
|
+
options
|
|
10460
|
+
),
|
|
10461
|
+
/**
|
|
10462
|
+
* Get a single supplement prescription by ID.
|
|
10463
|
+
*
|
|
10464
|
+
* @param id - ClientSupplement UUID
|
|
10465
|
+
* @param options - Request options
|
|
10466
|
+
* @returns {@link ClinicalClientSupplement} record
|
|
10467
|
+
*/
|
|
10468
|
+
get: async (id, options) => rb.execute(
|
|
10469
|
+
getClinicalClientSupplementsById,
|
|
10470
|
+
{ path: { id } },
|
|
10471
|
+
options
|
|
10472
|
+
),
|
|
10473
|
+
/**
|
|
10474
|
+
* Create a new supplement prescription.
|
|
10475
|
+
*
|
|
10476
|
+
* @param attributes - Supplement creation attributes. Must include `workspace_id`,
|
|
10477
|
+
* `patient_id`, and `supplement_name`.
|
|
10478
|
+
* @param options - Request options
|
|
10479
|
+
* @returns Created {@link ClinicalClientSupplement} record
|
|
10480
|
+
*/
|
|
10481
|
+
create: async (attributes, options) => rb.execute(
|
|
10482
|
+
postClinicalClientSupplements,
|
|
10483
|
+
{
|
|
10484
|
+
body: { data: { type: "clinical-client-supplement", attributes } }
|
|
10485
|
+
},
|
|
10486
|
+
options
|
|
10487
|
+
),
|
|
10488
|
+
/**
|
|
10489
|
+
* Update a supplement prescription.
|
|
10490
|
+
*
|
|
10491
|
+
* @param id - ClientSupplement UUID
|
|
10492
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10493
|
+
* @param options - Request options
|
|
10494
|
+
* @returns Updated {@link ClinicalClientSupplement} record
|
|
10495
|
+
*/
|
|
10496
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10497
|
+
patchClinicalClientSupplementsById,
|
|
10498
|
+
{
|
|
10499
|
+
path: { id },
|
|
10500
|
+
body: {
|
|
10501
|
+
data: { type: "clinical-client-supplement", id, attributes }
|
|
10502
|
+
}
|
|
10503
|
+
},
|
|
10504
|
+
options
|
|
10505
|
+
),
|
|
10506
|
+
/**
|
|
10507
|
+
* Delete a supplement prescription.
|
|
10508
|
+
*
|
|
10509
|
+
* @param id - ClientSupplement UUID
|
|
10510
|
+
* @param options - Request options
|
|
10511
|
+
* @returns `true` on successful deletion
|
|
10512
|
+
*/
|
|
10513
|
+
delete: async (id, options) => rb.executeDelete(
|
|
10514
|
+
deleteClinicalClientSupplementsById,
|
|
10515
|
+
{ path: { id } },
|
|
10516
|
+
options
|
|
10517
|
+
)
|
|
10518
|
+
},
|
|
10519
|
+
/**
|
|
10520
|
+
* Manage clinical deliveries (care plan items sent to patients).
|
|
10521
|
+
*/
|
|
10522
|
+
deliveries: {
|
|
10523
|
+
/**
|
|
10524
|
+
* List deliveries, filtered by patient/workspace.
|
|
10525
|
+
*
|
|
10526
|
+
* @param params - Filter/pagination parameters
|
|
10527
|
+
* @param options - Request options
|
|
10528
|
+
* @returns Array of {@link ClinicalDelivery} records
|
|
10529
|
+
*/
|
|
10530
|
+
list: async (params, options) => rb.execute(
|
|
10531
|
+
getClinicalDeliveries,
|
|
10532
|
+
params ?? {},
|
|
10533
|
+
options
|
|
10534
|
+
),
|
|
10535
|
+
/**
|
|
10536
|
+
* Get a single delivery by ID.
|
|
10537
|
+
*
|
|
10538
|
+
* @param id - Delivery UUID
|
|
10539
|
+
* @param options - Request options
|
|
10540
|
+
* @returns {@link ClinicalDelivery} record
|
|
10541
|
+
*/
|
|
10542
|
+
get: async (id, options) => rb.execute(
|
|
10543
|
+
getClinicalDeliveriesById,
|
|
10544
|
+
{ path: { id } },
|
|
10545
|
+
options
|
|
10546
|
+
),
|
|
10547
|
+
/**
|
|
10548
|
+
* Create a new delivery.
|
|
10549
|
+
*
|
|
10550
|
+
* @param attributes - Delivery creation attributes. Must include `workspace_id`,
|
|
10551
|
+
* `patient_id`, and `delivery_type`.
|
|
10552
|
+
* @param options - Request options
|
|
10553
|
+
* @returns Created {@link ClinicalDelivery} record
|
|
10554
|
+
*/
|
|
10555
|
+
create: async (attributes, options) => rb.execute(
|
|
10556
|
+
postClinicalDeliveries,
|
|
10557
|
+
{ body: { data: { type: "clinical-delivery", attributes } } },
|
|
10558
|
+
options
|
|
10559
|
+
),
|
|
10560
|
+
/**
|
|
10561
|
+
* Update a delivery (e.g., change status to `delivered`).
|
|
10562
|
+
*
|
|
10563
|
+
* @param id - Delivery UUID
|
|
10564
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10565
|
+
* @param options - Request options
|
|
10566
|
+
* @returns Updated {@link ClinicalDelivery} record
|
|
10567
|
+
*/
|
|
10568
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10569
|
+
patchClinicalDeliveriesById,
|
|
10570
|
+
{
|
|
10571
|
+
path: { id },
|
|
10572
|
+
body: { data: { type: "clinical-delivery", id, attributes } }
|
|
10573
|
+
},
|
|
10574
|
+
options
|
|
10575
|
+
)
|
|
10576
|
+
},
|
|
10577
|
+
/**
|
|
10578
|
+
* Manage practice-level educational resources.
|
|
10579
|
+
*/
|
|
10580
|
+
practiceResources: {
|
|
10581
|
+
/**
|
|
10582
|
+
* List practice resources in a workspace.
|
|
10583
|
+
*
|
|
10584
|
+
* @param params - Filter/pagination parameters
|
|
10585
|
+
* @param options - Request options
|
|
10586
|
+
* @returns Array of {@link ClinicalPracticeResource} records
|
|
10587
|
+
*/
|
|
10588
|
+
list: async (params, options) => rb.execute(
|
|
10589
|
+
getClinicalPracticeResources,
|
|
10590
|
+
params ?? {},
|
|
10591
|
+
options
|
|
10592
|
+
),
|
|
10593
|
+
/**
|
|
10594
|
+
* Get a single practice resource by ID.
|
|
10595
|
+
*
|
|
10596
|
+
* @param id - PracticeResource UUID
|
|
10597
|
+
* @param options - Request options
|
|
10598
|
+
* @returns {@link ClinicalPracticeResource} record
|
|
10599
|
+
*/
|
|
10600
|
+
get: async (id, options) => rb.execute(
|
|
10601
|
+
getClinicalPracticeResourcesById,
|
|
10602
|
+
{ path: { id } },
|
|
10603
|
+
options
|
|
10604
|
+
),
|
|
10605
|
+
/**
|
|
10606
|
+
* Create a new practice resource.
|
|
10607
|
+
*
|
|
10608
|
+
* @param attributes - Resource creation attributes. Must include `workspace_id` and `title`.
|
|
10609
|
+
* @param options - Request options
|
|
10610
|
+
* @returns Created {@link ClinicalPracticeResource} record
|
|
10611
|
+
*/
|
|
10612
|
+
create: async (attributes, options) => rb.execute(
|
|
10613
|
+
postClinicalPracticeResources,
|
|
10614
|
+
{
|
|
10615
|
+
body: { data: { type: "clinical-practice-resource", attributes } }
|
|
10616
|
+
},
|
|
10617
|
+
options
|
|
10618
|
+
),
|
|
10619
|
+
/**
|
|
10620
|
+
* Update a practice resource.
|
|
10621
|
+
*
|
|
10622
|
+
* @param id - PracticeResource UUID
|
|
10623
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10624
|
+
* @param options - Request options
|
|
10625
|
+
* @returns Updated {@link ClinicalPracticeResource} record
|
|
10626
|
+
*/
|
|
10627
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10628
|
+
patchClinicalPracticeResourcesById,
|
|
10629
|
+
{
|
|
10630
|
+
path: { id },
|
|
10631
|
+
body: {
|
|
10632
|
+
data: { type: "clinical-practice-resource", id, attributes }
|
|
10633
|
+
}
|
|
10634
|
+
},
|
|
10635
|
+
options
|
|
10636
|
+
),
|
|
10637
|
+
/**
|
|
10638
|
+
* Delete a practice resource.
|
|
10639
|
+
*
|
|
10640
|
+
* @param id - PracticeResource UUID
|
|
10641
|
+
* @param options - Request options
|
|
10642
|
+
* @returns `true` on successful deletion
|
|
10643
|
+
*/
|
|
10644
|
+
delete: async (id, options) => rb.executeDelete(
|
|
10645
|
+
deleteClinicalPracticeResourcesById,
|
|
10646
|
+
{ path: { id } },
|
|
10647
|
+
options
|
|
10648
|
+
)
|
|
10649
|
+
},
|
|
10650
|
+
/**
|
|
10651
|
+
* Manage practice-level assessment and therapeutic tools.
|
|
10652
|
+
*/
|
|
10653
|
+
practiceTools: {
|
|
10654
|
+
/**
|
|
10655
|
+
* List practice tools in a workspace.
|
|
10656
|
+
*
|
|
10657
|
+
* @param params - Filter/pagination parameters
|
|
10658
|
+
* @param options - Request options
|
|
10659
|
+
* @returns Array of {@link ClinicalPracticeTool} records
|
|
10660
|
+
*/
|
|
10661
|
+
list: async (params, options) => rb.execute(
|
|
10662
|
+
getClinicalPracticeTools,
|
|
10663
|
+
params ?? {},
|
|
10664
|
+
options
|
|
10665
|
+
),
|
|
10666
|
+
/**
|
|
10667
|
+
* Get a single practice tool by ID.
|
|
10668
|
+
*
|
|
10669
|
+
* @param id - PracticeTool UUID
|
|
10670
|
+
* @param options - Request options
|
|
10671
|
+
* @returns {@link ClinicalPracticeTool} record
|
|
10672
|
+
*/
|
|
10673
|
+
get: async (id, options) => rb.execute(
|
|
10674
|
+
getClinicalPracticeToolsById,
|
|
10675
|
+
{ path: { id } },
|
|
10676
|
+
options
|
|
10677
|
+
),
|
|
10678
|
+
/**
|
|
10679
|
+
* Create a new practice tool.
|
|
10680
|
+
*
|
|
10681
|
+
* @param attributes - Tool creation attributes. Must include `workspace_id` and `name`.
|
|
10682
|
+
* @param options - Request options
|
|
10683
|
+
* @returns Created {@link ClinicalPracticeTool} record
|
|
10684
|
+
*/
|
|
10685
|
+
create: async (attributes, options) => rb.execute(
|
|
10686
|
+
postClinicalPracticeTools,
|
|
10687
|
+
{ body: { data: { type: "clinical-practice-tool", attributes } } },
|
|
10688
|
+
options
|
|
10689
|
+
),
|
|
10690
|
+
/**
|
|
10691
|
+
* Update a practice tool.
|
|
10692
|
+
*
|
|
10693
|
+
* @param id - PracticeTool UUID
|
|
10694
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10695
|
+
* @param options - Request options
|
|
10696
|
+
* @returns Updated {@link ClinicalPracticeTool} record
|
|
10697
|
+
*/
|
|
10698
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10699
|
+
patchClinicalPracticeToolsById,
|
|
10700
|
+
{
|
|
10701
|
+
path: { id },
|
|
10702
|
+
body: { data: { type: "clinical-practice-tool", id, attributes } }
|
|
10703
|
+
},
|
|
10704
|
+
options
|
|
10705
|
+
),
|
|
10706
|
+
/**
|
|
10707
|
+
* Delete a practice tool.
|
|
10708
|
+
*
|
|
10709
|
+
* @param id - PracticeTool UUID
|
|
10710
|
+
* @param options - Request options
|
|
10711
|
+
* @returns `true` on successful deletion
|
|
10712
|
+
*/
|
|
10713
|
+
delete: async (id, options) => rb.executeDelete(
|
|
10714
|
+
deleteClinicalPracticeToolsById,
|
|
10715
|
+
{ path: { id } },
|
|
10716
|
+
options
|
|
10717
|
+
)
|
|
10718
|
+
},
|
|
10719
|
+
/**
|
|
10720
|
+
* Manage assignments of practice resources to patients.
|
|
10721
|
+
*/
|
|
10722
|
+
clientResourceAssignments: {
|
|
10723
|
+
/**
|
|
10724
|
+
* List resource assignments, filtered by patient/workspace.
|
|
10725
|
+
*
|
|
10726
|
+
* @param params - Filter/pagination parameters
|
|
10727
|
+
* @param options - Request options
|
|
10728
|
+
* @returns Array of {@link ClinicalClientResourceAssignment} records
|
|
10729
|
+
*/
|
|
10730
|
+
list: async (params, options) => rb.execute(
|
|
10731
|
+
getClinicalClientResourceAssignments,
|
|
10732
|
+
params ?? {},
|
|
10733
|
+
options
|
|
10734
|
+
),
|
|
10735
|
+
/**
|
|
10736
|
+
* Get a single resource assignment by ID.
|
|
10737
|
+
*
|
|
10738
|
+
* @param id - ClientResourceAssignment UUID
|
|
10739
|
+
* @param options - Request options
|
|
10740
|
+
* @returns {@link ClinicalClientResourceAssignment} record
|
|
10741
|
+
*/
|
|
10742
|
+
get: async (id, options) => rb.execute(
|
|
10743
|
+
getClinicalClientResourceAssignmentsById,
|
|
10744
|
+
{ path: { id } },
|
|
10745
|
+
options
|
|
10746
|
+
),
|
|
10747
|
+
/**
|
|
10748
|
+
* Assign a practice resource to a patient.
|
|
10749
|
+
*
|
|
10750
|
+
* @param attributes - Assignment creation attributes. Must include `workspace_id`,
|
|
10751
|
+
* `patient_id`, and `resource_id`.
|
|
10752
|
+
* @param options - Request options
|
|
10753
|
+
* @returns Created {@link ClinicalClientResourceAssignment} record
|
|
10754
|
+
*/
|
|
10755
|
+
create: async (attributes, options) => rb.execute(
|
|
10756
|
+
postClinicalClientResourceAssignments,
|
|
10757
|
+
{
|
|
10758
|
+
body: {
|
|
10759
|
+
data: { type: "clinical-client-resource-assignment", attributes }
|
|
10760
|
+
}
|
|
10761
|
+
},
|
|
10762
|
+
options
|
|
10763
|
+
),
|
|
10764
|
+
/**
|
|
10765
|
+
* Update a resource assignment (e.g., mark as completed).
|
|
10766
|
+
*
|
|
10767
|
+
* @param id - ClientResourceAssignment UUID
|
|
10768
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10769
|
+
* @param options - Request options
|
|
10770
|
+
* @returns Updated {@link ClinicalClientResourceAssignment} record
|
|
10771
|
+
*/
|
|
10772
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10773
|
+
patchClinicalClientResourceAssignmentsById,
|
|
10774
|
+
{
|
|
10775
|
+
path: { id },
|
|
10776
|
+
body: {
|
|
10777
|
+
data: {
|
|
10778
|
+
type: "clinical-client-resource-assignment",
|
|
10779
|
+
id,
|
|
10780
|
+
attributes
|
|
10781
|
+
}
|
|
10782
|
+
}
|
|
10783
|
+
},
|
|
10784
|
+
options
|
|
10785
|
+
),
|
|
10786
|
+
/**
|
|
10787
|
+
* Delete a resource assignment.
|
|
10788
|
+
*
|
|
10789
|
+
* @param id - ClientResourceAssignment UUID
|
|
10790
|
+
* @param options - Request options
|
|
10791
|
+
* @returns `true` on successful deletion
|
|
10792
|
+
*/
|
|
10793
|
+
delete: async (id, options) => rb.executeDelete(
|
|
10794
|
+
deleteClinicalClientResourceAssignmentsById,
|
|
10795
|
+
{ path: { id } },
|
|
10796
|
+
options
|
|
10797
|
+
)
|
|
10798
|
+
},
|
|
10799
|
+
/**
|
|
10800
|
+
* Read-only access to the AI-generated supplement recommendation cache.
|
|
10801
|
+
*
|
|
10802
|
+
* This resource is server-managed — entries are created and updated
|
|
10803
|
+
* exclusively by the AI post-session pipeline. Direct create/update
|
|
10804
|
+
* operations are not supported.
|
|
10805
|
+
*/
|
|
10806
|
+
supplementRecCache: {
|
|
10807
|
+
/**
|
|
10808
|
+
* List supplement recommendation cache entries, filtered by patient/workspace.
|
|
10809
|
+
*
|
|
10810
|
+
* @param params - Filter/pagination parameters
|
|
10811
|
+
* @param options - Request options
|
|
10812
|
+
* @returns Array of {@link ClinicalSupplementRecCache} records
|
|
10813
|
+
*/
|
|
10814
|
+
list: async (params, options) => rb.execute(
|
|
10815
|
+
getClinicalSupplementRecCache,
|
|
10816
|
+
params ?? {},
|
|
10817
|
+
options
|
|
10818
|
+
),
|
|
10819
|
+
/**
|
|
10820
|
+
* Get a single supplement recommendation cache entry by ID.
|
|
10821
|
+
*
|
|
10822
|
+
* @param id - SupplementRecCache UUID
|
|
10823
|
+
* @param options - Request options
|
|
10824
|
+
* @returns {@link ClinicalSupplementRecCache} record
|
|
10825
|
+
*/
|
|
10826
|
+
get: async (id, options) => rb.execute(
|
|
10827
|
+
getClinicalSupplementRecCacheById,
|
|
10828
|
+
{ path: { id } },
|
|
10829
|
+
options
|
|
10830
|
+
),
|
|
10831
|
+
/**
|
|
10832
|
+
* Generate supplement recommendations for a patient via the AI pipeline.
|
|
10833
|
+
*
|
|
10834
|
+
* Returns immediately with an execution ID; poll executions for results.
|
|
10835
|
+
* The AI pipeline populates the supplement recommendation cache entries
|
|
10836
|
+
* once the execution completes.
|
|
10837
|
+
*
|
|
10838
|
+
* @param patientId - Patient UUID
|
|
10839
|
+
* @param sessionId - Session UUID to base recommendations on
|
|
10840
|
+
* @param workspaceId - Workspace UUID
|
|
10841
|
+
* @param options - Request options
|
|
10842
|
+
* @returns {@link GenerateSupplementRecsResponse} with execution_id
|
|
10843
|
+
*
|
|
10844
|
+
* @example
|
|
10845
|
+
* ```typescript
|
|
10846
|
+
* const { execution_id } = await client.clinical.supplementRecCache.generate(
|
|
10847
|
+
* 'pat_abc123',
|
|
10848
|
+
* 'sess_xyz',
|
|
10849
|
+
* 'ws_123',
|
|
10850
|
+
* );
|
|
10851
|
+
* ```
|
|
10852
|
+
*/
|
|
10853
|
+
generate: async (patientId, sessionId, workspaceId, options) => rb.rawPost(
|
|
10854
|
+
`/clinical/patients/${patientId}/supplement-recommendations/generate`,
|
|
10855
|
+
{ session_id: sessionId, workspace_id: workspaceId },
|
|
10856
|
+
options
|
|
10857
|
+
),
|
|
9306
10858
|
/**
|
|
9307
|
-
*
|
|
10859
|
+
* Delete a supplement recommendation cache entry.
|
|
9308
10860
|
*
|
|
9309
|
-
*
|
|
9310
|
-
*
|
|
9311
|
-
*
|
|
10861
|
+
* @param id - SupplementRecCache UUID
|
|
10862
|
+
* @param options - Request options
|
|
10863
|
+
* @returns `true` on successful deletion
|
|
10864
|
+
*/
|
|
10865
|
+
delete: async (id, options) => rb.executeDelete(
|
|
10866
|
+
deleteClinicalSupplementRecCacheById,
|
|
10867
|
+
{ path: { id } },
|
|
10868
|
+
options
|
|
10869
|
+
)
|
|
10870
|
+
},
|
|
10871
|
+
/**
|
|
10872
|
+
* Recipe search via configured Edamam connector.
|
|
10873
|
+
*/
|
|
10874
|
+
recipes: {
|
|
10875
|
+
/**
|
|
10876
|
+
* Search recipes using a connected Edamam API integration.
|
|
9312
10877
|
*
|
|
9313
|
-
*
|
|
9314
|
-
*
|
|
9315
|
-
*
|
|
10878
|
+
* Requires an Edamam connector to be configured in the workspace.
|
|
10879
|
+
* Returns raw Edamam API response data.
|
|
10880
|
+
*
|
|
10881
|
+
* @param params - Search parameters. Must include `query`, `connector_id`, and `workspace_id`.
|
|
10882
|
+
* @param options - Request options
|
|
10883
|
+
* @returns Edamam API search results
|
|
9316
10884
|
*
|
|
9317
10885
|
* @example
|
|
9318
10886
|
* ```typescript
|
|
9319
|
-
* const
|
|
9320
|
-
*
|
|
9321
|
-
*
|
|
10887
|
+
* const results = await client.clinical.recipes.search({
|
|
10888
|
+
* query: 'high protein lunch',
|
|
10889
|
+
* connector_id: 'conn_edamam_123',
|
|
10890
|
+
* workspace_id: 'ws_123',
|
|
10891
|
+
* diet: 'high-protein',
|
|
10892
|
+
* });
|
|
9322
10893
|
* ```
|
|
9323
10894
|
*/
|
|
9324
|
-
|
|
9325
|
-
return rb.executeDelete(
|
|
9326
|
-
deleteCatalogTaxonomyNodesById,
|
|
9327
|
-
{ path: { id } },
|
|
9328
|
-
options
|
|
9329
|
-
);
|
|
9330
|
-
}
|
|
10895
|
+
search: async (params, options) => rb.rawPost(`/clinical/recipes/search`, params, options)
|
|
9331
10896
|
}
|
|
9332
10897
|
};
|
|
9333
10898
|
}
|
|
@@ -21711,6 +23276,46 @@ function createThreadsNamespace(rb) {
|
|
|
21711
23276
|
options,
|
|
21712
23277
|
streamOptions
|
|
21713
23278
|
);
|
|
23279
|
+
},
|
|
23280
|
+
/**
|
|
23281
|
+
* Full-text substring search across message content.
|
|
23282
|
+
*
|
|
23283
|
+
* @param query - Substring to match against message content.
|
|
23284
|
+
* @param options - Optional request options.
|
|
23285
|
+
* @returns A promise resolving to an array of matching `Message` objects.
|
|
23286
|
+
*
|
|
23287
|
+
* @example
|
|
23288
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
23289
|
+
* const results = await client.threads.messages.search('deadline');
|
|
23290
|
+
*/
|
|
23291
|
+
search: async (query, options) => {
|
|
23292
|
+
return rb.execute(
|
|
23293
|
+
getMessagesSearch,
|
|
23294
|
+
{ query: { filter: { query } } },
|
|
23295
|
+
options
|
|
23296
|
+
);
|
|
23297
|
+
},
|
|
23298
|
+
/**
|
|
23299
|
+
* Vector similarity search across messages using a generated embedding.
|
|
23300
|
+
*
|
|
23301
|
+
* Returns messages ranked by cosine similarity (threshold > 0.6).
|
|
23302
|
+
* Requires embeddings to have been generated via the async vectorization pipeline.
|
|
23303
|
+
*
|
|
23304
|
+
* @param query - Natural-language query string to embed and search.
|
|
23305
|
+
* @param limit - Maximum number of results (default: 10).
|
|
23306
|
+
* @param options - Optional request options.
|
|
23307
|
+
* @returns A promise resolving to an array of semantically similar `Message` objects.
|
|
23308
|
+
*
|
|
23309
|
+
* @example
|
|
23310
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
23311
|
+
* const results = await client.threads.messages.semanticSearch('unpaid invoices', 5);
|
|
23312
|
+
*/
|
|
23313
|
+
semanticSearch: async (query, limit = 10, options) => {
|
|
23314
|
+
return rb.execute(
|
|
23315
|
+
getMessagesSemanticSearch,
|
|
23316
|
+
{ query: { filter: { query, limit } } },
|
|
23317
|
+
options
|
|
23318
|
+
);
|
|
21714
23319
|
}
|
|
21715
23320
|
},
|
|
21716
23321
|
/**
|
|
@@ -21781,6 +23386,26 @@ function createThreadsNamespace(rb) {
|
|
|
21781
23386
|
options,
|
|
21782
23387
|
streamOptions
|
|
21783
23388
|
);
|
|
23389
|
+
},
|
|
23390
|
+
/**
|
|
23391
|
+
* Full-text search threads by title or context summary.
|
|
23392
|
+
*
|
|
23393
|
+
* @param query - The search query string.
|
|
23394
|
+
* @param options - Optional request options.
|
|
23395
|
+
* @returns A promise resolving to an array of matching `Thread` objects.
|
|
23396
|
+
*
|
|
23397
|
+
* @example
|
|
23398
|
+
* ```typescript
|
|
23399
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
23400
|
+
* const results = await client.threads.search('invoice review');
|
|
23401
|
+
* ```
|
|
23402
|
+
*/
|
|
23403
|
+
search: async (query, options) => {
|
|
23404
|
+
return rb.execute(
|
|
23405
|
+
getThreadsSearch,
|
|
23406
|
+
{ query: { filter: { query } } },
|
|
23407
|
+
options
|
|
23408
|
+
);
|
|
21784
23409
|
}
|
|
21785
23410
|
};
|
|
21786
23411
|
}
|
|
@@ -24393,8 +26018,52 @@ function createWebhooksNamespace(rb) {
|
|
|
24393
26018
|
{ path: { id }, body: {} },
|
|
24394
26019
|
options
|
|
24395
26020
|
);
|
|
26021
|
+
},
|
|
26022
|
+
/**
|
|
26023
|
+
* Returns aggregated statistics across all webhook configurations.
|
|
26024
|
+
*
|
|
26025
|
+
* Provides counts of total, enabled, and disabled configs along with
|
|
26026
|
+
* the overall delivery success rate. Useful for monitoring webhook
|
|
26027
|
+
* health at a glance.
|
|
26028
|
+
*
|
|
26029
|
+
* @param options - Optional request options.
|
|
26030
|
+
* @returns An object containing webhook config statistics.
|
|
26031
|
+
*
|
|
26032
|
+
* @example
|
|
26033
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
26034
|
+
* const stats = await client.webhooks.configs.stats();
|
|
26035
|
+
* console.log(`Total: ${stats.total}, Enabled: ${stats.enabled}`);
|
|
26036
|
+
*/
|
|
26037
|
+
stats: async (options) => {
|
|
26038
|
+
return rb.execute(
|
|
26039
|
+
getWebhookConfigsStats,
|
|
26040
|
+
{},
|
|
26041
|
+
options
|
|
26042
|
+
);
|
|
24396
26043
|
}
|
|
24397
26044
|
},
|
|
26045
|
+
/**
|
|
26046
|
+
* Lists all available webhook event types supported by the platform.
|
|
26047
|
+
*
|
|
26048
|
+
* Returns the complete event catalog. Use this to discover which event
|
|
26049
|
+
* types exist, understand their payload shape, and validate the `events`
|
|
26050
|
+
* array when registering or updating webhook configs. The endpoint does
|
|
26051
|
+
* not require authentication.
|
|
26052
|
+
*
|
|
26053
|
+
* @param options - Optional request options.
|
|
26054
|
+
* @returns A promise that resolves to an array of event type descriptors,
|
|
26055
|
+
* each with `type` (the event name string), `description`, and
|
|
26056
|
+
* `data_object` (the resource type the payload describes).
|
|
26057
|
+
*
|
|
26058
|
+
* @example
|
|
26059
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
26060
|
+
* const types = await client.webhooks.listEventTypes();
|
|
26061
|
+
* console.log(types.map(t => t.type));
|
|
26062
|
+
* // ['agent.execution.completed', 'document.processed', ...]
|
|
26063
|
+
*/
|
|
26064
|
+
listEventTypes: async (options) => {
|
|
26065
|
+
return rb.rawGet("/webhook-event-types", options);
|
|
26066
|
+
},
|
|
24398
26067
|
/**
|
|
24399
26068
|
* Sub-namespace for inspecting and retrying webhook delivery records.
|
|
24400
26069
|
*
|
|
@@ -24462,53 +26131,26 @@ function createWebhooksNamespace(rb) {
|
|
|
24462
26131
|
);
|
|
24463
26132
|
},
|
|
24464
26133
|
/**
|
|
24465
|
-
*
|
|
24466
|
-
*
|
|
24467
|
-
* In most cases delivery records are created automatically by the platform
|
|
24468
|
-
* when events are dispatched. This lower-level method is provided for
|
|
24469
|
-
* advanced use cases such as re-importing delivery history or triggering
|
|
24470
|
-
* synthetic deliveries in testing environments.
|
|
24471
|
-
*
|
|
24472
|
-
* @param attributes - Delivery attributes including at minimum
|
|
24473
|
-
* `webhook_config_id` and `event_type`.
|
|
24474
|
-
* @param options - Optional request options.
|
|
24475
|
-
* @returns A promise that resolves to the created `WebhookDelivery` object.
|
|
24476
|
-
*
|
|
24477
|
-
* @example
|
|
24478
|
-
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
24479
|
-
* const delivery = await client.webhooks.deliveries.create({
|
|
24480
|
-
* webhook_config_id: 'whc_01HXYZ...',
|
|
24481
|
-
* event_type: 'agent.execution.completed',
|
|
24482
|
-
* });
|
|
24483
|
-
*/
|
|
24484
|
-
create: async (attributes, options) => {
|
|
24485
|
-
return rb.execute(
|
|
24486
|
-
postWebhookDeliveriesBulkRetry,
|
|
24487
|
-
{ body: { data: { type: "webhook_delivery", attributes } } },
|
|
24488
|
-
options
|
|
24489
|
-
);
|
|
24490
|
-
},
|
|
24491
|
-
/**
|
|
24492
|
-
* Retries a specific failed webhook delivery.
|
|
26134
|
+
* Retries a specific failed webhook delivery by its ID.
|
|
24493
26135
|
*
|
|
24494
26136
|
* Triggers a new HTTP POST attempt to the webhook endpoint using the
|
|
24495
26137
|
* original event payload. The delivery record is updated with the result
|
|
24496
26138
|
* of the retry attempt.
|
|
24497
26139
|
*
|
|
24498
|
-
* @param
|
|
24499
|
-
*
|
|
26140
|
+
* @param id - The UUID of the webhook delivery record to retry.
|
|
26141
|
+
* @param options - Optional request options.
|
|
24500
26142
|
* @returns A promise that resolves to the updated `WebhookDelivery` object
|
|
24501
26143
|
* after the retry attempt.
|
|
24502
26144
|
*
|
|
24503
26145
|
* @example
|
|
24504
26146
|
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
24505
|
-
* const retried = await client.webhooks.deliveries.retry();
|
|
26147
|
+
* const retried = await client.webhooks.deliveries.retry('wdl_01HXYZ...');
|
|
24506
26148
|
* console.log(`Retry status: ${retried.attributes.response_status}`);
|
|
24507
26149
|
*/
|
|
24508
|
-
retry: async (options) => {
|
|
26150
|
+
retry: async (id, options) => {
|
|
24509
26151
|
return rb.execute(
|
|
24510
|
-
|
|
24511
|
-
{},
|
|
26152
|
+
postWebhookDeliveriesByIdRetry,
|
|
26153
|
+
{ path: { id }, body: {} },
|
|
24512
26154
|
options
|
|
24513
26155
|
);
|
|
24514
26156
|
},
|
|
@@ -24559,6 +26201,27 @@ function createWebhooksNamespace(rb) {
|
|
|
24559
26201
|
{ path: { id } },
|
|
24560
26202
|
options
|
|
24561
26203
|
);
|
|
26204
|
+
},
|
|
26205
|
+
/**
|
|
26206
|
+
* Returns aggregate delivery counts by status.
|
|
26207
|
+
*
|
|
26208
|
+
* Provides total, delivered, failed, and retrying counts. Useful for
|
|
26209
|
+
* monitoring dashboards and health checks.
|
|
26210
|
+
*
|
|
26211
|
+
* @param options - Optional request options.
|
|
26212
|
+
* @returns An object with `total`, `delivered`, `failed`, and `retrying` counts.
|
|
26213
|
+
*
|
|
26214
|
+
* @example
|
|
26215
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
26216
|
+
* const stats = await client.webhooks.deliveries.stats();
|
|
26217
|
+
* console.log(`Failed deliveries: ${stats.failed}`);
|
|
26218
|
+
*/
|
|
26219
|
+
stats: async (options) => {
|
|
26220
|
+
return rb.execute(
|
|
26221
|
+
getWebhookDeliveriesStats,
|
|
26222
|
+
{},
|
|
26223
|
+
options
|
|
26224
|
+
);
|
|
24562
26225
|
}
|
|
24563
26226
|
}
|
|
24564
26227
|
};
|
|
@@ -24615,6 +26278,218 @@ function createPipelinesNamespace(rb) {
|
|
|
24615
26278
|
};
|
|
24616
26279
|
}
|
|
24617
26280
|
|
|
26281
|
+
// src/namespaces/access-grants.ts
|
|
26282
|
+
function createAccessGrantsNamespace(rb) {
|
|
26283
|
+
return {
|
|
26284
|
+
/**
|
|
26285
|
+
* List access grants for the authenticated user's workspace.
|
|
26286
|
+
*
|
|
26287
|
+
* @param params - Optional filter parameters (subject_id, object_id, object_type, relation)
|
|
26288
|
+
* @returns Paginated list of access grants
|
|
26289
|
+
* @example
|
|
26290
|
+
* const grants = await client.accessGrants.list({ object_id: workspaceId });
|
|
26291
|
+
*/
|
|
26292
|
+
async list(params) {
|
|
26293
|
+
const query = params ? `?${new URLSearchParams(params).toString()}` : "";
|
|
26294
|
+
return rb.rawGet(`/access-grants${query}`);
|
|
26295
|
+
},
|
|
26296
|
+
/**
|
|
26297
|
+
* Get a single access grant by ID.
|
|
26298
|
+
*
|
|
26299
|
+
* @param id - AccessGrant UUID
|
|
26300
|
+
* @returns The access grant record
|
|
26301
|
+
* @example
|
|
26302
|
+
* const grant = await client.accessGrants.get("grant-uuid");
|
|
26303
|
+
*/
|
|
26304
|
+
async get(id) {
|
|
26305
|
+
return rb.rawGet(`/access-grants/${id}`);
|
|
26306
|
+
},
|
|
26307
|
+
/**
|
|
26308
|
+
* Create a new access grant, giving a subject a relation to an object.
|
|
26309
|
+
*
|
|
26310
|
+
* @param attrs - Grant attributes (subject_type, subject_id, relation, object_type, object_id)
|
|
26311
|
+
* @returns The created access grant
|
|
26312
|
+
* @example
|
|
26313
|
+
* const grant = await client.accessGrants.create({
|
|
26314
|
+
* data: {
|
|
26315
|
+
* type: "access-grant",
|
|
26316
|
+
* attributes: {
|
|
26317
|
+
* subject_type: "user",
|
|
26318
|
+
* subject_id: "user-uuid",
|
|
26319
|
+
* relation: "workspace_editor",
|
|
26320
|
+
* object_type: "workspace",
|
|
26321
|
+
* object_id: "workspace-uuid",
|
|
26322
|
+
* },
|
|
26323
|
+
* },
|
|
26324
|
+
* });
|
|
26325
|
+
*/
|
|
26326
|
+
async create(attrs) {
|
|
26327
|
+
return rb.rawPost(`/access-grants`, attrs);
|
|
26328
|
+
},
|
|
26329
|
+
/**
|
|
26330
|
+
* Update an existing access grant (relation, custom_permissions, expires_at).
|
|
26331
|
+
*
|
|
26332
|
+
* @param id - AccessGrant UUID
|
|
26333
|
+
* @param attrs - Attributes to update
|
|
26334
|
+
* @returns The updated access grant
|
|
26335
|
+
* @example
|
|
26336
|
+
* const updated = await client.accessGrants.update("grant-uuid", { data: { ... } });
|
|
26337
|
+
*/
|
|
26338
|
+
async update(id, attrs) {
|
|
26339
|
+
return rb.rawPatch(`/access-grants/${id}`, attrs);
|
|
26340
|
+
},
|
|
26341
|
+
/**
|
|
26342
|
+
* Revoke (delete) an access grant.
|
|
26343
|
+
*
|
|
26344
|
+
* @param id - AccessGrant UUID
|
|
26345
|
+
* @example
|
|
26346
|
+
* await client.accessGrants.revoke("grant-uuid");
|
|
26347
|
+
*/
|
|
26348
|
+
async revoke(id) {
|
|
26349
|
+
return rb.rawDelete(`/access-grants/${id}`);
|
|
26350
|
+
}
|
|
26351
|
+
};
|
|
26352
|
+
}
|
|
26353
|
+
|
|
26354
|
+
// src/namespaces/roles.ts
|
|
26355
|
+
function createRolesNamespace(rb) {
|
|
26356
|
+
return {
|
|
26357
|
+
/**
|
|
26358
|
+
* List roles available in the current context (system defaults + application roles).
|
|
26359
|
+
*
|
|
26360
|
+
* @param params - Optional filter parameters
|
|
26361
|
+
* @returns Paginated list of roles
|
|
26362
|
+
* @example
|
|
26363
|
+
* const roles = await client.roles.list();
|
|
26364
|
+
*/
|
|
26365
|
+
async list(params) {
|
|
26366
|
+
const query = params ? `?${new URLSearchParams(params).toString()}` : "";
|
|
26367
|
+
return rb.rawGet(`/roles${query}`);
|
|
26368
|
+
},
|
|
26369
|
+
/**
|
|
26370
|
+
* Get a single role by ID.
|
|
26371
|
+
*
|
|
26372
|
+
* @param id - Role UUID
|
|
26373
|
+
* @returns The role record
|
|
26374
|
+
* @example
|
|
26375
|
+
* const role = await client.roles.get("role-uuid");
|
|
26376
|
+
*/
|
|
26377
|
+
async get(id) {
|
|
26378
|
+
return rb.rawGet(`/roles/${id}`);
|
|
26379
|
+
},
|
|
26380
|
+
/**
|
|
26381
|
+
* Create a new custom role (permission bundle) for the application.
|
|
26382
|
+
*
|
|
26383
|
+
* @param attrs - Role attributes (name, description, permissions, application_id)
|
|
26384
|
+
* @returns The created role
|
|
26385
|
+
* @example
|
|
26386
|
+
* const role = await client.roles.create({
|
|
26387
|
+
* data: {
|
|
26388
|
+
* type: "role",
|
|
26389
|
+
* attributes: { name: "Content Editor", permissions: ["extract:document:read:all"] },
|
|
26390
|
+
* },
|
|
26391
|
+
* });
|
|
26392
|
+
*/
|
|
26393
|
+
async create(attrs) {
|
|
26394
|
+
return rb.rawPost(`/roles`, attrs);
|
|
26395
|
+
},
|
|
26396
|
+
/**
|
|
26397
|
+
* Update a role's name, description, or permissions.
|
|
26398
|
+
*
|
|
26399
|
+
* @param id - Role UUID
|
|
26400
|
+
* @param attrs - Attributes to update
|
|
26401
|
+
* @returns The updated role
|
|
26402
|
+
* @example
|
|
26403
|
+
* const updated = await client.roles.update("role-uuid", { data: { ... } });
|
|
26404
|
+
*/
|
|
26405
|
+
async update(id, attrs) {
|
|
26406
|
+
return rb.rawPatch(`/roles/${id}`, attrs);
|
|
26407
|
+
},
|
|
26408
|
+
/**
|
|
26409
|
+
* Delete a custom role. System default roles cannot be deleted.
|
|
26410
|
+
*
|
|
26411
|
+
* @param id - Role UUID
|
|
26412
|
+
* @example
|
|
26413
|
+
* await client.roles.delete("role-uuid");
|
|
26414
|
+
*/
|
|
26415
|
+
async delete(id) {
|
|
26416
|
+
return rb.rawDelete(`/roles/${id}`);
|
|
26417
|
+
}
|
|
26418
|
+
};
|
|
26419
|
+
}
|
|
26420
|
+
|
|
26421
|
+
// src/namespaces/permissions.ts
|
|
26422
|
+
function createPermissionsNamespace(rb) {
|
|
26423
|
+
return {
|
|
26424
|
+
/**
|
|
26425
|
+
* List all registered platform permissions.
|
|
26426
|
+
*
|
|
26427
|
+
* Optionally filter by `app`, `context`, or `category` query params.
|
|
26428
|
+
*
|
|
26429
|
+
* @param params - Optional filter parameters (app, context, category)
|
|
26430
|
+
* @returns List of permissions
|
|
26431
|
+
* @example
|
|
26432
|
+
* const perms = await client.permissions.list({ context: "workspace" });
|
|
26433
|
+
*/
|
|
26434
|
+
async list(params) {
|
|
26435
|
+
const query = params ? `?${new URLSearchParams(params).toString()}` : "";
|
|
26436
|
+
return rb.rawGet(`/permissions${query}`);
|
|
26437
|
+
},
|
|
26438
|
+
/**
|
|
26439
|
+
* Get a single permission by its ID string (e.g., "extract:document:read:all").
|
|
26440
|
+
*
|
|
26441
|
+
* @param id - Permission ID string
|
|
26442
|
+
* @returns The permission record
|
|
26443
|
+
* @example
|
|
26444
|
+
* const perm = await client.permissions.get("extract:document:read:all");
|
|
26445
|
+
*/
|
|
26446
|
+
async get(id) {
|
|
26447
|
+
return rb.rawGet(
|
|
26448
|
+
`/permissions/${encodeURIComponent(id)}`
|
|
26449
|
+
);
|
|
26450
|
+
},
|
|
26451
|
+
/**
|
|
26452
|
+
* Get permission system metadata (version, apps, scopes, categories, cache TTL).
|
|
26453
|
+
*
|
|
26454
|
+
* @returns Permission system metadata
|
|
26455
|
+
* @example
|
|
26456
|
+
* const meta = await client.permissions.meta();
|
|
26457
|
+
*/
|
|
26458
|
+
async meta() {
|
|
26459
|
+
return rb.rawGet(`/permissions/meta`);
|
|
26460
|
+
},
|
|
26461
|
+
/**
|
|
26462
|
+
* List permission presets (pre-defined role bundles).
|
|
26463
|
+
*
|
|
26464
|
+
* Optionally filter by `context` (tenant, workspace) or `app`.
|
|
26465
|
+
*
|
|
26466
|
+
* @param params - Optional filter parameters (context, app)
|
|
26467
|
+
* @returns List of permission presets
|
|
26468
|
+
* @example
|
|
26469
|
+
* const presets = await client.permissions.listPresets({ context: "workspace" });
|
|
26470
|
+
*/
|
|
26471
|
+
async listPresets(params) {
|
|
26472
|
+
const query = params ? `?${new URLSearchParams(params).toString()}` : "";
|
|
26473
|
+
return rb.rawGet(
|
|
26474
|
+
`/permissions/presets${query}`
|
|
26475
|
+
);
|
|
26476
|
+
},
|
|
26477
|
+
/**
|
|
26478
|
+
* Get a single permission preset by its composite ID (e.g., "workspace:org:admin").
|
|
26479
|
+
*
|
|
26480
|
+
* @param id - Preset composite ID
|
|
26481
|
+
* @returns The permission preset
|
|
26482
|
+
* @example
|
|
26483
|
+
* const preset = await client.permissions.getPreset("workspace:org:admin");
|
|
26484
|
+
*/
|
|
26485
|
+
async getPreset(id) {
|
|
26486
|
+
return rb.rawGet(
|
|
26487
|
+
`/permissions/presets/${encodeURIComponent(id)}`
|
|
26488
|
+
);
|
|
26489
|
+
}
|
|
26490
|
+
};
|
|
26491
|
+
}
|
|
26492
|
+
|
|
24618
26493
|
// src/streaming.ts
|
|
24619
26494
|
var DEFAULT_STREAM_TIMEOUT = 3e5;
|
|
24620
26495
|
var DEFAULT_MAX_CHUNKS = 1e4;
|
|
@@ -24858,6 +26733,25 @@ var RequestBuilder = class {
|
|
|
24858
26733
|
throw handleApiError(error);
|
|
24859
26734
|
}
|
|
24860
26735
|
}
|
|
26736
|
+
/**
|
|
26737
|
+
* Execute a raw PATCH request to a custom (non-generated) endpoint.
|
|
26738
|
+
*/
|
|
26739
|
+
async rawPatch(url, body, options) {
|
|
26740
|
+
const headers = buildHeaders(this.getHeaders, options);
|
|
26741
|
+
try {
|
|
26742
|
+
const { data } = await this.requestWithRetry(
|
|
26743
|
+
() => this.clientInstance.patch({
|
|
26744
|
+
url,
|
|
26745
|
+
headers,
|
|
26746
|
+
...body !== void 0 && { body },
|
|
26747
|
+
...options?.signal && { signal: options.signal }
|
|
26748
|
+
})
|
|
26749
|
+
);
|
|
26750
|
+
return this.unwrap(data?.data);
|
|
26751
|
+
} catch (error) {
|
|
26752
|
+
throw handleApiError(error);
|
|
26753
|
+
}
|
|
26754
|
+
}
|
|
24861
26755
|
/**
|
|
24862
26756
|
* Execute a raw DELETE request to a custom (non-generated) endpoint.
|
|
24863
26757
|
*/
|
|
@@ -25013,6 +26907,7 @@ var GptClient = class extends BaseClient {
|
|
|
25013
26907
|
this.ai = createAiNamespace(rb);
|
|
25014
26908
|
this.billing = createBillingNamespace(rb);
|
|
25015
26909
|
this.catalog = createCatalogNamespace(rb);
|
|
26910
|
+
this.clinical = createClinicalNamespace(rb);
|
|
25016
26911
|
this.compliance = createComplianceNamespace(rb);
|
|
25017
26912
|
this.communication = createCommunicationNamespace(rb);
|
|
25018
26913
|
this.connectors = createConnectorsNamespace(rb);
|
|
@@ -25038,6 +26933,9 @@ var GptClient = class extends BaseClient {
|
|
|
25038
26933
|
this.models = createModelsNamespace(rb);
|
|
25039
26934
|
this.crmClusters = createCrmClustersNamespace(rb);
|
|
25040
26935
|
this.pipelines = createPipelinesNamespace(rb);
|
|
26936
|
+
this.accessGrants = createAccessGrantsNamespace(rb);
|
|
26937
|
+
this.roles = createRolesNamespace(rb);
|
|
26938
|
+
this.permissions = createPermissionsNamespace(rb);
|
|
25041
26939
|
}
|
|
25042
26940
|
/**
|
|
25043
26941
|
* Subscribe to SDK lifecycle events.
|