@gpt-platform/admin 0.8.5 → 0.9.0

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
@@ -32,6 +32,7 @@ __export(index_exports, {
32
32
  ServerError: () => ServerError,
33
33
  TimeoutError: () => TimeoutError,
34
34
  ValidationError: () => ValidationError,
35
+ createImportsNamespace: () => createImportsNamespace,
35
36
  default: () => index_default,
36
37
  handleApiError: () => handleApiError
37
38
  });
@@ -853,8 +854,8 @@ var createClient = (config = {}) => {
853
854
  };
854
855
 
855
856
  // src/version.ts
856
- var SDK_VERSION = "0.8.5";
857
- var DEFAULT_API_VERSION = "2026-03-19";
857
+ var SDK_VERSION = "0.9.0";
858
+ var DEFAULT_API_VERSION = "2026-03-21";
858
859
 
859
860
  // src/base-client.ts
860
861
  function isSecureUrl(url) {
@@ -1254,6 +1255,30 @@ var RequestBuilder = class {
1254
1255
  throw handleApiError(error);
1255
1256
  }
1256
1257
  }
1258
+ /**
1259
+ * Execute a raw multipart/form-data POST request.
1260
+ * Used for file upload endpoints (custom Phoenix controllers).
1261
+ * Content-Type is omitted from headers so the browser sets the correct
1262
+ * multipart boundary automatically from the FormData body.
1263
+ */
1264
+ async rawPostMultipart(url, body, options) {
1265
+ const headers = buildHeaders(this.getHeaders, options);
1266
+ headers["Content-Type"] = null;
1267
+ const result = await this.requestWithRetry(
1268
+ () => this.clientInstance.post({
1269
+ url,
1270
+ headers,
1271
+ body,
1272
+ bodySerializer: null,
1273
+ ...options?.signal && { signal: options.signal }
1274
+ })
1275
+ );
1276
+ const { data, error } = result;
1277
+ if (error) {
1278
+ throw handleApiError(enrichError(error, result));
1279
+ }
1280
+ return data;
1281
+ }
1257
1282
  /**
1258
1283
  * Execute a raw POST request to a custom (non-generated) endpoint.
1259
1284
  * Used for endpoints implemented as custom Phoenix controllers.
@@ -1367,7 +1392,9 @@ var RequestBuilder = class {
1367
1392
  const result = await this.clientInstance.post({
1368
1393
  url,
1369
1394
  headers,
1370
- body: JSON.stringify({ data: { type: "message", attributes: body } }),
1395
+ body: JSON.stringify({
1396
+ data: { type: "chat-message", attributes: body }
1397
+ }),
1371
1398
  parseAs: "stream",
1372
1399
  ...options?.signal && { signal: options.signal }
1373
1400
  });
@@ -1485,19 +1512,23 @@ var getAdminExtractionBatchesById = (options) => (options.client ?? client).get(
1485
1512
  url: "/admin/extraction/batches/{id}",
1486
1513
  ...options
1487
1514
  });
1488
- var postAdminSocialPosts = (options) => (options.client ?? client).post({
1515
+ var patchAdminClinicalMealPlansByIdRestore = (options) => (options.client ?? client).patch({
1489
1516
  security: [{ scheme: "bearer", type: "http" }],
1490
- url: "/admin/social/posts",
1517
+ url: "/admin/clinical/meal-plans/{id}/restore",
1491
1518
  ...options,
1492
1519
  headers: {
1493
1520
  "Content-Type": "application/vnd.api+json",
1494
1521
  ...options.headers
1495
1522
  }
1496
1523
  });
1497
- var deleteAdminClinicalNotesById = (options) => (options.client ?? client).delete({
1524
+ var postAdminSocialPosts = (options) => (options.client ?? client).post({
1498
1525
  security: [{ scheme: "bearer", type: "http" }],
1499
- url: "/admin/clinical/notes/{id}",
1500
- ...options
1526
+ url: "/admin/social/posts",
1527
+ ...options,
1528
+ headers: {
1529
+ "Content-Type": "application/vnd.api+json",
1530
+ ...options.headers
1531
+ }
1501
1532
  });
1502
1533
  var getAdminClinicalNotesById = (options) => (options.client ?? client).get({
1503
1534
  security: [{ scheme: "bearer", type: "http" }],
@@ -1588,6 +1619,11 @@ var patchAdminSupportTicketsById = (options) => (options.client ?? client).patch
1588
1619
  ...options.headers
1589
1620
  }
1590
1621
  });
1622
+ var deleteAdminClinicalMealPlansByIdPermanent = (options) => (options.client ?? client).delete({
1623
+ security: [{ scheme: "bearer", type: "http" }],
1624
+ url: "/admin/clinical/meal-plans/{id}/permanent",
1625
+ ...options
1626
+ });
1591
1627
  var deleteAdminFeatureDefinitionsById = (options) => (options.client ?? client).delete({
1592
1628
  security: [{ scheme: "bearer", type: "http" }],
1593
1629
  url: "/admin/feature-definitions/{id}",
@@ -1752,6 +1788,15 @@ var patchAdminBrandIdentitiesById = (options) => (options.client ?? client).patc
1752
1788
  ...options.headers
1753
1789
  }
1754
1790
  });
1791
+ var patchAdminClinicalGoalTemplatesCatalogByIdArchive = (options) => (options.client ?? client).patch({
1792
+ security: [{ scheme: "bearer", type: "http" }],
1793
+ url: "/admin/clinical/goal-templates/catalog/{id}/archive",
1794
+ ...options,
1795
+ headers: {
1796
+ "Content-Type": "application/vnd.api+json",
1797
+ ...options.headers
1798
+ }
1799
+ });
1755
1800
  var getAdminClinicalHealthMetricsBySession = (options) => (options.client ?? client).get({
1756
1801
  security: [{ scheme: "bearer", type: "http" }],
1757
1802
  url: "/admin/clinical/health-metrics/by-session",
@@ -1907,11 +1952,6 @@ var patchAdminTenantsByIdConvertToOrg = (options) => (options.client ?? client).
1907
1952
  ...options.headers
1908
1953
  }
1909
1954
  });
1910
- var deleteAdminClinicalHealthMetricsById = (options) => (options.client ?? client).delete({
1911
- security: [{ scheme: "bearer", type: "http" }],
1912
- url: "/admin/clinical/health-metrics/{id}",
1913
- ...options
1914
- });
1915
1955
  var getAdminClinicalHealthMetricsById = (options) => (options.client ?? client).get({
1916
1956
  security: [{ scheme: "bearer", type: "http" }],
1917
1957
  url: "/admin/clinical/health-metrics/{id}",
@@ -2197,6 +2237,11 @@ var postAdminAgentsCloneForWorkspace = (options) => (options.client ?? client).p
2197
2237
  ...options.headers
2198
2238
  }
2199
2239
  });
2240
+ var deleteAdminClinicalClientGoalsByIdPermanent = (options) => (options.client ?? client).delete({
2241
+ security: [{ scheme: "bearer", type: "http" }],
2242
+ url: "/admin/clinical/client-goals/{id}/permanent",
2243
+ ...options
2244
+ });
2200
2245
  var postAdminTenantsByIdCredit = (options) => (options.client ?? client).post({
2201
2246
  security: [{ scheme: "bearer", type: "http" }],
2202
2247
  url: "/admin/tenants/{id}/credit",
@@ -2314,6 +2359,11 @@ var getAdminClinicalPracticeResourcesCategoriesCatalog = (options) => (options.c
2314
2359
  url: "/admin/clinical/practice-resources/categories/catalog",
2315
2360
  ...options
2316
2361
  });
2362
+ var getAdminClinicalGoalTemplatesArchived = (options) => (options.client ?? client).get({
2363
+ security: [{ scheme: "bearer", type: "http" }],
2364
+ url: "/admin/clinical/goal-templates/archived",
2365
+ ...options
2366
+ });
2317
2367
  var deleteAdminWorkspaceAgentConfigsById = (options) => (options.client ?? client).delete({
2318
2368
  security: [{ scheme: "bearer", type: "http" }],
2319
2369
  url: "/admin/workspace-agent-configs/{id}",
@@ -2444,11 +2494,6 @@ var postAdminLlmAnalytics = (options) => (options.client ?? client).post({
2444
2494
  ...options.headers
2445
2495
  }
2446
2496
  });
2447
- var deleteAdminClinicalPracticeToolsCatalogById = (options) => (options.client ?? client).delete({
2448
- security: [{ scheme: "bearer", type: "http" }],
2449
- url: "/admin/clinical/practice-tools/catalog/{id}",
2450
- ...options
2451
- });
2452
2497
  var getAdminClinicalPracticeToolsCatalogById = (options) => (options.client ?? client).get({
2453
2498
  security: [{ scheme: "bearer", type: "http" }],
2454
2499
  url: "/admin/clinical/practice-tools/catalog/{id}",
@@ -2487,11 +2532,6 @@ var getAdminThreadsSearch = (options) => (options.client ?? client).get({
2487
2532
  url: "/admin/threads/search",
2488
2533
  ...options
2489
2534
  });
2490
- var deleteAdminClinicalPracticeResourcesById = (options) => (options.client ?? client).delete({
2491
- security: [{ scheme: "bearer", type: "http" }],
2492
- url: "/admin/clinical/practice-resources/{id}",
2493
- ...options
2494
- });
2495
2535
  var getAdminClinicalPracticeResourcesById = (options) => (options.client ?? client).get({
2496
2536
  security: [{ scheme: "bearer", type: "http" }],
2497
2537
  url: "/admin/clinical/practice-resources/{id}",
@@ -2550,6 +2590,15 @@ var getAdminWebhookDeliveriesById = (options) => (options.client ?? client).get(
2550
2590
  url: "/admin/webhook-deliveries/{id}",
2551
2591
  ...options
2552
2592
  });
2593
+ var patchAdminClinicalPracticeResourcesByIdRestore = (options) => (options.client ?? client).patch({
2594
+ security: [{ scheme: "bearer", type: "http" }],
2595
+ url: "/admin/clinical/practice-resources/{id}/restore",
2596
+ ...options,
2597
+ headers: {
2598
+ "Content-Type": "application/vnd.api+json",
2599
+ ...options.headers
2600
+ }
2601
+ });
2553
2602
  var getAdminClinicalGoalTemplates = (options) => (options.client ?? client).get({
2554
2603
  security: [{ scheme: "bearer", type: "http" }],
2555
2604
  url: "/admin/clinical/goal-templates",
@@ -2639,6 +2688,24 @@ var patchAdminCrawlerSchedulesByIdDisable = (options) => (options.client ?? clie
2639
2688
  ...options.headers
2640
2689
  }
2641
2690
  });
2691
+ var patchAdminClinicalClientSupplementsByIdRestore = (options) => (options.client ?? client).patch({
2692
+ security: [{ scheme: "bearer", type: "http" }],
2693
+ url: "/admin/clinical/client-supplements/{id}/restore",
2694
+ ...options,
2695
+ headers: {
2696
+ "Content-Type": "application/vnd.api+json",
2697
+ ...options.headers
2698
+ }
2699
+ });
2700
+ var patchAdminClinicalPracticeToolsByIdRestore = (options) => (options.client ?? client).patch({
2701
+ security: [{ scheme: "bearer", type: "http" }],
2702
+ url: "/admin/clinical/practice-tools/{id}/restore",
2703
+ ...options,
2704
+ headers: {
2705
+ "Content-Type": "application/vnd.api+json",
2706
+ ...options.headers
2707
+ }
2708
+ });
2642
2709
  var deleteAdminApiKeysById = (options) => (options.client ?? client).delete({
2643
2710
  security: [{ scheme: "bearer", type: "http" }],
2644
2711
  url: "/admin/api-keys/{id}",
@@ -2667,6 +2734,16 @@ var postAdminCrmContactsByIdUnarchive = (options) => (options.client ?? client).
2667
2734
  ...options.headers
2668
2735
  }
2669
2736
  });
2737
+ var getAdminClinicalPracticeToolsArchived = (options) => (options.client ?? client).get({
2738
+ security: [{ scheme: "bearer", type: "http" }],
2739
+ url: "/admin/clinical/practice-tools/archived",
2740
+ ...options
2741
+ });
2742
+ var getAdminClinicalPracticeToolsCatalogArchived = (options) => (options.client ?? client).get({
2743
+ security: [{ scheme: "bearer", type: "http" }],
2744
+ url: "/admin/clinical/practice-tools/catalog/archived",
2745
+ ...options
2746
+ });
2670
2747
  var getAdminVoiceRecordingsSessionBySessionId = (options) => (options.client ?? client).get({
2671
2748
  security: [{ scheme: "bearer", type: "http" }],
2672
2749
  url: "/admin/voice/recordings/session/{session_id}",
@@ -2719,6 +2796,11 @@ var getAdminThreadsByIdMessages = (options) => (options.client ?? client).get({
2719
2796
  url: "/admin/threads/{id}/messages",
2720
2797
  ...options
2721
2798
  });
2799
+ var getAdminSocialTrendingHistoryRange = (options) => (options.client ?? client).get({
2800
+ security: [{ scheme: "bearer", type: "http" }],
2801
+ url: "/admin/social/trending/history/range",
2802
+ ...options
2803
+ });
2722
2804
  var getAdminSchedulingParticipants = (options) => (options.client ?? client).get({
2723
2805
  security: [{ scheme: "bearer", type: "http" }],
2724
2806
  url: "/admin/scheduling/participants",
@@ -2907,6 +2989,11 @@ var getAdminLlmAnalyticsPlatform = (options) => (options.client ?? client).get({
2907
2989
  url: "/admin/llm-analytics/platform",
2908
2990
  ...options
2909
2991
  });
2992
+ var deleteAdminClinicalClientSupplementsByIdPermanent = (options) => (options.client ?? client).delete({
2993
+ security: [{ scheme: "bearer", type: "http" }],
2994
+ url: "/admin/clinical/client-supplements/{id}/permanent",
2995
+ ...options
2996
+ });
2910
2997
  var deleteAdminExtractionWorkflowsById = (options) => (options.client ?? client).delete({
2911
2998
  security: [{ scheme: "bearer", type: "http" }],
2912
2999
  url: "/admin/extraction-workflows/{id}",
@@ -2935,11 +3022,29 @@ var postAdminExtractionSchemaDiscoveries = (options) => (options.client ?? clien
2935
3022
  ...options.headers
2936
3023
  }
2937
3024
  });
3025
+ var patchAdminClinicalPracticeToolsCatalogByIdRestore = (options) => (options.client ?? client).patch({
3026
+ security: [{ scheme: "bearer", type: "http" }],
3027
+ url: "/admin/clinical/practice-tools/catalog/{id}/restore",
3028
+ ...options,
3029
+ headers: {
3030
+ "Content-Type": "application/vnd.api+json",
3031
+ ...options.headers
3032
+ }
3033
+ });
2938
3034
  var getAdminVoiceSessions = (options) => (options.client ?? client).get({
2939
3035
  security: [{ scheme: "bearer", type: "http" }],
2940
3036
  url: "/admin/voice/sessions",
2941
3037
  ...options
2942
3038
  });
3039
+ var patchAdminClinicalNotesByIdArchive = (options) => (options.client ?? client).patch({
3040
+ security: [{ scheme: "bearer", type: "http" }],
3041
+ url: "/admin/clinical/notes/{id}/archive",
3042
+ ...options,
3043
+ headers: {
3044
+ "Content-Type": "application/vnd.api+json",
3045
+ ...options.headers
3046
+ }
3047
+ });
2943
3048
  var getAdminCrmActivitiesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
2944
3049
  security: [{ scheme: "bearer", type: "http" }],
2945
3050
  url: "/admin/crm/activities/workspace/{workspace_id}",
@@ -2968,6 +3073,11 @@ var getAdminWebhookConfigsStats = (options) => (options.client ?? client).get({
2968
3073
  url: "/admin/webhook-configs/stats",
2969
3074
  ...options
2970
3075
  });
3076
+ var deleteAdminClinicalGoalTemplatesByIdPermanent = (options) => (options.client ?? client).delete({
3077
+ security: [{ scheme: "bearer", type: "http" }],
3078
+ url: "/admin/clinical/goal-templates/{id}/permanent",
3079
+ ...options
3080
+ });
2971
3081
  var getAdminVoiceTranscriptionResultsSessionBySessionId = (options) => (options.client ?? client).get({
2972
3082
  security: [{ scheme: "bearer", type: "http" }],
2973
3083
  url: "/admin/voice/transcription-results/session/{session_id}",
@@ -3066,6 +3176,15 @@ var getAdminSupportQueueMembersApplicationByApplicationId = (options) => (option
3066
3176
  url: "/admin/support/queue-members/application/{application_id}",
3067
3177
  ...options
3068
3178
  });
3179
+ var patchAdminClinicalHealthMetricsByIdRestore = (options) => (options.client ?? client).patch({
3180
+ security: [{ scheme: "bearer", type: "http" }],
3181
+ url: "/admin/clinical/health-metrics/{id}/restore",
3182
+ ...options,
3183
+ headers: {
3184
+ "Content-Type": "application/vnd.api+json",
3185
+ ...options.headers
3186
+ }
3187
+ });
3069
3188
  var getAdminConnectorsOauthAppConfigs = (options) => (options.client ?? client).get({
3070
3189
  security: [{ scheme: "bearer", type: "http" }],
3071
3190
  url: "/admin/connectors/oauth-app-configs",
@@ -3080,6 +3199,11 @@ var postAdminConnectorsOauthAppConfigs = (options) => (options.client ?? client)
3080
3199
  ...options.headers
3081
3200
  }
3082
3201
  });
3202
+ var deleteAdminClinicalPracticeResourcesByIdPermanent = (options) => (options.client ?? client).delete({
3203
+ security: [{ scheme: "bearer", type: "http" }],
3204
+ url: "/admin/clinical/practice-resources/{id}/permanent",
3205
+ ...options
3206
+ });
3083
3207
  var deleteAdminClinicalSessionsById = (options) => (options.client ?? client).delete({
3084
3208
  security: [{ scheme: "bearer", type: "http" }],
3085
3209
  url: "/admin/clinical/sessions/{id}",
@@ -3310,6 +3434,15 @@ var postAdminClinicalPracticeResourcesCatalog = (options) => (options.client ??
3310
3434
  ...options.headers
3311
3435
  }
3312
3436
  });
3437
+ var patchAdminClinicalPracticeToolsByIdArchive = (options) => (options.client ?? client).patch({
3438
+ security: [{ scheme: "bearer", type: "http" }],
3439
+ url: "/admin/clinical/practice-tools/{id}/archive",
3440
+ ...options,
3441
+ headers: {
3442
+ "Content-Type": "application/vnd.api+json",
3443
+ ...options.headers
3444
+ }
3445
+ });
3313
3446
  var getAdminVoiceTranscriptionResultsById = (options) => (options.client ?? client).get({
3314
3447
  security: [{ scheme: "bearer", type: "http" }],
3315
3448
  url: "/admin/voice/transcription-results/{id}",
@@ -3382,6 +3515,11 @@ var getAdminExtractionDocumentsById = (options) => (options.client ?? client).ge
3382
3515
  url: "/admin/extraction/documents/{id}",
3383
3516
  ...options
3384
3517
  });
3518
+ var getAdminClinicalClientSupplementsArchived = (options) => (options.client ?? client).get({
3519
+ security: [{ scheme: "bearer", type: "http" }],
3520
+ url: "/admin/clinical/client-supplements/archived",
3521
+ ...options
3522
+ });
3385
3523
  var patchAdminWalletCredits = (options) => (options.client ?? client).patch({
3386
3524
  security: [{ scheme: "bearer", type: "http" }],
3387
3525
  url: "/admin/wallet/credits",
@@ -3396,6 +3534,11 @@ var getAdminLegalDocumentsForApplication = (options) => (options.client ?? clien
3396
3534
  url: "/admin/legal-documents/for-application",
3397
3535
  ...options
3398
3536
  });
3537
+ var getAdminClinicalMealPlansArchived = (options) => (options.client ?? client).get({
3538
+ security: [{ scheme: "bearer", type: "http" }],
3539
+ url: "/admin/clinical/meal-plans/archived",
3540
+ ...options
3541
+ });
3399
3542
  var getAdminAccounts = (options) => (options.client ?? client).get({
3400
3543
  security: [{ scheme: "bearer", type: "http" }],
3401
3544
  url: "/admin/accounts",
@@ -3477,6 +3620,15 @@ var getAdminClinicalGoalTemplatesCategoriesCatalog = (options) => (options.clien
3477
3620
  url: "/admin/clinical/goal-templates/categories/catalog",
3478
3621
  ...options
3479
3622
  });
3623
+ var patchAdminClinicalNotesByIdRestore = (options) => (options.client ?? client).patch({
3624
+ security: [{ scheme: "bearer", type: "http" }],
3625
+ url: "/admin/clinical/notes/{id}/restore",
3626
+ ...options,
3627
+ headers: {
3628
+ "Content-Type": "application/vnd.api+json",
3629
+ ...options.headers
3630
+ }
3631
+ });
3480
3632
  var patchAdminBrandIdentitiesByIdSetDefault = (options) => (options.client ?? client).patch({
3481
3633
  security: [{ scheme: "bearer", type: "http" }],
3482
3634
  url: "/admin/brand-identities/{id}/set-default",
@@ -3528,6 +3680,11 @@ var patchAdminStorageRecommendationsByIdAccept = (options) => (options.client ??
3528
3680
  ...options.headers
3529
3681
  }
3530
3682
  });
3683
+ var deleteAdminClinicalNotesByIdPermanent = (options) => (options.client ?? client).delete({
3684
+ security: [{ scheme: "bearer", type: "http" }],
3685
+ url: "/admin/clinical/notes/{id}/permanent",
3686
+ ...options
3687
+ });
3531
3688
  var getAdminStorageRecommendationsPending = (options) => (options.client ?? client).get({
3532
3689
  security: [{ scheme: "bearer", type: "http" }],
3533
3690
  url: "/admin/storage-recommendations/pending",
@@ -3560,6 +3717,11 @@ var patchAdminSchedulingParticipantsByIdRespond = (options) => (options.client ?
3560
3717
  ...options.headers
3561
3718
  }
3562
3719
  });
3720
+ var getAdminClinicalGoalTemplatesCatalogArchived = (options) => (options.client ?? client).get({
3721
+ security: [{ scheme: "bearer", type: "http" }],
3722
+ url: "/admin/clinical/goal-templates/catalog/archived",
3723
+ ...options
3724
+ });
3563
3725
  var getAdminEmailMarketingSenderProfilesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
3564
3726
  security: [{ scheme: "bearer", type: "http" }],
3565
3727
  url: "/admin/email-marketing/sender-profiles/workspace/{workspace_id}",
@@ -3693,6 +3855,15 @@ var getAdminClinicalNotesByNoteIdVersionsById = (options) => (options.client ??
3693
3855
  url: "/admin/clinical/notes/{note_id}/versions/{id}",
3694
3856
  ...options
3695
3857
  });
3858
+ var patchAdminClinicalPracticeResourcesCatalogByIdRestore = (options) => (options.client ?? client).patch({
3859
+ security: [{ scheme: "bearer", type: "http" }],
3860
+ url: "/admin/clinical/practice-resources/catalog/{id}/restore",
3861
+ ...options,
3862
+ headers: {
3863
+ "Content-Type": "application/vnd.api+json",
3864
+ ...options.headers
3865
+ }
3866
+ });
3696
3867
  var patchAdminWalletPlan = (options) => (options.client ?? client).patch({
3697
3868
  security: [{ scheme: "bearer", type: "http" }],
3698
3869
  url: "/admin/wallet/plan",
@@ -3721,6 +3892,11 @@ var getAdminUsersById = (options) => (options.client ?? client).get({
3721
3892
  url: "/admin/users/{id}",
3722
3893
  ...options
3723
3894
  });
3895
+ var deleteAdminClinicalClientResourceAssignmentsByIdPermanent = (options) => (options.client ?? client).delete({
3896
+ security: [{ scheme: "bearer", type: "http" }],
3897
+ url: "/admin/clinical/client-resource-assignments/{id}/permanent",
3898
+ ...options
3899
+ });
3724
3900
  var postAdminWebhookConfigsBulkDisable = (options) => (options.client ?? client).post({
3725
3901
  security: [{ scheme: "bearer", type: "http" }],
3726
3902
  url: "/admin/webhook-configs/bulk-disable",
@@ -3863,6 +4039,11 @@ var getAdminExtractionBatchesWorkspaceByWorkspaceId = (options) => (options.clie
3863
4039
  url: "/admin/extraction/batches/workspace/{workspace_id}",
3864
4040
  ...options
3865
4041
  });
4042
+ var getAdminClinicalClientGoalsArchived = (options) => (options.client ?? client).get({
4043
+ security: [{ scheme: "bearer", type: "http" }],
4044
+ url: "/admin/clinical/client-goals/archived",
4045
+ ...options
4046
+ });
3866
4047
  var getAdminPlatformTonesByBrandByBrandIdentityId = (options) => (options.client ?? client).get({
3867
4048
  security: [{ scheme: "bearer", type: "http" }],
3868
4049
  url: "/admin/platform-tones/by-brand/{brand_identity_id}",
@@ -3877,6 +4058,15 @@ var postAdminThreadsByIdFork = (options) => (options.client ?? client).post({
3877
4058
  ...options.headers
3878
4059
  }
3879
4060
  });
4061
+ var patchAdminClinicalClientGoalsByIdRestore = (options) => (options.client ?? client).patch({
4062
+ security: [{ scheme: "bearer", type: "http" }],
4063
+ url: "/admin/clinical/client-goals/{id}/restore",
4064
+ ...options,
4065
+ headers: {
4066
+ "Content-Type": "application/vnd.api+json",
4067
+ ...options.headers
4068
+ }
4069
+ });
3880
4070
  var getAdminInvitationsMe = (options) => (options.client ?? client).get({
3881
4071
  security: [{ scheme: "bearer", type: "http" }],
3882
4072
  url: "/admin/invitations/me",
@@ -3887,6 +4077,15 @@ var getAdminConnectorsCredentials = (options) => (options.client ?? client).get(
3887
4077
  url: "/admin/connectors/credentials",
3888
4078
  ...options
3889
4079
  });
4080
+ var patchAdminClinicalGoalTemplatesByIdRestore = (options) => (options.client ?? client).patch({
4081
+ security: [{ scheme: "bearer", type: "http" }],
4082
+ url: "/admin/clinical/goal-templates/{id}/restore",
4083
+ ...options,
4084
+ headers: {
4085
+ "Content-Type": "application/vnd.api+json",
4086
+ ...options.headers
4087
+ }
4088
+ });
3890
4089
  var getAdminAgentVersions = (options) => (options.client ?? client).get({
3891
4090
  security: [{ scheme: "bearer", type: "http" }],
3892
4091
  url: "/admin/agent-versions",
@@ -3954,6 +4153,11 @@ var getAdminClinicalSessionsByIdMealPlans = (options) => (options.client ?? clie
3954
4153
  url: "/admin/clinical/sessions/{id}/meal_plans",
3955
4154
  ...options
3956
4155
  });
4156
+ var getAdminClinicalClientResourceAssignmentsArchived = (options) => (options.client ?? client).get({
4157
+ security: [{ scheme: "bearer", type: "http" }],
4158
+ url: "/admin/clinical/client-resource-assignments/archived",
4159
+ ...options
4160
+ });
3957
4161
  var getAdminCrmSyncConfigsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
3958
4162
  security: [{ scheme: "bearer", type: "http" }],
3959
4163
  url: "/admin/crm/sync-configs/workspace/{workspace_id}",
@@ -4081,11 +4285,6 @@ var getAdminBucketsByIdStats = (options) => (options.client ?? client).get({
4081
4285
  url: "/admin/buckets/{id}/stats",
4082
4286
  ...options
4083
4287
  });
4084
- var deleteAdminClinicalClientResourceAssignmentsById = (options) => (options.client ?? client).delete({
4085
- security: [{ scheme: "bearer", type: "http" }],
4086
- url: "/admin/clinical/client-resource-assignments/{id}",
4087
- ...options
4088
- });
4089
4288
  var getAdminClinicalClientResourceAssignmentsById = (options) => (options.client ?? client).get({
4090
4289
  security: [{ scheme: "bearer", type: "http" }],
4091
4290
  url: "/admin/clinical/client-resource-assignments/{id}",
@@ -4105,6 +4304,11 @@ var getAdminUsersByEmail = (options) => (options.client ?? client).get({
4105
4304
  url: "/admin/users/by-email",
4106
4305
  ...options
4107
4306
  });
4307
+ var deleteAdminClinicalPracticeToolsCatalogByIdPermanent = (options) => (options.client ?? client).delete({
4308
+ security: [{ scheme: "bearer", type: "http" }],
4309
+ url: "/admin/clinical/practice-tools/catalog/{id}/permanent",
4310
+ ...options
4311
+ });
4108
4312
  var deleteAdminSupportQueuesById = (options) => (options.client ?? client).delete({
4109
4313
  security: [{ scheme: "bearer", type: "http" }],
4110
4314
  url: "/admin/support/queues/{id}",
@@ -4245,6 +4449,11 @@ var postAdminCrawlerSiteConfigs = (options) => (options.client ?? client).post({
4245
4449
  ...options.headers
4246
4450
  }
4247
4451
  });
4452
+ var deleteAdminClinicalPracticeToolsByIdPermanent = (options) => (options.client ?? client).delete({
4453
+ security: [{ scheme: "bearer", type: "http" }],
4454
+ url: "/admin/clinical/practice-tools/{id}/permanent",
4455
+ ...options
4456
+ });
4248
4457
  var getAdminCrmContactsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
4249
4458
  security: [{ scheme: "bearer", type: "http" }],
4250
4459
  url: "/admin/crm/contacts/workspace/{workspace_id}",
@@ -4264,6 +4473,15 @@ var getAdminExtractionResultsDocumentByDocumentId = (options) => (options.client
4264
4473
  url: "/admin/extraction/results/document/{document_id}",
4265
4474
  ...options
4266
4475
  });
4476
+ var patchAdminClinicalPracticeResourcesCatalogByIdArchive = (options) => (options.client ?? client).patch({
4477
+ security: [{ scheme: "bearer", type: "http" }],
4478
+ url: "/admin/clinical/practice-resources/catalog/{id}/archive",
4479
+ ...options,
4480
+ headers: {
4481
+ "Content-Type": "application/vnd.api+json",
4482
+ ...options.headers
4483
+ }
4484
+ });
4267
4485
  var postAdminAgentsByIdPublishVersion = (options) => (options.client ?? client).post({
4268
4486
  security: [{ scheme: "bearer", type: "http" }],
4269
4487
  url: "/admin/agents/{id}/publish-version",
@@ -4312,6 +4530,11 @@ var getAdminLlmAnalyticsWorkspace = (options) => (options.client ?? client).get(
4312
4530
  url: "/admin/llm-analytics/workspace",
4313
4531
  ...options
4314
4532
  });
4533
+ var deleteAdminClinicalHealthMetricsByIdPermanent = (options) => (options.client ?? client).delete({
4534
+ security: [{ scheme: "bearer", type: "http" }],
4535
+ url: "/admin/clinical/health-metrics/{id}/permanent",
4536
+ ...options
4537
+ });
4315
4538
  var getAdminAgentVersionRevisions = (options) => (options.client ?? client).get({
4316
4539
  security: [{ scheme: "bearer", type: "http" }],
4317
4540
  url: "/admin/agent-version-revisions",
@@ -4358,6 +4581,15 @@ var patchAdminTenantsByIdSuspend = (options) => (options.client ?? client).patch
4358
4581
  ...options.headers
4359
4582
  }
4360
4583
  });
4584
+ var patchAdminClinicalGoalTemplatesCatalogByIdRestore = (options) => (options.client ?? client).patch({
4585
+ security: [{ scheme: "bearer", type: "http" }],
4586
+ url: "/admin/clinical/goal-templates/catalog/{id}/restore",
4587
+ ...options,
4588
+ headers: {
4589
+ "Content-Type": "application/vnd.api+json",
4590
+ ...options.headers
4591
+ }
4592
+ });
4361
4593
  var patchAdminWorkspacesByIdAllocate = (options) => (options.client ?? client).patch({
4362
4594
  security: [{ scheme: "bearer", type: "http" }],
4363
4595
  url: "/admin/workspaces/{id}/allocate",
@@ -4651,11 +4883,6 @@ var patchAdminCrmContactsByIdArchive = (options) => (options.client ?? client).p
4651
4883
  ...options.headers
4652
4884
  }
4653
4885
  });
4654
- var deleteAdminClinicalGoalTemplatesById = (options) => (options.client ?? client).delete({
4655
- security: [{ scheme: "bearer", type: "http" }],
4656
- url: "/admin/clinical/goal-templates/{id}",
4657
- ...options
4658
- });
4659
4886
  var getAdminClinicalGoalTemplatesById = (options) => (options.client ?? client).get({
4660
4887
  security: [{ scheme: "bearer", type: "http" }],
4661
4888
  url: "/admin/clinical/goal-templates/{id}",
@@ -4735,6 +4962,11 @@ var postAdminAgentSouls = (options) => (options.client ?? client).post({
4735
4962
  ...options.headers
4736
4963
  }
4737
4964
  });
4965
+ var deleteAdminClinicalPracticeResourcesCatalogByIdPermanent = (options) => (options.client ?? client).delete({
4966
+ security: [{ scheme: "bearer", type: "http" }],
4967
+ url: "/admin/clinical/practice-resources/catalog/{id}/permanent",
4968
+ ...options
4969
+ });
4738
4970
  var postAdminSocialCampaignsByIdAdaptForPlatforms = (options) => (options.client ?? client).post({
4739
4971
  security: [{ scheme: "bearer", type: "http" }],
4740
4972
  url: "/admin/social/campaigns/{id}/adapt-for-platforms",
@@ -4790,6 +5022,15 @@ var getAdminSocialTrendingHistoryWorkspaceByWorkspaceId = (options) => (options.
4790
5022
  url: "/admin/social/trending/history/workspace/{workspace_id}",
4791
5023
  ...options
4792
5024
  });
5025
+ var patchAdminClinicalGoalTemplatesByIdArchive = (options) => (options.client ?? client).patch({
5026
+ security: [{ scheme: "bearer", type: "http" }],
5027
+ url: "/admin/clinical/goal-templates/{id}/archive",
5028
+ ...options,
5029
+ headers: {
5030
+ "Content-Type": "application/vnd.api+json",
5031
+ ...options.headers
5032
+ }
5033
+ });
4793
5034
  var postAdminExtractionDocumentsUpload = (options) => (options.client ?? client).post({
4794
5035
  security: [{ scheme: "bearer", type: "http" }],
4795
5036
  url: "/admin/extraction/documents/upload",
@@ -4804,11 +5045,6 @@ var getAdminExtractionChunkEntityLinksDocumentByDocumentId = (options) => (optio
4804
5045
  url: "/admin/extraction/chunk-entity-links/document/{document_id}",
4805
5046
  ...options
4806
5047
  });
4807
- var deleteAdminClinicalClientSupplementsById = (options) => (options.client ?? client).delete({
4808
- security: [{ scheme: "bearer", type: "http" }],
4809
- url: "/admin/clinical/client-supplements/{id}",
4810
- ...options
4811
- });
4812
5048
  var getAdminClinicalClientSupplementsById = (options) => (options.client ?? client).get({
4813
5049
  security: [{ scheme: "bearer", type: "http" }],
4814
5050
  url: "/admin/clinical/client-supplements/{id}",
@@ -4917,6 +5153,11 @@ var getAdminPlanFeatureAllocationsByPlanByPlanId = (options) => (options.client
4917
5153
  url: "/admin/plan-feature-allocations/by-plan/{plan_id}",
4918
5154
  ...options
4919
5155
  });
5156
+ var getAdminClinicalPracticeResourcesCatalogArchived = (options) => (options.client ?? client).get({
5157
+ security: [{ scheme: "bearer", type: "http" }],
5158
+ url: "/admin/clinical/practice-resources/catalog/archived",
5159
+ ...options
5160
+ });
4920
5161
  var patchAdminApiKeysByIdResetPeriod = (options) => (options.client ?? client).patch({
4921
5162
  security: [{ scheme: "bearer", type: "http" }],
4922
5163
  url: "/admin/api-keys/{id}/reset-period",
@@ -4959,11 +5200,6 @@ var getAdminLlmAnalyticsById = (options) => (options.client ?? client).get({
4959
5200
  url: "/admin/llm-analytics/{id}",
4960
5201
  ...options
4961
5202
  });
4962
- var deleteAdminClinicalGoalTemplatesCatalogById = (options) => (options.client ?? client).delete({
4963
- security: [{ scheme: "bearer", type: "http" }],
4964
- url: "/admin/clinical/goal-templates/catalog/{id}",
4965
- ...options
4966
- });
4967
5203
  var getAdminClinicalGoalTemplatesCatalogById = (options) => (options.client ?? client).get({
4968
5204
  security: [{ scheme: "bearer", type: "http" }],
4969
5205
  url: "/admin/clinical/goal-templates/catalog/{id}",
@@ -5160,11 +5396,6 @@ var postAdminWholesaleAgreements = (options) => (options.client ?? client).post(
5160
5396
  ...options.headers
5161
5397
  }
5162
5398
  });
5163
- var deleteAdminClinicalClientGoalsById = (options) => (options.client ?? client).delete({
5164
- security: [{ scheme: "bearer", type: "http" }],
5165
- url: "/admin/clinical/client-goals/{id}",
5166
- ...options
5167
- });
5168
5399
  var getAdminClinicalClientGoalsById = (options) => (options.client ?? client).get({
5169
5400
  security: [{ scheme: "bearer", type: "http" }],
5170
5401
  url: "/admin/clinical/client-goals/{id}",
@@ -5217,6 +5448,11 @@ var patchAdminCrmPipelineStagesById = (options) => (options.client ?? client).pa
5217
5448
  ...options.headers
5218
5449
  }
5219
5450
  });
5451
+ var getAdminClinicalPracticeResourcesArchived = (options) => (options.client ?? client).get({
5452
+ security: [{ scheme: "bearer", type: "http" }],
5453
+ url: "/admin/clinical/practice-resources/archived",
5454
+ ...options
5455
+ });
5220
5456
  var postAdminThreadsByIdSummarize = (options) => (options.client ?? client).post({
5221
5457
  security: [{ scheme: "bearer", type: "http" }],
5222
5458
  url: "/admin/threads/{id}/summarize",
@@ -5282,6 +5518,15 @@ var getAdminVoiceRecordingsById = (options) => (options.client ?? client).get({
5282
5518
  url: "/admin/voice/recordings/{id}",
5283
5519
  ...options
5284
5520
  });
5521
+ var patchAdminClinicalMealPlansByIdArchive = (options) => (options.client ?? client).patch({
5522
+ security: [{ scheme: "bearer", type: "http" }],
5523
+ url: "/admin/clinical/meal-plans/{id}/archive",
5524
+ ...options,
5525
+ headers: {
5526
+ "Content-Type": "application/vnd.api+json",
5527
+ ...options.headers
5528
+ }
5529
+ });
5285
5530
  var patchAdminTenantsByIdBranding = (options) => (options.client ?? client).patch({
5286
5531
  security: [{ scheme: "bearer", type: "http" }],
5287
5532
  url: "/admin/tenants/{id}/branding",
@@ -5300,11 +5545,6 @@ var patchAdminApiKeysByIdRevoke = (options) => (options.client ?? client).patch(
5300
5545
  ...options.headers
5301
5546
  }
5302
5547
  });
5303
- var deleteAdminClinicalPracticeResourcesCatalogById = (options) => (options.client ?? client).delete({
5304
- security: [{ scheme: "bearer", type: "http" }],
5305
- url: "/admin/clinical/practice-resources/catalog/{id}",
5306
- ...options
5307
- });
5308
5548
  var getAdminClinicalPracticeResourcesCatalogById = (options) => (options.client ?? client).get({
5309
5549
  security: [{ scheme: "bearer", type: "http" }],
5310
5550
  url: "/admin/clinical/practice-resources/catalog/{id}",
@@ -5366,11 +5606,25 @@ var getAdminBuckets = (options) => (options.client ?? client).get({
5366
5606
  url: "/admin/buckets",
5367
5607
  ...options
5368
5608
  });
5609
+ var patchAdminClinicalClientResourceAssignmentsByIdArchive = (options) => (options.client ?? client).patch({
5610
+ security: [{ scheme: "bearer", type: "http" }],
5611
+ url: "/admin/clinical/client-resource-assignments/{id}/archive",
5612
+ ...options,
5613
+ headers: {
5614
+ "Content-Type": "application/vnd.api+json",
5615
+ ...options.headers
5616
+ }
5617
+ });
5369
5618
  var getAdminSupportRoutingRulesApplicationByApplicationId = (options) => (options.client ?? client).get({
5370
5619
  security: [{ scheme: "bearer", type: "http" }],
5371
5620
  url: "/admin/support/routing-rules/application/{application_id}",
5372
5621
  ...options
5373
5622
  });
5623
+ var getAdminClinicalNotesArchived = (options) => (options.client ?? client).get({
5624
+ security: [{ scheme: "bearer", type: "http" }],
5625
+ url: "/admin/clinical/notes/archived",
5626
+ ...options
5627
+ });
5374
5628
  var getAdminClinicalPracticeToolsCatalog = (options) => (options.client ?? client).get({
5375
5629
  security: [{ scheme: "bearer", type: "http" }],
5376
5630
  url: "/admin/clinical/practice-tools/catalog",
@@ -5483,6 +5737,15 @@ var patchAdminExtractionDocumentsByIdDismissTraining = (options) => (options.cli
5483
5737
  ...options.headers
5484
5738
  }
5485
5739
  });
5740
+ var patchAdminClinicalClientGoalsByIdArchive = (options) => (options.client ?? client).patch({
5741
+ security: [{ scheme: "bearer", type: "http" }],
5742
+ url: "/admin/clinical/client-goals/{id}/archive",
5743
+ ...options,
5744
+ headers: {
5745
+ "Content-Type": "application/vnd.api+json",
5746
+ ...options.headers
5747
+ }
5748
+ });
5486
5749
  var postAdminSysSemanticCacheClear = (options) => (options.client ?? client).post({
5487
5750
  security: [{ scheme: "bearer", type: "http" }],
5488
5751
  url: "/admin/sys/semantic-cache/clear",
@@ -5563,6 +5826,15 @@ var patchAdminApiKeysByIdRotate = (options) => (options.client ?? client).patch(
5563
5826
  ...options.headers
5564
5827
  }
5565
5828
  });
5829
+ var patchAdminClinicalHealthMetricsByIdArchive = (options) => (options.client ?? client).patch({
5830
+ security: [{ scheme: "bearer", type: "http" }],
5831
+ url: "/admin/clinical/health-metrics/{id}/archive",
5832
+ ...options,
5833
+ headers: {
5834
+ "Content-Type": "application/vnd.api+json",
5835
+ ...options.headers
5836
+ }
5837
+ });
5566
5838
  var getAdminClinicalPatients = (options) => (options.client ?? client).get({
5567
5839
  security: [{ scheme: "bearer", type: "http" }],
5568
5840
  url: "/admin/clinical/patients",
@@ -5582,6 +5854,15 @@ var getAdminUsageEventsById = (options) => (options.client ?? client).get({
5582
5854
  url: "/admin/usage-events/{id}",
5583
5855
  ...options
5584
5856
  });
5857
+ var patchAdminClinicalPracticeToolsCatalogByIdArchive = (options) => (options.client ?? client).patch({
5858
+ security: [{ scheme: "bearer", type: "http" }],
5859
+ url: "/admin/clinical/practice-tools/catalog/{id}/archive",
5860
+ ...options,
5861
+ headers: {
5862
+ "Content-Type": "application/vnd.api+json",
5863
+ ...options.headers
5864
+ }
5865
+ });
5585
5866
  var getAdminSocialAccountsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
5586
5867
  security: [{ scheme: "bearer", type: "http" }],
5587
5868
  url: "/admin/social/accounts/workspace/{workspace_id}",
@@ -5625,6 +5906,15 @@ var getAdminUsageEventsByUser = (options) => (options.client ?? client).get({
5625
5906
  url: "/admin/usage-events/by-user",
5626
5907
  ...options
5627
5908
  });
5909
+ var patchAdminClinicalClientResourceAssignmentsByIdRestore = (options) => (options.client ?? client).patch({
5910
+ security: [{ scheme: "bearer", type: "http" }],
5911
+ url: "/admin/clinical/client-resource-assignments/{id}/restore",
5912
+ ...options,
5913
+ headers: {
5914
+ "Content-Type": "application/vnd.api+json",
5915
+ ...options.headers
5916
+ }
5917
+ });
5628
5918
  var deleteAdminThreadsById = (options) => (options.client ?? client).delete({
5629
5919
  security: [{ scheme: "bearer", type: "http" }],
5630
5920
  url: "/admin/threads/{id}",
@@ -5895,6 +6185,15 @@ var getAdminCrmCustomEntitiesByEntityIdVersions = (options) => (options.client ?
5895
6185
  url: "/admin/crm/custom-entities/{entity_id}/versions",
5896
6186
  ...options
5897
6187
  });
6188
+ var patchAdminClinicalClientSupplementsByIdArchive = (options) => (options.client ?? client).patch({
6189
+ security: [{ scheme: "bearer", type: "http" }],
6190
+ url: "/admin/clinical/client-supplements/{id}/archive",
6191
+ ...options,
6192
+ headers: {
6193
+ "Content-Type": "application/vnd.api+json",
6194
+ ...options.headers
6195
+ }
6196
+ });
5898
6197
  var patchAdminCrmExportsByIdRefreshUrl = (options) => (options.client ?? client).patch({
5899
6198
  security: [{ scheme: "bearer", type: "http" }],
5900
6199
  url: "/admin/crm/exports/{id}/refresh-url",
@@ -6085,6 +6384,15 @@ var patchAdminEmailMarketingSenderProfilesByIdValidateDns = (options) => (option
6085
6384
  ...options.headers
6086
6385
  }
6087
6386
  });
6387
+ var patchAdminClinicalPracticeResourcesByIdArchive = (options) => (options.client ?? client).patch({
6388
+ security: [{ scheme: "bearer", type: "http" }],
6389
+ url: "/admin/clinical/practice-resources/{id}/archive",
6390
+ ...options,
6391
+ headers: {
6392
+ "Content-Type": "application/vnd.api+json",
6393
+ ...options.headers
6394
+ }
6395
+ });
6088
6396
  var getAdminSupportCannedResponsesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
6089
6397
  security: [{ scheme: "bearer", type: "http" }],
6090
6398
  url: "/admin/support/canned-responses/workspace/{workspace_id}",
@@ -6099,11 +6407,6 @@ var patchAdminSocialAccountsByIdDeactivate = (options) => (options.client ?? cli
6099
6407
  ...options.headers
6100
6408
  }
6101
6409
  });
6102
- var deleteAdminClinicalMealPlansById = (options) => (options.client ?? client).delete({
6103
- security: [{ scheme: "bearer", type: "http" }],
6104
- url: "/admin/clinical/meal-plans/{id}",
6105
- ...options
6106
- });
6107
6410
  var getAdminClinicalMealPlansById = (options) => (options.client ?? client).get({
6108
6411
  security: [{ scheme: "bearer", type: "http" }],
6109
6412
  url: "/admin/clinical/meal-plans/{id}",
@@ -6257,6 +6560,11 @@ var postAdminAgentsByIdValidate = (options) => (options.client ?? client).post({
6257
6560
  ...options.headers
6258
6561
  }
6259
6562
  });
6563
+ var getAdminClinicalHealthMetricsArchived = (options) => (options.client ?? client).get({
6564
+ security: [{ scheme: "bearer", type: "http" }],
6565
+ url: "/admin/clinical/health-metrics/archived",
6566
+ ...options
6567
+ });
6260
6568
  var getAdminClinicalMealPlans = (options) => (options.client ?? client).get({
6261
6569
  security: [{ scheme: "bearer", type: "http" }],
6262
6570
  url: "/admin/clinical/meal-plans",
@@ -6351,6 +6659,11 @@ var patchAdminInvitationsByIdDecline = (options) => (options.client ?? client).p
6351
6659
  ...options.headers
6352
6660
  }
6353
6661
  });
6662
+ var deleteAdminClinicalGoalTemplatesCatalogByIdPermanent = (options) => (options.client ?? client).delete({
6663
+ security: [{ scheme: "bearer", type: "http" }],
6664
+ url: "/admin/clinical/goal-templates/catalog/{id}/permanent",
6665
+ ...options
6666
+ });
6354
6667
  var postAdminEmailMarketingCampaignsByIdSend = (options) => (options.client ?? client).post({
6355
6668
  security: [{ scheme: "bearer", type: "http" }],
6356
6669
  url: "/admin/email-marketing/campaigns/{id}/send",
@@ -6434,11 +6747,6 @@ var patchAdminExtractionDocumentsByIdFinishUpload = (options) => (options.client
6434
6747
  ...options.headers
6435
6748
  }
6436
6749
  });
6437
- var deleteAdminClinicalPracticeToolsById = (options) => (options.client ?? client).delete({
6438
- security: [{ scheme: "bearer", type: "http" }],
6439
- url: "/admin/clinical/practice-tools/{id}",
6440
- ...options
6441
- });
6442
6750
  var getAdminClinicalPracticeToolsById = (options) => (options.client ?? client).get({
6443
6751
  security: [{ scheme: "bearer", type: "http" }],
6444
6752
  url: "/admin/clinical/practice-tools/{id}",
@@ -9505,7 +9813,7 @@ function createAuditNamespace(rb) {
9505
9813
  /**
9506
9814
  * List audit log entries with keyset or offset pagination.
9507
9815
  *
9508
- * Returns up to `limit` (default 50) entries sorted by `inserted_at` descending.
9816
+ * Returns up to `limit` (default 50) entries sorted by `created_at` descending.
9509
9817
  * The `actor_display_name` calculation is included automatically.
9510
9818
  *
9511
9819
  * @param params - Optional pagination and sort parameters.
@@ -9540,7 +9848,7 @@ function createAuditNamespace(rb) {
9540
9848
  * Fetch a paginated, time-sorted activity feed scoped to a tenant.
9541
9849
  *
9542
9850
  * Optionally filter by workspace, action type, actor, or date range.
9543
- * Results are sorted by `inserted_at` descending (most recent first).
9851
+ * Results are sorted by `created_at` descending (most recent first).
9544
9852
  *
9545
9853
  * @param params - Feed parameters. `tenantId` is required.
9546
9854
  * @param options - Optional request options.
@@ -9648,7 +9956,7 @@ function createAuditNamespace(rb) {
9648
9956
  `/admin/audit-logs/export`,
9649
9957
  {
9650
9958
  data: {
9651
- type: "audit_log",
9959
+ type: "audit-log",
9652
9960
  attributes: {
9653
9961
  format: params.format,
9654
9962
  tenant_id: params.tenantId,
@@ -11698,7 +12006,6 @@ function createSocialNamespace(rb) {
11698
12006
  path: { id },
11699
12007
  body: {
11700
12008
  data: {
11701
- type: "social_campaign",
11702
12009
  campaign_id: id,
11703
12010
  workspace_id: workspaceId
11704
12011
  }
@@ -11715,7 +12022,6 @@ function createSocialNamespace(rb) {
11715
12022
  path: { id },
11716
12023
  body: {
11717
12024
  data: {
11718
- type: "social_campaign",
11719
12025
  campaign_id: id,
11720
12026
  workspace_id: workspaceId,
11721
12027
  social_account_id: socialAccountId
@@ -11792,6 +12098,26 @@ function createSocialNamespace(rb) {
11792
12098
  options
11793
12099
  );
11794
12100
  },
12101
+ /**
12102
+ * List trending snapshots within a date range.
12103
+ * @param from - Start date (ISO 8601 string)
12104
+ * @param to - End date (ISO 8601 string)
12105
+ * @returns Array of TrendingSnapshot records in the range
12106
+ * @example
12107
+ * ```typescript
12108
+ * const snapshots = await admin.social.trending.listByDateRange(
12109
+ * '2026-03-01T00:00:00Z',
12110
+ * '2026-03-21T23:59:59Z',
12111
+ * );
12112
+ * ```
12113
+ */
12114
+ listByDateRange: async (from, to, options) => {
12115
+ return rb.execute(
12116
+ getAdminSocialTrendingHistoryRange,
12117
+ { query: { from, to } },
12118
+ options
12119
+ );
12120
+ },
11795
12121
  /** Trending snapshot items — individual content pieces within a snapshot. */
