@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.mjs CHANGED
@@ -814,8 +814,8 @@ var createClient = (config = {}) => {
814
814
  };
815
815
 
816
816
  // src/version.ts
817
- var SDK_VERSION = "0.8.5";
818
- var DEFAULT_API_VERSION = "2026-03-19";
817
+ var SDK_VERSION = "0.9.0";
818
+ var DEFAULT_API_VERSION = "2026-03-21";
819
819
 
820
820
  // src/base-client.ts
821
821
  function isSecureUrl(url) {
@@ -1215,6 +1215,30 @@ var RequestBuilder = class {
1215
1215
  throw handleApiError(error);
1216
1216
  }
1217
1217
  }
1218
+ /**
1219
+ * Execute a raw multipart/form-data POST request.
1220
+ * Used for file upload endpoints (custom Phoenix controllers).
1221
+ * Content-Type is omitted from headers so the browser sets the correct
1222
+ * multipart boundary automatically from the FormData body.
1223
+ */
1224
+ async rawPostMultipart(url, body, options) {
1225
+ const headers = buildHeaders(this.getHeaders, options);
1226
+ headers["Content-Type"] = null;
1227
+ const result = await this.requestWithRetry(
1228
+ () => this.clientInstance.post({
1229
+ url,
1230
+ headers,
1231
+ body,
1232
+ bodySerializer: null,
1233
+ ...options?.signal && { signal: options.signal }
1234
+ })
1235
+ );
1236
+ const { data, error } = result;
1237
+ if (error) {
1238
+ throw handleApiError(enrichError(error, result));
1239
+ }
1240
+ return data;
1241
+ }
1218
1242
  /**
1219
1243
  * Execute a raw POST request to a custom (non-generated) endpoint.
1220
1244
  * Used for endpoints implemented as custom Phoenix controllers.
@@ -1328,7 +1352,9 @@ var RequestBuilder = class {
1328
1352
  const result = await this.clientInstance.post({
1329
1353
  url,
1330
1354
  headers,
1331
- body: JSON.stringify({ data: { type: "message", attributes: body } }),
1355
+ body: JSON.stringify({
1356
+ data: { type: "chat-message", attributes: body }
1357
+ }),
1332
1358
  parseAs: "stream",
1333
1359
  ...options?.signal && { signal: options.signal }
1334
1360
  });
@@ -1446,19 +1472,23 @@ var getAdminExtractionBatchesById = (options) => (options.client ?? client).get(
1446
1472
  url: "/admin/extraction/batches/{id}",
1447
1473
  ...options
1448
1474
  });
1449
- var postAdminSocialPosts = (options) => (options.client ?? client).post({
1475
+ var patchAdminClinicalMealPlansByIdRestore = (options) => (options.client ?? client).patch({
1450
1476
  security: [{ scheme: "bearer", type: "http" }],
1451
- url: "/admin/social/posts",
1477
+ url: "/admin/clinical/meal-plans/{id}/restore",
1452
1478
  ...options,
1453
1479
  headers: {
1454
1480
  "Content-Type": "application/vnd.api+json",
1455
1481
  ...options.headers
1456
1482
  }
1457
1483
  });
1458
- var deleteAdminClinicalNotesById = (options) => (options.client ?? client).delete({
1484
+ var postAdminSocialPosts = (options) => (options.client ?? client).post({
1459
1485
  security: [{ scheme: "bearer", type: "http" }],
1460
- url: "/admin/clinical/notes/{id}",
1461
- ...options
1486
+ url: "/admin/social/posts",
1487
+ ...options,
1488
+ headers: {
1489
+ "Content-Type": "application/vnd.api+json",
1490
+ ...options.headers
1491
+ }
1462
1492
  });
1463
1493
  var getAdminClinicalNotesById = (options) => (options.client ?? client).get({
1464
1494
  security: [{ scheme: "bearer", type: "http" }],
@@ -1549,6 +1579,11 @@ var patchAdminSupportTicketsById = (options) => (options.client ?? client).patch
1549
1579
  ...options.headers
1550
1580
  }
1551
1581
  });
1582
+ var deleteAdminClinicalMealPlansByIdPermanent = (options) => (options.client ?? client).delete({
1583
+ security: [{ scheme: "bearer", type: "http" }],
1584
+ url: "/admin/clinical/meal-plans/{id}/permanent",
1585
+ ...options
1586
+ });
1552
1587
  var deleteAdminFeatureDefinitionsById = (options) => (options.client ?? client).delete({
1553
1588
  security: [{ scheme: "bearer", type: "http" }],
1554
1589
  url: "/admin/feature-definitions/{id}",
@@ -1713,6 +1748,15 @@ var patchAdminBrandIdentitiesById = (options) => (options.client ?? client).patc
1713
1748
  ...options.headers
1714
1749
  }
1715
1750
  });
1751
+ var patchAdminClinicalGoalTemplatesCatalogByIdArchive = (options) => (options.client ?? client).patch({
1752
+ security: [{ scheme: "bearer", type: "http" }],
1753
+ url: "/admin/clinical/goal-templates/catalog/{id}/archive",
1754
+ ...options,
1755
+ headers: {
1756
+ "Content-Type": "application/vnd.api+json",
1757
+ ...options.headers
1758
+ }
1759
+ });
1716
1760
  var getAdminClinicalHealthMetricsBySession = (options) => (options.client ?? client).get({
1717
1761
  security: [{ scheme: "bearer", type: "http" }],
1718
1762
  url: "/admin/clinical/health-metrics/by-session",
@@ -1868,11 +1912,6 @@ var patchAdminTenantsByIdConvertToOrg = (options) => (options.client ?? client).
1868
1912
  ...options.headers
1869
1913
  }
1870
1914
  });
1871
- var deleteAdminClinicalHealthMetricsById = (options) => (options.client ?? client).delete({
1872
- security: [{ scheme: "bearer", type: "http" }],
1873
- url: "/admin/clinical/health-metrics/{id}",
1874
- ...options
1875
- });
1876
1915
  var getAdminClinicalHealthMetricsById = (options) => (options.client ?? client).get({
1877
1916
  security: [{ scheme: "bearer", type: "http" }],
1878
1917
  url: "/admin/clinical/health-metrics/{id}",
@@ -2158,6 +2197,11 @@ var postAdminAgentsCloneForWorkspace = (options) => (options.client ?? client).p
2158
2197
  ...options.headers
2159
2198
  }
2160
2199
  });
2200
+ var deleteAdminClinicalClientGoalsByIdPermanent = (options) => (options.client ?? client).delete({
2201
+ security: [{ scheme: "bearer", type: "http" }],
2202
+ url: "/admin/clinical/client-goals/{id}/permanent",
2203
+ ...options
2204
+ });
2161
2205
  var postAdminTenantsByIdCredit = (options) => (options.client ?? client).post({
2162
2206
  security: [{ scheme: "bearer", type: "http" }],
2163
2207
  url: "/admin/tenants/{id}/credit",
@@ -2275,6 +2319,11 @@ var getAdminClinicalPracticeResourcesCategoriesCatalog = (options) => (options.c
2275
2319
  url: "/admin/clinical/practice-resources/categories/catalog",
2276
2320
  ...options
2277
2321
  });
2322
+ var getAdminClinicalGoalTemplatesArchived = (options) => (options.client ?? client).get({
2323
+ security: [{ scheme: "bearer", type: "http" }],
2324
+ url: "/admin/clinical/goal-templates/archived",
2325
+ ...options
2326
+ });
2278
2327
  var deleteAdminWorkspaceAgentConfigsById = (options) => (options.client ?? client).delete({
2279
2328
  security: [{ scheme: "bearer", type: "http" }],
2280
2329
  url: "/admin/workspace-agent-configs/{id}",
@@ -2405,11 +2454,6 @@ var postAdminLlmAnalytics = (options) => (options.client ?? client).post({
2405
2454
  ...options.headers
2406
2455
  }
2407
2456
  });
2408
- var deleteAdminClinicalPracticeToolsCatalogById = (options) => (options.client ?? client).delete({
2409
- security: [{ scheme: "bearer", type: "http" }],
2410
- url: "/admin/clinical/practice-tools/catalog/{id}",
2411
- ...options
2412
- });
2413
2457
  var getAdminClinicalPracticeToolsCatalogById = (options) => (options.client ?? client).get({
2414
2458
  security: [{ scheme: "bearer", type: "http" }],
2415
2459
  url: "/admin/clinical/practice-tools/catalog/{id}",
@@ -2448,11 +2492,6 @@ var getAdminThreadsSearch = (options) => (options.client ?? client).get({
2448
2492
  url: "/admin/threads/search",
2449
2493
  ...options
2450
2494
  });
2451
- var deleteAdminClinicalPracticeResourcesById = (options) => (options.client ?? client).delete({
2452
- security: [{ scheme: "bearer", type: "http" }],
2453
- url: "/admin/clinical/practice-resources/{id}",
2454
- ...options
2455
- });
2456
2495
  var getAdminClinicalPracticeResourcesById = (options) => (options.client ?? client).get({
2457
2496
  security: [{ scheme: "bearer", type: "http" }],
2458
2497
  url: "/admin/clinical/practice-resources/{id}",
@@ -2511,6 +2550,15 @@ var getAdminWebhookDeliveriesById = (options) => (options.client ?? client).get(
2511
2550
  url: "/admin/webhook-deliveries/{id}",
2512
2551
  ...options
2513
2552
  });
2553
+ var patchAdminClinicalPracticeResourcesByIdRestore = (options) => (options.client ?? client).patch({
2554
+ security: [{ scheme: "bearer", type: "http" }],
2555
+ url: "/admin/clinical/practice-resources/{id}/restore",
2556
+ ...options,
2557
+ headers: {
2558
+ "Content-Type": "application/vnd.api+json",
2559
+ ...options.headers
2560
+ }
2561
+ });
2514
2562
  var getAdminClinicalGoalTemplates = (options) => (options.client ?? client).get({
2515
2563
  security: [{ scheme: "bearer", type: "http" }],
2516
2564
  url: "/admin/clinical/goal-templates",
@@ -2600,6 +2648,24 @@ var patchAdminCrawlerSchedulesByIdDisable = (options) => (options.client ?? clie
2600
2648
  ...options.headers
2601
2649
  }
2602
2650
  });
2651
+ var patchAdminClinicalClientSupplementsByIdRestore = (options) => (options.client ?? client).patch({
2652
+ security: [{ scheme: "bearer", type: "http" }],
2653
+ url: "/admin/clinical/client-supplements/{id}/restore",
2654
+ ...options,
2655
+ headers: {
2656
+ "Content-Type": "application/vnd.api+json",
2657
+ ...options.headers
2658
+ }
2659
+ });
2660
+ var patchAdminClinicalPracticeToolsByIdRestore = (options) => (options.client ?? client).patch({
2661
+ security: [{ scheme: "bearer", type: "http" }],
2662
+ url: "/admin/clinical/practice-tools/{id}/restore",
2663
+ ...options,
2664
+ headers: {
2665
+ "Content-Type": "application/vnd.api+json",
2666
+ ...options.headers
2667
+ }
2668
+ });
2603
2669
  var deleteAdminApiKeysById = (options) => (options.client ?? client).delete({
2604
2670
  security: [{ scheme: "bearer", type: "http" }],
2605
2671
  url: "/admin/api-keys/{id}",
@@ -2628,6 +2694,16 @@ var postAdminCrmContactsByIdUnarchive = (options) => (options.client ?? client).
2628
2694
  ...options.headers
2629
2695
  }
2630
2696
  });
2697
+ var getAdminClinicalPracticeToolsArchived = (options) => (options.client ?? client).get({
2698
+ security: [{ scheme: "bearer", type: "http" }],
2699
+ url: "/admin/clinical/practice-tools/archived",
2700
+ ...options
2701
+ });
2702
+ var getAdminClinicalPracticeToolsCatalogArchived = (options) => (options.client ?? client).get({
2703
+ security: [{ scheme: "bearer", type: "http" }],
2704
+ url: "/admin/clinical/practice-tools/catalog/archived",
2705
+ ...options
2706
+ });
2631
2707
  var getAdminVoiceRecordingsSessionBySessionId = (options) => (options.client ?? client).get({
2632
2708
  security: [{ scheme: "bearer", type: "http" }],
2633
2709
  url: "/admin/voice/recordings/session/{session_id}",
@@ -2680,6 +2756,11 @@ var getAdminThreadsByIdMessages = (options) => (options.client ?? client).get({
2680
2756
  url: "/admin/threads/{id}/messages",
2681
2757
  ...options
2682
2758
  });
2759
+ var getAdminSocialTrendingHistoryRange = (options) => (options.client ?? client).get({
2760
+ security: [{ scheme: "bearer", type: "http" }],
2761
+ url: "/admin/social/trending/history/range",
2762
+ ...options
2763
+ });
2683
2764
  var getAdminSchedulingParticipants = (options) => (options.client ?? client).get({
2684
2765
  security: [{ scheme: "bearer", type: "http" }],
2685
2766
  url: "/admin/scheduling/participants",
@@ -2868,6 +2949,11 @@ var getAdminLlmAnalyticsPlatform = (options) => (options.client ?? client).get({
2868
2949
  url: "/admin/llm-analytics/platform",
2869
2950
  ...options
2870
2951
  });
2952
+ var deleteAdminClinicalClientSupplementsByIdPermanent = (options) => (options.client ?? client).delete({
2953
+ security: [{ scheme: "bearer", type: "http" }],
2954
+ url: "/admin/clinical/client-supplements/{id}/permanent",
2955
+ ...options
2956
+ });
2871
2957
  var deleteAdminExtractionWorkflowsById = (options) => (options.client ?? client).delete({
2872
2958
  security: [{ scheme: "bearer", type: "http" }],
2873
2959
  url: "/admin/extraction-workflows/{id}",
@@ -2896,11 +2982,29 @@ var postAdminExtractionSchemaDiscoveries = (options) => (options.client ?? clien
2896
2982
  ...options.headers
2897
2983
  }
2898
2984
  });
2985
+ var patchAdminClinicalPracticeToolsCatalogByIdRestore = (options) => (options.client ?? client).patch({
2986
+ security: [{ scheme: "bearer", type: "http" }],
2987
+ url: "/admin/clinical/practice-tools/catalog/{id}/restore",
2988
+ ...options,
2989
+ headers: {
2990
+ "Content-Type": "application/vnd.api+json",
2991
+ ...options.headers
2992
+ }
2993
+ });
2899
2994
  var getAdminVoiceSessions = (options) => (options.client ?? client).get({
2900
2995
  security: [{ scheme: "bearer", type: "http" }],
2901
2996
  url: "/admin/voice/sessions",
2902
2997
  ...options
2903
2998
  });
2999
+ var patchAdminClinicalNotesByIdArchive = (options) => (options.client ?? client).patch({
3000
+ security: [{ scheme: "bearer", type: "http" }],
3001
+ url: "/admin/clinical/notes/{id}/archive",
3002
+ ...options,
3003
+ headers: {
3004
+ "Content-Type": "application/vnd.api+json",
3005
+ ...options.headers
3006
+ }
3007
+ });
2904
3008
  var getAdminCrmActivitiesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
2905
3009
  security: [{ scheme: "bearer", type: "http" }],
2906
3010
  url: "/admin/crm/activities/workspace/{workspace_id}",
@@ -2929,6 +3033,11 @@ var getAdminWebhookConfigsStats = (options) => (options.client ?? client).get({
2929
3033
  url: "/admin/webhook-configs/stats",
2930
3034
  ...options
2931
3035
  });
3036
+ var deleteAdminClinicalGoalTemplatesByIdPermanent = (options) => (options.client ?? client).delete({
3037
+ security: [{ scheme: "bearer", type: "http" }],
3038
+ url: "/admin/clinical/goal-templates/{id}/permanent",
3039
+ ...options
3040
+ });
2932
3041
  var getAdminVoiceTranscriptionResultsSessionBySessionId = (options) => (options.client ?? client).get({
2933
3042
  security: [{ scheme: "bearer", type: "http" }],
2934
3043
  url: "/admin/voice/transcription-results/session/{session_id}",
@@ -3027,6 +3136,15 @@ var getAdminSupportQueueMembersApplicationByApplicationId = (options) => (option
3027
3136
  url: "/admin/support/queue-members/application/{application_id}",
3028
3137
  ...options
3029
3138
  });
3139
+ var patchAdminClinicalHealthMetricsByIdRestore = (options) => (options.client ?? client).patch({
3140
+ security: [{ scheme: "bearer", type: "http" }],
3141
+ url: "/admin/clinical/health-metrics/{id}/restore",
3142
+ ...options,
3143
+ headers: {
3144
+ "Content-Type": "application/vnd.api+json",
3145
+ ...options.headers
3146
+ }
3147
+ });
3030
3148
  var getAdminConnectorsOauthAppConfigs = (options) => (options.client ?? client).get({
3031
3149
  security: [{ scheme: "bearer", type: "http" }],
3032
3150
  url: "/admin/connectors/oauth-app-configs",
@@ -3041,6 +3159,11 @@ var postAdminConnectorsOauthAppConfigs = (options) => (options.client ?? client)
3041
3159
  ...options.headers
3042
3160
  }
3043
3161
  });
3162
+ var deleteAdminClinicalPracticeResourcesByIdPermanent = (options) => (options.client ?? client).delete({
3163
+ security: [{ scheme: "bearer", type: "http" }],
3164
+ url: "/admin/clinical/practice-resources/{id}/permanent",
3165
+ ...options
3166
+ });
3044
3167
  var deleteAdminClinicalSessionsById = (options) => (options.client ?? client).delete({
3045
3168
  security: [{ scheme: "bearer", type: "http" }],
3046
3169
  url: "/admin/clinical/sessions/{id}",
@@ -3271,6 +3394,15 @@ var postAdminClinicalPracticeResourcesCatalog = (options) => (options.client ??
3271
3394
  ...options.headers
3272
3395
  }
3273
3396
  });
3397
+ var patchAdminClinicalPracticeToolsByIdArchive = (options) => (options.client ?? client).patch({
3398
+ security: [{ scheme: "bearer", type: "http" }],
3399
+ url: "/admin/clinical/practice-tools/{id}/archive",
3400
+ ...options,
3401
+ headers: {
3402
+ "Content-Type": "application/vnd.api+json",
3403
+ ...options.headers
3404
+ }
3405
+ });
3274
3406
  var getAdminVoiceTranscriptionResultsById = (options) => (options.client ?? client).get({
3275
3407
  security: [{ scheme: "bearer", type: "http" }],
3276
3408
  url: "/admin/voice/transcription-results/{id}",
@@ -3343,6 +3475,11 @@ var getAdminExtractionDocumentsById = (options) => (options.client ?? client).ge
3343
3475
  url: "/admin/extraction/documents/{id}",
3344
3476
  ...options
3345
3477
  });
3478
+ var getAdminClinicalClientSupplementsArchived = (options) => (options.client ?? client).get({
3479
+ security: [{ scheme: "bearer", type: "http" }],
3480
+ url: "/admin/clinical/client-supplements/archived",
3481
+ ...options
3482
+ });
3346
3483
  var patchAdminWalletCredits = (options) => (options.client ?? client).patch({
3347
3484
  security: [{ scheme: "bearer", type: "http" }],
3348
3485
  url: "/admin/wallet/credits",
@@ -3357,6 +3494,11 @@ var getAdminLegalDocumentsForApplication = (options) => (options.client ?? clien
3357
3494
  url: "/admin/legal-documents/for-application",
3358
3495
  ...options
3359
3496
  });
3497
+ var getAdminClinicalMealPlansArchived = (options) => (options.client ?? client).get({
3498
+ security: [{ scheme: "bearer", type: "http" }],
3499
+ url: "/admin/clinical/meal-plans/archived",
3500
+ ...options
3501
+ });
3360
3502
  var getAdminAccounts = (options) => (options.client ?? client).get({
3361
3503
  security: [{ scheme: "bearer", type: "http" }],
3362
3504
  url: "/admin/accounts",
@@ -3438,6 +3580,15 @@ var getAdminClinicalGoalTemplatesCategoriesCatalog = (options) => (options.clien
3438
3580
  url: "/admin/clinical/goal-templates/categories/catalog",
3439
3581
  ...options
3440
3582
  });
3583
+ var patchAdminClinicalNotesByIdRestore = (options) => (options.client ?? client).patch({
3584
+ security: [{ scheme: "bearer", type: "http" }],
3585
+ url: "/admin/clinical/notes/{id}/restore",
3586
+ ...options,
3587
+ headers: {
3588
+ "Content-Type": "application/vnd.api+json",
3589
+ ...options.headers
3590
+ }
3591
+ });
3441
3592
  var patchAdminBrandIdentitiesByIdSetDefault = (options) => (options.client ?? client).patch({
3442
3593
  security: [{ scheme: "bearer", type: "http" }],
3443
3594
  url: "/admin/brand-identities/{id}/set-default",
@@ -3489,6 +3640,11 @@ var patchAdminStorageRecommendationsByIdAccept = (options) => (options.client ??
3489
3640
  ...options.headers
3490
3641
  }
3491
3642
  });
3643
+ var deleteAdminClinicalNotesByIdPermanent = (options) => (options.client ?? client).delete({
3644
+ security: [{ scheme: "bearer", type: "http" }],
3645
+ url: "/admin/clinical/notes/{id}/permanent",
3646
+ ...options
3647
+ });
3492
3648
  var getAdminStorageRecommendationsPending = (options) => (options.client ?? client).get({
3493
3649
  security: [{ scheme: "bearer", type: "http" }],
3494
3650
  url: "/admin/storage-recommendations/pending",
@@ -3521,6 +3677,11 @@ var patchAdminSchedulingParticipantsByIdRespond = (options) => (options.client ?
3521
3677
  ...options.headers
3522
3678
  }
3523
3679
  });
3680
+ var getAdminClinicalGoalTemplatesCatalogArchived = (options) => (options.client ?? client).get({
3681
+ security: [{ scheme: "bearer", type: "http" }],
3682
+ url: "/admin/clinical/goal-templates/catalog/archived",
3683
+ ...options
3684
+ });
3524
3685
  var getAdminEmailMarketingSenderProfilesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
3525
3686
  security: [{ scheme: "bearer", type: "http" }],
3526
3687
  url: "/admin/email-marketing/sender-profiles/workspace/{workspace_id}",
@@ -3654,6 +3815,15 @@ var getAdminClinicalNotesByNoteIdVersionsById = (options) => (options.client ??
3654
3815
  url: "/admin/clinical/notes/{note_id}/versions/{id}",
3655
3816
  ...options
3656
3817
  });
3818
+ var patchAdminClinicalPracticeResourcesCatalogByIdRestore = (options) => (options.client ?? client).patch({
3819
+ security: [{ scheme: "bearer", type: "http" }],
3820
+ url: "/admin/clinical/practice-resources/catalog/{id}/restore",
3821
+ ...options,
3822
+ headers: {
3823
+ "Content-Type": "application/vnd.api+json",
3824
+ ...options.headers
3825
+ }
3826
+ });
3657
3827
  var patchAdminWalletPlan = (options) => (options.client ?? client).patch({
3658
3828
  security: [{ scheme: "bearer", type: "http" }],
3659
3829
  url: "/admin/wallet/plan",
@@ -3682,6 +3852,11 @@ var getAdminUsersById = (options) => (options.client ?? client).get({
3682
3852
  url: "/admin/users/{id}",
3683
3853
  ...options
3684
3854
  });
3855
+ var deleteAdminClinicalClientResourceAssignmentsByIdPermanent = (options) => (options.client ?? client).delete({
3856
+ security: [{ scheme: "bearer", type: "http" }],
3857
+ url: "/admin/clinical/client-resource-assignments/{id}/permanent",
3858
+ ...options
3859
+ });
3685
3860
  var postAdminWebhookConfigsBulkDisable = (options) => (options.client ?? client).post({
3686
3861
  security: [{ scheme: "bearer", type: "http" }],
3687
3862
  url: "/admin/webhook-configs/bulk-disable",
@@ -3824,6 +3999,11 @@ var getAdminExtractionBatchesWorkspaceByWorkspaceId = (options) => (options.clie
3824
3999
  url: "/admin/extraction/batches/workspace/{workspace_id}",
3825
4000
  ...options
3826
4001
  });
4002
+ var getAdminClinicalClientGoalsArchived = (options) => (options.client ?? client).get({
4003
+ security: [{ scheme: "bearer", type: "http" }],
4004
+ url: "/admin/clinical/client-goals/archived",
4005
+ ...options
4006
+ });
3827
4007
  var getAdminPlatformTonesByBrandByBrandIdentityId = (options) => (options.client ?? client).get({
3828
4008
  security: [{ scheme: "bearer", type: "http" }],
3829
4009
  url: "/admin/platform-tones/by-brand/{brand_identity_id}",
@@ -3838,6 +4018,15 @@ var postAdminThreadsByIdFork = (options) => (options.client ?? client).post({
3838
4018
  ...options.headers
3839
4019
  }
3840
4020
  });
4021
+ var patchAdminClinicalClientGoalsByIdRestore = (options) => (options.client ?? client).patch({
4022
+ security: [{ scheme: "bearer", type: "http" }],
4023
+ url: "/admin/clinical/client-goals/{id}/restore",
4024
+ ...options,
4025
+ headers: {
4026
+ "Content-Type": "application/vnd.api+json",
4027
+ ...options.headers
4028
+ }
4029
+ });
3841
4030
  var getAdminInvitationsMe = (options) => (options.client ?? client).get({
3842
4031
  security: [{ scheme: "bearer", type: "http" }],
3843
4032
  url: "/admin/invitations/me",
@@ -3848,6 +4037,15 @@ var getAdminConnectorsCredentials = (options) => (options.client ?? client).get(
3848
4037
  url: "/admin/connectors/credentials",
3849
4038
  ...options
3850
4039
  });
4040
+ var patchAdminClinicalGoalTemplatesByIdRestore = (options) => (options.client ?? client).patch({
4041
+ security: [{ scheme: "bearer", type: "http" }],
4042
+ url: "/admin/clinical/goal-templates/{id}/restore",
4043
+ ...options,
4044
+ headers: {
4045
+ "Content-Type": "application/vnd.api+json",
4046
+ ...options.headers
4047
+ }
4048
+ });
3851
4049
  var getAdminAgentVersions = (options) => (options.client ?? client).get({
3852
4050
  security: [{ scheme: "bearer", type: "http" }],
3853
4051
  url: "/admin/agent-versions",
@@ -3915,6 +4113,11 @@ var getAdminClinicalSessionsByIdMealPlans = (options) => (options.client ?? clie
3915
4113
  url: "/admin/clinical/sessions/{id}/meal_plans",
3916
4114
  ...options
3917
4115
  });
4116
+ var getAdminClinicalClientResourceAssignmentsArchived = (options) => (options.client ?? client).get({
4117
+ security: [{ scheme: "bearer", type: "http" }],
4118
+ url: "/admin/clinical/client-resource-assignments/archived",
4119
+ ...options
4120
+ });
3918
4121
  var getAdminCrmSyncConfigsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
3919
4122
  security: [{ scheme: "bearer", type: "http" }],
3920
4123
  url: "/admin/crm/sync-configs/workspace/{workspace_id}",
@@ -4042,11 +4245,6 @@ var getAdminBucketsByIdStats = (options) => (options.client ?? client).get({
4042
4245
  url: "/admin/buckets/{id}/stats",
4043
4246
  ...options
4044
4247
  });
4045
- var deleteAdminClinicalClientResourceAssignmentsById = (options) => (options.client ?? client).delete({
4046
- security: [{ scheme: "bearer", type: "http" }],
4047
- url: "/admin/clinical/client-resource-assignments/{id}",
4048
- ...options
4049
- });
4050
4248
  var getAdminClinicalClientResourceAssignmentsById = (options) => (options.client ?? client).get({
4051
4249
  security: [{ scheme: "bearer", type: "http" }],
4052
4250
  url: "/admin/clinical/client-resource-assignments/{id}",
@@ -4066,6 +4264,11 @@ var getAdminUsersByEmail = (options) => (options.client ?? client).get({
4066
4264
  url: "/admin/users/by-email",
4067
4265
  ...options
4068
4266
  });
4267
+ var deleteAdminClinicalPracticeToolsCatalogByIdPermanent = (options) => (options.client ?? client).delete({
4268
+ security: [{ scheme: "bearer", type: "http" }],
4269
+ url: "/admin/clinical/practice-tools/catalog/{id}/permanent",
4270
+ ...options
4271
+ });
4069
4272
  var deleteAdminSupportQueuesById = (options) => (options.client ?? client).delete({
4070
4273
  security: [{ scheme: "bearer", type: "http" }],
4071
4274
  url: "/admin/support/queues/{id}",
@@ -4206,6 +4409,11 @@ var postAdminCrawlerSiteConfigs = (options) => (options.client ?? client).post({
4206
4409
  ...options.headers
4207
4410
  }
4208
4411
  });
4412
+ var deleteAdminClinicalPracticeToolsByIdPermanent = (options) => (options.client ?? client).delete({
4413
+ security: [{ scheme: "bearer", type: "http" }],
4414
+ url: "/admin/clinical/practice-tools/{id}/permanent",
4415
+ ...options
4416
+ });
4209
4417
  var getAdminCrmContactsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
4210
4418
  security: [{ scheme: "bearer", type: "http" }],
4211
4419
  url: "/admin/crm/contacts/workspace/{workspace_id}",
@@ -4225,6 +4433,15 @@ var getAdminExtractionResultsDocumentByDocumentId = (options) => (options.client
4225
4433
  url: "/admin/extraction/results/document/{document_id}",
4226
4434
  ...options
4227
4435
  });
4436
+ var patchAdminClinicalPracticeResourcesCatalogByIdArchive = (options) => (options.client ?? client).patch({
4437
+ security: [{ scheme: "bearer", type: "http" }],
4438
+ url: "/admin/clinical/practice-resources/catalog/{id}/archive",
4439
+ ...options,
4440
+ headers: {
4441
+ "Content-Type": "application/vnd.api+json",
4442
+ ...options.headers
4443
+ }
4444
+ });
4228
4445
  var postAdminAgentsByIdPublishVersion = (options) => (options.client ?? client).post({
4229
4446
  security: [{ scheme: "bearer", type: "http" }],
4230
4447
  url: "/admin/agents/{id}/publish-version",
@@ -4273,6 +4490,11 @@ var getAdminLlmAnalyticsWorkspace = (options) => (options.client ?? client).get(
4273
4490
  url: "/admin/llm-analytics/workspace",
4274
4491
  ...options
4275
4492
  });
4493
+ var deleteAdminClinicalHealthMetricsByIdPermanent = (options) => (options.client ?? client).delete({
4494
+ security: [{ scheme: "bearer", type: "http" }],
4495
+ url: "/admin/clinical/health-metrics/{id}/permanent",
4496
+ ...options
4497
+ });
4276
4498
  var getAdminAgentVersionRevisions = (options) => (options.client ?? client).get({
4277
4499
  security: [{ scheme: "bearer", type: "http" }],
4278
4500
  url: "/admin/agent-version-revisions",
@@ -4319,6 +4541,15 @@ var patchAdminTenantsByIdSuspend = (options) => (options.client ?? client).patch
4319
4541
  ...options.headers
4320
4542
  }
4321
4543
  });
4544
+ var patchAdminClinicalGoalTemplatesCatalogByIdRestore = (options) => (options.client ?? client).patch({
4545
+ security: [{ scheme: "bearer", type: "http" }],
4546
+ url: "/admin/clinical/goal-templates/catalog/{id}/restore",
4547
+ ...options,
4548
+ headers: {
4549
+ "Content-Type": "application/vnd.api+json",
4550
+ ...options.headers
4551
+ }
4552
+ });
4322
4553
  var patchAdminWorkspacesByIdAllocate = (options) => (options.client ?? client).patch({
4323
4554
  security: [{ scheme: "bearer", type: "http" }],
4324
4555
  url: "/admin/workspaces/{id}/allocate",
@@ -4612,11 +4843,6 @@ var patchAdminCrmContactsByIdArchive = (options) => (options.client ?? client).p
4612
4843
  ...options.headers
4613
4844
  }
4614
4845
  });
4615
- var deleteAdminClinicalGoalTemplatesById = (options) => (options.client ?? client).delete({
4616
- security: [{ scheme: "bearer", type: "http" }],
4617
- url: "/admin/clinical/goal-templates/{id}",
4618
- ...options
4619
- });
4620
4846
  var getAdminClinicalGoalTemplatesById = (options) => (options.client ?? client).get({
4621
4847
  security: [{ scheme: "bearer", type: "http" }],
4622
4848
  url: "/admin/clinical/goal-templates/{id}",
@@ -4696,6 +4922,11 @@ var postAdminAgentSouls = (options) => (options.client ?? client).post({
4696
4922
  ...options.headers
4697
4923
  }
4698
4924
  });
4925
+ var deleteAdminClinicalPracticeResourcesCatalogByIdPermanent = (options) => (options.client ?? client).delete({
4926
+ security: [{ scheme: "bearer", type: "http" }],
4927
+ url: "/admin/clinical/practice-resources/catalog/{id}/permanent",
4928
+ ...options
4929
+ });
4699
4930
  var postAdminSocialCampaignsByIdAdaptForPlatforms = (options) => (options.client ?? client).post({
4700
4931
  security: [{ scheme: "bearer", type: "http" }],
4701
4932
  url: "/admin/social/campaigns/{id}/adapt-for-platforms",
@@ -4751,6 +4982,15 @@ var getAdminSocialTrendingHistoryWorkspaceByWorkspaceId = (options) => (options.
4751
4982
  url: "/admin/social/trending/history/workspace/{workspace_id}",
4752
4983
  ...options
4753
4984
  });
4985
+ var patchAdminClinicalGoalTemplatesByIdArchive = (options) => (options.client ?? client).patch({
4986
+ security: [{ scheme: "bearer", type: "http" }],
4987
+ url: "/admin/clinical/goal-templates/{id}/archive",
4988
+ ...options,
4989
+ headers: {
4990
+ "Content-Type": "application/vnd.api+json",
4991
+ ...options.headers
4992
+ }
4993
+ });
4754
4994
  var postAdminExtractionDocumentsUpload = (options) => (options.client ?? client).post({
4755
4995
  security: [{ scheme: "bearer", type: "http" }],
4756
4996
  url: "/admin/extraction/documents/upload",
@@ -4765,11 +5005,6 @@ var getAdminExtractionChunkEntityLinksDocumentByDocumentId = (options) => (optio
4765
5005
  url: "/admin/extraction/chunk-entity-links/document/{document_id}",
4766
5006
  ...options
4767
5007
  });
4768
- var deleteAdminClinicalClientSupplementsById = (options) => (options.client ?? client).delete({
4769
- security: [{ scheme: "bearer", type: "http" }],
4770
- url: "/admin/clinical/client-supplements/{id}",
4771
- ...options
4772
- });
4773
5008
  var getAdminClinicalClientSupplementsById = (options) => (options.client ?? client).get({
4774
5009
  security: [{ scheme: "bearer", type: "http" }],
4775
5010
  url: "/admin/clinical/client-supplements/{id}",
@@ -4878,6 +5113,11 @@ var getAdminPlanFeatureAllocationsByPlanByPlanId = (options) => (options.client
4878
5113
  url: "/admin/plan-feature-allocations/by-plan/{plan_id}",
4879
5114
  ...options
4880
5115
  });
5116
+ var getAdminClinicalPracticeResourcesCatalogArchived = (options) => (options.client ?? client).get({
5117
+ security: [{ scheme: "bearer", type: "http" }],
5118
+ url: "/admin/clinical/practice-resources/catalog/archived",
5119
+ ...options
5120
+ });
4881
5121
  var patchAdminApiKeysByIdResetPeriod = (options) => (options.client ?? client).patch({
4882
5122
  security: [{ scheme: "bearer", type: "http" }],
4883
5123
  url: "/admin/api-keys/{id}/reset-period",
@@ -4920,11 +5160,6 @@ var getAdminLlmAnalyticsById = (options) => (options.client ?? client).get({
4920
5160
  url: "/admin/llm-analytics/{id}",
4921
5161
  ...options
4922
5162
  });
4923
- var deleteAdminClinicalGoalTemplatesCatalogById = (options) => (options.client ?? client).delete({
4924
- security: [{ scheme: "bearer", type: "http" }],
4925
- url: "/admin/clinical/goal-templates/catalog/{id}",
4926
- ...options
4927
- });
4928
5163
  var getAdminClinicalGoalTemplatesCatalogById = (options) => (options.client ?? client).get({
4929
5164
  security: [{ scheme: "bearer", type: "http" }],
4930
5165
  url: "/admin/clinical/goal-templates/catalog/{id}",
@@ -5121,11 +5356,6 @@ var postAdminWholesaleAgreements = (options) => (options.client ?? client).post(
5121
5356
  ...options.headers
5122
5357
  }
5123
5358
  });
5124
- var deleteAdminClinicalClientGoalsById = (options) => (options.client ?? client).delete({
5125
- security: [{ scheme: "bearer", type: "http" }],
5126
- url: "/admin/clinical/client-goals/{id}",
5127
- ...options
5128
- });
5129
5359
  var getAdminClinicalClientGoalsById = (options) => (options.client ?? client).get({
5130
5360
  security: [{ scheme: "bearer", type: "http" }],
5131
5361
  url: "/admin/clinical/client-goals/{id}",
@@ -5178,6 +5408,11 @@ var patchAdminCrmPipelineStagesById = (options) => (options.client ?? client).pa
5178
5408
  ...options.headers
5179
5409
  }
5180
5410
  });
5411
+ var getAdminClinicalPracticeResourcesArchived = (options) => (options.client ?? client).get({
5412
+ security: [{ scheme: "bearer", type: "http" }],
5413
+ url: "/admin/clinical/practice-resources/archived",
5414
+ ...options
5415
+ });
5181
5416
  var postAdminThreadsByIdSummarize = (options) => (options.client ?? client).post({
5182
5417
  security: [{ scheme: "bearer", type: "http" }],
5183
5418
  url: "/admin/threads/{id}/summarize",
@@ -5243,6 +5478,15 @@ var getAdminVoiceRecordingsById = (options) => (options.client ?? client).get({
5243
5478
  url: "/admin/voice/recordings/{id}",
5244
5479
  ...options
5245
5480
  });
5481
+ var patchAdminClinicalMealPlansByIdArchive = (options) => (options.client ?? client).patch({
5482
+ security: [{ scheme: "bearer", type: "http" }],
5483
+ url: "/admin/clinical/meal-plans/{id}/archive",
5484
+ ...options,
5485
+ headers: {
5486
+ "Content-Type": "application/vnd.api+json",
5487
+ ...options.headers
5488
+ }
5489
+ });
5246
5490
  var patchAdminTenantsByIdBranding = (options) => (options.client ?? client).patch({
5247
5491
  security: [{ scheme: "bearer", type: "http" }],
5248
5492
  url: "/admin/tenants/{id}/branding",
@@ -5261,11 +5505,6 @@ var patchAdminApiKeysByIdRevoke = (options) => (options.client ?? client).patch(
5261
5505
  ...options.headers
5262
5506
  }
5263
5507
  });
5264
- var deleteAdminClinicalPracticeResourcesCatalogById = (options) => (options.client ?? client).delete({
5265
- security: [{ scheme: "bearer", type: "http" }],
5266
- url: "/admin/clinical/practice-resources/catalog/{id}",
5267
- ...options
5268
- });
5269
5508
  var getAdminClinicalPracticeResourcesCatalogById = (options) => (options.client ?? client).get({
5270
5509
  security: [{ scheme: "bearer", type: "http" }],
5271
5510
  url: "/admin/clinical/practice-resources/catalog/{id}",
@@ -5327,11 +5566,25 @@ var getAdminBuckets = (options) => (options.client ?? client).get({
5327
5566
  url: "/admin/buckets",
5328
5567
  ...options
5329
5568
  });
5569
+ var patchAdminClinicalClientResourceAssignmentsByIdArchive = (options) => (options.client ?? client).patch({
5570
+ security: [{ scheme: "bearer", type: "http" }],
5571
+ url: "/admin/clinical/client-resource-assignments/{id}/archive",
5572
+ ...options,
5573
+ headers: {
5574
+ "Content-Type": "application/vnd.api+json",
5575
+ ...options.headers
5576
+ }
5577
+ });
5330
5578
  var getAdminSupportRoutingRulesApplicationByApplicationId = (options) => (options.client ?? client).get({
5331
5579
  security: [{ scheme: "bearer", type: "http" }],
5332
5580
  url: "/admin/support/routing-rules/application/{application_id}",
5333
5581
  ...options
5334
5582
  });
5583
+ var getAdminClinicalNotesArchived = (options) => (options.client ?? client).get({
5584
+ security: [{ scheme: "bearer", type: "http" }],
5585
+ url: "/admin/clinical/notes/archived",
5586
+ ...options
5587
+ });
5335
5588
  var getAdminClinicalPracticeToolsCatalog = (options) => (options.client ?? client).get({
5336
5589
  security: [{ scheme: "bearer", type: "http" }],
5337
5590
  url: "/admin/clinical/practice-tools/catalog",
@@ -5444,6 +5697,15 @@ var patchAdminExtractionDocumentsByIdDismissTraining = (options) => (options.cli
5444
5697
  ...options.headers
5445
5698
  }
5446
5699
  });
5700
+ var patchAdminClinicalClientGoalsByIdArchive = (options) => (options.client ?? client).patch({
5701
+ security: [{ scheme: "bearer", type: "http" }],
5702
+ url: "/admin/clinical/client-goals/{id}/archive",
5703
+ ...options,
5704
+ headers: {
5705
+ "Content-Type": "application/vnd.api+json",
5706
+ ...options.headers
5707
+ }
5708
+ });
5447
5709
  var postAdminSysSemanticCacheClear = (options) => (options.client ?? client).post({
5448
5710
  security: [{ scheme: "bearer", type: "http" }],
5449
5711
  url: "/admin/sys/semantic-cache/clear",
@@ -5524,6 +5786,15 @@ var patchAdminApiKeysByIdRotate = (options) => (options.client ?? client).patch(
5524
5786
  ...options.headers
5525
5787
  }
5526
5788
  });
5789
+ var patchAdminClinicalHealthMetricsByIdArchive = (options) => (options.client ?? client).patch({
5790
+ security: [{ scheme: "bearer", type: "http" }],
5791
+ url: "/admin/clinical/health-metrics/{id}/archive",
5792
+ ...options,
5793
+ headers: {
5794
+ "Content-Type": "application/vnd.api+json",
5795
+ ...options.headers
5796
+ }
5797
+ });
5527
5798
  var getAdminClinicalPatients = (options) => (options.client ?? client).get({
5528
5799
  security: [{ scheme: "bearer", type: "http" }],
5529
5800
  url: "/admin/clinical/patients",
@@ -5543,6 +5814,15 @@ var getAdminUsageEventsById = (options) => (options.client ?? client).get({
5543
5814
  url: "/admin/usage-events/{id}",
5544
5815
  ...options
5545
5816
  });
5817
+ var patchAdminClinicalPracticeToolsCatalogByIdArchive = (options) => (options.client ?? client).patch({
5818
+ security: [{ scheme: "bearer", type: "http" }],
5819
+ url: "/admin/clinical/practice-tools/catalog/{id}/archive",
5820
+ ...options,
5821
+ headers: {
5822
+ "Content-Type": "application/vnd.api+json",
5823
+ ...options.headers
5824
+ }
5825
+ });
5546
5826
  var getAdminSocialAccountsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
5547
5827
  security: [{ scheme: "bearer", type: "http" }],
5548
5828
  url: "/admin/social/accounts/workspace/{workspace_id}",
@@ -5586,6 +5866,15 @@ var getAdminUsageEventsByUser = (options) => (options.client ?? client).get({
5586
5866
  url: "/admin/usage-events/by-user",
5587
5867
  ...options
5588
5868
  });
5869
+ var patchAdminClinicalClientResourceAssignmentsByIdRestore = (options) => (options.client ?? client).patch({
5870
+ security: [{ scheme: "bearer", type: "http" }],
5871
+ url: "/admin/clinical/client-resource-assignments/{id}/restore",
5872
+ ...options,
5873
+ headers: {
5874
+ "Content-Type": "application/vnd.api+json",
5875
+ ...options.headers
5876
+ }
5877
+ });
5589
5878
  var deleteAdminThreadsById = (options) => (options.client ?? client).delete({
5590
5879
  security: [{ scheme: "bearer", type: "http" }],
5591
5880
  url: "/admin/threads/{id}",
@@ -5856,6 +6145,15 @@ var getAdminCrmCustomEntitiesByEntityIdVersions = (options) => (options.client ?
5856
6145
  url: "/admin/crm/custom-entities/{entity_id}/versions",
5857
6146
  ...options
5858
6147
  });
6148
+ var patchAdminClinicalClientSupplementsByIdArchive = (options) => (options.client ?? client).patch({
6149
+ security: [{ scheme: "bearer", type: "http" }],
6150
+ url: "/admin/clinical/client-supplements/{id}/archive",
6151
+ ...options,
6152
+ headers: {
6153
+ "Content-Type": "application/vnd.api+json",
6154
+ ...options.headers
6155
+ }
6156
+ });
5859
6157
  var patchAdminCrmExportsByIdRefreshUrl = (options) => (options.client ?? client).patch({
5860
6158
  security: [{ scheme: "bearer", type: "http" }],
5861
6159
  url: "/admin/crm/exports/{id}/refresh-url",
@@ -6046,6 +6344,15 @@ var patchAdminEmailMarketingSenderProfilesByIdValidateDns = (options) => (option
6046
6344
  ...options.headers
6047
6345
  }
6048
6346
  });
6347
+ var patchAdminClinicalPracticeResourcesByIdArchive = (options) => (options.client ?? client).patch({
6348
+ security: [{ scheme: "bearer", type: "http" }],
6349
+ url: "/admin/clinical/practice-resources/{id}/archive",
6350
+ ...options,
6351
+ headers: {
6352
+ "Content-Type": "application/vnd.api+json",
6353
+ ...options.headers
6354
+ }
6355
+ });
6049
6356
  var getAdminSupportCannedResponsesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
6050
6357
  security: [{ scheme: "bearer", type: "http" }],
6051
6358
  url: "/admin/support/canned-responses/workspace/{workspace_id}",
@@ -6060,11 +6367,6 @@ var patchAdminSocialAccountsByIdDeactivate = (options) => (options.client ?? cli
6060
6367
  ...options.headers
6061
6368
  }
6062
6369
  });
6063
- var deleteAdminClinicalMealPlansById = (options) => (options.client ?? client).delete({
6064
- security: [{ scheme: "bearer", type: "http" }],
6065
- url: "/admin/clinical/meal-plans/{id}",
6066
- ...options
6067
- });
6068
6370
  var getAdminClinicalMealPlansById = (options) => (options.client ?? client).get({
6069
6371
  security: [{ scheme: "bearer", type: "http" }],
6070
6372
  url: "/admin/clinical/meal-plans/{id}",
@@ -6218,6 +6520,11 @@ var postAdminAgentsByIdValidate = (options) => (options.client ?? client).post({
6218
6520
  ...options.headers
6219
6521
  }
6220
6522
  });
6523
+ var getAdminClinicalHealthMetricsArchived = (options) => (options.client ?? client).get({
6524
+ security: [{ scheme: "bearer", type: "http" }],
6525
+ url: "/admin/clinical/health-metrics/archived",
6526
+ ...options
6527
+ });
6221
6528
  var getAdminClinicalMealPlans = (options) => (options.client ?? client).get({
6222
6529
  security: [{ scheme: "bearer", type: "http" }],
6223
6530
  url: "/admin/clinical/meal-plans",
@@ -6312,6 +6619,11 @@ var patchAdminInvitationsByIdDecline = (options) => (options.client ?? client).p
6312
6619
  ...options.headers
6313
6620
  }
6314
6621
  });
6622
+ var deleteAdminClinicalGoalTemplatesCatalogByIdPermanent = (options) => (options.client ?? client).delete({
6623
+ security: [{ scheme: "bearer", type: "http" }],
6624
+ url: "/admin/clinical/goal-templates/catalog/{id}/permanent",
6625
+ ...options
6626
+ });
6315
6627
  var postAdminEmailMarketingCampaignsByIdSend = (options) => (options.client ?? client).post({
6316
6628
  security: [{ scheme: "bearer", type: "http" }],
6317
6629
  url: "/admin/email-marketing/campaigns/{id}/send",
@@ -6395,11 +6707,6 @@ var patchAdminExtractionDocumentsByIdFinishUpload = (options) => (options.client
6395
6707
  ...options.headers
6396
6708
  }
6397
6709
  });
6398
- var deleteAdminClinicalPracticeToolsById = (options) => (options.client ?? client).delete({
6399
- security: [{ scheme: "bearer", type: "http" }],
6400
- url: "/admin/clinical/practice-tools/{id}",
6401
- ...options
6402
- });
6403
6710
  var getAdminClinicalPracticeToolsById = (options) => (options.client ?? client).get({
6404
6711
  security: [{ scheme: "bearer", type: "http" }],
6405
6712
  url: "/admin/clinical/practice-tools/{id}",
@@ -9466,7 +9773,7 @@ function createAuditNamespace(rb) {
9466
9773
  /**
9467
9774
  * List audit log entries with keyset or offset pagination.
9468
9775
  *
9469
- * Returns up to `limit` (default 50) entries sorted by `inserted_at` descending.
9776
+ * Returns up to `limit` (default 50) entries sorted by `created_at` descending.
9470
9777
  * The `actor_display_name` calculation is included automatically.
9471
9778
  *
9472
9779
  * @param params - Optional pagination and sort parameters.
@@ -9501,7 +9808,7 @@ function createAuditNamespace(rb) {
9501
9808
  * Fetch a paginated, time-sorted activity feed scoped to a tenant.
9502
9809
  *
9503
9810
  * Optionally filter by workspace, action type, actor, or date range.
9504
- * Results are sorted by `inserted_at` descending (most recent first).
9811
+ * Results are sorted by `created_at` descending (most recent first).
9505
9812
  *
9506
9813
  * @param params - Feed parameters. `tenantId` is required.
9507
9814
  * @param options - Optional request options.
@@ -9609,7 +9916,7 @@ function createAuditNamespace(rb) {
9609
9916
  `/admin/audit-logs/export`,
9610
9917
  {
9611
9918
  data: {
9612
- type: "audit_log",
9919
+ type: "audit-log",
9613
9920
  attributes: {
9614
9921
  format: params.format,
9615
9922
  tenant_id: params.tenantId,
@@ -11659,7 +11966,6 @@ function createSocialNamespace(rb) {
11659
11966
  path: { id },
11660
11967
  body: {
11661
11968
  data: {
11662
- type: "social_campaign",
11663
11969
  campaign_id: id,
11664
11970
  workspace_id: workspaceId
11665
11971
  }
@@ -11676,7 +11982,6 @@ function createSocialNamespace(rb) {
11676
11982
  path: { id },
11677
11983
  body: {
11678
11984
  data: {
11679
- type: "social_campaign",
11680
11985
  campaign_id: id,
11681
11986
  workspace_id: workspaceId,
11682
11987
  social_account_id: socialAccountId
@@ -11753,6 +12058,26 @@ function createSocialNamespace(rb) {
11753
12058
  options
11754
12059
  );
11755
12060
  },
12061
+ /**
12062
+ * List trending snapshots within a date range.
12063
+ * @param from - Start date (ISO 8601 string)
12064
+ * @param to - End date (ISO 8601 string)
12065
+ * @returns Array of TrendingSnapshot records in the range
12066
+ * @example
12067
+ * ```typescript
12068
+ * const snapshots = await admin.social.trending.listByDateRange(
12069
+ * '2026-03-01T00:00:00Z',
12070
+ * '2026-03-21T23:59:59Z',
12071
+ * );
12072
+ * ```
12073
+ */
12074
+ listByDateRange: async (from, to, options) => {
12075
+ return rb.execute(
12076
+ getAdminSocialTrendingHistoryRange,
12077
+ { query: { from, to } },
12078
+ options
12079
+ );
12080
+ },
11756
12081
  /** Trending snapshot items — individual content pieces within a snapshot. */
