@gpt-platform/client 0.6.3 → 0.7.1
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 +3610 -1151
- package/dist/index.d.ts +3610 -1151
- package/dist/index.js +2212 -184
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2212 -184
- package/dist/index.mjs.map +1 -1
- package/llms.txt +110 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1333,7 +1333,7 @@ function buildUserAgent(sdkVersion, appInfo) {
|
|
|
1333
1333
|
}
|
|
1334
1334
|
|
|
1335
1335
|
// src/version.ts
|
|
1336
|
-
var SDK_VERSION = "0.
|
|
1336
|
+
var SDK_VERSION = "0.7.1";
|
|
1337
1337
|
var DEFAULT_API_VERSION = "2026-03-11";
|
|
1338
1338
|
|
|
1339
1339
|
// src/base-client.ts
|
|
@@ -1794,6 +1794,20 @@ var getCrmRelationshipsById = (options) => (options.client ?? client).get({
|
|
|
1794
1794
|
url: "/crm/relationships/{id}",
|
|
1795
1795
|
...options
|
|
1796
1796
|
});
|
|
1797
|
+
var getClinicalSessions = (options) => (options.client ?? client).get({
|
|
1798
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1799
|
+
url: "/clinical/sessions",
|
|
1800
|
+
...options
|
|
1801
|
+
});
|
|
1802
|
+
var postClinicalSessions = (options) => (options.client ?? client).post({
|
|
1803
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1804
|
+
url: "/clinical/sessions",
|
|
1805
|
+
...options,
|
|
1806
|
+
headers: {
|
|
1807
|
+
"Content-Type": "application/vnd.api+json",
|
|
1808
|
+
...options.headers
|
|
1809
|
+
}
|
|
1810
|
+
});
|
|
1797
1811
|
var getWatcherEventsById = (options) => (options.client ?? client).get({
|
|
1798
1812
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1799
1813
|
url: "/watcher/events/{id}",
|
|
@@ -1855,6 +1869,30 @@ var getCatalogTaxonomyNodesTaxonomyByTaxonomyId = (options) => (options.client ?
|
|
|
1855
1869
|
url: "/catalog/taxonomy-nodes/taxonomy/{taxonomy_id}",
|
|
1856
1870
|
...options
|
|
1857
1871
|
});
|
|
1872
|
+
var getClinicalNotesByNoteIdVersionsById = (options) => (options.client ?? client).get({
|
|
1873
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1874
|
+
url: "/clinical/notes/{note_id}/versions/{id}",
|
|
1875
|
+
...options
|
|
1876
|
+
});
|
|
1877
|
+
var deleteClinicalMealPlansById = (options) => (options.client ?? client).delete({
|
|
1878
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1879
|
+
url: "/clinical/meal-plans/{id}",
|
|
1880
|
+
...options
|
|
1881
|
+
});
|
|
1882
|
+
var getClinicalMealPlansById = (options) => (options.client ?? client).get({
|
|
1883
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1884
|
+
url: "/clinical/meal-plans/{id}",
|
|
1885
|
+
...options
|
|
1886
|
+
});
|
|
1887
|
+
var patchClinicalMealPlansById = (options) => (options.client ?? client).patch({
|
|
1888
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1889
|
+
url: "/clinical/meal-plans/{id}",
|
|
1890
|
+
...options,
|
|
1891
|
+
headers: {
|
|
1892
|
+
"Content-Type": "application/vnd.api+json",
|
|
1893
|
+
...options.headers
|
|
1894
|
+
}
|
|
1895
|
+
});
|
|
1858
1896
|
var deleteSocialAccountsById = (options) => (options.client ?? client).delete({
|
|
1859
1897
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1860
1898
|
url: "/social/accounts/{id}",
|
|
@@ -1958,6 +1996,11 @@ var getAgentsByIdStats = (options) => (options.client ?? client).get({
|
|
|
1958
1996
|
url: "/agents/{id}/stats",
|
|
1959
1997
|
...options
|
|
1960
1998
|
});
|
|
1999
|
+
var getClinicalPatientsByIdHealthMetrics = (options) => (options.client ?? client).get({
|
|
2000
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2001
|
+
url: "/clinical/patients/{id}/health_metrics",
|
|
2002
|
+
...options
|
|
2003
|
+
});
|
|
1961
2004
|
var patchCrmExportsByIdRefreshUrl = (options) => (options.client ?? client).patch({
|
|
1962
2005
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1963
2006
|
url: "/crm/exports/{id}/refresh-url",
|
|
@@ -2001,6 +2044,25 @@ var getCrmExportsById = (options) => (options.client ?? client).get({
|
|
|
2001
2044
|
url: "/crm/exports/{id}",
|
|
2002
2045
|
...options
|
|
2003
2046
|
});
|
|
2047
|
+
var deleteClinicalPracticeResourcesById = (options) => (options.client ?? client).delete({
|
|
2048
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2049
|
+
url: "/clinical/practice-resources/{id}",
|
|
2050
|
+
...options
|
|
2051
|
+
});
|
|
2052
|
+
var getClinicalPracticeResourcesById = (options) => (options.client ?? client).get({
|
|
2053
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2054
|
+
url: "/clinical/practice-resources/{id}",
|
|
2055
|
+
...options
|
|
2056
|
+
});
|
|
2057
|
+
var patchClinicalPracticeResourcesById = (options) => (options.client ?? client).patch({
|
|
2058
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2059
|
+
url: "/clinical/practice-resources/{id}",
|
|
2060
|
+
...options,
|
|
2061
|
+
headers: {
|
|
2062
|
+
"Content-Type": "application/vnd.api+json",
|
|
2063
|
+
...options.headers
|
|
2064
|
+
}
|
|
2065
|
+
});
|
|
2004
2066
|
var patchSocialAccountsByIdDeactivate = (options) => (options.client ?? client).patch({
|
|
2005
2067
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2006
2068
|
url: "/social/accounts/{id}/deactivate",
|
|
@@ -2119,6 +2181,39 @@ var postExtractionBatches = (options) => (options.client ?? client).post({
|
|
|
2119
2181
|
...options.headers
|
|
2120
2182
|
}
|
|
2121
2183
|
});
|
|
2184
|
+
var getClinicalNotes = (options) => (options.client ?? client).get({
|
|
2185
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2186
|
+
url: "/clinical/notes",
|
|
2187
|
+
...options
|
|
2188
|
+
});
|
|
2189
|
+
var postClinicalNotes = (options) => (options.client ?? client).post({
|
|
2190
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2191
|
+
url: "/clinical/notes",
|
|
2192
|
+
...options,
|
|
2193
|
+
headers: {
|
|
2194
|
+
"Content-Type": "application/vnd.api+json",
|
|
2195
|
+
...options.headers
|
|
2196
|
+
}
|
|
2197
|
+
});
|
|
2198
|
+
var deleteClinicalClientGoalsById = (options) => (options.client ?? client).delete({
|
|
2199
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2200
|
+
url: "/clinical/client-goals/{id}",
|
|
2201
|
+
...options
|
|
2202
|
+
});
|
|
2203
|
+
var getClinicalClientGoalsById = (options) => (options.client ?? client).get({
|
|
2204
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2205
|
+
url: "/clinical/client-goals/{id}",
|
|
2206
|
+
...options
|
|
2207
|
+
});
|
|
2208
|
+
var patchClinicalClientGoalsById = (options) => (options.client ?? client).patch({
|
|
2209
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2210
|
+
url: "/clinical/client-goals/{id}",
|
|
2211
|
+
...options,
|
|
2212
|
+
headers: {
|
|
2213
|
+
"Content-Type": "application/vnd.api+json",
|
|
2214
|
+
...options.headers
|
|
2215
|
+
}
|
|
2216
|
+
});
|
|
2122
2217
|
var postAgentsImport = (options) => (options.client ?? client).post({
|
|
2123
2218
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2124
2219
|
url: "/agents/import",
|
|
@@ -2184,6 +2279,15 @@ var postEmailOutboundEmailsComposeWithAi = (options) => (options.client ?? clien
|
|
|
2184
2279
|
...options.headers
|
|
2185
2280
|
}
|
|
2186
2281
|
});
|
|
2282
|
+
var postWebhookDeliveriesByIdRetry = (options) => (options.client ?? client).post({
|
|
2283
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2284
|
+
url: "/webhook-deliveries/{id}/retry",
|
|
2285
|
+
...options,
|
|
2286
|
+
headers: {
|
|
2287
|
+
"Content-Type": "application/vnd.api+json",
|
|
2288
|
+
...options.headers
|
|
2289
|
+
}
|
|
2290
|
+
});
|
|
2187
2291
|
var patchSocialPostsByIdPublish = (options) => (options.client ?? client).patch({
|
|
2188
2292
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2189
2293
|
url: "/social/posts/{id}/publish",
|
|
@@ -2337,6 +2441,11 @@ var postCrmContacts = (options) => (options.client ?? client).post({
|
|
|
2337
2441
|
...options.headers
|
|
2338
2442
|
}
|
|
2339
2443
|
});
|
|
2444
|
+
var getMemoryDocumentSections = (options) => (options.client ?? client).get({
|
|
2445
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2446
|
+
url: "/memory/document-sections",
|
|
2447
|
+
...options
|
|
2448
|
+
});
|
|
2340
2449
|
var deleteWebhookConfigsById = (options) => (options.client ?? client).delete({
|
|
2341
2450
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2342
2451
|
url: "/webhook-configs/{id}",
|
|
@@ -2365,6 +2474,16 @@ var postConnectorsCredentialsByIdRefresh = (options) => (options.client ?? clien
|
|
|
2365
2474
|
...options.headers
|
|
2366
2475
|
}
|
|
2367
2476
|
});
|
|
2477
|
+
var deleteClinicalSupplementRecCacheById = (options) => (options.client ?? client).delete({
|
|
2478
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2479
|
+
url: "/clinical/supplement-rec-cache/{id}",
|
|
2480
|
+
...options
|
|
2481
|
+
});
|
|
2482
|
+
var getClinicalSupplementRecCacheById = (options) => (options.client ?? client).get({
|
|
2483
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2484
|
+
url: "/clinical/supplement-rec-cache/{id}",
|
|
2485
|
+
...options
|
|
2486
|
+
});
|
|
2368
2487
|
var postWorkspacesByWorkspaceIdExtractionDocumentsDismissAllTrained = (options) => (options.client ?? client).post({
|
|
2369
2488
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2370
2489
|
url: "/workspaces/{workspace_id}/extraction/documents/dismiss-all-trained",
|
|
@@ -2374,6 +2493,11 @@ var postWorkspacesByWorkspaceIdExtractionDocumentsDismissAllTrained = (options)
|
|
|
2374
2493
|
...options.headers
|
|
2375
2494
|
}
|
|
2376
2495
|
});
|
|
2496
|
+
var getClinicalSessionsByIdSessionNotes = (options) => (options.client ?? client).get({
|
|
2497
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2498
|
+
url: "/clinical/sessions/{id}/session_notes",
|
|
2499
|
+
...options
|
|
2500
|
+
});
|
|
2377
2501
|
var postExtractionDocumentsFindOrBeginUpload = (options) => (options.client ?? client).post({
|
|
2378
2502
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2379
2503
|
url: "/extraction/documents/find-or-begin-upload",
|
|
@@ -2406,6 +2530,11 @@ var postConfigs = (options) => (options.client ?? client).post({
|
|
|
2406
2530
|
...options.headers
|
|
2407
2531
|
}
|
|
2408
2532
|
});
|
|
2533
|
+
var getClinicalSupplementRecCache = (options) => (options.client ?? client).get({
|
|
2534
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2535
|
+
url: "/clinical/supplement-rec-cache",
|
|
2536
|
+
...options
|
|
2537
|
+
});
|
|
2409
2538
|
var deleteCrmCustomEntitiesById = (options) => (options.client ?? client).delete({
|
|
2410
2539
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2411
2540
|
url: "/crm/custom-entities/{id}",
|
|
@@ -2452,6 +2581,11 @@ var postTokens = (options) => (options.client ?? client).post({
|
|
|
2452
2581
|
...options.headers
|
|
2453
2582
|
}
|
|
2454
2583
|
});
|
|
2584
|
+
var getClinicalPatientsByIdSupplements = (options) => (options.client ?? client).get({
|
|
2585
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2586
|
+
url: "/clinical/patients/{id}/supplements",
|
|
2587
|
+
...options
|
|
2588
|
+
});
|
|
2455
2589
|
var postAgentsByIdPublishVersion = (options) => (options.client ?? client).post({
|
|
2456
2590
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2457
2591
|
url: "/agents/{id}/publish-version",
|
|
@@ -2530,6 +2664,11 @@ var patchSupportTicketsByIdMerge = (options) => (options.client ?? client).patch
|
|
|
2530
2664
|
...options.headers
|
|
2531
2665
|
}
|
|
2532
2666
|
});
|
|
2667
|
+
var getMemorySectionDocumentsById = (options) => (options.client ?? client).get({
|
|
2668
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2669
|
+
url: "/memory/section-documents/{id}",
|
|
2670
|
+
...options
|
|
2671
|
+
});
|
|
2533
2672
|
var deleteApiKeysById = (options) => (options.client ?? client).delete({
|
|
2534
2673
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2535
2674
|
url: "/api-keys/{id}",
|
|
@@ -2591,6 +2730,25 @@ var postCrmRelationshipTypes = (options) => (options.client ?? client).post({
|
|
|
2591
2730
|
...options.headers
|
|
2592
2731
|
}
|
|
2593
2732
|
});
|
|
2733
|
+
var deleteClinicalSessionsById = (options) => (options.client ?? client).delete({
|
|
2734
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2735
|
+
url: "/clinical/sessions/{id}",
|
|
2736
|
+
...options
|
|
2737
|
+
});
|
|
2738
|
+
var getClinicalSessionsById = (options) => (options.client ?? client).get({
|
|
2739
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2740
|
+
url: "/clinical/sessions/{id}",
|
|
2741
|
+
...options
|
|
2742
|
+
});
|
|
2743
|
+
var patchClinicalSessionsById = (options) => (options.client ?? client).patch({
|
|
2744
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2745
|
+
url: "/clinical/sessions/{id}",
|
|
2746
|
+
...options,
|
|
2747
|
+
headers: {
|
|
2748
|
+
"Content-Type": "application/vnd.api+json",
|
|
2749
|
+
...options.headers
|
|
2750
|
+
}
|
|
2751
|
+
});
|
|
2594
2752
|
var getAgentsUsage = (options) => (options.client ?? client).get({
|
|
2595
2753
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2596
2754
|
url: "/agents/usage",
|
|
@@ -2704,6 +2862,11 @@ var getEmailRecipientsEmailByOutboundEmailId = (options) => (options.client ?? c
|
|
|
2704
2862
|
url: "/email/recipients/email/{outbound_email_id}",
|
|
2705
2863
|
...options
|
|
2706
2864
|
});
|
|
2865
|
+
var getMemorySectionDocuments = (options) => (options.client ?? client).get({
|
|
2866
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2867
|
+
url: "/memory/section-documents",
|
|
2868
|
+
...options
|
|
2869
|
+
});
|
|
2707
2870
|
var patchStorageFilesByIdRestore = (options) => (options.client ?? client).patch({
|
|
2708
2871
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2709
2872
|
url: "/storage-files/{id}/restore",
|
|
@@ -2722,6 +2885,25 @@ var patchSocialCampaignsByIdCancel = (options) => (options.client ?? client).pat
|
|
|
2722
2885
|
...options.headers
|
|
2723
2886
|
}
|
|
2724
2887
|
});
|
|
2888
|
+
var deleteClinicalPracticeToolsById = (options) => (options.client ?? client).delete({
|
|
2889
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2890
|
+
url: "/clinical/practice-tools/{id}",
|
|
2891
|
+
...options
|
|
2892
|
+
});
|
|
2893
|
+
var getClinicalPracticeToolsById = (options) => (options.client ?? client).get({
|
|
2894
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2895
|
+
url: "/clinical/practice-tools/{id}",
|
|
2896
|
+
...options
|
|
2897
|
+
});
|
|
2898
|
+
var patchClinicalPracticeToolsById = (options) => (options.client ?? client).patch({
|
|
2899
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2900
|
+
url: "/clinical/practice-tools/{id}",
|
|
2901
|
+
...options,
|
|
2902
|
+
headers: {
|
|
2903
|
+
"Content-Type": "application/vnd.api+json",
|
|
2904
|
+
...options.headers
|
|
2905
|
+
}
|
|
2906
|
+
});
|
|
2725
2907
|
var getFeatureUsagesById = (options) => (options.client ?? client).get({
|
|
2726
2908
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2727
2909
|
url: "/feature-usages/{id}",
|
|
@@ -2736,6 +2918,11 @@ var patchSchedulingCalendarSyncsByIdPause = (options) => (options.client ?? clie
|
|
|
2736
2918
|
...options.headers
|
|
2737
2919
|
}
|
|
2738
2920
|
});
|
|
2921
|
+
var getWebhookConfigsStats = (options) => (options.client ?? client).get({
|
|
2922
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2923
|
+
url: "/webhook-configs/stats",
|
|
2924
|
+
...options
|
|
2925
|
+
});
|
|
2739
2926
|
var getEmailMarketingCampaignsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
2740
2927
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2741
2928
|
url: "/email-marketing/campaigns/workspace/{workspace_id}",
|
|
@@ -2945,6 +3132,25 @@ var patchCrawlerJobsByIdCancel = (options) => (options.client ?? client).patch({
|
|
|
2945
3132
|
...options.headers
|
|
2946
3133
|
}
|
|
2947
3134
|
});
|
|
3135
|
+
var deleteClinicalNotesById = (options) => (options.client ?? client).delete({
|
|
3136
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3137
|
+
url: "/clinical/notes/{id}",
|
|
3138
|
+
...options
|
|
3139
|
+
});
|
|
3140
|
+
var getClinicalNotesById = (options) => (options.client ?? client).get({
|
|
3141
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3142
|
+
url: "/clinical/notes/{id}",
|
|
3143
|
+
...options
|
|
3144
|
+
});
|
|
3145
|
+
var patchClinicalNotesById = (options) => (options.client ?? client).patch({
|
|
3146
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3147
|
+
url: "/clinical/notes/{id}",
|
|
3148
|
+
...options,
|
|
3149
|
+
headers: {
|
|
3150
|
+
"Content-Type": "application/vnd.api+json",
|
|
3151
|
+
...options.headers
|
|
3152
|
+
}
|
|
3153
|
+
});
|
|
2948
3154
|
var patchSchedulingBookingsByIdConfirm = (options) => (options.client ?? client).patch({
|
|
2949
3155
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2950
3156
|
url: "/scheduling/bookings/{id}/confirm",
|
|
@@ -2954,6 +3160,15 @@ var patchSchedulingBookingsByIdConfirm = (options) => (options.client ?? client)
|
|
|
2954
3160
|
...options.headers
|
|
2955
3161
|
}
|
|
2956
3162
|
});
|
|
3163
|
+
var patchClinicalNotesByIdApprove = (options) => (options.client ?? client).patch({
|
|
3164
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3165
|
+
url: "/clinical/notes/{id}/approve",
|
|
3166
|
+
...options,
|
|
3167
|
+
headers: {
|
|
3168
|
+
"Content-Type": "application/vnd.api+json",
|
|
3169
|
+
...options.headers
|
|
3170
|
+
}
|
|
3171
|
+
});
|
|
2957
3172
|
var postAgentVersionsByIdAddSystemField = (options) => (options.client ?? client).post({
|
|
2958
3173
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2959
3174
|
url: "/agent-versions/{id}/add-system-field",
|
|
@@ -2995,6 +3210,11 @@ var patchEmailMarketingGeneratedEmailsByIdApprove = (options) => (options.client
|
|
|
2995
3210
|
...options.headers
|
|
2996
3211
|
}
|
|
2997
3212
|
});
|
|
3213
|
+
var getClinicalNotesByNoteIdVersions = (options) => (options.client ?? client).get({
|
|
3214
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3215
|
+
url: "/clinical/notes/{note_id}/versions",
|
|
3216
|
+
...options
|
|
3217
|
+
});
|
|
2998
3218
|
var postSupportTickets = (options) => (options.client ?? client).post({
|
|
2999
3219
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3000
3220
|
url: "/support/tickets",
|
|
@@ -3160,6 +3380,11 @@ var patchSchedulingParticipantsById = (options) => (options.client ?? client).pa
|
|
|
3160
3380
|
...options.headers
|
|
3161
3381
|
}
|
|
3162
3382
|
});
|
|
3383
|
+
var getClinicalSessionsByIdMealPlans = (options) => (options.client ?? client).get({
|
|
3384
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3385
|
+
url: "/clinical/sessions/{id}/meal_plans",
|
|
3386
|
+
...options
|
|
3387
|
+
});
|
|
3163
3388
|
var postTenantsByIdCredit = (options) => (options.client ?? client).post({
|
|
3164
3389
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3165
3390
|
url: "/tenants/{id}/credit",
|
|
@@ -3249,6 +3474,11 @@ var postSchedulingParticipants = (options) => (options.client ?? client).post({
|
|
|
3249
3474
|
...options.headers
|
|
3250
3475
|
}
|
|
3251
3476
|
});
|
|
3477
|
+
var getWebhookDeliveriesStats = (options) => (options.client ?? client).get({
|
|
3478
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3479
|
+
url: "/webhook-deliveries/stats",
|
|
3480
|
+
...options
|
|
3481
|
+
});
|
|
3252
3482
|
var getNotificationLogsById = (options) => (options.client ?? client).get({
|
|
3253
3483
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3254
3484
|
url: "/notification-logs/{id}",
|
|
@@ -3416,6 +3646,20 @@ var getSearchSemantic = (options) => (options.client ?? client).get({
|
|
|
3416
3646
|
url: "/search/semantic",
|
|
3417
3647
|
...options
|
|
3418
3648
|
});
|
|
3649
|
+
var getClinicalPracticeTools = (options) => (options.client ?? client).get({
|
|
3650
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3651
|
+
url: "/clinical/practice-tools",
|
|
3652
|
+
...options
|
|
3653
|
+
});
|
|
3654
|
+
var postClinicalPracticeTools = (options) => (options.client ?? client).post({
|
|
3655
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3656
|
+
url: "/clinical/practice-tools",
|
|
3657
|
+
...options,
|
|
3658
|
+
headers: {
|
|
3659
|
+
"Content-Type": "application/vnd.api+json",
|
|
3660
|
+
...options.headers
|
|
3661
|
+
}
|
|
3662
|
+
});
|
|
3419
3663
|
var patchCampaignsSequencesByIdResume = (options) => (options.client ?? client).patch({
|
|
3420
3664
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3421
3665
|
url: "/campaigns/sequences/{id}/resume",
|
|
@@ -3505,6 +3749,25 @@ var getCrmPipelinesWorkspaceByWorkspaceId = (options) => (options.client ?? clie
|
|
|
3505
3749
|
url: "/crm/pipelines/workspace/{workspace_id}",
|
|
3506
3750
|
...options
|
|
3507
3751
|
});
|
|
3752
|
+
var deleteClinicalClientResourceAssignmentsById = (options) => (options.client ?? client).delete({
|
|
3753
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3754
|
+
url: "/clinical/client-resource-assignments/{id}",
|
|
3755
|
+
...options
|
|
3756
|
+
});
|
|
3757
|
+
var getClinicalClientResourceAssignmentsById = (options) => (options.client ?? client).get({
|
|
3758
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3759
|
+
url: "/clinical/client-resource-assignments/{id}",
|
|
3760
|
+
...options
|
|
3761
|
+
});
|
|
3762
|
+
var patchClinicalClientResourceAssignmentsById = (options) => (options.client ?? client).patch({
|
|
3763
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3764
|
+
url: "/clinical/client-resource-assignments/{id}",
|
|
3765
|
+
...options,
|
|
3766
|
+
headers: {
|
|
3767
|
+
"Content-Type": "application/vnd.api+json",
|
|
3768
|
+
...options.headers
|
|
3769
|
+
}
|
|
3770
|
+
});
|
|
3508
3771
|
var patchExtractionDocumentsByIdReprocess = (options) => (options.client ?? client).patch({
|
|
3509
3772
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3510
3773
|
url: "/extraction/documents/{id}/reprocess",
|
|
@@ -3684,6 +3947,20 @@ var getSocialMetricsPostBySocialPostIdLatest = (options) => (options.client ?? c
|
|
|
3684
3947
|
url: "/social/metrics/post/{social_post_id}/latest",
|
|
3685
3948
|
...options
|
|
3686
3949
|
});
|
|
3950
|
+
var getClinicalDeliveries = (options) => (options.client ?? client).get({
|
|
3951
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3952
|
+
url: "/clinical/deliveries",
|
|
3953
|
+
...options
|
|
3954
|
+
});
|
|
3955
|
+
var postClinicalDeliveries = (options) => (options.client ?? client).post({
|
|
3956
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3957
|
+
url: "/clinical/deliveries",
|
|
3958
|
+
...options,
|
|
3959
|
+
headers: {
|
|
3960
|
+
"Content-Type": "application/vnd.api+json",
|
|
3961
|
+
...options.headers
|
|
3962
|
+
}
|
|
3963
|
+
});
|
|
3687
3964
|
var getDataSubjectRequests = (options) => (options.client ?? client).get({
|
|
3688
3965
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3689
3966
|
url: "/data-subject-requests",
|
|
@@ -3726,6 +4003,11 @@ var getVoiceTranscriptionResultsSessionBySessionId = (options) => (options.clien
|
|
|
3726
4003
|
url: "/voice/transcription-results/session/{session_id}",
|
|
3727
4004
|
...options
|
|
3728
4005
|
});
|
|
4006
|
+
var getMessagesSearch = (options) => (options.client ?? client).get({
|
|
4007
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4008
|
+
url: "/messages/search",
|
|
4009
|
+
...options
|
|
4010
|
+
});
|
|
3729
4011
|
var postAgentsByIdTeach = (options) => (options.client ?? client).post({
|
|
3730
4012
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3731
4013
|
url: "/agents/{id}/teach",
|
|
@@ -3744,6 +4026,25 @@ var postSocialPosts = (options) => (options.client ?? client).post({
|
|
|
3744
4026
|
...options.headers
|
|
3745
4027
|
}
|
|
3746
4028
|
});
|
|
4029
|
+
var deleteClinicalPatientsById = (options) => (options.client ?? client).delete({
|
|
4030
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4031
|
+
url: "/clinical/patients/{id}",
|
|
4032
|
+
...options
|
|
4033
|
+
});
|
|
4034
|
+
var getClinicalPatientsById = (options) => (options.client ?? client).get({
|
|
4035
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4036
|
+
url: "/clinical/patients/{id}",
|
|
4037
|
+
...options
|
|
4038
|
+
});
|
|
4039
|
+
var patchClinicalPatientsById = (options) => (options.client ?? client).patch({
|
|
4040
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4041
|
+
url: "/clinical/patients/{id}",
|
|
4042
|
+
...options,
|
|
4043
|
+
headers: {
|
|
4044
|
+
"Content-Type": "application/vnd.api+json",
|
|
4045
|
+
...options.headers
|
|
4046
|
+
}
|
|
4047
|
+
});
|
|
3747
4048
|
var patchInvitationsByIdDecline = (options) => (options.client ?? client).patch({
|
|
3748
4049
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3749
4050
|
url: "/invitations/{id}/decline",
|
|
@@ -3809,6 +4110,20 @@ var getDataSubjectRequestsById = (options) => (options.client ?? client).get({
|
|
|
3809
4110
|
url: "/data-subject-requests/{id}",
|
|
3810
4111
|
...options
|
|
3811
4112
|
});
|
|
4113
|
+
var getClinicalClientResourceAssignments = (options) => (options.client ?? client).get({
|
|
4114
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4115
|
+
url: "/clinical/client-resource-assignments",
|
|
4116
|
+
...options
|
|
4117
|
+
});
|
|
4118
|
+
var postClinicalClientResourceAssignments = (options) => (options.client ?? client).post({
|
|
4119
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4120
|
+
url: "/clinical/client-resource-assignments",
|
|
4121
|
+
...options,
|
|
4122
|
+
headers: {
|
|
4123
|
+
"Content-Type": "application/vnd.api+json",
|
|
4124
|
+
...options.headers
|
|
4125
|
+
}
|
|
4126
|
+
});
|
|
3812
4127
|
var postUsersRegisterIsv = (options) => (options.client ?? client).post({
|
|
3813
4128
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3814
4129
|
url: "/users/register-isv",
|
|
@@ -4072,6 +4387,25 @@ var postSchedulingEventTypes = (options) => (options.client ?? client).post({
|
|
|
4072
4387
|
...options.headers
|
|
4073
4388
|
}
|
|
4074
4389
|
});
|
|
4390
|
+
var deleteClinicalClientSupplementsById = (options) => (options.client ?? client).delete({
|
|
4391
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4392
|
+
url: "/clinical/client-supplements/{id}",
|
|
4393
|
+
...options
|
|
4394
|
+
});
|
|
4395
|
+
var getClinicalClientSupplementsById = (options) => (options.client ?? client).get({
|
|
4396
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4397
|
+
url: "/clinical/client-supplements/{id}",
|
|
4398
|
+
...options
|
|
4399
|
+
});
|
|
4400
|
+
var patchClinicalClientSupplementsById = (options) => (options.client ?? client).patch({
|
|
4401
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4402
|
+
url: "/clinical/client-supplements/{id}",
|
|
4403
|
+
...options,
|
|
4404
|
+
headers: {
|
|
4405
|
+
"Content-Type": "application/vnd.api+json",
|
|
4406
|
+
...options.headers
|
|
4407
|
+
}
|
|
4408
|
+
});
|
|
4075
4409
|
var deleteCrmPipelinesById = (options) => (options.client ?? client).delete({
|
|
4076
4410
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4077
4411
|
url: "/crm/pipelines/{id}",
|
|
@@ -4189,6 +4523,11 @@ var postTenantsByIdSchedulePurge = (options) => (options.client ?? client).post(
|
|
|
4189
4523
|
...options.headers
|
|
4190
4524
|
}
|
|
4191
4525
|
});
|
|
4526
|
+
var getMessagesSemanticSearch = (options) => (options.client ?? client).get({
|
|
4527
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4528
|
+
url: "/messages/semantic-search",
|
|
4529
|
+
...options
|
|
4530
|
+
});
|
|
4192
4531
|
var deleteCrmActivitiesById = (options) => (options.client ?? client).delete({
|
|
4193
4532
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4194
4533
|
url: "/crm/activities/{id}",
|
|
@@ -4372,6 +4711,20 @@ var patchUserProfilesByIdDismissWelcome = (options) => (options.client ?? client
|
|
|
4372
4711
|
...options.headers
|
|
4373
4712
|
}
|
|
4374
4713
|
});
|
|
4714
|
+
var getClinicalHealthMetrics = (options) => (options.client ?? client).get({
|
|
4715
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4716
|
+
url: "/clinical/health-metrics",
|
|
4717
|
+
...options
|
|
4718
|
+
});
|
|
4719
|
+
var postClinicalHealthMetrics = (options) => (options.client ?? client).post({
|
|
4720
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4721
|
+
url: "/clinical/health-metrics",
|
|
4722
|
+
...options,
|
|
4723
|
+
headers: {
|
|
4724
|
+
"Content-Type": "application/vnd.api+json",
|
|
4725
|
+
...options.headers
|
|
4726
|
+
}
|
|
4727
|
+
});
|
|
4375
4728
|
var patchWalletAddonsByAddonSlugCancel = (options) => (options.client ?? client).patch({
|
|
4376
4729
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4377
4730
|
url: "/wallet/addons/{addon_slug}/cancel",
|
|
@@ -4409,6 +4762,20 @@ var patchEmailOutboundEmailsByIdSchedule = (options) => (options.client ?? clien
|
|
|
4409
4762
|
...options.headers
|
|
4410
4763
|
}
|
|
4411
4764
|
});
|
|
4765
|
+
var getClinicalPatients = (options) => (options.client ?? client).get({
|
|
4766
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4767
|
+
url: "/clinical/patients",
|
|
4768
|
+
...options
|
|
4769
|
+
});
|
|
4770
|
+
var postClinicalPatients = (options) => (options.client ?? client).post({
|
|
4771
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4772
|
+
url: "/clinical/patients",
|
|
4773
|
+
...options,
|
|
4774
|
+
headers: {
|
|
4775
|
+
"Content-Type": "application/vnd.api+json",
|
|
4776
|
+
...options.headers
|
|
4777
|
+
}
|
|
4778
|
+
});
|
|
4412
4779
|
var patchExtractionDocumentsByIdVerification = (options) => (options.client ?? client).patch({
|
|
4413
4780
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4414
4781
|
url: "/extraction/documents/{id}/verification",
|
|
@@ -4437,6 +4804,11 @@ var getTransactions = (options) => (options.client ?? client).get({
|
|
|
4437
4804
|
url: "/transactions",
|
|
4438
4805
|
...options
|
|
4439
4806
|
});
|
|
4807
|
+
var getThreadsSearch = (options) => (options.client ?? client).get({
|
|
4808
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4809
|
+
url: "/threads/search",
|
|
4810
|
+
...options
|
|
4811
|
+
});
|
|
4440
4812
|
var patchSocialAccountsByIdEnablePosting = (options) => (options.client ?? client).patch({
|
|
4441
4813
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4442
4814
|
url: "/social/accounts/{id}/enable-posting",
|
|
@@ -4570,14 +4942,28 @@ var patchSupportTicketsByIdClose = (options) => (options.client ?? client).patch
|
|
|
4570
4942
|
...options.headers
|
|
4571
4943
|
}
|
|
4572
4944
|
});
|
|
4573
|
-
var
|
|
4945
|
+
var getClinicalClientGoals = (options) => (options.client ?? client).get({
|
|
4574
4946
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4575
|
-
url: "/
|
|
4947
|
+
url: "/clinical/client-goals",
|
|
4576
4948
|
...options
|
|
4577
4949
|
});
|
|
4578
|
-
var
|
|
4950
|
+
var postClinicalClientGoals = (options) => (options.client ?? client).post({
|
|
4579
4951
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4580
|
-
url: "/
|
|
4952
|
+
url: "/clinical/client-goals",
|
|
4953
|
+
...options,
|
|
4954
|
+
headers: {
|
|
4955
|
+
"Content-Type": "application/vnd.api+json",
|
|
4956
|
+
...options.headers
|
|
4957
|
+
}
|
|
4958
|
+
});
|
|
4959
|
+
var getWalletSeats = (options) => (options.client ?? client).get({
|
|
4960
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4961
|
+
url: "/wallet/seats",
|
|
4962
|
+
...options
|
|
4963
|
+
});
|
|
4964
|
+
var getPermissions = (options) => (options.client ?? client).get({
|
|
4965
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4966
|
+
url: "/permissions",
|
|
4581
4967
|
...options
|
|
4582
4968
|
});
|
|
4583
4969
|
var patchEmailOutboundEmailsByIdCancelSchedule = (options) => (options.client ?? client).patch({
|
|
@@ -4621,6 +5007,20 @@ var patchSchedulingEventsByIdReschedule = (options) => (options.client ?? client
|
|
|
4621
5007
|
...options.headers
|
|
4622
5008
|
}
|
|
4623
5009
|
});
|
|
5010
|
+
var getClinicalPracticeResources = (options) => (options.client ?? client).get({
|
|
5011
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5012
|
+
url: "/clinical/practice-resources",
|
|
5013
|
+
...options
|
|
5014
|
+
});
|
|
5015
|
+
var postClinicalPracticeResources = (options) => (options.client ?? client).post({
|
|
5016
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5017
|
+
url: "/clinical/practice-resources",
|
|
5018
|
+
...options,
|
|
5019
|
+
headers: {
|
|
5020
|
+
"Content-Type": "application/vnd.api+json",
|
|
5021
|
+
...options.headers
|
|
5022
|
+
}
|
|
5023
|
+
});
|
|
4624
5024
|
var getCampaignsSequencesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
4625
5025
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4626
5026
|
url: "/campaigns/sequences/workspace/{workspace_id}",
|
|
@@ -4667,6 +5067,11 @@ var postEmailMarketingSenderProfiles = (options) => (options.client ?? client).p
|
|
|
4667
5067
|
...options.headers
|
|
4668
5068
|
}
|
|
4669
5069
|
});
|
|
5070
|
+
var getClinicalPatientsByIdResourceAssignments = (options) => (options.client ?? client).get({
|
|
5071
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5072
|
+
url: "/clinical/patients/{id}/resource_assignments",
|
|
5073
|
+
...options
|
|
5074
|
+
});
|
|
4670
5075
|
var getWatcherClaimsById = (options) => (options.client ?? client).get({
|
|
4671
5076
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4672
5077
|
url: "/watcher/claims/{id}",
|
|
@@ -4690,6 +5095,25 @@ var postUsersAuthLogin = (options) => (options.client ?? client).post({
|
|
|
4690
5095
|
...options.headers
|
|
4691
5096
|
}
|
|
4692
5097
|
});
|
|
5098
|
+
var deleteClinicalHealthMetricsById = (options) => (options.client ?? client).delete({
|
|
5099
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5100
|
+
url: "/clinical/health-metrics/{id}",
|
|
5101
|
+
...options
|
|
5102
|
+
});
|
|
5103
|
+
var getClinicalHealthMetricsById = (options) => (options.client ?? client).get({
|
|
5104
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5105
|
+
url: "/clinical/health-metrics/{id}",
|
|
5106
|
+
...options
|
|
5107
|
+
});
|
|
5108
|
+
var patchClinicalHealthMetricsById = (options) => (options.client ?? client).patch({
|
|
5109
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5110
|
+
url: "/clinical/health-metrics/{id}",
|
|
5111
|
+
...options,
|
|
5112
|
+
headers: {
|
|
5113
|
+
"Content-Type": "application/vnd.api+json",
|
|
5114
|
+
...options.headers
|
|
5115
|
+
}
|
|
5116
|
+
});
|
|
4693
5117
|
var getSocialMetricsPostBySocialPostId = (options) => (options.client ?? client).get({
|
|
4694
5118
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4695
5119
|
url: "/social/metrics/post/{social_post_id}",
|
|
@@ -4792,6 +5216,20 @@ var patchExtractionResultsByIdRegenerate = (options) => (options.client ?? clien
|
|
|
4792
5216
|
...options.headers
|
|
4793
5217
|
}
|
|
4794
5218
|
});
|
|
5219
|
+
var getClinicalClientSupplements = (options) => (options.client ?? client).get({
|
|
5220
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5221
|
+
url: "/clinical/client-supplements",
|
|
5222
|
+
...options
|
|
5223
|
+
});
|
|
5224
|
+
var postClinicalClientSupplements = (options) => (options.client ?? client).post({
|
|
5225
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5226
|
+
url: "/clinical/client-supplements",
|
|
5227
|
+
...options,
|
|
5228
|
+
headers: {
|
|
5229
|
+
"Content-Type": "application/vnd.api+json",
|
|
5230
|
+
...options.headers
|
|
5231
|
+
}
|
|
5232
|
+
});
|
|
4795
5233
|
var postUsersAuthConfirm = (options) => (options.client ?? client).post({
|
|
4796
5234
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4797
5235
|
url: "/users/auth/confirm",
|
|
@@ -4986,6 +5424,25 @@ var getExtractionDocumentsWorkspaceByWorkspaceId = (options) => (options.client
|
|
|
4986
5424
|
url: "/extraction/documents/workspace/{workspace_id}",
|
|
4987
5425
|
...options
|
|
4988
5426
|
});
|
|
5427
|
+
var getMemoryDocumentSectionsById = (options) => (options.client ?? client).get({
|
|
5428
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5429
|
+
url: "/memory/document-sections/{id}",
|
|
5430
|
+
...options
|
|
5431
|
+
});
|
|
5432
|
+
var getClinicalDeliveriesById = (options) => (options.client ?? client).get({
|
|
5433
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5434
|
+
url: "/clinical/deliveries/{id}",
|
|
5435
|
+
...options
|
|
5436
|
+
});
|
|
5437
|
+
var patchClinicalDeliveriesById = (options) => (options.client ?? client).patch({
|
|
5438
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5439
|
+
url: "/clinical/deliveries/{id}",
|
|
5440
|
+
...options,
|
|
5441
|
+
headers: {
|
|
5442
|
+
"Content-Type": "application/vnd.api+json",
|
|
5443
|
+
...options.headers
|
|
5444
|
+
}
|
|
5445
|
+
});
|
|
4989
5446
|
var postUsersAuthMagicLinkRequest = (options) => (options.client ?? client).post({
|
|
4990
5447
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4991
5448
|
url: "/users/auth/magic-link/request",
|
|
@@ -5187,6 +5644,20 @@ var getFeatureUsages = (options) => (options.client ?? client).get({
|
|
|
5187
5644
|
url: "/feature-usages",
|
|
5188
5645
|
...options
|
|
5189
5646
|
});
|
|
5647
|
+
var getClinicalMealPlans = (options) => (options.client ?? client).get({
|
|
5648
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5649
|
+
url: "/clinical/meal-plans",
|
|
5650
|
+
...options
|
|
5651
|
+
});
|
|
5652
|
+
var postClinicalMealPlans = (options) => (options.client ?? client).post({
|
|
5653
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5654
|
+
url: "/clinical/meal-plans",
|
|
5655
|
+
...options,
|
|
5656
|
+
headers: {
|
|
5657
|
+
"Content-Type": "application/vnd.api+json",
|
|
5658
|
+
...options.headers
|
|
5659
|
+
}
|
|
5660
|
+
});
|
|
5190
5661
|
var getAiMessages = (options) => (options.client ?? client).get({
|
|
5191
5662
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5192
5663
|
url: "/ai/messages",
|
|
@@ -5364,11 +5835,25 @@ var getAgentVersionsByIdRevisions = (options) => (options.client ?? client).get(
|
|
|
5364
5835
|
url: "/agent-versions/{id}/revisions",
|
|
5365
5836
|
...options
|
|
5366
5837
|
});
|
|
5838
|
+
var patchClinicalNotesByIdReject = (options) => (options.client ?? client).patch({
|
|
5839
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5840
|
+
url: "/clinical/notes/{id}/reject",
|
|
5841
|
+
...options,
|
|
5842
|
+
headers: {
|
|
5843
|
+
"Content-Type": "application/vnd.api+json",
|
|
5844
|
+
...options.headers
|
|
5845
|
+
}
|
|
5846
|
+
});
|
|
5367
5847
|
var getLegalDocumentsForApplication = (options) => (options.client ?? client).get({
|
|
5368
5848
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5369
5849
|
url: "/legal-documents/for-application",
|
|
5370
5850
|
...options
|
|
5371
5851
|
});
|
|
5852
|
+
var getClinicalPatientsByIdGoals = (options) => (options.client ?? client).get({
|
|
5853
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5854
|
+
url: "/clinical/patients/{id}/goals",
|
|
5855
|
+
...options
|
|
5856
|
+
});
|
|
5372
5857
|
var patchStorageFilesByIdTag = (options) => (options.client ?? client).patch({
|
|
5373
5858
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5374
5859
|
url: "/storage-files/{id}/tag",
|
|
@@ -6726,7 +7211,7 @@ function createAgentsNamespace(rb) {
|
|
|
6726
7211
|
*
|
|
6727
7212
|
* @example
|
|
6728
7213
|
* const sv = await client.agents.versions.schemaVersions.create('agt_01...', {
|
|
6729
|
-
*
|
|
7214
|
+
* output_schema: { type: 'object', properties: { amount: { type: 'number' } } },
|
|
6730
7215
|
* });
|
|
6731
7216
|
*/
|
|
6732
7217
|
create: async (agentId, attributes, options) => {
|
|
@@ -6768,7 +7253,7 @@ function createAgentsNamespace(rb) {
|
|
|
6768
7253
|
*
|
|
6769
7254
|
* @example
|
|
6770
7255
|
* await client.agents.versions.schemaVersions.update('agt_01...', 'ver_01...', {
|
|
6771
|
-
*
|
|
7256
|
+
* output_schema: { type: 'object', properties: { total: { type: 'number' } } },
|
|
6772
7257
|
* });
|
|
6773
7258
|
*/
|
|
6774
7259
|
update: async (agentId, versionId, attributes, options) => {
|
|
@@ -7330,10 +7815,10 @@ function createAgentsNamespace(rb) {
|
|
|
7330
7815
|
* @example
|
|
7331
7816
|
* await client.agents.executions.approve('exec_01...');
|
|
7332
7817
|
*/
|
|
7333
|
-
approve: async (id, options) => {
|
|
7818
|
+
approve: async (id, approvedData, options) => {
|
|
7334
7819
|
return rb.rawPost(
|
|
7335
7820
|
`/agent-executions/${id}/approve`,
|
|
7336
|
-
void 0,
|
|
7821
|
+
approvedData !== void 0 ? { approved_data: approvedData } : void 0,
|
|
7337
7822
|
options
|
|
7338
7823
|
);
|
|
7339
7824
|
},
|
|
@@ -9212,186 +9697,1286 @@ function createCatalogNamespace(rb) {
|
|
|
9212
9697
|
);
|
|
9213
9698
|
},
|
|
9214
9699
|
/**
|
|
9215
|
-
* Permanently delete a taxonomy and all of its nodes.
|
|
9216
|
-
*
|
|
9217
|
-
* @param id - The unique identifier of the taxonomy to delete.
|
|
9218
|
-
* @param options - Optional request-level overrides.
|
|
9219
|
-
* @returns A promise that resolves to `true` on successful deletion.
|
|
9700
|
+
* Permanently delete a taxonomy and all of its nodes.
|
|
9701
|
+
*
|
|
9702
|
+
* @param id - The unique identifier of the taxonomy to delete.
|
|
9703
|
+
* @param options - Optional request-level overrides.
|
|
9704
|
+
* @returns A promise that resolves to `true` on successful deletion.
|
|
9705
|
+
*
|
|
9706
|
+
* @example
|
|
9707
|
+
* ```typescript
|
|
9708
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
9709
|
+
*
|
|
9710
|
+
* await client.catalog.taxonomies.delete('tax_abc123');
|
|
9711
|
+
* ```
|
|
9712
|
+
*/
|
|
9713
|
+
delete: async (id, options) => {
|
|
9714
|
+
return rb.executeDelete(
|
|
9715
|
+
deleteCatalogTaxonomiesById,
|
|
9716
|
+
{ path: { id } },
|
|
9717
|
+
options
|
|
9718
|
+
);
|
|
9719
|
+
}
|
|
9720
|
+
},
|
|
9721
|
+
/**
|
|
9722
|
+
* Taxonomy nodes — individual nodes within a taxonomy tree.
|
|
9723
|
+
*
|
|
9724
|
+
* Each node represents a single category (e.g. "T-Shirts") within a
|
|
9725
|
+
* taxonomy. Nodes can be nested to arbitrary depth by setting a
|
|
9726
|
+
* `parent_node_id`, forming the hierarchical tree. A node with no parent
|
|
9727
|
+
* is a root-level category.
|
|
9728
|
+
*/
|
|
9729
|
+
taxonomyNodes: {
|
|
9730
|
+
/**
|
|
9731
|
+
* List all nodes that belong to a specific taxonomy.
|
|
9732
|
+
*
|
|
9733
|
+
* Returns the full flat list of nodes for the taxonomy. To reconstruct
|
|
9734
|
+
* the tree, group nodes by their `parent_node_id` field.
|
|
9735
|
+
*
|
|
9736
|
+
* @param taxonomyId - The ID of the taxonomy whose nodes to list.
|
|
9737
|
+
* @param options - Optional request-level overrides.
|
|
9738
|
+
* @returns A promise that resolves to an array of {@link CatalogTaxonomyNode} records.
|
|
9739
|
+
*
|
|
9740
|
+
* @example
|
|
9741
|
+
* ```typescript
|
|
9742
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
9743
|
+
*
|
|
9744
|
+
* const nodes = await client.catalog.taxonomyNodes.listByTaxonomy('tax_abc123');
|
|
9745
|
+
* const roots = nodes.filter((n) => !n.attributes.parent_node_id);
|
|
9746
|
+
* console.log('Root categories:', roots.map((n) => n.attributes.name));
|
|
9747
|
+
* ```
|
|
9748
|
+
*/
|
|
9749
|
+
listByTaxonomy: async (taxonomyId, options) => {
|
|
9750
|
+
return rb.execute(
|
|
9751
|
+
getCatalogTaxonomyNodesTaxonomyByTaxonomyId,
|
|
9752
|
+
{ path: { taxonomy_id: taxonomyId } },
|
|
9753
|
+
options
|
|
9754
|
+
);
|
|
9755
|
+
},
|
|
9756
|
+
/**
|
|
9757
|
+
* Fetch a single taxonomy node by its unique ID.
|
|
9758
|
+
*
|
|
9759
|
+
* @param id - The unique identifier of the node to retrieve.
|
|
9760
|
+
* @param options - Optional request-level overrides.
|
|
9761
|
+
* @returns A promise that resolves to the matching {@link CatalogTaxonomyNode}.
|
|
9762
|
+
*
|
|
9763
|
+
* @example
|
|
9764
|
+
* ```typescript
|
|
9765
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
9766
|
+
*
|
|
9767
|
+
* const node = await client.catalog.taxonomyNodes.get('node_abc123');
|
|
9768
|
+
* console.log(node.attributes.name, node.attributes.parent_node_id);
|
|
9769
|
+
* ```
|
|
9770
|
+
*/
|
|
9771
|
+
get: async (id, options) => {
|
|
9772
|
+
return rb.execute(
|
|
9773
|
+
getCatalogTaxonomyNodesById,
|
|
9774
|
+
{ path: { id } },
|
|
9775
|
+
options
|
|
9776
|
+
);
|
|
9777
|
+
},
|
|
9778
|
+
/**
|
|
9779
|
+
* Create a new node within a taxonomy.
|
|
9780
|
+
*
|
|
9781
|
+
* To create a root-level category, omit `parent_node_id`. To nest a
|
|
9782
|
+
* category under an existing node, include `parent_node_id` pointing to
|
|
9783
|
+
* the parent's ID.
|
|
9784
|
+
*
|
|
9785
|
+
* @param attributes - Key/value map of node attributes. Must include
|
|
9786
|
+
* `taxonomy_id` and `name`. Optionally include `parent_node_id` to
|
|
9787
|
+
* nest the node within the tree.
|
|
9788
|
+
* @param options - Optional request-level overrides.
|
|
9789
|
+
* @returns A promise that resolves to the newly created {@link CatalogTaxonomyNode}.
|
|
9790
|
+
*
|
|
9791
|
+
* @example
|
|
9792
|
+
* ```typescript
|
|
9793
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
9794
|
+
*
|
|
9795
|
+
* // Create a root-level category
|
|
9796
|
+
* const clothing = await client.catalog.taxonomyNodes.create({
|
|
9797
|
+
* taxonomy_id: 'tax_abc123',
|
|
9798
|
+
* name: 'Clothing',
|
|
9799
|
+
* });
|
|
9800
|
+
*
|
|
9801
|
+
* // Create a child category under 'Clothing'
|
|
9802
|
+
* const tops = await client.catalog.taxonomyNodes.create({
|
|
9803
|
+
* taxonomy_id: 'tax_abc123',
|
|
9804
|
+
* name: 'Tops',
|
|
9805
|
+
* parent_node_id: clothing.id,
|
|
9806
|
+
* });
|
|
9807
|
+
* ```
|
|
9808
|
+
*/
|
|
9809
|
+
create: async (attributes, options) => {
|
|
9810
|
+
return rb.execute(
|
|
9811
|
+
postCatalogTaxonomyNodes,
|
|
9812
|
+
{
|
|
9813
|
+
body: {
|
|
9814
|
+
data: { type: "catalog_taxonomy_node", attributes }
|
|
9815
|
+
}
|
|
9816
|
+
},
|
|
9817
|
+
options
|
|
9818
|
+
);
|
|
9819
|
+
},
|
|
9820
|
+
/**
|
|
9821
|
+
* Update an existing taxonomy node's attributes.
|
|
9822
|
+
*
|
|
9823
|
+
* Only the fields present in `attributes` are changed (PATCH semantics).
|
|
9824
|
+
* You can use this to rename a category or re-parent it within the tree
|
|
9825
|
+
* by changing `parent_node_id`.
|
|
9826
|
+
*
|
|
9827
|
+
* @param id - The unique identifier of the node to update.
|
|
9828
|
+
* @param attributes - Key/value map of attributes to change.
|
|
9829
|
+
* @param options - Optional request-level overrides.
|
|
9830
|
+
* @returns A promise that resolves to the updated {@link CatalogTaxonomyNode}.
|
|
9831
|
+
*
|
|
9832
|
+
* @example
|
|
9833
|
+
* ```typescript
|
|
9834
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
9835
|
+
*
|
|
9836
|
+
* // Rename a category
|
|
9837
|
+
* const node = await client.catalog.taxonomyNodes.update('node_abc123', {
|
|
9838
|
+
* name: 'Apparel',
|
|
9839
|
+
* });
|
|
9840
|
+
* console.log(node.attributes.name); // 'Apparel'
|
|
9841
|
+
* ```
|
|
9842
|
+
*/
|
|
9843
|
+
update: async (id, attributes, options) => {
|
|
9844
|
+
return rb.execute(
|
|
9845
|
+
patchCatalogTaxonomyNodesById,
|
|
9846
|
+
{
|
|
9847
|
+
path: { id },
|
|
9848
|
+
body: {
|
|
9849
|
+
data: { type: "catalog_taxonomy_node", id, attributes }
|
|
9850
|
+
}
|
|
9851
|
+
},
|
|
9852
|
+
options
|
|
9853
|
+
);
|
|
9854
|
+
},
|
|
9855
|
+
/**
|
|
9856
|
+
* Permanently delete a taxonomy node.
|
|
9857
|
+
*
|
|
9858
|
+
* If the node has child nodes, those children will also be removed
|
|
9859
|
+
* recursively. Ensure products are re-categorised before deleting a node
|
|
9860
|
+
* that has products assigned to it.
|
|
9861
|
+
*
|
|
9862
|
+
* @param id - The unique identifier of the node to delete.
|
|
9863
|
+
* @param options - Optional request-level overrides.
|
|
9864
|
+
* @returns A promise that resolves to `true` on successful deletion.
|
|
9865
|
+
*
|
|
9866
|
+
* @example
|
|
9867
|
+
* ```typescript
|
|
9868
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
9869
|
+
*
|
|
9870
|
+
* await client.catalog.taxonomyNodes.delete('node_abc123');
|
|
9871
|
+
* ```
|
|
9872
|
+
*/
|
|
9873
|
+
delete: async (id, options) => {
|
|
9874
|
+
return rb.executeDelete(
|
|
9875
|
+
deleteCatalogTaxonomyNodesById,
|
|
9876
|
+
{ path: { id } },
|
|
9877
|
+
options
|
|
9878
|
+
);
|
|
9879
|
+
}
|
|
9880
|
+
}
|
|
9881
|
+
};
|
|
9882
|
+
}
|
|
9883
|
+
|
|
9884
|
+
// src/namespaces/clinical.ts
|
|
9885
|
+
function createClinicalNamespace(rb) {
|
|
9886
|
+
return {
|
|
9887
|
+
/**
|
|
9888
|
+
* Manage clinical patients (end users of the platform's health service).
|
|
9889
|
+
*/
|
|
9890
|
+
patients: {
|
|
9891
|
+
/**
|
|
9892
|
+
* List patients in a workspace.
|
|
9893
|
+
*
|
|
9894
|
+
* @param params - Filter/pagination parameters (must include `filter[workspace_id]`)
|
|
9895
|
+
* @param options - Request options
|
|
9896
|
+
* @returns Array of {@link ClinicalPatient} records
|
|
9897
|
+
*
|
|
9898
|
+
* @example
|
|
9899
|
+
* ```typescript
|
|
9900
|
+
* const patients = await client.clinical.patients.list({
|
|
9901
|
+
* filter: { workspace_id: 'ws_123' },
|
|
9902
|
+
* });
|
|
9903
|
+
* ```
|
|
9904
|
+
*/
|
|
9905
|
+
list: async (params, options) => rb.execute(
|
|
9906
|
+
getClinicalPatients,
|
|
9907
|
+
params ?? {},
|
|
9908
|
+
options
|
|
9909
|
+
),
|
|
9910
|
+
/**
|
|
9911
|
+
* Get a single patient by ID.
|
|
9912
|
+
*
|
|
9913
|
+
* @param id - Patient UUID
|
|
9914
|
+
* @param options - Request options
|
|
9915
|
+
* @returns {@link ClinicalPatient} record
|
|
9916
|
+
*
|
|
9917
|
+
* @example
|
|
9918
|
+
* ```typescript
|
|
9919
|
+
* const patient = await client.clinical.patients.get('pat_abc123');
|
|
9920
|
+
* ```
|
|
9921
|
+
*/
|
|
9922
|
+
get: async (id, options) => rb.execute(
|
|
9923
|
+
getClinicalPatientsById,
|
|
9924
|
+
{ path: { id } },
|
|
9925
|
+
options
|
|
9926
|
+
),
|
|
9927
|
+
/**
|
|
9928
|
+
* Create a new clinical patient.
|
|
9929
|
+
*
|
|
9930
|
+
* @param attributes - Patient creation attributes. Must include `workspace_id`.
|
|
9931
|
+
* @param options - Request options
|
|
9932
|
+
* @returns Created {@link ClinicalPatient} record
|
|
9933
|
+
*
|
|
9934
|
+
* @example
|
|
9935
|
+
* ```typescript
|
|
9936
|
+
* const patient = await client.clinical.patients.create({
|
|
9937
|
+
* workspace_id: 'ws_123',
|
|
9938
|
+
* contact_id: 'contact_abc',
|
|
9939
|
+
* status: 'active',
|
|
9940
|
+
* });
|
|
9941
|
+
* ```
|
|
9942
|
+
*/
|
|
9943
|
+
create: async (attributes, options) => rb.execute(
|
|
9944
|
+
postClinicalPatients,
|
|
9945
|
+
{ body: { data: { type: "clinical-patient", attributes } } },
|
|
9946
|
+
options
|
|
9947
|
+
),
|
|
9948
|
+
/**
|
|
9949
|
+
* Update a clinical patient.
|
|
9950
|
+
*
|
|
9951
|
+
* @param id - Patient UUID
|
|
9952
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
9953
|
+
* @param options - Request options
|
|
9954
|
+
* @returns Updated {@link ClinicalPatient} record
|
|
9955
|
+
*
|
|
9956
|
+
* @example
|
|
9957
|
+
* ```typescript
|
|
9958
|
+
* const updated = await client.clinical.patients.update('pat_abc123', {
|
|
9959
|
+
* status: 'inactive',
|
|
9960
|
+
* });
|
|
9961
|
+
* ```
|
|
9962
|
+
*/
|
|
9963
|
+
update: async (id, attributes, options) => rb.execute(
|
|
9964
|
+
patchClinicalPatientsById,
|
|
9965
|
+
{
|
|
9966
|
+
path: { id },
|
|
9967
|
+
body: { data: { type: "clinical-patient", id, attributes } }
|
|
9968
|
+
},
|
|
9969
|
+
options
|
|
9970
|
+
),
|
|
9971
|
+
/**
|
|
9972
|
+
* Delete a clinical patient.
|
|
9973
|
+
*
|
|
9974
|
+
* @param id - Patient UUID
|
|
9975
|
+
* @param options - Request options
|
|
9976
|
+
* @returns `true` on successful deletion
|
|
9977
|
+
*
|
|
9978
|
+
* @example
|
|
9979
|
+
* ```typescript
|
|
9980
|
+
* await client.clinical.patients.delete('pat_abc123');
|
|
9981
|
+
* ```
|
|
9982
|
+
*/
|
|
9983
|
+
delete: async (id, options) => rb.executeDelete(deleteClinicalPatientsById, { path: { id } }, options),
|
|
9984
|
+
/**
|
|
9985
|
+
* List health metrics for a patient (related resource).
|
|
9986
|
+
*
|
|
9987
|
+
* @param patientId - Patient UUID
|
|
9988
|
+
* @param options - Request options
|
|
9989
|
+
* @returns Array of {@link ClinicalHealthMetric} records
|
|
9990
|
+
*/
|
|
9991
|
+
healthMetrics: async (patientId, options) => rb.execute(
|
|
9992
|
+
getClinicalPatientsByIdHealthMetrics,
|
|
9993
|
+
{ path: { id: patientId } },
|
|
9994
|
+
options
|
|
9995
|
+
),
|
|
9996
|
+
/**
|
|
9997
|
+
* List goals for a patient (related resource).
|
|
9998
|
+
*
|
|
9999
|
+
* @param patientId - Patient UUID
|
|
10000
|
+
* @param options - Request options
|
|
10001
|
+
* @returns Array of {@link ClinicalClientGoal} records
|
|
10002
|
+
*/
|
|
10003
|
+
goals: async (patientId, options) => rb.execute(
|
|
10004
|
+
getClinicalPatientsByIdGoals,
|
|
10005
|
+
{ path: { id: patientId } },
|
|
10006
|
+
options
|
|
10007
|
+
),
|
|
10008
|
+
/**
|
|
10009
|
+
* List supplements for a patient (related resource).
|
|
10010
|
+
*
|
|
10011
|
+
* @param patientId - Patient UUID
|
|
10012
|
+
* @param options - Request options
|
|
10013
|
+
* @returns Array of {@link ClinicalClientSupplement} records
|
|
10014
|
+
*/
|
|
10015
|
+
supplements: async (patientId, options) => rb.execute(
|
|
10016
|
+
getClinicalPatientsByIdSupplements,
|
|
10017
|
+
{ path: { id: patientId } },
|
|
10018
|
+
options
|
|
10019
|
+
),
|
|
10020
|
+
/**
|
|
10021
|
+
* List resource assignments for a patient (related resource).
|
|
10022
|
+
*
|
|
10023
|
+
* @param patientId - Patient UUID
|
|
10024
|
+
* @param options - Request options
|
|
10025
|
+
* @returns Array of {@link ClinicalClientResourceAssignment} records
|
|
10026
|
+
*/
|
|
10027
|
+
resourceAssignments: async (patientId, options) => rb.execute(
|
|
10028
|
+
getClinicalPatientsByIdResourceAssignments,
|
|
10029
|
+
{ path: { id: patientId } },
|
|
10030
|
+
options
|
|
10031
|
+
),
|
|
10032
|
+
/**
|
|
10033
|
+
* Get patient adherence summary for a given period.
|
|
10034
|
+
*
|
|
10035
|
+
* Returns goal completion rates and health metric tracking stats.
|
|
10036
|
+
*
|
|
10037
|
+
* @param patientId - Patient UUID
|
|
10038
|
+
* @param workspaceId - Workspace UUID (required)
|
|
10039
|
+
* @param days - Number of days to look back (default: 30, max: 365)
|
|
10040
|
+
* @param options - Request options
|
|
10041
|
+
* @returns {@link PatientAdherenceResponse} with goal and metric breakdowns
|
|
10042
|
+
*
|
|
10043
|
+
* @example
|
|
10044
|
+
* ```typescript
|
|
10045
|
+
* const adherence = await client.clinical.patients.getAdherence(
|
|
10046
|
+
* 'pat_abc123',
|
|
10047
|
+
* 'ws_123',
|
|
10048
|
+
* 30,
|
|
10049
|
+
* );
|
|
10050
|
+
* console.log(adherence.goals.completion_rate); // 0.75
|
|
10051
|
+
* ```
|
|
10052
|
+
*/
|
|
10053
|
+
getAdherence: async (patientId, workspaceId, days, options) => {
|
|
10054
|
+
const qs = new URLSearchParams({ workspace_id: workspaceId });
|
|
10055
|
+
if (days !== void 0) qs.set("days", String(days));
|
|
10056
|
+
return rb.rawGet(
|
|
10057
|
+
`/clinical/patients/${patientId}/adherence?${qs.toString()}`,
|
|
10058
|
+
options
|
|
10059
|
+
);
|
|
10060
|
+
}
|
|
10061
|
+
},
|
|
10062
|
+
/**
|
|
10063
|
+
* Manage clinical sessions (practitioner–patient encounters).
|
|
10064
|
+
*/
|
|
10065
|
+
sessions: {
|
|
10066
|
+
/**
|
|
10067
|
+
* List sessions in a workspace.
|
|
10068
|
+
*
|
|
10069
|
+
* @param params - Filter/pagination parameters
|
|
10070
|
+
* @param options - Request options
|
|
10071
|
+
* @returns Array of {@link ClinicalSession} records
|
|
10072
|
+
*/
|
|
10073
|
+
list: async (params, options) => rb.execute(
|
|
10074
|
+
getClinicalSessions,
|
|
10075
|
+
params ?? {},
|
|
10076
|
+
options
|
|
10077
|
+
),
|
|
10078
|
+
/**
|
|
10079
|
+
* Get a single session by ID.
|
|
10080
|
+
*
|
|
10081
|
+
* @param id - Session UUID
|
|
10082
|
+
* @param options - Request options
|
|
10083
|
+
* @returns {@link ClinicalSession} record
|
|
10084
|
+
*/
|
|
10085
|
+
get: async (id, options) => rb.execute(
|
|
10086
|
+
getClinicalSessionsById,
|
|
10087
|
+
{ path: { id } },
|
|
10088
|
+
options
|
|
10089
|
+
),
|
|
10090
|
+
/**
|
|
10091
|
+
* Create a new clinical session.
|
|
10092
|
+
*
|
|
10093
|
+
* @param attributes - Session creation attributes. Must include `workspace_id` and `patient_id`.
|
|
10094
|
+
* @param options - Request options
|
|
10095
|
+
* @returns Created {@link ClinicalSession} record
|
|
10096
|
+
*/
|
|
10097
|
+
create: async (attributes, options) => rb.execute(
|
|
10098
|
+
postClinicalSessions,
|
|
10099
|
+
{ body: { data: { type: "clinical-session", attributes } } },
|
|
10100
|
+
options
|
|
10101
|
+
),
|
|
10102
|
+
/**
|
|
10103
|
+
* Update a clinical session.
|
|
10104
|
+
*
|
|
10105
|
+
* @param id - Session UUID
|
|
10106
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10107
|
+
* @param options - Request options
|
|
10108
|
+
* @returns Updated {@link ClinicalSession} record
|
|
10109
|
+
*/
|
|
10110
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10111
|
+
patchClinicalSessionsById,
|
|
10112
|
+
{
|
|
10113
|
+
path: { id },
|
|
10114
|
+
body: { data: { type: "clinical-session", id, attributes } }
|
|
10115
|
+
},
|
|
10116
|
+
options
|
|
10117
|
+
),
|
|
10118
|
+
/**
|
|
10119
|
+
* Delete a clinical session.
|
|
10120
|
+
*
|
|
10121
|
+
* @param id - Session UUID
|
|
10122
|
+
* @param options - Request options
|
|
10123
|
+
* @returns `true` on successful deletion
|
|
10124
|
+
*/
|
|
10125
|
+
delete: async (id, options) => rb.executeDelete(deleteClinicalSessionsById, { path: { id } }, options),
|
|
10126
|
+
/**
|
|
10127
|
+
* List notes for a session (related resource).
|
|
10128
|
+
*
|
|
10129
|
+
* @param sessionId - Session UUID
|
|
10130
|
+
* @param options - Request options
|
|
10131
|
+
* @returns Array of {@link ClinicalNote} records
|
|
10132
|
+
*/
|
|
10133
|
+
notes: async (sessionId, options) => rb.execute(
|
|
10134
|
+
getClinicalSessionsByIdSessionNotes,
|
|
10135
|
+
{ path: { id: sessionId } },
|
|
10136
|
+
options
|
|
10137
|
+
),
|
|
10138
|
+
/**
|
|
10139
|
+
* List meal plans for a session (related resource).
|
|
10140
|
+
*
|
|
10141
|
+
* @param sessionId - Session UUID
|
|
10142
|
+
* @param options - Request options
|
|
10143
|
+
* @returns Array of {@link ClinicalMealPlan} records
|
|
10144
|
+
*/
|
|
10145
|
+
mealPlans: async (sessionId, options) => rb.execute(
|
|
10146
|
+
getClinicalSessionsByIdMealPlans,
|
|
10147
|
+
{ path: { id: sessionId } },
|
|
10148
|
+
options
|
|
10149
|
+
),
|
|
10150
|
+
/**
|
|
10151
|
+
* Trigger the AI processing pipeline for a session.
|
|
10152
|
+
*
|
|
10153
|
+
* Processes the session transcript to extract clinical insights and generate notes.
|
|
10154
|
+
* Returns immediately with an execution ID; poll `client.agents.executions.get(id)` for results.
|
|
10155
|
+
*
|
|
10156
|
+
* @param sessionId - Session UUID
|
|
10157
|
+
* @param workspaceId - Workspace UUID
|
|
10158
|
+
* @param options - Request options
|
|
10159
|
+
* @returns {@link TriggerPipelineResponse} with execution_id (may be null if pipeline not configured)
|
|
10160
|
+
*
|
|
10161
|
+
* @example
|
|
10162
|
+
* ```typescript
|
|
10163
|
+
* const { execution_id } = await client.clinical.sessions.triggerPipeline(
|
|
10164
|
+
* 'sess_xyz',
|
|
10165
|
+
* 'ws_123',
|
|
10166
|
+
* );
|
|
10167
|
+
* ```
|
|
10168
|
+
*/
|
|
10169
|
+
triggerPipeline: async (sessionId, workspaceId, options) => rb.rawPost(
|
|
10170
|
+
`/clinical/sessions/${sessionId}/trigger-pipeline`,
|
|
10171
|
+
{ workspace_id: workspaceId },
|
|
10172
|
+
options
|
|
10173
|
+
)
|
|
10174
|
+
},
|
|
10175
|
+
/**
|
|
10176
|
+
* Manage clinical notes (SOAP notes, progress notes, AI-generated summaries).
|
|
10177
|
+
*
|
|
10178
|
+
* Notes support a HITL (Human-In-The-Loop) approval workflow: AI-generated
|
|
10179
|
+
* notes start with `status: "pending_review"` and must be approved or rejected
|
|
10180
|
+
* by a clinician before they are finalized.
|
|
10181
|
+
*/
|
|
10182
|
+
notes: {
|
|
10183
|
+
/**
|
|
10184
|
+
* List notes, optionally filtered by patient or session.
|
|
10185
|
+
*
|
|
10186
|
+
* @param params - Filter/pagination parameters
|
|
10187
|
+
* @param options - Request options
|
|
10188
|
+
* @returns Array of {@link ClinicalNote} records
|
|
10189
|
+
*/
|
|
10190
|
+
list: async (params, options) => rb.execute(getClinicalNotes, params ?? {}, options),
|
|
10191
|
+
/**
|
|
10192
|
+
* Get a single note by ID.
|
|
10193
|
+
*
|
|
10194
|
+
* @param id - Note UUID
|
|
10195
|
+
* @param options - Request options
|
|
10196
|
+
* @returns {@link ClinicalNote} record
|
|
10197
|
+
*/
|
|
10198
|
+
get: async (id, options) => rb.execute(
|
|
10199
|
+
getClinicalNotesById,
|
|
10200
|
+
{ path: { id } },
|
|
10201
|
+
options
|
|
10202
|
+
),
|
|
10203
|
+
/**
|
|
10204
|
+
* Create a new clinical note.
|
|
10205
|
+
*
|
|
10206
|
+
* @param attributes - Note creation attributes. Must include `workspace_id`, `patient_id`, and `content`.
|
|
10207
|
+
* @param options - Request options
|
|
10208
|
+
* @returns Created {@link ClinicalNote} record
|
|
10209
|
+
*/
|
|
10210
|
+
create: async (attributes, options) => rb.execute(
|
|
10211
|
+
postClinicalNotes,
|
|
10212
|
+
{ body: { data: { type: "clinical-note", attributes } } },
|
|
10213
|
+
options
|
|
10214
|
+
),
|
|
10215
|
+
/**
|
|
10216
|
+
* Update a clinical note.
|
|
10217
|
+
*
|
|
10218
|
+
* @param id - Note UUID
|
|
10219
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10220
|
+
* @param options - Request options
|
|
10221
|
+
* @returns Updated {@link ClinicalNote} record
|
|
10222
|
+
*/
|
|
10223
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10224
|
+
patchClinicalNotesById,
|
|
10225
|
+
{
|
|
10226
|
+
path: { id },
|
|
10227
|
+
body: { data: { type: "clinical-note", id, attributes } }
|
|
10228
|
+
},
|
|
10229
|
+
options
|
|
10230
|
+
),
|
|
10231
|
+
/**
|
|
10232
|
+
* Delete a clinical note.
|
|
10233
|
+
*
|
|
10234
|
+
* @param id - Note UUID
|
|
10235
|
+
* @param options - Request options
|
|
10236
|
+
* @returns `true` on successful deletion
|
|
10237
|
+
*/
|
|
10238
|
+
delete: async (id, options) => rb.executeDelete(deleteClinicalNotesById, { path: { id } }, options),
|
|
10239
|
+
/**
|
|
10240
|
+
* Approve a clinical note (HITL workflow).
|
|
10241
|
+
*
|
|
10242
|
+
* Marks the note as clinician-reviewed and approved, transitioning it
|
|
10243
|
+
* to `status: "approved"`. Only notes in `pending_review` status can be approved.
|
|
10244
|
+
*
|
|
10245
|
+
* @param id - Note UUID
|
|
10246
|
+
* @param options - Request options
|
|
10247
|
+
* @returns Updated {@link ClinicalNote} record
|
|
10248
|
+
*
|
|
10249
|
+
* @example
|
|
10250
|
+
* ```typescript
|
|
10251
|
+
* const approved = await client.clinical.notes.approve('note_abc');
|
|
10252
|
+
* console.log(approved.attributes.status); // 'approved'
|
|
10253
|
+
* ```
|
|
10254
|
+
*/
|
|
10255
|
+
approve: async (id, options) => rb.execute(
|
|
10256
|
+
patchClinicalNotesByIdApprove,
|
|
10257
|
+
{ path: { id } },
|
|
10258
|
+
options
|
|
10259
|
+
),
|
|
10260
|
+
/**
|
|
10261
|
+
* Reject a clinical note (HITL workflow).
|
|
10262
|
+
*
|
|
10263
|
+
* Marks the note as rejected, transitioning it to `status: "rejected"`.
|
|
10264
|
+
* Only notes in `pending_review` status can be rejected.
|
|
10265
|
+
*
|
|
10266
|
+
* @param id - Note UUID
|
|
10267
|
+
* @param options - Request options
|
|
10268
|
+
* @returns Updated {@link ClinicalNote} record
|
|
10269
|
+
*
|
|
10270
|
+
* @example
|
|
10271
|
+
* ```typescript
|
|
10272
|
+
* const rejected = await client.clinical.notes.reject('note_abc');
|
|
10273
|
+
* console.log(rejected.attributes.status); // 'rejected'
|
|
10274
|
+
* ```
|
|
10275
|
+
*/
|
|
10276
|
+
reject: async (id, options) => rb.execute(
|
|
10277
|
+
patchClinicalNotesByIdReject,
|
|
10278
|
+
{ path: { id } },
|
|
10279
|
+
options
|
|
10280
|
+
),
|
|
10281
|
+
/**
|
|
10282
|
+
* List versions for a note (related resource).
|
|
10283
|
+
*
|
|
10284
|
+
* Each edit to an approved note creates a version record for audit purposes.
|
|
10285
|
+
*
|
|
10286
|
+
* @param noteId - Note UUID
|
|
10287
|
+
* @param options - Request options
|
|
10288
|
+
* @returns Array of {@link ClinicalNoteVersion} records
|
|
10289
|
+
*/
|
|
10290
|
+
versions: async (noteId, options) => rb.execute(
|
|
10291
|
+
getClinicalNotesByNoteIdVersions,
|
|
10292
|
+
{ path: { note_id: noteId } },
|
|
10293
|
+
options
|
|
10294
|
+
),
|
|
10295
|
+
/**
|
|
10296
|
+
* Get a specific note version.
|
|
10297
|
+
*
|
|
10298
|
+
* @param noteId - Note UUID
|
|
10299
|
+
* @param versionId - NoteVersion UUID
|
|
10300
|
+
* @param options - Request options
|
|
10301
|
+
* @returns {@link ClinicalNoteVersion} record
|
|
10302
|
+
*/
|
|
10303
|
+
getVersion: async (noteId, versionId, options) => rb.execute(
|
|
10304
|
+
getClinicalNotesByNoteIdVersionsById,
|
|
10305
|
+
{ path: { note_id: noteId, id: versionId } },
|
|
10306
|
+
options
|
|
10307
|
+
)
|
|
10308
|
+
},
|
|
10309
|
+
/**
|
|
10310
|
+
* Manage clinical health metrics (weight, blood pressure, glucose, etc.).
|
|
10311
|
+
*/
|
|
10312
|
+
healthMetrics: {
|
|
10313
|
+
/**
|
|
10314
|
+
* List health metrics, filtered by patient/workspace/date range.
|
|
10315
|
+
*
|
|
10316
|
+
* @param params - Filter/pagination parameters
|
|
10317
|
+
* @param options - Request options
|
|
10318
|
+
* @returns Array of {@link ClinicalHealthMetric} records
|
|
10319
|
+
*/
|
|
10320
|
+
list: async (params, options) => rb.execute(
|
|
10321
|
+
getClinicalHealthMetrics,
|
|
10322
|
+
params ?? {},
|
|
10323
|
+
options
|
|
10324
|
+
),
|
|
10325
|
+
/**
|
|
10326
|
+
* Get a single health metric by ID.
|
|
10327
|
+
*
|
|
10328
|
+
* @param id - HealthMetric UUID
|
|
10329
|
+
* @param options - Request options
|
|
10330
|
+
* @returns {@link ClinicalHealthMetric} record
|
|
10331
|
+
*/
|
|
10332
|
+
get: async (id, options) => rb.execute(
|
|
10333
|
+
getClinicalHealthMetricsById,
|
|
10334
|
+
{ path: { id } },
|
|
10335
|
+
options
|
|
10336
|
+
),
|
|
10337
|
+
/**
|
|
10338
|
+
* Record a new health metric entry.
|
|
10339
|
+
*
|
|
10340
|
+
* @param attributes - Metric creation attributes. Must include `workspace_id`, `patient_id`,
|
|
10341
|
+
* `metric_category`, `metric_name`, and `value`.
|
|
10342
|
+
* @param options - Request options
|
|
10343
|
+
* @returns Created {@link ClinicalHealthMetric} record
|
|
10344
|
+
*
|
|
10345
|
+
* @example
|
|
10346
|
+
* ```typescript
|
|
10347
|
+
* const metric = await client.clinical.healthMetrics.create({
|
|
10348
|
+
* workspace_id: 'ws_123',
|
|
10349
|
+
* patient_id: 'pat_abc',
|
|
10350
|
+
* metric_category: 'vitals',
|
|
10351
|
+
* metric_name: 'weight_kg',
|
|
10352
|
+
* value: 82.5,
|
|
10353
|
+
* unit: 'kg',
|
|
10354
|
+
* });
|
|
10355
|
+
* ```
|
|
10356
|
+
*/
|
|
10357
|
+
create: async (attributes, options) => rb.execute(
|
|
10358
|
+
postClinicalHealthMetrics,
|
|
10359
|
+
{ body: { data: { type: "clinical-health-metric", attributes } } },
|
|
10360
|
+
options
|
|
10361
|
+
),
|
|
10362
|
+
/**
|
|
10363
|
+
* Update a health metric entry.
|
|
10364
|
+
*
|
|
10365
|
+
* @param id - HealthMetric UUID
|
|
10366
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10367
|
+
* @param options - Request options
|
|
10368
|
+
* @returns Updated {@link ClinicalHealthMetric} record
|
|
10369
|
+
*/
|
|
10370
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10371
|
+
patchClinicalHealthMetricsById,
|
|
10372
|
+
{
|
|
10373
|
+
path: { id },
|
|
10374
|
+
body: { data: { type: "clinical-health-metric", id, attributes } }
|
|
10375
|
+
},
|
|
10376
|
+
options
|
|
10377
|
+
),
|
|
10378
|
+
/**
|
|
10379
|
+
* Delete a health metric entry.
|
|
10380
|
+
*
|
|
10381
|
+
* @param id - HealthMetric UUID
|
|
10382
|
+
* @param options - Request options
|
|
10383
|
+
* @returns `true` on successful deletion
|
|
10384
|
+
*/
|
|
10385
|
+
delete: async (id, options) => rb.executeDelete(
|
|
10386
|
+
deleteClinicalHealthMetricsById,
|
|
10387
|
+
{ path: { id } },
|
|
10388
|
+
options
|
|
10389
|
+
)
|
|
10390
|
+
},
|
|
10391
|
+
/**
|
|
10392
|
+
* Manage meal plans for clinical patients.
|
|
10393
|
+
*/
|
|
10394
|
+
mealPlans: {
|
|
10395
|
+
/**
|
|
10396
|
+
* List meal plans, filtered by patient/workspace.
|
|
10397
|
+
*
|
|
10398
|
+
* @param params - Filter/pagination parameters
|
|
10399
|
+
* @param options - Request options
|
|
10400
|
+
* @returns Array of {@link ClinicalMealPlan} records
|
|
10401
|
+
*/
|
|
10402
|
+
list: async (params, options) => rb.execute(
|
|
10403
|
+
getClinicalMealPlans,
|
|
10404
|
+
params ?? {},
|
|
10405
|
+
options
|
|
10406
|
+
),
|
|
10407
|
+
/**
|
|
10408
|
+
* Get a single meal plan by ID.
|
|
10409
|
+
*
|
|
10410
|
+
* @param id - MealPlan UUID
|
|
10411
|
+
* @param options - Request options
|
|
10412
|
+
* @returns {@link ClinicalMealPlan} record
|
|
10413
|
+
*/
|
|
10414
|
+
get: async (id, options) => rb.execute(
|
|
10415
|
+
getClinicalMealPlansById,
|
|
10416
|
+
{ path: { id } },
|
|
10417
|
+
options
|
|
10418
|
+
),
|
|
10419
|
+
/**
|
|
10420
|
+
* Create a new meal plan.
|
|
10421
|
+
*
|
|
10422
|
+
* @param attributes - Meal plan creation attributes. Must include `workspace_id`, `patient_id`, and `title`.
|
|
10423
|
+
* @param options - Request options
|
|
10424
|
+
* @returns Created {@link ClinicalMealPlan} record
|
|
10425
|
+
*/
|
|
10426
|
+
create: async (attributes, options) => rb.execute(
|
|
10427
|
+
postClinicalMealPlans,
|
|
10428
|
+
{ body: { data: { type: "clinical-meal-plan", attributes } } },
|
|
10429
|
+
options
|
|
10430
|
+
),
|
|
10431
|
+
/**
|
|
10432
|
+
* Update a meal plan.
|
|
10433
|
+
*
|
|
10434
|
+
* @param id - MealPlan UUID
|
|
10435
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10436
|
+
* @param options - Request options
|
|
10437
|
+
* @returns Updated {@link ClinicalMealPlan} record
|
|
10438
|
+
*/
|
|
10439
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10440
|
+
patchClinicalMealPlansById,
|
|
10441
|
+
{
|
|
10442
|
+
path: { id },
|
|
10443
|
+
body: { data: { type: "clinical-meal-plan", id, attributes } }
|
|
10444
|
+
},
|
|
10445
|
+
options
|
|
10446
|
+
),
|
|
10447
|
+
/**
|
|
10448
|
+
* Delete a meal plan.
|
|
10449
|
+
*
|
|
10450
|
+
* @param id - MealPlan UUID
|
|
10451
|
+
* @param options - Request options
|
|
10452
|
+
* @returns `true` on successful deletion
|
|
10453
|
+
*/
|
|
10454
|
+
delete: async (id, options) => rb.executeDelete(
|
|
10455
|
+
deleteClinicalMealPlansById,
|
|
10456
|
+
{ path: { id } },
|
|
10457
|
+
options
|
|
10458
|
+
)
|
|
10459
|
+
},
|
|
10460
|
+
/**
|
|
10461
|
+
* Manage client goals (therapeutic targets and wellness milestones).
|
|
10462
|
+
*/
|
|
10463
|
+
clientGoals: {
|
|
10464
|
+
/**
|
|
10465
|
+
* List client goals, filtered by patient/workspace.
|
|
10466
|
+
*
|
|
10467
|
+
* @param params - Filter/pagination parameters
|
|
10468
|
+
* @param options - Request options
|
|
10469
|
+
* @returns Array of {@link ClinicalClientGoal} records
|
|
10470
|
+
*/
|
|
10471
|
+
list: async (params, options) => rb.execute(
|
|
10472
|
+
getClinicalClientGoals,
|
|
10473
|
+
params ?? {},
|
|
10474
|
+
options
|
|
10475
|
+
),
|
|
10476
|
+
/**
|
|
10477
|
+
* Get a single client goal by ID.
|
|
10478
|
+
*
|
|
10479
|
+
* @param id - ClientGoal UUID
|
|
10480
|
+
* @param options - Request options
|
|
10481
|
+
* @returns {@link ClinicalClientGoal} record
|
|
10482
|
+
*/
|
|
10483
|
+
get: async (id, options) => rb.execute(
|
|
10484
|
+
getClinicalClientGoalsById,
|
|
10485
|
+
{ path: { id } },
|
|
10486
|
+
options
|
|
10487
|
+
),
|
|
10488
|
+
/**
|
|
10489
|
+
* Create a new client goal.
|
|
10490
|
+
*
|
|
10491
|
+
* @param attributes - Goal creation attributes. Must include `workspace_id`, `patient_id`, and `title`.
|
|
10492
|
+
* @param options - Request options
|
|
10493
|
+
* @returns Created {@link ClinicalClientGoal} record
|
|
10494
|
+
*/
|
|
10495
|
+
create: async (attributes, options) => rb.execute(
|
|
10496
|
+
postClinicalClientGoals,
|
|
10497
|
+
{ body: { data: { type: "clinical-client-goal", attributes } } },
|
|
10498
|
+
options
|
|
10499
|
+
),
|
|
10500
|
+
/**
|
|
10501
|
+
* Update a client goal.
|
|
10502
|
+
*
|
|
10503
|
+
* @param id - ClientGoal UUID
|
|
10504
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10505
|
+
* @param options - Request options
|
|
10506
|
+
* @returns Updated {@link ClinicalClientGoal} record
|
|
10507
|
+
*/
|
|
10508
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10509
|
+
patchClinicalClientGoalsById,
|
|
10510
|
+
{
|
|
10511
|
+
path: { id },
|
|
10512
|
+
body: { data: { type: "clinical-client-goal", id, attributes } }
|
|
10513
|
+
},
|
|
10514
|
+
options
|
|
10515
|
+
),
|
|
10516
|
+
/**
|
|
10517
|
+
* Delete a client goal.
|
|
10518
|
+
*
|
|
10519
|
+
* @param id - ClientGoal UUID
|
|
10520
|
+
* @param options - Request options
|
|
10521
|
+
* @returns `true` on successful deletion
|
|
10522
|
+
*/
|
|
10523
|
+
delete: async (id, options) => rb.executeDelete(
|
|
10524
|
+
deleteClinicalClientGoalsById,
|
|
10525
|
+
{ path: { id } },
|
|
10526
|
+
options
|
|
10527
|
+
)
|
|
10528
|
+
},
|
|
10529
|
+
/**
|
|
10530
|
+
* Manage supplement prescriptions for clinical patients.
|
|
10531
|
+
*/
|
|
10532
|
+
clientSupplements: {
|
|
10533
|
+
/**
|
|
10534
|
+
* List supplement prescriptions, filtered by patient/workspace.
|
|
10535
|
+
*
|
|
10536
|
+
* @param params - Filter/pagination parameters
|
|
10537
|
+
* @param options - Request options
|
|
10538
|
+
* @returns Array of {@link ClinicalClientSupplement} records
|
|
10539
|
+
*/
|
|
10540
|
+
list: async (params, options) => rb.execute(
|
|
10541
|
+
getClinicalClientSupplements,
|
|
10542
|
+
params ?? {},
|
|
10543
|
+
options
|
|
10544
|
+
),
|
|
10545
|
+
/**
|
|
10546
|
+
* Get a single supplement prescription by ID.
|
|
10547
|
+
*
|
|
10548
|
+
* @param id - ClientSupplement UUID
|
|
10549
|
+
* @param options - Request options
|
|
10550
|
+
* @returns {@link ClinicalClientSupplement} record
|
|
10551
|
+
*/
|
|
10552
|
+
get: async (id, options) => rb.execute(
|
|
10553
|
+
getClinicalClientSupplementsById,
|
|
10554
|
+
{ path: { id } },
|
|
10555
|
+
options
|
|
10556
|
+
),
|
|
10557
|
+
/**
|
|
10558
|
+
* Create a new supplement prescription.
|
|
10559
|
+
*
|
|
10560
|
+
* @param attributes - Supplement creation attributes. Must include `workspace_id`,
|
|
10561
|
+
* `patient_id`, and `supplement_name`.
|
|
10562
|
+
* @param options - Request options
|
|
10563
|
+
* @returns Created {@link ClinicalClientSupplement} record
|
|
10564
|
+
*/
|
|
10565
|
+
create: async (attributes, options) => rb.execute(
|
|
10566
|
+
postClinicalClientSupplements,
|
|
10567
|
+
{
|
|
10568
|
+
body: { data: { type: "clinical-client-supplement", attributes } }
|
|
10569
|
+
},
|
|
10570
|
+
options
|
|
10571
|
+
),
|
|
10572
|
+
/**
|
|
10573
|
+
* Update a supplement prescription.
|
|
10574
|
+
*
|
|
10575
|
+
* @param id - ClientSupplement UUID
|
|
10576
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10577
|
+
* @param options - Request options
|
|
10578
|
+
* @returns Updated {@link ClinicalClientSupplement} record
|
|
10579
|
+
*/
|
|
10580
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10581
|
+
patchClinicalClientSupplementsById,
|
|
10582
|
+
{
|
|
10583
|
+
path: { id },
|
|
10584
|
+
body: {
|
|
10585
|
+
data: { type: "clinical-client-supplement", id, attributes }
|
|
10586
|
+
}
|
|
10587
|
+
},
|
|
10588
|
+
options
|
|
10589
|
+
),
|
|
10590
|
+
/**
|
|
10591
|
+
* Delete a supplement prescription.
|
|
10592
|
+
*
|
|
10593
|
+
* @param id - ClientSupplement UUID
|
|
10594
|
+
* @param options - Request options
|
|
10595
|
+
* @returns `true` on successful deletion
|
|
10596
|
+
*/
|
|
10597
|
+
delete: async (id, options) => rb.executeDelete(
|
|
10598
|
+
deleteClinicalClientSupplementsById,
|
|
10599
|
+
{ path: { id } },
|
|
10600
|
+
options
|
|
10601
|
+
)
|
|
10602
|
+
},
|
|
10603
|
+
/**
|
|
10604
|
+
* Manage clinical deliveries (care plan items sent to patients).
|
|
10605
|
+
*/
|
|
10606
|
+
deliveries: {
|
|
10607
|
+
/**
|
|
10608
|
+
* List deliveries, filtered by patient/workspace.
|
|
10609
|
+
*
|
|
10610
|
+
* @param params - Filter/pagination parameters
|
|
10611
|
+
* @param options - Request options
|
|
10612
|
+
* @returns Array of {@link ClinicalDelivery} records
|
|
10613
|
+
*/
|
|
10614
|
+
list: async (params, options) => rb.execute(
|
|
10615
|
+
getClinicalDeliveries,
|
|
10616
|
+
params ?? {},
|
|
10617
|
+
options
|
|
10618
|
+
),
|
|
10619
|
+
/**
|
|
10620
|
+
* Get a single delivery by ID.
|
|
10621
|
+
*
|
|
10622
|
+
* @param id - Delivery UUID
|
|
10623
|
+
* @param options - Request options
|
|
10624
|
+
* @returns {@link ClinicalDelivery} record
|
|
10625
|
+
*/
|
|
10626
|
+
get: async (id, options) => rb.execute(
|
|
10627
|
+
getClinicalDeliveriesById,
|
|
10628
|
+
{ path: { id } },
|
|
10629
|
+
options
|
|
10630
|
+
),
|
|
10631
|
+
/**
|
|
10632
|
+
* Create a new delivery.
|
|
10633
|
+
*
|
|
10634
|
+
* @param attributes - Delivery creation attributes. Must include `workspace_id`,
|
|
10635
|
+
* `patient_id`, and `delivery_type`.
|
|
10636
|
+
* @param options - Request options
|
|
10637
|
+
* @returns Created {@link ClinicalDelivery} record
|
|
10638
|
+
*/
|
|
10639
|
+
create: async (attributes, options) => rb.execute(
|
|
10640
|
+
postClinicalDeliveries,
|
|
10641
|
+
{ body: { data: { type: "clinical-delivery", attributes } } },
|
|
10642
|
+
options
|
|
10643
|
+
),
|
|
10644
|
+
/**
|
|
10645
|
+
* Update a delivery (e.g., change status to `delivered`).
|
|
10646
|
+
*
|
|
10647
|
+
* @param id - Delivery UUID
|
|
10648
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10649
|
+
* @param options - Request options
|
|
10650
|
+
* @returns Updated {@link ClinicalDelivery} record
|
|
10651
|
+
*/
|
|
10652
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10653
|
+
patchClinicalDeliveriesById,
|
|
10654
|
+
{
|
|
10655
|
+
path: { id },
|
|
10656
|
+
body: { data: { type: "clinical-delivery", id, attributes } }
|
|
10657
|
+
},
|
|
10658
|
+
options
|
|
10659
|
+
)
|
|
10660
|
+
},
|
|
10661
|
+
/**
|
|
10662
|
+
* Manage practice-level educational resources.
|
|
10663
|
+
*/
|
|
10664
|
+
practiceResources: {
|
|
10665
|
+
/**
|
|
10666
|
+
* List practice resources in a workspace.
|
|
10667
|
+
*
|
|
10668
|
+
* @param params - Filter/pagination parameters
|
|
10669
|
+
* @param options - Request options
|
|
10670
|
+
* @returns Array of {@link ClinicalPracticeResource} records
|
|
10671
|
+
*/
|
|
10672
|
+
list: async (params, options) => rb.execute(
|
|
10673
|
+
getClinicalPracticeResources,
|
|
10674
|
+
params ?? {},
|
|
10675
|
+
options
|
|
10676
|
+
),
|
|
10677
|
+
/**
|
|
10678
|
+
* Get a single practice resource by ID.
|
|
10679
|
+
*
|
|
10680
|
+
* @param id - PracticeResource UUID
|
|
10681
|
+
* @param options - Request options
|
|
10682
|
+
* @returns {@link ClinicalPracticeResource} record
|
|
10683
|
+
*/
|
|
10684
|
+
get: async (id, options) => rb.execute(
|
|
10685
|
+
getClinicalPracticeResourcesById,
|
|
10686
|
+
{ path: { id } },
|
|
10687
|
+
options
|
|
10688
|
+
),
|
|
10689
|
+
/**
|
|
10690
|
+
* Create a new practice resource.
|
|
10691
|
+
*
|
|
10692
|
+
* @param attributes - Resource creation attributes. Must include `workspace_id` and `title`.
|
|
10693
|
+
* @param options - Request options
|
|
10694
|
+
* @returns Created {@link ClinicalPracticeResource} record
|
|
10695
|
+
*/
|
|
10696
|
+
create: async (attributes, options) => rb.execute(
|
|
10697
|
+
postClinicalPracticeResources,
|
|
10698
|
+
{
|
|
10699
|
+
body: { data: { type: "clinical-practice-resource", attributes } }
|
|
10700
|
+
},
|
|
10701
|
+
options
|
|
10702
|
+
),
|
|
10703
|
+
/**
|
|
10704
|
+
* Update a practice resource.
|
|
10705
|
+
*
|
|
10706
|
+
* @param id - PracticeResource UUID
|
|
10707
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10708
|
+
* @param options - Request options
|
|
10709
|
+
* @returns Updated {@link ClinicalPracticeResource} record
|
|
10710
|
+
*/
|
|
10711
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10712
|
+
patchClinicalPracticeResourcesById,
|
|
10713
|
+
{
|
|
10714
|
+
path: { id },
|
|
10715
|
+
body: {
|
|
10716
|
+
data: { type: "clinical-practice-resource", id, attributes }
|
|
10717
|
+
}
|
|
10718
|
+
},
|
|
10719
|
+
options
|
|
10720
|
+
),
|
|
10721
|
+
/**
|
|
10722
|
+
* Delete a practice resource.
|
|
9220
10723
|
*
|
|
9221
|
-
* @
|
|
9222
|
-
*
|
|
9223
|
-
*
|
|
9224
|
-
*
|
|
9225
|
-
* await client.catalog.taxonomies.delete('tax_abc123');
|
|
9226
|
-
* ```
|
|
10724
|
+
* @param id - PracticeResource UUID
|
|
10725
|
+
* @param options - Request options
|
|
10726
|
+
* @returns `true` on successful deletion
|
|
9227
10727
|
*/
|
|
9228
|
-
delete: async (id, options) =>
|
|
9229
|
-
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
);
|
|
9234
|
-
}
|
|
10728
|
+
delete: async (id, options) => rb.executeDelete(
|
|
10729
|
+
deleteClinicalPracticeResourcesById,
|
|
10730
|
+
{ path: { id } },
|
|
10731
|
+
options
|
|
10732
|
+
)
|
|
9235
10733
|
},
|
|
9236
10734
|
/**
|
|
9237
|
-
*
|
|
9238
|
-
*
|
|
9239
|
-
* Each node represents a single category (e.g. "T-Shirts") within a
|
|
9240
|
-
* taxonomy. Nodes can be nested to arbitrary depth by setting a
|
|
9241
|
-
* `parent_node_id`, forming the hierarchical tree. A node with no parent
|
|
9242
|
-
* is a root-level category.
|
|
10735
|
+
* Manage practice-level assessment and therapeutic tools.
|
|
9243
10736
|
*/
|
|
9244
|
-
|
|
10737
|
+
practiceTools: {
|
|
9245
10738
|
/**
|
|
9246
|
-
* List
|
|
10739
|
+
* List practice tools in a workspace.
|
|
9247
10740
|
*
|
|
9248
|
-
*
|
|
9249
|
-
*
|
|
10741
|
+
* @param params - Filter/pagination parameters
|
|
10742
|
+
* @param options - Request options
|
|
10743
|
+
* @returns Array of {@link ClinicalPracticeTool} records
|
|
10744
|
+
*/
|
|
10745
|
+
list: async (params, options) => rb.execute(
|
|
10746
|
+
getClinicalPracticeTools,
|
|
10747
|
+
params ?? {},
|
|
10748
|
+
options
|
|
10749
|
+
),
|
|
10750
|
+
/**
|
|
10751
|
+
* Get a single practice tool by ID.
|
|
9250
10752
|
*
|
|
9251
|
-
* @param
|
|
9252
|
-
* @param options -
|
|
9253
|
-
* @returns
|
|
10753
|
+
* @param id - PracticeTool UUID
|
|
10754
|
+
* @param options - Request options
|
|
10755
|
+
* @returns {@link ClinicalPracticeTool} record
|
|
10756
|
+
*/
|
|
10757
|
+
get: async (id, options) => rb.execute(
|
|
10758
|
+
getClinicalPracticeToolsById,
|
|
10759
|
+
{ path: { id } },
|
|
10760
|
+
options
|
|
10761
|
+
),
|
|
10762
|
+
/**
|
|
10763
|
+
* Create a new practice tool.
|
|
9254
10764
|
*
|
|
9255
|
-
* @
|
|
9256
|
-
*
|
|
9257
|
-
*
|
|
10765
|
+
* @param attributes - Tool creation attributes. Must include `workspace_id` and `name`.
|
|
10766
|
+
* @param options - Request options
|
|
10767
|
+
* @returns Created {@link ClinicalPracticeTool} record
|
|
10768
|
+
*/
|
|
10769
|
+
create: async (attributes, options) => rb.execute(
|
|
10770
|
+
postClinicalPracticeTools,
|
|
10771
|
+
{ body: { data: { type: "clinical-practice-tool", attributes } } },
|
|
10772
|
+
options
|
|
10773
|
+
),
|
|
10774
|
+
/**
|
|
10775
|
+
* Update a practice tool.
|
|
9258
10776
|
*
|
|
9259
|
-
*
|
|
9260
|
-
*
|
|
9261
|
-
*
|
|
9262
|
-
*
|
|
10777
|
+
* @param id - PracticeTool UUID
|
|
10778
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10779
|
+
* @param options - Request options
|
|
10780
|
+
* @returns Updated {@link ClinicalPracticeTool} record
|
|
9263
10781
|
*/
|
|
9264
|
-
|
|
9265
|
-
|
|
9266
|
-
|
|
9267
|
-
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
|
|
10782
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10783
|
+
patchClinicalPracticeToolsById,
|
|
10784
|
+
{
|
|
10785
|
+
path: { id },
|
|
10786
|
+
body: { data: { type: "clinical-practice-tool", id, attributes } }
|
|
10787
|
+
},
|
|
10788
|
+
options
|
|
10789
|
+
),
|
|
9271
10790
|
/**
|
|
9272
|
-
*
|
|
10791
|
+
* Delete a practice tool.
|
|
9273
10792
|
*
|
|
9274
|
-
* @param id -
|
|
9275
|
-
* @param options -
|
|
9276
|
-
* @returns
|
|
10793
|
+
* @param id - PracticeTool UUID
|
|
10794
|
+
* @param options - Request options
|
|
10795
|
+
* @returns `true` on successful deletion
|
|
10796
|
+
*/
|
|
10797
|
+
delete: async (id, options) => rb.executeDelete(
|
|
10798
|
+
deleteClinicalPracticeToolsById,
|
|
10799
|
+
{ path: { id } },
|
|
10800
|
+
options
|
|
10801
|
+
)
|
|
10802
|
+
},
|
|
10803
|
+
/**
|
|
10804
|
+
* Manage assignments of practice resources to patients.
|
|
10805
|
+
*/
|
|
10806
|
+
clientResourceAssignments: {
|
|
10807
|
+
/**
|
|
10808
|
+
* List resource assignments, filtered by patient/workspace.
|
|
9277
10809
|
*
|
|
9278
|
-
* @
|
|
9279
|
-
*
|
|
9280
|
-
*
|
|
10810
|
+
* @param params - Filter/pagination parameters
|
|
10811
|
+
* @param options - Request options
|
|
10812
|
+
* @returns Array of {@link ClinicalClientResourceAssignment} records
|
|
10813
|
+
*/
|
|
10814
|
+
list: async (params, options) => rb.execute(
|
|
10815
|
+
getClinicalClientResourceAssignments,
|
|
10816
|
+
params ?? {},
|
|
10817
|
+
options
|
|
10818
|
+
),
|
|
10819
|
+
/**
|
|
10820
|
+
* Get a single resource assignment by ID.
|
|
9281
10821
|
*
|
|
9282
|
-
*
|
|
9283
|
-
*
|
|
9284
|
-
*
|
|
10822
|
+
* @param id - ClientResourceAssignment UUID
|
|
10823
|
+
* @param options - Request options
|
|
10824
|
+
* @returns {@link ClinicalClientResourceAssignment} record
|
|
9285
10825
|
*/
|
|
9286
|
-
get: async (id, options) =>
|
|
9287
|
-
|
|
9288
|
-
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
);
|
|
9292
|
-
},
|
|
10826
|
+
get: async (id, options) => rb.execute(
|
|
10827
|
+
getClinicalClientResourceAssignmentsById,
|
|
10828
|
+
{ path: { id } },
|
|
10829
|
+
options
|
|
10830
|
+
),
|
|
9293
10831
|
/**
|
|
9294
|
-
*
|
|
10832
|
+
* Assign a practice resource to a patient.
|
|
9295
10833
|
*
|
|
9296
|
-
*
|
|
9297
|
-
*
|
|
9298
|
-
*
|
|
10834
|
+
* @param attributes - Assignment creation attributes. Must include `workspace_id`,
|
|
10835
|
+
* `patient_id`, and `resource_id`.
|
|
10836
|
+
* @param options - Request options
|
|
10837
|
+
* @returns Created {@link ClinicalClientResourceAssignment} record
|
|
10838
|
+
*/
|
|
10839
|
+
create: async (attributes, options) => rb.execute(
|
|
10840
|
+
postClinicalClientResourceAssignments,
|
|
10841
|
+
{
|
|
10842
|
+
body: {
|
|
10843
|
+
data: { type: "clinical-client-resource-assignment", attributes }
|
|
10844
|
+
}
|
|
10845
|
+
},
|
|
10846
|
+
options
|
|
10847
|
+
),
|
|
10848
|
+
/**
|
|
10849
|
+
* Update a resource assignment (e.g., mark as completed).
|
|
9299
10850
|
*
|
|
9300
|
-
* @param
|
|
9301
|
-
*
|
|
9302
|
-
*
|
|
9303
|
-
* @
|
|
9304
|
-
|
|
10851
|
+
* @param id - ClientResourceAssignment UUID
|
|
10852
|
+
* @param attributes - Fields to update (PATCH semantics)
|
|
10853
|
+
* @param options - Request options
|
|
10854
|
+
* @returns Updated {@link ClinicalClientResourceAssignment} record
|
|
10855
|
+
*/
|
|
10856
|
+
update: async (id, attributes, options) => rb.execute(
|
|
10857
|
+
patchClinicalClientResourceAssignmentsById,
|
|
10858
|
+
{
|
|
10859
|
+
path: { id },
|
|
10860
|
+
body: {
|
|
10861
|
+
data: {
|
|
10862
|
+
type: "clinical-client-resource-assignment",
|
|
10863
|
+
id,
|
|
10864
|
+
attributes
|
|
10865
|
+
}
|
|
10866
|
+
}
|
|
10867
|
+
},
|
|
10868
|
+
options
|
|
10869
|
+
),
|
|
10870
|
+
/**
|
|
10871
|
+
* Delete a resource assignment.
|
|
9305
10872
|
*
|
|
9306
|
-
* @
|
|
9307
|
-
*
|
|
9308
|
-
*
|
|
10873
|
+
* @param id - ClientResourceAssignment UUID
|
|
10874
|
+
* @param options - Request options
|
|
10875
|
+
* @returns `true` on successful deletion
|
|
10876
|
+
*/
|
|
10877
|
+
delete: async (id, options) => rb.executeDelete(
|
|
10878
|
+
deleteClinicalClientResourceAssignmentsById,
|
|
10879
|
+
{ path: { id } },
|
|
10880
|
+
options
|
|
10881
|
+
)
|
|
10882
|
+
},
|
|
10883
|
+
/**
|
|
10884
|
+
* Read-only access to the AI-generated supplement recommendation cache.
|
|
10885
|
+
*
|
|
10886
|
+
* This resource is server-managed — entries are created and updated
|
|
10887
|
+
* exclusively by the AI post-session pipeline. Direct create/update
|
|
10888
|
+
* operations are not supported.
|
|
10889
|
+
*/
|
|
10890
|
+
supplementRecCache: {
|
|
10891
|
+
/**
|
|
10892
|
+
* List supplement recommendation cache entries, filtered by patient/workspace.
|
|
9309
10893
|
*
|
|
9310
|
-
*
|
|
9311
|
-
*
|
|
9312
|
-
*
|
|
9313
|
-
|
|
9314
|
-
|
|
10894
|
+
* @param params - Filter/pagination parameters
|
|
10895
|
+
* @param options - Request options
|
|
10896
|
+
* @returns Array of {@link ClinicalSupplementRecCache} records
|
|
10897
|
+
*/
|
|
10898
|
+
list: async (params, options) => rb.execute(
|
|
10899
|
+
getClinicalSupplementRecCache,
|
|
10900
|
+
params ?? {},
|
|
10901
|
+
options
|
|
10902
|
+
),
|
|
10903
|
+
/**
|
|
10904
|
+
* Get a single supplement recommendation cache entry by ID.
|
|
9315
10905
|
*
|
|
9316
|
-
*
|
|
9317
|
-
*
|
|
9318
|
-
*
|
|
9319
|
-
* name: 'Tops',
|
|
9320
|
-
* parent_node_id: clothing.id,
|
|
9321
|
-
* });
|
|
9322
|
-
* ```
|
|
10906
|
+
* @param id - SupplementRecCache UUID
|
|
10907
|
+
* @param options - Request options
|
|
10908
|
+
* @returns {@link ClinicalSupplementRecCache} record
|
|
9323
10909
|
*/
|
|
9324
|
-
|
|
9325
|
-
|
|
9326
|
-
|
|
9327
|
-
|
|
9328
|
-
|
|
9329
|
-
data: { type: "catalog_taxonomy_node", attributes }
|
|
9330
|
-
}
|
|
9331
|
-
},
|
|
9332
|
-
options
|
|
9333
|
-
);
|
|
9334
|
-
},
|
|
10910
|
+
get: async (id, options) => rb.execute(
|
|
10911
|
+
getClinicalSupplementRecCacheById,
|
|
10912
|
+
{ path: { id } },
|
|
10913
|
+
options
|
|
10914
|
+
),
|
|
9335
10915
|
/**
|
|
9336
|
-
*
|
|
10916
|
+
* Generate supplement recommendations for a patient via the AI pipeline.
|
|
9337
10917
|
*
|
|
9338
|
-
*
|
|
9339
|
-
*
|
|
9340
|
-
*
|
|
10918
|
+
* Returns immediately with an execution ID; poll executions for results.
|
|
10919
|
+
* The AI pipeline populates the supplement recommendation cache entries
|
|
10920
|
+
* once the execution completes.
|
|
9341
10921
|
*
|
|
9342
|
-
* @param
|
|
9343
|
-
* @param
|
|
9344
|
-
* @param
|
|
9345
|
-
* @
|
|
10922
|
+
* @param patientId - Patient UUID
|
|
10923
|
+
* @param sessionId - Session UUID to base recommendations on
|
|
10924
|
+
* @param workspaceId - Workspace UUID
|
|
10925
|
+
* @param options - Request options
|
|
10926
|
+
* @returns {@link GenerateSupplementRecsResponse} with execution_id
|
|
9346
10927
|
*
|
|
9347
10928
|
* @example
|
|
9348
10929
|
* ```typescript
|
|
9349
|
-
* const
|
|
9350
|
-
*
|
|
9351
|
-
*
|
|
9352
|
-
*
|
|
9353
|
-
*
|
|
9354
|
-
* });
|
|
9355
|
-
* console.log(node.attributes.name); // 'Apparel'
|
|
10930
|
+
* const { execution_id } = await client.clinical.supplementRecCache.generate(
|
|
10931
|
+
* 'pat_abc123',
|
|
10932
|
+
* 'sess_xyz',
|
|
10933
|
+
* 'ws_123',
|
|
10934
|
+
* );
|
|
9356
10935
|
* ```
|
|
9357
10936
|
*/
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
body: {
|
|
9364
|
-
data: { type: "catalog_taxonomy_node", id, attributes }
|
|
9365
|
-
}
|
|
9366
|
-
},
|
|
9367
|
-
options
|
|
9368
|
-
);
|
|
9369
|
-
},
|
|
10937
|
+
generate: async (patientId, sessionId, workspaceId, options) => rb.rawPost(
|
|
10938
|
+
`/clinical/patients/${patientId}/supplement-recommendations/generate`,
|
|
10939
|
+
{ session_id: sessionId, workspace_id: workspaceId },
|
|
10940
|
+
options
|
|
10941
|
+
),
|
|
9370
10942
|
/**
|
|
9371
|
-
*
|
|
10943
|
+
* Delete a supplement recommendation cache entry.
|
|
9372
10944
|
*
|
|
9373
|
-
*
|
|
9374
|
-
*
|
|
9375
|
-
*
|
|
10945
|
+
* @param id - SupplementRecCache UUID
|
|
10946
|
+
* @param options - Request options
|
|
10947
|
+
* @returns `true` on successful deletion
|
|
10948
|
+
*/
|
|
10949
|
+
delete: async (id, options) => rb.executeDelete(
|
|
10950
|
+
deleteClinicalSupplementRecCacheById,
|
|
10951
|
+
{ path: { id } },
|
|
10952
|
+
options
|
|
10953
|
+
)
|
|
10954
|
+
},
|
|
10955
|
+
/**
|
|
10956
|
+
* Recipe search via configured Edamam connector.
|
|
10957
|
+
*/
|
|
10958
|
+
recipes: {
|
|
10959
|
+
/**
|
|
10960
|
+
* Search recipes using a connected Edamam API integration.
|
|
9376
10961
|
*
|
|
9377
|
-
*
|
|
9378
|
-
*
|
|
9379
|
-
*
|
|
10962
|
+
* Requires an Edamam connector to be configured in the workspace.
|
|
10963
|
+
* Returns raw Edamam API response data.
|
|
10964
|
+
*
|
|
10965
|
+
* @param params - Search parameters. Must include `query`, `connector_id`, and `workspace_id`.
|
|
10966
|
+
* @param options - Request options
|
|
10967
|
+
* @returns Edamam API search results
|
|
9380
10968
|
*
|
|
9381
10969
|
* @example
|
|
9382
10970
|
* ```typescript
|
|
9383
|
-
* const
|
|
9384
|
-
*
|
|
9385
|
-
*
|
|
10971
|
+
* const results = await client.clinical.recipes.search({
|
|
10972
|
+
* query: 'high protein lunch',
|
|
10973
|
+
* connector_id: 'conn_edamam_123',
|
|
10974
|
+
* workspace_id: 'ws_123',
|
|
10975
|
+
* diet: 'high-protein',
|
|
10976
|
+
* });
|
|
9386
10977
|
* ```
|
|
9387
10978
|
*/
|
|
9388
|
-
|
|
9389
|
-
return rb.executeDelete(
|
|
9390
|
-
deleteCatalogTaxonomyNodesById,
|
|
9391
|
-
{ path: { id } },
|
|
9392
|
-
options
|
|
9393
|
-
);
|
|
9394
|
-
}
|
|
10979
|
+
search: async (params, options) => rb.rawPost(`/clinical/recipes/search`, params, options)
|
|
9395
10980
|
}
|
|
9396
10981
|
};
|
|
9397
10982
|
}
|
|
@@ -21775,6 +23360,46 @@ function createThreadsNamespace(rb) {
|
|
|
21775
23360
|
options,
|
|
21776
23361
|
streamOptions
|
|
21777
23362
|
);
|
|
23363
|
+
},
|
|
23364
|
+
/**
|
|
23365
|
+
* Full-text substring search across message content.
|
|
23366
|
+
*
|
|
23367
|
+
* @param query - Substring to match against message content.
|
|
23368
|
+
* @param options - Optional request options.
|
|
23369
|
+
* @returns A promise resolving to an array of matching `Message` objects.
|
|
23370
|
+
*
|
|
23371
|
+
* @example
|
|
23372
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
23373
|
+
* const results = await client.threads.messages.search('deadline');
|
|
23374
|
+
*/
|
|
23375
|
+
search: async (query, options) => {
|
|
23376
|
+
return rb.execute(
|
|
23377
|
+
getMessagesSearch,
|
|
23378
|
+
{ query: { filter: { query } } },
|
|
23379
|
+
options
|
|
23380
|
+
);
|
|
23381
|
+
},
|
|
23382
|
+
/**
|
|
23383
|
+
* Vector similarity search across messages using a generated embedding.
|
|
23384
|
+
*
|
|
23385
|
+
* Returns messages ranked by cosine similarity (threshold > 0.6).
|
|
23386
|
+
* Requires embeddings to have been generated via the async vectorization pipeline.
|
|
23387
|
+
*
|
|
23388
|
+
* @param query - Natural-language query string to embed and search.
|
|
23389
|
+
* @param limit - Maximum number of results (default: 10).
|
|
23390
|
+
* @param options - Optional request options.
|
|
23391
|
+
* @returns A promise resolving to an array of semantically similar `Message` objects.
|
|
23392
|
+
*
|
|
23393
|
+
* @example
|
|
23394
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
23395
|
+
* const results = await client.threads.messages.semanticSearch('unpaid invoices', 5);
|
|
23396
|
+
*/
|
|
23397
|
+
semanticSearch: async (query, limit = 10, options) => {
|
|
23398
|
+
return rb.execute(
|
|
23399
|
+
getMessagesSemanticSearch,
|
|
23400
|
+
{ query: { filter: { query, limit } } },
|
|
23401
|
+
options
|
|
23402
|
+
);
|
|
21778
23403
|
}
|
|
21779
23404
|
},
|
|
21780
23405
|
/**
|
|
@@ -21845,6 +23470,26 @@ function createThreadsNamespace(rb) {
|
|
|
21845
23470
|
options,
|
|
21846
23471
|
streamOptions
|
|
21847
23472
|
);
|
|
23473
|
+
},
|
|
23474
|
+
/**
|
|
23475
|
+
* Full-text search threads by title or context summary.
|
|
23476
|
+
*
|
|
23477
|
+
* @param query - The search query string.
|
|
23478
|
+
* @param options - Optional request options.
|
|
23479
|
+
* @returns A promise resolving to an array of matching `Thread` objects.
|
|
23480
|
+
*
|
|
23481
|
+
* @example
|
|
23482
|
+
* ```typescript
|
|
23483
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
23484
|
+
* const results = await client.threads.search('invoice review');
|
|
23485
|
+
* ```
|
|
23486
|
+
*/
|
|
23487
|
+
search: async (query, options) => {
|
|
23488
|
+
return rb.execute(
|
|
23489
|
+
getThreadsSearch,
|
|
23490
|
+
{ query: { filter: { query } } },
|
|
23491
|
+
options
|
|
23492
|
+
);
|
|
21848
23493
|
}
|
|
21849
23494
|
};
|
|
21850
23495
|
}
|
|
@@ -24457,8 +26102,52 @@ function createWebhooksNamespace(rb) {
|
|
|
24457
26102
|
{ path: { id }, body: {} },
|
|
24458
26103
|
options
|
|
24459
26104
|
);
|
|
26105
|
+
},
|
|
26106
|
+
/**
|
|
26107
|
+
* Returns aggregated statistics across all webhook configurations.
|
|
26108
|
+
*
|
|
26109
|
+
* Provides counts of total, enabled, and disabled configs along with
|
|
26110
|
+
* the overall delivery success rate. Useful for monitoring webhook
|
|
26111
|
+
* health at a glance.
|
|
26112
|
+
*
|
|
26113
|
+
* @param options - Optional request options.
|
|
26114
|
+
* @returns An object containing webhook config statistics.
|
|
26115
|
+
*
|
|
26116
|
+
* @example
|
|
26117
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
26118
|
+
* const stats = await client.webhooks.configs.stats();
|
|
26119
|
+
* console.log(`Total: ${stats.total}, Enabled: ${stats.enabled}`);
|
|
26120
|
+
*/
|
|
26121
|
+
stats: async (options) => {
|
|
26122
|
+
return rb.execute(
|
|
26123
|
+
getWebhookConfigsStats,
|
|
26124
|
+
{},
|
|
26125
|
+
options
|
|
26126
|
+
);
|
|
24460
26127
|
}
|
|
24461
26128
|
},
|
|
26129
|
+
/**
|
|
26130
|
+
* Lists all available webhook event types supported by the platform.
|
|
26131
|
+
*
|
|
26132
|
+
* Returns the complete event catalog. Use this to discover which event
|
|
26133
|
+
* types exist, understand their payload shape, and validate the `events`
|
|
26134
|
+
* array when registering or updating webhook configs. The endpoint does
|
|
26135
|
+
* not require authentication.
|
|
26136
|
+
*
|
|
26137
|
+
* @param options - Optional request options.
|
|
26138
|
+
* @returns A promise that resolves to an array of event type descriptors,
|
|
26139
|
+
* each with `type` (the event name string), `description`, and
|
|
26140
|
+
* `data_object` (the resource type the payload describes).
|
|
26141
|
+
*
|
|
26142
|
+
* @example
|
|
26143
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
26144
|
+
* const types = await client.webhooks.listEventTypes();
|
|
26145
|
+
* console.log(types.map(t => t.type));
|
|
26146
|
+
* // ['agent.execution.completed', 'document.processed', ...]
|
|
26147
|
+
*/
|
|
26148
|
+
listEventTypes: async (options) => {
|
|
26149
|
+
return rb.rawGet("/webhook-event-types", options);
|
|
26150
|
+
},
|
|
24462
26151
|
/**
|
|
24463
26152
|
* Sub-namespace for inspecting and retrying webhook delivery records.
|
|
24464
26153
|
*
|
|
@@ -24526,53 +26215,26 @@ function createWebhooksNamespace(rb) {
|
|
|
24526
26215
|
);
|
|
24527
26216
|
},
|
|
24528
26217
|
/**
|
|
24529
|
-
*
|
|
24530
|
-
*
|
|
24531
|
-
* In most cases delivery records are created automatically by the platform
|
|
24532
|
-
* when events are dispatched. This lower-level method is provided for
|
|
24533
|
-
* advanced use cases such as re-importing delivery history or triggering
|
|
24534
|
-
* synthetic deliveries in testing environments.
|
|
24535
|
-
*
|
|
24536
|
-
* @param attributes - Delivery attributes including at minimum
|
|
24537
|
-
* `webhook_config_id` and `event_type`.
|
|
24538
|
-
* @param options - Optional request options.
|
|
24539
|
-
* @returns A promise that resolves to the created `WebhookDelivery` object.
|
|
24540
|
-
*
|
|
24541
|
-
* @example
|
|
24542
|
-
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
24543
|
-
* const delivery = await client.webhooks.deliveries.create({
|
|
24544
|
-
* webhook_config_id: 'whc_01HXYZ...',
|
|
24545
|
-
* event_type: 'agent.execution.completed',
|
|
24546
|
-
* });
|
|
24547
|
-
*/
|
|
24548
|
-
create: async (attributes, options) => {
|
|
24549
|
-
return rb.execute(
|
|
24550
|
-
postWebhookDeliveriesBulkRetry,
|
|
24551
|
-
{ body: { data: { type: "webhook_delivery", attributes } } },
|
|
24552
|
-
options
|
|
24553
|
-
);
|
|
24554
|
-
},
|
|
24555
|
-
/**
|
|
24556
|
-
* Retries a specific failed webhook delivery.
|
|
26218
|
+
* Retries a specific failed webhook delivery by its ID.
|
|
24557
26219
|
*
|
|
24558
26220
|
* Triggers a new HTTP POST attempt to the webhook endpoint using the
|
|
24559
26221
|
* original event payload. The delivery record is updated with the result
|
|
24560
26222
|
* of the retry attempt.
|
|
24561
26223
|
*
|
|
24562
|
-
* @param
|
|
24563
|
-
*
|
|
26224
|
+
* @param id - The UUID of the webhook delivery record to retry.
|
|
26225
|
+
* @param options - Optional request options.
|
|
24564
26226
|
* @returns A promise that resolves to the updated `WebhookDelivery` object
|
|
24565
26227
|
* after the retry attempt.
|
|
24566
26228
|
*
|
|
24567
26229
|
* @example
|
|
24568
26230
|
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
24569
|
-
* const retried = await client.webhooks.deliveries.retry();
|
|
26231
|
+
* const retried = await client.webhooks.deliveries.retry('wdl_01HXYZ...');
|
|
24570
26232
|
* console.log(`Retry status: ${retried.attributes.response_status}`);
|
|
24571
26233
|
*/
|
|
24572
|
-
retry: async (options) => {
|
|
26234
|
+
retry: async (id, options) => {
|
|
24573
26235
|
return rb.execute(
|
|
24574
|
-
|
|
24575
|
-
{},
|
|
26236
|
+
postWebhookDeliveriesByIdRetry,
|
|
26237
|
+
{ path: { id }, body: {} },
|
|
24576
26238
|
options
|
|
24577
26239
|
);
|
|
24578
26240
|
},
|
|
@@ -24623,6 +26285,27 @@ function createWebhooksNamespace(rb) {
|
|
|
24623
26285
|
{ path: { id } },
|
|
24624
26286
|
options
|
|
24625
26287
|
);
|
|
26288
|
+
},
|
|
26289
|
+
/**
|
|
26290
|
+
* Returns aggregate delivery counts by status.
|
|
26291
|
+
*
|
|
26292
|
+
* Provides total, delivered, failed, and retrying counts. Useful for
|
|
26293
|
+
* monitoring dashboards and health checks.
|
|
26294
|
+
*
|
|
26295
|
+
* @param options - Optional request options.
|
|
26296
|
+
* @returns An object with `total`, `delivered`, `failed`, and `retrying` counts.
|
|
26297
|
+
*
|
|
26298
|
+
* @example
|
|
26299
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
26300
|
+
* const stats = await client.webhooks.deliveries.stats();
|
|
26301
|
+
* console.log(`Failed deliveries: ${stats.failed}`);
|
|
26302
|
+
*/
|
|
26303
|
+
stats: async (options) => {
|
|
26304
|
+
return rb.execute(
|
|
26305
|
+
getWebhookDeliveriesStats,
|
|
26306
|
+
{},
|
|
26307
|
+
options
|
|
26308
|
+
);
|
|
24626
26309
|
}
|
|
24627
26310
|
}
|
|
24628
26311
|
};
|
|
@@ -24679,6 +26362,327 @@ function createPipelinesNamespace(rb) {
|
|
|
24679
26362
|
};
|
|
24680
26363
|
}
|
|
24681
26364
|
|
|
26365
|
+
// src/namespaces/access-grants.ts
|
|
26366
|
+
function createAccessGrantsNamespace(rb) {
|
|
26367
|
+
return {
|
|
26368
|
+
/**
|
|
26369
|
+
* List access grants for the authenticated user's workspace.
|
|
26370
|
+
*
|
|
26371
|
+
* @param params - Optional filter parameters (subject_id, object_id, object_type, relation)
|
|
26372
|
+
* @returns Paginated list of access grants
|
|
26373
|
+
* @example
|
|
26374
|
+
* const grants = await client.accessGrants.list({ object_id: workspaceId });
|
|
26375
|
+
*/
|
|
26376
|
+
async list(params) {
|
|
26377
|
+
const query = params ? `?${new URLSearchParams(params).toString()}` : "";
|
|
26378
|
+
return rb.rawGet(`/access-grants${query}`);
|
|
26379
|
+
},
|
|
26380
|
+
/**
|
|
26381
|
+
* Get a single access grant by ID.
|
|
26382
|
+
*
|
|
26383
|
+
* @param id - AccessGrant UUID
|
|
26384
|
+
* @returns The access grant record
|
|
26385
|
+
* @example
|
|
26386
|
+
* const grant = await client.accessGrants.get("grant-uuid");
|
|
26387
|
+
*/
|
|
26388
|
+
async get(id) {
|
|
26389
|
+
return rb.rawGet(`/access-grants/${id}`);
|
|
26390
|
+
},
|
|
26391
|
+
/**
|
|
26392
|
+
* Create a new access grant, giving a subject a relation to an object.
|
|
26393
|
+
*
|
|
26394
|
+
* @param attrs - Grant attributes (subject_type, subject_id, relation, object_type, object_id)
|
|
26395
|
+
* @returns The created access grant
|
|
26396
|
+
* @example
|
|
26397
|
+
* const grant = await client.accessGrants.create({
|
|
26398
|
+
* data: {
|
|
26399
|
+
* type: "access-grant",
|
|
26400
|
+
* attributes: {
|
|
26401
|
+
* subject_type: "user",
|
|
26402
|
+
* subject_id: "user-uuid",
|
|
26403
|
+
* relation: "workspace_editor",
|
|
26404
|
+
* object_type: "workspace",
|
|
26405
|
+
* object_id: "workspace-uuid",
|
|
26406
|
+
* },
|
|
26407
|
+
* },
|
|
26408
|
+
* });
|
|
26409
|
+
*/
|
|
26410
|
+
async create(attrs) {
|
|
26411
|
+
return rb.rawPost(`/access-grants`, attrs);
|
|
26412
|
+
},
|
|
26413
|
+
/**
|
|
26414
|
+
* Update an existing access grant (relation, custom_permissions, expires_at).
|
|
26415
|
+
*
|
|
26416
|
+
* @param id - AccessGrant UUID
|
|
26417
|
+
* @param attrs - Attributes to update
|
|
26418
|
+
* @returns The updated access grant
|
|
26419
|
+
* @example
|
|
26420
|
+
* const updated = await client.accessGrants.update("grant-uuid", { data: { ... } });
|
|
26421
|
+
*/
|
|
26422
|
+
async update(id, attrs) {
|
|
26423
|
+
return rb.rawPatch(`/access-grants/${id}`, attrs);
|
|
26424
|
+
},
|
|
26425
|
+
/**
|
|
26426
|
+
* Revoke (delete) an access grant.
|
|
26427
|
+
*
|
|
26428
|
+
* @param id - AccessGrant UUID
|
|
26429
|
+
* @example
|
|
26430
|
+
* await client.accessGrants.revoke("grant-uuid");
|
|
26431
|
+
*/
|
|
26432
|
+
async revoke(id) {
|
|
26433
|
+
return rb.rawDelete(`/access-grants/${id}`);
|
|
26434
|
+
}
|
|
26435
|
+
};
|
|
26436
|
+
}
|
|
26437
|
+
|
|
26438
|
+
// src/namespaces/roles.ts
|
|
26439
|
+
function createRolesNamespace(rb) {
|
|
26440
|
+
return {
|
|
26441
|
+
/**
|
|
26442
|
+
* List roles available in the current context (system defaults + application roles).
|
|
26443
|
+
*
|
|
26444
|
+
* @param params - Optional filter parameters
|
|
26445
|
+
* @returns Paginated list of roles
|
|
26446
|
+
* @example
|
|
26447
|
+
* const roles = await client.roles.list();
|
|
26448
|
+
*/
|
|
26449
|
+
async list(params) {
|
|
26450
|
+
const query = params ? `?${new URLSearchParams(params).toString()}` : "";
|
|
26451
|
+
return rb.rawGet(`/roles${query}`);
|
|
26452
|
+
},
|
|
26453
|
+
/**
|
|
26454
|
+
* Get a single role by ID.
|
|
26455
|
+
*
|
|
26456
|
+
* @param id - Role UUID
|
|
26457
|
+
* @returns The role record
|
|
26458
|
+
* @example
|
|
26459
|
+
* const role = await client.roles.get("role-uuid");
|
|
26460
|
+
*/
|
|
26461
|
+
async get(id) {
|
|
26462
|
+
return rb.rawGet(`/roles/${id}`);
|
|
26463
|
+
},
|
|
26464
|
+
/**
|
|
26465
|
+
* Create a new custom role (permission bundle) for the application.
|
|
26466
|
+
*
|
|
26467
|
+
* @param attrs - Role attributes (name, description, permissions, application_id)
|
|
26468
|
+
* @returns The created role
|
|
26469
|
+
* @example
|
|
26470
|
+
* const role = await client.roles.create({
|
|
26471
|
+
* data: {
|
|
26472
|
+
* type: "role",
|
|
26473
|
+
* attributes: { name: "Content Editor", permissions: ["extract:document:read:all"] },
|
|
26474
|
+
* },
|
|
26475
|
+
* });
|
|
26476
|
+
*/
|
|
26477
|
+
async create(attrs) {
|
|
26478
|
+
return rb.rawPost(`/roles`, attrs);
|
|
26479
|
+
},
|
|
26480
|
+
/**
|
|
26481
|
+
* Update a role's name, description, or permissions.
|
|
26482
|
+
*
|
|
26483
|
+
* @param id - Role UUID
|
|
26484
|
+
* @param attrs - Attributes to update
|
|
26485
|
+
* @returns The updated role
|
|
26486
|
+
* @example
|
|
26487
|
+
* const updated = await client.roles.update("role-uuid", { data: { ... } });
|
|
26488
|
+
*/
|
|
26489
|
+
async update(id, attrs) {
|
|
26490
|
+
return rb.rawPatch(`/roles/${id}`, attrs);
|
|
26491
|
+
},
|
|
26492
|
+
/**
|
|
26493
|
+
* Delete a custom role. System default roles cannot be deleted.
|
|
26494
|
+
*
|
|
26495
|
+
* @param id - Role UUID
|
|
26496
|
+
* @example
|
|
26497
|
+
* await client.roles.delete("role-uuid");
|
|
26498
|
+
*/
|
|
26499
|
+
async delete(id) {
|
|
26500
|
+
return rb.rawDelete(`/roles/${id}`);
|
|
26501
|
+
}
|
|
26502
|
+
};
|
|
26503
|
+
}
|
|
26504
|
+
|
|
26505
|
+
// src/namespaces/memory.ts
|
|
26506
|
+
function createMemoryNamespace(rb) {
|
|
26507
|
+
return {
|
|
26508
|
+
/**
|
|
26509
|
+
* Sub-namespace for section document operations.
|
|
26510
|
+
*
|
|
26511
|
+
* A section document represents an indexed source (extraction document,
|
|
26512
|
+
* crawler page, knowledge file, or direct upload). Each section document
|
|
26513
|
+
* contains metadata about the source and links to its document sections.
|
|
26514
|
+
*/
|
|
26515
|
+
sectionDocuments: {
|
|
26516
|
+
/**
|
|
26517
|
+
* Lists section documents in the current workspace.
|
|
26518
|
+
*
|
|
26519
|
+
* Returns paginated results sorted by creation date (newest first).
|
|
26520
|
+
*
|
|
26521
|
+
* @param params - Optional pagination parameters (`page[offset]`, `page[limit]`).
|
|
26522
|
+
* @param options - Optional request options such as custom headers or abort signal.
|
|
26523
|
+
* @returns A promise resolving to an array of section document records.
|
|
26524
|
+
*
|
|
26525
|
+
* @example
|
|
26526
|
+
* ```typescript
|
|
26527
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
26528
|
+
* const docs = await client.memory.sectionDocuments.list();
|
|
26529
|
+
* docs.forEach(d => console.log(d.attributes?.doc_path));
|
|
26530
|
+
* ```
|
|
26531
|
+
*/
|
|
26532
|
+
list: async (params, options) => {
|
|
26533
|
+
return rb.execute(
|
|
26534
|
+
getMemorySectionDocuments,
|
|
26535
|
+
buildPageQuery(params?.page, params?.pageSize),
|
|
26536
|
+
options
|
|
26537
|
+
);
|
|
26538
|
+
},
|
|
26539
|
+
/**
|
|
26540
|
+
* Retrieves a single section document by its unique identifier.
|
|
26541
|
+
*
|
|
26542
|
+
* @param id - The UUID of the section document.
|
|
26543
|
+
* @param options - Optional request options.
|
|
26544
|
+
* @returns A promise resolving to the section document record.
|
|
26545
|
+
*
|
|
26546
|
+
* @example
|
|
26547
|
+
* ```typescript
|
|
26548
|
+
* const doc = await client.memory.sectionDocuments.get('sd_01HXYZ...');
|
|
26549
|
+
* console.log(doc.attributes?.source_type, doc.attributes?.section_count);
|
|
26550
|
+
* ```
|
|
26551
|
+
*/
|
|
26552
|
+
get: async (id, options) => {
|
|
26553
|
+
return rb.execute(
|
|
26554
|
+
getMemorySectionDocumentsById,
|
|
26555
|
+
{ path: { id } },
|
|
26556
|
+
options
|
|
26557
|
+
);
|
|
26558
|
+
}
|
|
26559
|
+
},
|
|
26560
|
+
/**
|
|
26561
|
+
* Sub-namespace for document section operations.
|
|
26562
|
+
*
|
|
26563
|
+
* A document section represents one heading-delimited portion of an
|
|
26564
|
+
* indexed document. Sections have stable IDs that survive re-indexing,
|
|
26565
|
+
* enabling persistent cross-document references.
|
|
26566
|
+
*/
|
|
26567
|
+
documentSections: {
|
|
26568
|
+
/**
|
|
26569
|
+
* Lists document sections in the current workspace.
|
|
26570
|
+
*
|
|
26571
|
+
* Returns paginated results sorted by position within their documents.
|
|
26572
|
+
*
|
|
26573
|
+
* @param params - Optional pagination parameters.
|
|
26574
|
+
* @param options - Optional request options.
|
|
26575
|
+
* @returns A promise resolving to an array of document section records.
|
|
26576
|
+
*
|
|
26577
|
+
* @example
|
|
26578
|
+
* ```typescript
|
|
26579
|
+
* const sections = await client.memory.documentSections.list();
|
|
26580
|
+
* sections.forEach(s => console.log(s.attributes?.title, s.attributes?.level));
|
|
26581
|
+
* ```
|
|
26582
|
+
*/
|
|
26583
|
+
list: async (params, options) => {
|
|
26584
|
+
return rb.execute(
|
|
26585
|
+
getMemoryDocumentSections,
|
|
26586
|
+
buildPageQuery(params?.page, params?.pageSize),
|
|
26587
|
+
options
|
|
26588
|
+
);
|
|
26589
|
+
},
|
|
26590
|
+
/**
|
|
26591
|
+
* Retrieves a single document section by its unique identifier.
|
|
26592
|
+
*
|
|
26593
|
+
* @param id - The UUID of the document section.
|
|
26594
|
+
* @param options - Optional request options.
|
|
26595
|
+
* @returns A promise resolving to the document section record.
|
|
26596
|
+
*
|
|
26597
|
+
* @example
|
|
26598
|
+
* ```typescript
|
|
26599
|
+
* const section = await client.memory.documentSections.get('ds_01HXYZ...');
|
|
26600
|
+
* console.log(section.attributes?.title, section.attributes?.content_preview);
|
|
26601
|
+
* ```
|
|
26602
|
+
*/
|
|
26603
|
+
get: async (id, options) => {
|
|
26604
|
+
return rb.execute(
|
|
26605
|
+
getMemoryDocumentSectionsById,
|
|
26606
|
+
{ path: { id } },
|
|
26607
|
+
options
|
|
26608
|
+
);
|
|
26609
|
+
}
|
|
26610
|
+
}
|
|
26611
|
+
};
|
|
26612
|
+
}
|
|
26613
|
+
|
|
26614
|
+
// src/namespaces/permissions.ts
|
|
26615
|
+
function createPermissionsNamespace(rb) {
|
|
26616
|
+
return {
|
|
26617
|
+
/**
|
|
26618
|
+
* List all registered platform permissions.
|
|
26619
|
+
*
|
|
26620
|
+
* Optionally filter by `app`, `context`, or `category` query params.
|
|
26621
|
+
*
|
|
26622
|
+
* @param params - Optional filter parameters (app, context, category)
|
|
26623
|
+
* @returns List of permissions
|
|
26624
|
+
* @example
|
|
26625
|
+
* const perms = await client.permissions.list({ context: "workspace" });
|
|
26626
|
+
*/
|
|
26627
|
+
async list(params) {
|
|
26628
|
+
const query = params ? `?${new URLSearchParams(params).toString()}` : "";
|
|
26629
|
+
return rb.rawGet(`/permissions${query}`);
|
|
26630
|
+
},
|
|
26631
|
+
/**
|
|
26632
|
+
* Get a single permission by its ID string (e.g., "extract:document:read:all").
|
|
26633
|
+
*
|
|
26634
|
+
* @param id - Permission ID string
|
|
26635
|
+
* @returns The permission record
|
|
26636
|
+
* @example
|
|
26637
|
+
* const perm = await client.permissions.get("extract:document:read:all");
|
|
26638
|
+
*/
|
|
26639
|
+
async get(id) {
|
|
26640
|
+
return rb.rawGet(
|
|
26641
|
+
`/permissions/${encodeURIComponent(id)}`
|
|
26642
|
+
);
|
|
26643
|
+
},
|
|
26644
|
+
/**
|
|
26645
|
+
* Get permission system metadata (version, apps, scopes, categories, cache TTL).
|
|
26646
|
+
*
|
|
26647
|
+
* @returns Permission system metadata
|
|
26648
|
+
* @example
|
|
26649
|
+
* const meta = await client.permissions.meta();
|
|
26650
|
+
*/
|
|
26651
|
+
async meta() {
|
|
26652
|
+
return rb.rawGet(`/permissions/meta`);
|
|
26653
|
+
},
|
|
26654
|
+
/**
|
|
26655
|
+
* List permission presets (pre-defined role bundles).
|
|
26656
|
+
*
|
|
26657
|
+
* Optionally filter by `context` (tenant, workspace) or `app`.
|
|
26658
|
+
*
|
|
26659
|
+
* @param params - Optional filter parameters (context, app)
|
|
26660
|
+
* @returns List of permission presets
|
|
26661
|
+
* @example
|
|
26662
|
+
* const presets = await client.permissions.listPresets({ context: "workspace" });
|
|
26663
|
+
*/
|
|
26664
|
+
async listPresets(params) {
|
|
26665
|
+
const query = params ? `?${new URLSearchParams(params).toString()}` : "";
|
|
26666
|
+
return rb.rawGet(
|
|
26667
|
+
`/permissions/presets${query}`
|
|
26668
|
+
);
|
|
26669
|
+
},
|
|
26670
|
+
/**
|
|
26671
|
+
* Get a single permission preset by its composite ID (e.g., "workspace:org:admin").
|
|
26672
|
+
*
|
|
26673
|
+
* @param id - Preset composite ID
|
|
26674
|
+
* @returns The permission preset
|
|
26675
|
+
* @example
|
|
26676
|
+
* const preset = await client.permissions.getPreset("workspace:org:admin");
|
|
26677
|
+
*/
|
|
26678
|
+
async getPreset(id) {
|
|
26679
|
+
return rb.rawGet(
|
|
26680
|
+
`/permissions/presets/${encodeURIComponent(id)}`
|
|
26681
|
+
);
|
|
26682
|
+
}
|
|
26683
|
+
};
|
|
26684
|
+
}
|
|
26685
|
+
|
|
24682
26686
|
// src/streaming.ts
|
|
24683
26687
|
var DEFAULT_STREAM_TIMEOUT = 3e5;
|
|
24684
26688
|
var DEFAULT_MAX_CHUNKS = 1e4;
|
|
@@ -24922,6 +26926,25 @@ var RequestBuilder = class {
|
|
|
24922
26926
|
throw handleApiError(error);
|
|
24923
26927
|
}
|
|
24924
26928
|
}
|
|
26929
|
+
/**
|
|
26930
|
+
* Execute a raw PATCH request to a custom (non-generated) endpoint.
|
|
26931
|
+
*/
|
|
26932
|
+
async rawPatch(url, body, options) {
|
|
26933
|
+
const headers = buildHeaders(this.getHeaders, options);
|
|
26934
|
+
try {
|
|
26935
|
+
const { data } = await this.requestWithRetry(
|
|
26936
|
+
() => this.clientInstance.patch({
|
|
26937
|
+
url,
|
|
26938
|
+
headers,
|
|
26939
|
+
...body !== void 0 && { body },
|
|
26940
|
+
...options?.signal && { signal: options.signal }
|
|
26941
|
+
})
|
|
26942
|
+
);
|
|
26943
|
+
return this.unwrap(data?.data);
|
|
26944
|
+
} catch (error) {
|
|
26945
|
+
throw handleApiError(error);
|
|
26946
|
+
}
|
|
26947
|
+
}
|
|
24925
26948
|
/**
|
|
24926
26949
|
* Execute a raw DELETE request to a custom (non-generated) endpoint.
|
|
24927
26950
|
*/
|
|
@@ -25077,6 +27100,7 @@ var GptClient = class extends BaseClient {
|
|
|
25077
27100
|
this.ai = createAiNamespace(rb);
|
|
25078
27101
|
this.billing = createBillingNamespace(rb);
|
|
25079
27102
|
this.catalog = createCatalogNamespace(rb);
|
|
27103
|
+
this.clinical = createClinicalNamespace(rb);
|
|
25080
27104
|
this.compliance = createComplianceNamespace(rb);
|
|
25081
27105
|
this.communication = createCommunicationNamespace(rb);
|
|
25082
27106
|
this.connectors = createConnectorsNamespace(rb);
|
|
@@ -25102,6 +27126,10 @@ var GptClient = class extends BaseClient {
|
|
|
25102
27126
|
this.models = createModelsNamespace(rb);
|
|
25103
27127
|
this.crmClusters = createCrmClustersNamespace(rb);
|
|
25104
27128
|
this.pipelines = createPipelinesNamespace(rb);
|
|
27129
|
+
this.accessGrants = createAccessGrantsNamespace(rb);
|
|
27130
|
+
this.roles = createRolesNamespace(rb);
|
|
27131
|
+
this.permissions = createPermissionsNamespace(rb);
|
|
27132
|
+
this.memory = createMemoryNamespace(rb);
|
|
25105
27133
|
}
|
|
25106
27134
|
/**
|
|
25107
27135
|
* Subscribe to SDK lifecycle events.
|