@apextelemed/partner-core 0.5.3 → 0.6.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.
Files changed (44) hide show
  1. package/README.md +18 -0
  2. package/dist/api/index.d.ts +1 -1
  3. package/dist/api/index.js +3 -3
  4. package/dist/api/index.jsx +3 -3
  5. package/dist/chunk/{OWTKSSYT.jsx → 4ZSZHZQV.jsx} +2 -2
  6. package/dist/chunk/{4A2CPTUM.jsx → 5HNZ7SEM.jsx} +12 -8
  7. package/dist/chunk/{7AJQ5SVA.js → BEDW4XUM.js} +47 -5
  8. package/dist/chunk/BEDW4XUM.js.map +1 -0
  9. package/dist/chunk/{3MRCEVWC.js → BVLA7ATM.js} +3 -3
  10. package/dist/chunk/{3MRCEVWC.js.map → BVLA7ATM.js.map} +1 -1
  11. package/dist/chunk/{2MRJESYW.jsx → EVCGDF5D.jsx} +46 -4
  12. package/dist/chunk/{XKCIXSN4.js → HKNTNZRW.js} +3291 -1527
  13. package/dist/chunk/HKNTNZRW.js.map +1 -0
  14. package/dist/chunk/{OLLSJX7B.jsx → HXMLRDIJ.jsx} +7 -5
  15. package/dist/chunk/{RFDMPQG4.js → MLXPHJLR.js} +3 -3
  16. package/dist/chunk/{RFDMPQG4.js.map → MLXPHJLR.js.map} +1 -1
  17. package/dist/chunk/{BVHNZLDK.jsx → NBB2VTQK.jsx} +2 -2
  18. package/dist/chunk/{AH2VJK7Q.js → NSRQXBHK.js} +13 -9
  19. package/dist/chunk/NSRQXBHK.js.map +1 -0
  20. package/dist/chunk/{LVGOEJHQ.js → QTGJY3YQ.js} +3 -3
  21. package/dist/chunk/{LVGOEJHQ.js.map → QTGJY3YQ.js.map} +1 -1
  22. package/dist/chunk/{IWWUVNBB.jsx → SSVJ27MR.jsx} +2439 -1253
  23. package/dist/chunk/{FNOEL4FK.jsx → WLEIDQ5M.jsx} +2 -2
  24. package/dist/chunk/{QCYSYBQ7.js → WUE4VQBA.js} +8 -6
  25. package/dist/chunk/WUE4VQBA.js.map +1 -0
  26. package/dist/{client-CY8nbizi.d.ts → client-B6Kt7LWo.d.ts} +103 -2
  27. package/dist/flows/index.d.ts +46 -2
  28. package/dist/flows/index.js +6 -6
  29. package/dist/flows/index.jsx +6 -6
  30. package/dist/index/index.d.ts +2 -2
  31. package/dist/index/index.js +7 -7
  32. package/dist/index/index.jsx +7 -7
  33. package/dist/pages/index.d.ts +8 -3
  34. package/dist/pages/index.js +5 -5
  35. package/dist/pages/index.jsx +5 -5
  36. package/dist/stores/index.d.ts +1 -1
  37. package/dist/stores/index.js +2 -2
  38. package/dist/stores/index.jsx +2 -2
  39. package/dist/theme/member-portal.css +83 -0
  40. package/package.json +1 -1
  41. package/dist/chunk/7AJQ5SVA.js.map +0 -1
  42. package/dist/chunk/AH2VJK7Q.js.map +0 -1
  43. package/dist/chunk/QCYSYBQ7.js.map +0 -1
  44. package/dist/chunk/XKCIXSN4.js.map +0 -1
package/README.md CHANGED
@@ -393,6 +393,24 @@ address and subscription-status vocabularies). Signatures are on the
393
393
  Hooks with no shared JSX (dashboard, messages, catalog, affiliate) are Tier 2
394
394
  only: the site renders its own page on top.
395
395
 
