@bcrumbs.net/inbox 0.0.63 → 0.0.64

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 (63) hide show
  1. package/assets/ar/inbox.json +3 -0
  2. package/assets/en/inbox.json +3 -0
  3. package/e2e/auth.setup.d.ts +1 -0
  4. package/e2e/checkout/checkout.flows.d.ts +18 -0
  5. package/e2e/global.teardown.d.ts +1 -0
  6. package/e2e/support/auth.d.ts +18 -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 +1286 -376
  13. package/index.esm.js +1288 -379
  14. package/package.json +2 -2
  15. package/playwright.config.d.ts +0 -4
  16. package/src/app/ai/components/playground/ThreadMessages.d.ts +3 -1
  17. package/src/app/auth/components/AcceptInvitation.d.ts +2 -0
  18. package/src/app/auth/components/AuthLanguagePicker.d.ts +3 -0
  19. package/src/app/auth/components/AuthVisualCarousel.d.ts +1 -0
  20. package/src/app/auth/components/ClerkSessionBridge.d.ts +4 -0
  21. package/src/app/auth/config/clerkAppearance.d.ts +153 -49
  22. package/src/app/auth/config/clerkLocalization.d.ts +6 -0
  23. package/src/app/auth/pages/Auth.style.d.ts +14 -0
  24. package/src/app/auth/pages/Login.d.ts +1 -0
  25. package/src/app/billing/pages/GatewayWelcomePage.d.ts +2 -0
  26. package/src/app/billing/pages/GuidePage.d.ts +1 -0
  27. package/src/app/billing/utils/isGatewayPlan.d.ts +2 -0
  28. package/src/app/broadcast/constants.d.ts +2 -0
  29. package/src/app/contact/components/ImportProgressDialog.d.ts +2 -1
  30. package/src/app/generic/hooks/usePaginatedQuery.d.ts +1 -0
  31. package/src/app/inbox/components/Chat/ChatContent.d.ts +3 -1
  32. package/src/app/inbox/components/NewDetails/ContactActionsMenu.d.ts +9 -0
  33. package/src/app/inbox/components/NewDetails/UserHeader.d.ts +2 -1
  34. package/src/app/inbox/components/Shared/SharedStyle.d.ts +8 -0
  35. package/src/app/inbox/hooks/useConvEnhance.d.ts +3 -1
  36. package/src/app/inbox/hooks/useConversationsPerodicFetch.d.ts +7 -0
  37. package/src/app/inbox/utils/convAssistStorage.d.ts +9 -4
  38. package/src/app/inbox/utils/convs.d.ts +4 -0
  39. package/src/app/inbox/utils/sounds.d.ts +2 -0
  40. package/src/app/layout/components/LogoutPopin.d.ts +6 -3
  41. package/src/app/layout/components/language/index.d.ts +5 -1
  42. package/src/app/layout/constants/index.d.ts +35 -0
  43. package/src/app/managemnet/config/webhookDefinition.d.ts +4 -0
  44. package/src/app/managemnet/pages/generalSettings/WritingAssistanceSettings.d.ts +9 -0
  45. package/src/app/managemnet/pages/generalSettings/holidayConstants.d.ts +5 -0
  46. package/src/app/managemnet/pages/generalSettings/writingConstants.d.ts +6 -0
  47. package/src/app/resources/components/Agents/CreateAgent.d.ts +7 -3
  48. package/src/app/resources/components/ListResources/Utils.d.ts +1 -0
  49. package/src/app/subscriptions/components/NewSubscription/SubscriptionSuccess.d.ts +3 -1
  50. package/src/app/subscriptions/components/Plans/PlanCard.d.ts +3 -1
  51. package/src/app/subscriptions/components/Plans/ShowcasePlans.d.ts +3 -1
  52. package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionCreditsCard.d.ts +5 -0
  53. package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionProfile.d.ts +0 -1
  54. package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionUsers.d.ts +0 -1
  55. package/src/app/subscriptions/components/SubscriptionSettings/index.d.ts +17 -2
  56. package/src/app/subscriptions/constants/Plans.d.ts +2 -1
  57. package/src/app/subscriptions/utils/estimateUpgradeProration.d.ts +7 -0
  58. package/src/assets/locales/translations.d.ts +145 -0
  59. package/src/environments/environment.dev.d.ts +2 -0
  60. package/src/environments/types.d.ts +2 -0
  61. package/src/graphql.autogenerated.d.ts +908 -2
  62. package/src/graphql.billing.autogenerated.d.ts +193 -0
  63. package/src/lib/index.d.ts +1 -0
