@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.js CHANGED
@@ -1333,7 +1333,7 @@ function buildUserAgent(sdkVersion, appInfo) {
1333
1333
  }
1334
1334
 
1335
1335
  // src/version.ts
1336
- var SDK_VERSION = "0.8.0";
1336
+ var SDK_VERSION = "0.8.1";
1337
1337
  var DEFAULT_API_VERSION = "2026-03-11";
1338
1338
 
1339
1339
  // src/base-client.ts
@@ -2558,11 +2558,6 @@ var postConnectorsCredentialsByIdRefresh = (options) => (options.client ?? clien
2558
2558
  ...options.headers
2559
2559
  }
2560
2560
  });
2561
- var deleteClinicalSupplementRecCacheById = (options) => (options.client ?? client).delete({
2562
- security: [{ scheme: "bearer", type: "http" }],
2563
- url: "/clinical/supplement-rec-cache/{id}",
2564
- ...options
2565
- });
2566
2561
  var getClinicalSupplementRecCacheById = (options) => (options.client ?? client).get({
2567
2562
  security: [{ scheme: "bearer", type: "http" }],
2568
2563
  url: "/clinical/supplement-rec-cache/{id}",
@@ -2679,6 +2674,11 @@ var patchWalletAutoTopUp = (options) => (options.client ?? client).patch({
2679
2674
  ...options.headers
2680
2675
  }
2681
2676
  });
2677
+ var getClinicalGoalTemplatesCategories = (options) => (options.client ?? client).get({
2678
+ security: [{ scheme: "bearer", type: "http" }],
2679
+ url: "/clinical/goal-templates/categories",
2680
+ ...options
2681
+ });
2682
2682
  var postTokens = (options) => (options.client ?? client).post({
2683
2683
  security: [{ scheme: "bearer", type: "http" }],
2684
2684
  url: "/tokens",
@@ -3067,6 +3067,11 @@ var patchSocialCampaignsByIdCancel = (options) => (options.client ?? client).pat
3067
3067
  ...options.headers
3068
3068
  }
3069
3069
  });
3070
+ var getClinicalGoalTemplatesMine = (options) => (options.client ?? client).get({
3071
+ security: [{ scheme: "bearer", type: "http" }],
3072
+ url: "/clinical/goal-templates/mine",
3073
+ ...options
3074
+ });
3070
3075
  var patchAmendmentRequestsByIdReview = (options) => (options.client ?? client).patch({
3071
3076
  security: [{ scheme: "bearer", type: "http" }],
3072
3077
  url: "/amendment-requests/{id}/review",
@@ -4403,6 +4408,25 @@ var postClinicalClientResourceAssignments = (options) => (options.client ?? clie
4403
4408
  ...options.headers
4404
4409
  }
4405
4410
  });
4411
+ var deleteClinicalGoalTemplatesById = (options) => (options.client ?? client).delete({
4412
+ security: [{ scheme: "bearer", type: "http" }],
4413
+ url: "/clinical/goal-templates/{id}",
4414
+ ...options
4415
+ });
4416
+ var getClinicalGoalTemplatesById = (options) => (options.client ?? client).get({
4417
+ security: [{ scheme: "bearer", type: "http" }],
4418
+ url: "/clinical/goal-templates/{id}",
4419
+ ...options
4420
+ });
4421
+ var patchClinicalGoalTemplatesById = (options) => (options.client ?? client).patch({
4422
+ security: [{ scheme: "bearer", type: "http" }],
4423
+ url: "/clinical/goal-templates/{id}",
4424
+ ...options,
4425
+ headers: {
4426
+ "Content-Type": "application/vnd.api+json",
4427
+ ...options.headers
4428
+ }
4429
+ });
4406
4430
  var postUsersRegisterIsv = (options) => (options.client ?? client).post({
4407
4431
  security: [{ scheme: "bearer", type: "http" }],
4408
4432
  url: "/users/register-isv",
@@ -4529,6 +4553,11 @@ var patchSocialTrendingWatchesByIdMarkTriggered = (options) => (options.client ?
4529
4553
  ...options.headers
4530
4554
  }
4531
4555
  });
