@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.ts CHANGED
@@ -606,7 +606,7 @@ declare class BrowserApiKeyError extends Error {
606
606
  }
607
607
 
608
608
  /** SDK version — updated automatically by mix update.sdks */
609
- declare const SDK_VERSION = "0.10.2";
609
+ declare const SDK_VERSION = "0.10.3";
610
610
  /** Default API version sent in every request — updated automatically by mix update.sdks */
611
611
  declare const DEFAULT_API_VERSION = "2026-03-23";
612
612
 
@@ -5381,6 +5381,10 @@ type ClinicalClientSupplement = {
5381
5381
  * Field included by default.
5382
5382
  */
5383
5383
  fullscript_product_id?: string | null | unknown;
5384
+ /**
5385
+ * Field included by default.
5386
+ */
5387
+ fullscript_treatment_plan_id?: string | null | unknown;
5384
5388
  /**
5385
5389
  * Field included by default.
5386
5390
  */
@@ -5412,6 +5416,18 @@ type ClinicalClientSupplement = {
5412
5416
  * Field included by default.
5413
5417
  */
5414
5418
  rationale_client?: string | null | unknown;
5419
+ /**
5420
+ * Field included by default.
5421
+ */
5422
+ rationale_clinical?: string | null | unknown;
5423
+ /**
5424
+ * Field included by default.
5425
+ */
5426
+ route?: string | null | unknown;
5427
+ /**
5428
+ * Field included by default.
5429
+ */
5430
+ source?: string | null | unknown;
5415
5431
  /**
5416
5432
  * Field included by default.
5417
5433
  */
@@ -6692,7 +6708,7 @@ type ClinicalSession = {
6692
6708
  /**
6693
6709
  * Field included by default.
6694
6710
  */
6695
- session_type: "initial" | "followup" | "discharge" | "emergency" | "group";
6711
+ session_type: "initial" | "followup" | "discharge" | "emergency" | "group" | "phone_encounter" | "coordination" | "administrative";
6696
6712
  };
6697
6713
  id: string;
6698
6714
  /**
@@ -6890,6 +6906,10 @@ type ClinicalMealPlan = {
6890
6906
  * Field included by default.
6891
6907
  */
6892
6908
  parent_plan_id?: string | null | unknown;
6909
+ /**
6910
+ * Field included by default.
6911
+ */
6912
+ patient_id?: string | null | unknown;
6893
6913
  /**
6894
6914
  * Field included by default.
6895
6915
  */
@@ -7387,6 +7407,30 @@ type ClinicalPatient = {
7387
7407
  type: string;
7388
7408
  }>;
7389
7409
  };
7410
+ meal_plans?: {
7411
+ /**
7412
+ * Relationship data for meal_plans
7413
+ */
7414
+ data?: Array<{
7415
+ id: string;
7416
+ meta?: {
7417
+ [key: string]: unknown;
7418
+ };
7419
+ type: string;
7420
+ }>;
7421
+ };
7422
+ notes?: {
7423
+ /**
7424
+ * Relationship data for notes
7425
+ */
7426
+ data?: Array<{
7427
+ id: string;
7428
+ meta?: {
7429
+ [key: string]: unknown;
7430
+ };
7431
+ type: string;
7432
+ }>;
7433
+ };
7390
7434
  resource_assignments?: {
7391
7435
  /**
7392
7436
  * Relationship data for resource_assignments
@@ -8537,6 +8581,12 @@ type ClinicalSupplementRecCache = {
8537
8581
  * Field included by default.
8538
8582
  */
8539
8583
  pipeline_execution_id?: string | null | unknown;
8584
+ /**
8585
+ * Field included by default.
8586
+ */
8587
+ recommendations?: {
8588
+ [key: string]: unknown;
8589
+ } | null | unknown;
8540
8590
  /**
8541
8591
  * Field included by default.
8542
8592
  */
@@ -10674,6 +10724,10 @@ type ClinicalNote = {
10674
10724
  * An attributes object for a clinical-note
10675
10725
  */
10676
10726
  attributes?: {
10727
+ /**
10728
+ * Field included by default.
10729
+ */
10730
+ amends_note_id?: string | null | unknown;
10677
10731
  is_archived?: boolean | null | unknown;
10678
10732
  /**
10679
10733
  * Field included by default.
@@ -10684,7 +10738,11 @@ type ClinicalNote = {
10684
10738
  /**
10685
10739
  * Field included by default.
10686
10740
  */
10687
- note_type: "adime" | "soap" | "progress" | "discharge";
10741
+ note_type: "adime" | "soap" | "progress" | "discharge" | "addendum";
10742
+ /**
10743
+ * Field included by default.
10744
+ */
10745
+ patient_id: string;
10688
10746
  /**
10689
10747
  * Field included by default.
10690
10748
  */
@@ -12814,7 +12872,10 @@ interface SocialPostUpdateAttributes {
12814
12872
  link_metadata?: Record<string, unknown>;
12815
12873
  platform_metadata?: Record<string, unknown>;
12816
12874
  }
12817
- /** Attributes accepted by `POST /social/campaigns` (create action). */
12875
+ /**
12876
+ * Attributes accepted by `POST /social/campaigns` (create action).
12877
+ * workspace_id is resolved from the authenticated user's context — do NOT pass it here.
12878
+ */
12818
12879
  interface SocialCampaignCreateAttributes {
12819
12880
  /** Required. Campaign name. */
12820
12881
  name: string;
@@ -12934,10 +12995,12 @@ declare function createSocialNamespace(rb: RequestBuilder): {
12934
12995
  get: (id: string, options?: RequestOptions) => Promise<unknown>;
12935
12996
  /**
12936
12997
  * Create a new social campaign.
12937
- * Workspace is resolved from the authenticated user's context — do NOT
12938
- * pass `workspace_id` in attributes.
12998
+ *
12999
+ * @param workspaceId - Workspace ID (passed as query parameter for tenant resolution).
13000
+ * @param attributes - Campaign attributes (name, content_brief, etc.).
13001
+ * @param options - Optional request-level overrides.
12939
13002
  */
12940
- create: (attributes: SocialCampaignCreateAttributes, options?: RequestOptions) => Promise<unknown>;
13003
+ create: (workspaceId: string, attributes: SocialCampaignCreateAttributes, options?: RequestOptions) => Promise<unknown>;
12941
13004
  /** Update a campaign. */
12942
13005
  update: (id: string, attributes: SocialCampaignUpdateAttributes, options?: RequestOptions) => Promise<unknown>;
12943
13006
  /** Delete a campaign. */
@@ -20905,32 +20968,82 @@ interface FullscriptSessionGrant {
20905
20968
  interface FullscriptTreatmentPlan {
20906
20969
  id: string;
20907
20970
  state: string;
20971
+ patient_id?: string;
20972
+ created_at?: string;
20973
+ updated_at?: string;
20974
+ invitation_url?: string;
20975
+ message?: string;
20908
20976
  recommendations?: Array<{
20909
20977
  product_id?: string;
20910
- dosage?: string;
20978
+ product_name?: string;
20911
20979
  variant_id?: string;
20980
+ dosage?: string;
20981
+ frequency?: string;
20912
20982
  units_to_purchase?: number;
20913
20983
  }>;
20914
- invitation_url?: string;
20915
20984
  [key: string]: unknown;
20916
20985
  }
20917
20986
  interface FullscriptProduct {
20918
20987
  id: string;
20919
20988
  name?: string;
20920
20989
  brand?: string;
20990
+ description?: string;
20991
+ image_url?: string;
20992
+ product_url?: string;
20993
+ variants?: Array<{
20994
+ id?: string;
20995
+ name?: string;
20996
+ dosage_form?: string;
20997
+ size?: string;
20998
+ price?: string;
20999
+ msrp?: string;
21000
+ sku?: string;
21001
+ }>;
21002
+ categories?: string[];
21003
+ allergens?: string[];
21004
+ third_party_certifications?: string[];
20921
21005
  [key: string]: unknown;
20922
21006
  }
20923
21007
  interface FullscriptOrder {
20924
21008
  id: string;
21009
+ state?: string;
21010
+ created_at?: string;
21011
+ updated_at?: string;
20925
21012
  line_items?: Array<{
20926
21013
  product_id?: string;
21014
+ product_name?: string;
21015
+ variant_id?: string;
20927
21016
  quantity?: number;
21017
+ price?: string;
20928
21018
  }>;
20929
21019
  item_total?: string;
20930
21020
  payment_total?: string;
20931
21021
  msrp_total?: string;
21022
+ shipping_total?: string;
21023
+ patient_id?: string;
20932
21024
  [key: string]: unknown;
20933
21025
  }
21026
+ interface CreateTreatmentPlanAttributes {
21027
+ patient_id: string;
21028
+ recommendations: Array<{
21029
+ product_id: string;
21030
+ variant_id?: string;
21031
+ dosage?: string;
21032
+ frequency?: string;
21033
+ units_to_purchase?: number;
21034
+ }>;
21035
+ send_invitation?: boolean;
21036
+ message?: string;
21037
+ }
21038
+ interface ProductMatchQuery {
21039
+ name: string;
21040
+ form?: string;
21041
+ dosage?: string;
21042
+ }
21043
+ interface ProductMatchResult {
21044
+ query: string;
21045
+ matches: FullscriptProduct[];
21046
+ }
20934
21047
  /** Attributes for upserting connector credentials. */
20935
21048
  type UpsertCredentialAttributes = {
20936
21049
  workspace_id: string;
@@ -25343,6 +25456,7 @@ interface CreateClinicalNoteAttributes {
25343
25456
  pipeline_execution_id?: string;
25344
25457
  note_type?: string;
25345
25458
  note_content?: string;
25459
+ amends_note_id?: string;
25346
25460
  metadata?: Record<string, unknown>;
25347
25461
  }
25348
25462
  interface UpdateClinicalNoteAttributes {
@@ -25381,6 +25495,8 @@ interface UpdateHealthMetricAttributes {
25381
25495
  }
25382
25496
  interface CreateMealPlanAttributes {
25383
25497
  workspace_id: string;
25498
+ /** Patient UUID. Optional if `session_id` is provided — auto-populated from the session's patient. Required when creating a meal plan without a session. */
25499
+ patient_id?: string;
25384
25500
  session_id?: string;
25385
25501
  pipeline_execution_id?: string;
25386
25502
  status?: string;
@@ -25466,6 +25582,9 @@ interface CreateClientSupplementAttributes {
25466
25582
  prescribed_at?: string;
25467
25583
  discontinued_at?: string;
25468
25584
  metadata?: Record<string, unknown>;
25585
+ route?: string;
25586
+ source?: string;
25587
+ fullscript_treatment_plan_id?: string;
25469
25588
  }
25470
25589
  interface UpdateClientSupplementAttributes {
25471
25590
  status?: string;
@@ -25480,6 +25599,9 @@ interface UpdateClientSupplementAttributes {
25480
25599
  prescribed_at?: string;
25481
25600
  discontinued_at?: string;
25482
25601
  metadata?: Record<string, unknown>;
25602
+ route?: string;
25603
+ source?: string;
25604
+ fullscript_treatment_plan_id?: string;
25483
25605
  }
25484
25606
  interface CreateDeliveryAttributes {
25485
25607
  workspace_id: string;
@@ -25729,6 +25851,32 @@ interface RecipeSearchParams {
25729
25851
  from?: number;
25730
25852
  to?: number;
25731
25853
  }
25854
+ /** Recipe object returned by Edamam via the platform proxy. */
25855
+ interface RecipeHit {
25856
+ recipe: {
25857
+ uri: string;
25858
+ label: string;
25859
+ image?: string;
25860
+ source?: string;
25861
+ url?: string;
25862
+ yield?: number;
25863
+ dietLabels?: string[];
25864
+ healthLabels?: string[];
25865
+ ingredientLines?: string[];
25866
+ calories?: number;
25867
+ totalTime?: number;
25868
+ cuisineType?: string[];
25869
+ mealType?: string[];
25870
+ dishType?: string[];
25871
+ [key: string]: unknown;
25872
+ };
25873
+ }
25874
+ /** Result shape returned by `clinical.recipes.search()`. */
25875
+ interface RecipeSearchResult {
25876
+ hits: RecipeHit[];
25877
+ count: number;
25878
+ next_page?: string;
25879
+ }
25732
25880
  interface GenerateSupplementRecsResponse {
25733
25881
  execution_id: string | null;
25734
25882
  }
@@ -26087,6 +26235,24 @@ declare function createClinicalNamespace(rb: RequestBuilder): {
26087
26235
  * @returns Array of {@link ClinicalNote} records
26088
26236
  */
26089
26237
  list: (params?: ClinicalListParams, options?: RequestOptions) => Promise<ClinicalNote[]>;
26238
+ /**
26239
+ * List all notes for a patient across all sessions.
26240
+ *
26241
+ * @param patientId - Patient UUID
26242
+ * @param params - Filter/pagination parameters
26243
+ * @param options - Request options
26244
+ * @returns Array of {@link ClinicalNote} records
26245
+ */
26246
+ listByPatient: (patientId: string, params?: ClinicalListParams, options?: RequestOptions) => Promise<ClinicalNote[]>;
26247
+ /**
26248
+ * List all notes in a workspace.
26249
+ *
26250
+ * @param workspaceId - Workspace UUID
26251
+ * @param params - Filter/pagination parameters
26252
+ * @param options - Request options
26253
+ * @returns Array of {@link ClinicalNote} records
26254
+ */
26255
+ listByWorkspace: (workspaceId: string, params?: ClinicalListParams, options?: RequestOptions) => Promise<ClinicalNote[]>;
26090
26256
  /**
26091
26257
  * Get a single note by ID.
26092
26258
  *
@@ -26316,6 +26482,15 @@ declare function createClinicalNamespace(rb: RequestBuilder): {
26316
26482
  * @returns Array of {@link ClinicalMealPlan} records
26317
26483
  */
26318
26484
  list: (params?: ClinicalListParams, options?: RequestOptions) => Promise<ClinicalMealPlan[]>;
26485
+ /**
26486
+ * List all meal plans for a patient across all sessions.
26487
+ *
26488
+ * @param patientId - Patient UUID
26489
+ * @param params - Filter/pagination parameters
26490
+ * @param options - Request options
26491
+ * @returns Array of {@link ClinicalMealPlan} records
26492
+ */
26493
+ listByPatient: (patientId: string, params?: ClinicalListParams, options?: RequestOptions) => Promise<ClinicalMealPlan[]>;
26319
26494
  /**
26320
26495
  * Get a single meal plan by ID.
26321
26496
  *
@@ -26328,6 +26503,8 @@ declare function createClinicalNamespace(rb: RequestBuilder): {
26328
26503
  * Create a new meal plan.
26329
26504
  *
26330
26505
  * @param attributes - Meal plan creation attributes. Must include `workspace_id`.
26506
+ * Provide `patient_id` directly, or `session_id` to auto-populate
26507
+ * `patient_id` from the session's patient.
26331
26508
  * @param options - Request options
26332
26509
  * @returns Created {@link ClinicalMealPlan} record
26333
26510
  */
@@ -26561,6 +26738,32 @@ declare function createClinicalNamespace(rb: RequestBuilder): {
26561
26738
  * @returns Array of archived {@link ClinicalClientSupplement} records
26562
26739
  */
26563
26740
  listArchived: (params?: ClinicalListParams, options?: RequestOptions) => Promise<ClinicalClientSupplement[]>;
26741
+ /**
26742
+ * Create multiple supplements in a single request.
26743
+ *
26744
+ * @param attrs - Bulk creation attributes with workspace_id and supplements array
26745
+ * @param options - Request options
26746
+ * @returns Array of creation results with id and status per supplement
26747
+ *
26748
+ * @example
26749
+ * ```typescript
26750
+ * const results = await client.clinical.clientSupplements.bulkCreate({
26751
+ * workspace_id: 'ws_123',
26752
+ * supplements: [
26753
+ * { patient_id: 'pat_1', name: 'Vitamin D3', source: 'fullscript' },
26754
+ * { patient_id: 'pat_1', name: 'Omega-3', source: 'fullscript' },
26755
+ * ],
26756
+ * });
26757
+ * ```
26758
+ */
26759
+ bulkCreate: (attrs: {
26760
+ workspace_id: string;
26761
+ supplements: Array<Omit<CreateClientSupplementAttributes, "workspace_id">>;
26762
+ }, options?: RequestOptions) => Promise<Array<{
26763
+ id?: string;
26764
+ status: string;
26765
+ error?: string;
26766
+ }>>;
26564
26767
  };
26565
26768
  /**
26566
26769
  * Manage clinical deliveries (care plan items sent to patients).
@@ -27379,7 +27582,7 @@ declare function createClinicalNamespace(rb: RequestBuilder): {
27379
27582
  * });
27380
27583
  * ```
27381
27584
  */
27382
- search: (params: RecipeSearchParams, options?: RequestOptions) => Promise<unknown>;
27585
+ search: (params: RecipeSearchParams, options?: RequestOptions) => Promise<RecipeSearchResult>;
27383
27586
  };
27384
27587
  };
27385
27588
 
@@ -28090,6 +28293,8 @@ declare class GptClient extends BaseClient {
28090
28293
  listTreatmentPlans: (connectorId: string, workspaceId: string, patientId: string, options?: RequestOptions) => Promise<FullscriptTreatmentPlan[]>;
28091
28294
  getTreatmentPlan: (connectorId: string, workspaceId: string, treatmentPlanId: string, options?: RequestOptions) => Promise<FullscriptTreatmentPlan>;
28092
28295
  cancelTreatmentPlan: (connectorId: string, workspaceId: string, treatmentPlanId: string, options?: RequestOptions) => Promise<FullscriptTreatmentPlan>;
28296
+ createTreatmentPlan: (connectorId: string, workspaceId: string, attrs: CreateTreatmentPlanAttributes, options?: RequestOptions) => Promise<FullscriptTreatmentPlan>;
28297
+ matchProducts: (connectorId: string, workspaceId: string, queries: ProductMatchQuery[], options?: RequestOptions) => Promise<ProductMatchResult[]>;
28093
28298
  searchProducts: (connectorId: string, workspaceId: string, query: string, options?: RequestOptions) => Promise<FullscriptProduct[]>;
28094
28299
  getProduct: (connectorId: string, workspaceId: string, productId: string, options?: RequestOptions) => Promise<FullscriptProduct>;
28095
28300
  listSimilarProducts: (connectorId: string, workspaceId: string, productId: string, options?: RequestOptions) => Promise<FullscriptProduct[]>;
@@ -29256,7 +29461,7 @@ declare class GptClient extends BaseClient {
29256
29461
  campaigns: {
29257
29462
  list: (options?: RequestOptions) => Promise<unknown>;
29258
29463
  get: (id: string, options?: RequestOptions) => Promise<unknown>;
29259
- create: (attributes: SocialCampaignCreateAttributes, options?: RequestOptions) => Promise<unknown>;
29464
+ create: (workspaceId: string, attributes: SocialCampaignCreateAttributes, options?: RequestOptions) => Promise<unknown>;
29260
29465
  update: (id: string, attributes: SocialCampaignUpdateAttributes, options?: RequestOptions) => Promise<unknown>;
29261
29466
  delete: (id: string, options?: RequestOptions) => Promise<unknown>;
29262
29467
  schedule: (id: string, scheduledAt: string, options?: RequestOptions) => Promise<unknown>;