@bcrumbs.net/inbox 0.0.63 → 0.0.65

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 (189) hide show
  1. package/assets/ar/inbox.json +40 -6
  2. package/assets/en/inbox.json +40 -6
  3. package/e2e/auth.setup.d.ts +1 -0
  4. package/e2e/checkout/checkout.flows.d.ts +24 -0
  5. package/e2e/global.teardown.d.ts +1 -0
  6. package/e2e/support/auth.d.ts +22 -0
  7. package/e2e/support/cleanup.d.ts +20 -0
  8. package/e2e/support/config.d.ts +23 -0
  9. package/e2e/support/fixtures.d.ts +16 -0
  10. package/e2e/support/identifiers.d.ts +13 -0
  11. package/e2e/support/index.d.ts +6 -0
  12. package/index.cjs.js +39202 -1083
  13. package/index.esm.js +39206 -1088
  14. package/package.json +2 -2
  15. package/playwright.config.d.ts +0 -4
  16. package/src/app/ai/components/Crumby/CrumbyChatError.d.ts +9 -0
  17. package/src/app/ai/components/Crumby/CrumbyChatErrorBoundary.d.ts +13 -0
  18. package/src/app/ai/components/Crumby/CrumbyHeader.d.ts +9 -0
  19. package/src/app/ai/components/Crumby/CrumbyPageContext.d.ts +22 -0
  20. package/src/app/ai/components/Crumby/CrumbyRuntimeProvider.d.ts +9 -0
  21. package/src/app/ai/components/CrumbySettings/CrumbyEditsBanner.d.ts +14 -0
  22. package/src/app/ai/components/CrumbySettings/VoiceSettingsSection.d.ts +9 -0
  23. package/src/app/ai/components/playground/Button.d.ts +1 -1
  24. package/src/app/ai/components/playground/ThreadMessages.d.ts +3 -1
  25. package/src/app/ai/components/playground/TooltipIconButton.d.ts +1 -1
  26. package/src/app/ai/components/sources/mediaTypeForFile.d.ts +8 -0
  27. package/src/app/ai/config/promptSettings.d.ts +31 -0
  28. package/src/app/ai/hooks/usePromptCopilot.d.ts +22 -0
  29. package/src/app/ai/tools/PromptEditorTool.d.ts +2 -0
  30. package/src/app/ai/types/index.d.ts +1 -1
  31. package/src/app/ai/utils/clientToolResubmit.d.ts +8 -0
  32. package/src/app/ai/utils/crumbyChatFetch.d.ts +15 -0
  33. package/src/app/auth/components/AcceptInvitation.d.ts +2 -0
  34. package/src/app/auth/components/AuthLanguagePicker.d.ts +3 -0
  35. package/src/app/auth/components/AuthVisualCarousel.d.ts +1 -0
  36. package/src/app/auth/components/ClerkSessionBridge.d.ts +4 -0
  37. package/src/app/auth/components/password-page/AuthPasswordPageLayout.d.ts +3 -1
  38. package/src/app/auth/components/password-page/PasswordSuccessView.d.ts +2 -1
  39. package/src/app/auth/config/authProvider.d.ts +20 -2
  40. package/src/app/auth/config/clerkAppearance.d.ts +152 -49
  41. package/src/app/auth/config/clerkLocalization.d.ts +6 -0
  42. package/src/app/auth/pages/Auth.style.d.ts +14 -0
  43. package/src/app/auth/pages/Login.d.ts +2 -1
  44. package/src/app/auth/pages/Register.d.ts +1 -0
  45. package/src/app/billing/pages/GatewayWelcomePage.d.ts +5 -0
  46. package/src/app/billing/utils/isGatewayPlan.d.ts +2 -0
  47. package/src/app/broadcast/components/BroadcastAnalysisReciepientsHeader.d.ts +2 -1
  48. package/src/app/broadcast/components/BroadcastDetailsSection.d.ts +3 -1
  49. package/src/app/broadcast/constants.d.ts +2 -0
  50. package/src/app/dashboard/components/AgentCard.d.ts +2 -1
  51. package/src/app/dashboard/components/AgentsCard.d.ts +4 -2
  52. package/src/app/dashboard/components/BroadcastDashboard.d.ts +3 -1
  53. package/src/app/dashboard/components/ChatsByLifeCycleCard.d.ts +13 -0
  54. package/src/app/dashboard/components/DashboardFilters.d.ts +27 -0
  55. package/src/app/dashboard/components/DashboardPdfCaptureArea.d.ts +11 -0
  56. package/src/app/dashboard/components/DashboardPdfExportButton.d.ts +7 -0
  57. package/src/app/dashboard/components/DashboardPdfHeader.d.ts +11 -0
  58. package/src/app/dashboard/components/DashboardSections.d.ts +7 -2
  59. package/src/app/dashboard/components/InboxDashboard.d.ts +3 -1
  60. package/src/app/dashboard/hooks/useDashboardPdfMeta.d.ts +31 -0
  61. package/src/app/dashboard/hooks/useDashboardTabsPdfExport.d.ts +26 -0
  62. package/src/app/dashboard/utils/dashboardReportExports.d.ts +16 -1
  63. package/src/app/dashboard/utils/exportDashboardPdf.d.ts +19 -0
  64. package/src/app/dashboard/utils/lifecycleStages.d.ts +53 -0
  65. package/src/app/dashboard/utils/reportHelpers.d.ts +9 -0
  66. package/src/app/gatewayHome/components/ChecklistStep.d.ts +15 -0
  67. package/src/app/gatewayHome/components/CreditBalanceCard.d.ts +6 -0
  68. package/src/app/gatewayHome/components/MessageStats.d.ts +5 -0
  69. package/src/app/gatewayHome/components/SetupChecklist.d.ts +11 -0
  70. package/src/app/gatewayHome/components/console/QuickstartConsole.d.ts +11 -0
  71. package/src/app/gatewayHome/components/console/RunRequestBar.d.ts +15 -0
  72. package/src/app/gatewayHome/components/console/consoleStyles.d.ts +77 -0
  73. package/src/app/gatewayHome/components/steps/ApiKeyStepBody.d.ts +8 -0
  74. package/src/app/gatewayHome/components/steps/ChannelStepBody.d.ts +3 -0
  75. package/src/app/gatewayHome/components/steps/MetaStepBody.d.ts +6 -0
  76. package/src/app/gatewayHome/components/steps/WebhookStepBody.d.ts +7 -0
  77. package/src/app/gatewayHome/components/styles.d.ts +29 -0
  78. package/src/app/gatewayHome/config/constants.d.ts +22 -0
  79. package/src/app/gatewayHome/hooks/useGatewaySetup.d.ts +59 -0
  80. package/src/app/gatewayHome/hooks/useMessageStats.d.ts +17 -0
  81. package/src/app/gatewayHome/hooks/useQuickstartRequest.d.ts +31 -0
  82. package/src/app/gatewayHome/hooks/useSendableTemplates.d.ts +9 -0
  83. package/src/app/gatewayHome/pages/GatewayHomePage.d.ts +1 -0
  84. package/src/app/gatewayHome/types/index.d.ts +21 -0
  85. package/src/app/gatewayHome/utils/buildRequestBody.d.ts +7 -0
  86. package/src/app/gatewayHome/utils/buildSnippet.d.ts +9 -0
  87. package/src/app/gatewayHome/utils/sendTestMessage.d.ts +3 -0
  88. package/src/app/gatewayHome/utils/setupStorage.d.ts +8 -0
  89. package/src/app/gatewayHome/utils/templateHasParameters.d.ts +6 -0
  90. package/src/app/generic/components/HeaderImageInput.d.ts +3 -1
  91. package/src/app/generic/components/MessagePreview.d.ts +1 -1
  92. package/src/app/generic/components/PreviewHeaderDocument.d.ts +5 -0
  93. package/src/app/generic/hooks/usePaginatedQuery.d.ts +1 -0
  94. package/src/app/generic/utils/chunkErrorRecovery.d.ts +7 -0
  95. package/src/app/generic/utils/onesignal.d.ts +13 -0
  96. package/src/app/inbox/calls/useIncomingCallAlerts.d.ts +2 -0
  97. package/src/app/inbox/components/Calls/ActiveCallControls.d.ts +6 -0
  98. package/src/app/inbox/components/Calls/IncomingCallBanner.d.ts +6 -0
  99. package/src/app/inbox/components/Chat/ChatContent.d.ts +3 -1
  100. package/src/app/inbox/components/Chat/QuickReplyEmpty.d.ts +5 -0
  101. package/src/app/inbox/components/Chat/QuickReplyPickerMenu.d.ts +2 -2
  102. package/src/app/inbox/components/NewDetails/ClientSection.d.ts +3 -1
  103. package/src/app/inbox/components/NewDetails/ContactActionsMenu.d.ts +9 -0
  104. package/src/app/inbox/components/NewDetails/SuggestedAssignee.d.ts +7 -0
  105. package/src/app/inbox/components/NewDetails/SuggestedStage.d.ts +13 -0
  106. package/src/app/inbox/components/NewDetails/SuggestedTags.d.ts +18 -0
  107. package/src/app/inbox/components/NewDetails/SuggestionItems.d.ts +16 -0
  108. package/src/app/inbox/components/NewDetails/UserHeader.d.ts +2 -1
  109. package/src/app/inbox/components/Shared/SharedStyle.d.ts +8 -0
  110. package/src/app/inbox/constants/index.d.ts +1 -0
  111. package/src/app/inbox/context/CallSession.d.ts +16 -0
  112. package/src/app/inbox/context/SuggestionsContext.d.ts +25 -0
  113. package/src/app/inbox/hooks/useAgentSuggestions.d.ts +20 -0
  114. package/src/app/inbox/hooks/useApplySuggestion.d.ts +18 -0
  115. package/src/app/inbox/hooks/useConvEnhance.d.ts +3 -1
  116. package/src/app/inbox/hooks/useConversationsPerodicFetch.d.ts +37 -0
  117. package/src/app/inbox/hooks/useIncomingCallAlerts.d.ts +2 -0
  118. package/src/app/inbox/hooks/useNewSortedEvents.d.ts +1 -1
  119. package/src/app/inbox/hooks/useQuickReplyPicker.d.ts +5 -3
  120. package/src/app/inbox/pages/InboxPage.d.ts +1 -1
  121. package/src/app/inbox/utils/callUi.d.ts +25 -0
  122. package/src/app/inbox/utils/convAssistStorage.d.ts +9 -4
  123. package/src/app/inbox/utils/convSuggestions.d.ts +59 -0
  124. package/src/app/inbox/utils/convSuggestionsStorage.d.ts +20 -0
  125. package/src/app/inbox/utils/convs.d.ts +4 -0
  126. package/src/app/inbox/utils/sounds.d.ts +4 -0
  127. package/src/app/layout/components/LogoutPopin.d.ts +6 -3
  128. package/src/app/layout/components/language/index.d.ts +5 -1
  129. package/src/app/layout/constants/index.d.ts +35 -0
  130. package/src/app/layout/hooks/useCallsEnabled.d.ts +1 -0
  131. package/src/app/layout/hooks/useGatewayPlanEnabled.d.ts +5 -0
  132. package/src/app/layout/hooks/useWebchatEnabled.d.ts +5 -0
  133. package/src/app/managemnet/components/channels/ChannelItem.d.ts +2 -1
  134. package/src/app/managemnet/components/channels/ChannelSettingsDrawer.d.ts +15 -0
  135. package/src/app/managemnet/components/channels/ShareChannelLinkDialog.d.ts +11 -0
  136. package/src/app/managemnet/components/channels/WebChatSnippetBlock.d.ts +7 -0
  137. package/src/app/managemnet/config/webchat.d.ts +5 -0
  138. package/src/app/managemnet/config/webhookDefinition.d.ts +4 -0
  139. package/src/app/managemnet/pages/connectChannel/ConnectChannel.d.ts +2 -0
  140. package/src/app/managemnet/pages/generalSettings/NoiseFilterSettings.d.ts +8 -0
  141. package/src/app/managemnet/pages/generalSettings/WritingAssistanceSettings.d.ts +9 -0
  142. package/src/app/managemnet/pages/generalSettings/holidayConstants.d.ts +5 -0
  143. package/src/app/managemnet/pages/generalSettings/noiseFilterConstants.d.ts +24 -0
  144. package/src/app/managemnet/pages/generalSettings/writingConstants.d.ts +6 -0
  145. package/src/app/managemnet/utils/webChatSnippet.d.ts +2 -0
  146. package/src/app/onboarding/components/OnboardingView.d.ts +3 -1
  147. package/src/app/onboarding/components/useOnboardingChecklist.d.ts +12 -9
  148. package/src/app/onboarding/constants/workspaceProfileOptions.d.ts +30 -0
  149. package/src/app/onboarding/utils/onboardingApi.d.ts +23 -0
  150. package/src/app/onboarding/utils/onboardingChecklistStorage.d.ts +42 -49
  151. package/src/app/resources/components/Agents/CreateAgent.d.ts +7 -3
  152. package/src/app/resources/components/Integrations/ChannelDialogLayout.d.ts +6 -1
  153. package/src/app/resources/components/Integrations/RenderCorrectIntegrationFlow.d.ts +3 -1
  154. package/src/app/resources/components/Integrations/WebChat/index.d.ts +8 -0
  155. package/src/app/resources/components/Integrations/WhatsApp/index.d.ts +1 -0
  156. package/src/app/resources/components/ListResources/Utils.d.ts +1 -0
  157. package/src/app/resources/hooks/useFBPagesHook.d.ts +4 -2
  158. package/src/app/resources/hooks/useWabaHook.d.ts +5 -4
  159. package/src/app/resources/utils/channelSetupTracking.d.ts +21 -0
  160. package/src/app/resources/utils/facebookSdk.d.ts +11 -0
  161. package/src/app/subscriptions/components/NewSubscription/OnboardingStepper.d.ts +2 -2
  162. package/src/app/subscriptions/components/NewSubscription/SubscriptionName.d.ts +2 -0
  163. package/src/app/subscriptions/components/NewSubscription/SubscriptionSuccess.d.ts +3 -1
  164. package/src/app/subscriptions/components/NewSubscription/WorkspaceProfile.d.ts +18 -0
  165. package/src/app/subscriptions/components/NewSubscription/WorkspaceStepLayout.d.ts +5 -2
  166. package/src/app/subscriptions/components/Plans/PlanCard.d.ts +3 -1
  167. package/src/app/subscriptions/components/Plans/ShowcasePlans.d.ts +3 -1
  168. package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionCreditsCard.d.ts +5 -0
  169. package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionProfile.d.ts +0 -1
  170. package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionUsers.d.ts +0 -1
  171. package/src/app/subscriptions/components/SubscriptionSettings/index.d.ts +17 -2
  172. package/src/app/subscriptions/constants/Plans.d.ts +2 -1
  173. package/src/app/subscriptions/hooks/useWorkspaceProfileSubmit.d.ts +12 -0
  174. package/src/app/subscriptions/utils/estimateUpgradeProration.d.ts +7 -0
  175. package/src/app/subscriptions/utils/newWorkspaceContext.d.ts +8 -0
  176. package/src/assets/locales/translations.d.ts +444 -0
  177. package/src/config/constants.d.ts +1 -2
  178. package/src/environments/environment.dev.d.ts +2 -0
  179. package/src/environments/types.d.ts +2 -0
  180. package/src/graphql.autogenerated.d.ts +2718 -22
  181. package/src/graphql.billing.autogenerated.d.ts +193 -0
  182. package/src/lib/index.d.ts +1 -0
  183. package/src/testUtils/bcUiMock.d.ts +16 -0
  184. package/src/utils/colorPool.d.ts +1 -2
  185. package/src/utils/getActiveChannelList.d.ts +6 -1
  186. package/src/utils/globalHelper.d.ts +22 -0
  187. package/src/app/contact/components/ImportProgressDialog.d.ts +0 -13
  188. package/src/app/managemnet/components/channels/EditChannelDialog.d.ts +0 -11
  189. package/src/app/onboarding/utils/onboardingChecklistPersistence.d.ts +0 -18