4556
+ var getClinicalPracticeResourcesCatalog = (options) => (options.client ?? client).get({
4557
+ security: [{ scheme: "bearer", type: "http" }],
4558
+ url: "/clinical/practice-resources/catalog",
4559
+ ...options
4560
+ });
4532
4561
  var postAgentsByIdSchemaVersionsByVersionIdActivate = (options) => (options.client ?? client).post({
4533
4562
  security: [{ scheme: "bearer", type: "http" }],
4534
4563
  url: "/agents/{id}/schema-versions/{version_id}/activate",
@@ -4957,6 +4986,15 @@ var getAgentsByIdUsage = (options) => (options.client ?? client).get({
4957
4986
  url: "/agents/{id}/usage",
4958
4987
  ...options
4959
4988
  });
4989
+ var postClinicalGoalTemplatesFromExisting = (options) => (options.client ?? client).post({
4990
+ security: [{ scheme: "bearer", type: "http" }],
4991
+ url: "/clinical/goal-templates/from-existing",
4992
+ ...options,
4993
+ headers: {
4994
+ "Content-Type": "application/vnd.api+json",
4995
+ ...options.headers
4996
+ }
4997
+ });
4960
4998
  var getAiConversations = (options) => (options.client ?? client).get({
4961
4999
  security: [{ scheme: "bearer", type: "http" }],
4962
5000
  url: "/ai/conversations",
@@ -6200,6 +6238,11 @@ var getSocialTrendingItemsById = (options) => (options.client ?? client).get({
6200
6238
  url: "/social/trending/items/{id}",
6201
6239
  ...options
6202
6240
  });
6241
+ var getClinicalPracticeToolsCatalog = (options) => (options.client ?? client).get({
6242
+ security: [{ scheme: "bearer", type: "http" }],
6243
+ url: "/clinical/practice-tools/catalog",
6244
+ ...options
6245
+ });
6203
6246
  var postUsersAuthResendConfirmation = (options) => (options.client ?? client).post({
6204
6247
  security: [{ scheme: "bearer", type: "http" }],
6205
6248
  url: "/users/auth/resend-confirmation",
@@ -6425,6 +6468,20 @@ var getAgentVersionsByIdRevisions = (options) => (options.client ?? client).get(
6425
6468
  url: "/agent-versions/{id}/revisions",
6426
6469
  ...options
6427
6470
  });
6471
+ var getClinicalGoalTemplates = (options) => (options.client ?? client).get({
6472
+ security: [{ scheme: "bearer", type: "http" }],
6473
+ url: "/clinical/goal-templates",
6474
+ ...options
6475
+ });
6476
+ var postClinicalGoalTemplates = (options) => (options.client ?? client).post({
6477
+ security: [{ scheme: "bearer", type: "http" }],
6478
+ url: "/clinical/goal-templates",
6479
+ ...options,
6480
+ headers: {
6481
+ "Content-Type": "application/vnd.api+json",
6482
+ ...options.headers
6483
+ }
6484
+ });
6428
6485
  var patchClinicalNotesByIdReject = (options) => (options.client ?? client).patch({
6429
6486
  security: [{ scheme: "bearer", type: "http" }],
6430
6487
  url: "/clinical/notes/{id}/reject",
@@ -6775,6 +6832,11 @@ var postEmailInboundAddresses = (options) => (options.client ?? client).post({
6775
6832
  ...options.headers
6776
6833
  }
6777
6834
  });
6835
+ var getClinicalGoalTemplatesCatalog = (options) => (options.client ?? client).get({
6836
+ security: [{ scheme: "bearer", type: "http" }],
6837
+ url: "/clinical/goal-templates/catalog",
6838
+ ...options
6839
+ });
6778
6840
  var deleteExtractionBatchesById = (options) => (options.client ?? client).delete({
6779
6841
  security: [{ scheme: "bearer", type: "http" }],
6780
6842
  url: "/extraction/batches/{id}",
@@ -11550,6 +11612,18 @@ function createClinicalNamespace(rb) {
11550
11612
  deleteClinicalPracticeResourcesById,
11551
11613
  { path: { id } },
11552
11614
  options
11615
+ ),
11616
+ /**
11617
+ * List application-level catalog practice resources.
11618
+ *
11619
+ * @param params - Optional filter/sort params. Application ID is resolved from the API key context.
11620
+ * @param options - Request options
11621
+ * @returns Array of {@link ClinicalPracticeResource} catalog records
11622
+ */
11623
+ listCatalog: async (params, options) => rb.execute(
11624
+ getClinicalPracticeResourcesCatalog,
11625
+ { query: params ?? {} },
11626
+ options
11553
11627
  )
11554
11628
  },
11555
11629
  /**
@@ -11565,7 +11639,7 @@ function createClinicalNamespace(rb) {
11565
11639
  */
11566
11640
  list: async (params, options) => rb.execute(
11567
11641
  getClinicalPracticeTools,
11568
- { ...params },
11642
+ { query: params },
11569
11643
  options
11570
11644
  ),
11571
11645
  /**
@@ -11641,6 +11715,18 @@ function createClinicalNamespace(rb) {
11641
11715
  listCategories: async (params, options) => rb.rawGet(
11642
11716
  `/clinical/practice-tools/categories?workspace_id=${encodeURIComponent(params.workspace_id)}`,
11643
11717
  options
11718
+ ),
11719
+ /**
11720
+ * List application-level catalog practice tools.
11721
+ *
11722
+ * @param params - Optional filter/sort params. Application ID is resolved from the API key context.
11723
+ * @param options - Request options
11724
+ * @returns Array of {@link ClinicalPracticeTool} catalog records
11725
+ */
11726
+ listCatalog: async (params, options) => rb.execute(
11727
+ getClinicalPracticeToolsCatalog,
11728
+ { query: params ?? {} },
11729
+ options
11644
11730
  )
11645
11731
  },
11646
11732
  /**
@@ -11781,18 +11867,145 @@ function createClinicalNamespace(rb) {
11781
11867
  `/clinical/patients/${patientId}/supplement-recommendations/generate`,
11782
11868
  { session_id: sessionId, workspace_id: workspaceId },
11783
11869
  options
11870
+ )
11871
+ },
11872
+ /**
11873
+ * Manage reusable clinical goal templates.
11874
+ *
11875
+ * Templates are workspace-scoped patterns that practitioners can personalize
11876
+ * and instantiate as ClientGoals.
11877
+ */
11878
+ goalTemplates: {
11879
+ /**
11880
+ * List goal templates in a workspace.
11881
+ *
11882
+ * @param params - Must include `workspace_id`
11883
+ * @param options - Request options
11884
+ * @returns Array of {@link ClinicalGoalTemplate} records
11885
+ *
11886
+ * @example
11887
+ * ```typescript
11888
+ * const templates = await client.clinical.goalTemplates.list({
11889
+ * workspace_id: "ws_123",
11890
+ * filter: { category: "nutrition" },
11891
+ * });
11892
+ * ```
11893
+ */
11894
+ list: async (params, options) => rb.execute(
11895
+ getClinicalGoalTemplates,
11896
+ { query: params },
11897
+ options
11784
11898
  ),
11785
11899
  /**
11786
- * Delete a supplement recommendation cache entry.
11900
+ * List practitioner's personal templates.
11787
11901
  *
11788
- * @param id - SupplementRecCache UUID
11902
+ * @param params - Must include `created_by_id`
11903
+ * @param options - Request options
11904
+ * @returns Array of {@link ClinicalGoalTemplate} records
11905
+ */
11906
+ listMine: async (params, options) => rb.execute(
11907
+ getClinicalGoalTemplatesMine,
11908
+ { query: params },
11909
+ options
11910
+ ),
11911
+ /**
11912
+ * List distinct goal template categories with counts.
11913
+ *
11914
+ * @param params - Must include `workspace_id`
11915
+ * @param options - Request options
11916
+ * @returns Array of {@link ClinicalGoalTemplateCategory} records
11917
+ */
11918
+ listCategories: async (params, options) => rb.execute(
11919
+ getClinicalGoalTemplatesCategories,
11920
+ { query: params },
11921
+ options
11922
+ ),
11923
+ /**
11924
+ * Get a single goal template by ID.
11925
+ *
11926
+ * @param id - GoalTemplate UUID
11927
+ * @param options - Request options
11928
+ * @returns {@link ClinicalGoalTemplate} record
11929
+ */
11930
+ get: async (id, options) => rb.execute(
11931
+ getClinicalGoalTemplatesById,
11932
+ { path: { id } },
11933
+ options
11934
+ ),
11935
+ /**
11936
+ * Create a new goal template.
11937
+ *
11938
+ * @param attributes - Template creation attributes. Must include `workspace_id`, `goal_type`, and `title`.
11939
+ * @param options - Request options
11940
+ * @returns Created {@link ClinicalGoalTemplate} record
11941
+ */
11942
+ create: async (attributes, options) => rb.execute(
11943
+ postClinicalGoalTemplates,
11944
+ { body: { data: { type: "clinical-goal-template", attributes } } },
11945
+ options
11946
+ ),
11947
+ /**
11948
+ * Create a personalized template from an existing one.
11949
+ *
11950
+ * Copies all fields from the source template, sets `created_by_id` to the
11951
+ * current actor, and sets `source_template_id` as a reference.
11952
+ *
11953
+ * @param attributes - Must include `workspace_id` and `source_template_id`
11954
+ * @param options - Request options
11955
+ * @returns Created {@link ClinicalGoalTemplate} record
11956
+ *
11957
+ * @example
11958
+ * ```typescript
11959
+ * const personal = await client.clinical.goalTemplates.createFromExisting({
11960
+ * workspace_id: "ws_123",
11961
+ * source_template_id: "tmpl_abc",
11962
+ * });
11963
+ * ```
11964
+ */
11965
+ createFromExisting: async (attributes, options) => rb.execute(
11966
+ postClinicalGoalTemplatesFromExisting,
11967
+ { body: { data: { type: "clinical-goal-template", attributes } } },
11968
+ options
11969
+ ),
11970
+ /**
11971
+ * Update a goal template.
11972
+ *
11973
+ * @param id - GoalTemplate UUID
11974
+ * @param attributes - Fields to update (PATCH semantics)
11975
+ * @param options - Request options
11976
+ * @returns Updated {@link ClinicalGoalTemplate} record
11977
+ */
11978
+ update: async (id, attributes, options) => rb.execute(
11979
+ patchClinicalGoalTemplatesById,
11980
+ {
11981
+ path: { id },
11982
+ body: { data: { type: "clinical-goal-template", id, attributes } }
11983
+ },
11984
+ options
11985
+ ),
11986
+ /**
11987
+ * Delete a goal template.
11988
+ *
11989
+ * @param id - GoalTemplate UUID
11789
11990
  * @param options - Request options
11790
11991
  * @returns `true` on successful deletion
11791
11992
  */
11792
11993
  delete: async (id, options) => rb.executeDelete(
11793
- deleteClinicalSupplementRecCacheById,
11994
+ deleteClinicalGoalTemplatesById,
11794
11995
  { path: { id } },
11795
11996
  options
11997
+ ),
11998
+ /**
11999
+ * List application-level catalog goal templates.
12000
+ *
12001
+ * @param params - Optional filter/sort params. Application ID is resolved from the API key context.
12002
+ * @param options - Request options
12003
+ * @returns Array of {@link ClinicalGoalTemplate} catalog records
12004
+ */
12005
+ listCatalog: async (params, options) => rb.execute(
12006
+ getClinicalGoalTemplatesCatalog,
12007
+ { query: params ?? {} },
12008
+ options
11796
12009
  )
11797
12010
  },
11798
12011
  /**