@gpt-platform/client 0.8.0 → 0.8.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.mjs CHANGED
@@ -1269,7 +1269,7 @@ function buildUserAgent(sdkVersion, appInfo) {
1269
1269
  }
1270
1270
 
1271
1271
  // src/version.ts
1272
- var SDK_VERSION = "0.8.0";
1272
+ var SDK_VERSION = "0.8.1";
1273
1273
  var DEFAULT_API_VERSION = "2026-03-11";
1274
1274
 
1275
1275
  // src/base-client.ts
@@ -2494,11 +2494,6 @@ var postConnectorsCredentialsByIdRefresh = (options) => (options.client ?? clien
2494
2494
  ...options.headers
2495
2495
  }
2496
2496
  });
2497
- var deleteClinicalSupplementRecCacheById = (options) => (options.client ?? client).delete({
2498
- security: [{ scheme: "bearer", type: "http" }],
2499
- url: "/clinical/supplement-rec-cache/{id}",
2500
- ...options
2501
- });
2502
2497
  var getClinicalSupplementRecCacheById = (options) => (options.client ?? client).get({
2503
2498
  security: [{ scheme: "bearer", type: "http" }],
2504
2499
  url: "/clinical/supplement-rec-cache/{id}",
@@ -2615,6 +2610,11 @@ var patchWalletAutoTopUp = (options) => (options.client ?? client).patch({
2615
2610
  ...options.headers
2616
2611
  }
2617
2612
  });
2613
+ var getClinicalGoalTemplatesCategories = (options) => (options.client ?? client).get({
2614
+ security: [{ scheme: "bearer", type: "http" }],
2615
+ url: "/clinical/goal-templates/categories",
2616
+ ...options
2617
+ });
2618
2618
  var postTokens = (options) => (options.client ?? client).post({
2619
2619
  security: [{ scheme: "bearer", type: "http" }],
2620
2620
  url: "/tokens",
@@ -3003,6 +3003,11 @@ var patchSocialCampaignsByIdCancel = (options) => (options.client ?? client).pat
3003
3003
  ...options.headers
3004
3004
  }
3005
3005
  });
3006
+ var getClinicalGoalTemplatesMine = (options) => (options.client ?? client).get({
3007
+ security: [{ scheme: "bearer", type: "http" }],
3008
+ url: "/clinical/goal-templates/mine",
3009
+ ...options
3010
+ });
3006
3011
  var patchAmendmentRequestsByIdReview = (options) => (options.client ?? client).patch({
3007
3012
  security: [{ scheme: "bearer", type: "http" }],
3008
3013
  url: "/amendment-requests/{id}/review",
@@ -4339,6 +4344,25 @@ var postClinicalClientResourceAssignments = (options) => (options.client ?? clie
4339
4344
  ...options.headers
4340
4345
  }
4341
4346
  });
4347
+ var deleteClinicalGoalTemplatesById = (options) => (options.client ?? client).delete({
4348
+ security: [{ scheme: "bearer", type: "http" }],
4349
+ url: "/clinical/goal-templates/{id}",
4350
+ ...options
4351
+ });
4352
+ var getClinicalGoalTemplatesById = (options) => (options.client ?? client).get({
4353
+ security: [{ scheme: "bearer", type: "http" }],
4354
+ url: "/clinical/goal-templates/{id}",
4355
+ ...options
4356
+ });
4357
+ var patchClinicalGoalTemplatesById = (options) => (options.client ?? client).patch({
4358
+ security: [{ scheme: "bearer", type: "http" }],
4359
+ url: "/clinical/goal-templates/{id}",
4360
+ ...options,
4361
+ headers: {
4362
+ "Content-Type": "application/vnd.api+json",
4363
+ ...options.headers
4364
+ }
4365
+ });
4342
4366
  var postUsersRegisterIsv = (options) => (options.client ?? client).post({
4343
4367
  security: [{ scheme: "bearer", type: "http" }],
4344
4368
  url: "/users/register-isv",
@@ -4465,6 +4489,11 @@ var patchSocialTrendingWatchesByIdMarkTriggered = (options) => (options.client ?
4465
4489
  ...options.headers
4466
4490
  }
4467
4491
  });
