@adminide-stack/yantra-mobile 12.0.194-alpha.0 → 12.0.194-alpha.1
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/lib/bridge/handlers/NavigationBridgeHandler.js +6 -9
- package/lib/bridge/handlers/NavigationBridgeHandler.js.map +1 -1
- package/lib/components/BrandBar/BrandBarBackground.js +27 -0
- package/lib/components/BrandBar/BrandBarBackground.js.map +1 -0
- package/lib/components/BrandBar/MenuToggle.js +73 -0
- package/lib/components/BrandBar/MenuToggle.js.map +1 -0
- package/lib/components/CustomDrawer.js +6 -6
- package/lib/components/CustomDrawer.js.map +1 -1
- package/lib/components/GatewayConnector/GatewayConnector.js +3 -2
- package/lib/components/GatewayConnector/GatewayConnector.js.map +1 -1
- package/lib/components/GatewayToolbarButtonMobile.js +12 -2
- package/lib/components/GatewayToolbarButtonMobile.js.map +1 -1
- package/lib/components/NavigationHeader/HeaderChip.js +76 -0
- package/lib/components/NavigationHeader/HeaderChip.js.map +1 -0
- package/lib/components/NavigationHeader/HeaderSkillsButton.js +4 -3
- package/lib/components/NavigationHeader/HeaderSkillsButton.js.map +1 -1
- package/lib/components/NavigationHeader/HeaderTasksButton.js +4 -3
- package/lib/components/NavigationHeader/HeaderTasksButton.js.map +1 -1
- package/lib/components/NavigationHeader/NavigationHeader.js +96 -41
- package/lib/components/NavigationHeader/NavigationHeader.js.map +1 -1
- package/lib/components/YantraTopBar/YantraTopBar.js +98 -0
- package/lib/components/YantraTopBar/YantraTopBar.js.map +1 -0
- package/lib/compute.js +18 -25
- package/lib/compute.js.map +1 -1
- package/lib/features/apps/AppsCatalog.js +7 -4
- package/lib/features/apps/AppsCatalog.js.map +1 -1
- package/lib/features/apps/MarketplaceGallery.js +6 -3
- package/lib/features/apps/MarketplaceGallery.js.map +1 -1
- package/lib/features/apps/nativeSurfaceTwin.js +1 -1
- package/lib/features/apps/nativeSurfaceTwin.js.map +1 -1
- package/lib/features/apps/useMarketplaceApps.js +6 -2
- package/lib/features/apps/useMarketplaceApps.js.map +1 -1
- package/lib/features/attachments/useImageAttachments.js +44 -1
- package/lib/features/attachments/useImageAttachments.js.map +1 -1
- package/lib/features/credits/FreeCreditsPhoneStepHost.js +67 -0
- package/lib/features/credits/FreeCreditsPhoneStepHost.js.map +1 -0
- package/lib/features/credits/freeCredits.js +52 -13
- package/lib/features/credits/freeCredits.js.map +1 -1
- package/lib/features/credits/freeCreditsPhoneStep.js +55 -0
- package/lib/features/credits/freeCreditsPhoneStep.js.map +1 -0
- package/lib/features/credits/useFreeCredits.js +29 -3
- package/lib/features/credits/useFreeCredits.js.map +1 -1
- package/lib/features/links/openInApp.js +3 -6
- package/lib/features/links/openInApp.js.map +1 -1
- package/lib/features/webbuilder/WebBuilderExperience.js +88 -28
- package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -1
- package/lib/features/webbuilder/appPreview.js +70 -0
- package/lib/features/webbuilder/appPreview.js.map +1 -0
- package/lib/features/webbuilder/buildFragments.js +33 -12
- package/lib/features/webbuilder/buildFragments.js.map +1 -1
- package/lib/features/webbuilder/components/AppPhoneSheet.js +127 -0
- package/lib/features/webbuilder/components/AppPhoneSheet.js.map +1 -0
- package/lib/features/webbuilder/components/BottomTabs.js +32 -21
- package/lib/features/webbuilder/components/BottomTabs.js.map +1 -1
- package/lib/features/webbuilder/components/Composer.js +144 -47
- package/lib/features/webbuilder/components/Composer.js.map +1 -1
- package/lib/features/webbuilder/components/PreviewFrame.js +1 -1
- package/lib/features/webbuilder/components/PreviewFrame.js.map +1 -1
- package/lib/features/webbuilder/components/PreviewScreen.js +9 -4
- package/lib/features/webbuilder/components/PreviewScreen.js.map +1 -1
- package/lib/features/webbuilder/components/ProjectSheets.js +76 -22
- package/lib/features/webbuilder/components/ProjectSheets.js.map +1 -1
- package/lib/features/webbuilder/components/ProjectsScreen.js +30 -12
- package/lib/features/webbuilder/components/ProjectsScreen.js.map +1 -1
- package/lib/features/webbuilder/components/PublishSheet.js +2 -2
- package/lib/features/webbuilder/components/PublishSheet.js.map +1 -1
- package/lib/features/webbuilder/components/SiteUploadSheet.js +17 -2
- package/lib/features/webbuilder/components/SiteUploadSheet.js.map +1 -1
- package/lib/features/webbuilder/components/SocialExportPicker.js +253 -0
- package/lib/features/webbuilder/components/SocialExportPicker.js.map +1 -0
- package/lib/features/webbuilder/components/StudioHome.js +300 -185
- package/lib/features/webbuilder/components/StudioHome.js.map +1 -1
- package/lib/features/webbuilder/components/TemplateCard.js +13 -5
- package/lib/features/webbuilder/components/TemplateCard.js.map +1 -1
- package/lib/features/webbuilder/connectorTemplates.js +3 -2
- package/lib/features/webbuilder/connectorTemplates.js.map +1 -1
- package/lib/features/webbuilder/liveSiteDelete.js +58 -0
- package/lib/features/webbuilder/liveSiteDelete.js.map +1 -0
- package/lib/features/webbuilder/publishTools.js +3 -1
- package/lib/features/webbuilder/publishTools.js.map +1 -1
- package/lib/features/webbuilder/socialExportFile.js +84 -0
- package/lib/features/webbuilder/socialExportFile.js.map +1 -0
- package/lib/features/webbuilder/stepLabels.js +7 -7
- package/lib/features/webbuilder/stepLabels.js.map +1 -1
- package/lib/features/webbuilder/thumbSources.js +17 -3
- package/lib/features/webbuilder/thumbSources.js.map +1 -1
- package/lib/features/webbuilder/useVoiceTyping.js +169 -0
- package/lib/features/webbuilder/useVoiceTyping.js.map +1 -0
- package/lib/features/webbuilder/web/chat/connectRequest.js +17 -0
- package/lib/features/webbuilder/web/chat/connectRequest.js.map +1 -0
- package/lib/features/webbuilder/web/notify/turnDone.js +20 -0
- package/lib/features/webbuilder/web/notify/turnDone.js.map +1 -0
- package/lib/features/webbuilder/web/project/coverRequest.js +22 -0
- package/lib/features/webbuilder/web/project/coverRequest.js.map +1 -0
- package/lib/features/webbuilder/web/project/deleteFlow.js +57 -0
- package/lib/features/webbuilder/web/project/deleteFlow.js.map +1 -0
- package/lib/features/webbuilder/web/publish/siteAddress.js +5 -1
- package/lib/features/webbuilder/web/publish/siteAddress.js.map +1 -1
- package/lib/features/webbuilder/web/upload/sitePhotos.js +2 -2
- package/lib/features/webbuilder/web/upload/sitePhotos.js.map +1 -1
- package/lib/features/webbuilder/web/upload/socialExport.js +191 -0
- package/lib/features/webbuilder/web/upload/socialExport.js.map +1 -0
- package/lib/features/webbuilder/web/upload/zipRandomAccess.js +64 -0
- package/lib/features/webbuilder/web/upload/zipRandomAccess.js.map +1 -0
- package/lib/features/webbuilder/web/webServices.js +27 -3
- package/lib/features/webbuilder/web/webServices.js.map +1 -1
- package/lib/hooks/useHeaderProfile.js +25 -0
- package/lib/hooks/useHeaderProfile.js.map +1 -0
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/routes.json +21 -29
- package/lib/screens/Account/AccountSheets.js +140 -74
- package/lib/screens/Account/AccountSheets.js.map +1 -1
- package/lib/screens/Account/index.js +3 -3
- package/lib/screens/Account/index.js.map +1 -1
- package/lib/screens/Apps/index.js +1 -1
- package/lib/screens/Apps/index.js.map +1 -1
- package/lib/screens/ChatHistory/index.js +1 -1
- package/lib/screens/ChatHistory/index.js.map +1 -1
- package/lib/screens/ExpensesNative/index.js +3 -3
- package/lib/screens/ExpensesNative/index.js.map +1 -1
- package/lib/screens/Home/HomeScreen.js +11 -0
- package/lib/screens/Home/HomeScreen.js.map +1 -1
- package/lib/screens/Home/components/ChatHistoryLanding.js +3 -2
- package/lib/screens/Home/components/ChatHistoryLanding.js.map +1 -1
- package/lib/screens/WebBuilderNative/index.js +3 -2
- package/lib/screens/WebBuilderNative/index.js.map +1 -1
- package/lib/screens/WebBuilderNative/useWebBuilderHost.js +2 -2
- package/lib/screens/WebBuilderNative/useWebBuilderHost.js.map +1 -1
- package/lib/utils/drawerRoutes.js +13 -0
- package/lib/utils/drawerRoutes.js.map +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webServices.js","sources":["../../../../src/features/webbuilder/web/webServices.ts"],"sourcesContent":["/**\n * The web panels' services on the phone: Secrets (`secrets/secretsApi`), Cloud (`data/dataApi`) and\n * Integrations (web `integrations/useIntegrationsService`), built from the web's own modules over the\n * host's GraphQL seam. Each call is the web's request, unchanged. Pure (no React).\n */\nimport { createDataService, type WebBuilderDataService } from './data/dataApi';\nimport type { GraphqlTransport } from './data/graphql';\nimport { createSecretsService, type WebBuilderSecretsService } from './secrets/secretsApi';\nimport { SecretsCredentialStore } from './secrets/secretsStore';\nimport {\n API_KEY_CONNECT,\n INTEGRATION_CATALOG_QUERY,\n INTEGRATION_CREDENTIALS_QUERY,\n checkApiKey,\n connectorConnectUrl,\n parseCatalog,\n parseCredentials,\n withBuiltInEntries,\n type IntegrationCatalogEntry,\n type IntegrationCredential,\n} from './integrations/catalog';\nimport {\n appTokenStatusFromNames,\n createAppSecretsAdapter,\n mintAndStoreAppToken,\n type AppSecretsAdapter,\n type AppTokenStatus,\n} from './integrations/appToken';\nimport { enableSiteBilling } from './integrations/siteBilling';\nimport { disableSiteMail, enableSiteMail, siteMailStatus } from './integrations/siteMail';\nimport { createSharingService, type WebBuilderSharingService } from './sharing/sharingApi';\nimport { createGithubConnectService, type GithubConnectService } from './github/githubConnectApi';\nimport {\n PROJECT_SETTINGS_QUERY,\n parseServerProjectSettings,\n type ProjectIntegration,\n type ServerProjectSettings,\n} from './project/serverSettings';\n\nexport interface WebScope {\n orgName: string;\n projectId: string;\n environmentTagId: string;\n}\n\n/**\n * The agent a published site calls (`YANTRA_AGENT_URL`) when the host names none. The host passes the\n * agent of its own plane (web 0.10.1: prod must never fall back to the dev agent).\n */\nexport const SITE_AGENT_URL = 'https://cdecli-agent.cdebase.dev';\n\n/** surface-kit `connectApiKeyConnector`'s request: the connector entry plus the key, recorded `active`. */\nconst CREATE_CUSTOM_CONNECTOR = `\n mutation CreateCustomConnectorExtension($input: CreateCustomConnectorExtensionInput!) {\n createCustomConnectorExtension(input: $input) {\n success message credentialId authorizationUrl connectorType\n }\n }`;\n\nfunction credentialSafeName(raw: string): string {\n return (\n raw\n .replace(/[^A-Za-z0-9 _-]+/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim() || 'Credential'\n );\n}\n\nfunction newUuid(): string {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = Math.floor(Math.random() * 16);\n return (c === 'x' ? r : (r % 4) + 8).toString(16);\n });\n}\n\n/** surface-kit `buildCustomConnectorInput` for an api_key connector (the fields Stripe sends). */\nfunction apiKeyConnectorInput(\n connectorId: string,\n spec: (typeof API_KEY_CONNECT)[string],\n key: string,\n scope: WebScope,\n): Record<string, unknown> {\n const name = credentialSafeName(`${spec.label} web builder`);\n return {\n name,\n description: `Custom connector for ${connectorId}`,\n extensionUuid: newUuid(),\n orgName: scope.orgName,\n projectId: scope.projectId,\n environmentTag: scope.environmentTagId,\n publisher: scope.orgName,\n connectorType: 'app',\n provider: {\n id: connectorId,\n name,\n title: name,\n description: `${spec.label} credential`,\n baseUrl: spec.baseUrl,\n providerUrl: '',\n logo: '',\n categories: ['other'],\n category: 'other',\n authMethods: ['api_key'],\n authorizationUrl: '',\n tokenUrl: '',\n revocationUrl: '',\n mcpUrl: '',\n scopes: '',\n clientAuthMethod: 'client_secret_post',\n useBasicAuth: false,\n useCustomOAuthEndpoints: false,\n usePKCE: false,\n color: '',\n iconName: 'AiOutlineApi',\n iconFontSize: 'large',\n enabled: true,\n fields: [\n {\n defaultValue: '',\n description: '',\n enumValues: '',\n genericType: 'api_key',\n iconType: '',\n isConfigField: true,\n isSecret: true,\n label: spec.field.label,\n name: spec.field.name,\n placeholder: '',\n placement: 'none',\n placementKey: '',\n readOnly: false,\n required: false,\n scope: 4,\n secretKey: spec.field.secretKey,\n secretType: 'ENVIRONMENT_VAR',\n type: 'string',\n uiWidget: 'password',\n },\n ],\n },\n values: { authMethod: 'api_key', [spec.field.name]: key.trim() },\n };\n}\n\n/** A project as the web services read it. */\nexport interface WebProjectRef {\n channelId: string;\n projectId?: string | null;\n sandboxId?: string | null;\n templateId?: string | null;\n}\n\nexport interface WebIntegrationsService {\n loadCatalog: () => Promise<IntegrationCatalogEntry[]>;\n /** The person's connections in this workspace; null when they can't be read. */\n loadConnections: () => Promise<IntegrationCredential[] | null>;\n connectUrl: (connectorId: string) => string | null;\n /** The project's saved integrations (server settings); null when they can't be read. */\n projectIntegrations: (channelId: string) => Promise<ProjectIntegration[] | null>;\n appTokenStatus: (project: WebProjectRef) => Promise<AppTokenStatus>;\n createAppToken: (project: WebProjectRef) => Promise<{ ok: boolean; message?: string }>;\n enableSiteBilling: (\n project: WebProjectRef,\n stripeCredentialId: string,\n ) => Promise<{ ok: boolean; message?: string }>;\n connectApiKey: (connectorId: string, key: string) => Promise<{ ok: boolean; message?: string }>;\n siteMail: {\n enable: (project: WebProjectRef, domain: string, notifyTo: string) => ReturnType<typeof enableSiteMail>;\n status: (project: WebProjectRef, diagnose?: boolean) => ReturnType<typeof siteMailStatus>;\n disable: (project: WebProjectRef) => ReturnType<typeof disableSiteMail>;\n };\n}\n\nexport interface WebServices {\n data: WebBuilderDataService;\n secrets: WebBuilderSecretsService;\n appSecrets: AppSecretsAdapter;\n integrations: WebIntegrationsService;\n sharing: WebBuilderSharingService;\n /** The person's own GitHub connection (web 0.20.0 Connect GitHub): status and paste-a-token. */\n githubConnect: GithubConnectService;\n /** The project's server settings (integrations, GitHub sync, database…); null when unreadable. */\n serverSettings: (channelId: string) => Promise<ServerProjectSettings | null>;\n}\n\nexport function createWebServices(opts: {\n transport: GraphqlTransport;\n scope: () => WebScope;\n appUrl?: string;\n /** The agent of the app's own plane (the build profile's CDECLI_AGENT_ENDPOINT). */\n agentUrl?: string;\n}): WebServices {\n const { transport, scope } = opts;\n const data = createDataService(transport);\n const secrets = createSecretsService({\n transport,\n data,\n store: new SecretsCredentialStore(null),\n scope: () => {\n const s = scope();\n return { orgName: s.orgName, project: s.projectId };\n },\n });\n const appSecrets = createAppSecretsAdapter(secrets);\n // The web helpers type `errors` as a plain array; the seam's is read-only (same values).\n const gql = <T>(query: string, variables: Record<string, unknown>) =>\n transport.mutate<T>(query, variables) as Promise<{ data?: T; errors?: Array<{ message: string }> }>;\n /** The project's secrets credential is recorded on its settings (web `settingsSync.update`). */\n const keepCredential = async (channelId: string, credentialId?: string | null) => {\n if (!credentialId) return;\n const s = await data.getSettings(channelId);\n if (s.ok && s.value?.secretsCredentialId !== credentialId) {\n await data.updateSettings(channelId, { secretsCredentialId: credentialId });\n }\n };\n let catalog: Promise<IntegrationCatalogEntry[]> | null = null;\n\n const integrations: WebIntegrationsService = {\n loadCatalog: async () => {\n if (!catalog) {\n catalog = transport\n .query<{ integrationConnectors?: unknown }>(INTEGRATION_CATALOG_QUERY, {})\n .then((r) => {\n if (r.errors?.length && !r.data?.integrationConnectors) {\n catalog = null;\n throw new Error(r.errors[0].message || \"Couldn't load the integrations.\");\n }\n return withBuiltInEntries(parseCatalog(r.data?.integrationConnectors));\n });\n }\n return catalog;\n },\n loadConnections: async () => {\n const s = scope();\n if (!s.orgName || !s.projectId) return null;\n const r = await transport.query<{ formBuilderCredentials?: { data?: unknown } }>(\n INTEGRATION_CREDENTIALS_QUERY,\n {\n filter: {\n orgName: s.orgName,\n projectId: s.projectId,\n ...(s.environmentTagId ? { environmentTag: s.environmentTagId } : {}),\n },\n limit: 200,\n },\n );\n if (r.errors?.length && !r.data?.formBuilderCredentials) return null;\n return parseCredentials(r.data?.formBuilderCredentials?.data);\n },\n connectUrl: (connectorId) =>\n opts.appUrl ? connectorConnectUrl(opts.appUrl, connectorId, scope().projectId) : null,\n projectIntegrations: async (channelId) => {\n const r = await transport.query<{ aiCodeProjectSettings?: unknown }>(PROJECT_SETTINGS_QUERY, { channelId });\n if (r.errors?.length && r.data?.aiCodeProjectSettings === undefined) return null;\n return parseServerProjectSettings(r.data?.aiCodeProjectSettings)?.integrations ?? [];\n },\n appTokenStatus: async (project) => {\n if (!project.channelId) return 'unavailable';\n try {\n return appTokenStatusFromNames(\n await appSecrets.listSecretNames({\n channelId: project.channelId,\n projectId: project.projectId ?? undefined,\n }),\n );\n } catch {\n return 'unavailable';\n }\n },\n createAppToken: async (project) => {\n if (!project.channelId) return { ok: false, message: 'Open a project first.' };\n const r = await mintAndStoreAppToken({\n channelId: project.channelId,\n projectId: project.projectId ?? undefined,\n scope: scope(),\n agentUrl: opts.agentUrl || SITE_AGENT_URL,\n secrets: appSecrets,\n gql,\n });\n // The web's result union, read without narrowing (native: no strict null checks).\n const minted = r as { ok: boolean; credentialId?: string; warning?: string; message?: string };\n if (!minted.ok) return { ok: false, message: minted.message };\n await keepCredential(project.channelId, minted.credentialId);\n return minted.warning ? { ok: true, message: minted.warning } : { ok: true };\n },\n enableSiteBilling: async (project, stripeCredentialId) => {\n if (!project.channelId) return { ok: false, message: 'Open a project first.' };\n const r = await enableSiteBilling({\n channelId: project.channelId,\n projectId: project.projectId ?? undefined,\n stripeCredentialId,\n secrets: appSecrets,\n gql,\n });\n const billed = r as { ok: boolean; credentialId?: string; message?: string };\n if (billed.ok) await keepCredential(project.channelId, billed.credentialId);\n return billed.ok ? { ok: true } : { ok: false, message: billed.message };\n },\n connectApiKey: async (connectorId, key) => {\n const spec = API_KEY_CONNECT[connectorId];\n if (!spec || !checkApiKey(connectorId, key).ok) {\n return { ok: false, message: `That doesn't look like a ${spec?.label ?? ''} secret key.` };\n }\n const s = scope();\n if (!s.orgName || !s.projectId || !s.environmentTagId) {\n return {\n ok: false,\n message: \"Can't tell which workspace to save the key in. Sign in again, then retry.\",\n };\n }\n const r = await transport.mutate<{\n createCustomConnectorExtension?: { credentialId?: string; message?: string };\n }>(CREATE_CUSTOM_CONNECTOR, { input: apiKeyConnectorInput(connectorId, spec, key, s) });\n const created = r.data?.createCustomConnectorExtension;\n if (!created?.credentialId) {\n return {\n ok: false,\n message: created?.message || r.errors?.[0]?.message || `${spec.label} couldn't be connected.`,\n };\n }\n return { ok: true };\n },\n siteMail: {\n enable: async (project, domain, notifyTo) => {\n const r = await enableSiteMail({\n channelId: project.channelId,\n projectId: project.projectId ?? undefined,\n domain,\n notifyTo,\n secrets: appSecrets,\n gql,\n });\n const mailed = r as { ok: boolean; credentialId?: string };\n if (mailed.ok) await keepCredential(project.channelId, mailed.credentialId);\n return r;\n },\n status: (project, diagnose) => siteMailStatus(gql, project.channelId, diagnose),\n disable: (project) => disableSiteMail(gql, project.channelId),\n },\n };\n\n // The web's sharing calls take one document runner: a mutation goes out as one, the rest as queries.\n const sharing = createSharingService((document, variables) =>\n /^\\s*mutation\\b/.test(document) ? transport.mutate(document, variables) : transport.query(document, variables),\n );\n\n const serverSettings = async (channelId: string) => {\n const r = await transport.query<{ aiCodeProjectSettings?: unknown }>(PROJECT_SETTINGS_QUERY, { channelId });\n if (r.errors?.length && r.data?.aiCodeProjectSettings === undefined) return null;\n return parseServerProjectSettings(r.data?.aiCodeProjectSettings);\n };\n\n const githubConnect = createGithubConnectService({\n transport,\n scope: () => {\n const s = scope();\n return { orgName: s.orgName, project: s.projectId };\n },\n currentUserId: () => sharing.currentUserId().catch(() => null),\n });\n\n return { data, secrets, appSecrets, integrations, sharing, githubConnect, serverSettings };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA0BO,MAAM,cAAiB,GAAA;AAG9B,MAAM,uBAA0B,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAAA,CAAA;AAMhC,SAAS,mBAAmB,GAAqB,EAAA;AAC/C,EAAO,OAAA,GAAA,CAAI,OAAQ,CAAA,mBAAA,EAAqB,GAAG,CAAA,CAAE,QAAQ,MAAQ,EAAA,GAAG,CAAE,CAAA,IAAA,EAAU,IAAA,YAAA;AAC9E;AACA,SAAS,OAAkB,GAAA;AACzB,EAAO,OAAA,sCAAA,CAAuC,OAAQ,CAAA,OAAA,EAAS,CAAK,CAAA,KAAA;AAClE,IAAA,MAAM,IAAI,IAAK,CAAA,KAAA,CAAM,IAAK,CAAA,MAAA,KAAW,EAAE,CAAA;AACvC,IAAA,OAAA,CAAQ,MAAM,GAAM,GAAA,CAAA,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,CAAA;AACD,EAAO,OAAA;AAAA,IACL,IAAA;AAAA,IACA,OAAA;AAAA,IACA,UAAA;AAAA,IACA,YAAA;AAAA,IACA,OAAA;AAAA,IACA,aAAA;AAAA,IACA;AAAA,GACF;AACF"}
|
|
1
|
+
{"version":3,"file":"webServices.js","sources":["../../../../src/features/webbuilder/web/webServices.ts"],"sourcesContent":["/**\n * The web panels' services on the phone: Secrets (`secrets/secretsApi`), Cloud (`data/dataApi`) and\n * Integrations (web `integrations/useIntegrationsService`), built from the web's own modules over the\n * host's GraphQL seam. Each call is the web's request, unchanged. Pure (no React).\n */\nimport { createDataService, type WebBuilderDataService } from './data/dataApi';\nimport type { GraphqlTransport } from './data/graphql';\nimport { createSecretsService, type WebBuilderSecretsService } from './secrets/secretsApi';\nimport { SecretsCredentialStore } from './secrets/secretsStore';\nimport {\n API_KEY_CONNECT,\n INTEGRATION_CATALOG_QUERY,\n INTEGRATION_CREDENTIALS_QUERY,\n checkApiKey,\n connectorConnectUrl,\n parseCatalog,\n parseCredentials,\n withBuiltInEntries,\n type IntegrationCatalogEntry,\n type IntegrationCredential,\n} from './integrations/catalog';\nimport {\n appTokenStatusFromNames,\n createAppSecretsAdapter,\n mintAndStoreAppToken,\n type AppSecretsAdapter,\n type AppTokenStatus,\n} from './integrations/appToken';\nimport { enableSiteBilling } from './integrations/siteBilling';\nimport { disableSiteMail, enableSiteMail, siteMailStatus } from './integrations/siteMail';\nimport { createSharingService, type GqlCall, type WebBuilderSharingService } from './sharing/sharingApi';\nimport { createGithubConnectService, type GithubConnectService } from './github/githubConnectApi';\nimport { createCoverRequester, type CoverRequester } from './project/coverRequest';\nimport { CLOUDFLARE_PROJECT_QUERY, siteFromLookup, type KnownPublish, type SiteLookup } from './project/deleteFlow';\nimport {\n PROJECT_SETTINGS_QUERY,\n parseServerProjectSettings,\n type ProjectIntegration,\n type ServerProjectSettings,\n} from './project/serverSettings';\n\nexport interface WebScope {\n orgName: string;\n projectId: string;\n environmentTagId: string;\n}\n\n/**\n * The agent a published site calls (`YANTRA_AGENT_URL`) when the host names none. The host passes the\n * agent of its own plane (web 0.10.1: prod must never fall back to the dev agent).\n */\nexport const SITE_AGENT_URL = 'https://cdecli-agent.cdebase.dev';\n\n/** surface-kit `connectApiKeyConnector`'s request: the connector entry plus the key, recorded `active`. */\nconst CREATE_CUSTOM_CONNECTOR = `\n mutation CreateCustomConnectorExtension($input: CreateCustomConnectorExtensionInput!) {\n createCustomConnectorExtension(input: $input) {\n success message credentialId authorizationUrl connectorType\n }\n }`;\n\nfunction credentialSafeName(raw: string): string {\n return (\n raw\n .replace(/[^A-Za-z0-9 _-]+/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim() || 'Credential'\n );\n}\n\nfunction newUuid(): string {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = Math.floor(Math.random() * 16);\n return (c === 'x' ? r : (r % 4) + 8).toString(16);\n });\n}\n\n/** surface-kit `buildCustomConnectorInput` for an api_key connector (the fields Stripe sends). */\nfunction apiKeyConnectorInput(\n connectorId: string,\n spec: (typeof API_KEY_CONNECT)[string],\n key: string,\n scope: WebScope,\n): Record<string, unknown> {\n const name = credentialSafeName(`${spec.label} web builder`);\n return {\n name,\n description: `Custom connector for ${connectorId}`,\n extensionUuid: newUuid(),\n orgName: scope.orgName,\n projectId: scope.projectId,\n environmentTag: scope.environmentTagId,\n publisher: scope.orgName,\n connectorType: 'app',\n provider: {\n id: connectorId,\n name,\n title: name,\n description: `${spec.label} credential`,\n baseUrl: spec.baseUrl,\n providerUrl: '',\n logo: '',\n categories: ['other'],\n category: 'other',\n authMethods: ['api_key'],\n authorizationUrl: '',\n tokenUrl: '',\n revocationUrl: '',\n mcpUrl: '',\n scopes: '',\n clientAuthMethod: 'client_secret_post',\n useBasicAuth: false,\n useCustomOAuthEndpoints: false,\n usePKCE: false,\n color: '',\n iconName: 'AiOutlineApi',\n iconFontSize: 'large',\n enabled: true,\n fields: [\n {\n defaultValue: '',\n description: '',\n enumValues: '',\n genericType: 'api_key',\n iconType: '',\n isConfigField: true,\n isSecret: true,\n label: spec.field.label,\n name: spec.field.name,\n placeholder: '',\n placement: 'none',\n placementKey: '',\n readOnly: false,\n required: false,\n scope: 4,\n secretKey: spec.field.secretKey,\n secretType: 'ENVIRONMENT_VAR',\n type: 'string',\n uiWidget: 'password',\n },\n ],\n },\n values: { authMethod: 'api_key', [spec.field.name]: key.trim() },\n };\n}\n\n/** A project as the web services read it. */\nexport interface WebProjectRef {\n channelId: string;\n projectId?: string | null;\n sandboxId?: string | null;\n templateId?: string | null;\n}\n\nexport interface WebIntegrationsService {\n loadCatalog: () => Promise<IntegrationCatalogEntry[]>;\n /** The person's connections in this workspace; null when they can't be read. */\n loadConnections: () => Promise<IntegrationCredential[] | null>;\n connectUrl: (connectorId: string) => string | null;\n /** The project's saved integrations (server settings); null when they can't be read. */\n projectIntegrations: (channelId: string) => Promise<ProjectIntegration[] | null>;\n appTokenStatus: (project: WebProjectRef) => Promise<AppTokenStatus>;\n createAppToken: (project: WebProjectRef) => Promise<{ ok: boolean; message?: string }>;\n enableSiteBilling: (\n project: WebProjectRef,\n stripeCredentialId: string,\n ) => Promise<{ ok: boolean; message?: string }>;\n connectApiKey: (connectorId: string, key: string) => Promise<{ ok: boolean; message?: string }>;\n siteMail: {\n enable: (project: WebProjectRef, domain: string, notifyTo: string) => ReturnType<typeof enableSiteMail>;\n status: (project: WebProjectRef, diagnose?: boolean) => ReturnType<typeof siteMailStatus>;\n disable: (project: WebProjectRef) => ReturnType<typeof disableSiteMail>;\n };\n}\n\nexport interface WebServices {\n data: WebBuilderDataService;\n secrets: WebBuilderSecretsService;\n appSecrets: AppSecretsAdapter;\n integrations: WebIntegrationsService;\n sharing: WebBuilderSharingService;\n /** The person's own GitHub connection (web 0.20.0 Connect GitHub): status and paste-a-token. */\n githubConnect: GithubConnectService;\n /** The project's server settings (integrations, GitHub sync, database…); null when unreadable. */\n serverSettings: (channelId: string) => Promise<ServerProjectSettings | null>;\n /** Ask the server to take a build's cover: its preview is on screen and it has none (web 0.20.12). */\n requestCover: CoverRequester;\n /** The project's live site before a delete (web Phase 5 §7): a site, nothing published, or 'unknown'. */\n findPublishedSite: (channelId: string, known: KnownPublish) => Promise<SiteLookup>;\n}\n\nexport function createWebServices(opts: {\n transport: GraphqlTransport;\n scope: () => WebScope;\n appUrl?: string;\n /** The agent of the app's own plane (the build profile's CDECLI_AGENT_ENDPOINT). */\n agentUrl?: string;\n}): WebServices {\n const { transport, scope } = opts;\n const data = createDataService(transport);\n const secrets = createSecretsService({\n transport,\n data,\n store: new SecretsCredentialStore(null),\n scope: () => {\n const s = scope();\n return { orgName: s.orgName, project: s.projectId };\n },\n });\n const appSecrets = createAppSecretsAdapter(secrets);\n // The web helpers type `errors` as a plain array; the seam's is read-only (same values).\n const gql = <T>(query: string, variables: Record<string, unknown>) =>\n transport.mutate<T>(query, variables) as Promise<{ data?: T; errors?: Array<{ message: string }> }>;\n /** The project's secrets credential is recorded on its settings (web `settingsSync.update`). */\n const keepCredential = async (channelId: string, credentialId?: string | null) => {\n if (!credentialId) return;\n const s = await data.getSettings(channelId);\n if (s.ok && s.value?.secretsCredentialId !== credentialId) {\n await data.updateSettings(channelId, { secretsCredentialId: credentialId });\n }\n };\n let catalog: Promise<IntegrationCatalogEntry[]> | null = null;\n\n const integrations: WebIntegrationsService = {\n loadCatalog: async () => {\n if (!catalog) {\n catalog = transport\n .query<{ integrationConnectors?: unknown }>(INTEGRATION_CATALOG_QUERY, {})\n .then((r) => {\n if (r.errors?.length && !r.data?.integrationConnectors) {\n catalog = null;\n throw new Error(r.errors[0].message || \"Couldn't load the integrations.\");\n }\n return withBuiltInEntries(parseCatalog(r.data?.integrationConnectors));\n });\n }\n return catalog;\n },\n loadConnections: async () => {\n const s = scope();\n if (!s.orgName || !s.projectId) return null;\n const r = await transport.query<{ formBuilderCredentials?: { data?: unknown } }>(\n INTEGRATION_CREDENTIALS_QUERY,\n {\n filter: {\n orgName: s.orgName,\n projectId: s.projectId,\n ...(s.environmentTagId ? { environmentTag: s.environmentTagId } : {}),\n },\n limit: 200,\n },\n );\n if (r.errors?.length && !r.data?.formBuilderCredentials) return null;\n return parseCredentials(r.data?.formBuilderCredentials?.data);\n },\n connectUrl: (connectorId) =>\n opts.appUrl ? connectorConnectUrl(opts.appUrl, connectorId, scope().projectId) : null,\n projectIntegrations: async (channelId) => {\n const r = await transport.query<{ aiCodeProjectSettings?: unknown }>(PROJECT_SETTINGS_QUERY, { channelId });\n if (r.errors?.length && r.data?.aiCodeProjectSettings === undefined) return null;\n return parseServerProjectSettings(r.data?.aiCodeProjectSettings)?.integrations ?? [];\n },\n appTokenStatus: async (project) => {\n if (!project.channelId) return 'unavailable';\n try {\n return appTokenStatusFromNames(\n await appSecrets.listSecretNames({\n channelId: project.channelId,\n projectId: project.projectId ?? undefined,\n }),\n );\n } catch {\n return 'unavailable';\n }\n },\n createAppToken: async (project) => {\n if (!project.channelId) return { ok: false, message: 'Open a project first.' };\n const r = await mintAndStoreAppToken({\n channelId: project.channelId,\n projectId: project.projectId ?? undefined,\n scope: scope(),\n agentUrl: opts.agentUrl || SITE_AGENT_URL,\n secrets: appSecrets,\n gql,\n });\n // The web's result union, read without narrowing (native: no strict null checks).\n const minted = r as { ok: boolean; credentialId?: string; warning?: string; message?: string };\n if (!minted.ok) return { ok: false, message: minted.message };\n await keepCredential(project.channelId, minted.credentialId);\n return minted.warning ? { ok: true, message: minted.warning } : { ok: true };\n },\n enableSiteBilling: async (project, stripeCredentialId) => {\n if (!project.channelId) return { ok: false, message: 'Open a project first.' };\n const r = await enableSiteBilling({\n channelId: project.channelId,\n projectId: project.projectId ?? undefined,\n stripeCredentialId,\n secrets: appSecrets,\n gql,\n });\n const billed = r as { ok: boolean; credentialId?: string; message?: string };\n if (billed.ok) await keepCredential(project.channelId, billed.credentialId);\n return billed.ok ? { ok: true } : { ok: false, message: billed.message };\n },\n connectApiKey: async (connectorId, key) => {\n const spec = API_KEY_CONNECT[connectorId];\n if (!spec || !checkApiKey(connectorId, key).ok) {\n return { ok: false, message: `That doesn't look like a ${spec?.label ?? ''} secret key.` };\n }\n const s = scope();\n if (!s.orgName || !s.projectId || !s.environmentTagId) {\n return {\n ok: false,\n message: \"Can't tell which workspace to save the key in. Sign in again, then retry.\",\n };\n }\n const r = await transport.mutate<{\n createCustomConnectorExtension?: { credentialId?: string; message?: string };\n }>(CREATE_CUSTOM_CONNECTOR, { input: apiKeyConnectorInput(connectorId, spec, key, s) });\n const created = r.data?.createCustomConnectorExtension;\n if (!created?.credentialId) {\n return {\n ok: false,\n message: created?.message || r.errors?.[0]?.message || `${spec.label} couldn't be connected.`,\n };\n }\n return { ok: true };\n },\n siteMail: {\n enable: async (project, domain, notifyTo) => {\n const r = await enableSiteMail({\n channelId: project.channelId,\n projectId: project.projectId ?? undefined,\n domain,\n notifyTo,\n secrets: appSecrets,\n gql,\n });\n const mailed = r as { ok: boolean; credentialId?: string };\n if (mailed.ok) await keepCredential(project.channelId, mailed.credentialId);\n return r;\n },\n status: (project, diagnose) => siteMailStatus(gql, project.channelId, diagnose),\n disable: (project) => disableSiteMail(gql, project.channelId),\n },\n };\n\n // The web's sharing calls take one document runner: a mutation goes out as one, the rest as queries.\n const runDocument: GqlCall = (document, variables) =>\n /^\\s*mutation\\b/.test(document) ? transport.mutate(document, variables) : transport.query(document, variables);\n const sharing = createSharingService(runDocument);\n const requestCover = createCoverRequester(runDocument);\n\n const serverSettings = async (channelId: string) => {\n const r = await transport.query<{ aiCodeProjectSettings?: unknown }>(PROJECT_SETTINGS_QUERY, { channelId });\n if (r.errors?.length && r.data?.aiCodeProjectSettings === undefined) return null;\n return parseServerProjectSettings(r.data?.aiCodeProjectSettings);\n };\n\n const githubConnect = createGithubConnectService({\n transport,\n scope: () => {\n const s = scope();\n return { orgName: s.orgName, project: s.projectId };\n },\n currentUserId: () => sharing.currentUserId().catch(() => null),\n });\n\n const findPublishedSite = async (channelId: string, known: KnownPublish): Promise<SiteLookup> => {\n let name: string | null = null;\n let failed = false;\n try {\n // Ten seconds at most, as on the web: the delete waits on this.\n const r = await Promise.race([\n transport.query<{ aiCodeGetCloudflareProject?: string | null }>(CLOUDFLARE_PROJECT_QUERY, {\n channelId,\n }),\n new Promise<never>((_, reject) => {\n setTimeout(() => reject(new Error('timeout')), 10_000);\n }),\n ]);\n name = r.data?.aiCodeGetCloudflareProject || null;\n failed = !name && Boolean(r.errors?.length);\n } catch {\n failed = true;\n }\n // A failed lookup must not hide a live site: fall back to the live address, and with none say we\n // couldn't check ('unknown').\n return siteFromLookup({ name, failed }, known);\n };\n\n return {\n data,\n secrets,\n appSecrets,\n integrations,\n sharing,\n githubConnect,\n serverSettings,\n requestCover,\n findPublishedSite,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA4BO,MAAM,cAAiB,GAAA;AAG9B,MAAM,uBAA0B,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAAA,CAAA;AAMhC,SAAS,mBAAmB,GAAqB,EAAA;AAC/C,EAAO,OAAA,GAAA,CAAI,OAAQ,CAAA,mBAAA,EAAqB,GAAG,CAAA,CAAE,QAAQ,MAAQ,EAAA,GAAG,CAAE,CAAA,IAAA,EAAU,IAAA,YAAA;AAC9E;AACA,SAAS,OAAkB,GAAA;AACzB,EAAO,OAAA,sCAAA,CAAuC,OAAQ,CAAA,OAAA,EAAS,CAAK,CAAA,KAAA;AAClE,IAAA,MAAM,IAAI,IAAK,CAAA,KAAA,CAAM,IAAK,CAAA,MAAA,KAAW,EAAE,CAAA;AACvC,IAAA,OAAA,CAAQ,MAAM,GAAM,GAAA,CAAA,GAAI,IAAI,CAAI,GAAA,CAAA,EAAG,SAAS,EAAE,CAAA;AAAA,GAC/C,CAAA;AACH;AAGA,SAAS,oBAAqB,CAAA,WAAA,EAAqB,IAAwC,EAAA,GAAA,EAAa,KAA0C,EAAA;AAChJ,EAAA,MAAM,IAAO,GAAA,kBAAA,C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;AA6YI,IAAA,IAAI,IAAsB,GAAA,IAAA;AAC1B,IAAA,IAAI,MAAS,GAAA,KAAA;AACb,IAAI,IAAA;AAEF,MAAA,MAAM,IAAI,MAAM,OAAA,CAAQ,KAAK,CAAC,SAAA,CAAU,MAErC,wBAA0B,EAAA;AAAA,QAC3B;AAAA,OACD,CAAG,EAAA,IAAI,OAAe,CAAA,CAAC,GAAG,MAAW,KAAA;AACpC,QAAA,UAAA,CAAW,MAAM,MAAO,CAAA,IAAI,MAAM,SAAS,CAAC,GAAG,GAAM,CAAA;AAAA,OACtD,CAAC,CAAC,CAAA;AACH,MAAO,IAAA,GAAA,CAAA,CAAA,EAAA,GAAA,CAAA,CAAE,IAAF,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAQ,0BAA8B,KAAA,IAAA;AAC7C,MAAA,MAAA,GAAS,CAAC,IAAQ,IAAA,OAAA,CAAA,CAAQ,EAAE,GAAA,CAAA,CAAA,MAAA,KAAF,mBAAU,MAAM,CAAA;AAAA,KACpC,CAAA,OAAA,CAAA,EAAA;AACN,MAAS,MAAA,GAAA,IAAA;AAAA;AAIX,IAAA,OAAO,cAAe,CAAA;AAAA,MACpB,IAAA;AAAA,MACA;AAAA,OACC,KAAK,CAAA;AAAA,GACV;AACA,EAAO,OAAA;AAAA,IACL,IAAA;AAAA,IACA,OAAA;AAAA,IACA,UAAA;AAAA,IACA,YAAA;AAAA,IACA,OAAA;AAAA,IACA,aAAA;AAAA,IACA,cAAA;AAAA,IACA,YAAA;AAAA,IACA;AAAA,GACF;AACF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {useMemo}from'react';import {useSelector}from'react-redux';import {userSelector}from'@adminide-stack/user-auth0-client';import {useAccountProfileQuery}from'common/graphql';import {pickAuthEmail,pickPrimaryDisplayName,pickProfilePhotoUrl}from'../utils/authUserDisplay.js';function useHeaderProfile() {
|
|
2
|
+
var _a;
|
|
3
|
+
const authUser = useSelector(userSelector);
|
|
4
|
+
const signedIn = useMemo(() => {
|
|
5
|
+
if (!authUser) return false;
|
|
6
|
+
return Boolean(pickAuthEmail(authUser) || pickPrimaryDisplayName(authUser) !== "Account");
|
|
7
|
+
}, [authUser]);
|
|
8
|
+
const {
|
|
9
|
+
data
|
|
10
|
+
} = useAccountProfileQuery({
|
|
11
|
+
fetchPolicy: "cache-first",
|
|
12
|
+
errorPolicy: "all",
|
|
13
|
+
skip: !signedIn
|
|
14
|
+
});
|
|
15
|
+
const uri = useMemo(() => {
|
|
16
|
+
var _a2;
|
|
17
|
+
return pickProfilePhotoUrl((_a2 = data == null ? void 0 : data.accountProfile) == null ? void 0 : _a2.photos, authUser);
|
|
18
|
+
}, [(_a = data == null ? void 0 : data.accountProfile) == null ? void 0 : _a.photos, authUser]);
|
|
19
|
+
const name = useMemo(() => pickPrimaryDisplayName(authUser), [authUser]);
|
|
20
|
+
return {
|
|
21
|
+
uri,
|
|
22
|
+
name,
|
|
23
|
+
signedIn
|
|
24
|
+
};
|
|
25
|
+
}export{useHeaderProfile};//# sourceMappingURL=useHeaderProfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHeaderProfile.js","sources":["../../src/hooks/useHeaderProfile.ts"],"sourcesContent":["/**\n * The signed-in user's avatar for the header bars (Home's top bar and NavigationHeader).\n *\n * `signedIn` uses the drawer's test: after logout the store can still hold an empty\n * user object whose display name falls back to \"Account\", so its mere presence is\n * not a sign-in.\n */\nimport { useMemo } from 'react';\nimport { useSelector } from 'react-redux';\nimport type { IUserState } from '@adminide-stack/core';\nimport { Store, userSelector } from '@adminide-stack/user-auth0-client';\nimport { useAccountProfileQuery } from 'common/graphql';\nimport { pickAuthEmail, pickPrimaryDisplayName, pickProfilePhotoUrl } from '../utils/authUserDisplay';\n\nexport function useHeaderProfile() {\n const authUser = useSelector<Store.Auth, IUserState>(userSelector);\n const signedIn = useMemo(() => {\n if (!authUser) return false;\n return Boolean(pickAuthEmail(authUser) || pickPrimaryDisplayName(authUser) !== 'Account');\n }, [authUser]);\n const { data } = useAccountProfileQuery({\n fetchPolicy: 'cache-first',\n errorPolicy: 'all',\n skip: !signedIn,\n });\n const uri = useMemo(\n () => pickProfilePhotoUrl(data?.accountProfile?.photos, authUser),\n [data?.accountProfile?.photos, authUser],\n );\n const name = useMemo(() => pickPrimaryDisplayName(authUser), [authUser]);\n return { uri, name, signedIn };\n}\n"],"names":["_a"],"mappings":"sRAaO,SAAS,gBAAmB,GAAA;AAbnC,EAAA,IAAA,EAAA;AAcE,EAAM,MAAA,QAAA,GAAW,YAAoC,YAAY,CAAA;AACjE,EAAM,MAAA,QAAA,GAAW,QAAQ,MAAM;AAC7B,IAAI,IAAA,CAAC,UAAiB,OAAA,KAAA;AACtB,IAAA,OAAO,QAAQ,aAAc,CAAA,QAAQ,KAAK,sBAAuB,CAAA,QAAQ,MAAM,SAAS,CAAA;AAAA,GAC1F,EAAG,CAAC,QAAQ,CAAC,CAAA;AACb,EAAM,MAAA;AAAA,IACJ;AAAA,MACE,sBAAuB,CAAA;AAAA,IACzB,WAAa,EAAA,aAAA;AAAA,IACb,WAAa,EAAA,KAAA;AAAA,IACb,MAAM,CAAC;AAAA,GACR,CAAA;AACD,EAAM,MAAA,GAAA,GAAM,QAAQ,MAAG;AA1BzB,IAAAA,IAAAA,GAAAA;AA0B4B,IAAA,OAAA,mBAAA,CAAA,CAAoBA,MAAA,IAAM,IAAA,IAAA,GAAA,MAAA,GAAA,IAAA,CAAA,cAAA,KAAN,IAAAA,GAAAA,MAAAA,GAAAA,GAAAA,CAAsB,QAAQ,QAAQ,CAAA;AAAA,GAAA,EAAG,EAAC,EAAM,GAAA,IAAA,IAAA,IAAA,GAAA,MAAA,GAAA,IAAA,CAAA,cAAA,KAAN,IAAsB,GAAA,MAAA,GAAA,EAAA,CAAA,MAAA,EAAQ,QAAQ,CAAC,CAAA;AAC/H,EAAM,MAAA,IAAA,GAAO,QAAQ,MAAM,sBAAA,CAAuB,QAAQ,CAAG,EAAA,CAAC,QAAQ,CAAC,CAAA;AACvE,EAAO,OAAA;AAAA,IACL,GAAA;AAAA,IACA,IAAA;AAAA,IACA;AAAA,GACF;AACF"}
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {Feature}from'@common-stack/client-react';import YantraMobileModule from'./module.js';export{default as Home}from'./screens/Home/index.js';export{default as NewChat}from'./screens/NewChat/index.js';export{default as Account}from'./screens/Account/index.js';export{default as ChatHistory}from'./screens/ChatHistory/index.js';export{default as Apps}from'./screens/Apps/index.js';export{default as WebBuilder}from'./screens/WebBuilder/index.js';export{GatewayContextProvider,useGatewayContext}from'./contexts/GatewayContext.js';export{CdecliConnectionProvider}from'./contexts/CdecliConnectionContext.js';export{ChatLiveStreamEngine}from'./contexts/ChatLiveStreamContext.js';export{MemoryPressureResponder}from'./features/memory/MemoryPressureResponder.js';export{BUILTIN_MOBILE_GATEWAYS,MAX_CONCURRENT_TASKS,STORAGE_KEYS}from'./config/constants.js';export{config}from'./config/env-config.js';export{useCdecliAutoConnect}from'./hooks/useCdecliAutoConnect.js';export{useObtainSystemToken}from'./hooks/useObtainSystemToken.js';export{mintSurfaceSystemToken,resolveSurfaceCatalogBackend}from'./hooks/mintSurfaceSystemToken.js';export{buildCdecliTokenInjection,buildSurfaceGateRecoveryScript}from'./hooks/surfaceHandoffScript.js';export{isInstanceNotFoundError,useGatewayConnection}from'./hooks/useGatewayConnection.js';export{usePrerequisiteIds}from'./hooks/usePrerequisiteIds.js';export{useWorkspaceProvisioner}from'./hooks/useWorkspaceProvisioner.js';export{useGatewayRegistry}from'./hooks/useGatewayRegistry.js';export{agentSessionManager}from'./services/agentSessionManager.js';export{ensureGatewayApiKeys,resetGatewayApiKeyBridge}from'./services/gatewayApiKeyBridge.js';export{GatewayClient}from'./services/gatewayClient.js';export{BRIDGE_PROTOCOL_VERSION,BRIDGE_READY_ACTION,DEFAULT_BRIDGE_TIMEOUT_MS,DEFAULT_CHUNK_SIZE,MessageType}from'./bridge/types.js';export{WebViewManager}from'./bridge/WebViewManager.js';export{NativeWebViewBridge}from'./bridge/NativeWebViewBridge.js';export{TypedBridge}from'./bridge/TypedBridge.js';export{CancellableRequest}from'./bridge/CancellableRequest.js';export{ChunkedMessageHandler}from'./bridge/ChunkedMessageHandler.js';export{BridgeDebugger}from'./bridge/BridgeDebugger.js';export{WEB_BRIDGE_BOOTSTRAP}from'./bridge/webBridgeBootstrap.js';export{AuthenticatedFetch}from'./bridge/AuthenticatedFetch.js';export{AuthBridgeHandler}from'./bridge/handlers/AuthBridgeHandler.js';export{NavigationBridgeHandler}from'./bridge/handlers/NavigationBridgeHandler.js';export{AnalyticsBridgeHandler}from'./bridge/handlers/AnalyticsBridgeHandler.js';export{SURFACE_HOST_ACTIONS,SurfaceHostBridgeHandler}from'./bridge/handlers/SurfaceHostBridgeHandler.js';export{classifySurfaceNavigation}from'./bridge/surfaceLinkRouting.js';export{getPackagerHost,resolveMobileWebUrl}from'./bridge/resolveMobileWebUrl.js';export{YANTRA_LOADER_SIZE_COMPACT,YANTRA_LOADER_SIZE_DEFAULT,YantraBrandLoader}from'./components/YantraBrandLoader.js';export{default as CustomDrawer}from'./components/CustomDrawer.js';export{AppThemeProvider,useAppTheme}from'./theme/AppThemeProvider.js';export{InviteDeepLink}from'./features/invite/InviteDeepLink.js';export{ChatInviteDeepLink}from'./features/messaging/ChatInviteDeepLink.js';export{HealthSyncRunner}from'./features/health/HealthSyncRunner.js';export{startHealthBackgroundSync}from'./features/health/backgroundSync.js';export{FitnessWidgetRunner}from'./features/fitness-widgets/FitnessWidgetRunner.js';export{FitnessDeepLink}from'./features/fitness-widgets/FitnessDeepLink.js';export{TaskActivityRunner}from'./features/task-activity/TaskActivityRunner.js';export{inviteTokenFromUrl,isInviteUrl}from'./features/invite/inviteLink.js';export{isKeyboardControllerAvailable}from'./utils/keyboardController.js';export{getNativeCanvasExperience,getNativeCanvasViewer,preloadNativeCanvasExperience,registerCanvasExperiencePreload,registerNativeCanvasExperience,registerNativeCanvasViewer}from'./features/canvas/nativeViewerRegistry.js';export{getNativeCharactersExperience,registerNativeCharactersExperience}from'./features/characters/nativeCharactersRegistry.js';export{getNativeChatExperience,registerNativeChatExperience}from'./features/messaging/nativeChatRegistry.js';export{forgetChatPushToken,rememberChatPushToken}from'./features/messaging/chatPushToken.js';export{registerGameNotifications}from'./features/games/gameNotifications.js';export{inviteCodeInPush}from'./features/games/gameInvite.js';export{CHAT_NOTIFICATION_CONFIG_KEY,CHAT_NOTIFICATION_KEYS,chatPrefsFromSettings}from'./features/messaging/chatNotificationPrefs.js';export{settingsUriForAccount}from'./utils/cdecodeUri.js';export{getNativeShoppingExperience,preloadNativeShoppingExperience,registerNativeShoppingExperience,registerShoppingExperiencePreload}from'./features/shopping/nativeShoppingRegistry.js';export{getNativeTravelExperience,preloadNativeTravelExperience,registerNativeTravelExperience,registerTravelExperiencePreload}from'./features/travel/nativeTravelRegistry.js';export{getNativeJobSearchExperience,preloadNativeJobSearchExperience,registerJobSearchExperiencePreload,registerNativeJobSearchExperience}from'./features/job-search/nativeJobSearchRegistry.js';export{getNativeResumeExperience,preloadNativeResumeExperience,registerNativeResumeExperience,registerResumeExperiencePreload}from'./features/resume/nativeResumeRegistry.js';export{getNativeInboxExperience,preloadNativeInboxExperience,registerInboxExperiencePreload,registerNativeInboxExperience}from'./features/inbox/nativeInboxRegistry.js';export{getNativeStudyExperience,preloadNativeStudyExperience,registerNativeStudyExperience,registerStudyExperiencePreload}from'./features/study/nativeStudyRegistry.js';export{getNativeLocalServicesExperience,preloadNativeLocalServicesExperience,registerLocalServicesExperiencePreload,registerNativeLocalServicesExperience}from'./features/local-services/nativeLocalServicesRegistry.js';export{getNativeMoviesExperience,preloadNativeMoviesExperience,registerMoviesExperiencePreload,registerNativeMoviesExperience}from'./features/movies/nativeMoviesRegistry.js';export{getNativeExpensesExperience,preloadNativeExpensesExperience,registerExpensesExperiencePreload,registerNativeExpensesExperience}from'./features/expenses/nativeExpensesRegistry.js';export{getNativeWebBuilderExperience,preloadNativeWebBuilderExperience,registerNativeWebBuilderExperience,registerWebBuilderExperiencePreload}from'./features/webbuilder/nativeWebBuilderRegistry.js';export{NativeAgentChat}from'./features/agent-chat/NativeAgentChat.js';export{ChatLinkOpenerProvider}from'./features/links/ChatLinkOpenerProvider.js';export{useCdecliConnection}from'./contexts/cdecliConnection.js';export{resolveSurfaceAuthGraphqlUrl}from'./hooks/resolveSurfaceAuthGraphqlUrl.js';var index = new Feature(YantraMobileModule);export{index as default};//# sourceMappingURL=index.js.map
|
|
1
|
+
import {Feature}from'@common-stack/client-react';import YantraMobileModule from'./module.js';export{default as Home}from'./screens/Home/index.js';export{default as NewChat}from'./screens/NewChat/index.js';export{default as Account}from'./screens/Account/index.js';export{default as ChatHistory}from'./screens/ChatHistory/index.js';export{default as Apps}from'./screens/Apps/index.js';export{default as WebBuilder}from'./screens/WebBuilder/index.js';export{GatewayContextProvider,useGatewayContext}from'./contexts/GatewayContext.js';export{CdecliConnectionProvider}from'./contexts/CdecliConnectionContext.js';export{ChatLiveStreamEngine}from'./contexts/ChatLiveStreamContext.js';export{MemoryPressureResponder}from'./features/memory/MemoryPressureResponder.js';export{BUILTIN_MOBILE_GATEWAYS,MAX_CONCURRENT_TASKS,STORAGE_KEYS}from'./config/constants.js';export{config}from'./config/env-config.js';export{useCdecliAutoConnect}from'./hooks/useCdecliAutoConnect.js';export{useObtainSystemToken}from'./hooks/useObtainSystemToken.js';export{mintSurfaceSystemToken,resolveSurfaceCatalogBackend}from'./hooks/mintSurfaceSystemToken.js';export{buildCdecliTokenInjection,buildSurfaceGateRecoveryScript}from'./hooks/surfaceHandoffScript.js';export{isInstanceNotFoundError,useGatewayConnection}from'./hooks/useGatewayConnection.js';export{usePrerequisiteIds}from'./hooks/usePrerequisiteIds.js';export{useWorkspaceProvisioner}from'./hooks/useWorkspaceProvisioner.js';export{useGatewayRegistry}from'./hooks/useGatewayRegistry.js';export{agentSessionManager}from'./services/agentSessionManager.js';export{ensureGatewayApiKeys,resetGatewayApiKeyBridge}from'./services/gatewayApiKeyBridge.js';export{GatewayClient}from'./services/gatewayClient.js';export{BRIDGE_PROTOCOL_VERSION,BRIDGE_READY_ACTION,DEFAULT_BRIDGE_TIMEOUT_MS,DEFAULT_CHUNK_SIZE,MessageType}from'./bridge/types.js';export{WebViewManager}from'./bridge/WebViewManager.js';export{NativeWebViewBridge}from'./bridge/NativeWebViewBridge.js';export{TypedBridge}from'./bridge/TypedBridge.js';export{CancellableRequest}from'./bridge/CancellableRequest.js';export{ChunkedMessageHandler}from'./bridge/ChunkedMessageHandler.js';export{BridgeDebugger}from'./bridge/BridgeDebugger.js';export{WEB_BRIDGE_BOOTSTRAP}from'./bridge/webBridgeBootstrap.js';export{AuthenticatedFetch}from'./bridge/AuthenticatedFetch.js';export{AuthBridgeHandler}from'./bridge/handlers/AuthBridgeHandler.js';export{NavigationBridgeHandler}from'./bridge/handlers/NavigationBridgeHandler.js';export{AnalyticsBridgeHandler}from'./bridge/handlers/AnalyticsBridgeHandler.js';export{SURFACE_HOST_ACTIONS,SurfaceHostBridgeHandler}from'./bridge/handlers/SurfaceHostBridgeHandler.js';export{classifySurfaceNavigation}from'./bridge/surfaceLinkRouting.js';export{getPackagerHost,resolveMobileWebUrl}from'./bridge/resolveMobileWebUrl.js';export{YANTRA_LOADER_SIZE_COMPACT,YANTRA_LOADER_SIZE_DEFAULT,YantraBrandLoader}from'./components/YantraBrandLoader.js';export{default as CustomDrawer}from'./components/CustomDrawer.js';export{AppThemeProvider,useAppTheme}from'./theme/AppThemeProvider.js';export{InviteDeepLink}from'./features/invite/InviteDeepLink.js';export{ChatInviteDeepLink}from'./features/messaging/ChatInviteDeepLink.js';export{HealthSyncRunner}from'./features/health/HealthSyncRunner.js';export{startHealthBackgroundSync}from'./features/health/backgroundSync.js';export{FitnessWidgetRunner}from'./features/fitness-widgets/FitnessWidgetRunner.js';export{FitnessDeepLink}from'./features/fitness-widgets/FitnessDeepLink.js';export{TaskActivityRunner}from'./features/task-activity/TaskActivityRunner.js';export{inviteTokenFromUrl,isInviteUrl}from'./features/invite/inviteLink.js';export{isKeyboardControllerAvailable}from'./utils/keyboardController.js';export{getNativeCanvasExperience,getNativeCanvasViewer,preloadNativeCanvasExperience,registerCanvasExperiencePreload,registerNativeCanvasExperience,registerNativeCanvasViewer}from'./features/canvas/nativeViewerRegistry.js';export{getNativeCharactersExperience,registerNativeCharactersExperience}from'./features/characters/nativeCharactersRegistry.js';export{getNativeChatExperience,registerNativeChatExperience}from'./features/messaging/nativeChatRegistry.js';export{forgetChatPushToken,rememberChatPushToken}from'./features/messaging/chatPushToken.js';export{registerGameNotifications}from'./features/games/gameNotifications.js';export{inviteCodeInPush}from'./features/games/gameInvite.js';export{CHAT_NOTIFICATION_CONFIG_KEY,CHAT_NOTIFICATION_KEYS,chatPrefsFromSettings}from'./features/messaging/chatNotificationPrefs.js';export{settingsUriForAccount}from'./utils/cdecodeUri.js';export{getNativeShoppingExperience,preloadNativeShoppingExperience,registerNativeShoppingExperience,registerShoppingExperiencePreload}from'./features/shopping/nativeShoppingRegistry.js';export{getNativeTravelExperience,preloadNativeTravelExperience,registerNativeTravelExperience,registerTravelExperiencePreload}from'./features/travel/nativeTravelRegistry.js';export{getNativeJobSearchExperience,preloadNativeJobSearchExperience,registerJobSearchExperiencePreload,registerNativeJobSearchExperience}from'./features/job-search/nativeJobSearchRegistry.js';export{getNativeResumeExperience,preloadNativeResumeExperience,registerNativeResumeExperience,registerResumeExperiencePreload}from'./features/resume/nativeResumeRegistry.js';export{getNativeInboxExperience,preloadNativeInboxExperience,registerInboxExperiencePreload,registerNativeInboxExperience}from'./features/inbox/nativeInboxRegistry.js';export{getNativeStudyExperience,preloadNativeStudyExperience,registerNativeStudyExperience,registerStudyExperiencePreload}from'./features/study/nativeStudyRegistry.js';export{getNativeLocalServicesExperience,preloadNativeLocalServicesExperience,registerLocalServicesExperiencePreload,registerNativeLocalServicesExperience}from'./features/local-services/nativeLocalServicesRegistry.js';export{getNativeMoviesExperience,preloadNativeMoviesExperience,registerMoviesExperiencePreload,registerNativeMoviesExperience}from'./features/movies/nativeMoviesRegistry.js';export{getNativeExpensesExperience,preloadNativeExpensesExperience,registerExpensesExperiencePreload,registerNativeExpensesExperience}from'./features/expenses/nativeExpensesRegistry.js';export{getNativeWebBuilderExperience,preloadNativeWebBuilderExperience,registerNativeWebBuilderExperience,registerWebBuilderExperiencePreload}from'./features/webbuilder/nativeWebBuilderRegistry.js';export{NativeAgentChat}from'./features/agent-chat/NativeAgentChat.js';export{ChatLinkOpenerProvider}from'./features/links/ChatLinkOpenerProvider.js';export{FreeCreditsPhoneStepHost}from'./features/credits/FreeCreditsPhoneStepHost.js';export{askForVerifiedPhone,endPhoneStep}from'./features/credits/freeCreditsPhoneStep.js';export{useCdecliConnection}from'./contexts/cdecliConnection.js';export{resolveSurfaceAuthGraphqlUrl}from'./hooks/resolveSurfaceAuthGraphqlUrl.js';var index = new Feature(YantraMobileModule);export{index as default};//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { Feature } from '@common-stack/client-react';\nimport YantraMobileModule from './module';\n\nexport default new Feature(YantraMobileModule);\nexport * from './screens';\nexport { GatewayContextProvider, useGatewayContext } from './contexts/GatewayContext';\nexport { CdecliConnectionProvider, useCdecliConnection } from './contexts/CdecliConnectionContext';\nexport { ChatLiveStreamEngine } from './contexts/ChatLiveStreamContext';\nexport { MemoryPressureResponder } from './features/memory/MemoryPressureResponder';\nexport * from './config/constants';\nexport { config } from './config/env-config';\nexport { useCdecliAutoConnect } from './hooks/useCdecliAutoConnect';\nexport { useObtainSystemToken } from './hooks/useObtainSystemToken';\nexport {\n mintSurfaceSystemToken,\n resolveSurfaceCatalogBackend,\n resolveSurfaceAuthGraphqlUrl,\n} from './hooks/mintSurfaceSystemToken';\nexport { buildCdecliTokenInjection, buildSurfaceGateRecoveryScript } from './hooks/surfaceHandoffScript';\nexport { useGatewayConnection, isInstanceNotFoundError } from './hooks/useGatewayConnection';\nexport { usePrerequisiteIds } from './hooks/usePrerequisiteIds';\nexport { useWorkspaceProvisioner } from './hooks/useWorkspaceProvisioner';\nexport { useGatewayRegistry } from './hooks/useGatewayRegistry';\nexport * from './services';\nexport * from './bridge';\nexport {\n YantraBrandLoader,\n YANTRA_LOADER_SIZE_DEFAULT,\n YANTRA_LOADER_SIZE_COMPACT,\n} from './components/YantraBrandLoader';\nexport { default as CustomDrawer } from './components/CustomDrawer';\nexport { AppThemeProvider, useAppTheme } from './theme/AppThemeProvider';\n// Invite deep links. Mounted by the app at the root (see portable-devices/mobile\n// App.tsx) rather than routed to: the invitee has neither an org nor a session,\n// and every mobile route requires both.\nexport { InviteDeepLink } from './features/invite/InviteDeepLink';\nexport { ChatInviteDeepLink } from './features/messaging/ChatInviteDeepLink';\n// Apple Health / Health Connect sync. Mounted at the app root like the invite\n// handlers: it syncs on every return to the foreground, whatever screen is open.\nexport { HealthSyncRunner } from './features/health/HealthSyncRunner';\n// Apple Health while the app is closed: started once at launch, before anything renders.\nexport { startHealthBackgroundSync } from './features/health/backgroundSync';\n// Fitness widgets (iOS): keeps the home / lock screen snapshot fresh, and opens the\n// Fitness surface when a widget or the workout Live Activity is tapped. Both at the root.\nexport { FitnessWidgetRunner } from './features/fitness-widgets/FitnessWidgetRunner';\nexport { FitnessDeepLink } from './features/fitness-widgets/FitnessDeepLink';\n// The chat task Live Activity (iOS): a running reply or Deep Search on the lock screen\n// and in the Dynamic Island, and its tap opening the conversation. At the root.\nexport { TaskActivityRunner } from './features/task-activity/TaskActivityRunner';\nexport { inviteTokenFromUrl, isInviteUrl } from './features/invite/inviteLink';\nexport { isKeyboardControllerAvailable } from './utils/keyboardController';\n// The canvas viewer seam. Exported from the index on purpose: the app (the MF\n// host) registers the federated viewer here and the CanvasBoard screen reads\n// it. Reachability from this entry is what makes rollup emit the registry as a\n// real shared module - as an internal-only file, `registerNativeCanvasViewer`\n// is never called inside the package, so rollup tree-shakes it and constant-\n// folds the screen down to its fallback branch.\nexport {\n registerNativeCanvasViewer,\n getNativeCanvasViewer,\n registerNativeCanvasExperience,\n getNativeCanvasExperience,\n registerCanvasExperiencePreload,\n preloadNativeCanvasExperience,\n} from './features/canvas/nativeViewerRegistry';\n// Characters seam - same reachability contract as the canvas registry above.\nexport {\n registerNativeCharactersExperience,\n getNativeCharactersExperience,\n} from './features/characters/nativeCharactersRegistry';\n// Chat seam - same reachability contract as the two registries above.\nexport { registerNativeChatExperience, getNativeChatExperience } from './features/messaging/nativeChatRegistry';\n// Chat push + notification preferences: the app (which owns expo-notifications and the\n// settings session) registers the token and serves the preferences through these.\nexport { rememberChatPushToken, forgetChatPushToken } from './features/messaging/chatPushToken';\nexport { registerGameNotifications } from './features/games/gameNotifications';\nexport { inviteCodeInPush } from './features/games/gameInvite';\nexport {\n CHAT_NOTIFICATION_CONFIG_KEY,\n CHAT_NOTIFICATION_KEYS,\n chatPrefsFromSettings,\n} from './features/messaging/chatNotificationPrefs';\nexport { settingsUriForAccount } from './utils/cdecodeUri';\nexport {\n registerNativeShoppingExperience,\n getNativeShoppingExperience,\n registerShoppingExperiencePreload,\n preloadNativeShoppingExperience,\n} from './features/shopping/nativeShoppingRegistry';\nexport type { ShoppingExperienceProps } from './features/shopping/ShoppingExperience';\nexport type { ShoppingHostChat } from './features/shopping/hostChat';\nexport {\n registerNativeTravelExperience,\n getNativeTravelExperience,\n registerTravelExperiencePreload,\n preloadNativeTravelExperience,\n} from './features/travel/nativeTravelRegistry';\nexport type { TravelExperienceProps } from './features/travel/TravelExperience';\nexport type { TravelHostChat } from './features/travel/hostChat';\nexport {\n registerNativeJobSearchExperience,\n getNativeJobSearchExperience,\n registerJobSearchExperiencePreload,\n preloadNativeJobSearchExperience,\n} from './features/job-search/nativeJobSearchRegistry';\nexport type { JobSearchExperienceProps } from './features/job-search/JobSearchExperience';\nexport type { JobSearchHostChat } from './features/job-search/hostChat';\nexport {\n registerNativeResumeExperience,\n getNativeResumeExperience,\n registerResumeExperiencePreload,\n preloadNativeResumeExperience,\n} from './features/resume/nativeResumeRegistry';\nexport type { ResumeExperienceProps } from './features/resume/ResumeExperience';\nexport type { ResumeHostChat } from './features/resume/hostChat';\nexport {\n registerNativeInboxExperience,\n getNativeInboxExperience,\n registerInboxExperiencePreload,\n preloadNativeInboxExperience,\n} from './features/inbox/nativeInboxRegistry';\nexport type { InboxExperienceProps } from './features/inbox/InboxExperience';\nexport type { InboxHostChat } from './features/inbox/hostChat';\nexport {\n registerNativeStudyExperience,\n getNativeStudyExperience,\n registerStudyExperiencePreload,\n preloadNativeStudyExperience,\n} from './features/study/nativeStudyRegistry';\nexport type { StudyExperienceProps } from './features/study/StudyExperience';\nexport type { StudyHostChat } from './features/study/hostChat';\nexport {\n registerNativeLocalServicesExperience,\n getNativeLocalServicesExperience,\n registerLocalServicesExperiencePreload,\n preloadNativeLocalServicesExperience,\n} from './features/local-services/nativeLocalServicesRegistry';\nexport type { LocalServicesExperienceProps } from './features/local-services/LocalServicesExperience';\nexport type { LocalServicesHostChat } from './features/local-services/hostChat';\nexport {\n registerNativeMoviesExperience,\n getNativeMoviesExperience,\n registerMoviesExperiencePreload,\n preloadNativeMoviesExperience,\n} from './features/movies/nativeMoviesRegistry';\nexport type { MoviesExperienceProps } from './features/movies/MoviesExperience';\nexport type { MoviesHostChat } from './features/movies/hostChat';\nexport {\n registerNativeExpensesExperience,\n getNativeExpensesExperience,\n registerExpensesExperiencePreload,\n preloadNativeExpensesExperience,\n} from './features/expenses/nativeExpensesRegistry';\nexport type { ExpensesExperienceProps } from './features/expenses/ExpensesExperience';\nexport type { ExpensesHostChat } from './features/expenses/hostChat';\nexport {\n registerNativeWebBuilderExperience,\n getNativeWebBuilderExperience,\n registerWebBuilderExperiencePreload,\n preloadNativeWebBuilderExperience,\n} from './features/webbuilder/nativeWebBuilderRegistry';\nexport type { WebBuilderExperienceProps } from './features/webbuilder/WebBuilderExperience';\nexport type { WebBuilderHostChat } from './features/webbuilder/hostChat';\nexport { NativeAgentChat } from './features/agent-chat';\nexport { ChatLinkOpenerProvider } from './features/links/ChatLinkOpenerProvider';\nexport type { AgentChatMessage, AgentChatSuggestion, NativeAgentChatProps } from './features/agent-chat';\nexport type {\n ChatHostServices,\n ChatViewer,\n FederatedChatProps,\n NativeChatExperienceProps,\n} from './features/messaging/chatHost';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { Feature } from '@common-stack/client-react';\nimport YantraMobileModule from './module';\n\nexport default new Feature(YantraMobileModule);\nexport * from './screens';\nexport { GatewayContextProvider, useGatewayContext } from './contexts/GatewayContext';\nexport { CdecliConnectionProvider, useCdecliConnection } from './contexts/CdecliConnectionContext';\nexport { ChatLiveStreamEngine } from './contexts/ChatLiveStreamContext';\nexport { MemoryPressureResponder } from './features/memory/MemoryPressureResponder';\nexport * from './config/constants';\nexport { config } from './config/env-config';\nexport { useCdecliAutoConnect } from './hooks/useCdecliAutoConnect';\nexport { useObtainSystemToken } from './hooks/useObtainSystemToken';\nexport {\n mintSurfaceSystemToken,\n resolveSurfaceCatalogBackend,\n resolveSurfaceAuthGraphqlUrl,\n} from './hooks/mintSurfaceSystemToken';\nexport { buildCdecliTokenInjection, buildSurfaceGateRecoveryScript } from './hooks/surfaceHandoffScript';\nexport { useGatewayConnection, isInstanceNotFoundError } from './hooks/useGatewayConnection';\nexport { usePrerequisiteIds } from './hooks/usePrerequisiteIds';\nexport { useWorkspaceProvisioner } from './hooks/useWorkspaceProvisioner';\nexport { useGatewayRegistry } from './hooks/useGatewayRegistry';\nexport * from './services';\nexport * from './bridge';\nexport {\n YantraBrandLoader,\n YANTRA_LOADER_SIZE_DEFAULT,\n YANTRA_LOADER_SIZE_COMPACT,\n} from './components/YantraBrandLoader';\nexport { default as CustomDrawer } from './components/CustomDrawer';\nexport { AppThemeProvider, useAppTheme } from './theme/AppThemeProvider';\n// Invite deep links. Mounted by the app at the root (see portable-devices/mobile\n// App.tsx) rather than routed to: the invitee has neither an org nor a session,\n// and every mobile route requires both.\nexport { InviteDeepLink } from './features/invite/InviteDeepLink';\nexport { ChatInviteDeepLink } from './features/messaging/ChatInviteDeepLink';\n// Apple Health / Health Connect sync. Mounted at the app root like the invite\n// handlers: it syncs on every return to the foreground, whatever screen is open.\nexport { HealthSyncRunner } from './features/health/HealthSyncRunner';\n// Apple Health while the app is closed: started once at launch, before anything renders.\nexport { startHealthBackgroundSync } from './features/health/backgroundSync';\n// Fitness widgets (iOS): keeps the home / lock screen snapshot fresh, and opens the\n// Fitness surface when a widget or the workout Live Activity is tapped. Both at the root.\nexport { FitnessWidgetRunner } from './features/fitness-widgets/FitnessWidgetRunner';\nexport { FitnessDeepLink } from './features/fitness-widgets/FitnessDeepLink';\n// The chat task Live Activity (iOS): a running reply or Deep Search on the lock screen\n// and in the Dynamic Island, and its tap opening the conversation. At the root.\nexport { TaskActivityRunner } from './features/task-activity/TaskActivityRunner';\nexport { inviteTokenFromUrl, isInviteUrl } from './features/invite/inviteLink';\nexport { isKeyboardControllerAvailable } from './utils/keyboardController';\n// The canvas viewer seam. Exported from the index on purpose: the app (the MF\n// host) registers the federated viewer here and the CanvasBoard screen reads\n// it. Reachability from this entry is what makes rollup emit the registry as a\n// real shared module - as an internal-only file, `registerNativeCanvasViewer`\n// is never called inside the package, so rollup tree-shakes it and constant-\n// folds the screen down to its fallback branch.\nexport {\n registerNativeCanvasViewer,\n getNativeCanvasViewer,\n registerNativeCanvasExperience,\n getNativeCanvasExperience,\n registerCanvasExperiencePreload,\n preloadNativeCanvasExperience,\n} from './features/canvas/nativeViewerRegistry';\n// Characters seam - same reachability contract as the canvas registry above.\nexport {\n registerNativeCharactersExperience,\n getNativeCharactersExperience,\n} from './features/characters/nativeCharactersRegistry';\n// Chat seam - same reachability contract as the two registries above.\nexport { registerNativeChatExperience, getNativeChatExperience } from './features/messaging/nativeChatRegistry';\n// Chat push + notification preferences: the app (which owns expo-notifications and the\n// settings session) registers the token and serves the preferences through these.\nexport { rememberChatPushToken, forgetChatPushToken } from './features/messaging/chatPushToken';\nexport { registerGameNotifications } from './features/games/gameNotifications';\nexport { inviteCodeInPush } from './features/games/gameInvite';\nexport {\n CHAT_NOTIFICATION_CONFIG_KEY,\n CHAT_NOTIFICATION_KEYS,\n chatPrefsFromSettings,\n} from './features/messaging/chatNotificationPrefs';\nexport { settingsUriForAccount } from './utils/cdecodeUri';\nexport {\n registerNativeShoppingExperience,\n getNativeShoppingExperience,\n registerShoppingExperiencePreload,\n preloadNativeShoppingExperience,\n} from './features/shopping/nativeShoppingRegistry';\nexport type { ShoppingExperienceProps } from './features/shopping/ShoppingExperience';\nexport type { ShoppingHostChat } from './features/shopping/hostChat';\nexport {\n registerNativeTravelExperience,\n getNativeTravelExperience,\n registerTravelExperiencePreload,\n preloadNativeTravelExperience,\n} from './features/travel/nativeTravelRegistry';\nexport type { TravelExperienceProps } from './features/travel/TravelExperience';\nexport type { TravelHostChat } from './features/travel/hostChat';\nexport {\n registerNativeJobSearchExperience,\n getNativeJobSearchExperience,\n registerJobSearchExperiencePreload,\n preloadNativeJobSearchExperience,\n} from './features/job-search/nativeJobSearchRegistry';\nexport type { JobSearchExperienceProps } from './features/job-search/JobSearchExperience';\nexport type { JobSearchHostChat } from './features/job-search/hostChat';\nexport {\n registerNativeResumeExperience,\n getNativeResumeExperience,\n registerResumeExperiencePreload,\n preloadNativeResumeExperience,\n} from './features/resume/nativeResumeRegistry';\nexport type { ResumeExperienceProps } from './features/resume/ResumeExperience';\nexport type { ResumeHostChat } from './features/resume/hostChat';\nexport {\n registerNativeInboxExperience,\n getNativeInboxExperience,\n registerInboxExperiencePreload,\n preloadNativeInboxExperience,\n} from './features/inbox/nativeInboxRegistry';\nexport type { InboxExperienceProps } from './features/inbox/InboxExperience';\nexport type { InboxHostChat } from './features/inbox/hostChat';\nexport {\n registerNativeStudyExperience,\n getNativeStudyExperience,\n registerStudyExperiencePreload,\n preloadNativeStudyExperience,\n} from './features/study/nativeStudyRegistry';\nexport type { StudyExperienceProps } from './features/study/StudyExperience';\nexport type { StudyHostChat } from './features/study/hostChat';\nexport {\n registerNativeLocalServicesExperience,\n getNativeLocalServicesExperience,\n registerLocalServicesExperiencePreload,\n preloadNativeLocalServicesExperience,\n} from './features/local-services/nativeLocalServicesRegistry';\nexport type { LocalServicesExperienceProps } from './features/local-services/LocalServicesExperience';\nexport type { LocalServicesHostChat } from './features/local-services/hostChat';\nexport {\n registerNativeMoviesExperience,\n getNativeMoviesExperience,\n registerMoviesExperiencePreload,\n preloadNativeMoviesExperience,\n} from './features/movies/nativeMoviesRegistry';\nexport type { MoviesExperienceProps } from './features/movies/MoviesExperience';\nexport type { MoviesHostChat } from './features/movies/hostChat';\nexport {\n registerNativeExpensesExperience,\n getNativeExpensesExperience,\n registerExpensesExperiencePreload,\n preloadNativeExpensesExperience,\n} from './features/expenses/nativeExpensesRegistry';\nexport type { ExpensesExperienceProps } from './features/expenses/ExpensesExperience';\nexport type { ExpensesHostChat } from './features/expenses/hostChat';\nexport {\n registerNativeWebBuilderExperience,\n getNativeWebBuilderExperience,\n registerWebBuilderExperiencePreload,\n preloadNativeWebBuilderExperience,\n} from './features/webbuilder/nativeWebBuilderRegistry';\nexport type { WebBuilderExperienceProps } from './features/webbuilder/WebBuilderExperience';\nexport type { WebBuilderHostChat } from './features/webbuilder/hostChat';\nexport { NativeAgentChat } from './features/agent-chat';\nexport { ChatLinkOpenerProvider } from './features/links/ChatLinkOpenerProvider';\nexport { FreeCreditsPhoneStepHost } from './features/credits/FreeCreditsPhoneStepHost';\n// The same sheet's ask, for the app to hand the billing module's checkout (registerCheckoutPhoneStep).\nexport { askForVerifiedPhone, endPhoneStep } from './features/credits/freeCreditsPhoneStep';\nexport type { PhoneStepCopy, PhoneStepOutcome } from './features/credits/freeCreditsPhoneStep';\nexport type { AgentChatMessage, AgentChatSuggestion, NativeAgentChatProps } from './features/agent-chat';\nexport type {\n ChatHostServices,\n ChatViewer,\n FederatedChatProps,\n NativeChatExperienceProps,\n} from './features/messaging/chatHost';\n"],"names":[],"mappings":"iyNAEA,YAAe,IAAI,QAAQ,kBAAkB,CAAA"}
|
package/lib/routes.json
CHANGED
|
@@ -11,21 +11,12 @@
|
|
|
11
11
|
"auth": true,
|
|
12
12
|
"menu_position": "side",
|
|
13
13
|
"importPaths": {
|
|
14
|
-
"
|
|
14
|
+
"yantraTopBar": "@adminide-stack/yantra-mobile/lib/components/YantraTopBar/YantraTopBar.js"
|
|
15
15
|
},
|
|
16
16
|
"customHeader": {
|
|
17
|
-
"name": "
|
|
18
|
-
"component": "$.importPaths.
|
|
19
|
-
"props": {
|
|
20
|
-
"showTitle": true,
|
|
21
|
-
"showToggle": true,
|
|
22
|
-
"showFilter": true,
|
|
23
|
-
"isSearchBack": false,
|
|
24
|
-
"showGateway": true,
|
|
25
|
-
"showApps": false,
|
|
26
|
-
"showHistory": false,
|
|
27
|
-
"showNewChat": true
|
|
28
|
-
}
|
|
17
|
+
"name": "YantraTopBar",
|
|
18
|
+
"component": "$.importPaths.yantraTopBar",
|
|
19
|
+
"props": {}
|
|
29
20
|
},
|
|
30
21
|
"props": {
|
|
31
22
|
"initialParams": {
|
|
@@ -265,14 +256,15 @@
|
|
|
265
256
|
}
|
|
266
257
|
},
|
|
267
258
|
{
|
|
268
|
-
"/:orgName/chathistory": {
|
|
259
|
+
"/:orgName/l/chathistory": {
|
|
269
260
|
"key": "chathistory",
|
|
270
|
-
"path": "/:orgName/chathistory",
|
|
261
|
+
"path": "/:orgName/l/chathistory",
|
|
271
262
|
"name": "ChatHistory",
|
|
272
263
|
"exact": false,
|
|
273
264
|
"priority": 3,
|
|
274
265
|
"hideInMenu": true,
|
|
275
266
|
"auth": true,
|
|
267
|
+
"menu_position": "side",
|
|
276
268
|
"importPaths": {
|
|
277
269
|
"navigationHeader": "@adminide-stack/yantra-mobile/lib/components/NavigationHeader/NavigationHeader.js"
|
|
278
270
|
},
|
|
@@ -281,10 +273,10 @@
|
|
|
281
273
|
"component": "$.importPaths.navigationHeader",
|
|
282
274
|
"props": {
|
|
283
275
|
"showTitle": true,
|
|
284
|
-
"showToggle":
|
|
276
|
+
"showToggle": true,
|
|
285
277
|
"showFilter": false,
|
|
286
278
|
"isSearchBack": false,
|
|
287
|
-
"showBack":
|
|
279
|
+
"showBack": false,
|
|
288
280
|
"showGateway": false,
|
|
289
281
|
"showHistory": false,
|
|
290
282
|
"showNewChat": true
|
|
@@ -313,9 +305,9 @@
|
|
|
313
305
|
}
|
|
314
306
|
},
|
|
315
307
|
{
|
|
316
|
-
"/:orgName/apps": {
|
|
308
|
+
"/:orgName/l/apps": {
|
|
317
309
|
"key": "apps",
|
|
318
|
-
"path": "/:orgName/apps",
|
|
310
|
+
"path": "/:orgName/l/apps",
|
|
319
311
|
"name": "Apps",
|
|
320
312
|
"exact": true,
|
|
321
313
|
"priority": 3,
|
|
@@ -330,10 +322,10 @@
|
|
|
330
322
|
"component": "$.importPaths.navigationHeader",
|
|
331
323
|
"props": {
|
|
332
324
|
"showTitle": true,
|
|
333
|
-
"showToggle":
|
|
325
|
+
"showToggle": true,
|
|
334
326
|
"showFilter": false,
|
|
335
327
|
"isSearchBack": false,
|
|
336
|
-
"showBack":
|
|
328
|
+
"showBack": false,
|
|
337
329
|
"showGateway": false,
|
|
338
330
|
"showApps": false,
|
|
339
331
|
"showHistory": false,
|
|
@@ -367,9 +359,9 @@
|
|
|
367
359
|
}
|
|
368
360
|
},
|
|
369
361
|
{
|
|
370
|
-
"/:orgName/discover": {
|
|
362
|
+
"/:orgName/l/discover": {
|
|
371
363
|
"key": "discover",
|
|
372
|
-
"path": "/:orgName/discover",
|
|
364
|
+
"path": "/:orgName/l/discover",
|
|
373
365
|
"name": "Discover",
|
|
374
366
|
"exact": true,
|
|
375
367
|
"priority": 3,
|
|
@@ -384,10 +376,10 @@
|
|
|
384
376
|
"component": "$.importPaths.navigationHeader",
|
|
385
377
|
"props": {
|
|
386
378
|
"showTitle": true,
|
|
387
|
-
"showToggle":
|
|
379
|
+
"showToggle": true,
|
|
388
380
|
"showFilter": false,
|
|
389
381
|
"isSearchBack": false,
|
|
390
|
-
"showBack":
|
|
382
|
+
"showBack": false,
|
|
391
383
|
"showGateway": false,
|
|
392
384
|
"showApps": false,
|
|
393
385
|
"showHistory": false,
|
|
@@ -474,9 +466,9 @@
|
|
|
474
466
|
}
|
|
475
467
|
},
|
|
476
468
|
{
|
|
477
|
-
"/:orgName/notion": {
|
|
469
|
+
"/:orgName/l/notion": {
|
|
478
470
|
"key": "notion",
|
|
479
|
-
"path": "/:orgName/notion",
|
|
471
|
+
"path": "/:orgName/l/notion",
|
|
480
472
|
"name": "Notion",
|
|
481
473
|
"exact": true,
|
|
482
474
|
"priority": 3,
|
|
@@ -491,10 +483,10 @@
|
|
|
491
483
|
"component": "$.importPaths.navigationHeader",
|
|
492
484
|
"props": {
|
|
493
485
|
"showTitle": true,
|
|
494
|
-
"showToggle":
|
|
486
|
+
"showToggle": true,
|
|
495
487
|
"showFilter": false,
|
|
496
488
|
"isSearchBack": false,
|
|
497
|
-
"showBack":
|
|
489
|
+
"showBack": false,
|
|
498
490
|
"showGateway": false,
|
|
499
491
|
"showApps": false,
|
|
500
492
|
"showHistory": false,
|