11796
12122
  items: {
11797
12123
  /** Get a single trending item by ID. */
@@ -16005,6 +16331,17 @@ function createRolesNamespace(rb) {
16005
16331
  const query = params ? `?${new URLSearchParams(params).toString()}` : "";
16006
16332
  return rb.rawGet(`/admin/roles${query}`);
16007
16333
  },
16334
+ /**
16335
+ * Get a single role by ID.
16336
+ *
16337
+ * @param id - Role UUID
16338
+ * @returns The role record
16339
+ * @example
16340
+ * const role = await admin.roles.get("role-uuid");
16341
+ */
16342
+ async get(id) {
16343
+ return rb.rawGet(`/admin/roles/${id}`);
16344
+ },
16008
16345
  /**
16009
16346
  * Create a new role with a set of permissions.
16010
16347
  *
@@ -16182,7 +16519,10 @@ function createThreadsNamespace(rb) {
16182
16519
  update: async (id, attributes, options) => {
16183
16520
  return rb.execute(
16184
16521
  patchAdminThreadsById,
16185
- { path: { id }, body: { data: { id, type: "thread", attributes } } },
16522
+ {
16523
+ path: { id },
16524
+ body: { data: { id, type: "chat-thread", attributes } }
16525
+ },
16186
16526
  options
16187
16527
  );
16188
16528
  },
@@ -16325,7 +16665,7 @@ function createThreadsNamespace(rb) {
16325
16665
  postAdminThreadsByIdExport,
16326
16666
  {
16327
16667
  path: { id },
16328
- body: { data: { type: "thread", format } }
16668
+ body: { data: { type: "chat-thread", format } }
16329
16669
  },
16330
16670
  options
16331
16671
  );
@@ -16346,7 +16686,7 @@ function createThreadsNamespace(rb) {
16346
16686
  complete: async (id, options) => {
16347
16687
  return rb.execute(
16348
16688
  postAdminThreadsByIdComplete,
16349
- { path: { id }, body: { data: { type: "thread" } } },
16689
+ { path: { id }, body: { data: { type: "chat-thread" } } },
16350
16690
  options
16351
16691
  );
16352
16692
  },
@@ -16534,17 +16874,76 @@ function createClinicalNamespace(rb) {
16534
16874
  options
16535
16875
  ),
16536
16876
  /**
16537
- * Delete a goal template.
16877
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
16878
+ */
16879
+ delete: async (id, options) => rb.execute(
16880
+ patchAdminClinicalGoalTemplatesByIdArchive,
16881
+ {
16882
+ path: { id },
16883
+ body: {
16884
+ data: { type: "clinical-goal-template", id, attributes: {} }
16885
+ }
16886
+ },
16887
+ options
16888
+ ),
16889
+ /**
16890
+ * Archive (soft-delete) a goal template.
16538
16891
  *
16539
16892
  * @param id - GoalTemplate UUID
16540
16893
  * @param options - Request options
16541
- * @returns `true` on successful deletion
16894
+ * @returns Archived {@link ClinicalGoalTemplate} record
16542
16895
  */
16543
- delete: async (id, options) => rb.executeDelete(
16544
- deleteAdminClinicalGoalTemplatesById,
16896
+ archive: async (id, options) => rb.execute(
16897
+ patchAdminClinicalGoalTemplatesByIdArchive,
16898
+ {
16899
+ path: { id },
16900
+ body: {
16901
+ data: { type: "clinical-goal-template", id, attributes: {} }
16902
+ }
16903
+ },
16904
+ options
16905
+ ),
16906
+ /**
16907
+ * Restore an archived goal template.
16908
+ *
16909
+ * @param id - GoalTemplate UUID
16910
+ * @param options - Request options
16911
+ * @returns Restored {@link ClinicalGoalTemplate} record
16912
+ */
16913
+ restore: async (id, options) => rb.execute(
16914
+ patchAdminClinicalGoalTemplatesByIdRestore,
16915
+ {
16916
+ path: { id },
16917
+ body: {
16918
+ data: { type: "clinical-goal-template", id, attributes: {} }
16919
+ }
16920
+ },
16921
+ options
16922
+ ),
16923
+ /**
16924
+ * Permanently delete a goal template. This action is irreversible.
16925
+ *
16926
+ * @param id - GoalTemplate UUID
16927
+ * @param options - Request options
16928
+ * @returns `true` on success
16929
+ */
16930
+ permanentDelete: async (id, options) => rb.executeDelete(
16931
+ deleteAdminClinicalGoalTemplatesByIdPermanent,
16545
16932
  { path: { id } },
16546
16933
  options
16547
16934
  ),
16935
+ /**
16936
+ * List archived goal templates in a workspace.
16937
+ *
16938
+ * @param params - Filter/pagination parameters
16939
+ * @param options - Request options
16940
+ * @returns Array of archived {@link ClinicalGoalTemplate} records
16941
+ */
16942
+ listArchived: async (params, options) => rb.execute(
16943
+ getAdminClinicalGoalTemplatesArchived,
16944
+ params ?? {},
16945
+ options
16946
+ ),
16548
16947
  /**
16549
16948
  * List application-level catalog goal templates.
16550
16949
  *
@@ -16598,17 +16997,76 @@ function createClinicalNamespace(rb) {
16598
16997
  options
16599
16998
  ),
16600
16999
  /**
16601
- * Delete a catalog goal template.
17000
+ * @deprecated Use `archiveCatalog()` instead. Now performs soft-delete, not permanent deletion.
17001
+ */
17002
+ deleteCatalog: async (id, options) => rb.execute(
17003
+ patchAdminClinicalGoalTemplatesCatalogByIdArchive,
17004
+ {
17005
+ path: { id },
17006
+ body: {
17007
+ data: { type: "clinical-goal-template", id, attributes: {} }
17008
+ }
17009
+ },
17010
+ options
17011
+ ),
17012
+ /**
17013
+ * Archive (soft-delete) a catalog goal template.
17014
+ *
17015
+ * @param id - GoalTemplate UUID
17016
+ * @param options - Request options
17017
+ * @returns Archived {@link ClinicalGoalTemplate} catalog record
17018
+ */
17019
+ archiveCatalog: async (id, options) => rb.execute(
17020
+ patchAdminClinicalGoalTemplatesCatalogByIdArchive,
17021
+ {
17022
+ path: { id },
17023
+ body: {
17024
+ data: { type: "clinical-goal-template", id, attributes: {} }
17025
+ }
17026
+ },
17027
+ options
17028
+ ),
17029
+ /**
17030
+ * Restore an archived catalog goal template.
17031
+ *
17032
+ * @param id - GoalTemplate UUID
17033
+ * @param options - Request options
17034
+ * @returns Restored {@link ClinicalGoalTemplate} catalog record
17035
+ */
17036
+ restoreCatalog: async (id, options) => rb.execute(
17037
+ patchAdminClinicalGoalTemplatesCatalogByIdRestore,
17038
+ {
17039
+ path: { id },
17040
+ body: {
17041
+ data: { type: "clinical-goal-template", id, attributes: {} }
17042
+ }
17043
+ },
17044
+ options
17045
+ ),
17046
+ /**
17047
+ * Permanently delete a catalog goal template. This action is irreversible.
16602
17048
  *
16603
17049
  * @param id - GoalTemplate UUID
16604
17050
  * @param options - Request options
16605
- * @returns `true` on successful deletion
17051
+ * @returns `true` on success
16606
17052
  */
16607
- deleteCatalog: async (id, options) => rb.executeDelete(
16608
- deleteAdminClinicalGoalTemplatesCatalogById,
17053
+ permanentDeleteCatalog: async (id, options) => rb.executeDelete(
17054
+ deleteAdminClinicalGoalTemplatesCatalogByIdPermanent,
16609
17055
  { path: { id } },
16610
17056
  options
16611
17057
  ),
17058
+ /**
17059
+ * List archived catalog goal templates.
17060
+ *
17061
+ * @param params - Filter/pagination parameters
17062
+ * @param options - Request options
17063
+ * @returns Array of archived {@link ClinicalGoalTemplate} catalog records
17064
+ */
17065
+ listArchivedCatalog: async (params, options) => rb.execute(
17066
+ getAdminClinicalGoalTemplatesCatalogArchived,
17067
+ params ?? {},
17068
+ options
17069
+ ),
16612
17070
  /**
16613
17071
  * List distinct catalog goal template categories with counts.
16614
17072
  *
@@ -16620,7 +17078,65 @@ function createClinicalNamespace(rb) {
16620
17078
  getAdminClinicalGoalTemplatesCategoriesCatalog,
16621
17079
  { query: params },
16622
17080
  options
16623
- )
17081
+ ),
17082
+ tags: {
17083
+ rename: async (workspaceId, oldTag, newTag, options) => rb.rawPatch(
17084
+ `/clinical/goal-templates/tags/rename`,
17085
+ { workspace_id: workspaceId, old_tag: oldTag, new_tag: newTag },
17086
+ options
17087
+ ),
17088
+ delete: async (workspaceId, tag, options) => rb.rawDelete(
17089
+ `/clinical/goal-templates/tags/${encodeURIComponent(tag)}?workspace_id=${encodeURIComponent(workspaceId)}`,
17090
+ options
17091
+ ),
17092
+ merge: async (workspaceId, sourceTags, targetTag, options) => rb.rawPost(
17093
+ `/clinical/goal-templates/tags/merge`,
17094
+ {
17095
+ workspace_id: workspaceId,
17096
+ source_tags: sourceTags,
17097
+ target_tag: targetTag
17098
+ },
17099
+ options
17100
+ )
17101
+ },
17102
+ imports: {
17103
+ fromFile: async (workspaceId, file, options) => {
17104
+ const formData = new FormData();
17105
+ formData.append("file", file);
17106
+ formData.append("workspace_id", workspaceId);
17107
+ return rb.rawPostMultipart(
17108
+ `/clinical/goal-templates/imports/file`,
17109
+ formData,
17110
+ options
17111
+ );
17112
+ },
17113
+ fromUrl: async (workspaceId, url, options) => rb.rawPost(
17114
+ `/clinical/goal-templates/imports/url`,
17115
+ { workspace_id: workspaceId, url },
17116
+ options
17117
+ )
17118
+ },
17119
+ duplicates: {
17120
+ getStats: async (workspaceId, options) => rb.rawGet(
17121
+ `/clinical/goal-templates/duplicates?workspace_id=${encodeURIComponent(workspaceId)}`,
17122
+ options
17123
+ ),
17124
+ listGroups: async (workspaceId, opts, options) => {
17125
+ const qs = new URLSearchParams({ workspace_id: workspaceId });
17126
+ if (opts?.threshold !== void 0)
17127
+ qs.set("threshold", String(opts.threshold));
17128
+ if (opts?.limit !== void 0) qs.set("limit", String(opts.limit));
17129
+ return rb.rawGet(
17130
+ `/clinical/goal-templates/duplicates/groups?${qs.toString()}`,
17131
+ options
17132
+ );
17133
+ },
17134
+ resolve: async (workspaceId, groupId, keepId, options) => rb.rawPost(
17135
+ `/clinical/goal-templates/duplicates/resolve`,
17136
+ { workspace_id: workspaceId, group_id: groupId, keep_id: keepId },
17137
+ options
17138
+ )
17139
+ }
16624
17140
  },
16625
17141
  /**
16626
17142
  * Manage practice-level tools (apps, wearables, platforms).
@@ -16679,17 +17195,76 @@ function createClinicalNamespace(rb) {
16679
17195
  options
16680
17196
  ),
16681
17197
  /**
16682
- * Delete a practice tool.
17198
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
17199
+ */
17200
+ delete: async (id, options) => rb.execute(
17201
+ patchAdminClinicalPracticeToolsByIdArchive,
17202
+ {
17203
+ path: { id },
17204
+ body: {
17205
+ data: { type: "clinical-practice-tool", id, attributes: {} }
17206
+ }
17207
+ },
17208
+ options
17209
+ ),
17210
+ /**
17211
+ * Archive (soft-delete) a practice tool.
16683
17212
  *
16684
17213
  * @param id - PracticeTool UUID
16685
17214
  * @param options - Request options
16686
- * @returns `true` on successful deletion
17215
+ * @returns Archived {@link ClinicalPracticeTool} record
16687
17216
  */
16688
- delete: async (id, options) => rb.executeDelete(
16689
- deleteAdminClinicalPracticeToolsById,
17217
+ archive: async (id, options) => rb.execute(
17218
+ patchAdminClinicalPracticeToolsByIdArchive,
17219
+ {
17220
+ path: { id },
17221
+ body: {
17222
+ data: { type: "clinical-practice-tool", id, attributes: {} }
17223
+ }
17224
+ },
17225
+ options
17226
+ ),
17227
+ /**
17228
+ * Restore an archived practice tool.
17229
+ *
17230
+ * @param id - PracticeTool UUID
17231
+ * @param options - Request options
17232
+ * @returns Restored {@link ClinicalPracticeTool} record
17233
+ */
17234
+ restore: async (id, options) => rb.execute(
17235
+ patchAdminClinicalPracticeToolsByIdRestore,
17236
+ {
17237
+ path: { id },
17238
+ body: {
17239
+ data: { type: "clinical-practice-tool", id, attributes: {} }
17240
+ }
17241
+ },
17242
+ options
17243
+ ),
17244
+ /**
17245
+ * Permanently delete a practice tool. This action is irreversible.
17246
+ *
17247
+ * @param id - PracticeTool UUID
17248
+ * @param options - Request options
17249
+ * @returns `true` on success
17250
+ */
17251
+ permanentDelete: async (id, options) => rb.executeDelete(
17252
+ deleteAdminClinicalPracticeToolsByIdPermanent,
16690
17253
  { path: { id } },
16691
17254
  options
16692
17255
  ),
17256
+ /**
17257
+ * List archived practice tools in a workspace.
17258
+ *
17259
+ * @param params - Filter/pagination parameters
17260
+ * @param options - Request options
17261
+ * @returns Array of archived {@link ClinicalPracticeTool} records
17262
+ */
17263
+ listArchived: async (params, options) => rb.execute(
17264
+ getAdminClinicalPracticeToolsArchived,
17265
+ params ?? {},
17266
+ options
17267
+ ),
16693
17268
  /**
16694
17269
  * List application-level catalog practice tools.
16695
17270
  *
@@ -16743,67 +17318,184 @@ function createClinicalNamespace(rb) {
16743
17318
  options
16744
17319
  ),
16745
17320
  /**
16746
- * Delete a catalog practice tool.
16747
- *
16748
- * @param id - PracticeTool UUID
16749
- * @param options - Request options
16750
- * @returns `true` on successful deletion
17321
+ * @deprecated Use `archiveCatalog()` instead. Now performs soft-delete, not permanent deletion.
16751
17322
  */
16752
- deleteCatalog: async (id, options) => rb.executeDelete(
16753
- deleteAdminClinicalPracticeToolsCatalogById,
16754
- { path: { id } },
17323
+ deleteCatalog: async (id, options) => rb.execute(
17324
+ patchAdminClinicalPracticeToolsCatalogByIdArchive,
17325
+ {
17326
+ path: { id },
17327
+ body: {
17328
+ data: { type: "clinical-practice-tool", id, attributes: {} }
17329
+ }
17330
+ },
16755
17331
  options
16756
17332
  ),
16757
17333
  /**
16758
- * List distinct catalog practice tool categories with counts.
17334
+ * Archive (soft-delete) a catalog practice tool.
16759
17335
  *
16760
- * @param params - Must include `application_id`
17336
+ * @param id - PracticeTool UUID
16761
17337
  * @param options - Request options
16762
- * @returns Array of category records
17338
+ * @returns Archived {@link ClinicalPracticeTool} catalog record
16763
17339
  */
16764
- listCatalogCategories: async (params, options) => rb.execute(
16765
- getAdminClinicalPracticeToolsCategoriesCatalog,
16766
- { query: params },
17340
+ archiveCatalog: async (id, options) => rb.execute(
17341
+ patchAdminClinicalPracticeToolsCatalogByIdArchive,
17342
+ {
17343
+ path: { id },
17344
+ body: {
17345
+ data: { type: "clinical-practice-tool", id, attributes: {} }
17346
+ }
17347
+ },
16767
17348
  options
16768
- )
16769
- },
16770
- /**
16771
- * Manage practice-level educational resources.
16772
- */
16773
- practiceResources: {
17349
+ ),
16774
17350
  /**
16775
- * List practice resources in a workspace.
17351
+ * Restore an archived catalog practice tool.
16776
17352
  *
16777
- * @param params - Filter/pagination parameters
17353
+ * @param id - PracticeTool UUID
16778
17354
  * @param options - Request options
16779
- * @returns Array of {@link ClinicalPracticeResource} records
17355
+ * @returns Restored {@link ClinicalPracticeTool} catalog record
16780
17356
  */
16781
- list: async (params, options) => rb.execute(
16782
- getAdminClinicalPracticeResources,
16783
- { query: params },
17357
+ restoreCatalog: async (id, options) => rb.execute(
17358
+ patchAdminClinicalPracticeToolsCatalogByIdRestore,
17359
+ {
17360
+ path: { id },
17361
+ body: {
17362
+ data: { type: "clinical-practice-tool", id, attributes: {} }
17363
+ }
17364
+ },
16784
17365
  options
16785
17366
  ),
16786
17367
  /**
16787
- * Get a single practice resource by ID.
17368
+ * Permanently delete a catalog practice tool. This action is irreversible.
16788
17369
  *
16789
- * @param id - PracticeResource UUID
17370
+ * @param id - PracticeTool UUID
16790
17371
  * @param options - Request options
16791
- * @returns {@link ClinicalPracticeResource} record
17372
+ * @returns `true` on success
16792
17373
  */
16793
- get: async (id, options) => rb.execute(
16794
- getAdminClinicalPracticeResourcesById,
17374
+ permanentDeleteCatalog: async (id, options) => rb.executeDelete(
17375
+ deleteAdminClinicalPracticeToolsCatalogByIdPermanent,
16795
17376
  { path: { id } },
16796
17377
  options
16797
17378
  ),
16798
17379
  /**
16799
- * Create a new practice resource.
17380
+ * List archived catalog practice tools.
16800
17381
  *
16801
- * @param attributes - Must include `workspace_id` and `title`
17382
+ * @param params - Filter/pagination parameters
16802
17383
  * @param options - Request options
16803
- * @returns Created {@link ClinicalPracticeResource} record
17384
+ * @returns Array of archived {@link ClinicalPracticeTool} catalog records
16804
17385
  */
16805
- create: async (attributes, options) => rb.execute(
16806
- postAdminClinicalPracticeResources,
17386
+ listArchivedCatalog: async (params, options) => rb.execute(
17387
+ getAdminClinicalPracticeToolsCatalogArchived,
17388
+ params ?? {},
17389
+ options
17390
+ ),
17391
+ /**
17392
+ * List distinct catalog practice tool categories with counts.
17393
+ *
17394
+ * @param params - Must include `application_id`
17395
+ * @param options - Request options
17396
+ * @returns Array of category records
17397
+ */
17398
+ listCatalogCategories: async (params, options) => rb.execute(
17399
+ getAdminClinicalPracticeToolsCategoriesCatalog,
17400
+ { query: params },
17401
+ options
17402
+ ),
17403
+ tags: {
17404
+ rename: async (workspaceId, oldTag, newTag, options) => rb.rawPatch(
17405
+ `/clinical/practice-tools/tags/rename`,
17406
+ { workspace_id: workspaceId, old_tag: oldTag, new_tag: newTag },
17407
+ options
17408
+ ),
17409
+ delete: async (workspaceId, tag, options) => rb.rawDelete(
17410
+ `/clinical/practice-tools/tags/${encodeURIComponent(tag)}?workspace_id=${encodeURIComponent(workspaceId)}`,
17411
+ options
17412
+ ),
17413
+ merge: async (workspaceId, sourceTags, targetTag, options) => rb.rawPost(
17414
+ `/clinical/practice-tools/tags/merge`,
17415
+ {
17416
+ workspace_id: workspaceId,
17417
+ source_tags: sourceTags,
17418
+ target_tag: targetTag
17419
+ },
17420
+ options
17421
+ )
17422
+ },
17423
+ imports: {
17424
+ fromFile: async (workspaceId, file, options) => {
17425
+ const formData = new FormData();
17426
+ formData.append("file", file);
17427
+ formData.append("workspace_id", workspaceId);
17428
+ return rb.rawPostMultipart(
17429
+ `/clinical/practice-tools/imports/file`,
17430
+ formData,
17431
+ options
17432
+ );
17433
+ },
17434
+ fromUrl: async (workspaceId, url, options) => rb.rawPost(
17435
+ `/clinical/practice-tools/imports/url`,
17436
+ { workspace_id: workspaceId, url },
17437
+ options
17438
+ )
17439
+ },
17440
+ duplicates: {
17441
+ getStats: async (workspaceId, options) => rb.rawGet(
17442
+ `/clinical/practice-tools/duplicates?workspace_id=${encodeURIComponent(workspaceId)}`,
17443
+ options
17444
+ ),
17445
+ listGroups: async (workspaceId, opts, options) => {
17446
+ const qs = new URLSearchParams({ workspace_id: workspaceId });
17447
+ if (opts?.threshold !== void 0)
17448
+ qs.set("threshold", String(opts.threshold));
17449
+ if (opts?.limit !== void 0) qs.set("limit", String(opts.limit));
17450
+ return rb.rawGet(
17451
+ `/clinical/practice-tools/duplicates/groups?${qs.toString()}`,
17452
+ options
17453
+ );
17454
+ },
17455
+ resolve: async (workspaceId, groupId, keepId, options) => rb.rawPost(
17456
+ `/clinical/practice-tools/duplicates/resolve`,
17457
+ { workspace_id: workspaceId, group_id: groupId, keep_id: keepId },
17458
+ options
17459
+ )
17460
+ }
17461
+ },
17462
+ /**
17463
+ * Manage practice-level educational resources.
17464
+ */
17465
+ practiceResources: {
17466
+ /**
17467
+ * List practice resources in a workspace.
17468
+ *
17469
+ * @param params - Filter/pagination parameters
17470
+ * @param options - Request options
17471
+ * @returns Array of {@link ClinicalPracticeResource} records
17472
+ */
17473
+ list: async (params, options) => rb.execute(
17474
+ getAdminClinicalPracticeResources,
17475
+ { query: params },
17476
+ options
17477
+ ),
17478
+ /**
17479
+ * Get a single practice resource by ID.
17480
+ *
17481
+ * @param id - PracticeResource UUID
17482
+ * @param options - Request options
17483
+ * @returns {@link ClinicalPracticeResource} record
17484
+ */
17485
+ get: async (id, options) => rb.execute(
17486
+ getAdminClinicalPracticeResourcesById,
17487
+ { path: { id } },
17488
+ options
17489
+ ),
17490
+ /**
17491
+ * Create a new practice resource.
17492
+ *
17493
+ * @param attributes - Must include `workspace_id` and `title`
17494
+ * @param options - Request options
17495
+ * @returns Created {@link ClinicalPracticeResource} record
17496
+ */
17497
+ create: async (attributes, options) => rb.execute(
17498
+ postAdminClinicalPracticeResources,
16807
17499
  {
16808
17500
  body: { data: { type: "clinical-practice-resource", attributes } }
16809
17501
  },
@@ -16828,17 +17520,76 @@ function createClinicalNamespace(rb) {
16828
17520
  options
16829
17521
  ),
16830
17522
  /**
16831
- * Delete a practice resource.
17523
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
17524
+ */
17525
+ delete: async (id, options) => rb.execute(
17526
+ patchAdminClinicalPracticeResourcesByIdArchive,
17527
+ {
17528
+ path: { id },
17529
+ body: {
17530
+ data: { type: "clinical-practice-resource", id, attributes: {} }
17531
+ }
17532
+ },
17533
+ options
17534
+ ),
17535
+ /**
17536
+ * Archive (soft-delete) a practice resource.
16832
17537
  *
16833
17538
  * @param id - PracticeResource UUID
16834
17539
  * @param options - Request options
16835
- * @returns `true` on successful deletion
17540
+ * @returns Archived {@link ClinicalPracticeResource} record
16836
17541
  */
16837
- delete: async (id, options) => rb.executeDelete(
16838
- deleteAdminClinicalPracticeResourcesById,
17542
+ archive: async (id, options) => rb.execute(
17543
+ patchAdminClinicalPracticeResourcesByIdArchive,
17544
+ {
17545
+ path: { id },
17546
+ body: {
17547
+ data: { type: "clinical-practice-resource", id, attributes: {} }
17548
+ }
17549
+ },
17550
+ options
17551
+ ),
17552
+ /**
17553
+ * Restore an archived practice resource.
17554
+ *
17555
+ * @param id - PracticeResource UUID
17556
+ * @param options - Request options
17557
+ * @returns Restored {@link ClinicalPracticeResource} record
17558
+ */
17559
+ restore: async (id, options) => rb.execute(
17560
+ patchAdminClinicalPracticeResourcesByIdRestore,
17561
+ {
17562
+ path: { id },
17563
+ body: {
17564
+ data: { type: "clinical-practice-resource", id, attributes: {} }
17565
+ }
17566
+ },
17567
+ options
17568
+ ),
17569
+ /**
17570
+ * Permanently delete a practice resource. This action is irreversible.
17571
+ *
17572
+ * @param id - PracticeResource UUID
17573
+ * @param options - Request options
17574
+ * @returns `true` on success
17575
+ */
17576
+ permanentDelete: async (id, options) => rb.executeDelete(
17577
+ deleteAdminClinicalPracticeResourcesByIdPermanent,
16839
17578
  { path: { id } },
16840
17579
  options
16841
17580
  ),
17581
+ /**
17582
+ * List archived practice resources in a workspace.
17583
+ *
17584
+ * @param params - Filter/pagination parameters
17585
+ * @param options - Request options
17586
+ * @returns Array of archived {@link ClinicalPracticeResource} records
17587
+ */
17588
+ listArchived: async (params, options) => rb.execute(
17589
+ getAdminClinicalPracticeResourcesArchived,
17590
+ params ?? {},
17591
+ options
17592
+ ),
16842
17593
  /**
16843
17594
  * List application-level catalog practice resources.
16844
17595
  *
@@ -16896,17 +17647,76 @@ function createClinicalNamespace(rb) {
16896
17647
  options
16897
17648
  ),
16898
17649
  /**
16899
- * Delete a catalog practice resource.
17650
+ * @deprecated Use `archiveCatalog()` instead. Now performs soft-delete, not permanent deletion.
17651
+ */
17652
+ deleteCatalog: async (id, options) => rb.execute(
17653
+ patchAdminClinicalPracticeResourcesCatalogByIdArchive,
17654
+ {
17655
+ path: { id },
17656
+ body: {
17657
+ data: { type: "clinical-practice-resource", id, attributes: {} }
17658
+ }
17659
+ },
17660
+ options
17661
+ ),
17662
+ /**
17663
+ * Archive (soft-delete) a catalog practice resource.
17664
+ *
17665
+ * @param id - PracticeResource UUID
17666
+ * @param options - Request options
17667
+ * @returns Archived {@link ClinicalPracticeResource} catalog record
17668
+ */
17669
+ archiveCatalog: async (id, options) => rb.execute(
17670
+ patchAdminClinicalPracticeResourcesCatalogByIdArchive,
17671
+ {
17672
+ path: { id },
17673
+ body: {
17674
+ data: { type: "clinical-practice-resource", id, attributes: {} }
17675
+ }
17676
+ },
17677
+ options
17678
+ ),
17679
+ /**
17680
+ * Restore an archived catalog practice resource.
16900
17681
  *
16901
17682
  * @param id - PracticeResource UUID
16902
17683
  * @param options - Request options
16903
- * @returns `true` on successful deletion
17684
+ * @returns Restored {@link ClinicalPracticeResource} catalog record
16904
17685
  */
16905
- deleteCatalog: async (id, options) => rb.executeDelete(
16906
- deleteAdminClinicalPracticeResourcesCatalogById,
17686
+ restoreCatalog: async (id, options) => rb.execute(
17687
+ patchAdminClinicalPracticeResourcesCatalogByIdRestore,
17688
+ {
17689
+ path: { id },
17690
+ body: {
17691
+ data: { type: "clinical-practice-resource", id, attributes: {} }
17692
+ }
17693
+ },
17694
+ options
17695
+ ),
17696
+ /**
17697
+ * Permanently delete a catalog practice resource. This action is irreversible.
17698
+ *
17699
+ * @param id - PracticeResource UUID
17700
+ * @param options - Request options
17701
+ * @returns `true` on success
17702
+ */
17703
+ permanentDeleteCatalog: async (id, options) => rb.executeDelete(
17704
+ deleteAdminClinicalPracticeResourcesCatalogByIdPermanent,
16907
17705
  { path: { id } },
16908
17706
  options
16909
17707
  ),
17708
+ /**
17709
+ * List archived catalog practice resources.
17710
+ *
17711
+ * @param params - Filter/pagination parameters
17712
+ * @param options - Request options
17713
+ * @returns Array of archived {@link ClinicalPracticeResource} catalog records
17714
+ */
17715
+ listArchivedCatalog: async (params, options) => rb.execute(
17716
+ getAdminClinicalPracticeResourcesCatalogArchived,
17717
+ params ?? {},
17718
+ options
17719
+ ),
16910
17720
  /**
16911
17721
  * List distinct practice resource categories in a workspace.
16912
17722
  *
@@ -16944,7 +17754,65 @@ function createClinicalNamespace(rb) {
16944
17754
  getAdminClinicalPracticeResourcesCategoriesCatalog,
16945
17755
  { query: params },
16946
17756
  options
16947
- )
17757
+ ),
17758
+ tags: {
17759
+ rename: async (workspaceId, oldTag, newTag, options) => rb.rawPatch(
17760
+ `/clinical/practice-resources/tags/rename`,
17761
+ { workspace_id: workspaceId, old_tag: oldTag, new_tag: newTag },
17762
+ options
17763
+ ),
17764
+ delete: async (workspaceId, tag, options) => rb.rawDelete(
17765
+ `/clinical/practice-resources/tags/${encodeURIComponent(tag)}?workspace_id=${encodeURIComponent(workspaceId)}`,
17766
+ options
17767
+ ),
17768
+ merge: async (workspaceId, sourceTags, targetTag, options) => rb.rawPost(
17769
+ `/clinical/practice-resources/tags/merge`,
17770
+ {
17771
+ workspace_id: workspaceId,
17772
+ source_tags: sourceTags,
17773
+ target_tag: targetTag
17774
+ },
17775
+ options
17776
+ )
17777
+ },
17778
+ imports: {
17779
+ fromFile: async (workspaceId, file, options) => {
17780
+ const formData = new FormData();
17781
+ formData.append("file", file);
17782
+ formData.append("workspace_id", workspaceId);
17783
+ return rb.rawPostMultipart(
17784
+ `/clinical/practice-resources/imports/file`,
17785
+ formData,
17786
+ options
17787
+ );
17788
+ },
17789
+ fromUrl: async (workspaceId, url, options) => rb.rawPost(
17790
+ `/clinical/practice-resources/imports/url`,
17791
+ { workspace_id: workspaceId, url },
17792
+ options
17793
+ )
17794
+ },
17795
+ duplicates: {
17796
+ getStats: async (workspaceId, options) => rb.rawGet(
17797
+ `/clinical/practice-resources/duplicates?workspace_id=${encodeURIComponent(workspaceId)}`,
17798
+ options
17799
+ ),
17800
+ listGroups: async (workspaceId, opts, options) => {
17801
+ const qs = new URLSearchParams({ workspace_id: workspaceId });
17802
+ if (opts?.threshold !== void 0)
17803
+ qs.set("threshold", String(opts.threshold));
17804
+ if (opts?.limit !== void 0) qs.set("limit", String(opts.limit));
17805
+ return rb.rawGet(
17806
+ `/clinical/practice-resources/duplicates/groups?${qs.toString()}`,
17807
+ options
17808
+ );
17809
+ },
17810
+ resolve: async (workspaceId, groupId, keepId, options) => rb.rawPost(
17811
+ `/clinical/practice-resources/duplicates/resolve`,
17812
+ { workspace_id: workspaceId, group_id: groupId, keep_id: keepId },
17813
+ options
17814
+ )
17815
+ }
16948
17816
  },
16949
17817
  // ─── New sub-namespaces (10 missing from finalize-domain audit) ───────────
16950
17818
  /** Manage clinical patient records. */
@@ -17090,30 +17958,118 @@ function createClinicalNamespace(rb) {
17090
17958
  },
17091
17959
  options
17092
17960
  ),
17093
- /** Delete a note. */
17094
- delete: async (id, options) => rb.executeDelete(
17095
- deleteAdminClinicalNotesById,
17961
+ /**
17962
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
17963
+ */
17964
+ delete: async (id, options) => rb.execute(
17965
+ patchAdminClinicalNotesByIdArchive,
17966
+ {
17967
+ path: { id },
17968
+ body: { data: { type: "clinical-note", id, attributes: {} } }
17969
+ },
17970
+ options
17971
+ ),
17972
+ /**
17973
+ * Archive (soft-delete) a note.
17974
+ *
17975
+ * @param id - Note UUID
17976
+ * @param options - Request options
17977
+ * @returns Archived {@link ClinicalNote} record
17978
+ */
17979
+ archive: async (id, options) => rb.execute(
17980
+ patchAdminClinicalNotesByIdArchive,
17981
+ {
17982
+ path: { id },
17983
+ body: { data: { type: "clinical-note", id, attributes: {} } }
17984
+ },
17985
+ options
17986
+ ),
17987
+ /**
17988
+ * Restore an archived note.
17989
+ *
17990
+ * @param id - Note UUID
17991
+ * @param options - Request options
17992
+ * @returns Restored {@link ClinicalNote} record
17993
+ */
17994
+ restore: async (id, options) => rb.execute(
17995
+ patchAdminClinicalNotesByIdRestore,
17996
+ {
17997
+ path: { id },
17998
+ body: { data: { type: "clinical-note", id, attributes: {} } }
17999
+ },
18000
+ options
18001
+ ),
18002
+ /**
18003
+ * Permanently delete a note. This action is irreversible.
18004
+ *
18005
+ * @param id - Note UUID
18006
+ * @param options - Request options
18007
+ * @returns `true` on success
18008
+ */
18009
+ permanentDelete: async (id, options) => rb.executeDelete(
18010
+ deleteAdminClinicalNotesByIdPermanent,
17096
18011
  { path: { id } },
17097
18012
  options
17098
18013
  ),
17099
- /** Approve a note (creates immutable version). */
17100
- approve: async (id, attributes, options) => rb.execute(
18014
+ /**
18015
+ * List archived notes in a workspace.
18016
+ *
18017
+ * @param params - Filter/pagination parameters
18018
+ * @param options - Request options
18019
+ * @returns Array of archived {@link ClinicalNote} records
18020
+ */
18021
+ listArchived: async (params, options) => rb.execute(
18022
+ getAdminClinicalNotesArchived,
18023
+ params ?? {},
18024
+ options
18025
+ ),
18026
+ /**
18027
+ * Approve a clinical note (HITL workflow).
18028
+ *
18029
+ * Marks the note as clinician-reviewed and approved, transitioning it
18030
+ * to `status: "approved"`. Only notes in `draft` status can be approved.
18031
+ * Creates an immutable NoteVersion snapshot.
18032
+ *
18033
+ * @param id - Note UUID
18034
+ * @param reviewedById - UUID of the reviewer (required)
18035
+ * @param options - Request options
18036
+ * @returns Updated {@link ClinicalNote} record
18037
+ */
18038
+ approve: async (id, reviewedById, options) => rb.execute(
17101
18039
  patchAdminClinicalNotesByIdApprove,
17102
18040
  {
17103
18041
  path: { id },
17104
18042
  body: {
17105
- data: { type: "clinical-note", id, attributes: attributes ?? {} }
18043
+ data: {
18044
+ type: "clinical-note",
18045
+ id,
18046
+ attributes: { reviewed_by_id: reviewedById }
18047
+ }
17106
18048
  }
17107
18049
  },
17108
18050
  options
17109
18051
  ),
17110
- /** Reject a note. */
17111
- reject: async (id, attributes, options) => rb.execute(
18052
+ /**
18053
+ * Reject a clinical note (HITL workflow).
18054
+ *
18055
+ * Marks the note as rejected, transitioning it to `status: "rejected"`.
18056
+ * Only notes in `draft` status can be rejected.
18057
+ *
18058
+ * @param id - Note UUID
18059
+ * @param reviewedById - UUID of the reviewer (required)
18060
+ * @param options - Request options
18061
+ * @returns Updated {@link ClinicalNote} record
18062
+ */
18063
+ reject: async (id, reviewedById, options) => rb.execute(
17112
18064
  patchAdminClinicalNotesByIdReject,
17113
18065
  {
17114
18066
  path: { id },
17115
18067
  body: {
17116
- data: { type: "clinical-note", id, attributes: attributes ?? {} }
18068
+ data: {
18069
+ type: "clinical-note",
18070
+ id,
18071
+ attributes: { reviewed_by_id: reviewedById }
18072
+ }
17117
18073
  }
17118
18074
  },
17119
18075
  options
@@ -17166,11 +18122,76 @@ function createClinicalNamespace(rb) {
17166
18122
  },
17167
18123
  options
17168
18124
  ),
17169
- /** Delete a health metric. */
17170
- delete: async (id, options) => rb.executeDelete(
17171
- deleteAdminClinicalHealthMetricsById,
18125
+ /**
18126
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
18127
+ */
18128
+ delete: async (id, options) => rb.execute(
18129
+ patchAdminClinicalHealthMetricsByIdArchive,
18130
+ {
18131
+ path: { id },
18132
+ body: {
18133
+ data: { type: "clinical-health-metric", id, attributes: {} }
18134
+ }
18135
+ },
18136
+ options
18137
+ ),
18138
+ /**
18139
+ * Archive (soft-delete) a health metric.
18140
+ *
18141
+ * @param id - HealthMetric UUID
18142
+ * @param options - Request options
18143
+ * @returns Archived {@link ClinicalHealthMetric} record
18144
+ */
18145
+ archive: async (id, options) => rb.execute(
18146
+ patchAdminClinicalHealthMetricsByIdArchive,
18147
+ {
18148
+ path: { id },
18149
+ body: {
18150
+ data: { type: "clinical-health-metric", id, attributes: {} }
18151
+ }
18152
+ },
18153
+ options
18154
+ ),
18155
+ /**
18156
+ * Restore an archived health metric.
18157
+ *
18158
+ * @param id - HealthMetric UUID
18159
+ * @param options - Request options
18160
+ * @returns Restored {@link ClinicalHealthMetric} record
18161
+ */
18162
+ restore: async (id, options) => rb.execute(
18163
+ patchAdminClinicalHealthMetricsByIdRestore,
18164
+ {
18165
+ path: { id },
18166
+ body: {
18167
+ data: { type: "clinical-health-metric", id, attributes: {} }
18168
+ }
18169
+ },
18170
+ options
18171
+ ),
18172
+ /**
18173
+ * Permanently delete a health metric. This action is irreversible.
18174
+ *
18175
+ * @param id - HealthMetric UUID
18176
+ * @param options - Request options
18177
+ * @returns `true` on success
18178
+ */
18179
+ permanentDelete: async (id, options) => rb.executeDelete(
18180
+ deleteAdminClinicalHealthMetricsByIdPermanent,
17172
18181
  { path: { id } },
17173
18182
  options
18183
+ ),
18184
+ /**
18185
+ * List archived health metrics in a workspace.
18186
+ *
18187
+ * @param params - Filter/pagination parameters
18188
+ * @param options - Request options
18189
+ * @returns Array of archived {@link ClinicalHealthMetric} records
18190
+ */
18191
+ listArchived: async (params, options) => rb.execute(
18192
+ getAdminClinicalHealthMetricsArchived,
18193
+ params ?? {},
18194
+ options
17174
18195
  )
17175
18196
  },
17176
18197
  /** Manage clinical meal plans. */
@@ -17208,11 +18229,70 @@ function createClinicalNamespace(rb) {
17208
18229
  },
17209
18230
  options
17210
18231
  ),
17211
- /** Delete a meal plan. */
17212
- delete: async (id, options) => rb.executeDelete(
17213
- deleteAdminClinicalMealPlansById,
18232
+ /**
18233
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
18234
+ */
18235
+ delete: async (id, options) => rb.execute(
18236
+ patchAdminClinicalMealPlansByIdArchive,
18237
+ {
18238
+ path: { id },
18239
+ body: { data: { type: "clinical-meal-plan", id, attributes: {} } }
18240
+ },
18241
+ options
18242
+ ),
18243
+ /**
18244
+ * Archive (soft-delete) a meal plan.
18245
+ *
18246
+ * @param id - MealPlan UUID
18247
+ * @param options - Request options
18248
+ * @returns Archived {@link ClinicalMealPlan} record
18249
+ */
18250
+ archive: async (id, options) => rb.execute(
18251
+ patchAdminClinicalMealPlansByIdArchive,
18252
+ {
18253
+ path: { id },
18254
+ body: { data: { type: "clinical-meal-plan", id, attributes: {} } }
18255
+ },
18256
+ options
18257
+ ),
18258
+ /**
18259
+ * Restore an archived meal plan.
18260
+ *
18261
+ * @param id - MealPlan UUID
18262
+ * @param options - Request options
18263
+ * @returns Restored {@link ClinicalMealPlan} record
18264
+ */
18265
+ restore: async (id, options) => rb.execute(
18266
+ patchAdminClinicalMealPlansByIdRestore,
18267
+ {
18268
+ path: { id },
18269
+ body: { data: { type: "clinical-meal-plan", id, attributes: {} } }
18270
+ },
18271
+ options
18272
+ ),
18273
+ /**
18274
+ * Permanently delete a meal plan. This action is irreversible.
18275
+ *
18276
+ * @param id - MealPlan UUID
18277
+ * @param options - Request options
18278
+ * @returns `true` on success
18279
+ */
18280
+ permanentDelete: async (id, options) => rb.executeDelete(
18281
+ deleteAdminClinicalMealPlansByIdPermanent,
17214
18282
  { path: { id } },
17215
18283
  options
18284
+ ),
18285
+ /**
18286
+ * List archived meal plans in a workspace.
18287
+ *
18288
+ * @param params - Filter/pagination parameters
18289
+ * @param options - Request options
18290
+ * @returns Array of archived {@link ClinicalMealPlan} records
18291
+ */
18292
+ listArchived: async (params, options) => rb.execute(
18293
+ getAdminClinicalMealPlansArchived,
18294
+ params ?? {},
18295
+ options
17216
18296
  )
17217
18297
  },
17218
18298
  /** Manage patient clinical goals. */
@@ -17250,11 +18330,76 @@ function createClinicalNamespace(rb) {
17250
18330
  },
17251
18331
  options
17252
18332
  ),
17253
- /** Delete a client goal. */
17254
- delete: async (id, options) => rb.executeDelete(
17255
- deleteAdminClinicalClientGoalsById,
18333
+ /**
18334
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
18335
+ */
18336
+ delete: async (id, options) => rb.execute(
18337
+ patchAdminClinicalClientGoalsByIdArchive,
18338
+ {
18339
+ path: { id },
18340
+ body: {
18341
+ data: { type: "clinical-client-goal", id, attributes: {} }
18342
+ }
18343
+ },
18344
+ options
18345
+ ),
18346
+ /**
18347
+ * Archive (soft-delete) a client goal.
18348
+ *
18349
+ * @param id - ClientGoal UUID
18350
+ * @param options - Request options
18351
+ * @returns Archived {@link ClinicalClientGoal} record
18352
+ */
18353
+ archive: async (id, options) => rb.execute(
18354
+ patchAdminClinicalClientGoalsByIdArchive,
18355
+ {
18356
+ path: { id },
18357
+ body: {
18358
+ data: { type: "clinical-client-goal", id, attributes: {} }
18359
+ }
18360
+ },
18361
+ options
18362
+ ),
18363
+ /**
18364
+ * Restore an archived client goal.
18365
+ *
18366
+ * @param id - ClientGoal UUID
18367
+ * @param options - Request options
18368
+ * @returns Restored {@link ClinicalClientGoal} record
18369
+ */
18370
+ restore: async (id, options) => rb.execute(
18371
+ patchAdminClinicalClientGoalsByIdRestore,
18372
+ {
18373
+ path: { id },
18374
+ body: {
18375
+ data: { type: "clinical-client-goal", id, attributes: {} }
18376
+ }
18377
+ },
18378
+ options
18379
+ ),
18380
+ /**
18381
+ * Permanently delete a client goal. This action is irreversible.
18382
+ *
18383
+ * @param id - ClientGoal UUID
18384
+ * @param options - Request options
18385
+ * @returns `true` on success
18386
+ */
18387
+ permanentDelete: async (id, options) => rb.executeDelete(
18388
+ deleteAdminClinicalClientGoalsByIdPermanent,
17256
18389
  { path: { id } },
17257
18390
  options
18391
+ ),
18392
+ /**
18393
+ * List archived client goals in a workspace.
18394
+ *
18395
+ * @param params - Filter/pagination parameters
18396
+ * @param options - Request options
18397
+ * @returns Array of archived {@link ClinicalClientGoal} records
18398
+ */
18399
+ listArchived: async (params, options) => rb.execute(
18400
+ getAdminClinicalClientGoalsArchived,
18401
+ params ?? {},
18402
+ options
17258
18403
  )
17259
18404
  },
17260
18405
  /** Manage patient supplement prescriptions. */
@@ -17290,11 +18435,76 @@ function createClinicalNamespace(rb) {
17290
18435
  },
17291
18436
  options
17292
18437
  ),
17293
- /** Delete a client supplement. */
17294
- delete: async (id, options) => rb.executeDelete(
17295
- deleteAdminClinicalClientSupplementsById,
18438
+ /**
18439
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
18440
+ */
18441
+ delete: async (id, options) => rb.execute(
18442
+ patchAdminClinicalClientSupplementsByIdArchive,
18443
+ {
18444
+ path: { id },
18445
+ body: {
18446
+ data: { type: "clinical-client-supplement", id, attributes: {} }
18447
+ }
18448
+ },
18449
+ options
18450
+ ),
18451
+ /**
18452
+ * Archive (soft-delete) a client supplement.
18453
+ *
18454
+ * @param id - ClientSupplement UUID
18455
+ * @param options - Request options
18456
+ * @returns Archived {@link ClinicalClientSupplement} record
18457
+ */
18458
+ archive: async (id, options) => rb.execute(
18459
+ patchAdminClinicalClientSupplementsByIdArchive,
18460
+ {
18461
+ path: { id },
18462
+ body: {
18463
+ data: { type: "clinical-client-supplement", id, attributes: {} }
18464
+ }
18465
+ },
18466
+ options
18467
+ ),
18468
+ /**
18469
+ * Restore an archived client supplement.
18470
+ *
18471
+ * @param id - ClientSupplement UUID
18472
+ * @param options - Request options
18473
+ * @returns Restored {@link ClinicalClientSupplement} record
18474
+ */
18475
+ restore: async (id, options) => rb.execute(
18476
+ patchAdminClinicalClientSupplementsByIdRestore,
18477
+ {
18478
+ path: { id },
18479
+ body: {
18480
+ data: { type: "clinical-client-supplement", id, attributes: {} }
18481
+ }
18482
+ },
18483
+ options
18484
+ ),
18485
+ /**
18486
+ * Permanently delete a client supplement. This action is irreversible.
18487
+ *
18488
+ * @param id - ClientSupplement UUID
18489
+ * @param options - Request options
18490
+ * @returns `true` on success
18491
+ */
18492
+ permanentDelete: async (id, options) => rb.executeDelete(
18493
+ deleteAdminClinicalClientSupplementsByIdPermanent,
17296
18494
  { path: { id } },
17297
18495
  options
18496
+ ),
18497
+ /**
18498
+ * List archived client supplements in a workspace.
18499
+ *
18500
+ * @param params - Filter/pagination parameters
18501
+ * @param options - Request options
18502
+ * @returns Array of archived {@link ClinicalClientSupplement} records
18503
+ */
18504
+ listArchived: async (params, options) => rb.execute(
18505
+ getAdminClinicalClientSupplementsArchived,
18506
+ params ?? {},
18507
+ options
17298
18508
  )
17299
18509
  },
17300
18510
  /** View and update clinical delivery audit records. */
@@ -17372,11 +18582,88 @@ function createClinicalNamespace(rb) {
17372
18582
  },
17373
18583
  options
17374
18584
  ),
17375
- /** Delete a resource assignment. */
17376
- delete: async (id, options) => rb.executeDelete(
17377
- deleteAdminClinicalClientResourceAssignmentsById,
18585
+ /**
18586
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
18587
+ */
18588
+ delete: async (id, options) => rb.execute(
18589
+ patchAdminClinicalClientResourceAssignmentsByIdArchive,
18590
+ {
18591
+ path: { id },
18592
+ body: {
18593
+ data: {
18594
+ type: "clinical-client-resource-assignment",
18595
+ id,
18596
+ attributes: {}
18597
+ }
18598
+ }
18599
+ },
18600
+ options
18601
+ ),
18602
+ /**
18603
+ * Archive (soft-delete) a resource assignment.
18604
+ *
18605
+ * @param id - ClientResourceAssignment UUID
18606
+ * @param options - Request options
18607
+ * @returns Archived {@link ClinicalClientResourceAssignment} record
18608
+ */
18609
+ archive: async (id, options) => rb.execute(
18610
+ patchAdminClinicalClientResourceAssignmentsByIdArchive,
18611
+ {
18612
+ path: { id },
18613
+ body: {
18614
+ data: {
18615
+ type: "clinical-client-resource-assignment",
18616
+ id,
18617
+ attributes: {}
18618
+ }
18619
+ }
18620
+ },
18621
+ options
18622
+ ),
18623
+ /**
18624
+ * Restore an archived resource assignment.
18625
+ *
18626
+ * @param id - ClientResourceAssignment UUID
18627
+ * @param options - Request options
18628
+ * @returns Restored {@link ClinicalClientResourceAssignment} record
18629
+ */
18630
+ restore: async (id, options) => rb.execute(
18631
+ patchAdminClinicalClientResourceAssignmentsByIdRestore,
18632
+ {
18633
+ path: { id },
18634
+ body: {
18635
+ data: {
18636
+ type: "clinical-client-resource-assignment",
18637
+ id,
18638
+ attributes: {}
18639
+ }
18640
+ }
18641
+ },
18642
+ options
18643
+ ),
18644
+ /**
18645
+ * Permanently delete a resource assignment. This action is irreversible.
18646
+ *
18647
+ * @param id - ClientResourceAssignment UUID
18648
+ * @param options - Request options
18649
+ * @returns `true` on success
18650
+ */
18651
+ permanentDelete: async (id, options) => rb.executeDelete(
18652
+ deleteAdminClinicalClientResourceAssignmentsByIdPermanent,
17378
18653
  { path: { id } },
17379
18654
  options
18655
+ ),
18656
+ /**
18657
+ * List archived resource assignments in a workspace.
18658
+ *
18659
+ * @param params - Filter/pagination parameters
18660
+ * @param options - Request options
18661
+ * @returns Array of archived {@link ClinicalClientResourceAssignment} records
18662
+ */
18663
+ listArchived: async (params, options) => rb.execute(
18664
+ getAdminClinicalClientResourceAssignmentsArchived,
18665
+ params ?? {},
18666
+ options
17380
18667
  )
17381
18668
  },
17382
18669
  /** View AI supplement recommendation cache entries. */
@@ -18164,6 +19451,152 @@ function createPlatformTonesNamespace(rb) {
18164
19451
  };
18165
19452
  }
18166
19453
 
19454
+ // src/namespaces/channels.ts
19455
+ function createChannelsNamespace(rb) {
19456
+ return {
19457
+ /**
19458
+ * Exchange the current bearer token for a scoped channel token.
19459
+ *
19460
+ * @param request - Workspace and channel scope
19461
+ * @param options - Request options (signal, etc.)
19462
+ * @returns Channel token response
19463
+ */
19464
+ async authorize(request, options) {
19465
+ const raw = await rb.rawPost(
19466
+ "/isv/channels/token",
19467
+ {
19468
+ workspace_id: request.workspaceId,
19469
+ channels: request.channels
19470
+ },
19471
+ options
19472
+ );
19473
+ return {
19474
+ channelToken: raw.channel_token,
19475
+ expiresAt: raw.expires_at,
19476
+ channels: raw.channels,
19477
+ workspaceId: raw.workspace_id
19478
+ };
19479
+ }
19480
+ };
19481
+ }
19482
+
19483
+ // src/namespaces/imports.ts
19484
+ function createImportsNamespace(rb) {
19485
+ return {
19486
+ /**
19487
+ * List available import adapter types for the current application.
19488
+ * @returns Array of adapter metadata objects
19489
+ * @example
19490
+ * const adapters = await admin.imports.listAdapters();
19491
+ * // [{ key: "clinical:goal", display_name: "Clinical Goals", ... }]
19492
+ */
19493
+ listAdapters: async (options) => rb.rawGet(`/isv/imports/adapters`, options).then((r) => r.data),
19494
+ /**
19495
+ * Submit a JSON batch import.
19496
+ * @param params - adapter key, workspace_id, and rows array
19497
+ * @returns Import job with id and initial status
19498
+ * @example
19499
+ * const result = await admin.imports.batch({
19500
+ * adapter: "clinical:goal",
19501
+ * workspace_id: "ws_123",
19502
+ * rows: [{ contact_id: "...", title: "Increase water intake", goal_type: "hydration" }]
19503
+ * });
19504
+ */
19505
+ batch: async (params, options) => rb.rawPost(
19506
+ `/isv/imports/batch`,
19507
+ {
19508
+ adapter_key: params.adapter,
19509
+ workspace_id: params.workspace_id,
19510
+ rows: params.rows,
19511
+ metadata: params.metadata
19512
+ },
19513
+ options
19514
+ ),
19515
+ /**
19516
+ * Upload a CSV file for import.
19517
+ * @param file - CSV file (File or Blob)
19518
+ * @param params - adapter key and workspace_id
19519
+ * @returns Import job with id and initial status
19520
+ * @example
19521
+ * const result = await admin.imports.upload(csvFile, {
19522
+ * adapter: "clinical:patient_bundle",
19523
+ * workspace_id: "ws_123"
19524
+ * });
19525
+ */
19526
+ upload: async (file, params, options) => {
19527
+ const formData = new FormData();
19528
+ formData.append("file", file);
19529
+ formData.append("adapter_key", params.adapter);
19530
+ formData.append("workspace_id", params.workspace_id);
19531
+ if (params.column_mapping)
19532
+ formData.append(
19533
+ "column_mapping",
19534
+ JSON.stringify(params.column_mapping)
19535
+ );
19536
+ if (params.metadata)
19537
+ formData.append("metadata", JSON.stringify(params.metadata));
19538
+ return rb.rawPostMultipart(`/isv/imports/upload`, formData, options);
19539
+ },
19540
+ /**
19541
+ * List imports for a workspace with optional filters.
19542
+ * @param params - workspace_id required, adapter and status optional
19543
+ * @returns Paginated list of imports
19544
+ * @example
19545
+ * const imports = await admin.imports.list({ workspace_id: "ws_123", adapter: "crm:contact" });
19546
+ */
19547
+ list: async (params, options) => rb.rawGet(
19548
+ `/isv/imports?workspace_id=${params.workspace_id}${params.adapter ? `&adapter_key=${params.adapter}` : ""}${params.status ? `&status=${params.status}` : ""}${params.offset !== void 0 ? `&offset=${params.offset}` : ""}${params.limit !== void 0 ? `&limit=${params.limit}` : ""}`,
19549
+ options
19550
+ ),
19551
+ /**
19552
+ * Get a single import by ID.
19553
+ * @param id - Import UUID
19554
+ * @returns Full import record including error_report
19555
+ * @example
19556
+ * const imp = await admin.imports.get("uuid-here");
19557
+ */
19558
+ get: async (id, options) => rb.rawGet(`/isv/imports/${id}`, options).then((r) => r.data),
19559
+ /**
19560
+ * Get per-row outcomes for a chunked import.
19561
+ * @param importId - Import UUID
19562
+ * @param params - Pagination options
19563
+ * @returns Paginated list of row outcomes
19564
+ * @example
19565
+ * const rows = await admin.imports.rows("uuid-here", { offset: 0, limit: 50 });
19566
+ */
19567
+ rows: async (importId, params, options) => rb.rawGet(
19568
+ `/isv/imports/${importId}/rows${params?.offset !== void 0 ? `?offset=${params.offset}` : ""}${params?.limit !== void 0 ? `${params?.offset !== void 0 ? "&" : "?"}limit=${params.limit}` : ""}`,
19569
+ options
19570
+ ),
19571
+ /**
19572
+ * Confirm a validated import for commit.
19573
+ * @param id - Import UUID
19574
+ * @param params - workspace_id for authorization
19575
+ * @returns Updated import with status "committing"
19576
+ * @example
19577
+ * await admin.imports.confirm("uuid-here", { workspace_id: "ws_123" });
19578
+ */
19579
+ confirm: async (id, params, options) => rb.rawPost(
19580
+ `/isv/imports/${id}/confirm`,
19581
+ params,
19582
+ options
19583
+ ),
19584
+ /**
19585
+ * Cancel a validated import.
19586
+ * @param id - Import UUID
19587
+ * @param params - workspace_id for authorization
19588
+ * @returns Updated import with status "cancelled"
19589
+ * @example
19590
+ * await admin.imports.cancel("uuid-here", { workspace_id: "ws_123" });
19591
+ */
19592
+ cancel: async (id, params, options) => rb.rawPost(
19593
+ `/isv/imports/${id}/cancel`,
19594
+ params,
19595
+ options
19596
+ )
19597
+ };
19598
+ }
19599
+
18167
19600
  // src/gpt-admin.ts
18168
19601
  var GptAdmin = class extends BaseClient {
18169
19602
  constructor(config) {
@@ -18214,6 +19647,8 @@ var GptAdmin = class extends BaseClient {
18214
19647
  this.invitations = createInvitationsNamespace(rb);
18215
19648
  this.brandIdentities = createBrandIdentitiesNamespace(rb);
18216
19649
  this.platformTones = createPlatformTonesNamespace(rb);
19650
+ this.channels = createChannelsNamespace(rb);
19651
+ this.imports = createImportsNamespace(rb);
18217
19652
  }
18218
19653
  };
18219
19654
 
@@ -18233,6 +19668,7 @@ var index_default = GptAdmin;
18233
19668
  ServerError,
18234
19669
  TimeoutError,
18235
19670
  ValidationError,
19671
+ createImportsNamespace,
18236
19672
  handleApiError
18237
19673
  });
18238
19674
  //# sourceMappingURL=index.js.map