@gpt-platform/client 0.10.1 → 0.10.3
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 +763 -49
- package/dist/index.d.ts +763 -49
- package/dist/index.js +228 -60
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +227 -60
- package/dist/index.mjs.map +1 -1
- package/llms.txt +6 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51,6 +51,7 @@ __export(index_exports, {
|
|
|
51
51
|
collectStreamedMessage: () => collectStreamedMessage,
|
|
52
52
|
createChannelsNamespace: () => createChannelsNamespace,
|
|
53
53
|
createImportsNamespace: () => createImportsNamespace,
|
|
54
|
+
createProjectsNamespace: () => createProjectsNamespace,
|
|
54
55
|
handleApiError: () => handleApiError,
|
|
55
56
|
isBrowserEnvironment: () => isBrowserEnvironment,
|
|
56
57
|
isSecureUrl: () => isSecureUrl,
|
|
@@ -1338,7 +1339,7 @@ function buildUserAgent(sdkVersion, appInfo) {
|
|
|
1338
1339
|
}
|
|
1339
1340
|
|
|
1340
1341
|
// src/version.ts
|
|
1341
|
-
var SDK_VERSION = "0.10.
|
|
1342
|
+
var SDK_VERSION = "0.10.3";
|
|
1342
1343
|
var DEFAULT_API_VERSION = "2026-03-23";
|
|
1343
1344
|
|
|
1344
1345
|
// src/base-client.ts
|
|
@@ -1970,6 +1971,11 @@ var getCatalogTaxonomyNodesTaxonomyByTaxonomyId = (options) => (options.client ?
|
|
|
1970
1971
|
url: "/catalog/taxonomy-nodes/taxonomy/{taxonomy_id}",
|
|
1971
1972
|
...options
|
|
1972
1973
|
});
|
|
1974
|
+
var getClinicalNotesByPatient = (options) => (options.client ?? client).get({
|
|
1975
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1976
|
+
url: "/clinical/notes/by-patient",
|
|
1977
|
+
...options
|
|
1978
|
+
});
|
|
1973
1979
|
var getClinicalNotesByNoteIdVersionsById = (options) => (options.client ?? client).get({
|
|
1974
1980
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1975
1981
|
url: "/clinical/notes/{note_id}/versions/{id}",
|
|
@@ -2176,6 +2182,11 @@ var postTenantsPersonal = (options) => (options.client ?? client).post({
|
|
|
2176
2182
|
...options.headers
|
|
2177
2183
|
}
|
|
2178
2184
|
});
|
|
2185
|
+
var getClinicalMealPlansByPatient = (options) => (options.client ?? client).get({
|
|
2186
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2187
|
+
url: "/clinical/meal-plans/by-patient",
|
|
2188
|
+
...options
|
|
2189
|
+
});
|
|
2179
2190
|
var getEmailTrackingEventsById = (options) => (options.client ?? client).get({
|
|
2180
2191
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2181
2192
|
url: "/email/tracking-events/{id}",
|
|
@@ -2977,6 +2988,11 @@ var patchSupportTicketsByIdMerge = (options) => (options.client ?? client).patch
|
|
|
2977
2988
|
...options.headers
|
|
2978
2989
|
}
|
|
2979
2990
|
});
|
|
2991
|
+
var getClinicalNotesByWorkspace = (options) => (options.client ?? client).get({
|
|
2992
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2993
|
+
url: "/clinical/notes/by-workspace",
|
|
2994
|
+
...options
|
|
2995
|
+
});
|
|
2980
2996
|
var getMemorySectionDocumentsById = (options) => (options.client ?? client).get({
|
|
2981
2997
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2982
2998
|
url: "/memory/section-documents/{id}",
|
|
@@ -12427,7 +12443,7 @@ function createClinicalNamespace(rb) {
|
|
|
12427
12443
|
*/
|
|
12428
12444
|
list: async (params, options) => rb.execute(
|
|
12429
12445
|
getClinicalPatients,
|
|
12430
|
-
params ?? {},
|
|
12446
|
+
{ query: params ?? {} },
|
|
12431
12447
|
options
|
|
12432
12448
|
),
|
|
12433
12449
|
/**
|
|
@@ -12616,7 +12632,7 @@ function createClinicalNamespace(rb) {
|
|
|
12616
12632
|
*/
|
|
12617
12633
|
list: async (params, options) => rb.execute(
|
|
12618
12634
|
getClinicalSessions,
|
|
12619
|
-
params ?? {},
|
|
12635
|
+
{ query: params ?? {} },
|
|
12620
12636
|
options
|
|
12621
12637
|
),
|
|
12622
12638
|
/**
|
|
@@ -12755,7 +12771,37 @@ function createClinicalNamespace(rb) {
|
|
|
12755
12771
|
* @param options - Request options
|
|
12756
12772
|
* @returns Array of {@link ClinicalNote} records
|
|
12757
12773
|
*/
|
|
12758
|
-
list: async (params, options) => rb.execute(
|
|
12774
|
+
list: async (params, options) => rb.execute(
|
|
12775
|
+
getClinicalNotes,
|
|
12776
|
+
{ query: params ?? {} },
|
|
12777
|
+
options
|
|
12778
|
+
),
|
|
12779
|
+
/**
|
|
12780
|
+
* List all notes for a patient across all sessions.
|
|
12781
|
+
*
|
|
12782
|
+
* @param patientId - Patient UUID
|
|
12783
|
+
* @param params - Filter/pagination parameters
|
|
12784
|
+
* @param options - Request options
|
|
12785
|
+
* @returns Array of {@link ClinicalNote} records
|
|
12786
|
+
*/
|
|
12787
|
+
listByPatient: async (patientId, params, options) => rb.execute(
|
|
12788
|
+
getClinicalNotesByPatient,
|
|
12789
|
+
{ query: { patient_id: patientId, ...params } },
|
|
12790
|
+
options
|
|
12791
|
+
),
|
|
12792
|
+
/**
|
|
12793
|
+
* List all notes in a workspace.
|
|
12794
|
+
*
|
|
12795
|
+
* @param workspaceId - Workspace UUID
|
|
12796
|
+
* @param params - Filter/pagination parameters
|
|
12797
|
+
* @param options - Request options
|
|
12798
|
+
* @returns Array of {@link ClinicalNote} records
|
|
12799
|
+
*/
|
|
12800
|
+
listByWorkspace: async (workspaceId, params, options) => rb.execute(
|
|
12801
|
+
getClinicalNotesByWorkspace,
|
|
12802
|
+
{ query: { workspace_id: workspaceId, ...params } },
|
|
12803
|
+
options
|
|
12804
|
+
),
|
|
12759
12805
|
/**
|
|
12760
12806
|
* Get a single note by ID.
|
|
12761
12807
|
*
|
|
@@ -12864,7 +12910,7 @@ function createClinicalNamespace(rb) {
|
|
|
12864
12910
|
*/
|
|
12865
12911
|
listArchived: async (params, options) => rb.execute(
|
|
12866
12912
|
getClinicalNotesArchived,
|
|
12867
|
-
params ?? {},
|
|
12913
|
+
{ query: params ?? {} },
|
|
12868
12914
|
options
|
|
12869
12915
|
),
|
|
12870
12916
|
/**
|
|
@@ -12971,7 +13017,7 @@ function createClinicalNamespace(rb) {
|
|
|
12971
13017
|
*/
|
|
12972
13018
|
list: async (params, options) => rb.execute(
|
|
12973
13019
|
getClinicalHealthMetrics,
|
|
12974
|
-
params ?? {},
|
|
13020
|
+
{ query: params ?? {} },
|
|
12975
13021
|
options
|
|
12976
13022
|
),
|
|
12977
13023
|
/**
|
|
@@ -13101,7 +13147,7 @@ function createClinicalNamespace(rb) {
|
|
|
13101
13147
|
*/
|
|
13102
13148
|
listArchived: async (params, options) => rb.execute(
|
|
13103
13149
|
getClinicalHealthMetricsArchived,
|
|
13104
|
-
params ?? {},
|
|
13150
|
+
{ query: params ?? {} },
|
|
13105
13151
|
options
|
|
13106
13152
|
)
|
|
13107
13153
|
},
|
|
@@ -13118,7 +13164,20 @@ function createClinicalNamespace(rb) {
|
|
|
13118
13164
|
*/
|
|
13119
13165
|
list: async (params, options) => rb.execute(
|
|
13120
13166
|
getClinicalMealPlans,
|
|
13121
|
-
params ?? {},
|
|
13167
|
+
{ query: params ?? {} },
|
|
13168
|
+
options
|
|
13169
|
+
),
|
|
13170
|
+
/**
|
|
13171
|
+
* List all meal plans for a patient across all sessions.
|
|
13172
|
+
*
|
|
13173
|
+
* @param patientId - Patient UUID
|
|
13174
|
+
* @param params - Filter/pagination parameters
|
|
13175
|
+
* @param options - Request options
|
|
13176
|
+
* @returns Array of {@link ClinicalMealPlan} records
|
|
13177
|
+
*/
|
|
13178
|
+
listByPatient: async (patientId, params, options) => rb.execute(
|
|
13179
|
+
getClinicalMealPlansByPatient,
|
|
13180
|
+
{ query: { patient_id: patientId, ...params } },
|
|
13122
13181
|
options
|
|
13123
13182
|
),
|
|
13124
13183
|
/**
|
|
@@ -13137,6 +13196,8 @@ function createClinicalNamespace(rb) {
|
|
|
13137
13196
|
* Create a new meal plan.
|
|
13138
13197
|
*
|
|
13139
13198
|
* @param attributes - Meal plan creation attributes. Must include `workspace_id`.
|
|
13199
|
+
* Provide `patient_id` directly, or `session_id` to auto-populate
|
|
13200
|
+
* `patient_id` from the session's patient.
|
|
13140
13201
|
* @param options - Request options
|
|
13141
13202
|
* @returns Created {@link ClinicalMealPlan} record
|
|
13142
13203
|
*/
|
|
@@ -13229,7 +13290,7 @@ function createClinicalNamespace(rb) {
|
|
|
13229
13290
|
*/
|
|
13230
13291
|
listArchived: async (params, options) => rb.execute(
|
|
13231
13292
|
getClinicalMealPlansArchived,
|
|
13232
|
-
params ?? {},
|
|
13293
|
+
{ query: params ?? {} },
|
|
13233
13294
|
options
|
|
13234
13295
|
)
|
|
13235
13296
|
},
|
|
@@ -13246,7 +13307,7 @@ function createClinicalNamespace(rb) {
|
|
|
13246
13307
|
*/
|
|
13247
13308
|
list: async (params, options) => rb.execute(
|
|
13248
13309
|
getClinicalClientGoals,
|
|
13249
|
-
params ?? {},
|
|
13310
|
+
{ query: params ?? {} },
|
|
13250
13311
|
options
|
|
13251
13312
|
),
|
|
13252
13313
|
/**
|
|
@@ -13363,7 +13424,7 @@ function createClinicalNamespace(rb) {
|
|
|
13363
13424
|
*/
|
|
13364
13425
|
listArchived: async (params, options) => rb.execute(
|
|
13365
13426
|
getClinicalClientGoalsArchived,
|
|
13366
|
-
params ?? {},
|
|
13427
|
+
{ query: params ?? {} },
|
|
13367
13428
|
options
|
|
13368
13429
|
),
|
|
13369
13430
|
/**
|
|
@@ -13401,7 +13462,7 @@ function createClinicalNamespace(rb) {
|
|
|
13401
13462
|
*/
|
|
13402
13463
|
list: async (params, options) => rb.execute(
|
|
13403
13464
|
getClinicalClientSupplements,
|
|
13404
|
-
params ?? {},
|
|
13465
|
+
{ query: params ?? {} },
|
|
13405
13466
|
options
|
|
13406
13467
|
),
|
|
13407
13468
|
/**
|
|
@@ -13523,9 +13584,28 @@ function createClinicalNamespace(rb) {
|
|
|
13523
13584
|
*/
|
|
13524
13585
|
listArchived: async (params, options) => rb.execute(
|
|
13525
13586
|
getClinicalClientSupplementsArchived,
|
|
13526
|
-
params ?? {},
|
|
13587
|
+
{ query: params ?? {} },
|
|
13527
13588
|
options
|
|
13528
|
-
)
|
|
13589
|
+
),
|
|
13590
|
+
/**
|
|
13591
|
+
* Create multiple supplements in a single request.
|
|
13592
|
+
*
|
|
13593
|
+
* @param attrs - Bulk creation attributes with workspace_id and supplements array
|
|
13594
|
+
* @param options - Request options
|
|
13595
|
+
* @returns Array of creation results with id and status per supplement
|
|
13596
|
+
*
|
|
13597
|
+
* @example
|
|
13598
|
+
* ```typescript
|
|
13599
|
+
* const results = await client.clinical.clientSupplements.bulkCreate({
|
|
13600
|
+
* workspace_id: 'ws_123',
|
|
13601
|
+
* supplements: [
|
|
13602
|
+
* { patient_id: 'pat_1', name: 'Vitamin D3', source: 'fullscript' },
|
|
13603
|
+
* { patient_id: 'pat_1', name: 'Omega-3', source: 'fullscript' },
|
|
13604
|
+
* ],
|
|
13605
|
+
* });
|
|
13606
|
+
* ```
|
|
13607
|
+
*/
|
|
13608
|
+
bulkCreate: async (attrs, options) => rb.rawPost(`/clinical/client-supplements/bulk`, { data: attrs }, options).then((r) => r.data)
|
|
13529
13609
|
},
|
|
13530
13610
|
/**
|
|
13531
13611
|
* Manage clinical deliveries (care plan items sent to patients).
|
|
@@ -13540,7 +13620,7 @@ function createClinicalNamespace(rb) {
|
|
|
13540
13620
|
*/
|
|
13541
13621
|
list: async (params, options) => rb.execute(
|
|
13542
13622
|
getClinicalDeliveries,
|
|
13543
|
-
params ?? {},
|
|
13623
|
+
{ query: params ?? {} },
|
|
13544
13624
|
options
|
|
13545
13625
|
),
|
|
13546
13626
|
/**
|
|
@@ -13598,7 +13678,7 @@ function createClinicalNamespace(rb) {
|
|
|
13598
13678
|
*/
|
|
13599
13679
|
list: async (params, options) => rb.execute(
|
|
13600
13680
|
getClinicalPracticeResources,
|
|
13601
|
-
params ?? {},
|
|
13681
|
+
{ query: params ?? {} },
|
|
13602
13682
|
options
|
|
13603
13683
|
),
|
|
13604
13684
|
/**
|
|
@@ -13719,7 +13799,7 @@ function createClinicalNamespace(rb) {
|
|
|
13719
13799
|
*/
|
|
13720
13800
|
listArchived: async (params, options) => rb.execute(
|
|
13721
13801
|
getClinicalPracticeResourcesArchived,
|
|
13722
|
-
params ?? {},
|
|
13802
|
+
{ query: params ?? {} },
|
|
13723
13803
|
options
|
|
13724
13804
|
),
|
|
13725
13805
|
/**
|
|
@@ -13789,7 +13869,7 @@ function createClinicalNamespace(rb) {
|
|
|
13789
13869
|
*/
|
|
13790
13870
|
listArchivedCatalog: async (params, options) => rb.execute(
|
|
13791
13871
|
getClinicalPracticeResourcesCatalogArchived,
|
|
13792
|
-
params ?? {},
|
|
13872
|
+
{ query: params ?? {} },
|
|
13793
13873
|
options
|
|
13794
13874
|
),
|
|
13795
13875
|
/**
|
|
@@ -14044,7 +14124,7 @@ function createClinicalNamespace(rb) {
|
|
|
14044
14124
|
*/
|
|
14045
14125
|
listArchived: async (params, options) => rb.execute(
|
|
14046
14126
|
getClinicalPracticeToolsArchived,
|
|
14047
|
-
params ?? {},
|
|
14127
|
+
{ query: params ?? {} },
|
|
14048
14128
|
options
|
|
14049
14129
|
),
|
|
14050
14130
|
/**
|
|
@@ -14136,7 +14216,7 @@ function createClinicalNamespace(rb) {
|
|
|
14136
14216
|
*/
|
|
14137
14217
|
listArchivedCatalog: async (params, options) => rb.execute(
|
|
14138
14218
|
getClinicalPracticeToolsCatalogArchived,
|
|
14139
|
-
params ?? {},
|
|
14219
|
+
{ query: params ?? {} },
|
|
14140
14220
|
options
|
|
14141
14221
|
),
|
|
14142
14222
|
/**
|
|
@@ -14251,7 +14331,7 @@ function createClinicalNamespace(rb) {
|
|
|
14251
14331
|
*/
|
|
14252
14332
|
list: async (params, options) => rb.execute(
|
|
14253
14333
|
getClinicalClientResourceAssignments,
|
|
14254
|
-
params ?? {},
|
|
14334
|
+
{ query: params ?? {} },
|
|
14255
14335
|
options
|
|
14256
14336
|
),
|
|
14257
14337
|
/**
|
|
@@ -14391,7 +14471,7 @@ function createClinicalNamespace(rb) {
|
|
|
14391
14471
|
*/
|
|
14392
14472
|
listArchived: async (params, options) => rb.execute(
|
|
14393
14473
|
getClinicalClientResourceAssignmentsArchived,
|
|
14394
|
-
params ?? {},
|
|
14474
|
+
{ query: params ?? {} },
|
|
14395
14475
|
options
|
|
14396
14476
|
)
|
|
14397
14477
|
},
|
|
@@ -14412,7 +14492,7 @@ function createClinicalNamespace(rb) {
|
|
|
14412
14492
|
*/
|
|
14413
14493
|
list: async (params, options) => rb.execute(
|
|
14414
14494
|
getClinicalSupplementRecCache,
|
|
14415
|
-
params ?? {},
|
|
14495
|
+
{ query: params ?? {} },
|
|
14416
14496
|
options
|
|
14417
14497
|
),
|
|
14418
14498
|
/**
|
|
@@ -14643,7 +14723,7 @@ function createClinicalNamespace(rb) {
|
|
|
14643
14723
|
*/
|
|
14644
14724
|
listArchived: async (params, options) => rb.execute(
|
|
14645
14725
|
getClinicalGoalTemplatesArchived,
|
|
14646
|
-
params ?? {},
|
|
14726
|
+
{ query: params ?? {} },
|
|
14647
14727
|
options
|
|
14648
14728
|
),
|
|
14649
14729
|
/**
|
|
@@ -14713,7 +14793,7 @@ function createClinicalNamespace(rb) {
|
|
|
14713
14793
|
*/
|
|
14714
14794
|
listArchivedCatalog: async (params, options) => rb.execute(
|
|
14715
14795
|
getClinicalGoalTemplatesCatalogArchived,
|
|
14716
|
-
params ?? {},
|
|
14796
|
+
{ query: params ?? {} },
|
|
14717
14797
|
options
|
|
14718
14798
|
),
|
|
14719
14799
|
/**
|
|
@@ -14839,7 +14919,11 @@ function createClinicalNamespace(rb) {
|
|
|
14839
14919
|
* });
|
|
14840
14920
|
* ```
|
|
14841
14921
|
*/
|
|
14842
|
-
search: async (params, options) => rb.rawPost(
|
|
14922
|
+
search: async (params, options) => rb.rawPost(
|
|
14923
|
+
`/clinical/recipes/search`,
|
|
14924
|
+
params,
|
|
14925
|
+
options
|
|
14926
|
+
)
|
|
14843
14927
|
}
|
|
14844
14928
|
};
|
|
14845
14929
|
}
|
|
@@ -18461,7 +18545,10 @@ function createConnectorsNamespace(rb) {
|
|
|
18461
18545
|
*/
|
|
18462
18546
|
create: async (attributes, options) => rb.execute(
|
|
18463
18547
|
postConnectors,
|
|
18464
|
-
{
|
|
18548
|
+
{
|
|
18549
|
+
body: { data: { type: "connector-instance", attributes } },
|
|
18550
|
+
query: { workspace_id: attributes.workspace_id }
|
|
18551
|
+
},
|
|
18465
18552
|
options
|
|
18466
18553
|
),
|
|
18467
18554
|
/**
|
|
@@ -18583,7 +18670,6 @@ function createConnectorsNamespace(rb) {
|
|
|
18583
18670
|
path: { id },
|
|
18584
18671
|
body: {
|
|
18585
18672
|
data: {
|
|
18586
|
-
type: "credential",
|
|
18587
18673
|
workspace_id: workspaceId
|
|
18588
18674
|
}
|
|
18589
18675
|
}
|
|
@@ -18616,10 +18702,7 @@ function createConnectorsNamespace(rb) {
|
|
|
18616
18702
|
postConnectorsCredentialsUpsert,
|
|
18617
18703
|
{
|
|
18618
18704
|
body: {
|
|
18619
|
-
data:
|
|
18620
|
-
type: "credential",
|
|
18621
|
-
...attributes
|
|
18622
|
-
}
|
|
18705
|
+
data: attributes
|
|
18623
18706
|
}
|
|
18624
18707
|
},
|
|
18625
18708
|
options
|
|
@@ -18648,7 +18731,6 @@ function createConnectorsNamespace(rb) {
|
|
|
18648
18731
|
{
|
|
18649
18732
|
body: {
|
|
18650
18733
|
data: {
|
|
18651
|
-
type: "credential",
|
|
18652
18734
|
workspace_id: workspaceId,
|
|
18653
18735
|
connector_type: connectorType,
|
|
18654
18736
|
scope_level: scopeLevel
|
|
@@ -19131,9 +19213,11 @@ function createConnectorsNamespace(rb) {
|
|
|
19131
19213
|
listTreatmentPlans: async (connectorId, workspaceId, patientId, options) => rb.rawPost(
|
|
19132
19214
|
`/connectors/fullscript/treatment-plans/list`,
|
|
19133
19215
|
{
|
|
19134
|
-
|
|
19135
|
-
|
|
19136
|
-
|
|
19216
|
+
data: {
|
|
19217
|
+
workspace_id: workspaceId,
|
|
19218
|
+
connector_id: connectorId,
|
|
19219
|
+
patient_id: patientId
|
|
19220
|
+
}
|
|
19137
19221
|
},
|
|
19138
19222
|
options
|
|
19139
19223
|
).then((r) => r.data),
|
|
@@ -19160,9 +19244,11 @@ function createConnectorsNamespace(rb) {
|
|
|
19160
19244
|
getTreatmentPlan: async (connectorId, workspaceId, treatmentPlanId, options) => rb.rawPost(
|
|
19161
19245
|
`/connectors/fullscript/treatment-plans/get`,
|
|
19162
19246
|
{
|
|
19163
|
-
|
|
19164
|
-
|
|
19165
|
-
|
|
19247
|
+
data: {
|
|
19248
|
+
workspace_id: workspaceId,
|
|
19249
|
+
connector_id: connectorId,
|
|
19250
|
+
treatment_plan_id: treatmentPlanId
|
|
19251
|
+
}
|
|
19166
19252
|
},
|
|
19167
19253
|
options
|
|
19168
19254
|
).then((r) => r.data),
|
|
@@ -19189,13 +19275,81 @@ function createConnectorsNamespace(rb) {
|
|
|
19189
19275
|
cancelTreatmentPlan: async (connectorId, workspaceId, treatmentPlanId, options) => rb.rawPost(
|
|
19190
19276
|
`/connectors/fullscript/treatment-plans/cancel`,
|
|
19191
19277
|
{
|
|
19192
|
-
|
|
19193
|
-
|
|
19194
|
-
|
|
19278
|
+
data: {
|
|
19279
|
+
workspace_id: workspaceId,
|
|
19280
|
+
connector_id: connectorId,
|
|
19281
|
+
treatment_plan_id: treatmentPlanId
|
|
19282
|
+
}
|
|
19283
|
+
},
|
|
19284
|
+
options
|
|
19285
|
+
).then((r) => r.data),
|
|
19286
|
+
/**
|
|
19287
|
+
* Create a treatment plan in Fullscript with product recommendations.
|
|
19288
|
+
*
|
|
19289
|
+
* @param connectorId - The Fullscript connector instance ID
|
|
19290
|
+
* @param workspaceId - The workspace ID
|
|
19291
|
+
* @param attrs - Treatment plan creation attributes
|
|
19292
|
+
* @param options - Optional request options.
|
|
19293
|
+
* @returns The created {@link FullscriptTreatmentPlan}.
|
|
19294
|
+
*
|
|
19295
|
+
* @example
|
|
19296
|
+
* ```typescript
|
|
19297
|
+
* const plan = await client.connectors.fullscript.createTreatmentPlan(
|
|
19298
|
+
* 'ci_fs_123',
|
|
19299
|
+
* 'ws_abc123',
|
|
19300
|
+
* {
|
|
19301
|
+
* patient_id: 'fs_pat_456',
|
|
19302
|
+
* recommendations: [{ product_id: 'prod_1', dosage: '1 cap daily' }],
|
|
19303
|
+
* send_invitation: true,
|
|
19304
|
+
* message: 'Please take as directed',
|
|
19305
|
+
* },
|
|
19306
|
+
* );
|
|
19307
|
+
* ```
|
|
19308
|
+
*/
|
|
19309
|
+
createTreatmentPlan: async (connectorId, workspaceId, attrs, options) => rb.rawPost(
|
|
19310
|
+
`/connectors/fullscript/treatment-plans/create`,
|
|
19311
|
+
{
|
|
19312
|
+
data: {
|
|
19313
|
+
workspace_id: workspaceId,
|
|
19314
|
+
connector_id: connectorId,
|
|
19315
|
+
patient_id: attrs.patient_id,
|
|
19316
|
+
recommendations: attrs.recommendations,
|
|
19317
|
+
send_invitation: attrs.send_invitation,
|
|
19318
|
+
message: attrs.message
|
|
19319
|
+
}
|
|
19195
19320
|
},
|
|
19196
19321
|
options
|
|
19197
19322
|
).then((r) => r.data),
|
|
19198
19323
|
// ── Products ──
|
|
19324
|
+
/**
|
|
19325
|
+
* Match AI-generated supplement names to Fullscript products.
|
|
19326
|
+
*
|
|
19327
|
+
* @param connectorId - The Fullscript connector instance ID
|
|
19328
|
+
* @param workspaceId - The workspace ID
|
|
19329
|
+
* @param queries - Array of product match queries
|
|
19330
|
+
* @param options - Optional request options.
|
|
19331
|
+
* @returns Array of {@link ProductMatchResult} with matched products per query.
|
|
19332
|
+
*
|
|
19333
|
+
* @example
|
|
19334
|
+
* ```typescript
|
|
19335
|
+
* const results = await client.connectors.fullscript.matchProducts(
|
|
19336
|
+
* 'ci_fs_123',
|
|
19337
|
+
* 'ws_abc123',
|
|
19338
|
+
* [{ name: 'Vitamin D3 2000 IU', form: 'capsule' }],
|
|
19339
|
+
* );
|
|
19340
|
+
* ```
|
|
19341
|
+
*/
|
|
19342
|
+
matchProducts: async (connectorId, workspaceId, queries, options) => rb.rawPost(
|
|
19343
|
+
`/connectors/fullscript/products/match`,
|
|
19344
|
+
{
|
|
19345
|
+
data: {
|
|
19346
|
+
workspace_id: workspaceId,
|
|
19347
|
+
connector_id: connectorId,
|
|
19348
|
+
queries
|
|
19349
|
+
}
|
|
19350
|
+
},
|
|
19351
|
+
options
|
|
19352
|
+
).then((r) => r.data),
|
|
19199
19353
|
/**
|
|
19200
19354
|
* Search the Fullscript product catalog by keyword query.
|
|
19201
19355
|
*
|
|
@@ -19219,9 +19373,11 @@ function createConnectorsNamespace(rb) {
|
|
|
19219
19373
|
searchProducts: async (connectorId, workspaceId, query, options) => rb.rawPost(
|
|
19220
19374
|
`/connectors/fullscript/products/search`,
|
|
19221
19375
|
{
|
|
19222
|
-
|
|
19223
|
-
|
|
19224
|
-
|
|
19376
|
+
data: {
|
|
19377
|
+
workspace_id: workspaceId,
|
|
19378
|
+
connector_id: connectorId,
|
|
19379
|
+
query
|
|
19380
|
+
}
|
|
19225
19381
|
},
|
|
19226
19382
|
options
|
|
19227
19383
|
).then((r) => r.data),
|
|
@@ -19248,9 +19404,11 @@ function createConnectorsNamespace(rb) {
|
|
|
19248
19404
|
getProduct: async (connectorId, workspaceId, productId, options) => rb.rawPost(
|
|
19249
19405
|
`/connectors/fullscript/products/get`,
|
|
19250
19406
|
{
|
|
19251
|
-
|
|
19252
|
-
|
|
19253
|
-
|
|
19407
|
+
data: {
|
|
19408
|
+
workspace_id: workspaceId,
|
|
19409
|
+
connector_id: connectorId,
|
|
19410
|
+
product_id: productId
|
|
19411
|
+
}
|
|
19254
19412
|
},
|
|
19255
19413
|
options
|
|
19256
19414
|
).then((r) => r.data),
|
|
@@ -19277,9 +19435,11 @@ function createConnectorsNamespace(rb) {
|
|
|
19277
19435
|
listSimilarProducts: async (connectorId, workspaceId, productId, options) => rb.rawPost(
|
|
19278
19436
|
`/connectors/fullscript/products/similar`,
|
|
19279
19437
|
{
|
|
19280
|
-
|
|
19281
|
-
|
|
19282
|
-
|
|
19438
|
+
data: {
|
|
19439
|
+
workspace_id: workspaceId,
|
|
19440
|
+
connector_id: connectorId,
|
|
19441
|
+
product_id: productId
|
|
19442
|
+
}
|
|
19283
19443
|
},
|
|
19284
19444
|
options
|
|
19285
19445
|
).then((r) => r.data),
|
|
@@ -19307,9 +19467,11 @@ function createConnectorsNamespace(rb) {
|
|
|
19307
19467
|
listPatientOrders: async (connectorId, workspaceId, patientId, options) => rb.rawPost(
|
|
19308
19468
|
`/connectors/fullscript/orders/list`,
|
|
19309
19469
|
{
|
|
19310
|
-
|
|
19311
|
-
|
|
19312
|
-
|
|
19470
|
+
data: {
|
|
19471
|
+
workspace_id: workspaceId,
|
|
19472
|
+
connector_id: connectorId,
|
|
19473
|
+
patient_id: patientId
|
|
19474
|
+
}
|
|
19313
19475
|
},
|
|
19314
19476
|
options
|
|
19315
19477
|
).then((r) => r.data),
|
|
@@ -19336,9 +19498,11 @@ function createConnectorsNamespace(rb) {
|
|
|
19336
19498
|
getOrder: async (connectorId, workspaceId, orderId, options) => rb.rawPost(
|
|
19337
19499
|
`/connectors/fullscript/orders/get`,
|
|
19338
19500
|
{
|
|
19339
|
-
|
|
19340
|
-
|
|
19341
|
-
|
|
19501
|
+
data: {
|
|
19502
|
+
workspace_id: workspaceId,
|
|
19503
|
+
connector_id: connectorId,
|
|
19504
|
+
order_id: orderId
|
|
19505
|
+
}
|
|
19342
19506
|
},
|
|
19343
19507
|
options
|
|
19344
19508
|
).then((r) => r.data),
|
|
@@ -33026,13 +33190,16 @@ function createSocialNamespace(rb) {
|
|
|
33026
33190
|
},
|
|
33027
33191
|
/**
|
|
33028
33192
|
* Create a new social campaign.
|
|
33029
|
-
*
|
|
33030
|
-
*
|
|
33193
|
+
*
|
|
33194
|
+
* @param workspaceId - Workspace ID (passed as query parameter for tenant resolution).
|
|
33195
|
+
* @param attributes - Campaign attributes (name, content_brief, etc.).
|
|
33196
|
+
* @param options - Optional request-level overrides.
|
|
33031
33197
|
*/
|
|
33032
|
-
create: async (attributes, options) => {
|
|
33198
|
+
create: async (workspaceId, attributes, options) => {
|
|
33033
33199
|
return rb.execute(
|
|
33034
33200
|
postSocialCampaigns,
|
|
33035
33201
|
{
|
|
33202
|
+
query: { workspace_id: workspaceId },
|
|
33036
33203
|
body: {
|
|
33037
33204
|
data: { type: "social-campaign", attributes }
|
|
33038
33205
|
}
|
|
@@ -34695,6 +34862,7 @@ var Webhooks = class _Webhooks {
|
|
|
34695
34862
|
collectStreamedMessage,
|
|
34696
34863
|
createChannelsNamespace,
|
|
34697
34864
|
createImportsNamespace,
|
|
34865
|
+
createProjectsNamespace,
|
|
34698
34866
|
handleApiError,
|
|
34699
34867
|
isBrowserEnvironment,
|
|
34700
34868
|
isSecureUrl,
|