396
+ #### Deep-linking into Messages
397
+
398
+ `<MemberPortal>`'s Messages tab reads its destination from the URL, so any
399
+ link into the portal — an email, a support macro, another tab's CTA — can
400
+ pre-select it instead of landing on the merged conversation list:
401
+
402
+ - `#messages` — open the tab itself.
403
+ - `?c=<id>` — open this exact conversation/thread. Wins over `to`/`cat` when
404
+ both are present; its channel is implied by the thread's own source.
405
+ - `?to=care|support` — pre-select which side of the merged inbox to land on.
406
+ - `?cat=<category>` — a support category (`billing`, `orders`, `account`,
407
+ `technical`, `other`); support-only, and implies `to=support` when `to` is
408
+ omitted. Unknown values on any of these params are ignored, not surfaced.
409
+
410
+ The same shape is `MessagesIntent` (exported from `/flows`), which every
411
+ in-portal CTA passes to `onOpenMessages(intent?)` — the URL query params are
412
+ just that intent's serialization for links, not a separate mechanism.
413
+
396
414
  ### Admin
397
415
 
398
416
  `<AdminDashboard>` is themed via CSS variables, not the Primitives interface — back-office UIs don't differentiate the brand. Sites import the default stylesheet once and override individual variables to match their look:
@@ -1,4 +1,4 @@
1
- export { A as AddressVerifyResult, a as AdminApexDrug, b as AdminBillingAttempt, c as AdminCategory, d as AdminCategoryInput, e as AdminCustomer, f as AdminCustomerFacts, g as AdminCustomerFunnel, h as AdminCustomerListParams, i as AdminCustomerOverview, j as AdminCustomerProfile, k as AdminCustomerRequest, l as AdminCustomerRow, m as AdminCustomerSupport, n as AdminCustomerSupportThread, o as AdminDashboardStats, p as AdminLifecycle, q as AdminLifecycleBucket, r as AdminListParams, s as AdminOrderSummary, t as AdminPayment, u as AdminPaymentDetail, v as AdminProduct, w as AdminPromoCode, x as AdminPromoCodeInput, y as AdminRefundResult, z as AdminSale, B as AdminSaleInput, C as AdminSubscription, D as AdminSubscriptionDetail, E as AdminSubscriptionPatch, F as AdminSubscriptionWriteResult, G as AdminSupportCustomer, H as AdminSupportStats, I as AdminSupportThread, J as AdminWebhookEvent, K as Affiliate, L as AffiliateAuthTokens, M as AffiliateClickRecord, N as AffiliateConversion, O as AffiliateDashboardLinks, P as AffiliateDashboardProfile, Q as AffiliateDashboardStats, R as AffiliateDownlineMember, S as AffiliateEarningsBreakdown, T as AffiliatePaymentMethod, U as AffiliateProgram, V as AffiliateRegisterInput, W as AffiliateRegisterResponse, X as AffiliateSession, Y as AffiliateStatsResponse, Z as AffiliateStatus, _ as AffiliateTrackResponse, $ as ApiError, a0 as ApiResponse, a1 as AttributionMethod, a2 as AuthTokens, a3 as CatalogProduct, a4 as CheckoutAddress, a5 as CheckoutPayload, a6 as CheckoutResult, a7 as CommissionConfig, a8 as CommissionStatus, a9 as CompleteSurveyPayload, aa as CreateAffiliatePayload, ab as CreateAffiliateProgramPayload, ac as CreateOrderPayload, ad as CreateRequestPayload, ae as CreateSubscriptionPayload, af as CustomerDiscountConfig, ag as DeliveryInfo, ah as DiscountType, ai as EmailTemplatesMap, aj as LoginPayload, ak as MemberPrescriptionRequest, al as MemberSurveyMode, am as MemberSurveyResponseSummary, an as MemberSurveyTranscript, ao as MemberSurveyTranscriptItem, ap as MemberSurveyTranscriptSection, aq as MembersMeResponse, ar as Order, as as OrderItemInput, at as PaginationParams, au as PaymentCallbackPayload, av as PaymentInitiatePayload, aw as PaymentType, ax as PendingRenewalSurvey, ay as Placeholder, az as ProductSaleSummary, aA as PromoValidationResponse, aB as PublicCategory, aC as RegisterAndSubscribePayload, aD as RegisterPayload, aE as RenewalStatus, aF as SUPPORT_ATTACHMENT_MAX_BYTES, aG as SUPPORT_ATTACHMENT_MIME_TYPES, aH as SelectDrugPayload, aI as SendMessagePayload, aJ as SendToPharmacyPayload, aK as SupportAttachment, aL as SupportMessage, aM as SupportRealtimeToken, aN as SupportThread, aO as SupportThreadCategory, aP as SupportThreadStatus, aQ as SurveySubmitPayload, aR as TemplatePlaceholdersMap, aS as TemplateText, aT as TokenTrackName, aU as UpdateAffiliatePayload, aV as UpdateAffiliateProgramPayload, aW as UpdatePaymentMethodPayload, aX as UpdateProfilePayload, aY as User, aZ as addressesApi, a_ as adminAffiliatesApi, a$ as adminApi, b0 as affiliateAuthStorageKey, b1 as affiliatePortalApi, b2 as apexApi, b3 as apiFetch, b4 as authApi, b5 as authStorageKey, b6 as clearAffiliateTokens, b7 as clearTokens, b8 as getAffiliateTokens, b9 as getTokens, ba as membersApi, bb as messagesApi, bc as newIdempotencyKey, bd as onTokensCleared, be as ordersApi, bf as paymentsApi, bg as productsApi, bh as promoCodesApi, bi as setAffiliateTokens, bj as setTokens, bk as subscriptionsApi, bl as supportApi, bm as usersApi } from '../client-CY8nbizi.js';
1
+ export { A as AddressVerifyResult, a as AdminApexDrug, b as AdminBillingAttempt, c as AdminCategory, d as AdminCategoryInput, e as AdminCustomer, f as AdminCustomerFacts, g as AdminCustomerFunnel, h as AdminCustomerListParams, i as AdminCustomerOverview, j as AdminCustomerProfile, k as AdminCustomerRequest, l as AdminCustomerRow, m as AdminCustomerSupport, n as AdminCustomerSupportThread, o as AdminDashboardStats, p as AdminLifecycle, q as AdminLifecycleBucket, r as AdminListParams, s as AdminOrderSummary, t as AdminPayment, u as AdminPaymentDetail, v as AdminProduct, w as AdminPromoCode, x as AdminPromoCodeInput, y as AdminRefundResult, z as AdminSale, B as AdminSaleInput, C as AdminSubscription, D as AdminSubscriptionDetail, E as AdminSubscriptionPatch, F as AdminSubscriptionWriteResult, G as AdminSupportCustomer, H as AdminSupportStats, I as AdminSupportThread, J as AdminWebhookEvent, K as Affiliate, L as AffiliateAuthTokens, M as AffiliateClickRecord, N as AffiliateConversion, O as AffiliateDashboardLinks, P as AffiliateDashboardProfile, Q as AffiliateDashboardStats, R as AffiliateDownlineMember, S as AffiliateEarningsBreakdown, T as AffiliatePaymentMethod, U as AffiliateProgram, V as AffiliateRegisterInput, W as AffiliateRegisterResponse, X as AffiliateSession, Y as AffiliateStatsResponse, Z as AffiliateStatus, _ as AffiliateTrackResponse, $ as ApiError, a0 as ApiResponse, a1 as AttributionMethod, a2 as AuthTokens, a3 as BillingReminderSettings, a4 as CatalogProduct, a5 as CheckoutAddress, a6 as CheckoutPayload, a7 as CheckoutResult, a8 as CommissionConfig, a9 as CommissionStatus, aa as CompleteSurveyPayload, ab as CreateAffiliatePayload, ac as CreateAffiliateProgramPayload, ad as CreateOrderPayload, ae as CreateRequestPayload, af as CreateSubscriptionPayload, ag as CustomTemplate, ah as CustomTemplateInput, ai as CustomerDiscountConfig, aj as DeliveryInfo, ak as DiscountType, al as EmailNotificationSettings, am as EmailTemplatesMap, an as LoginPayload, ao as MemberPrescriptionRequest, ap as MemberSurveyMode, aq as MemberSurveyResponseSummary, ar as MemberSurveyTranscript, as as MemberSurveyTranscriptItem, at as MemberSurveyTranscriptSection, au as MembersMeResponse, av as Order, aw as OrderItemInput, ax as PaginationParams, ay as PaymentCallbackPayload, az as PaymentInitiatePayload, aA as PaymentType, aB as PendingRenewalSurvey, aC as Placeholder, aD as ProductSaleSummary, aE as PromoValidationResponse, aF as PublicCategory, aG as RegisterAndSubscribePayload, aH as RegisterPayload, aI as RenewalStatus, aJ as SUPPORT_ATTACHMENT_MAX_BYTES, aK as SUPPORT_ATTACHMENT_MIME_TYPES, aL as SelectDrugPayload, aM as SendMessagePayload, aN as SendToPharmacyPayload, aO as SupportAttachment, aP as SupportMessage, aQ as SupportRealtimeToken, aR as SupportThread, aS as SupportThreadCategory, aT as SupportThreadStatus, aU as SurveySubmitPayload, aV as TemplatePlaceholdersMap, aW as TemplateText, aX as TokenTrackName, aY as UpdateAffiliatePayload, aZ as UpdateAffiliateProgramPayload, a_ as UpdatePaymentMethodPayload, a$ as UpdateProfilePayload, b0 as User, b1 as addressesApi, b2 as adminAffiliatesApi, b3 as adminApi, b4 as affiliateAuthStorageKey, b5 as affiliatePortalApi, b6 as apexApi, b7 as apiFetch, b8 as authApi, b9 as authStorageKey, ba as clearAffiliateTokens, bb as clearTokens, bc as getAffiliateTokens, bd as getTokens, be as membersApi, bf as messagesApi, bg as newIdempotencyKey, bh as onTokensCleared, bi as ordersApi, bj as paymentsApi, bk as productsApi, bl as promoCodesApi, bm as setAffiliateTokens, bn as setTokens, bo as subscriptionsApi, bp as supportApi, bq as usersApi } from '../client-B6Kt7LWo.js';
2
2
  export { EmbedApiError as ApexV2ApiError, EmbedApiClient, EmbedApiClientOptions, EmbedApiError, EmbedEvent, EmbedEventType, FetchLike, PatientInfo, V2Answer, V2ComposedSurvey, V2DrugResult, V2QualificationResult, V2Question, V2QuestionOption, V2Section, V2Step, V2SubmitResult, V2VisibilityCondition, createEmbedApiClient, disqualificationReasonText, disqualifiedDrugIds, qualifiedDrugIds } from '@apextelemed/survey-core';