4492
+ var getClinicalPracticeResourcesCatalog = (options) => (options.client ?? client).get({
4493
+ security: [{ scheme: "bearer", type: "http" }],
4494
+ url: "/clinical/practice-resources/catalog",
4495
+ ...options
4496
+ });
4468
4497
  var postAgentsByIdSchemaVersionsByVersionIdActivate = (options) => (options.client ?? client).post({
4469
4498
  security: [{ scheme: "bearer", type: "http" }],
4470
4499
  url: "/agents/{id}/schema-versions/{version_id}/activate",
@@ -4893,6 +4922,15 @@ var getAgentsByIdUsage = (options) => (options.client ?? client).get({
4893
4922
  url: "/agents/{id}/usage",
4894
4923
  ...options
4895
4924
  });
4925
+ var postClinicalGoalTemplatesFromExisting = (options) => (options.client ?? client).post({
4926
+ security: [{ scheme: "bearer", type: "http" }],
4927
+ url: "/clinical/goal-templates/from-existing",
4928
+ ...options,
4929
+ headers: {
4930
+ "Content-Type": "application/vnd.api+json",
4931
+ ...options.headers
4932
+ }
4933
+ });
4896
4934
  var getAiConversations = (options) => (options.client ?? client).get({
4897
4935
  security: [{ scheme: "bearer", type: "http" }],
4898
4936
  url: "/ai/conversations",
@@ -6136,6 +6174,11 @@ var getSocialTrendingItemsById = (options) => (options.client ?? client).get({
6136
6174
  url: "/social/trending/items/{id}",
6137
6175
  ...options
6138
6176
  });
6177
+ var getClinicalPracticeToolsCatalog = (options) => (options.client ?? client).get({
6178
+ security: [{ scheme: "bearer", type: "http" }],
6179
+ url: "/clinical/practice-tools/catalog",
6180
+ ...options
6181
+ });
6139
6182
  var postUsersAuthResendConfirmation = (options) => (options.client ?? client).post({
6140
6183
  security: [{ scheme: "bearer", type: "http" }],
6141
6184
  url: "/users/auth/resend-confirmation",
@@ -6361,6 +6404,20 @@ var getAgentVersionsByIdRevisions = (options) => (options.client ?? client).get(
6361
6404
  url: "/agent-versions/{id}/revisions",
6362
6405
  ...options
6363
6406
  });
6407
+ var getClinicalGoalTemplates = (options) => (options.client ?? client).get({
6408
+ security: [{ scheme: "bearer", type: "http" }],
6409
+ url: "/clinical/goal-templates",
6410
+ ...options
6411
+ });
6412
+ var postClinicalGoalTemplates = (options) => (options.client ?? client).post({
6413
+ security: [{ scheme: "bearer", type: "http" }],
6414
+ url: "/clinical/goal-templates",
6415
+ ...options,
6416
+ headers: {
6417
+ "Content-Type": "application/vnd.api+json",
6418
+ ...options.headers
6419
+ }
6420
+ });
6364
6421
  var patchClinicalNotesByIdReject = (options) => (options.client ?? client).patch({
6365
6422
  security: [{ scheme: "bearer", type: "http" }],
6366
6423
  url: "/clinical/notes/{id}/reject",
@@ -6711,6 +6768,11 @@ var postEmailInboundAddresses = (options) => (options.client ?? client).post({
6711
6768
  ...options.headers
6712
6769
  }
6713
6770
  });
6771
+ var getClinicalGoalTemplatesCatalog = (options) => (options.client ?? client).get({
6772
+ security: [{ scheme: "bearer", type: "http" }],
6773
+ url: "/clinical/goal-templates/catalog",
6774
+ ...options
6775
+ });
6714
6776
  var deleteExtractionBatchesById = (options) => (options.client ?? client).delete({
6715
6777
  security: [{ scheme: "bearer", type: "http" }],
6716
6778
  url: "/extraction/batches/{id}",
@@ -11486,6 +11548,18 @@ function createClinicalNamespace(rb) {
11486
11548
  deleteClinicalPracticeResourcesById,
11487
11549
  { path: { id } },
11488
11550
  options
11551
+ ),
11552
+ /**
11553
+ * List application-level catalog practice resources.
11554
+ *
11555
+ * @param params - Optional filter/sort params. Application ID is resolved from the API key context.
11556
+ * @param options - Request options
11557
+ * @returns Array of {@link ClinicalPracticeResource} catalog records
11558
+ */
11559
+ listCatalog: async (params, options) => rb.execute(
11560
+ getClinicalPracticeResourcesCatalog,
11561
+ { query: params ?? {} },
11562
+ options
11489
11563
  )
11490
11564
  },
11491
11565
  /**
@@ -11501,7 +11575,7 @@ function createClinicalNamespace(rb) {
11501
11575
  */
11502
11576
  list: async (params, options) => rb.execute(
11503
11577
  getClinicalPracticeTools,
11504
- { ...params },
11578
+ { query: params },
11505
11579
  options
11506
11580
  ),
11507
11581
  /**
@@ -11577,6 +11651,18 @@ function createClinicalNamespace(rb) {
11577
11651
  listCategories: async (params, options) => rb.rawGet(
11578
11652
  `/clinical/practice-tools/categories?workspace_id=${encodeURIComponent(params.workspace_id)}`,
11579
11653
  options
11654
+ ),
11655
+ /**
11656
+ * List application-level catalog practice tools.
11657
+ *
11658
+ * @param params - Optional filter/sort params. Application ID is resolved from the API key context.
11659
+ * @param options - Request options
11660
+ * @returns Array of {@link ClinicalPracticeTool} catalog records
11661
+ */
11662
+ listCatalog: async (params, options) => rb.execute(
11663
+ getClinicalPracticeToolsCatalog,
11664
+ { query: params ?? {} },
11665
+ options
11580
11666
  )
11581
11667
  },
11582
11668
  /**
@@ -11717,18 +11803,145 @@ function createClinicalNamespace(rb) {
11717
11803
  `/clinical/patients/${patientId}/supplement-recommendations/generate`,
11718
11804
  { session_id: sessionId, workspace_id: workspaceId },
11719
11805
  options
11806
+ )
11807
+ },
11808
+ /**
11809
+ * Manage reusable clinical goal templates.
11810
+ *
11811
+ * Templates are workspace-scoped patterns that practitioners can personalize
11812
+ * and instantiate as ClientGoals.
11813
+ */
11814
+ goalTemplates: {
11815
+ /**
11816
+ * List goal templates in a workspace.
11817
+ *
11818
+ * @param params - Must include `workspace_id`
11819
+ * @param options - Request options
11820
+ * @returns Array of {@link ClinicalGoalTemplate} records
11821
+ *
11822
+ * @example
11823
+ * ```typescript
11824
+ * const templates = await client.clinical.goalTemplates.list({
11825
+ * workspace_id: "ws_123",
11826
+ * filter: { category: "nutrition" },
11827
+ * });
11828
+ * ```
11829
+ */
11830
+ list: async (params, options) => rb.execute(
11831
+ getClinicalGoalTemplates,
11832
+ { query: params },
11833
+ options
11720
11834
  ),
11721
11835
  /**
11722
- * Delete a supplement recommendation cache entry.
11836
+ * List practitioner's personal templates.
11723
11837
  *
11724
- * @param id - SupplementRecCache UUID
11838
+ * @param params - Must include `created_by_id`
11839
+ * @param options - Request options
11840
+ * @returns Array of {@link ClinicalGoalTemplate} records
11841
+ */
11842
+ listMine: async (params, options) => rb.execute(
11843
+ getClinicalGoalTemplatesMine,
11844
+ { query: params },
11845
+ options
11846
+ ),
11847
+ /**
11848
+ * List distinct goal template categories with counts.
11849
+ *
11850
+ * @param params - Must include `workspace_id`
11851
+ * @param options - Request options
11852
+ * @returns Array of {@link ClinicalGoalTemplateCategory} records
11853
+ */
11854
+ listCategories: async (params, options) => rb.execute(
11855
+ getClinicalGoalTemplatesCategories,
11856
+ { query: params },
11857
+ options
11858
+ ),
11859
+ /**
11860
+ * Get a single goal template by ID.
11861
+ *
11862
+ * @param id - GoalTemplate UUID
11863
+ * @param options - Request options
11864
+ * @returns {@link ClinicalGoalTemplate} record
11865
+ */
11866
+ get: async (id, options) => rb.execute(
11867
+ getClinicalGoalTemplatesById,
11868
+ { path: { id } },
11869
+ options
11870
+ ),
11871
+ /**
11872
+ * Create a new goal template.
11873
+ *
11874
+ * @param attributes - Template creation attributes. Must include `workspace_id`, `goal_type`, and `title`.
11875
+ * @param options - Request options
11876
+ * @returns Created {@link ClinicalGoalTemplate} record
11877
+ */
11878
+ create: async (attributes, options) => rb.execute(
11879
+ postClinicalGoalTemplates,
11880
+ { body: { data: { type: "clinical-goal-template", attributes } } },
11881
+ options
11882
+ ),
11883
+ /**
11884
+ * Create a personalized template from an existing one.
11885
+ *
11886
+ * Copies all fields from the source template, sets `created_by_id` to the
11887
+ * current actor, and sets `source_template_id` as a reference.
11888
+ *
11889
+ * @param attributes - Must include `workspace_id` and `source_template_id`
11890
+ * @param options - Request options
11891
+ * @returns Created {@link ClinicalGoalTemplate} record
11892
+ *
11893
+ * @example
11894
+ * ```typescript
11895
+ * const personal = await client.clinical.goalTemplates.createFromExisting({
11896
+ * workspace_id: "ws_123",
11897
+ * source_template_id: "tmpl_abc",
11898
+ * });
11899
+ * ```
11900
+ */
11901
+ createFromExisting: async (attributes, options) => rb.execute(
11902
+ postClinicalGoalTemplatesFromExisting,
11903
+ { body: { data: { type: "clinical-goal-template", attributes } } },
11904
+ options
11905
+ ),
11906
+ /**
11907
+ * Update a goal template.
11908
+ *
11909
+ * @param id - GoalTemplate UUID
11910
+ * @param attributes - Fields to update (PATCH semantics)
11911
+ * @param options - Request options
11912
+ * @returns Updated {@link ClinicalGoalTemplate} record
11913
+ */
11914
+ update: async (id, attributes, options) => rb.execute(
11915
+ patchClinicalGoalTemplatesById,
11916
+ {
11917
+ path: { id },
11918
+ body: { data: { type: "clinical-goal-template", id, attributes } }
11919
+ },
11920
+ options
11921
+ ),
11922
+ /**
11923
+ * Delete a goal template.
11924
+ *
11925
+ * @param id - GoalTemplate UUID
11725
11926
  * @param options - Request options
11726
11927
  * @returns `true` on successful deletion
11727
11928
  */
11728
11929
  delete: async (id, options) => rb.executeDelete(
11729
- deleteClinicalSupplementRecCacheById,
11930
+ deleteClinicalGoalTemplatesById,
11730
11931
  { path: { id } },
11731
11932
  options
11933
+ ),
11934
+ /**
11935
+ * List application-level catalog goal templates.
11936
+ *
11937
+ * @param params - Optional filter/sort params. Application ID is resolved from the API key context.
11938
+ * @param options - Request options
11939
+ * @returns Array of {@link ClinicalGoalTemplate} catalog records
11940
+ */
11941
+ listCatalog: async (params, options) => rb.execute(
11942
+ getClinicalGoalTemplatesCatalog,
11943
+ { query: params ?? {} },
11944
+ options
11732
11945
  )
11733
11946
  },
11734
11947
  /**