@@ -126,6 +126,37 @@ export type CheckoutResult = {
126
126
  stripePaymentMethod?: Maybe<Scalars['String']['output']>;
127
127
  transactionId?: Maybe<Scalars['Int']['output']>;
128
128
  };
129
+ /** Credit pack sizes for Gateway prepaid purchases. */
130
+ export declare const CreditPack: {
131
+ readonly CREDITS_5: "CREDITS_5";
132
+ readonly CREDITS_20: "CREDITS_20";
133
+ readonly CREDITS_100: "CREDITS_100";
134
+ };
135
+ export type CreditPack = typeof CreditPack[keyof typeof CreditPack];
136
+ /** CreditWalletInput fetches prepaid Gateway credit balance for a workspace. */
137
+ export type CreditWalletInput = {
138
+ workspaceId: Scalars['Int']['input'];
139
+ };
140
+ /** CreditWalletView is SQL wallet balance composed with Redis pending usage. */
141
+ export type CreditWalletView = {
142
+ __typename?: 'CreditWalletView';
143
+ balanceMicroUsd: Scalars['String']['output'];
144
+ lifetimeAttemptCount: Scalars['String']['output'];
145
+ lifetimePurchasedMicroUsd: Scalars['String']['output'];
146
+ lifetimeUsedMicroUsd: Scalars['String']['output'];
147
+ pendingAttempts: Scalars['String']['output'];
148
+ pendingMicroUsd: Scalars['String']['output'];
149
+ remainingCredits: Scalars['Float']['output'];
150
+ remainingMessages: Scalars['Int']['output'];
151
+ remainingMicroUsd: Scalars['String']['output'];
152
+ usedAttempts: Scalars['String']['output'];
153
+ usedCredits: Scalars['Float']['output'];
154
+ usedMicroUsd: Scalars['String']['output'];
155
+ workspaceId: Scalars['Int']['output'];
156
+ };
157
+ export type EnsureGatewaySubscriptionInput = {
158
+ workspaceId: Scalars['Int']['input'];
159
+ };
129
160
  /**
130
161
  * ErrorCode is an enum for the error codes.
131
162
  * - UNAUTHENTICATED: The user is not authenticated.
@@ -148,12 +179,16 @@ export type Mutation = {
148
179
  cancelPendingPayment: CancelPendingPaymentResult;
149
180
  /** Purchase a new plan (checkout). */