3
3
  export { C as CartCaptureConfig, a as CartSnapshotLine, F as FunnelConfig, b as FunnelDraftPayload, R as ResumedCart, c as ResumedCartLine, d as ResumedDraft, e as adoptCartId, f as adoptFunnelSessionId, g as captureAuthHeader, h as cartId, i as fetchCartConfig, j as fetchFunnelConfig, k as fetchResumedCart, l as fetchResumedDraft, m as funnelSessionId, p as peekFunnelSessionId, n as postCartSnapshot, o as postFunnelEvent, r as readCartToken, q as readResumeToken, s as resetCartConfigCache, t as resetCartId, u as resetFunnelConfigCache, v as saveFunnelDraft, w as stripCartToken, x as stripResumeToken } from '../cart-BwUwSzWh.js';
4
4
 
package/dist/api/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import '../chunk/JSHO46VZ.js';
2
- export { adoptCartId, capturePromoCode, cartId, clearPromoCode, fetchCartConfig, fetchResumedCart, postCartSnapshot, readCartToken, readPromoCode, resetCartConfigCache, resetCartId, stripCartToken } from '../chunk/3MRCEVWC.js';
2
+ export { adoptCartId, capturePromoCode, cartId, clearPromoCode, fetchCartConfig, fetchResumedCart, postCartSnapshot, readCartToken, readPromoCode, resetCartConfigCache, resetCartId, stripCartToken } from '../chunk/BVLA7ATM.js';
3
3
  export { EmbedApiError2 as ApexV2ApiError, EmbedApiError, createEmbedApiClient, disqualificationReasonText, disqualifiedDrugIds, qualifiedDrugIds } from '../chunk/LZWA44KD.js';