@@ -90,6 +90,9 @@
90
90
  "enterRefNumber": "أدخل رقم المرجع",
91
91
  "searchChatMessages": "البحث في الرسائل",
92
92
  "archived": "مؤرشف",
93
+ "blocked": "محظور",
94
+ "contactActions": "إجراءات الزبون",
95
+ "editContact": "تعديل الزبون",
93
96
  "noChats": {
94
97
  "startConversation": "إبدأ محادثة",
95
98
  "noChannels": "لا توجد قنوات بعد.",
@@ -91,6 +91,9 @@
91
91
  "enterRefNumber": "Enter ref number",
92
92
  "searchChatMessages": "Search messages",
93
93
  "archived": "Archived",
94
+ "blocked": "Blocked",
95
+ "contactActions": "Contact actions",
96
+ "editContact": "Edit contact",
94
97
  "noChats": {
95
98
  "startConversation": "Start a conversation",
96
99
  "noChannels": "No channels yet.",
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ import { type Page } from '@playwright/test';
2
+ import { type WorkspaceCleanupTarget } from '../support';
3
+ /**
4
+ * Enter through the marketing deep link `check-auth?planType=free`. For an authenticated user this
5
+ * captures the pending `free` plan and redirects into the app, so a workspace created next auto-applies Free.
6
+ */
7
+ export declare function enterFromLandingFree(page: Page): Promise<void>;
8
+ /**
9
+ * Create a new workspace from the new-workspace step and return its cleanup target.
10
+ *
11
+ * Captures the workspace id by waiting for `ContextId` to change to a *new* positive integer —
12
+ * never a stale value carried over in storage — so teardown can never target a pre-existing workspace.
13
+ */
14
+ export declare function createWorkspace(page: Page, name: string): Promise<WorkspaceCleanupTarget>;
15
+ /** Click the Free plan's "Choose" button. */
16
+ export declare function chooseFreePlan(page: Page): Promise<void>;
17
+ /** Assert the onboarding guide is shown, opening the Crumby panel if it didn't auto-open. */
18
+ export declare function expectGuideVisible(page: Page): Promise<void>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ import { type Page } from '@playwright/test';
2
+ /** The shared, pre-verified account the suite logs in as. */
3
+ export type TestUser = {
4
+ email: string;
5
+ password: string;
6
+ };
7
+ /**
8
+ * Force the legacy (email/password) auth provider via the runtime override the app reads first
9
+ * (`window._env_.AUTH_PROVIDER`), so the E2E drives the legacy login form instead of Clerk and the
10
+ * whole flow keeps using the `localStorage.token` session. Must run before the first navigation.
11
+ */
12
+ export declare function forceLegacyAuth(page: Page): Promise<void>;
13
+ /** Log in through the UI and wait until the session token is stored. */
14
+ export declare function loginUser(page: Page, user: TestUser): Promise<void>;
15
+ /** Read the owner JWT the app stores after login (`localStorage.token`). */
16
+ export declare function readAuthToken(page: Page): Promise<string | null>;
17
+ /** Read the active workspace id the app stores (`localStorage.ContextId`). */
18
+ export declare function readWorkspaceContext(page: Page): Promise<string | null>;
@@ -0,0 +1,20 @@
1
+ import type { APIRequestContext } from '@playwright/test';
2
+ export type WorkspaceCleanupTarget = {
3
+ /** Numeric workspace id — `DeleteWorkspaceInput.workspaceId` is `Int!` (not a String/ID). */
4
+ workspaceId: number;
5
+ /** Owner JWT (from `localStorage.token` of the session that created the workspace). */
6
+ token: string;
7
+ };
8
+ /**
9
+ * Teardown entrypoint: the OWNER-only core mutation that hard-deletes core Mongo data and
10
+ * fans out to bot/billing/auth. Preferred over hitting each service directly (core owns ordering).
11
+ */
12
+ export declare function deleteWorkspaceViaCore(request: APIRequestContext, { workspaceId, token }: WorkspaceCleanupTarget): Promise<void>;
13
+ /**
14
+ * List the account's workspaces whose name matches the E2E tag — the safety-net for leaks from a
15
+ * test that created a workspace but failed before it could be tracked for teardown.
16
+ */
17
+ export declare function listE2EWorkspaces(request: APIRequestContext, token: string): Promise<Array<{
18
+ id: number;
19
+ name: string;
20
+ }>>;
@@ -0,0 +1,23 @@
1
+ /** Central, typed E2E configuration. Everything env-driven lives here — no `process.env` in tests. */
2
+ export declare const E2E: {
3
+ /** App under test. Local dev server by default; CI overrides to the deployed dev env. */
4
+ readonly baseURL: string;
5
+ /** API gateway that fronts the per-service subgraphs (core/auth/billing/bot). */
6
+ readonly gatewayURL: string;
7
+ /** Shared, pre-verified account the suite logs in as (no per-run registration). */
8
+ readonly user: {
9
+ readonly email: string;
10
+ readonly password: string;
11
+ };
12
+ };
13
+ /** Core subgraph — where `deleteWorkspace` lives once the Core service (BCR-673) is deployed. */
14
+ export declare const CORE_GRAPHQL_URL: string;
15
+ /** Auth subgraph — exposes the `workspaces` list query used by the leftover sweep. */
16
+ export declare const AUTH_GRAPHQL_URL: string;
17
+ /** Where the authenticated session (cookies + localStorage) is cached by the setup project. */
18
+ export declare const STORAGE_STATE_PATH: string;
19
+ /** The shared test user, or throw a clear error if credentials are missing. */
20
+ export declare function requireTestUser(): {
21
+ email: string;
22
+ password: string;
23
+ };
@@ -0,0 +1,16 @@
1
+ import { expect } from '@playwright/test';
2
+ import { type WorkspaceCleanupTarget } from './cleanup';
3
+ /** Registers workspaces for guaranteed teardown after the test, even on failure. */
4
+ export type WorkspaceCleanup = {
5
+ /** Track a created workspace so it is deleted (via core `deleteWorkspace`) during teardown. */
6
+ track(target: WorkspaceCleanupTarget): void;
7
+ };
8
+ type E2EFixtures = {
9
+ cleanup: WorkspaceCleanup;
10
+ };
11
+ /**
12
+ * Base test for the checkout E2E suite. Every workspace created during a test must be registered
13
+ * with `cleanup.track(...)`; the fixture deletes them all afterwards so the shared backend stays clean.
14
+ */
15
+ export declare const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & E2EFixtures, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions>;
16
+ export { expect };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Run-scoped, collision-free identifiers for test fixtures.
3
+ *
4
+ * Backends are shared with real users, so every created record must be uniquely named and
5
+ * clearly tagged (`e2e` prefix) — both to avoid name-availability clashes and to make any
6
+ * leftover data from a crashed run easy to spot and purge.
7
+ */
8
+ /** Shared tag so leftover E2E data is identifiable in the shared backend. */
9
+ export declare const E2E_PREFIX = "e2e";
10
+ /** Unique per worker process (Playwright re-imports modules per worker). */
11
+ export declare const RUN_ID: string;
12
+ /** Human-readable, unique workspace name (passes the name-availability check). */
13
+ export declare function uniqueWorkspaceName(): string;
@@ -0,0 +1,6 @@
1
+ /** Shared E2E foundation. Feature specs import infra from here; feature flows live beside the spec. */
2
+ export { test, expect, type WorkspaceCleanup } from './fixtures';
3
+ export { E2E, CORE_GRAPHQL_URL, AUTH_GRAPHQL_URL, STORAGE_STATE_PATH, requireTestUser } from './config';
4
+ export { loginUser, readAuthToken, readWorkspaceContext, type TestUser } from './auth';
5
+ export { deleteWorkspaceViaCore, listE2EWorkspaces, type WorkspaceCleanupTarget } from './cleanup';
6
+ export { E2E_PREFIX, RUN_ID, uniqueWorkspaceName } from './identifiers';