150
181
  checkout: CheckoutResult;
182
+ /** Ensure the workspace has a Gateway subscription and empty credit wallet (no Polar charge). */
183
+ ensureGatewaySubscription: SubscriptionPlan;
151
184
  /** Pause the subscription. */
152
185
  pauseSubscription: SubscriptionPlan;
153
186
  /** Cancel an existing Polar subscription at period end without opening the customer portal. */
154
187
  polarCancelSubscription: PolarCancelSubscriptionResult;
155
188
  /** Create a Polar-hosted checkout session for purchasing a plan. */
156
189
  polarCheckout: PolarCheckoutResult;
190
+ /** Create a Polar-hosted one-time checkout for Gateway credit packs ($5 / $20 / $100). */
191
+ polarCreditsCheckout: PolarCheckoutResult;
157
192
  /** Create a Polar customer portal session for subscription management. */
158
193
  polarPortalSession: PolarPortalSessionResult;
159
194
  /** Reactivate a Polar subscription scheduled for cancellation without opening the customer portal. */
@@ -179,6 +214,9 @@ export type MutationCancelPendingPaymentArgs = {
179
214
  export type MutationCheckoutArgs = {
180
215
  input: CheckoutInput;
181
216
  };
217
+ export type MutationEnsureGatewaySubscriptionArgs = {
218
+ input: EnsureGatewaySubscriptionInput;
219
+ };
182
220
  export type MutationPauseSubscriptionArgs = {
183
221
  input: PauseSubscriptionInput;
184
222
  };
@@ -188,6 +226,9 @@ export type MutationPolarCancelSubscriptionArgs = {
188
226
  export type MutationPolarCheckoutArgs = {
189
227
  input: PolarCheckoutInput;
190
228
  };
229
+ export type MutationPolarCreditsCheckoutArgs = {
230
+ input: PolarCreditsCheckoutInput;
231
+ };
191
232
  export type MutationPolarPortalSessionArgs = {
192
233
  input: PolarPortalSessionInput;
193
234
  };
@@ -360,6 +401,7 @@ export declare const PlanType: {
360
401
  readonly BUSINESS: "business";
361
402
  readonly CUSTOM: "custom";
362
403
  readonly FREE: "free";
404
+ readonly GATEWAY: "gateway";
363
405
  readonly PREMIUM: "premium";
364
406
  };
365
407
  export type PlanType = typeof PlanType[keyof typeof PlanType];
@@ -387,6 +429,11 @@ export type PolarCheckoutResult = {
387
429
  sessionId: Scalars['String']['output'];
388
430
  sessionUrl: Scalars['String']['output'];
389
431
  };
432
+ /** PolarCreditsCheckoutInput creates a one-time Polar checkout for message credits. */
433
+ export type PolarCreditsCheckoutInput = {
434
+ pack: CreditPack;
435
+ workspaceId: Scalars['Int']['input'];
436
+ };
390
437
  /** PolarPortalSessionInput is an input for creating a Polar customer portal session. */
391
438
  export type PolarPortalSessionInput = {
392
439
  workspaceId: Scalars['Int']['input'];
@@ -466,6 +513,8 @@ export type Query = {
466
513
  __typename?: 'Query';
467
514
  /** Get billing info for a workspace. */
468
515
  billingInfo?: Maybe<BillingInfo>;
516
+ /** Gateway prepaid credit wallet (SQL + Redis pending). */
517
+ creditWallet: CreditWalletView;
469
518
  /** Get a specific payment method by ID. */
470
519
  paymentMethod?: Maybe<PaymentMethod>;
471
520
  /** List card payment methods for a workspace. */
@@ -494,6 +543,9 @@ export type Query = {
494
543
  export type QueryBillingInfoArgs = {
495
544
  input: BillingInfoInput;
496
545
  };
546
+ export type QueryCreditWalletArgs = {
547
+ input: CreditWalletInput;
548
+ };
497
549
  export type QueryPaymentMethodArgs = {
498
550
  input: PaymentMethodInput;
499
551
  };
@@ -768,6 +820,45 @@ export type CheckoutMutation = {
768
820
  stripePaymentMethod?: string | null;
769
821
  };
770
822
  };
823
+ export type CreditWalletQueryVariables = Exact<{
824
+ input: CreditWalletInput;
825
+ }>;
826
+ export type CreditWalletQuery = {
827
+ __typename?: 'Query';
828
+ creditWallet: {
829
+ __typename?: 'CreditWalletView';
830
+ workspaceId: number;
831
+ balanceMicroUsd: string;
832
+ pendingMicroUsd: string;
833
+ remainingMicroUsd: string;
834
+ remainingCredits: number;
835
+ remainingMessages: number;
836
+ lifetimePurchasedMicroUsd: string;
837
+ lifetimeUsedMicroUsd: string;
838
+ lifetimeAttemptCount: string;
839
+ pendingAttempts: string;
840
+ usedAttempts: string;
841
+ usedMicroUsd: string;
842
+ usedCredits: number;
843
+ };
844
+ };
845
+ export type EnsureGatewaySubscriptionMutationVariables = Exact<{
846
+ input: EnsureGatewaySubscriptionInput;
847
+ }>;
848
+ export type EnsureGatewaySubscriptionMutation = {
849
+ __typename?: 'Mutation';
850
+ ensureGatewaySubscription: {
851
+ __typename?: 'SubscriptionPlan';
852
+ id: number;
853
+ workspaceId: number;
854
+ planId: number;
855
+ plan?: {
856
+ __typename?: 'Plan';
857
+ id: number;
858
+ planType: PlanType;
859
+ } | null;
860
+ };
861
+ };
771
862
  export type PaymentMethodQueryVariables = Exact<{
772
863
  input: PaymentMethodInput;
773
864
  }>;
@@ -928,6 +1019,17 @@ export type PolarCheckoutMutation = {
928
1019
  sessionUrl: string;
929
1020
  };
930
1021
  };
1022
+ export type PolarCreditsCheckoutMutationVariables = Exact<{
1023
+ input: PolarCreditsCheckoutInput;
1024
+ }>;
1025
+ export type PolarCreditsCheckoutMutation = {
1026
+ __typename?: 'Mutation';
1027
+ polarCreditsCheckout: {
1028
+ __typename?: 'PolarCheckoutResult';
1029
+ sessionId: string;
1030
+ sessionUrl: string;
1031
+ };
1032
+ };
931
1033
  export type PolarPortalSessionMutationVariables = Exact<{
932
1034
  input: PolarPortalSessionInput;
933
1035
  }>;
@@ -1307,6 +1409,72 @@ export declare function useCheckoutMutation(baseOptions?: Apollo.MutationHookOpt
1307
1409
  export type CheckoutMutationHookResult = ReturnType<typeof useCheckoutMutation>;
1308
1410
  export type CheckoutMutationResult = Apollo.MutationResult<CheckoutMutation>;
1309
1411
  export type CheckoutMutationOptions = Apollo.BaseMutationOptions<CheckoutMutation, CheckoutMutationVariables>;
1412
+ export declare const CreditWalletDocument: Apollo.DocumentNode;
1413
+ /**
1414
+ * __useCreditWalletQuery__
1415
+ *
1416
+ * To run a query within a React component, call `useCreditWalletQuery` and pass it any options that fit your needs.
1417
+ * When your component renders, `useCreditWalletQuery` returns an object from Apollo Client that contains loading, error, and data properties
1418
+ * you can use to render your UI.
1419
+ *
1420
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
1421
+ *
1422
+ * @example
1423
+ * const { data, loading, error } = useCreditWalletQuery({
1424
+ * variables: {
1425
+ * input: // value for 'input'
1426
+ * },
1427
+ * });
1428
+ */
1429
+ export declare function useCreditWalletQuery(baseOptions: Apollo.QueryHookOptions<CreditWalletQuery, CreditWalletQueryVariables> & ({
1430
+ variables: CreditWalletQueryVariables;
1431
+ skip?: boolean;
1432
+ } | {
1433
+ skip: boolean;
1434
+ })): Apollo.QueryResult<CreditWalletQuery, Exact<{
1435
+ input: CreditWalletInput;
1436
+ }>>;
1437
+ export declare function useCreditWalletLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<CreditWalletQuery, CreditWalletQueryVariables>): Apollo.LazyQueryResultTuple<CreditWalletQuery, Exact<{
1438
+ input: CreditWalletInput;
1439
+ }>>;
1440
+ export declare function useCreditWalletSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions<CreditWalletQuery, CreditWalletQueryVariables>): Apollo.UseSuspenseQueryResult<CreditWalletQuery | undefined, Exact<{
1441
+ input: CreditWalletInput;
1442
+ }>>;
1443
+ export type CreditWalletQueryHookResult = ReturnType<typeof useCreditWalletQuery>;
1444
+ export type CreditWalletLazyQueryHookResult = ReturnType<typeof useCreditWalletLazyQuery>;
1445
+ export type CreditWalletSuspenseQueryHookResult = ReturnType<typeof useCreditWalletSuspenseQuery>;
1446
+ export type CreditWalletQueryResult = Apollo.QueryResult<CreditWalletQuery, CreditWalletQueryVariables>;
1447
+ export declare function refetchCreditWalletQuery(variables: CreditWalletQueryVariables): {
1448
+ query: Apollo.DocumentNode;
1449
+ variables: Exact<{
1450
+ input: CreditWalletInput;
1451
+ }>;
1452
+ };
1453
+ export declare const EnsureGatewaySubscriptionDocument: Apollo.DocumentNode;
1454
+ export type EnsureGatewaySubscriptionMutationFn = Apollo.MutationFunction<EnsureGatewaySubscriptionMutation, EnsureGatewaySubscriptionMutationVariables>;
1455
+ /**
1456
+ * __useEnsureGatewaySubscriptionMutation__
1457
+ *
1458
+ * To run a mutation, you first call `useEnsureGatewaySubscriptionMutation` within a React component and pass it any options that fit your needs.
1459
+ * When your component renders, `useEnsureGatewaySubscriptionMutation` returns a tuple that includes:
1460
+ * - A mutate function that you can call at any time to execute the mutation
1461
+ * - An object with fields that represent the current status of the mutation's execution
1462
+ *
1463
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
1464
+ *
1465
+ * @example
1466
+ * const [ensureGatewaySubscriptionMutation, { data, loading, error }] = useEnsureGatewaySubscriptionMutation({
1467
+ * variables: {
1468
+ * input: // value for 'input'
1469
+ * },
1470
+ * });
1471
+ */
1472
+ export declare function useEnsureGatewaySubscriptionMutation(baseOptions?: Apollo.MutationHookOptions<EnsureGatewaySubscriptionMutation, EnsureGatewaySubscriptionMutationVariables>): Apollo.MutationTuple<EnsureGatewaySubscriptionMutation, Exact<{
1473
+ input: EnsureGatewaySubscriptionInput;
1474
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
1475
+ export type EnsureGatewaySubscriptionMutationHookResult = ReturnType<typeof useEnsureGatewaySubscriptionMutation>;
1476
+ export type EnsureGatewaySubscriptionMutationResult = Apollo.MutationResult<EnsureGatewaySubscriptionMutation>;
1477
+ export type EnsureGatewaySubscriptionMutationOptions = Apollo.BaseMutationOptions<EnsureGatewaySubscriptionMutation, EnsureGatewaySubscriptionMutationVariables>;
1310
1478
  export declare const PaymentMethodDocument: Apollo.DocumentNode;
1311
1479
  /**
1312
1480
  * __usePaymentMethodQuery__
@@ -1603,6 +1771,31 @@ export declare function usePolarCheckoutMutation(baseOptions?: Apollo.MutationHo
1603
1771
  export type PolarCheckoutMutationHookResult = ReturnType<typeof usePolarCheckoutMutation>;
1604
1772
  export type PolarCheckoutMutationResult = Apollo.MutationResult<PolarCheckoutMutation>;
1605
1773
  export type PolarCheckoutMutationOptions = Apollo.BaseMutationOptions<PolarCheckoutMutation, PolarCheckoutMutationVariables>;
1774
+ export declare const PolarCreditsCheckoutDocument: Apollo.DocumentNode;
1775
+ export type PolarCreditsCheckoutMutationFn = Apollo.MutationFunction<PolarCreditsCheckoutMutation, PolarCreditsCheckoutMutationVariables>;
1776
+ /**
1777
+ * __usePolarCreditsCheckoutMutation__
1778
+ *
1779
+ * To run a mutation, you first call `usePolarCreditsCheckoutMutation` within a React component and pass it any options that fit your needs.
1780
+ * When your component renders, `usePolarCreditsCheckoutMutation` returns a tuple that includes:
1781
+ * - A mutate function that you can call at any time to execute the mutation
1782
+ * - An object with fields that represent the current status of the mutation's execution
1783
+ *
1784
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
1785
+ *
1786
+ * @example
1787
+ * const [polarCreditsCheckoutMutation, { data, loading, error }] = usePolarCreditsCheckoutMutation({
1788
+ * variables: {
1789
+ * input: // value for 'input'
1790
+ * },
1791
+ * });
1792
+ */
1793
+ export declare function usePolarCreditsCheckoutMutation(baseOptions?: Apollo.MutationHookOptions<PolarCreditsCheckoutMutation, PolarCreditsCheckoutMutationVariables>): Apollo.MutationTuple<PolarCreditsCheckoutMutation, Exact<{
1794
+ input: PolarCreditsCheckoutInput;
1795
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
1796
+ export type PolarCreditsCheckoutMutationHookResult = ReturnType<typeof usePolarCreditsCheckoutMutation>;
1797
+ export type PolarCreditsCheckoutMutationResult = Apollo.MutationResult<PolarCreditsCheckoutMutation>;
1798
+ export type PolarCreditsCheckoutMutationOptions = Apollo.BaseMutationOptions<PolarCreditsCheckoutMutation, PolarCreditsCheckoutMutationVariables>;
1606
1799
  export declare const PolarPortalSessionDocument: Apollo.DocumentNode;
1607
1800
  export type PolarPortalSessionMutationFn = Apollo.MutationFunction<PolarPortalSessionMutation, PolarPortalSessionMutationVariables>;
1608
1801
  /**
@@ -3,6 +3,7 @@ export { ConversationChat } from './conversation-chat';
3
3
  export type { ConversationChatProps } from './conversation-chat';
4
4
  export { EmbeddedMobileMenu } from './EmbeddedMobileMenu';
5
5
  export type { EmbeddedMobileMenuProps, MobileViews } from './EmbeddedMobileMenu';
6
+ export { setInboxAudioBaseUrl } from '../app/inbox/utils/sounds';
6
7
  export { auth } from '@bcrumbs.net/bc-shared';
7
8
  export { ThemeProvider, useThemeContext } from '../context/themeContext';
8
9
  export { dconfigClient, coreClient, botClient, dqueryClient, setErrorHandler, getErrorHandler, } from '@bcrumbs.net/bc-api';
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Minimal stand-in for `@bcrumbs.net/bc-ui` in component tests. Workspace package aliases are not
3
+ * resolved by Jest, so specs mock bc-ui (virtually) with this module:
4
+ *
5
+ * jest.mock('@bcrumbs.net/bc-ui', () => require('../../../testUtils/bcUiMock'), { virtual: true });
6
+ */
7
+ import React from 'react';
8
+ export declare const NewColors: Record<string, string>;
9
+ export declare const TextSizeRem: Record<string, string>;
10
+ export declare const LineHeightRem: Record<string, string>;
11
+ export declare const FontFamilyStack: Record<string, string>;
12
+ export declare const NewTextWeight: Record<string, string>;
13
+ export declare const InputStyle: () => {};
14
+ export declare const LabelStyle: () => {};
15
+ export declare const BCSkeleton: () => import("@emotion/react/jsx-runtime").JSX.Element;
16
+ export declare const BCIcons: Record<string, React.FC>;
@@ -1,2 +1 @@
1
- import { Color } from '@bcrumbs.net/bc-ui';
2
- export declare function colorPool(id?: number): Color;
1
+ export declare function colorPool(id?: number): "#FF9900" | "#330033" | "#330066" | "#FF6600" | "#66FF66" | "#66CCFF" | "#9966FF" | "#FF66FF" | "#003333" | "#FF3300" | "#6666FF" | "#FF3366" | "#FFCC00" | "#CCFF00" | "#66FFFF" | "#9999FF" | "#CC66FF";
@@ -1,2 +1,7 @@
1
1
  import { BCDropListOptionsType } from '@bcrumbs.net/bc-ui';
2
- export declare const getActiveChannelList: () => BCDropListOptionsType[];
2
+ type ActiveChannelListOptions = {
3
+ /** Include BCWEBCHAT (website live chat); gated by the `webchat` PostHog flag. */
4
+ includeWebchat?: boolean;
5
+ };
6
+ export declare const getActiveChannelList: ({ includeWebchat }?: ActiveChannelListOptions) => BCDropListOptionsType[];
7
+ export {};
@@ -7,5 +7,27 @@ export declare const getCountryNames: (lang: string) => i18nCountries.LocalizedC
7
7
  }>;
8
8
  export declare const getLocalizedCountryName: (countryCode: string, lang: string) => string | undefined;
9
9
  export declare const createTagsMap: (tags: Tag[]) => Record<string, string>;
10
+ /** Header and body can both use {{1}}. Scope header tokens so their values stay independent. */
11
+ export declare const HEADER_TEXT_PARAMETER_PREFIX = "header:";
12
+ export declare const COUPON_CODE_TOKEN = "coupon_code";
13
+ /** WhatsApp limit for the code of a COPY_CODE button. */
14
+ export declare const COUPON_CODE_MAX_LENGTH = 15;
15
+ export declare const buttonParameterId: (buttonIndex: number, token: string) => string;
16
+ export declare const parseButtonParameterId: (paramId: string) => {
17
+ buttonIndex: number;
18
+ token: string;
19
+ } | null;
20
+ export declare const templateParameterToken: (paramId: string) => string;
21
+ export declare const HEADER_IMAGE_PARAMETER = "header_image";
22
+ export declare const HEADER_DOCUMENT_PARAMETER = "header_document";
23
+ /**
24
+ * File name WhatsApp shows on a document header, taken from the last path segment of its URL.
25
+ * Portal uploads are stored as `<yyyy-mm-dd>_<name>`, so that date prefix is dropped.
26
+ */
27
+ export declare const documentFileNameFromUrl: (url: string) => string;
28
+ /** Parameters of a single template button: URL variables, or the code of a COPY_CODE button. */
29
+ export declare const getButtonParameters: (button: any, buttonIndex: number) => string[];
10
30
  export declare const getTemplateParameters: (component: any) => string[];
31
+ /** Builds the WhatsApp `components` payload for a template from the values entered in the portal. */
32
+ export declare const buildTemplateSubmissionComponents: (definitions: any[], parameterValues: Record<string, string>) => any[];
11
33
  export declare const mapSavedComponentsToParameters: (savedComponents: any[], definitions: any[]) => Record<string, string>;
@@ -1,13 +0,0 @@
1
- import { JobStatus } from '../../../graphql.autogenerated';
2
- type ImportProgressDialogProps = {
3
- isOpen: boolean;
4
- progress: number;
5
- status: JobStatus;
6
- onClose: () => void;
7
- rtl: boolean;
8
- title?: string;
9
- completedTitle?: string;
10
- failedTitle?: string;
11
- };
12
- declare const ImportProgressDialog: ({ isOpen, progress, status, onClose, rtl, title, completedTitle, failedTitle, }: ImportProgressDialogProps) => import("@emotion/react/jsx-runtime").JSX.Element;
13
- export default ImportProgressDialog;
@@ -1,11 +0,0 @@
1
- interface EditChannelDialogProps {
2
- isOpen: boolean;
3
- onClose: () => void;
4
- onSuccess: () => void;
5
- channelId: string;
6
- channelType: string;
7
- channelTypeName: string;
8
- rtl?: boolean;
9
- }
10
- declare const EditChannelDialog: ({ isOpen, onClose, onSuccess, channelId, channelType, rtl }: EditChannelDialogProps) => import("@emotion/react/jsx-runtime").JSX.Element;
11
- export default EditChannelDialog;
@@ -1,18 +0,0 @@
1
- /**
2
- * Durable persistence for onboarding checklist data (state + dismissed flag).
3
- *
4
- * Backed by cookies on purpose: logout runs `auth.clearAllAppStorage()` which wipes
5
- * localStorage/sessionStorage but NOT cookies, so progress and the "finished" flag
6
- * survive a logout → login cycle (same browser).
7
- *
8
- * This is a temporary stand-in for a backend-owned onboarding record. When the backend
9
- * returns the flag + progress, swap the implementation of `onboardingChecklistStore`
10
- * (or its call sites) for the server-backed read/writes — the get/set/remove shape
11
- * matches the localStorage util so the change stays local.
12
- */
13
- /** Cookie-backed store mirroring the localStorage util's get/set/remove shape. */
14
- export declare const onboardingChecklistStore: {
15
- get(key: string): unknown;
16
- set(key: string, value: unknown): void;
17
- remove(key: string): void;
18
- };