4
- export { adoptFunnelSessionId, captureAuthHeader, fetchFunnelConfig, fetchResumedDraft, funnelSessionId, peekFunnelSessionId, postFunnelEvent, readResumeToken, resetFunnelConfigCache, saveFunnelDraft, stripResumeToken } from '../chunk/LVGOEJHQ.js';
5
- export { ApiError, SUPPORT_ATTACHMENT_MAX_BYTES, SUPPORT_ATTACHMENT_MIME_TYPES, addressesApi, adminAffiliatesApi, adminApi, affiliateAuthStorageKey, affiliatePortalApi, apexApi, apiFetch, authApi, authStorageKey, captureAffiliateRef, clearAffiliateRef, clearAffiliateTokens, clearTokens, getAffiliateTokens, getTokens, membersApi, messagesApi, newIdempotencyKey, onTokensCleared, ordersApi, paymentsApi, productsApi, promoCodesApi, readAffiliateRef, setAffiliateTokens, setTokens, subscriptionsApi, supportApi, usersApi } from '../chunk/7AJQ5SVA.js';
4
+ export { adoptFunnelSessionId, captureAuthHeader, fetchFunnelConfig, fetchResumedDraft, funnelSessionId, peekFunnelSessionId, postFunnelEvent, readResumeToken, resetFunnelConfigCache, saveFunnelDraft, stripResumeToken } from '../chunk/QTGJY3YQ.js';
5
+ export { ApiError, SUPPORT_ATTACHMENT_MAX_BYTES, SUPPORT_ATTACHMENT_MIME_TYPES, addressesApi, adminAffiliatesApi, adminApi, affiliateAuthStorageKey, affiliatePortalApi, apexApi, apiFetch, authApi, authStorageKey, captureAffiliateRef, clearAffiliateRef, clearAffiliateTokens, clearTokens, getAffiliateTokens, getTokens, membersApi, messagesApi, newIdempotencyKey, onTokensCleared, ordersApi, paymentsApi, productsApi, promoCodesApi, readAffiliateRef, setAffiliateTokens, setTokens, subscriptionsApi, supportApi, usersApi } from '../chunk/BEDW4XUM.js';
6
6
  import '../chunk/5XGPFYIJ.js';
