@gpt-platform/admin 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.mjs CHANGED
@@ -814,7 +814,7 @@ var createClient = (config = {}) => {
814
814
  };
815
815
 
816
816
  // src/version.ts
817
- var SDK_VERSION = "0.10.1";
817
+ var SDK_VERSION = "0.10.3";
818
818
  var DEFAULT_API_VERSION = "2026-03-23";
819
819
 
820
820
  // src/base-client.ts
@@ -2103,6 +2103,11 @@ var patchAdminIsvCrmEntityTypesById = (options) => (options.client ?? client).pa
2103
2103
  ...options.headers
2104
2104
  }
2105
2105
  });
2106
+ var getAdminClinicalMealPlansByPatient = (options) => (options.client ?? client).get({
2107
+ security: [{ scheme: "bearer", type: "http" }],
2108
+ url: "/admin/clinical/meal-plans/by-patient",
2109
+ ...options
2110
+ });
2106
2111
  var postAdminCampaignsSequenceSteps = (options) => (options.client ?? client).post({
2107
2112
  security: [{ scheme: "bearer", type: "http" }],
2108
2113
  url: "/admin/campaigns/sequence-steps",
@@ -2786,6 +2791,11 @@ var patchAdminStorageFilesByIdRestore = (options) => (options.client ?? client).
2786
2791
  ...options.headers
2787
2792
  }
2788
2793
  });