11757
12082
  items: {
11758
12083
  /** Get a single trending item by ID. */
@@ -15966,6 +16291,17 @@ function createRolesNamespace(rb) {
15966
16291
  const query = params ? `?${new URLSearchParams(params).toString()}` : "";
15967
16292
  return rb.rawGet(`/admin/roles${query}`);
15968
16293
  },
16294
+ /**
16295
+ * Get a single role by ID.
16296
+ *
16297
+ * @param id - Role UUID
16298
+ * @returns The role record
16299
+ * @example
16300
+ * const role = await admin.roles.get("role-uuid");
16301
+ */
16302
+ async get(id) {
16303
+ return rb.rawGet(`/admin/roles/${id}`);
16304
+ },
15969
16305
  /**
15970
16306
  * Create a new role with a set of permissions.
15971
16307
  *
@@ -16143,7 +16479,10 @@ function createThreadsNamespace(rb) {
16143
16479
  update: async (id, attributes, options) => {
16144
16480
  return rb.execute(
16145
16481
  patchAdminThreadsById,
16146
- { path: { id }, body: { data: { id, type: "thread", attributes } } },
16482
+ {
16483
+ path: { id },
16484
+ body: { data: { id, type: "chat-thread", attributes } }
16485
+ },
16147
16486
  options
16148
16487
  );
16149
16488
  },
@@ -16286,7 +16625,7 @@ function createThreadsNamespace(rb) {
16286
16625
  postAdminThreadsByIdExport,
16287
16626
  {
16288
16627
  path: { id },
16289
- body: { data: { type: "thread", format } }
16628
+ body: { data: { type: "chat-thread", format } }
16290
16629
  },
16291
16630
  options
16292
16631
  );
@@ -16307,7 +16646,7 @@ function createThreadsNamespace(rb) {
16307
16646
  complete: async (id, options) => {
16308
16647
  return rb.execute(
16309
16648
  postAdminThreadsByIdComplete,
16310
- { path: { id }, body: { data: { type: "thread" } } },
16649
+ { path: { id }, body: { data: { type: "chat-thread" } } },
16311
16650
  options
16312
16651
  );
16313
16652
  },
@@ -16495,17 +16834,76 @@ function createClinicalNamespace(rb) {
16495
16834
  options
16496
16835
  ),
16497
16836
  /**
16498
- * Delete a goal template.
16837
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
16838
+ */
16839
+ delete: async (id, options) => rb.execute(
16840
+ patchAdminClinicalGoalTemplatesByIdArchive,
16841
+ {
16842
+ path: { id },
16843
+ body: {
16844
+ data: { type: "clinical-goal-template", id, attributes: {} }
16845
+ }
16846
+ },
16847
+ options
16848
+ ),
16849
+ /**
16850
+ * Archive (soft-delete) a goal template.
16499
16851
  *
16500
16852
  * @param id - GoalTemplate UUID
16501
16853
  * @param options - Request options
16502
- * @returns `true` on successful deletion
16854
+ * @returns Archived {@link ClinicalGoalTemplate} record
16503
16855
  */
16504
- delete: async (id, options) => rb.executeDelete(
16505
- deleteAdminClinicalGoalTemplatesById,
16856
+ archive: async (id, options) => rb.execute(
16857
+ patchAdminClinicalGoalTemplatesByIdArchive,
16858
+ {
16859
+ path: { id },
16860
+ body: {
16861
+ data: { type: "clinical-goal-template", id, attributes: {} }
16862
+ }
16863
+ },
16864
+ options
16865
+ ),
16866
+ /**
16867
+ * Restore an archived goal template.
16868
+ *
16869
+ * @param id - GoalTemplate UUID
16870
+ * @param options - Request options
16871
+ * @returns Restored {@link ClinicalGoalTemplate} record
16872
+ */
16873
+ restore: async (id, options) => rb.execute(
16874
+ patchAdminClinicalGoalTemplatesByIdRestore,
16875
+ {
16876
+ path: { id },
16877
+ body: {
16878
+ data: { type: "clinical-goal-template", id, attributes: {} }
16879
+ }
16880
+ },
16881
+ options
16882
+ ),
16883
+ /**
16884
+ * Permanently delete a goal template. This action is irreversible.
16885
+ *
16886
+ * @param id - GoalTemplate UUID
16887
+ * @param options - Request options
16888
+ * @returns `true` on success
16889
+ */
16890
+ permanentDelete: async (id, options) => rb.executeDelete(
16891
+ deleteAdminClinicalGoalTemplatesByIdPermanent,
16506
16892
  { path: { id } },
16507
16893
  options
16508
16894
  ),
16895
+ /**
16896
+ * List archived goal templates in a workspace.
16897
+ *
16898
+ * @param params - Filter/pagination parameters
16899
+ * @param options - Request options
16900
+ * @returns Array of archived {@link ClinicalGoalTemplate} records
16901
+ */
16902
+ listArchived: async (params, options) => rb.execute(
16903
+ getAdminClinicalGoalTemplatesArchived,
16904
+ params ?? {},
16905
+ options
16906
+ ),
16509
16907
  /**
16510
16908
  * List application-level catalog goal templates.
16511
16909
  *
@@ -16559,17 +16957,76 @@ function createClinicalNamespace(rb) {
16559
16957
  options
16560
16958
  ),
16561
16959
  /**
16562
- * Delete a catalog goal template.
16960
+ * @deprecated Use `archiveCatalog()` instead. Now performs soft-delete, not permanent deletion.
16961
+ */
16962
+ deleteCatalog: async (id, options) => rb.execute(
16963
+ patchAdminClinicalGoalTemplatesCatalogByIdArchive,
16964
+ {
16965
+ path: { id },
16966
+ body: {
16967
+ data: { type: "clinical-goal-template", id, attributes: {} }
16968
+ }
16969
+ },
16970
+ options
16971
+ ),
16972
+ /**
16973
+ * Archive (soft-delete) a catalog goal template.
16974
+ *
16975
+ * @param id - GoalTemplate UUID
16976
+ * @param options - Request options
16977
+ * @returns Archived {@link ClinicalGoalTemplate} catalog record
16978
+ */
16979
+ archiveCatalog: async (id, options) => rb.execute(
16980
+ patchAdminClinicalGoalTemplatesCatalogByIdArchive,
16981
+ {
16982
+ path: { id },
16983
+ body: {
16984
+ data: { type: "clinical-goal-template", id, attributes: {} }
16985
+ }
16986
+ },
16987
+ options
16988
+ ),
16989
+ /**
16990
+ * Restore an archived catalog goal template.
16991
+ *
16992
+ * @param id - GoalTemplate UUID
16993
+ * @param options - Request options
16994
+ * @returns Restored {@link ClinicalGoalTemplate} catalog record
16995
+ */
16996
+ restoreCatalog: async (id, options) => rb.execute(
16997
+ patchAdminClinicalGoalTemplatesCatalogByIdRestore,
16998
+ {
16999
+ path: { id },
17000
+ body: {
17001
+ data: { type: "clinical-goal-template", id, attributes: {} }
17002
+ }
17003
+ },
17004
+ options
17005
+ ),
17006
+ /**
17007
+ * Permanently delete a catalog goal template. This action is irreversible.
16563
17008
  *
16564
17009
  * @param id - GoalTemplate UUID
16565
17010
  * @param options - Request options
16566
- * @returns `true` on successful deletion
17011
+ * @returns `true` on success
16567
17012
  */
16568
- deleteCatalog: async (id, options) => rb.executeDelete(
16569
- deleteAdminClinicalGoalTemplatesCatalogById,
17013
+ permanentDeleteCatalog: async (id, options) => rb.executeDelete(
17014
+ deleteAdminClinicalGoalTemplatesCatalogByIdPermanent,
16570
17015
  { path: { id } },
16571
17016
  options
16572
17017
  ),
17018
+ /**
17019
+ * List archived catalog goal templates.
17020
+ *
17021
+ * @param params - Filter/pagination parameters
17022
+ * @param options - Request options
17023
+ * @returns Array of archived {@link ClinicalGoalTemplate} catalog records
17024
+ */
17025
+ listArchivedCatalog: async (params, options) => rb.execute(
17026
+ getAdminClinicalGoalTemplatesCatalogArchived,
17027
+ params ?? {},
17028
+ options
17029
+ ),
16573
17030
  /**
16574
17031
  * List distinct catalog goal template categories with counts.
16575
17032
  *
@@ -16581,7 +17038,65 @@ function createClinicalNamespace(rb) {
16581
17038
  getAdminClinicalGoalTemplatesCategoriesCatalog,
16582
17039
  { query: params },
16583
17040
  options
16584
- )
17041
+ ),
17042
+ tags: {
17043
+ rename: async (workspaceId, oldTag, newTag, options) => rb.rawPatch(
17044
+ `/clinical/goal-templates/tags/rename`,
17045
+ { workspace_id: workspaceId, old_tag: oldTag, new_tag: newTag },
17046
+ options
17047
+ ),
17048
+ delete: async (workspaceId, tag, options) => rb.rawDelete(
17049
+ `/clinical/goal-templates/tags/${encodeURIComponent(tag)}?workspace_id=${encodeURIComponent(workspaceId)}`,
17050
+ options
17051
+ ),
17052
+ merge: async (workspaceId, sourceTags, targetTag, options) => rb.rawPost(
17053
+ `/clinical/goal-templates/tags/merge`,
17054
+ {
17055
+ workspace_id: workspaceId,
17056
+ source_tags: sourceTags,
17057
+ target_tag: targetTag
17058
+ },
17059
+ options
17060
+ )
17061
+ },
17062
+ imports: {
17063
+ fromFile: async (workspaceId, file, options) => {
17064
+ const formData = new FormData();
17065
+ formData.append("file", file);
17066
+ formData.append("workspace_id", workspaceId);
17067
+ return rb.rawPostMultipart(
17068
+ `/clinical/goal-templates/imports/file`,
17069
+ formData,
17070
+ options
17071
+ );
17072
+ },
17073
+ fromUrl: async (workspaceId, url, options) => rb.rawPost(
17074
+ `/clinical/goal-templates/imports/url`,
17075
+ { workspace_id: workspaceId, url },
17076
+ options
17077
+ )
17078
+ },
17079
+ duplicates: {
17080
+ getStats: async (workspaceId, options) => rb.rawGet(
17081
+ `/clinical/goal-templates/duplicates?workspace_id=${encodeURIComponent(workspaceId)}`,
17082
+ options
17083
+ ),
17084
+ listGroups: async (workspaceId, opts, options) => {
17085
+ const qs = new URLSearchParams({ workspace_id: workspaceId });
17086
+ if (opts?.threshold !== void 0)
17087
+ qs.set("threshold", String(opts.threshold));
17088
+ if (opts?.limit !== void 0) qs.set("limit", String(opts.limit));
17089
+ return rb.rawGet(
17090
+ `/clinical/goal-templates/duplicates/groups?${qs.toString()}`,
17091
+ options
17092
+ );
17093
+ },
17094
+ resolve: async (workspaceId, groupId, keepId, options) => rb.rawPost(
17095
+ `/clinical/goal-templates/duplicates/resolve`,
17096
+ { workspace_id: workspaceId, group_id: groupId, keep_id: keepId },
17097
+ options
17098
+ )
17099
+ }
16585
17100
  },
16586
17101
  /**
16587
17102
  * Manage practice-level tools (apps, wearables, platforms).
@@ -16640,17 +17155,76 @@ function createClinicalNamespace(rb) {
16640
17155
  options
16641
17156
  ),
16642
17157
  /**
16643
- * Delete a practice tool.
17158
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
17159
+ */
17160
+ delete: async (id, options) => rb.execute(
17161
+ patchAdminClinicalPracticeToolsByIdArchive,
17162
+ {
17163
+ path: { id },
17164
+ body: {
17165
+ data: { type: "clinical-practice-tool", id, attributes: {} }
17166
+ }
17167
+ },
17168
+ options
17169
+ ),
17170
+ /**
17171
+ * Archive (soft-delete) a practice tool.
16644
17172
  *
16645
17173
  * @param id - PracticeTool UUID
16646
17174
  * @param options - Request options
16647
- * @returns `true` on successful deletion
17175
+ * @returns Archived {@link ClinicalPracticeTool} record
16648
17176
  */
16649
- delete: async (id, options) => rb.executeDelete(
16650
- deleteAdminClinicalPracticeToolsById,
17177
+ archive: async (id, options) => rb.execute(
17178
+ patchAdminClinicalPracticeToolsByIdArchive,
17179
+ {
17180
+ path: { id },
17181
+ body: {
17182
+ data: { type: "clinical-practice-tool", id, attributes: {} }
17183
+ }
17184
+ },
17185
+ options
17186
+ ),
17187
+ /**
17188
+ * Restore an archived practice tool.
17189
+ *
17190
+ * @param id - PracticeTool UUID
17191
+ * @param options - Request options
17192
+ * @returns Restored {@link ClinicalPracticeTool} record
17193
+ */
17194
+ restore: async (id, options) => rb.execute(
17195
+ patchAdminClinicalPracticeToolsByIdRestore,
17196
+ {
17197
+ path: { id },
17198
+ body: {
17199
+ data: { type: "clinical-practice-tool", id, attributes: {} }
17200
+ }
17201
+ },
17202
+ options
17203
+ ),
17204
+ /**
17205
+ * Permanently delete a practice tool. This action is irreversible.
17206
+ *
17207
+ * @param id - PracticeTool UUID
17208
+ * @param options - Request options
17209
+ * @returns `true` on success
17210
+ */
17211
+ permanentDelete: async (id, options) => rb.executeDelete(
17212
+ deleteAdminClinicalPracticeToolsByIdPermanent,
16651
17213
  { path: { id } },
16652
17214
  options
16653
17215
  ),
17216
+ /**
17217
+ * List archived practice tools in a workspace.
17218
+ *
17219
+ * @param params - Filter/pagination parameters
17220
+ * @param options - Request options
17221
+ * @returns Array of archived {@link ClinicalPracticeTool} records
17222
+ */
17223
+ listArchived: async (params, options) => rb.execute(
17224
+ getAdminClinicalPracticeToolsArchived,
17225
+ params ?? {},
17226
+ options
17227
+ ),
16654
17228
  /**
16655
17229
  * List application-level catalog practice tools.
16656
17230
  *
@@ -16704,67 +17278,184 @@ function createClinicalNamespace(rb) {
16704
17278
  options
16705
17279
  ),
16706
17280
  /**
16707
- * Delete a catalog practice tool.
16708
- *
16709
- * @param id - PracticeTool UUID
16710
- * @param options - Request options
16711
- * @returns `true` on successful deletion
17281
+ * @deprecated Use `archiveCatalog()` instead. Now performs soft-delete, not permanent deletion.
16712
17282
  */
16713
- deleteCatalog: async (id, options) => rb.executeDelete(
16714
- deleteAdminClinicalPracticeToolsCatalogById,
16715
- { path: { id } },
17283
+ deleteCatalog: async (id, options) => rb.execute(
17284
+ patchAdminClinicalPracticeToolsCatalogByIdArchive,
17285
+ {
17286
+ path: { id },
17287
+ body: {
17288
+ data: { type: "clinical-practice-tool", id, attributes: {} }
17289
+ }
17290
+ },
16716
17291
  options
16717
17292
  ),
16718
17293
  /**
16719
- * List distinct catalog practice tool categories with counts.
17294
+ * Archive (soft-delete) a catalog practice tool.
16720
17295
  *
16721
- * @param params - Must include `application_id`
17296
+ * @param id - PracticeTool UUID
16722
17297
  * @param options - Request options
16723
- * @returns Array of category records
17298
+ * @returns Archived {@link ClinicalPracticeTool} catalog record
16724
17299
  */
16725
- listCatalogCategories: async (params, options) => rb.execute(
16726
- getAdminClinicalPracticeToolsCategoriesCatalog,
16727
- { query: params },
17300
+ archiveCatalog: async (id, options) => rb.execute(
17301
+ patchAdminClinicalPracticeToolsCatalogByIdArchive,
17302
+ {
17303
+ path: { id },
17304
+ body: {
17305
+ data: { type: "clinical-practice-tool", id, attributes: {} }
17306
+ }
17307
+ },
16728
17308
  options
16729
- )
16730
- },
16731
- /**
16732
- * Manage practice-level educational resources.
16733
- */
16734
- practiceResources: {
17309
+ ),
16735
17310
  /**
16736
- * List practice resources in a workspace.
17311
+ * Restore an archived catalog practice tool.
16737
17312
  *
16738
- * @param params - Filter/pagination parameters
17313
+ * @param id - PracticeTool UUID
16739
17314
  * @param options - Request options
16740
- * @returns Array of {@link ClinicalPracticeResource} records
17315
+ * @returns Restored {@link ClinicalPracticeTool} catalog record
16741
17316
  */
16742
- list: async (params, options) => rb.execute(
16743
- getAdminClinicalPracticeResources,
16744
- { query: params },
17317
+ restoreCatalog: async (id, options) => rb.execute(
17318
+ patchAdminClinicalPracticeToolsCatalogByIdRestore,
17319
+ {
17320
+ path: { id },
17321
+ body: {
17322
+ data: { type: "clinical-practice-tool", id, attributes: {} }
17323
+ }
17324
+ },
16745
17325
  options
16746
17326
  ),
16747
17327
  /**
16748
- * Get a single practice resource by ID.
17328
+ * Permanently delete a catalog practice tool. This action is irreversible.
16749
17329
  *
16750
- * @param id - PracticeResource UUID
17330
+ * @param id - PracticeTool UUID
16751
17331
  * @param options - Request options
16752
- * @returns {@link ClinicalPracticeResource} record
17332
+ * @returns `true` on success
16753
17333
  */
16754
- get: async (id, options) => rb.execute(
16755
- getAdminClinicalPracticeResourcesById,
17334
+ permanentDeleteCatalog: async (id, options) => rb.executeDelete(
17335
+ deleteAdminClinicalPracticeToolsCatalogByIdPermanent,
16756
17336
  { path: { id } },
16757
17337
  options
16758
17338
  ),
16759
17339
  /**
16760
- * Create a new practice resource.
17340
+ * List archived catalog practice tools.
16761
17341
  *
16762
- * @param attributes - Must include `workspace_id` and `title`
17342
+ * @param params - Filter/pagination parameters
16763
17343
  * @param options - Request options
16764
- * @returns Created {@link ClinicalPracticeResource} record
17344
+ * @returns Array of archived {@link ClinicalPracticeTool} catalog records
16765
17345
  */
16766
- create: async (attributes, options) => rb.execute(
16767
- postAdminClinicalPracticeResources,
17346
+ listArchivedCatalog: async (params, options) => rb.execute(
17347
+ getAdminClinicalPracticeToolsCatalogArchived,
17348
+ params ?? {},
17349
+ options
17350
+ ),
17351
+ /**
17352
+ * List distinct catalog practice tool categories with counts.
17353
+ *
17354
+ * @param params - Must include `application_id`
17355
+ * @param options - Request options
17356
+ * @returns Array of category records
17357
+ */
17358
+ listCatalogCategories: async (params, options) => rb.execute(
17359
+ getAdminClinicalPracticeToolsCategoriesCatalog,
17360
+ { query: params },
17361
+ options
17362
+ ),
17363
+ tags: {
17364
+ rename: async (workspaceId, oldTag, newTag, options) => rb.rawPatch(
17365
+ `/clinical/practice-tools/tags/rename`,
17366
+ { workspace_id: workspaceId, old_tag: oldTag, new_tag: newTag },
17367
+ options
17368
+ ),
17369
+ delete: async (workspaceId, tag, options) => rb.rawDelete(
17370
+ `/clinical/practice-tools/tags/${encodeURIComponent(tag)}?workspace_id=${encodeURIComponent(workspaceId)}`,
17371
+ options
17372
+ ),
17373
+ merge: async (workspaceId, sourceTags, targetTag, options) => rb.rawPost(
17374
+ `/clinical/practice-tools/tags/merge`,
17375
+ {
17376
+ workspace_id: workspaceId,
17377
+ source_tags: sourceTags,
17378
+ target_tag: targetTag
17379
+ },
17380
+ options
17381
+ )
17382
+ },
17383
+ imports: {
17384
+ fromFile: async (workspaceId, file, options) => {
17385
+ const formData = new FormData();
17386
+ formData.append("file", file);
17387
+ formData.append("workspace_id", workspaceId);
17388
+ return rb.rawPostMultipart(
17389
+ `/clinical/practice-tools/imports/file`,
17390
+ formData,
17391
+ options
17392
+ );
17393
+ },
17394
+ fromUrl: async (workspaceId, url, options) => rb.rawPost(
17395
+ `/clinical/practice-tools/imports/url`,
17396
+ { workspace_id: workspaceId, url },
17397
+ options
17398
+ )
17399
+ },
17400
+ duplicates: {
17401
+ getStats: async (workspaceId, options) => rb.rawGet(
17402
+ `/clinical/practice-tools/duplicates?workspace_id=${encodeURIComponent(workspaceId)}`,
17403
+ options
17404
+ ),
17405
+ listGroups: async (workspaceId, opts, options) => {
17406
+ const qs = new URLSearchParams({ workspace_id: workspaceId });
17407
+ if (opts?.threshold !== void 0)
17408
+ qs.set("threshold", String(opts.threshold));
17409
+ if (opts?.limit !== void 0) qs.set("limit", String(opts.limit));
17410
+ return rb.rawGet(
17411
+ `/clinical/practice-tools/duplicates/groups?${qs.toString()}`,
17412
+ options
17413
+ );
17414
+ },
17415
+ resolve: async (workspaceId, groupId, keepId, options) => rb.rawPost(
17416
+ `/clinical/practice-tools/duplicates/resolve`,
17417
+ { workspace_id: workspaceId, group_id: groupId, keep_id: keepId },
17418
+ options
17419
+ )
17420
+ }
17421
+ },
17422
+ /**
17423
+ * Manage practice-level educational resources.
17424
+ */
17425
+ practiceResources: {
17426
+ /**
17427
+ * List practice resources in a workspace.
17428
+ *
17429
+ * @param params - Filter/pagination parameters
17430
+ * @param options - Request options
17431
+ * @returns Array of {@link ClinicalPracticeResource} records
17432
+ */
17433
+ list: async (params, options) => rb.execute(
17434
+ getAdminClinicalPracticeResources,
17435
+ { query: params },
17436
+ options
17437
+ ),
17438
+ /**
17439
+ * Get a single practice resource by ID.
17440
+ *
17441
+ * @param id - PracticeResource UUID
17442
+ * @param options - Request options
17443
+ * @returns {@link ClinicalPracticeResource} record
17444
+ */
17445
+ get: async (id, options) => rb.execute(
17446
+ getAdminClinicalPracticeResourcesById,
17447
+ { path: { id } },
17448
+ options
17449
+ ),
17450
+ /**
17451
+ * Create a new practice resource.
17452
+ *
17453
+ * @param attributes - Must include `workspace_id` and `title`
17454
+ * @param options - Request options
17455
+ * @returns Created {@link ClinicalPracticeResource} record
17456
+ */
17457
+ create: async (attributes, options) => rb.execute(
17458
+ postAdminClinicalPracticeResources,
16768
17459
  {
16769
17460
  body: { data: { type: "clinical-practice-resource", attributes } }
16770
17461
  },
@@ -16789,17 +17480,76 @@ function createClinicalNamespace(rb) {
16789
17480
  options
16790
17481
  ),
16791
17482
  /**
16792
- * Delete a practice resource.
17483
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
17484
+ */
17485
+ delete: async (id, options) => rb.execute(
17486
+ patchAdminClinicalPracticeResourcesByIdArchive,
17487
+ {
17488
+ path: { id },
17489
+ body: {
17490
+ data: { type: "clinical-practice-resource", id, attributes: {} }
17491
+ }
17492
+ },
17493
+ options
17494
+ ),
17495
+ /**
17496
+ * Archive (soft-delete) a practice resource.
16793
17497
  *
16794
17498
  * @param id - PracticeResource UUID
16795
17499
  * @param options - Request options
16796
- * @returns `true` on successful deletion
17500
+ * @returns Archived {@link ClinicalPracticeResource} record
16797
17501
  */
16798
- delete: async (id, options) => rb.executeDelete(
16799
- deleteAdminClinicalPracticeResourcesById,
17502
+ archive: async (id, options) => rb.execute(
17503
+ patchAdminClinicalPracticeResourcesByIdArchive,
17504
+ {
17505
+ path: { id },
17506
+ body: {
17507
+ data: { type: "clinical-practice-resource", id, attributes: {} }
17508
+ }
17509
+ },
17510
+ options
17511
+ ),
17512
+ /**
17513
+ * Restore an archived practice resource.
17514
+ *
17515
+ * @param id - PracticeResource UUID
17516
+ * @param options - Request options
17517
+ * @returns Restored {@link ClinicalPracticeResource} record
17518
+ */
17519
+ restore: async (id, options) => rb.execute(
17520
+ patchAdminClinicalPracticeResourcesByIdRestore,
17521
+ {
17522
+ path: { id },
17523
+ body: {
17524
+ data: { type: "clinical-practice-resource", id, attributes: {} }
17525
+ }
17526
+ },
17527
+ options
17528
+ ),
17529
+ /**
17530
+ * Permanently delete a practice resource. This action is irreversible.
17531
+ *
17532
+ * @param id - PracticeResource UUID
17533
+ * @param options - Request options
17534
+ * @returns `true` on success
17535
+ */
17536
+ permanentDelete: async (id, options) => rb.executeDelete(
17537
+ deleteAdminClinicalPracticeResourcesByIdPermanent,
16800
17538
  { path: { id } },
16801
17539
  options
16802
17540
  ),
17541
+ /**
17542
+ * List archived practice resources in a workspace.
17543
+ *
17544
+ * @param params - Filter/pagination parameters
17545
+ * @param options - Request options
17546
+ * @returns Array of archived {@link ClinicalPracticeResource} records
17547
+ */
17548
+ listArchived: async (params, options) => rb.execute(
17549
+ getAdminClinicalPracticeResourcesArchived,
17550
+ params ?? {},
17551
+ options
17552
+ ),
16803
17553
  /**
16804
17554
  * List application-level catalog practice resources.
16805
17555
  *
@@ -16857,17 +17607,76 @@ function createClinicalNamespace(rb) {
16857
17607
  options
16858
17608
  ),
16859
17609
  /**
16860
- * Delete a catalog practice resource.
17610
+ * @deprecated Use `archiveCatalog()` instead. Now performs soft-delete, not permanent deletion.
17611
+ */
17612
+ deleteCatalog: async (id, options) => rb.execute(
17613
+ patchAdminClinicalPracticeResourcesCatalogByIdArchive,
17614
+ {
17615
+ path: { id },
17616
+ body: {
17617
+ data: { type: "clinical-practice-resource", id, attributes: {} }
17618
+ }
17619
+ },
17620
+ options
17621
+ ),
17622
+ /**
17623
+ * Archive (soft-delete) a catalog practice resource.
17624
+ *
17625
+ * @param id - PracticeResource UUID
17626
+ * @param options - Request options
17627
+ * @returns Archived {@link ClinicalPracticeResource} catalog record
17628
+ */
17629
+ archiveCatalog: async (id, options) => rb.execute(
17630
+ patchAdminClinicalPracticeResourcesCatalogByIdArchive,
17631
+ {
17632
+ path: { id },
17633
+ body: {
17634
+ data: { type: "clinical-practice-resource", id, attributes: {} }
17635
+ }
17636
+ },
17637
+ options
17638
+ ),
17639
+ /**
17640
+ * Restore an archived catalog practice resource.
16861
17641
  *
16862
17642
  * @param id - PracticeResource UUID
16863
17643
  * @param options - Request options
16864
- * @returns `true` on successful deletion
17644
+ * @returns Restored {@link ClinicalPracticeResource} catalog record
16865
17645
  */
16866
- deleteCatalog: async (id, options) => rb.executeDelete(
16867
- deleteAdminClinicalPracticeResourcesCatalogById,
17646
+ restoreCatalog: async (id, options) => rb.execute(
17647
+ patchAdminClinicalPracticeResourcesCatalogByIdRestore,
17648
+ {
17649
+ path: { id },
17650
+ body: {
17651
+ data: { type: "clinical-practice-resource", id, attributes: {} }
17652
+ }
17653
+ },
17654
+ options
17655
+ ),
17656
+ /**
17657
+ * Permanently delete a catalog practice resource. This action is irreversible.
17658
+ *
17659
+ * @param id - PracticeResource UUID
17660
+ * @param options - Request options
17661
+ * @returns `true` on success
17662
+ */
17663
+ permanentDeleteCatalog: async (id, options) => rb.executeDelete(
17664
+ deleteAdminClinicalPracticeResourcesCatalogByIdPermanent,
16868
17665
  { path: { id } },
16869
17666
  options
16870
17667
  ),
17668
+ /**
17669
+ * List archived catalog practice resources.
17670
+ *
17671
+ * @param params - Filter/pagination parameters
17672
+ * @param options - Request options
17673
+ * @returns Array of archived {@link ClinicalPracticeResource} catalog records
17674
+ */
17675
+ listArchivedCatalog: async (params, options) => rb.execute(
17676
+ getAdminClinicalPracticeResourcesCatalogArchived,
17677
+ params ?? {},
17678
+ options
17679
+ ),
16871
17680
  /**
16872
17681
  * List distinct practice resource categories in a workspace.
16873
17682
  *
@@ -16905,7 +17714,65 @@ function createClinicalNamespace(rb) {
16905
17714
  getAdminClinicalPracticeResourcesCategoriesCatalog,
16906
17715
  { query: params },
16907
17716
  options
16908
- )
17717
+ ),
17718
+ tags: {
17719
+ rename: async (workspaceId, oldTag, newTag, options) => rb.rawPatch(
17720
+ `/clinical/practice-resources/tags/rename`,
17721
+ { workspace_id: workspaceId, old_tag: oldTag, new_tag: newTag },
17722
+ options
17723
+ ),
17724
+ delete: async (workspaceId, tag, options) => rb.rawDelete(
17725
+ `/clinical/practice-resources/tags/${encodeURIComponent(tag)}?workspace_id=${encodeURIComponent(workspaceId)}`,
17726
+ options
17727
+ ),
17728
+ merge: async (workspaceId, sourceTags, targetTag, options) => rb.rawPost(
17729
+ `/clinical/practice-resources/tags/merge`,
17730
+ {
17731
+ workspace_id: workspaceId,
17732
+ source_tags: sourceTags,
17733
+ target_tag: targetTag
17734
+ },
17735
+ options
17736
+ )
17737
+ },
17738
+ imports: {
17739
+ fromFile: async (workspaceId, file, options) => {
17740
+ const formData = new FormData();
17741
+ formData.append("file", file);
17742
+ formData.append("workspace_id", workspaceId);
17743
+ return rb.rawPostMultipart(
17744
+ `/clinical/practice-resources/imports/file`,
17745
+ formData,
17746
+ options
17747
+ );
17748
+ },
17749
+ fromUrl: async (workspaceId, url, options) => rb.rawPost(
17750
+ `/clinical/practice-resources/imports/url`,
17751
+ { workspace_id: workspaceId, url },
17752
+ options
17753
+ )
17754
+ },
17755
+ duplicates: {
17756
+ getStats: async (workspaceId, options) => rb.rawGet(
17757
+ `/clinical/practice-resources/duplicates?workspace_id=${encodeURIComponent(workspaceId)}`,
17758
+ options
17759
+ ),
17760
+ listGroups: async (workspaceId, opts, options) => {
17761
+ const qs = new URLSearchParams({ workspace_id: workspaceId });
17762
+ if (opts?.threshold !== void 0)
17763
+ qs.set("threshold", String(opts.threshold));
17764
+ if (opts?.limit !== void 0) qs.set("limit", String(opts.limit));
17765
+ return rb.rawGet(
17766
+ `/clinical/practice-resources/duplicates/groups?${qs.toString()}`,
17767
+ options
17768
+ );
17769
+ },
17770
+ resolve: async (workspaceId, groupId, keepId, options) => rb.rawPost(
17771
+ `/clinical/practice-resources/duplicates/resolve`,
17772
+ { workspace_id: workspaceId, group_id: groupId, keep_id: keepId },
17773
+ options
17774
+ )
17775
+ }
16909
17776
  },
16910
17777
  // ─── New sub-namespaces (10 missing from finalize-domain audit) ───────────
16911
17778
  /** Manage clinical patient records. */
@@ -17051,30 +17918,118 @@ function createClinicalNamespace(rb) {
17051
17918
  },
17052
17919
  options
17053
17920
  ),
17054
- /** Delete a note. */
17055
- delete: async (id, options) => rb.executeDelete(
17056
- deleteAdminClinicalNotesById,
17921
+ /**
17922
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
17923
+ */
17924
+ delete: async (id, options) => rb.execute(
17925
+ patchAdminClinicalNotesByIdArchive,
17926
+ {
17927
+ path: { id },
17928
+ body: { data: { type: "clinical-note", id, attributes: {} } }
17929
+ },
17930
+ options
17931
+ ),
17932
+ /**
17933
+ * Archive (soft-delete) a note.
17934
+ *
17935
+ * @param id - Note UUID
17936
+ * @param options - Request options
17937
+ * @returns Archived {@link ClinicalNote} record
17938
+ */
17939
+ archive: async (id, options) => rb.execute(
17940
+ patchAdminClinicalNotesByIdArchive,
17941
+ {
17942
+ path: { id },
17943
+ body: { data: { type: "clinical-note", id, attributes: {} } }
17944
+ },
17945
+ options
17946
+ ),
17947
+ /**
17948
+ * Restore an archived note.
17949
+ *
17950
+ * @param id - Note UUID
17951
+ * @param options - Request options
17952
+ * @returns Restored {@link ClinicalNote} record
17953
+ */
17954
+ restore: async (id, options) => rb.execute(
17955
+ patchAdminClinicalNotesByIdRestore,
17956
+ {
17957
+ path: { id },
17958
+ body: { data: { type: "clinical-note", id, attributes: {} } }
17959
+ },
17960
+ options
17961
+ ),
17962
+ /**
17963
+ * Permanently delete a note. This action is irreversible.
17964
+ *
17965
+ * @param id - Note UUID
17966
+ * @param options - Request options
17967
+ * @returns `true` on success
17968
+ */
17969
+ permanentDelete: async (id, options) => rb.executeDelete(
17970
+ deleteAdminClinicalNotesByIdPermanent,
17057
17971
  { path: { id } },
17058
17972
  options
17059
17973
  ),
17060
- /** Approve a note (creates immutable version). */
17061
- approve: async (id, attributes, options) => rb.execute(
17974
+ /**
17975
+ * List archived notes in a workspace.
17976
+ *
17977
+ * @param params - Filter/pagination parameters
17978
+ * @param options - Request options
17979
+ * @returns Array of archived {@link ClinicalNote} records
17980
+ */
17981
+ listArchived: async (params, options) => rb.execute(
17982
+ getAdminClinicalNotesArchived,
17983
+ params ?? {},
17984
+ options
17985
+ ),
17986
+ /**
17987
+ * Approve a clinical note (HITL workflow).
17988
+ *
17989
+ * Marks the note as clinician-reviewed and approved, transitioning it
17990
+ * to `status: "approved"`. Only notes in `draft` status can be approved.
17991
+ * Creates an immutable NoteVersion snapshot.
17992
+ *
17993
+ * @param id - Note UUID
17994
+ * @param reviewedById - UUID of the reviewer (required)
17995
+ * @param options - Request options
17996
+ * @returns Updated {@link ClinicalNote} record
17997
+ */
17998
+ approve: async (id, reviewedById, options) => rb.execute(
17062
17999
  patchAdminClinicalNotesByIdApprove,
17063
18000
  {
17064
18001
  path: { id },
17065
18002
  body: {
17066
- data: { type: "clinical-note", id, attributes: attributes ?? {} }
18003
+ data: {
18004
+ type: "clinical-note",
18005
+ id,
18006
+ attributes: { reviewed_by_id: reviewedById }
18007
+ }
17067
18008
  }
17068
18009
  },
17069
18010
  options
17070
18011
  ),
17071
- /** Reject a note. */
17072
- reject: async (id, attributes, options) => rb.execute(
18012
+ /**
18013
+ * Reject a clinical note (HITL workflow).
18014
+ *
18015
+ * Marks the note as rejected, transitioning it to `status: "rejected"`.
18016
+ * Only notes in `draft` status can be rejected.
18017
+ *
18018
+ * @param id - Note UUID
18019
+ * @param reviewedById - UUID of the reviewer (required)
18020
+ * @param options - Request options
18021
+ * @returns Updated {@link ClinicalNote} record
18022
+ */
18023
+ reject: async (id, reviewedById, options) => rb.execute(
17073
18024
  patchAdminClinicalNotesByIdReject,
17074
18025
  {
17075
18026
  path: { id },
17076
18027
  body: {
17077
- data: { type: "clinical-note", id, attributes: attributes ?? {} }
18028
+ data: {
18029
+ type: "clinical-note",
18030
+ id,
18031
+ attributes: { reviewed_by_id: reviewedById }
18032
+ }
17078
18033
  }
17079
18034
  },
17080
18035
  options
@@ -17127,11 +18082,76 @@ function createClinicalNamespace(rb) {
17127
18082
  },
17128
18083
  options
17129
18084
  ),
17130
- /** Delete a health metric. */
17131
- delete: async (id, options) => rb.executeDelete(
17132
- deleteAdminClinicalHealthMetricsById,
18085
+ /**
18086
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
18087
+ */
18088
+ delete: async (id, options) => rb.execute(
18089
+ patchAdminClinicalHealthMetricsByIdArchive,
18090
+ {
18091
+ path: { id },
18092
+ body: {
18093
+ data: { type: "clinical-health-metric", id, attributes: {} }
18094
+ }
18095
+ },
18096
+ options
18097
+ ),
18098
+ /**
18099
+ * Archive (soft-delete) a health metric.
18100
+ *
18101
+ * @param id - HealthMetric UUID
18102
+ * @param options - Request options
18103
+ * @returns Archived {@link ClinicalHealthMetric} record
18104
+ */
18105
+ archive: async (id, options) => rb.execute(
18106
+ patchAdminClinicalHealthMetricsByIdArchive,
18107
+ {
18108
+ path: { id },
18109
+ body: {
18110
+ data: { type: "clinical-health-metric", id, attributes: {} }
18111
+ }
18112
+ },
18113
+ options
18114
+ ),
18115
+ /**
18116
+ * Restore an archived health metric.
18117
+ *
18118
+ * @param id - HealthMetric UUID
18119
+ * @param options - Request options
18120
+ * @returns Restored {@link ClinicalHealthMetric} record
18121
+ */
18122
+ restore: async (id, options) => rb.execute(
18123
+ patchAdminClinicalHealthMetricsByIdRestore,
18124
+ {
18125
+ path: { id },
18126
+ body: {
18127
+ data: { type: "clinical-health-metric", id, attributes: {} }
18128
+ }
18129
+ },
18130
+ options
18131
+ ),
18132
+ /**
18133
+ * Permanently delete a health metric. This action is irreversible.
18134
+ *
18135
+ * @param id - HealthMetric UUID
18136
+ * @param options - Request options
18137
+ * @returns `true` on success
18138
+ */
18139
+ permanentDelete: async (id, options) => rb.executeDelete(
18140
+ deleteAdminClinicalHealthMetricsByIdPermanent,
17133
18141
  { path: { id } },
17134
18142
  options
18143
+ ),
18144
+ /**
18145
+ * List archived health metrics in a workspace.
18146
+ *
18147
+ * @param params - Filter/pagination parameters
18148
+ * @param options - Request options
18149
+ * @returns Array of archived {@link ClinicalHealthMetric} records
18150
+ */
18151
+ listArchived: async (params, options) => rb.execute(
18152
+ getAdminClinicalHealthMetricsArchived,
18153
+ params ?? {},
18154
+ options
17135
18155
  )
17136
18156
  },
17137
18157
  /** Manage clinical meal plans. */
@@ -17169,11 +18189,70 @@ function createClinicalNamespace(rb) {
17169
18189
  },
17170
18190
  options
17171
18191
  ),
17172
- /** Delete a meal plan. */
17173
- delete: async (id, options) => rb.executeDelete(
17174
- deleteAdminClinicalMealPlansById,
18192
+ /**
18193
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
18194
+ */
18195
+ delete: async (id, options) => rb.execute(
18196
+ patchAdminClinicalMealPlansByIdArchive,
18197
+ {
18198
+ path: { id },
18199
+ body: { data: { type: "clinical-meal-plan", id, attributes: {} } }
18200
+ },
18201
+ options
18202
+ ),
18203
+ /**
18204
+ * Archive (soft-delete) a meal plan.
18205
+ *
18206
+ * @param id - MealPlan UUID
18207
+ * @param options - Request options
18208
+ * @returns Archived {@link ClinicalMealPlan} record
18209
+ */
18210
+ archive: async (id, options) => rb.execute(
18211
+ patchAdminClinicalMealPlansByIdArchive,
18212
+ {
18213
+ path: { id },
18214
+ body: { data: { type: "clinical-meal-plan", id, attributes: {} } }
18215
+ },
18216
+ options
18217
+ ),
18218
+ /**
18219
+ * Restore an archived meal plan.
18220
+ *
18221
+ * @param id - MealPlan UUID
18222
+ * @param options - Request options
18223
+ * @returns Restored {@link ClinicalMealPlan} record
18224
+ */
18225
+ restore: async (id, options) => rb.execute(
18226
+ patchAdminClinicalMealPlansByIdRestore,
18227
+ {
18228
+ path: { id },
18229
+ body: { data: { type: "clinical-meal-plan", id, attributes: {} } }
18230
+ },
18231
+ options
18232
+ ),
18233
+ /**
18234
+ * Permanently delete a meal plan. This action is irreversible.
18235
+ *
18236
+ * @param id - MealPlan UUID
18237
+ * @param options - Request options
18238
+ * @returns `true` on success
18239
+ */
18240
+ permanentDelete: async (id, options) => rb.executeDelete(
18241
+ deleteAdminClinicalMealPlansByIdPermanent,
17175
18242
  { path: { id } },
17176
18243
  options
18244
+ ),
18245
+ /**
18246
+ * List archived meal plans in a workspace.
18247
+ *
18248
+ * @param params - Filter/pagination parameters
18249
+ * @param options - Request options
18250
+ * @returns Array of archived {@link ClinicalMealPlan} records
18251
+ */
18252
+ listArchived: async (params, options) => rb.execute(
18253
+ getAdminClinicalMealPlansArchived,
18254
+ params ?? {},
18255
+ options
17177
18256
  )
17178
18257
  },
17179
18258
  /** Manage patient clinical goals. */
@@ -17211,11 +18290,76 @@ function createClinicalNamespace(rb) {
17211
18290
  },
17212
18291
  options
17213
18292
  ),
17214
- /** Delete a client goal. */
17215
- delete: async (id, options) => rb.executeDelete(
17216
- deleteAdminClinicalClientGoalsById,
18293
+ /**
18294
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
18295
+ */
18296
+ delete: async (id, options) => rb.execute(
18297
+ patchAdminClinicalClientGoalsByIdArchive,
18298
+ {
18299
+ path: { id },
18300
+ body: {
18301
+ data: { type: "clinical-client-goal", id, attributes: {} }
18302
+ }
18303
+ },
18304
+ options
18305
+ ),
18306
+ /**
18307
+ * Archive (soft-delete) a client goal.
18308
+ *
18309
+ * @param id - ClientGoal UUID
18310
+ * @param options - Request options
18311
+ * @returns Archived {@link ClinicalClientGoal} record
18312
+ */
18313
+ archive: async (id, options) => rb.execute(
18314
+ patchAdminClinicalClientGoalsByIdArchive,
18315
+ {
18316
+ path: { id },
18317
+ body: {
18318
+ data: { type: "clinical-client-goal", id, attributes: {} }
18319
+ }
18320
+ },
18321
+ options
18322
+ ),
18323
+ /**
18324
+ * Restore an archived client goal.
18325
+ *
18326
+ * @param id - ClientGoal UUID
18327
+ * @param options - Request options
18328
+ * @returns Restored {@link ClinicalClientGoal} record
18329
+ */
18330
+ restore: async (id, options) => rb.execute(
18331
+ patchAdminClinicalClientGoalsByIdRestore,
18332
+ {
18333
+ path: { id },
18334
+ body: {
18335
+ data: { type: "clinical-client-goal", id, attributes: {} }
18336
+ }
18337
+ },
18338
+ options
18339
+ ),
18340
+ /**
18341
+ * Permanently delete a client goal. This action is irreversible.
18342
+ *
18343
+ * @param id - ClientGoal UUID
18344
+ * @param options - Request options
18345
+ * @returns `true` on success
18346
+ */
18347
+ permanentDelete: async (id, options) => rb.executeDelete(
18348
+ deleteAdminClinicalClientGoalsByIdPermanent,
17217
18349
  { path: { id } },
17218
18350
  options
18351
+ ),
18352
+ /**
18353
+ * List archived client goals in a workspace.
18354
+ *
18355
+ * @param params - Filter/pagination parameters
18356
+ * @param options - Request options
18357
+ * @returns Array of archived {@link ClinicalClientGoal} records
18358
+ */
18359
+ listArchived: async (params, options) => rb.execute(
18360
+ getAdminClinicalClientGoalsArchived,
18361
+ params ?? {},
18362
+ options
17219
18363
  )
17220
18364
  },
17221
18365
  /** Manage patient supplement prescriptions. */
@@ -17251,11 +18395,76 @@ function createClinicalNamespace(rb) {
17251
18395
  },
17252
18396
  options
17253
18397
  ),
17254
- /** Delete a client supplement. */
17255
- delete: async (id, options) => rb.executeDelete(
17256
- deleteAdminClinicalClientSupplementsById,
18398
+ /**
18399
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
18400
+ */
18401
+ delete: async (id, options) => rb.execute(
18402
+ patchAdminClinicalClientSupplementsByIdArchive,
18403
+ {
18404
+ path: { id },
18405
+ body: {
18406
+ data: { type: "clinical-client-supplement", id, attributes: {} }
18407
+ }
18408
+ },
18409
+ options
18410
+ ),
18411
+ /**
18412
+ * Archive (soft-delete) a client supplement.
18413
+ *
18414
+ * @param id - ClientSupplement UUID
18415
+ * @param options - Request options
18416
+ * @returns Archived {@link ClinicalClientSupplement} record
18417
+ */
18418
+ archive: async (id, options) => rb.execute(
18419
+ patchAdminClinicalClientSupplementsByIdArchive,
18420
+ {
18421
+ path: { id },
18422
+ body: {
18423
+ data: { type: "clinical-client-supplement", id, attributes: {} }
18424
+ }
18425
+ },
18426
+ options
18427
+ ),
18428
+ /**
18429
+ * Restore an archived client supplement.
18430
+ *
18431
+ * @param id - ClientSupplement UUID
18432
+ * @param options - Request options
18433
+ * @returns Restored {@link ClinicalClientSupplement} record
18434
+ */
18435
+ restore: async (id, options) => rb.execute(
18436
+ patchAdminClinicalClientSupplementsByIdRestore,
18437
+ {
18438
+ path: { id },
18439
+ body: {
18440
+ data: { type: "clinical-client-supplement", id, attributes: {} }
18441
+ }
18442
+ },
18443
+ options
18444
+ ),
18445
+ /**
18446
+ * Permanently delete a client supplement. This action is irreversible.
18447
+ *
18448
+ * @param id - ClientSupplement UUID
18449
+ * @param options - Request options
18450
+ * @returns `true` on success
18451
+ */
18452
+ permanentDelete: async (id, options) => rb.executeDelete(
18453
+ deleteAdminClinicalClientSupplementsByIdPermanent,
17257
18454
  { path: { id } },
17258
18455
  options
18456
+ ),
18457
+ /**
18458
+ * List archived client supplements in a workspace.
18459
+ *
18460
+ * @param params - Filter/pagination parameters
18461
+ * @param options - Request options
18462
+ * @returns Array of archived {@link ClinicalClientSupplement} records
18463
+ */
18464
+ listArchived: async (params, options) => rb.execute(
18465
+ getAdminClinicalClientSupplementsArchived,
18466
+ params ?? {},
18467
+ options
17259
18468
  )
17260
18469
  },
17261
18470
  /** View and update clinical delivery audit records. */
@@ -17333,11 +18542,88 @@ function createClinicalNamespace(rb) {
17333
18542
  },
17334
18543
  options
17335
18544
  ),
17336
- /** Delete a resource assignment. */
17337
- delete: async (id, options) => rb.executeDelete(
17338
- deleteAdminClinicalClientResourceAssignmentsById,
18545
+ /**
18546
+ * @deprecated Use `archive()` instead. Now performs soft-delete, not permanent deletion.
18547
+ */
18548
+ delete: async (id, options) => rb.execute(
18549
+ patchAdminClinicalClientResourceAssignmentsByIdArchive,
18550
+ {
18551
+ path: { id },
18552
+ body: {
18553
+ data: {
18554
+ type: "clinical-client-resource-assignment",
18555
+ id,
18556
+ attributes: {}
18557
+ }
18558
+ }
18559
+ },
18560
+ options
18561
+ ),
18562
+ /**
18563
+ * Archive (soft-delete) a resource assignment.
18564
+ *
18565
+ * @param id - ClientResourceAssignment UUID
18566
+ * @param options - Request options
18567
+ * @returns Archived {@link ClinicalClientResourceAssignment} record
18568
+ */
18569
+ archive: async (id, options) => rb.execute(
18570
+ patchAdminClinicalClientResourceAssignmentsByIdArchive,
18571
+ {
18572
+ path: { id },
18573
+ body: {
18574
+ data: {
18575
+ type: "clinical-client-resource-assignment",
18576
+ id,
18577
+ attributes: {}
18578
+ }
18579
+ }
18580
+ },
18581
+ options
18582
+ ),
18583
+ /**
18584
+ * Restore an archived resource assignment.
18585
+ *
18586
+ * @param id - ClientResourceAssignment UUID
18587
+ * @param options - Request options
18588
+ * @returns Restored {@link ClinicalClientResourceAssignment} record
18589
+ */
18590
+ restore: async (id, options) => rb.execute(
18591
+ patchAdminClinicalClientResourceAssignmentsByIdRestore,
18592
+ {
18593
+ path: { id },
18594
+ body: {
18595
+ data: {
18596
+ type: "clinical-client-resource-assignment",
18597
+ id,
18598
+ attributes: {}
18599
+ }
18600
+ }
18601
+ },
18602
+ options
18603
+ ),
18604
+ /**
18605
+ * Permanently delete a resource assignment. This action is irreversible.
18606
+ *
18607
+ * @param id - ClientResourceAssignment UUID
18608
+ * @param options - Request options
18609
+ * @returns `true` on success
18610
+ */
18611
+ permanentDelete: async (id, options) => rb.executeDelete(
18612
+ deleteAdminClinicalClientResourceAssignmentsByIdPermanent,
17339
18613
  { path: { id } },
17340
18614
  options
18615
+ ),
18616
+ /**
18617
+ * List archived resource assignments in a workspace.
18618
+ *
18619
+ * @param params - Filter/pagination parameters
18620
+ * @param options - Request options
18621
+ * @returns Array of archived {@link ClinicalClientResourceAssignment} records
18622
+ */
18623
+ listArchived: async (params, options) => rb.execute(
18624
+ getAdminClinicalClientResourceAssignmentsArchived,
18625
+ params ?? {},
18626
+ options
17341
18627
  )
17342
18628
  },
17343
18629
  /** View AI supplement recommendation cache entries. */
@@ -18125,6 +19411,152 @@ function createPlatformTonesNamespace(rb) {
18125
19411
  };
18126
19412
  }
18127
19413
 
19414
+ // src/namespaces/channels.ts
19415
+ function createChannelsNamespace(rb) {
19416
+ return {
19417
+ /**
19418
+ * Exchange the current bearer token for a scoped channel token.
19419
+ *
19420
+ * @param request - Workspace and channel scope
19421
+ * @param options - Request options (signal, etc.)
19422
+ * @returns Channel token response
19423
+ */
19424
+ async authorize(request, options) {
19425
+ const raw = await rb.rawPost(
19426
+ "/isv/channels/token",
19427
+ {
19428
+ workspace_id: request.workspaceId,
19429
+ channels: request.channels
19430
+ },
19431
+ options
19432
+ );
19433
+ return {
19434
+ channelToken: raw.channel_token,
19435
+ expiresAt: raw.expires_at,
19436
+ channels: raw.channels,
19437
+ workspaceId: raw.workspace_id
19438
+ };
19439
+ }
19440
+ };
19441
+ }
19442
+
19443
+ // src/namespaces/imports.ts
19444
+ function createImportsNamespace(rb) {
19445
+ return {
19446
+ /**
19447
+ * List available import adapter types for the current application.
19448
+ * @returns Array of adapter metadata objects
19449
+ * @example
19450
+ * const adapters = await admin.imports.listAdapters();
19451
+ * // [{ key: "clinical:goal", display_name: "Clinical Goals", ... }]
19452
+ */
19453
+ listAdapters: async (options) => rb.rawGet(`/isv/imports/adapters`, options).then((r) => r.data),
19454
+ /**
19455
+ * Submit a JSON batch import.
19456
+ * @param params - adapter key, workspace_id, and rows array
19457
+ * @returns Import job with id and initial status
19458
+ * @example
19459
+ * const result = await admin.imports.batch({
19460
+ * adapter: "clinical:goal",
19461
+ * workspace_id: "ws_123",
19462
+ * rows: [{ contact_id: "...", title: "Increase water intake", goal_type: "hydration" }]
19463
+ * });
19464
+ */
19465
+ batch: async (params, options) => rb.rawPost(
19466
+ `/isv/imports/batch`,
19467
+ {
19468
+ adapter_key: params.adapter,
19469
+ workspace_id: params.workspace_id,
19470
+ rows: params.rows,
19471
+ metadata: params.metadata
19472
+ },
19473
+ options
19474
+ ),
19475
+ /**
19476
+ * Upload a CSV file for import.
19477
+ * @param file - CSV file (File or Blob)
19478
+ * @param params - adapter key and workspace_id
19479
+ * @returns Import job with id and initial status
19480
+ * @example
19481
+ * const result = await admin.imports.upload(csvFile, {
19482
+ * adapter: "clinical:patient_bundle",
19483
+ * workspace_id: "ws_123"
19484
+ * });
19485
+ */
19486
+ upload: async (file, params, options) => {
19487
+ const formData = new FormData();
19488
+ formData.append("file", file);
19489
+ formData.append("adapter_key", params.adapter);
19490
+ formData.append("workspace_id", params.workspace_id);
19491
+ if (params.column_mapping)
19492
+ formData.append(
19493
+ "column_mapping",
19494
+ JSON.stringify(params.column_mapping)
19495
+ );
19496
+ if (params.metadata)
19497
+ formData.append("metadata", JSON.stringify(params.metadata));
19498
+ return rb.rawPostMultipart(`/isv/imports/upload`, formData, options);
19499
+ },
19500
+ /**
19501
+ * List imports for a workspace with optional filters.
19502
+ * @param params - workspace_id required, adapter and status optional
19503
+ * @returns Paginated list of imports
19504
+ * @example
19505
+ * const imports = await admin.imports.list({ workspace_id: "ws_123", adapter: "crm:contact" });
19506
+ */
19507
+ list: async (params, options) => rb.rawGet(
19508
+ `/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}` : ""}`,
19509
+ options
19510
+ ),
19511
+ /**
19512
+ * Get a single import by ID.
19513
+ * @param id - Import UUID
19514
+ * @returns Full import record including error_report
19515
+ * @example
19516
+ * const imp = await admin.imports.get("uuid-here");
19517
+ */
19518
+ get: async (id, options) => rb.rawGet(`/isv/imports/${id}`, options).then((r) => r.data),
19519
+ /**
19520
+ * Get per-row outcomes for a chunked import.
19521
+ * @param importId - Import UUID
19522
+ * @param params - Pagination options
19523
+ * @returns Paginated list of row outcomes
19524
+ * @example
19525
+ * const rows = await admin.imports.rows("uuid-here", { offset: 0, limit: 50 });
19526
+ */
19527
+ rows: async (importId, params, options) => rb.rawGet(
19528
+ `/isv/imports/${importId}/rows${params?.offset !== void 0 ? `?offset=${params.offset}` : ""}${params?.limit !== void 0 ? `${params?.offset !== void 0 ? "&" : "?"}limit=${params.limit}` : ""}`,
19529
+ options
19530
+ ),
19531
+ /**
19532
+ * Confirm a validated import for commit.
19533
+ * @param id - Import UUID
19534
+ * @param params - workspace_id for authorization
19535
+ * @returns Updated import with status "committing"
19536
+ * @example
19537
+ * await admin.imports.confirm("uuid-here", { workspace_id: "ws_123" });
19538
+ */
19539
+ confirm: async (id, params, options) => rb.rawPost(
19540
+ `/isv/imports/${id}/confirm`,
19541
+ params,
19542
+ options
19543
+ ),
19544
+ /**
19545
+ * Cancel a validated import.
19546
+ * @param id - Import UUID
19547
+ * @param params - workspace_id for authorization
19548
+ * @returns Updated import with status "cancelled"
19549
+ * @example
19550
+ * await admin.imports.cancel("uuid-here", { workspace_id: "ws_123" });
19551
+ */
19552
+ cancel: async (id, params, options) => rb.rawPost(
19553
+ `/isv/imports/${id}/cancel`,
19554
+ params,
19555
+ options
19556
+ )
19557
+ };
19558
+ }
19559
+
18128
19560
  // src/gpt-admin.ts
18129
19561
  var GptAdmin = class extends BaseClient {
18130
19562
  constructor(config) {
@@ -18175,6 +19607,8 @@ var GptAdmin = class extends BaseClient {
18175
19607
  this.invitations = createInvitationsNamespace(rb);
18176
19608
  this.brandIdentities = createBrandIdentitiesNamespace(rb);
18177
19609
  this.platformTones = createPlatformTonesNamespace(rb);
19610
+ this.channels = createChannelsNamespace(rb);
19611
+ this.imports = createImportsNamespace(rb);
18178
19612
  }
18179
19613
  };
18180
19614
 
@@ -18193,6 +19627,7 @@ export {
18193
19627
  ServerError,
18194
19628
  TimeoutError,
18195
19629
  ValidationError,
19630
+ createImportsNamespace,
18196
19631
  index_default as default,
18197
19632
  handleApiError
18198
19633
  };