7
7
  //# sourceMappingURL=index.js.map
8
8
  //# sourceMappingURL=index.js.map
@@ -12,7 +12,7 @@ import {
12
12
  resetCartConfigCache,
13
13
  resetCartId,
14
14
  stripCartToken
15
- } from "../chunk/OWTKSSYT.jsx";
15
+ } from "../chunk/4ZSZHZQV.jsx";
16
16
  import {
17
17
  EmbedApiError,
18
18
  EmbedApiError2,
@@ -33,7 +33,7 @@ import {
33
33
  resetFunnelConfigCache,
34
34
  saveFunnelDraft,
35
35
  stripResumeToken
36
- } from "../chunk/BVHNZLDK.jsx";
36
+ } from "../chunk/NBB2VTQK.jsx";
37
37
  import {
38
38
  ApiError,
39
39
  SUPPORT_ATTACHMENT_MAX_BYTES,
@@ -67,7 +67,7 @@ import {
67
67
  subscriptionsApi,
68
68
  supportApi,
69
69
  usersApi
70
- } from "../chunk/2MRJESYW.jsx";
70
+ } from "../chunk/EVCGDF5D.jsx";
71
71
  import "../chunk/LDZIUFDM.jsx";
72
72
  export {
73
73
  EmbedApiError2 as ApexV2ApiError,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  captureAuthHeader,
3
3
  peekFunnelSessionId
4
- } from "./BVHNZLDK.jsx";
4
+ } from "./NBB2VTQK.jsx";
5
5
  import {
6
6
  getConfig
7
7
  } from "./LDZIUFDM.jsx";
