@gpt-platform/client 0.10.2 → 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 +216 -11
- package/dist/index.d.ts +216 -11
- package/dist/index.js +199 -37
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +199 -37
- package/dist/index.mjs.map +1 -1
- package/llms.txt +6 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1272,7 +1272,7 @@ function buildUserAgent(sdkVersion, appInfo) {
|
|
|
1272
1272
|
}
|
|
1273
1273
|
|
|
1274
1274
|
// src/version.ts
|
|
1275
|
-
var SDK_VERSION = "0.10.
|
|
1275
|
+
var SDK_VERSION = "0.10.3";
|
|
1276
1276
|
var DEFAULT_API_VERSION = "2026-03-23";
|
|
1277
1277
|
|
|
1278
1278
|
// src/base-client.ts
|
|
@@ -1904,6 +1904,11 @@ var getCatalogTaxonomyNodesTaxonomyByTaxonomyId = (options) => (options.client ?
|
|
|
1904
1904
|
url: "/catalog/taxonomy-nodes/taxonomy/{taxonomy_id}",
|
|
1905
1905
|
...options
|
|
1906
1906
|
});
|
|
1907
|
+
var getClinicalNotesByPatient = (options) => (options.client ?? client).get({
|
|
1908
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1909
|
+
url: "/clinical/notes/by-patient",
|
|
1910
|
+
...options
|
|
1911
|
+
});
|
|
1907
1912
|
var getClinicalNotesByNoteIdVersionsById = (options) => (options.client ?? client).get({
|
|
1908
1913
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1909
1914
|
url: "/clinical/notes/{note_id}/versions/{id}",
|
|
@@ -2110,6 +2115,11 @@ var postTenantsPersonal = (options) => (options.client ?? client).post({
|
|
|
2110
2115
|
...options.headers
|
|
2111
2116
|
}
|
|
2112
2117
|
});
|
|
2118
|
+
var getClinicalMealPlansByPatient = (options) => (options.client ?? client).get({
|
|
2119
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2120
|
+
url: "/clinical/meal-plans/by-patient",
|
|
2121
|
+
...options
|
|
2122
|
+
});
|
|
2113
2123
|
var getEmailTrackingEventsById = (options) => (options.client ?? client).get({
|
|
2114
2124
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2115
2125
|
url: "/email/tracking-events/{id}",
|
|
@@ -2911,6 +2921,11 @@ var patchSupportTicketsByIdMerge = (options) => (options.client ?? client).patch
|
|
|
2911
2921
|
...options.headers
|
|
2912
2922
|
}
|
|
2913
2923
|
});
|
|
2924
|
+
var getClinicalNotesByWorkspace = (options) => (options.client ?? client).get({
|
|
2925
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2926
|
+
url: "/clinical/notes/by-workspace",
|
|
2927
|
+
...options
|
|
2928
|
+
});
|
|
2914
2929
|
var getMemorySectionDocumentsById = (options) => (options.client ?? client).get({
|
|
2915
2930
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2916
2931
|
url: "/memory/section-documents/{id}",
|
|
@@ -12694,6 +12709,32 @@ function createClinicalNamespace(rb) {
|
|
|
12694
12709
|
{ query: params ?? {} },
|
|
12695
12710
|
options
|
|
12696
12711
|
),
|
|
12712
|
+
/**
|
|
12713
|
+
* List all notes for a patient across all sessions.
|
|
12714
|
+
*
|
|
12715
|
+
* @param patientId - Patient UUID
|
|
12716
|
+
* @param params - Filter/pagination parameters
|
|
12717
|
+
* @param options - Request options
|
|
12718
|
+
* @returns Array of {@link ClinicalNote} records
|
|
12719
|
+
*/
|
|
12720
|
+
listByPatient: async (patientId, params, options) => rb.execute(
|
|
12721
|
+
getClinicalNotesByPatient,
|
|
12722
|
+
{ query: { patient_id: patientId, ...params } },
|
|
12723
|
+
options
|
|
12724
|
+
),
|
|
12725
|
+
/**
|
|
12726
|
+
* List all notes in a workspace.
|
|
12727
|
+
*
|
|
12728
|
+
* @param workspaceId - Workspace UUID
|
|
12729
|
+
* @param params - Filter/pagination parameters
|
|
12730
|
+
* @param options - Request options
|
|
12731
|
+
* @returns Array of {@link ClinicalNote} records
|
|
12732
|
+
*/
|
|
12733
|
+
listByWorkspace: async (workspaceId, params, options) => rb.execute(
|
|
12734
|
+
getClinicalNotesByWorkspace,
|
|
12735
|
+
{ query: { workspace_id: workspaceId, ...params } },
|
|
12736
|
+
options
|
|
12737
|
+
),
|
|
12697
12738
|
/**
|
|
12698
12739
|
* Get a single note by ID.
|
|
12699
12740
|
*
|
|
@@ -13059,6 +13100,19 @@ function createClinicalNamespace(rb) {
|
|
|
13059
13100
|
{ query: params ?? {} },
|
|
13060
13101
|
options
|
|
13061
13102
|
),
|
|
13103
|
+
/**
|
|
13104
|
+
* List all meal plans for a patient across all sessions.
|
|
13105
|
+
*
|
|
13106
|
+
* @param patientId - Patient UUID
|
|
13107
|
+
* @param params - Filter/pagination parameters
|
|
13108
|
+
* @param options - Request options
|
|
13109
|
+
* @returns Array of {@link ClinicalMealPlan} records
|
|
13110
|
+
*/
|
|
13111
|
+
listByPatient: async (patientId, params, options) => rb.execute(
|
|
13112
|
+
getClinicalMealPlansByPatient,
|
|
13113
|
+
{ query: { patient_id: patientId, ...params } },
|
|
13114
|
+
options
|
|
13115
|
+
),
|
|
13062
13116
|
/**
|
|
13063
13117
|
* Get a single meal plan by ID.
|
|
13064
13118
|
*
|
|
@@ -13075,6 +13129,8 @@ function createClinicalNamespace(rb) {
|
|
|
13075
13129
|
* Create a new meal plan.
|
|
13076
13130
|
*
|
|
13077
13131
|
* @param attributes - Meal plan creation attributes. Must include `workspace_id`.
|
|
13132
|
+
* Provide `patient_id` directly, or `session_id` to auto-populate
|
|
13133
|
+
* `patient_id` from the session's patient.
|
|
13078
13134
|
* @param options - Request options
|
|
13079
13135
|
* @returns Created {@link ClinicalMealPlan} record
|
|
13080
13136
|
*/
|
|
@@ -13463,7 +13519,26 @@ function createClinicalNamespace(rb) {
|
|
|
13463
13519
|
getClinicalClientSupplementsArchived,
|
|
13464
13520
|
{ query: params ?? {} },
|
|
13465
13521
|
options
|
|
13466
|
-
)
|
|
13522
|
+
),
|
|
13523
|
+
/**
|
|
13524
|
+
* Create multiple supplements in a single request.
|
|
13525
|
+
*
|
|
13526
|
+
* @param attrs - Bulk creation attributes with workspace_id and supplements array
|
|
13527
|
+
* @param options - Request options
|
|
13528
|
+
* @returns Array of creation results with id and status per supplement
|
|
13529
|
+
*
|
|
13530
|
+
* @example
|
|
13531
|
+
* ```typescript
|
|
13532
|
+
* const results = await client.clinical.clientSupplements.bulkCreate({
|
|
13533
|
+
* workspace_id: 'ws_123',
|
|
13534
|
+
* supplements: [
|
|
13535
|
+
* { patient_id: 'pat_1', name: 'Vitamin D3', source: 'fullscript' },
|
|
13536
|
+
* { patient_id: 'pat_1', name: 'Omega-3', source: 'fullscript' },
|
|
13537
|
+
* ],
|
|
13538
|
+
* });
|
|
13539
|
+
* ```
|
|
13540
|
+
*/
|
|
13541
|
+
bulkCreate: async (attrs, options) => rb.rawPost(`/clinical/client-supplements/bulk`, { data: attrs }, options).then((r) => r.data)
|
|
13467
13542
|
},
|
|
13468
13543
|
/**
|
|
13469
13544
|
* Manage clinical deliveries (care plan items sent to patients).
|
|
@@ -14777,7 +14852,11 @@ function createClinicalNamespace(rb) {
|
|
|
14777
14852
|
* });
|
|
14778
14853
|
* ```
|
|
14779
14854
|
*/
|
|
14780
|
-
search: async (params, options) => rb.rawPost(
|
|
14855
|
+
search: async (params, options) => rb.rawPost(
|
|
14856
|
+
`/clinical/recipes/search`,
|
|
14857
|
+
params,
|
|
14858
|
+
options
|
|
14859
|
+
)
|
|
14781
14860
|
}
|
|
14782
14861
|
};
|
|
14783
14862
|
}
|
|
@@ -18399,7 +18478,10 @@ function createConnectorsNamespace(rb) {
|
|
|
18399
18478
|
*/
|
|
18400
18479
|
create: async (attributes, options) => rb.execute(
|
|
18401
18480
|
postConnectors,
|
|
18402
|
-
{
|
|
18481
|
+
{
|
|
18482
|
+
body: { data: { type: "connector-instance", attributes } },
|
|
18483
|
+
query: { workspace_id: attributes.workspace_id }
|
|
18484
|
+
},
|
|
18403
18485
|
options
|
|
18404
18486
|
),
|
|
18405
18487
|
/**
|
|
@@ -18521,7 +18603,6 @@ function createConnectorsNamespace(rb) {
|
|
|
18521
18603
|
path: { id },
|
|
18522
18604
|
body: {
|
|
18523
18605
|
data: {
|
|
18524
|
-
type: "credential",
|
|
18525
18606
|
workspace_id: workspaceId
|
|
18526
18607
|
}
|
|
18527
18608
|
}
|
|
@@ -18554,10 +18635,7 @@ function createConnectorsNamespace(rb) {
|
|
|
18554
18635
|
postConnectorsCredentialsUpsert,
|
|
18555
18636
|
{
|
|
18556
18637
|
body: {
|
|
18557
|
-
data:
|
|
18558
|
-
type: "credential",
|
|
18559
|
-
...attributes
|
|
18560
|
-
}
|
|
18638
|
+
data: attributes
|
|
18561
18639
|
}
|
|
18562
18640
|
},
|
|
18563
18641
|
options
|
|
@@ -18586,7 +18664,6 @@ function createConnectorsNamespace(rb) {
|
|
|
18586
18664
|
{
|
|
18587
18665
|
body: {
|
|
18588
18666
|
data: {
|
|
18589
|
-
type: "credential",
|
|
18590
18667
|
workspace_id: workspaceId,
|
|
18591
18668
|
connector_type: connectorType,
|
|
18592
18669
|
scope_level: scopeLevel
|
|
@@ -19069,9 +19146,11 @@ function createConnectorsNamespace(rb) {
|
|
|
19069
19146
|
listTreatmentPlans: async (connectorId, workspaceId, patientId, options) => rb.rawPost(
|
|
19070
19147
|
`/connectors/fullscript/treatment-plans/list`,
|
|
19071
19148
|
{
|
|
19072
|
-
|
|
19073
|
-
|
|
19074
|
-
|
|
19149
|
+
data: {
|
|
19150
|
+
workspace_id: workspaceId,
|
|
19151
|
+
connector_id: connectorId,
|
|
19152
|
+
patient_id: patientId
|
|
19153
|
+
}
|
|
19075
19154
|
},
|
|
19076
19155
|
options
|
|
19077
19156
|
).then((r) => r.data),
|
|
@@ -19098,9 +19177,11 @@ function createConnectorsNamespace(rb) {
|
|
|
19098
19177
|
getTreatmentPlan: async (connectorId, workspaceId, treatmentPlanId, options) => rb.rawPost(
|
|
19099
19178
|
`/connectors/fullscript/treatment-plans/get`,
|
|
19100
19179
|
{
|
|
19101
|
-
|
|
19102
|
-
|
|
19103
|
-
|
|
19180
|
+
data: {
|
|
19181
|
+
workspace_id: workspaceId,
|
|
19182
|
+
connector_id: connectorId,
|
|
19183
|
+
treatment_plan_id: treatmentPlanId
|
|
19184
|
+
}
|
|
19104
19185
|
},
|
|
19105
19186
|
options
|
|
19106
19187
|
).then((r) => r.data),
|
|
@@ -19127,13 +19208,81 @@ function createConnectorsNamespace(rb) {
|
|
|
19127
19208
|
cancelTreatmentPlan: async (connectorId, workspaceId, treatmentPlanId, options) => rb.rawPost(
|
|
19128
19209
|
`/connectors/fullscript/treatment-plans/cancel`,
|
|
19129
19210
|
{
|
|
19130
|
-
|
|
19131
|
-
|
|
19132
|
-
|
|
19211
|
+
data: {
|
|
19212
|
+
workspace_id: workspaceId,
|
|
19213
|
+
connector_id: connectorId,
|
|
19214
|
+
treatment_plan_id: treatmentPlanId
|
|
19215
|
+
}
|
|
19216
|
+
},
|
|
19217
|
+
options
|
|
19218
|
+
).then((r) => r.data),
|
|
19219
|
+
/**
|
|
19220
|
+
* Create a treatment plan in Fullscript with product recommendations.
|
|
19221
|
+
*
|
|
19222
|
+
* @param connectorId - The Fullscript connector instance ID
|
|
19223
|
+
* @param workspaceId - The workspace ID
|
|
19224
|
+
* @param attrs - Treatment plan creation attributes
|
|
19225
|
+
* @param options - Optional request options.
|
|
19226
|
+
* @returns The created {@link FullscriptTreatmentPlan}.
|
|
19227
|
+
*
|
|
19228
|
+
* @example
|
|
19229
|
+
* ```typescript
|
|
19230
|
+
* const plan = await client.connectors.fullscript.createTreatmentPlan(
|
|
19231
|
+
* 'ci_fs_123',
|
|
19232
|
+
* 'ws_abc123',
|
|
19233
|
+
* {
|
|
19234
|
+
* patient_id: 'fs_pat_456',
|
|
19235
|
+
* recommendations: [{ product_id: 'prod_1', dosage: '1 cap daily' }],
|
|
19236
|
+
* send_invitation: true,
|
|
19237
|
+
* message: 'Please take as directed',
|
|
19238
|
+
* },
|
|
19239
|
+
* );
|
|
19240
|
+
* ```
|
|
19241
|
+
*/
|
|
19242
|
+
createTreatmentPlan: async (connectorId, workspaceId, attrs, options) => rb.rawPost(
|
|
19243
|
+
`/connectors/fullscript/treatment-plans/create`,
|
|
19244
|
+
{
|
|
19245
|
+
data: {
|
|
19246
|
+
workspace_id: workspaceId,
|
|
19247
|
+
connector_id: connectorId,
|
|
19248
|
+
patient_id: attrs.patient_id,
|
|
19249
|
+
recommendations: attrs.recommendations,
|
|
19250
|
+
send_invitation: attrs.send_invitation,
|
|
19251
|
+
message: attrs.message
|
|
19252
|
+
}
|
|
19133
19253
|
},
|
|
19134
19254
|
options
|
|
19135
19255
|
).then((r) => r.data),
|
|
19136
19256
|
// ── Products ──
|
|
19257
|
+
/**
|
|
19258
|
+
* Match AI-generated supplement names to Fullscript products.
|
|
19259
|
+
*
|
|
19260
|
+
* @param connectorId - The Fullscript connector instance ID
|
|
19261
|
+
* @param workspaceId - The workspace ID
|
|
19262
|
+
* @param queries - Array of product match queries
|
|
19263
|
+
* @param options - Optional request options.
|
|
19264
|
+
* @returns Array of {@link ProductMatchResult} with matched products per query.
|
|
19265
|
+
*
|
|
19266
|
+
* @example
|
|
19267
|
+
* ```typescript
|
|
19268
|
+
* const results = await client.connectors.fullscript.matchProducts(
|
|
19269
|
+
* 'ci_fs_123',
|
|
19270
|
+
* 'ws_abc123',
|
|
19271
|
+
* [{ name: 'Vitamin D3 2000 IU', form: 'capsule' }],
|
|
19272
|
+
* );
|
|
19273
|
+
* ```
|
|
19274
|
+
*/
|
|
19275
|
+
matchProducts: async (connectorId, workspaceId, queries, options) => rb.rawPost(
|
|
19276
|
+
`/connectors/fullscript/products/match`,
|
|
19277
|
+
{
|
|
19278
|
+
data: {
|
|
19279
|
+
workspace_id: workspaceId,
|
|
19280
|
+
connector_id: connectorId,
|
|
19281
|
+
queries
|
|
19282
|
+
}
|
|
19283
|
+
},
|
|
19284
|
+
options
|
|
19285
|
+
).then((r) => r.data),
|
|
19137
19286
|
/**
|
|
19138
19287
|
* Search the Fullscript product catalog by keyword query.
|
|
19139
19288
|
*
|
|
@@ -19157,9 +19306,11 @@ function createConnectorsNamespace(rb) {
|
|
|
19157
19306
|
searchProducts: async (connectorId, workspaceId, query, options) => rb.rawPost(
|
|
19158
19307
|
`/connectors/fullscript/products/search`,
|
|
19159
19308
|
{
|
|
19160
|
-
|
|
19161
|
-
|
|
19162
|
-
|
|
19309
|
+
data: {
|
|
19310
|
+
workspace_id: workspaceId,
|
|
19311
|
+
connector_id: connectorId,
|
|
19312
|
+
query
|
|
19313
|
+
}
|
|
19163
19314
|
},
|
|
19164
19315
|
options
|
|
19165
19316
|
).then((r) => r.data),
|
|
@@ -19186,9 +19337,11 @@ function createConnectorsNamespace(rb) {
|
|
|
19186
19337
|
getProduct: async (connectorId, workspaceId, productId, options) => rb.rawPost(
|
|
19187
19338
|
`/connectors/fullscript/products/get`,
|
|
19188
19339
|
{
|
|
19189
|
-
|
|
19190
|
-
|
|
19191
|
-
|
|
19340
|
+
data: {
|
|
19341
|
+
workspace_id: workspaceId,
|
|
19342
|
+
connector_id: connectorId,
|
|
19343
|
+
product_id: productId
|
|
19344
|
+
}
|
|
19192
19345
|
},
|
|
19193
19346
|
options
|
|
19194
19347
|
).then((r) => r.data),
|
|
@@ -19215,9 +19368,11 @@ function createConnectorsNamespace(rb) {
|
|
|
19215
19368
|
listSimilarProducts: async (connectorId, workspaceId, productId, options) => rb.rawPost(
|
|
19216
19369
|
`/connectors/fullscript/products/similar`,
|
|
19217
19370
|
{
|
|
19218
|
-
|
|
19219
|
-
|
|
19220
|
-
|
|
19371
|
+
data: {
|
|
19372
|
+
workspace_id: workspaceId,
|
|
19373
|
+
connector_id: connectorId,
|
|
19374
|
+
product_id: productId
|
|
19375
|
+
}
|
|
19221
19376
|
},
|
|
19222
19377
|
options
|
|
19223
19378
|
).then((r) => r.data),
|
|
@@ -19245,9 +19400,11 @@ function createConnectorsNamespace(rb) {
|
|
|
19245
19400
|
listPatientOrders: async (connectorId, workspaceId, patientId, options) => rb.rawPost(
|
|
19246
19401
|
`/connectors/fullscript/orders/list`,
|
|
19247
19402
|
{
|
|
19248
|
-
|
|
19249
|
-
|
|
19250
|
-
|
|
19403
|
+
data: {
|
|
19404
|
+
workspace_id: workspaceId,
|
|
19405
|
+
connector_id: connectorId,
|
|
19406
|
+
patient_id: patientId
|
|
19407
|
+
}
|
|
19251
19408
|
},
|
|
19252
19409
|
options
|
|
19253
19410
|
).then((r) => r.data),
|
|
@@ -19274,9 +19431,11 @@ function createConnectorsNamespace(rb) {
|
|
|
19274
19431
|
getOrder: async (connectorId, workspaceId, orderId, options) => rb.rawPost(
|
|
19275
19432
|
`/connectors/fullscript/orders/get`,
|
|
19276
19433
|
{
|
|
19277
|
-
|
|
19278
|
-
|
|
19279
|
-
|
|
19434
|
+
data: {
|
|
19435
|
+
workspace_id: workspaceId,
|
|
19436
|
+
connector_id: connectorId,
|
|
19437
|
+
order_id: orderId
|
|
19438
|
+
}
|
|
19280
19439
|
},
|
|
19281
19440
|
options
|
|
19282
19441
|
).then((r) => r.data),
|
|
@@ -32964,13 +33123,16 @@ function createSocialNamespace(rb) {
|
|
|
32964
33123
|
},
|
|
32965
33124
|
/**
|
|
32966
33125
|
* Create a new social campaign.
|
|
32967
|
-
*
|
|
32968
|
-
*
|
|
33126
|
+
*
|
|
33127
|
+
* @param workspaceId - Workspace ID (passed as query parameter for tenant resolution).
|
|
33128
|
+
* @param attributes - Campaign attributes (name, content_brief, etc.).
|
|
33129
|
+
* @param options - Optional request-level overrides.
|
|
32969
33130
|
*/
|
|
32970
|
-
create: async (attributes, options) => {
|
|
33131
|
+
create: async (workspaceId, attributes, options) => {
|
|
32971
33132
|
return rb.execute(
|
|
32972
33133
|
postSocialCampaigns,
|
|
32973
33134
|
{
|
|
33135
|
+
query: { workspace_id: workspaceId },
|
|
32974
33136
|
body: {
|
|
32975
33137
|
data: { type: "social-campaign", attributes }
|
|
32976
33138
|
}
|