2794
+ var getAdminClinicalNotesByPatient = (options) => (options.client ?? client).get({
2795
+ security: [{ scheme: "bearer", type: "http" }],
2796
+ url: "/admin/clinical/notes/by-patient",
2797
+ ...options
2798
+ });
2789
2799
  var patchAdminCrawlerSchedulesByIdDisable = (options) => (options.client ?? client).patch({
2790
2800
  security: [{ scheme: "bearer", type: "http" }],
2791
2801
  url: "/admin/crawler/schedules/{id}/disable",
@@ -3072,6 +3082,11 @@ var postAdminSupportTags = (options) => (options.client ?? client).post({
3072
3082
  ...options.headers
3073
3083
  }
3074
3084
  });
3085
+ var getAdminClinicalNotesByWorkspace = (options) => (options.client ?? client).get({
3086
+ security: [{ scheme: "bearer", type: "http" }],
3087
+ url: "/admin/clinical/notes/by-workspace",
3088
+ ...options
3089
+ });
3075
3090
  var deleteAdminCrmCustomEntitiesById = (options) => (options.client ?? client).delete({
3076
3091
  security: [{ scheme: "bearer", type: "http" }],
3077
3092
  url: "/admin/crm/custom-entities/{id}",
@@ -13229,13 +13244,16 @@ function createSocialNamespace(rb) {
13229
13244
  },
13230
13245
  /**
13231
13246
  * Create a new social campaign.
13232
- * Workspace is resolved from the authenticated actor's context — do NOT
13233
- * pass `workspace_id` in attributes.
13247
+ *
13248
+ * @param workspaceId - Workspace ID (passed as query parameter for tenant resolution).
13249
+ * @param attributes - Campaign attributes (name, content_brief, etc.).
13250
+ * @param options - Optional request-level overrides.
13234
13251
  */
13235
- create: async (attributes, options) => {
13252
+ create: async (workspaceId, attributes, options) => {
13236
13253
  return rb.execute(
13237
13254
  postAdminSocialCampaigns,
13238
13255
  {
13256
+ query: { workspace_id: workspaceId },
13239
13257
  body: {
13240
13258
  data: { type: "social-campaign", attributes }
13241
13259
  }
@@ -18337,7 +18355,7 @@ function createClinicalNamespace(rb) {
18337
18355
  */
18338
18356
  listArchived: async (params, options) => rb.execute(
18339
18357
  getAdminClinicalGoalTemplatesArchived,
18340
- params ?? {},
18358
+ { query: params },
18341
18359
  options
18342
18360
  ),
18343
18361
  /**
@@ -18460,7 +18478,7 @@ function createClinicalNamespace(rb) {
18460
18478
  */
18461
18479
  listArchivedCatalog: async (params, options) => rb.execute(
18462
18480
  getAdminClinicalGoalTemplatesCatalogArchived,
18463
- params ?? {},
18481
+ { query: params ?? {} },
18464
18482
  options
18465
18483
  ),
18466
18484
  /**
@@ -18658,7 +18676,7 @@ function createClinicalNamespace(rb) {
18658
18676
  */
18659
18677
  listArchived: async (params, options) => rb.execute(
18660
18678
  getAdminClinicalPracticeToolsArchived,
18661
- params ?? {},
18679
+ { query: params },
18662
18680
  options
18663
18681
  ),
18664
18682
  /**
@@ -18781,7 +18799,7 @@ function createClinicalNamespace(rb) {
18781
18799
  */
18782
18800
  listArchivedCatalog: async (params, options) => rb.execute(
18783
18801
  getAdminClinicalPracticeToolsCatalogArchived,
18784
- params ?? {},
18802
+ { query: params ?? {} },
18785
18803
  options
18786
18804
  ),
18787
18805
  /**
@@ -18983,7 +19001,7 @@ function createClinicalNamespace(rb) {
18983
19001
  */
18984
19002
  listArchived: async (params, options) => rb.execute(
18985
19003
  getAdminClinicalPracticeResourcesArchived,
18986
- params ?? {},
19004
+ { query: params },
18987
19005
  options
18988
19006
  ),
18989
19007
  /**
@@ -19110,7 +19128,7 @@ function createClinicalNamespace(rb) {
19110
19128
  */
19111
19129
  listArchivedCatalog: async (params, options) => rb.execute(
19112
19130
  getAdminClinicalPracticeResourcesCatalogArchived,
19113
- params ?? {},
19131
+ { query: params ?? {} },
19114
19132
  options
19115
19133
  ),
19116
19134
  /**
@@ -19333,6 +19351,32 @@ function createClinicalNamespace(rb) {
19333
19351
  { query: params },
19334
19352
  options
19335
19353
  ),
19354
+ /**
19355
+ * List all notes for a patient across all sessions.
19356
+ *
19357
+ * @param patientId - Patient UUID
19358
+ * @param params - Filter/pagination parameters
19359
+ * @param options - Request options
19360
+ * @returns Array of {@link ClinicalNote} records
19361
+ */
19362
+ listByPatient: async (patientId, params, options) => rb.execute(
19363
+ getAdminClinicalNotesByPatient,
19364
+ { query: { patient_id: patientId, ...params } },
19365
+ options
19366
+ ),
19367
+ /**
19368
+ * List all notes in a workspace.
19369
+ *
19370
+ * @param workspaceId - Workspace UUID
19371
+ * @param params - Filter/pagination parameters
19372
+ * @param options - Request options
19373
+ * @returns Array of {@link ClinicalNote} records
19374
+ */
19375
+ listByWorkspace: async (workspaceId, params, options) => rb.execute(
19376
+ getAdminClinicalNotesByWorkspace,
19377
+ { query: { workspace_id: workspaceId, ...params } },
19378
+ options
19379
+ ),
19336
19380
  /** Get note by ID. */
19337
19381
  get: async (id, options) => rb.execute(
19338
19382
  getAdminClinicalNotesById,
@@ -19416,7 +19460,7 @@ function createClinicalNamespace(rb) {
19416
19460
  */
19417
19461
  listArchived: async (params, options) => rb.execute(
19418
19462
  getAdminClinicalNotesArchived,
19419
- params ?? {},
19463
+ { query: params },
19420
19464
  options
19421
19465
  ),
19422
19466
  /**
@@ -19586,7 +19630,7 @@ function createClinicalNamespace(rb) {
19586
19630
  */
19587
19631
  listArchived: async (params, options) => rb.execute(
19588
19632
  getAdminClinicalHealthMetricsArchived,
19589
- params ?? {},
19633
+ { query: params },
19590
19634
  options
19591
19635
  )
19592
19636
  },
@@ -19604,6 +19648,19 @@ function createClinicalNamespace(rb) {
19604
19648
  { query: params },
19605
19649
  options
19606
19650
  ),
19651
+ /**
19652
+ * List all meal plans for a patient across all sessions.
19653
+ *
19654
+ * @param patientId - Patient UUID
19655
+ * @param params - Filter/pagination parameters
19656
+ * @param options - Request options
19657
+ * @returns Array of {@link ClinicalMealPlan} records
19658
+ */
19659
+ listByPatient: async (patientId, params, options) => rb.execute(
19660
+ getAdminClinicalMealPlansByPatient,
19661
+ { query: { patient_id: patientId, ...params } },
19662
+ options
19663
+ ),
19607
19664
  /** Get meal plan by ID. */
19608
19665
  get: async (id, options) => rb.execute(
19609
19666
  getAdminClinicalMealPlansById,
@@ -19687,7 +19744,7 @@ function createClinicalNamespace(rb) {
19687
19744
  */
19688
19745
  listArchived: async (params, options) => rb.execute(
19689
19746
  getAdminClinicalMealPlansArchived,
19690
- params ?? {},
19747
+ { query: params },
19691
19748
  options
19692
19749
  )
19693
19750
  },
@@ -19794,7 +19851,7 @@ function createClinicalNamespace(rb) {
19794
19851
  */
19795
19852
  listArchived: async (params, options) => rb.execute(
19796
19853
  getAdminClinicalClientGoalsArchived,
19797
- params ?? {},
19854
+ { query: params },
19798
19855
  options
19799
19856
  )
19800
19857
  },
@@ -19899,9 +19956,32 @@ function createClinicalNamespace(rb) {
19899
19956
  */
19900
19957
  listArchived: async (params, options) => rb.execute(
19901
19958
  getAdminClinicalClientSupplementsArchived,
19902
- params ?? {},
19959
+ { query: params },
19903
19960
  options
19904
- )
19961
+ ),
19962
+ /**
19963
+ * Create multiple client supplements in a single request.
19964
+ *
19965
+ * @param attrs - Bulk creation attributes with workspace_id and supplements array
19966
+ * @param options - Request options
19967
+ * @returns Array of creation results with id and status per supplement
19968
+ *
19969
+ * @example
19970
+ * ```typescript
19971
+ * const results = await admin.clinical.clientSupplements.bulkCreate({
19972
+ * workspace_id: 'ws_123',
19973
+ * supplements: [
19974
+ * { patient_id: 'pat_1', name: 'Vitamin D3', source: 'fullscript' },
19975
+ * { patient_id: 'pat_1', name: 'Omega-3', source: 'fullscript' },
19976
+ * ],
19977
+ * });
19978
+ * ```
19979
+ */
19980
+ bulkCreate: async (attrs, options) => rb.rawPost(
19981
+ `/admin/clinical/client-supplements/bulk`,
19982
+ { data: attrs },
19983
+ options
19984
+ ).then((r) => r.data)
19905
19985
  },
19906
19986
  /** View and update clinical delivery audit records. */
19907
19987
  deliveries: {
@@ -20058,7 +20138,7 @@ function createClinicalNamespace(rb) {
20058
20138
  */
20059
20139
  listArchived: async (params, options) => rb.execute(
20060
20140
  getAdminClinicalClientResourceAssignmentsArchived,
20061
- params ?? {},
20141
+ { query: params },
20062
20142
  options
20063
20143
  )
20064
20144
  },