@@ -174,4 +174,4 @@ export {
174
174
  readCartToken,
175
175
  stripCartToken
176
176
  };
177
- //# sourceMappingURL=OWTKSSYT.jsx.map
177
+ //# sourceMappingURL=4ZSZHZQV.jsx.map
@@ -8,7 +8,7 @@ import {
8
8
  readPromoCode,
9
9
  resetCartId,
10
10
  stripCartToken
11
- } from "./OWTKSSYT.jsx";
11
+ } from "./4ZSZHZQV.jsx";
12
12
  import {
13
13
  firstAddressError,
14
14
  formatCardNumber,
@@ -18,12 +18,12 @@ import {
18
18
  useAddressPair,
19
19
  useCardTokenizer,
20
20
  validateAddress
21
- } from "./OLLSJX7B.jsx";
21
+ } from "./HXMLRDIJ.jsx";
22
22
  import {
23
23
  auth_default,
24
24
  cart_default,
25
25
  medication_default
26
- } from "./FNOEL4FK.jsx";
26
+ } from "./WLEIDQ5M.jsx";
27
27
  import {
28
28
  ApiError,
29
29
  newIdempotencyKey,
@@ -31,7 +31,7 @@ import {
31
31
  promoCodesApi,
32
32
  subscriptionsApi,
33
33
  usersApi
34
- } from "./2MRJESYW.jsx";
34
+ } from "./EVCGDF5D.jsx";
35
35
  import {
36
36
  getConfig
37
37
  } from "./LDZIUFDM.jsx";
@@ -300,8 +300,10 @@ function useSubscriptionIntakeFlow(options) {
300
300
  productIds: [options.pricing.productId],
301
301
  subtotalCents: savingsBaseCents()
302
302
  });
303
- if (res.valid) setPromoCode(stashed);
304
- else clearPromoCode();
303
+ if (res.valid) {
304
+ setPromoCode(stashed);
305
+ setPromoApplied(res);
306
+ } else clearPromoCode();
305
307
  } catch {
306
308
  }
307
309
  });
@@ -513,6 +515,7 @@ function useSubscriptionIntakeFlow(options) {
513
515
  throw new Error(res.error || "Subscription failed. Please try again.");
514
516
  }
515
517
  } else {
518
+ const savingsMemberId = options.savingsMemberId?.() || void 0;
516
519
  await auth_default.signupAndSubscribe({
517
520
  email: email().trim(),
518
521
  password: password(),
@@ -540,7 +543,8 @@ function useSubscriptionIntakeFlow(options) {
540
543
  surveyResponseId: options.surveyResult.surveyResponseId,
541
544
  v2SurveyResponseId: options.surveyResult.v2SurveyResponseId,
542
545
  caseNotes: options.surveyResult.caseNotes,
543
- promoCode: promo?.valid ? promo.promoCode?.code : void 0
546
+ promoCode: promo?.valid ? promo.promoCode?.code : void 0,
547
+ ...savingsMemberId ? { savingsMemberId } : {}
544
548
  }, { idempotencyKey });
545
549
  }
546
550
  clearDraft();
@@ -770,4 +774,4 @@ export {
770
774
  restoreCartFromLink,
771
775
  startCartCapture
772
776
  };
773
- //# sourceMappingURL=4A2CPTUM.jsx.map
777
+ //# sourceMappingURL=5HNZ7SEM.jsx.map
@@ -904,9 +904,20 @@ var adminApi = {
904
904
  return apiFetch(`/admin/webhook-events${qs(params)}`);
905
905
  },
906
906
  getEmailTemplates() {
907
- return apiFetch(
908
- "/admin/settings/email-templates"
909
- );
907
+ return apiFetch("/admin/settings/email-templates");
908
+ },
909
+ createCustomTemplate(input) {
910
+ return post("/admin/settings/email-templates/custom", input);
911
+ },
912
+ updateCustomTemplate(id, input) {
913
+ return put(`/admin/settings/email-templates/custom/${id}`, input);
914
+ },
915
+ /** Rejects with the server's message (409) while a sequence still uses it. */
916
+ deleteCustomTemplate(id) {
917
+ return apiFetch(`/admin/settings/email-templates/custom/${id}`, { method: "DELETE" });
918
+ },
919
+ sendCustomTemplateTest(id) {
920
+ return post(`/admin/settings/email-templates/custom/${id}/test`);
910
921
  },
911
922
  saveEmailTemplates(templates) {
912
923
  return put("/admin/settings/email-templates", { templates });
@@ -917,6 +928,18 @@ var adminApi = {
917
928
  sendTestEmail(templateKey) {
918
929
  return post("/admin/settings/email-templates/test", { templateKey });
919
930
  },
931
+ getEmailNotifications() {
932
+ return apiFetch("/admin/settings/email-notifications");
933
+ },
934
+ saveEmailNotifications(settings) {
935
+ return put("/admin/settings/email-notifications", settings);
936
+ },
937
+ getBillingReminders() {
938
+ return apiFetch("/admin/settings/billing-reminders");
939
+ },
940
+ saveBillingReminders(settings) {
941
+ return put("/admin/settings/billing-reminders", settings);
942
+ },
920
943
  // ── Products ───────────────────────────────────────────────────
921
944
  getProducts(params) {
922
945
  return apiFetch(`/admin/products${qs(params)}`);
@@ -1009,6 +1032,25 @@ var adminApi = {
1009
1032
  setSupportThreadStatus(id, status) {
1010
1033
  return patch(`/admin/support/threads/${id}`, { status });
1011
1034
  },
1035
+ /** Inline re-file from the admin detail view. `null` clears the category. */
1036
+ updateSupportThreadCategory(id, category) {
1037
+ return patch(`/admin/support/threads/${id}`, { category });
1038
+ },
1039
+ /**
1040
+ * Forward this thread to the customer's care team: sends every customer
1041
+ * message as one note to their prescriber, then redacts those message
1042
+ * bodies (`[moved to care team]`, attachments removed) and marks the
1043
+ * thread `transferred`. Support's own messages are untouched.
1044
+ *
1045
+ * - `409 no_care_team` — customer has no Apex member / no prescriber yet.
1046
+ * - `502` — could not reach the care team; safe to retry.
1047
+ * - `alreadyTransferred: true` — thread was already forwarded; no-op.
1048
+ * - `redacted: false` — the transfer happened but the redaction cleanup
1049
+ * step threw; the thread is transferred but bodies may not be scrubbed.
1050
+ */
1051
+ transferSupportThread(id) {
1052
+ return post(`/admin/support/threads/${id}/transfer`);
1053
+ },
1012
1054
  getSupportAttachmentUrl(attachmentId) {
1013
1055
  return apiFetch(`/admin/support/attachments/${attachmentId}`);
1014
1056
  },
@@ -1248,5 +1290,5 @@ var affiliatePortalApi = {
1248
1290
  };
1249
1291
 
1250
1292
  export { ApiError, SUPPORT_ATTACHMENT_MAX_BYTES, SUPPORT_ATTACHMENT_MIME_TYPES, addressesApi, adminAffiliatesApi, adminApi, affiliateAuthStorageKey, affiliatePortalApi, apexApi, apiFetch, authApi, authStorageKey, captureAffiliateRef, clearAffiliateRef, clearAffiliateTokens, clearTokens, getAffiliateTokens, getTokens, membersApi, messagesApi, newIdempotencyKey, onTokensCleared, ordersApi, paymentsApi, productsApi, promoCodesApi, readAffiliateRef, setAffiliateTokens, setTokens, subscriptionsApi, supportApi, usersApi };
1251
- //# sourceMappingURL=7AJQ5SVA.js.map
1252
- //# sourceMappingURL=7AJQ5SVA.js.map
1293
+ //# sourceMappingURL=BEDW4XUM.js.map
1294
+ //# sourceMappingURL=BEDW4XUM.js.map