diff --git a/npm-app-distribution-plan.md b/npm-app-distribution-plan.md new file mode 100644 index 0000000000..246a466df7 --- /dev/null +++ b/npm-app-distribution-plan.md @@ -0,0 +1,283 @@ +# npm-Based App Distribution for Twenty + +*Technical Design Document -- February 2026* + +## Overview + +Add npm registry support for distributing Twenty apps (public and private), with per-AppRegistration registry overrides, direct tarball upload as escape hatch, and version upgrade detection. + +## Assumptions + +- The marketplace install flow (currently a TODO in the resolver and frontend) will be implemented separately. This plan provides the infrastructure that install flow will call into. +- The existing `app:dev` flow (individual file uploads via CLI) remains unchanged. +- The existing GitHub-based marketplace discovery remains as a curated fallback. + +## Architecture + +``` + Developer + / | \ + npm publish | twenty app:push + / | \ + npmjs.com Private Reg Server REST Upload + | | | + v v v + [Discovery Layer] [Direct Upload] + npm search API | + GitHub curated list | + | | + v | + MarketplaceService | + (sourcePackage in DTO) | + | | + v v + AppPackageResolverService <--------+ + .npmrc generation + yarn add / tarball extract + | + v + ApplicationSyncService (existing) + WorkspaceMigrationRunnerService + | + v + AppRegistration + Application entities +``` + +## Phase 1: Entity and Config Changes + +### 1a. Extend AppRegistrationEntity + +Add four columns to `application-registration.entity.ts`: + +- **`sourcePackage`** (text, nullable) -- npm package name, e.g. `"twenty-app-fireflies"` or `"@myorg/twenty-app-crm"`. Null for tarball-only or OAuth-only apps. +- **`tarballFileId`** (uuid, nullable) -- FK to a FileEntity storing a directly-uploaded `.tar.gz`. Null when the app comes from npm. +- **`registryUrl`** (text, nullable) -- per-registration npm registry override. Null means "use the server default `APP_REGISTRY_URL`." This is how a single server can pull public apps from npmjs.com while pulling `@mycompany/*` apps from GitHub Packages. +- **`latestAvailableVersion`** (text, nullable) -- cached latest version from the registry, updated periodically. Compared against `Application.version` to surface upgrade availability. + +**Source resolution priority:** + +1. `sourcePackage` is set → resolve from npm via `yarn add` +2. `tarballFileId` is set → extract from file storage +3. Neither → OAuth-only app, no server-side code + +### 1b. Extend ApplicationEntity.sourceType + +Widen the `sourceType` union from `'local'` to `'local' | 'npm' | 'tarball'`: + +- `'local'` -- existing behavior (CLI `app:dev`, individual file uploads, workspace-custom) +- `'npm'` -- installed from an npm registry via `yarn add` +- `'tarball'` -- installed from a directly-uploaded tarball + +This lets the system distinguish how an app was installed, which matters for upgrade logic (npm apps can check the registry for newer versions; tarball apps cannot). + +### 1c. Add server-wide config variables + +Add a new `APP_REGISTRY_CONFIG` group to ConfigVariablesGroup: + +- **`APP_REGISTRY_URL`** (string, default `https://registry.npmjs.org`) -- default npm registry URL +- **`APP_REGISTRY_TOKEN`** (string, optional, sensitive) -- auth token for the default registry + +### 1d. Generate migration + +TypeORM migration adding `sourcePackage`, `tarballFileId`, `registryUrl`, `latestAvailableVersion` to `core.applicationRegistration`. + +## Phase 2: App Package Resolver Service + +### 2a. Create AppPackageResolverService + +New service with core method: + +``` +resolvePackage(appRegistration, options?: { targetVersion? }) → ResolvedPackage | null +``` + +Returns `{ manifestPath, packageJsonPath, filesDir }` or null for OAuth-only apps. + +**Resolution logic:** + +``` +if sourcePackage: + 1. Determine registry: appRegistration.registryUrl ?? APP_REGISTRY_URL + 2. Determine auth token for the resolved registry + 3. Generate temporary .npmrc in an isolated working directory + 4. Run: yarn add @ + 5. Read manifest from node_modules//.twenty/output/manifest.json + 6. Return paths + +if tarballFileId: + 1. Download tarball from FileStorageService + 2. Extract to temporary directory + 3. Read manifest from extracted files + 4. Return paths + +else: + return null (OAuth-only) +``` + +### 2b. Isolated working directories + +Each resolution runs in a temporary directory under `{os.tmpdir()}/twenty-app-resolver/{uuid}/`. This avoids contaminating the server's own `node_modules` and isolates apps from each other. Cleaned up after files are copied to storage. + +### 2c. .npmrc generation + +For scoped packages (`@scope/twenty-app-*`): + +``` +@scope:registry=https://npm.pkg.github.com +//npm.pkg.github.com/:_authToken=TOKEN +``` + +For unscoped packages with a non-default registry: + +``` +registry=https://my-verdaccio.internal:4873 +//my-verdaccio.internal:4873/:_authToken=TOKEN +``` + +### 2d. Post-resolution file transfer + +After resolving, copies files into the app's storage path using the existing FileStorageService layout: + +``` +{workspaceId}/{applicationUniversalIdentifier}/ + built-logic-function/... + built-front-component/... + dependencies/package.json + dependencies/yarn.lock + public-asset/... + source/... +``` + +This reuses the same FileFolder enum paths that `app:dev` uses, so downstream ApplicationSyncService works unchanged. + +## Phase 3: Marketplace Discovery via npm + +### 3a. Update MarketplaceService + +Add npm-based discovery alongside the existing GitHub path: + +- Query npm search API: `GET {registryUrl}/-/v1/search?text=keywords:twenty-app&size=250` +- Map each result to MarketplaceAppDTO using package.json metadata + +**Merge strategy:** + +1. Fetch from npm search API (apps with `keywords: ["twenty-app"]`) +2. Fetch from GitHub (existing curated list) +3. Merge by `universalIdentifier` -- GitHub entries override npm entries (allowing curation) +4. Cache merged result with existing 1-hour TTL + +### 3b. Add sourcePackage to MarketplaceAppDTO + +The DTO needs a `sourcePackage: string | null` field so the install flow knows which npm package to resolve. For npm-discovered apps, this is the package name. For GitHub-only apps, this is null. + +## Phase 4: Version Upgrade Support + +### 4a. Create AppUpgradeService + +**Periodic version check (npm-sourced apps only):** + +- Fetches `{registryUrl}/{sourcePackage}/latest` from the npm registry +- Stores result in `AppRegistration.latestAvailableVersion` +- Frontend compares against `Application.version` to show "Update available" + +**Upgrade trigger:** + +1. Resolve the new version via AppPackageResolverService +2. Sync via existing ApplicationSyncService (triggers workspace migration for schema changes) +3. Update Application.version + +**Rollback strategy:** If sync fails (e.g., migration validation error), re-resolve the previous version and re-sync. This is possible because npm retains all published versions. + +### 4b. Version check scheduling + +Lightweight cron or check-on-access pattern. Iterates over AppRegistrations where `sourcePackage IS NOT NULL` and calls `checkForUpdates()`. Frequency: once per hour, matching the existing marketplace cache TTL. + +## Phase 5: SDK CLI Commands + +### 5a. Finalize `twenty app:build` + +Ensure `.twenty/output/` is npm-publishable. The build step generates a `package.json` in the output directory: + +```json +{ + "name": "twenty-app-fireflies", + "version": "1.2.0", + "keywords": ["twenty-app"], + "twenty": { + "universalIdentifier": "a4df0c0f-c65e-44e5-8436-24814182d4ac" + }, + "files": ["manifest.json", "built-logic-function", "built-front-component", "public-asset"] +} +``` + +The developer then publishes with standard `npm publish` -- no custom command needed. + +### 5b. `twenty app:pack` (new command) + +``` +twenty app:pack [appPath] +``` + +- Runs `app:build` if `.twenty/output/` doesn't exist or is stale +- Uses existing TarballService to create `{name}-{version}.tar.gz` +- Outputs the file path for manual distribution + +### 5c. `twenty app:push` (new command) + +``` +twenty app:push [appPath] --server --token +``` + +- Runs `app:pack` to produce the tarball +- Reads universalIdentifier from manifest to find or create the AppRegistration +- Uploads via `POST /api/app-registrations/upload-tarball` +- Reports success with the registration ID +- Reuses `twenty auth:login` credentials if `--server` is not specified + +## Phase 6: Server Tarball Upload Endpoint + +### 6a. REST controller + +``` +POST /api/app-registrations/upload-tarball +Content-Type: multipart/form-data +Body: tarball file + optional universalIdentifier +``` + +**Validation:** + +- Max file size: 50MB +- Must be a valid `.tar.gz` +- Extracted contents must contain `manifest.json` with a valid `universalIdentifier` +- The `universalIdentifier` must not conflict with an existing registration owned by a different user + +**Flow:** + +1. Extract tarball to temp directory +2. Validate manifest structure +3. Find or create AppRegistration by universalIdentifier +4. Store tarball in FileStorageService under `FileFolder.AppTarball` +5. Set `tarballFileId` on the AppRegistration +6. Return the AppRegistration entity + +### 6b. Add FileFolder.AppTarball + +New enum value `AppTarball = 'app-tarball'` in FileFolder. + +## Key Design Decisions + +| Decision | Rationale | +|---|---| +| Per-AppRegistration registry override | `registryUrl` on the entity allows mixing registries. Public apps from npmjs.com, private from GitHub Packages/Verdaccio. Server-wide `APP_REGISTRY_URL` is the fallback. | +| npm publish is standard | No custom publish infra. Free versioning, README, `npm audit`, download stats, proven auth model. | +| Tarball as escape hatch | Air-gapped environments, CI pipelines, one-off installs. Cannot auto-upgrade. | +| sourceType distinction | `'npm' \| 'tarball' \| 'local'` lets the system know which upgrade path is available. Only npm apps can check for newer versions. | +| Backward compatible | `app:dev` flow unchanged. GitHub marketplace unchanged. All new fields nullable. | +| Upgrade rollback | Re-resolve previous version from npm on failure. Safe because npm never deletes published versions. | + +## Edge Cases + +- **npm unreachable**: Timeout after 30s, throw clear error. App remains at current installed version. +- **Package name conflicts**: The `universalIdentifier` in the `twenty` field of `package.json` is the source of truth, not the npm package name. Two packages with the same universalIdentifier conflict at the AppRegistration level (unique index). +- **Scoped vs unscoped packages**: Both work. Scoped packages naturally route to a private registry via `.npmrc` scope mapping. +- **Multiple workspaces, same server**: AppRegistration is server-level (core schema). Application is workspace-level. One AppRegistration can be installed in multiple workspaces at different versions. diff --git a/npm-app-distribution-plan.pdf b/npm-app-distribution-plan.pdf new file mode 100644 index 0000000000..e37caf5d4b Binary files /dev/null and b/npm-app-distribution-plan.pdf differ diff --git a/packages/create-twenty-app/src/utils/__tests__/app-template.spec.ts b/packages/create-twenty-app/src/utils/__tests__/app-template.spec.ts index 2a0b9a275f..842d808756 100644 --- a/packages/create-twenty-app/src/utils/__tests__/app-template.spec.ts +++ b/packages/create-twenty-app/src/utils/__tests__/app-template.spec.ts @@ -5,7 +5,6 @@ import * as fs from 'fs-extra'; import { tmpdir } from 'os'; import { join } from 'path'; -// Mock fs-extra's copy function to skip copying base template (not available during tests) jest.mock('fs-extra', () => { const actual = jest.requireActual('fs-extra'); return { @@ -41,7 +40,6 @@ describe('copyBaseApplicationProject', () => { let testAppDirectory: string; beforeEach(async () => { - // Create a unique temp directory for each test testAppDirectory = join( tmpdir(), `test-twenty-app-${Date.now()}-${Math.random().toString(36).slice(2)}`, @@ -51,7 +49,6 @@ describe('copyBaseApplicationProject', () => { }); afterEach(async () => { - // Clean up temp directory after each test if (testAppDirectory && (await fs.pathExists(testAppDirectory))) { await fs.remove(testAppDirectory); } @@ -66,15 +63,12 @@ describe('copyBaseApplicationProject', () => { exampleOptions: ALL_EXAMPLES, }); - // Verify src/ folder exists const srcAppPath = join(testAppDirectory, 'src'); expect(await fs.pathExists(srcAppPath)).toBe(true); - // Verify application-config.ts exists in src/ const appConfigPath = join(srcAppPath, APPLICATION_FILE_NAME); expect(await fs.pathExists(appConfigPath)).toBe(true); - // Verify default-role.ts exists in src/ const roleConfigPath = join(srcAppPath, 'roles', DEFAULT_ROLE_FILE_NAME); expect(await fs.pathExists(roleConfigPath)).toBe(true); }); @@ -143,27 +137,22 @@ describe('copyBaseApplicationProject', () => { const appConfigPath = join(testAppDirectory, 'src', APPLICATION_FILE_NAME); const appConfigContent = await fs.readFile(appConfigPath, 'utf8'); - // Verify it uses defineApplication expect(appConfigContent).toContain( "import { defineApplication } from 'twenty-sdk'", ); expect(appConfigContent).toContain('export default defineApplication({'); - // Verify it imports the role identifier expect(appConfigContent).toContain( "import { DEFAULT_ROLE_UNIVERSAL_IDENTIFIER } from 'src/roles/default-role'", ); - // Verify display name and description expect(appConfigContent).toContain("displayName: 'My Test App'"); expect(appConfigContent).toContain("description: 'A test application'"); - // Verify it has a universalIdentifier (UUID format) expect(appConfigContent).toMatch( /universalIdentifier: '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'/, ); - // Verify it references the role expect(appConfigContent).toContain( 'defaultRoleUniversalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER', ); @@ -186,29 +175,24 @@ describe('copyBaseApplicationProject', () => { ); const roleConfigContent = await fs.readFile(roleConfigPath, 'utf8'); - // Verify it uses defineRole expect(roleConfigContent).toContain( "import { defineRole } from 'twenty-sdk'", ); expect(roleConfigContent).toContain('export default defineRole({'); - // Verify it exports the universal identifier constant expect(roleConfigContent).toContain( 'export const DEFAULT_ROLE_UNIVERSAL_IDENTIFIER', ); - // Verify role label includes app name expect(roleConfigContent).toContain( "label: 'My Test App default function role'", ); - // Verify default permissions expect(roleConfigContent).toContain('canReadAllObjectRecords: true'); expect(roleConfigContent).toContain('canUpdateAllObjectRecords: true'); expect(roleConfigContent).toContain('canSoftDeleteAllObjectRecords: true'); expect(roleConfigContent).toContain('canDestroyAllObjectRecords: false'); - // Verify it has a universalIdentifier (UUID format) expect(roleConfigContent).toMatch( /universalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER/, ); @@ -223,7 +207,6 @@ describe('copyBaseApplicationProject', () => { exampleOptions: ALL_EXAMPLES, }); - // Verify fs.copy was called with correct destination expect(fs.copy).toHaveBeenCalledTimes(1); expect(fs.copy).toHaveBeenCalledWith( expect.stringContaining('base-application'), @@ -247,7 +230,6 @@ describe('copyBaseApplicationProject', () => { }); it('should generate unique UUIDs for each application', async () => { - // Create first app const firstAppDir = join(testAppDirectory, 'app1'); await fs.ensureDir(firstAppDir); await copyBaseApplicationProject({ @@ -258,7 +240,6 @@ describe('copyBaseApplicationProject', () => { exampleOptions: ALL_EXAMPLES, }); - // Create second app const secondAppDir = join(testAppDirectory, 'app2'); await fs.ensureDir(secondAppDir); await copyBaseApplicationProject({ @@ -269,7 +250,6 @@ describe('copyBaseApplicationProject', () => { exampleOptions: ALL_EXAMPLES, }); - // Read both app configs const firstAppConfig = await fs.readFile( join(firstAppDir, 'src', APPLICATION_FILE_NAME), 'utf8', @@ -279,7 +259,6 @@ describe('copyBaseApplicationProject', () => { 'utf8', ); - // Extract UUIDs using regex const uuidRegex = /universalIdentifier: '([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})'/; const firstUuid = firstAppConfig.match(uuidRegex)?.[1]; @@ -291,7 +270,6 @@ describe('copyBaseApplicationProject', () => { }); it('should generate unique role UUIDs for each application', async () => { - // Create first app const firstAppDir = join(testAppDirectory, 'app1'); await fs.ensureDir(firstAppDir); await copyBaseApplicationProject({ @@ -302,7 +280,6 @@ describe('copyBaseApplicationProject', () => { exampleOptions: ALL_EXAMPLES, }); - // Create second app const secondAppDir = join(testAppDirectory, 'app2'); await fs.ensureDir(secondAppDir); await copyBaseApplicationProject({ @@ -323,7 +300,6 @@ describe('copyBaseApplicationProject', () => { 'utf8', ); - // Extract UUIDs using regex const uuidRegex = /DEFAULT_ROLE_UNIVERSAL_IDENTIFIER =\s*'([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})'/; const firstUuid = firstRoleConfig.match(uuidRegex)?.[1]; @@ -402,7 +378,6 @@ describe('copyBaseApplicationProject', () => { const srcPath = join(testAppDirectory, 'src'); - // Core files should exist expect(await fs.pathExists(join(srcPath, APPLICATION_FILE_NAME))).toBe( true, ); @@ -422,7 +397,6 @@ describe('copyBaseApplicationProject', () => { ), ).toBe(true); - // Example files should not exist expect( await fs.pathExists(join(srcPath, 'objects', 'example-object.ts')), ).toBe(false); diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts index 6058b05756..2d1b54f21e 100644 --- a/packages/twenty-front/src/generated-metadata/graphql.ts +++ b/packages/twenty-front/src/generated-metadata/graphql.ts @@ -56,8 +56,8 @@ export type AdminAiModelConfig = { modelId: Scalars['String']; }; -export type AdminAiModelsOutput = { - __typename?: 'AdminAIModelsOutput'; +export type AdminAiModels = { + __typename?: 'AdminAIModels'; autoEnableNewModels: Scalars['Boolean']; models: Array; }; @@ -311,6 +311,42 @@ export type Application = { yarnLockFileId?: Maybe; }; +export type ApplicationRegistration = { + __typename?: 'ApplicationRegistration'; + author?: Maybe; + createdAt: Scalars['DateTime']; + description?: Maybe; + id: Scalars['UUID']; + logoUrl?: Maybe; + name: Scalars['String']; + oAuthClientId: Scalars['String']; + oAuthRedirectUris: Array; + oAuthScopes: Array; + termsUrl?: Maybe; + universalIdentifier: Scalars['String']; + updatedAt: Scalars['DateTime']; + websiteUrl?: Maybe; +}; + +export type ApplicationRegistrationStats = { + __typename?: 'ApplicationRegistrationStats'; + activeInstalls: Scalars['Int']; + mostInstalledVersion?: Maybe; + versionDistribution: Array; +}; + +export type ApplicationRegistrationVariable = { + __typename?: 'ApplicationRegistrationVariable'; + createdAt: Scalars['DateTime']; + description: Scalars['String']; + id: Scalars['UUID']; + isFilled: Scalars['Boolean']; + isRequired: Scalars['Boolean']; + isSecret: Scalars['Boolean']; + key: Scalars['String']; + updatedAt: Scalars['DateTime']; +}; + export type ApplicationTokenPair = { __typename?: 'ApplicationTokenPair'; applicationAccessToken: AuthToken; @@ -367,8 +403,8 @@ export type AuthTokens = { tokens: AuthTokenPair; }; -export type AuthorizeAppOutput = { - __typename?: 'AuthorizeAppOutput'; +export type AuthorizeApp = { + __typename?: 'AuthorizeApp'; redirectUrl: Scalars['String']; }; @@ -396,8 +432,8 @@ export type AvailableWorkspaces = { availableWorkspacesForSignUp: Array; }; -export type AvailableWorkspacesAndAccessTokensOutput = { - __typename?: 'AvailableWorkspacesAndAccessTokensOutput'; +export type AvailableWorkspacesAndAccessTokens = { + __typename?: 'AvailableWorkspacesAndAccessTokens'; availableWorkspaces: AvailableWorkspaces; tokens: AuthTokenPair; }; @@ -442,13 +478,8 @@ export type BarChartConfiguration = { timezone?: Maybe; }; -export type BarChartDataInput = { - configuration: Scalars['JSON']; - objectMetadataId: Scalars['UUID']; -}; - -export type BarChartDataOutput = { - __typename?: 'BarChartDataOutput'; +export type BarChartData = { + __typename?: 'BarChartData'; data: Array; formattedToRawLookup: Scalars['JSON']; groupMode: BarChartGroupMode; @@ -463,6 +494,11 @@ export type BarChartDataOutput = { yAxisLabel: Scalars['String']; }; +export type BarChartDataInput = { + configuration: Scalars['JSON']; + objectMetadataId: Scalars['UUID']; +}; + /** Display mode for bar charts with secondary grouping */ export enum BarChartGroupMode { GROUPED = 'GROUPED', @@ -488,8 +524,8 @@ export type Billing = { trialPeriods: Array; }; -export type BillingEndTrialPeriodOutput = { - __typename?: 'BillingEndTrialPeriodOutput'; +export type BillingEndTrialPeriod = { + __typename?: 'BillingEndTrialPeriod'; /** Billing portal URL for payment method update (returned when no payment method exists) */ billingPortalUrl?: Maybe; /** Boolean that confirms if a payment method was found */ @@ -529,8 +565,8 @@ export type BillingMeteredProduct = BillingProductDto & { prices?: Maybe>; }; -export type BillingMeteredProductUsageOutput = { - __typename?: 'BillingMeteredProductUsageOutput'; +export type BillingMeteredProductUsage = { + __typename?: 'BillingMeteredProductUsage'; grantedCredits: Scalars['Float']; periodEnd: Scalars['DateTime']; periodStart: Scalars['DateTime']; @@ -541,19 +577,19 @@ export type BillingMeteredProductUsageOutput = { usedCredits: Scalars['Float']; }; +export type BillingPlan = { + __typename?: 'BillingPlan'; + licensedProducts: Array; + meteredProducts: Array; + planKey: BillingPlanKey; +}; + /** The different billing plans available */ export enum BillingPlanKey { ENTERPRISE = 'ENTERPRISE', PRO = 'PRO' } -export type BillingPlanOutput = { - __typename?: 'BillingPlanOutput'; - licensedProducts: Array; - meteredProducts: Array; - planKey: BillingPlanKey; -}; - export type BillingPriceLicensed = { __typename?: 'BillingPriceLicensed'; priceUsageType: BillingUsageType; @@ -605,14 +641,14 @@ export type BillingProductMetadata = { productKey: BillingProductKey; }; -export type BillingSessionOutput = { - __typename?: 'BillingSessionOutput'; +export type BillingSession = { + __typename?: 'BillingSession'; url?: Maybe; }; export type BillingSubscription = { __typename?: 'BillingSubscription'; - billingSubscriptionItems?: Maybe>; + billingSubscriptionItems?: Maybe>; currentPeriodEnd?: Maybe; id: Scalars['UUID']; interval?: Maybe; @@ -621,8 +657,8 @@ export type BillingSubscription = { status: SubscriptionStatus; }; -export type BillingSubscriptionItemDto = { - __typename?: 'BillingSubscriptionItemDTO'; +export type BillingSubscriptionItem = { + __typename?: 'BillingSubscriptionItem'; billingProduct: BillingProductDto; hasReachedCurrentPeriodCap: Scalars['Boolean']; id: Scalars['UUID']; @@ -649,8 +685,8 @@ export type BillingTrialPeriod = { isCreditCardRequired: Scalars['Boolean']; }; -export type BillingUpdateOutput = { - __typename?: 'BillingUpdateOutput'; +export type BillingUpdate = { + __typename?: 'BillingUpdate'; /** All billing subscriptions */ billingSubscriptions: Array; /** Current billing subscription */ @@ -688,8 +724,8 @@ export type ChannelSyncSuccess = { success: Scalars['Boolean']; }; -export type CheckUserExistOutput = { - __typename?: 'CheckUserExistOutput'; +export type CheckUserExist = { + __typename?: 'CheckUserExist'; availableWorkspacesCount: Scalars['Float']; exists: Scalars['Boolean']; isEmailVerified: Scalars['Boolean']; @@ -788,6 +824,11 @@ export enum ConfigVariableType { STRING = 'STRING' } +export type ConfigVariables = { + __typename?: 'ConfigVariables'; + groups: Array; +}; + export enum ConfigVariablesGroup { ANALYTICS_CONFIG = 'ANALYTICS_CONFIG', AWS_SES_SETTINGS = 'AWS_SES_SETTINGS', @@ -821,11 +862,6 @@ export type ConfigVariablesGroupData = { variables: Array; }; -export type ConfigVariablesOutput = { - __typename?: 'ConfigVariablesOutput'; - groups: Array; -}; - export type ConnectedImapSmtpCaldavAccount = { __typename?: 'ConnectedImapSmtpCaldavAccount'; accountOwnerId: Scalars['UUID']; @@ -994,6 +1030,7 @@ export type CreateAppTokenInput = { }; export type CreateApplicationInput = { + applicationRegistrationId?: InputMaybe; description?: InputMaybe; name: Scalars['String']; sourcePath: Scalars['String']; @@ -1001,6 +1038,32 @@ export type CreateApplicationInput = { version: Scalars['String']; }; +export type CreateApplicationRegistration = { + __typename?: 'CreateApplicationRegistration'; + applicationRegistration: ApplicationRegistration; + clientSecret: Scalars['String']; +}; + +export type CreateApplicationRegistrationInput = { + author?: InputMaybe; + description?: InputMaybe; + logoUrl?: InputMaybe; + name: Scalars['String']; + oAuthRedirectUris?: InputMaybe>; + oAuthScopes?: InputMaybe>; + termsUrl?: InputMaybe; + universalIdentifier?: InputMaybe; + websiteUrl?: InputMaybe; +}; + +export type CreateApplicationRegistrationVariableInput = { + applicationRegistrationId: Scalars['String']; + description?: InputMaybe; + isSecret?: InputMaybe; + key: Scalars['String']; + value: Scalars['String']; +}; + export type CreateApprovedAccessDomainInput = { domain: Scalars['String']; email: Scalars['String']; @@ -1274,17 +1337,17 @@ export type DeleteOneObjectInput = { id: Scalars['UUID']; }; +export type DeleteSso = { + __typename?: 'DeleteSso'; + identityProviderId: Scalars['UUID']; +}; + export type DeleteSsoInput = { identityProviderId: Scalars['UUID']; }; -export type DeleteSsoOutput = { - __typename?: 'DeleteSsoOutput'; - identityProviderId: Scalars['UUID']; -}; - -export type DeleteTwoFactorAuthenticationMethodOutput = { - __typename?: 'DeleteTwoFactorAuthenticationMethodOutput'; +export type DeleteTwoFactorAuthenticationMethod = { + __typename?: 'DeleteTwoFactorAuthenticationMethod'; /** Boolean that confirms query was dispatched */ success: Scalars['Boolean']; }; @@ -1364,13 +1427,8 @@ export type DuplicatedDashboard = { updatedAt: Scalars['String']; }; -export type EditSsoInput = { - id: Scalars['UUID']; - status: SsoIdentityProviderStatus; -}; - -export type EditSsoOutput = { - __typename?: 'EditSsoOutput'; +export type EditSso = { + __typename?: 'EditSso'; id: Scalars['UUID']; issuer: Scalars['String']; name: Scalars['String']; @@ -1378,14 +1436,19 @@ export type EditSsoOutput = { type: IdentityProviderType; }; +export type EditSsoInput = { + id: Scalars['UUID']; + status: SsoIdentityProviderStatus; +}; + export type EmailAccountConnectionParameters = { CALDAV?: InputMaybe; IMAP?: InputMaybe; SMTP?: InputMaybe; }; -export type EmailPasswordResetLinkOutput = { - __typename?: 'EmailPasswordResetLinkOutput'; +export type EmailPasswordResetLink = { + __typename?: 'EmailPasswordResetLink'; /** Boolean that confirms query was dispatched */ success: Scalars['Boolean']; }; @@ -1484,13 +1547,6 @@ export type ExecuteOneLogicFunctionInput = { export type FeatureFlag = { __typename?: 'FeatureFlag'; - id: Scalars['UUID']; - key: FeatureFlagKey; - value: Scalars['Boolean']; -}; - -export type FeatureFlagDto = { - __typename?: 'FeatureFlagDTO'; key: FeatureFlagKey; value: Scalars['Boolean']; }; @@ -1680,8 +1736,8 @@ export type FilesConfiguration = { configurationType: WidgetConfigurationType; }; -export type FindAvailableSsoidpOutput = { - __typename?: 'FindAvailableSSOIDPOutput'; +export type FindAvailableSsoidp = { + __typename?: 'FindAvailableSSOIDP'; id: Scalars['UUID']; issuer: Scalars['String']; name: Scalars['String']; @@ -1736,18 +1792,18 @@ export type GetApiKeyInput = { id: Scalars['UUID']; }; -export type GetAuthorizationUrlForSsoInput = { - identityProviderId: Scalars['UUID']; - workspaceInviteHash?: InputMaybe; -}; - -export type GetAuthorizationUrlForSsoOutput = { - __typename?: 'GetAuthorizationUrlForSSOOutput'; +export type GetAuthorizationUrlForSso = { + __typename?: 'GetAuthorizationUrlForSSO'; authorizationURL: Scalars['String']; id: Scalars['UUID']; type: Scalars['String']; }; +export type GetAuthorizationUrlForSsoInput = { + identityProviderId: Scalars['UUID']; + workspaceInviteHash?: InputMaybe; +}; + /** Order by options for graph widgets */ export enum GraphOrderBy { FIELD_ASC = 'FIELD_ASC', @@ -1806,8 +1862,8 @@ export type ImapSmtpCaldavConnectionSuccess = { success: Scalars['Boolean']; }; -export type ImpersonateOutput = { - __typename?: 'ImpersonateOutput'; +export type Impersonate = { + __typename?: 'Impersonate'; loginToken: AuthToken; workspace: WorkspaceUrlsAndId; }; @@ -1920,13 +1976,13 @@ export enum InferenceProvider { XAI = 'XAI' } -export type InitiateTwoFactorAuthenticationProvisioningOutput = { - __typename?: 'InitiateTwoFactorAuthenticationProvisioningOutput'; +export type InitiateTwoFactorAuthenticationProvisioning = { + __typename?: 'InitiateTwoFactorAuthenticationProvisioning'; uri: Scalars['String']; }; -export type InvalidatePasswordOutput = { - __typename?: 'InvalidatePasswordOutput'; +export type InvalidatePassword = { + __typename?: 'InvalidatePassword'; /** Boolean that confirms query was dispatched */ success: Scalars['Boolean']; }; @@ -1980,13 +2036,8 @@ export type LineChartConfiguration = { timezone?: Maybe; }; -export type LineChartDataInput = { - configuration: Scalars['JSON']; - objectMetadataId: Scalars['UUID']; -}; - -export type LineChartDataOutput = { - __typename?: 'LineChartDataOutput'; +export type LineChartData = { + __typename?: 'LineChartData'; formattedToRawLookup: Scalars['JSON']; hasTooManyGroups: Scalars['Boolean']; series: Array; @@ -1996,6 +2047,11 @@ export type LineChartDataOutput = { yAxisLabel: Scalars['String']; }; +export type LineChartDataInput = { + configuration: Scalars['JSON']; + objectMetadataId: Scalars['UUID']; +}; + export type LineChartDataPoint = { __typename?: 'LineChartDataPoint'; x: Scalars['String']; @@ -2075,8 +2131,8 @@ export type LogicFunctionLogsInput = { universalIdentifier?: InputMaybe; }; -export type LoginTokenOutput = { - __typename?: 'LoginTokenOutput'; +export type LoginToken = { + __typename?: 'LoginToken'; loginToken: AuthToken; }; @@ -2207,14 +2263,16 @@ export type Mutation = { addQueryToEventStream: Scalars['Boolean']; assignRoleToAgent: Scalars['Boolean']; assignRoleToApiKey: Scalars['Boolean']; - authorizeApp: AuthorizeAppOutput; - cancelSwitchBillingInterval: BillingUpdateOutput; - cancelSwitchBillingPlan: BillingUpdateOutput; - cancelSwitchMeteredPrice: BillingUpdateOutput; + authorizeApp: AuthorizeApp; + cancelSwitchBillingInterval: BillingUpdate; + cancelSwitchBillingPlan: BillingUpdate; + cancelSwitchMeteredPrice: BillingUpdate; checkCustomDomainValidRecords?: Maybe; checkPublicDomainValidRecords?: Maybe; - checkoutSession: BillingSessionOutput; + checkoutSession: BillingSession; createApiKey: ApiKey; + createApplicationRegistration: CreateApplicationRegistration; + createApplicationRegistrationVariable: ApplicationRegistrationVariable; createApprovedAccessDomain: ApprovedAccessDomain; createChatThread: AgentChatThread; createCommandMenuItem: CommandMenuItem; @@ -2234,7 +2292,7 @@ export type Mutation = { createManyCoreViewFields: Array; createManyCoreViewGroups: Array; createNavigationMenuItem: NavigationMenuItem; - createOIDCIdentityProvider: SetupSsoOutput; + createOIDCIdentityProvider: SetupSso; createObjectEvent: Analytics; createOneAgent: Agent; createOneAppToken: AppToken; @@ -2247,10 +2305,12 @@ export type Mutation = { createPageLayoutTab: PageLayoutTab; createPageLayoutWidget: PageLayoutWidget; createPublicDomain: PublicDomain; - createSAMLIdentityProvider: SetupSsoOutput; + createSAMLIdentityProvider: SetupSso; createSkill: Skill; createWebhook: Webhook; deactivateSkill: Skill; + deleteApplicationRegistration: Scalars['Boolean']; + deleteApplicationRegistrationVariable: Scalars['Boolean']; deleteApprovedAccessDomain: Scalars['Boolean']; deleteCommandMenuItem: CommandMenuItem; deleteCoreView: Scalars['Boolean']; @@ -2274,9 +2334,9 @@ export type Mutation = { deleteOneObject: Object; deleteOneRole: Scalars['String']; deletePublicDomain: Scalars['Boolean']; - deleteSSOIdentityProvider: DeleteSsoOutput; + deleteSSOIdentityProvider: DeleteSso; deleteSkill: Skill; - deleteTwoFactorAuthenticationMethod: DeleteTwoFactorAuthenticationMethodOutput; + deleteTwoFactorAuthenticationMethod: DeleteTwoFactorAuthenticationMethod; deleteUser: User; deleteUserFromWorkspace: UserWorkspace; deleteWebhook: Webhook; @@ -2293,50 +2353,53 @@ export type Mutation = { destroyPageLayoutWidget: Scalars['Boolean']; disablePostgresProxy: PostgresCredentials; duplicateDashboard: DuplicatedDashboard; - editSSOIdentityProvider: EditSsoOutput; - emailPasswordResetLink: EmailPasswordResetLinkOutput; + editSSOIdentityProvider: EditSso; + emailPasswordResetLink: EmailPasswordResetLink; enablePostgresProxy: PostgresCredentials; - endSubscriptionTrialPeriod: BillingEndTrialPeriodOutput; + endSubscriptionTrialPeriod: BillingEndTrialPeriod; evaluateAgentTurn: AgentTurnEvaluation; executeOneLogicFunction: LogicFunctionExecutionResult; generateApiKeyToken: ApiKeyToken; generateApplicationToken: ApplicationTokenPair; - generateTransientToken: TransientTokenOutput; + generateTransientToken: TransientToken; getAuthTokensFromLoginToken: AuthTokens; getAuthTokensFromOTP: AuthTokens; - getAuthorizationUrlForSSO: GetAuthorizationUrlForSsoOutput; - getLoginTokenFromCredentials: LoginTokenOutput; - impersonate: ImpersonateOutput; - initiateOTPProvisioning: InitiateTwoFactorAuthenticationProvisioningOutput; - initiateOTPProvisioningForAuthenticatedUser: InitiateTwoFactorAuthenticationProvisioningOutput; + getAuthorizationUrlForSSO: GetAuthorizationUrlForSso; + getLoginTokenFromCredentials: LoginToken; + impersonate: Impersonate; + initiateOTPProvisioning: InitiateTwoFactorAuthenticationProvisioning; + initiateOTPProvisioningForAuthenticatedUser: InitiateTwoFactorAuthenticationProvisioning; installApplication: Scalars['Boolean']; installMarketplaceApp: Scalars['Boolean']; removeQueryFromEventStream: Scalars['Boolean']; removeRoleFromAgent: Scalars['Boolean']; renewApplicationToken: ApplicationTokenPair; renewToken: AuthTokens; - resendEmailVerificationToken: ResendEmailVerificationTokenOutput; - resendWorkspaceInvitation: SendInvitationsOutput; + resendEmailVerificationToken: ResendEmailVerificationToken; + resendWorkspaceInvitation: SendInvitations; retryJobs: RetryJobsResponse; revokeApiKey?: Maybe; + rotateApplicationRegistrationClientSecret: RotateClientSecret; runEvaluationInput: AgentTurn; saveImapSmtpCaldavAccount: ImapSmtpCaldavConnectionSuccess; - sendInvitations: SendInvitationsOutput; + sendInvitations: SendInvitations; setAdminAiModelEnabled: Scalars['Boolean']; - setMeteredSubscriptionPrice: BillingUpdateOutput; - signIn: AvailableWorkspacesAndAccessTokensOutput; - signUp: AvailableWorkspacesAndAccessTokensOutput; - signUpInNewWorkspace: SignUpOutput; - signUpInWorkspace: SignUpOutput; + setMeteredSubscriptionPrice: BillingUpdate; + signIn: AvailableWorkspacesAndAccessTokens; + signUp: AvailableWorkspacesAndAccessTokens; + signUpInNewWorkspace: SignUp; + signUpInWorkspace: SignUp; skipBookOnboardingStep: OnboardingStepSuccess; skipSyncEmailOnboardingStep: OnboardingStepSuccess; startChannelSync: ChannelSyncSuccess; - switchBillingPlan: BillingUpdateOutput; - switchSubscriptionInterval: BillingUpdateOutput; - syncApplication: WorkspaceMigrationDto; + switchBillingPlan: BillingUpdate; + switchSubscriptionInterval: BillingUpdate; + syncApplication: WorkspaceMigration; trackAnalytics: Analytics; uninstallApplication: Scalars['Boolean']; updateApiKey?: Maybe; + updateApplicationRegistration: ApplicationRegistration; + updateApplicationRegistrationVariable: ApplicationRegistrationVariable; updateCommandMenuItem: CommandMenuItem; updateCoreView: CoreView; updateCoreViewField: CoreViewField; @@ -2347,7 +2410,7 @@ export type Mutation = { updateCoreViewSort: CoreViewSort; updateDatabaseConfigVariable: Scalars['Boolean']; updateFrontComponent: FrontComponent; - updateLabPublicFeatureFlag: FeatureFlagDto; + updateLabPublicFeatureFlag: FeatureFlag; updateNavigationMenuItem: NavigationMenuItem; updateOneAgent: Agent; updateOneApplicationVariable: Scalars['Boolean']; @@ -2359,7 +2422,7 @@ export type Mutation = { updatePageLayoutTab: PageLayoutTab; updatePageLayoutWidget: PageLayoutWidget; updatePageLayoutWithTabsAndWidgets: PageLayout; - updatePasswordViaResetToken: InvalidatePasswordOutput; + updatePasswordViaResetToken: InvalidatePassword; updateSkill: Skill; updateUserEmail: Scalars['Boolean']; updateWebhook: Webhook; @@ -2384,10 +2447,10 @@ export type Mutation = { upsertRowLevelPermissionPredicates: UpsertRowLevelPermissionPredicatesResult; userLookupAdminPanel: UserLookup; validateApprovedAccessDomain: ApprovedAccessDomain; - verifyEmailAndGetLoginToken: VerifyEmailAndGetLoginTokenOutput; - verifyEmailAndGetWorkspaceAgnosticToken: AvailableWorkspacesAndAccessTokensOutput; + verifyEmailAndGetLoginToken: VerifyEmailAndGetLoginToken; + verifyEmailAndGetWorkspaceAgnosticToken: AvailableWorkspacesAndAccessTokens; verifyEmailingDomain: EmailingDomain; - verifyTwoFactorAuthenticationMethodForAuthenticatedUser: VerifyTwoFactorAuthenticationMethodOutput; + verifyTwoFactorAuthenticationMethodForAuthenticatedUser: VerifyTwoFactorAuthenticationMethod; }; @@ -2443,6 +2506,16 @@ export type MutationCreateApiKeyArgs = { }; +export type MutationCreateApplicationRegistrationArgs = { + input: CreateApplicationRegistrationInput; +}; + + +export type MutationCreateApplicationRegistrationVariableArgs = { + input: CreateApplicationRegistrationVariableInput; +}; + + export type MutationCreateApprovedAccessDomainArgs = { input: CreateApprovedAccessDomainInput; }; @@ -2618,6 +2691,16 @@ export type MutationDeactivateSkillArgs = { }; +export type MutationDeleteApplicationRegistrationArgs = { + id: Scalars['String']; +}; + + +export type MutationDeleteApplicationRegistrationVariableArgs = { + id: Scalars['String']; +}; + + export type MutationDeleteApprovedAccessDomainArgs = { input: DeleteApprovedAccessDomainInput; }; @@ -2929,6 +3012,11 @@ export type MutationRevokeApiKeyArgs = { }; +export type MutationRotateApplicationRegistrationClientSecretArgs = { + id: Scalars['String']; +}; + + export type MutationRunEvaluationInputArgs = { agentId: Scalars['UUID']; input: Scalars['String']; @@ -3017,6 +3105,16 @@ export type MutationUpdateApiKeyArgs = { }; +export type MutationUpdateApplicationRegistrationArgs = { + input: UpdateApplicationRegistrationInput; +}; + + +export type MutationUpdateApplicationRegistrationVariableArgs = { + input: UpdateApplicationRegistrationVariableInput; +}; + + export type MutationUpdateCommandMenuItemArgs = { input: UpdateCommandMenuItemInput; }; @@ -3668,6 +3766,16 @@ export type PieChartConfiguration = { timezone?: Maybe; }; +export type PieChartData = { + __typename?: 'PieChartData'; + data: Array; + formattedToRawLookup: Scalars['JSON']; + hasTooManyGroups: Scalars['Boolean']; + showCenterMetric: Scalars['Boolean']; + showDataLabels: Scalars['Boolean']; + showLegend: Scalars['Boolean']; +}; + export type PieChartDataInput = { configuration: Scalars['JSON']; objectMetadataId: Scalars['UUID']; @@ -3679,16 +3787,6 @@ export type PieChartDataItem = { value: Scalars['Float']; }; -export type PieChartDataOutput = { - __typename?: 'PieChartDataOutput'; - data: Array; - formattedToRawLookup: Scalars['JSON']; - hasTooManyGroups: Scalars['Boolean']; - showCenterMetric: Scalars['Boolean']; - showDataLabels: Scalars['Boolean']; - showLegend: Scalars['Boolean']; -}; - export type PlaceDetailsResult = { __typename?: 'PlaceDetailsResult'; city?: Maybe; @@ -3727,8 +3825,8 @@ export type PublicFeatureFlagMetadata = { label: Scalars['String']; }; -export type PublicWorkspaceDataOutput = { - __typename?: 'PublicWorkspaceDataOutput'; +export type PublicWorkspaceData = { + __typename?: 'PublicWorkspaceData'; authBypassProviders?: Maybe; authProviders: AuthProviders; displayName?: Maybe; @@ -3742,13 +3840,13 @@ export type Query = { agentTurns: Array; apiKey?: Maybe; apiKeys: Array; - barChartData: BarChartDataOutput; - billingPortalSession: BillingSessionOutput; + barChartData: BarChartData; + billingPortalSession: BillingSession; chatMessages: Array; chatThread: AgentChatThread; chatThreads: Array; - checkUserExists: CheckUserExistOutput; - checkWorkspaceInviteHashIsValid: WorkspaceInviteHashValidOutput; + checkUserExists: CheckUserExist; + checkWorkspaceInviteHashIsValid: WorkspaceInviteHashValid; commandMenuItem?: Maybe; commandMenuItems: Array; currentUser: User; @@ -3756,13 +3854,19 @@ export type Query = { eventLogs: EventLogQueryResult; field: Field; fields: FieldConnection; + findApplicationRegistrationByClientId?: Maybe; + findApplicationRegistrationByUniversalIdentifier?: Maybe; + findApplicationRegistrationStats: ApplicationRegistrationStats; + findApplicationRegistrationVariables: Array; findManyAgents: Array; + findManyApplicationRegistrations: Array; findManyApplications: Array; findManyLogicFunctions: Array; findManyMarketplaceApps: Array; findManyPublicDomains: Array; findOneAgent: Agent; findOneApplication: Application; + findOneApplicationRegistration: ApplicationRegistration; findOneLogicFunction: LogicFunction; findWorkspaceFromInviteHash: Workspace; findWorkspaceInvitations: Array; @@ -3770,11 +3874,11 @@ export type Query = { frontComponents: Array; getAISystemPromptPreview: AiSystemPromptPreview; getAddressDetails: PlaceDetailsResult; - getAdminAiModels: AdminAiModelsOutput; + getAdminAiModels: AdminAiModels; getApprovedAccessDomains: Array; getAutoCompleteAddress: Array; getAvailablePackages: Scalars['JSON']; - getConfigVariablesGrouped: ConfigVariablesOutput; + getConfigVariablesGrouped: ConfigVariables; getConnectedImapSmtpCaldavAccount: ConnectedImapSmtpCaldavAccount; getCoreView?: Maybe; getCoreViewField?: Maybe; @@ -3794,7 +3898,7 @@ export type Query = { getEmailingDomains: Array; getIndicatorHealthStatus: AdminPanelHealthServiceData; getLogicFunctionSourceCode?: Maybe; - getMeteredProductsUsage: Array; + getMeteredProductsUsage: Array; getPageLayout?: Maybe; getPageLayoutTab: PageLayoutTab; getPageLayoutTabs: Array; @@ -3802,27 +3906,27 @@ export type Query = { getPageLayoutWidgets: Array; getPageLayouts: Array; getPostgresCredentials?: Maybe; - getPublicWorkspaceDataByDomain: PublicWorkspaceDataOutput; + getPublicWorkspaceDataByDomain: PublicWorkspaceData; getQueueJobs: QueueJobsResponse; getQueueMetrics: QueueMetricsData; getRoles: Array; - getSSOIdentityProviders: Array; + getSSOIdentityProviders: Array; getSystemHealthStatus: SystemHealth; getToolIndex: Array; getToolInputSchema?: Maybe; index: Index; indexMetadatas: IndexConnection; - lineChartData: LineChartDataOutput; - listPlans: Array; + lineChartData: LineChartData; + listPlans: Array; navigationMenuItem?: Maybe; navigationMenuItems: Array; object: Object; objectRecordCounts: Array; objects: ObjectConnection; - pieChartData: PieChartDataOutput; + pieChartData: PieChartData; skill?: Maybe; skills: Array; - validatePasswordResetToken: ValidatePasswordResetTokenOutput; + validatePasswordResetToken: ValidatePasswordResetToken; versionInfo: VersionInfo; webhook?: Maybe; webhooks: Array; @@ -3891,6 +3995,26 @@ export type QueryFieldsArgs = { }; +export type QueryFindApplicationRegistrationByClientIdArgs = { + clientId: Scalars['String']; +}; + + +export type QueryFindApplicationRegistrationByUniversalIdentifierArgs = { + universalIdentifier: Scalars['String']; +}; + + +export type QueryFindApplicationRegistrationStatsArgs = { + id: Scalars['String']; +}; + + +export type QueryFindApplicationRegistrationVariablesArgs = { + applicationRegistrationId: Scalars['String']; +}; + + export type QueryFindOneAgentArgs = { input: AgentIdInput; }; @@ -3902,6 +4026,11 @@ export type QueryFindOneApplicationArgs = { }; +export type QueryFindOneApplicationRegistrationArgs = { + id: Scalars['String']; +}; + + export type QueryFindOneLogicFunctionArgs = { input: LogicFunctionIdInput; }; @@ -4228,8 +4357,8 @@ export type RemoveQueryFromEventStreamInput = { queryId: Scalars['String']; }; -export type ResendEmailVerificationTokenOutput = { - __typename?: 'ResendEmailVerificationTokenOutput'; +export type ResendEmailVerificationToken = { + __typename?: 'ResendEmailVerificationToken'; success: Scalars['Boolean']; }; @@ -4276,6 +4405,11 @@ export type Role = { workspaceMembers: Array; }; +export type RotateClientSecret = { + __typename?: 'RotateClientSecret'; + clientSecret: Scalars['String']; +}; + export type RowLevelPermissionPredicate = { __typename?: 'RowLevelPermissionPredicate'; fieldMetadataId: Scalars['String']; @@ -4369,8 +4503,8 @@ export enum SsoIdentityProviderStatus { Inactive = 'Inactive' } -export type SendInvitationsOutput = { - __typename?: 'SendInvitationsOutput'; +export type SendInvitations = { + __typename?: 'SendInvitations'; errors: Array; result: Array; /** Boolean that confirms query was dispatched */ @@ -4400,8 +4534,8 @@ export type SetupSamlSsoInput = { ssoURL: Scalars['String']; }; -export type SetupSsoOutput = { - __typename?: 'SetupSsoOutput'; +export type SetupSso = { + __typename?: 'SetupSso'; id: Scalars['UUID']; issuer: Scalars['String']; name: Scalars['String']; @@ -4409,8 +4543,8 @@ export type SetupSsoOutput = { type: IdentityProviderType; }; -export type SignUpOutput = { - __typename?: 'SignUpOutput'; +export type SignUp = { + __typename?: 'SignUp'; loginToken: AuthToken; workspace: WorkspaceUrlsAndId; }; @@ -4530,13 +4664,13 @@ export type ToolIndexEntry = { objectName?: Maybe; }; -export type TransientTokenOutput = { - __typename?: 'TransientTokenOutput'; +export type TransientToken = { + __typename?: 'TransientToken'; transientToken: AuthToken; }; -export type TwoFactorAuthenticationMethodDto = { - __typename?: 'TwoFactorAuthenticationMethodDTO'; +export type TwoFactorAuthenticationMethodSummary = { + __typename?: 'TwoFactorAuthenticationMethodSummary'; status: Scalars['String']; strategy: Scalars['String']; twoFactorAuthenticationMethodId: Scalars['UUID']; @@ -4580,6 +4714,32 @@ export type UpdateApiKeyInput = { revokedAt?: InputMaybe; }; +export type UpdateApplicationRegistrationInput = { + id: Scalars['String']; + update: UpdateApplicationRegistrationPayload; +}; + +export type UpdateApplicationRegistrationPayload = { + author?: InputMaybe; + description?: InputMaybe; + logoUrl?: InputMaybe; + name?: InputMaybe; + oAuthRedirectUris?: InputMaybe>; + oAuthScopes?: InputMaybe>; + termsUrl?: InputMaybe; + websiteUrl?: InputMaybe; +}; + +export type UpdateApplicationRegistrationVariableInput = { + id: Scalars['String']; + update: UpdateApplicationRegistrationVariablePayload; +}; + +export type UpdateApplicationRegistrationVariablePayload = { + description?: InputMaybe; + value?: InputMaybe; +}; + export type UpdateCommandMenuItemInput = { availabilityObjectMetadataId?: InputMaybe; availabilityType?: InputMaybe; @@ -5002,7 +5162,7 @@ export type UserWorkspace = { objectPermissions?: Maybe>; objectsPermissions?: Maybe>; permissionFlags?: Maybe>; - twoFactorAuthenticationMethodSummary?: Maybe>; + twoFactorAuthenticationMethodSummary?: Maybe>; updatedAt: Scalars['DateTime']; user: User; userId: Scalars['UUID']; @@ -5013,8 +5173,8 @@ export type ValidateApprovedAccessDomainInput = { validationToken: Scalars['String']; }; -export type ValidatePasswordResetTokenOutput = { - __typename?: 'ValidatePasswordResetTokenOutput'; +export type ValidatePasswordResetToken = { + __typename?: 'ValidatePasswordResetToken'; email: Scalars['String']; hasPassword: Scalars['Boolean']; id: Scalars['UUID']; @@ -5028,17 +5188,23 @@ export type VerificationRecord = { value: Scalars['String']; }; -export type VerifyEmailAndGetLoginTokenOutput = { - __typename?: 'VerifyEmailAndGetLoginTokenOutput'; +export type VerifyEmailAndGetLoginToken = { + __typename?: 'VerifyEmailAndGetLoginToken'; loginToken: AuthToken; workspaceUrls: WorkspaceUrls; }; -export type VerifyTwoFactorAuthenticationMethodOutput = { - __typename?: 'VerifyTwoFactorAuthenticationMethodOutput'; +export type VerifyTwoFactorAuthenticationMethod = { + __typename?: 'VerifyTwoFactorAuthenticationMethod'; success: Scalars['Boolean']; }; +export type VersionDistributionEntry = { + __typename?: 'VersionDistributionEntry'; + count: Scalars['Int']; + version: Scalars['String']; +}; + export type VersionInfo = { __typename?: 'VersionInfo'; currentVersion?: Maybe; @@ -5214,7 +5380,7 @@ export type Workspace = { enabledAiModelIds?: Maybe>; eventLogRetentionDays: Scalars['Float']; fastModel: Scalars['String']; - featureFlags?: Maybe>; + featureFlags?: Maybe>; hasValidEnterpriseKey: Scalars['Boolean']; id: Scalars['UUID']; inviteHash?: Maybe; @@ -5276,8 +5442,8 @@ export type WorkspaceInvitation = { id: Scalars['UUID']; }; -export type WorkspaceInviteHashValidOutput = { - __typename?: 'WorkspaceInviteHashValidOutput'; +export type WorkspaceInviteHashValid = { + __typename?: 'WorkspaceInviteHashValid'; isValid: Scalars['Boolean']; }; @@ -5322,18 +5488,18 @@ export enum WorkspaceMemberTimeFormatEnum { SYSTEM = 'SYSTEM' } +export type WorkspaceMigration = { + __typename?: 'WorkspaceMigration'; + actions: Scalars['JSON']; + applicationUniversalIdentifier: Scalars['String']; +}; + export enum WorkspaceMigrationActionType { create = 'create', delete = 'delete', update = 'update' } -export type WorkspaceMigrationDto = { - __typename?: 'WorkspaceMigrationDTO'; - actions: Scalars['JSON']; - applicationUniversalIdentifier: Scalars['String']; -}; - export type WorkspaceMigrationDeleteActionInput = { metadataName: AllMetadataName; type: WorkspaceMigrationActionType; @@ -5569,16 +5735,16 @@ export type AvailableWorkspaceFragmentFragment = { __typename?: 'AvailableWorksp export type AvailableWorkspacesFragmentFragment = { __typename?: 'AvailableWorkspaces', availableWorkspacesForSignIn: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }>, availableWorkspacesForSignUp: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }> }; -export type AvailableSsoIdentityProvidersFragmentFragment = { __typename?: 'FindAvailableSSOIDPOutput', id: string, issuer: string, name: string, status: SsoIdentityProviderStatus, workspace: { __typename?: 'WorkspaceNameAndId', id: string, displayName?: string | null } }; +export type AvailableSsoIdentityProvidersFragmentFragment = { __typename?: 'FindAvailableSSOIDP', id: string, issuer: string, name: string, status: SsoIdentityProviderStatus, workspace: { __typename?: 'WorkspaceNameAndId', id: string, displayName?: string | null } }; export type AuthorizeAppMutationVariables = Exact<{ clientId: Scalars['String']; - codeChallenge: Scalars['String']; + codeChallenge?: InputMaybe; redirectUrl: Scalars['String']; }>; -export type AuthorizeAppMutation = { __typename?: 'Mutation', authorizeApp: { __typename?: 'AuthorizeAppOutput', redirectUrl: string } }; +export type AuthorizeAppMutation = { __typename?: 'Mutation', authorizeApp: { __typename?: 'AuthorizeApp', redirectUrl: string } }; export type EmailPasswordResetLinkMutationVariables = Exact<{ email: Scalars['String']; @@ -5586,7 +5752,7 @@ export type EmailPasswordResetLinkMutationVariables = Exact<{ }>; -export type EmailPasswordResetLinkMutation = { __typename?: 'Mutation', emailPasswordResetLink: { __typename?: 'EmailPasswordResetLinkOutput', success: boolean } }; +export type EmailPasswordResetLinkMutation = { __typename?: 'Mutation', emailPasswordResetLink: { __typename?: 'EmailPasswordResetLink', success: boolean } }; export type GenerateApiKeyTokenMutationVariables = Exact<{ apiKeyId: Scalars['UUID']; @@ -5599,7 +5765,7 @@ export type GenerateApiKeyTokenMutation = { __typename?: 'Mutation', generateApi export type GenerateTransientTokenMutationVariables = Exact<{ [key: string]: never; }>; -export type GenerateTransientTokenMutation = { __typename?: 'Mutation', generateTransientToken: { __typename?: 'TransientTokenOutput', transientToken: { __typename?: 'AuthToken', token: string } } }; +export type GenerateTransientTokenMutation = { __typename?: 'Mutation', generateTransientToken: { __typename?: 'TransientToken', transientToken: { __typename?: 'AuthToken', token: string } } }; export type GetAuthTokensFromLoginTokenMutationVariables = Exact<{ loginToken: Scalars['String']; @@ -5624,7 +5790,7 @@ export type GetAuthorizationUrlForSsoMutationVariables = Exact<{ }>; -export type GetAuthorizationUrlForSsoMutation = { __typename?: 'Mutation', getAuthorizationUrlForSSO: { __typename?: 'GetAuthorizationUrlForSSOOutput', id: string, type: string, authorizationURL: string } }; +export type GetAuthorizationUrlForSsoMutation = { __typename?: 'Mutation', getAuthorizationUrlForSSO: { __typename?: 'GetAuthorizationUrlForSSO', id: string, type: string, authorizationURL: string } }; export type GetLoginTokenFromCredentialsMutationVariables = Exact<{ email: Scalars['String']; @@ -5634,7 +5800,7 @@ export type GetLoginTokenFromCredentialsMutationVariables = Exact<{ }>; -export type GetLoginTokenFromCredentialsMutation = { __typename?: 'Mutation', getLoginTokenFromCredentials: { __typename?: 'LoginTokenOutput', loginToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } }; +export type GetLoginTokenFromCredentialsMutation = { __typename?: 'Mutation', getLoginTokenFromCredentials: { __typename?: 'LoginToken', loginToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } }; export type ImpersonateMutationVariables = Exact<{ userId: Scalars['UUID']; @@ -5642,7 +5808,7 @@ export type ImpersonateMutationVariables = Exact<{ }>; -export type ImpersonateMutation = { __typename?: 'Mutation', impersonate: { __typename?: 'ImpersonateOutput', workspace: { __typename?: 'WorkspaceUrlsAndId', id: string, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null } }, loginToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } }; +export type ImpersonateMutation = { __typename?: 'Mutation', impersonate: { __typename?: 'Impersonate', workspace: { __typename?: 'WorkspaceUrlsAndId', id: string, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null } }, loginToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } }; export type InitiateOtpProvisioningMutationVariables = Exact<{ loginToken: Scalars['String']; @@ -5650,12 +5816,12 @@ export type InitiateOtpProvisioningMutationVariables = Exact<{ }>; -export type InitiateOtpProvisioningMutation = { __typename?: 'Mutation', initiateOTPProvisioning: { __typename?: 'InitiateTwoFactorAuthenticationProvisioningOutput', uri: string } }; +export type InitiateOtpProvisioningMutation = { __typename?: 'Mutation', initiateOTPProvisioning: { __typename?: 'InitiateTwoFactorAuthenticationProvisioning', uri: string } }; export type InitiateOtpProvisioningForAuthenticatedUserMutationVariables = Exact<{ [key: string]: never; }>; -export type InitiateOtpProvisioningForAuthenticatedUserMutation = { __typename?: 'Mutation', initiateOTPProvisioningForAuthenticatedUser: { __typename?: 'InitiateTwoFactorAuthenticationProvisioningOutput', uri: string } }; +export type InitiateOtpProvisioningForAuthenticatedUserMutation = { __typename?: 'Mutation', initiateOTPProvisioningForAuthenticatedUser: { __typename?: 'InitiateTwoFactorAuthenticationProvisioning', uri: string } }; export type RenewTokenMutationVariables = Exact<{ appToken: Scalars['String']; @@ -5670,14 +5836,14 @@ export type ResendEmailVerificationTokenMutationVariables = Exact<{ }>; -export type ResendEmailVerificationTokenMutation = { __typename?: 'Mutation', resendEmailVerificationToken: { __typename?: 'ResendEmailVerificationTokenOutput', success: boolean } }; +export type ResendEmailVerificationTokenMutation = { __typename?: 'Mutation', resendEmailVerificationToken: { __typename?: 'ResendEmailVerificationToken', success: boolean } }; export type DeleteTwoFactorAuthenticationMethodMutationVariables = Exact<{ twoFactorAuthenticationMethodId: Scalars['UUID']; }>; -export type DeleteTwoFactorAuthenticationMethodMutation = { __typename?: 'Mutation', deleteTwoFactorAuthenticationMethod: { __typename?: 'DeleteTwoFactorAuthenticationMethodOutput', success: boolean } }; +export type DeleteTwoFactorAuthenticationMethodMutation = { __typename?: 'Mutation', deleteTwoFactorAuthenticationMethod: { __typename?: 'DeleteTwoFactorAuthenticationMethod', success: boolean } }; export type SignInMutationVariables = Exact<{ email: Scalars['String']; @@ -5686,7 +5852,7 @@ export type SignInMutationVariables = Exact<{ }>; -export type SignInMutation = { __typename?: 'Mutation', signIn: { __typename?: 'AvailableWorkspacesAndAccessTokensOutput', availableWorkspaces: { __typename?: 'AvailableWorkspaces', availableWorkspacesForSignIn: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }>, availableWorkspacesForSignUp: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }> }, tokens: { __typename?: 'AuthTokenPair', accessOrWorkspaceAgnosticToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } }; +export type SignInMutation = { __typename?: 'Mutation', signIn: { __typename?: 'AvailableWorkspacesAndAccessTokens', availableWorkspaces: { __typename?: 'AvailableWorkspaces', availableWorkspacesForSignIn: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }>, availableWorkspacesForSignUp: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }> }, tokens: { __typename?: 'AuthTokenPair', accessOrWorkspaceAgnosticToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } }; export type SignUpMutationVariables = Exact<{ email: Scalars['String']; @@ -5697,12 +5863,12 @@ export type SignUpMutationVariables = Exact<{ }>; -export type SignUpMutation = { __typename?: 'Mutation', signUp: { __typename?: 'AvailableWorkspacesAndAccessTokensOutput', availableWorkspaces: { __typename?: 'AvailableWorkspaces', availableWorkspacesForSignIn: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }>, availableWorkspacesForSignUp: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }> }, tokens: { __typename?: 'AuthTokenPair', accessOrWorkspaceAgnosticToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } }; +export type SignUpMutation = { __typename?: 'Mutation', signUp: { __typename?: 'AvailableWorkspacesAndAccessTokens', availableWorkspaces: { __typename?: 'AvailableWorkspaces', availableWorkspacesForSignIn: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }>, availableWorkspacesForSignUp: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }> }, tokens: { __typename?: 'AuthTokenPair', accessOrWorkspaceAgnosticToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } }; export type SignUpInNewWorkspaceMutationVariables = Exact<{ [key: string]: never; }>; -export type SignUpInNewWorkspaceMutation = { __typename?: 'Mutation', signUpInNewWorkspace: { __typename?: 'SignUpOutput', loginToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, workspace: { __typename?: 'WorkspaceUrlsAndId', id: string, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null } } } }; +export type SignUpInNewWorkspaceMutation = { __typename?: 'Mutation', signUpInNewWorkspace: { __typename?: 'SignUp', loginToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, workspace: { __typename?: 'WorkspaceUrlsAndId', id: string, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null } } } }; export type SignUpInWorkspaceMutationVariables = Exact<{ email: Scalars['String']; @@ -5716,7 +5882,7 @@ export type SignUpInWorkspaceMutationVariables = Exact<{ }>; -export type SignUpInWorkspaceMutation = { __typename?: 'Mutation', signUpInWorkspace: { __typename?: 'SignUpOutput', loginToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, workspace: { __typename?: 'WorkspaceUrlsAndId', id: string, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null } } } }; +export type SignUpInWorkspaceMutation = { __typename?: 'Mutation', signUpInWorkspace: { __typename?: 'SignUp', loginToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, workspace: { __typename?: 'WorkspaceUrlsAndId', id: string, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null } } } }; export type UpdatePasswordViaResetTokenMutationVariables = Exact<{ token: Scalars['String']; @@ -5724,7 +5890,7 @@ export type UpdatePasswordViaResetTokenMutationVariables = Exact<{ }>; -export type UpdatePasswordViaResetTokenMutation = { __typename?: 'Mutation', updatePasswordViaResetToken: { __typename?: 'InvalidatePasswordOutput', success: boolean } }; +export type UpdatePasswordViaResetTokenMutation = { __typename?: 'Mutation', updatePasswordViaResetToken: { __typename?: 'InvalidatePassword', success: boolean } }; export type VerifyEmailAndGetLoginTokenMutationVariables = Exact<{ emailVerificationToken: Scalars['String']; @@ -5734,7 +5900,7 @@ export type VerifyEmailAndGetLoginTokenMutationVariables = Exact<{ }>; -export type VerifyEmailAndGetLoginTokenMutation = { __typename?: 'Mutation', verifyEmailAndGetLoginToken: { __typename?: 'VerifyEmailAndGetLoginTokenOutput', loginToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null } } }; +export type VerifyEmailAndGetLoginTokenMutation = { __typename?: 'Mutation', verifyEmailAndGetLoginToken: { __typename?: 'VerifyEmailAndGetLoginToken', loginToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null } } }; export type VerifyEmailAndGetWorkspaceAgnosticTokenMutationVariables = Exact<{ emailVerificationToken: Scalars['String']; @@ -5743,7 +5909,7 @@ export type VerifyEmailAndGetWorkspaceAgnosticTokenMutationVariables = Exact<{ }>; -export type VerifyEmailAndGetWorkspaceAgnosticTokenMutation = { __typename?: 'Mutation', verifyEmailAndGetWorkspaceAgnosticToken: { __typename?: 'AvailableWorkspacesAndAccessTokensOutput', availableWorkspaces: { __typename?: 'AvailableWorkspaces', availableWorkspacesForSignIn: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }>, availableWorkspacesForSignUp: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }> }, tokens: { __typename?: 'AuthTokenPair', accessOrWorkspaceAgnosticToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } }; +export type VerifyEmailAndGetWorkspaceAgnosticTokenMutation = { __typename?: 'Mutation', verifyEmailAndGetWorkspaceAgnosticToken: { __typename?: 'AvailableWorkspacesAndAccessTokens', availableWorkspaces: { __typename?: 'AvailableWorkspaces', availableWorkspacesForSignIn: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }>, availableWorkspacesForSignUp: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }> }, tokens: { __typename?: 'AuthTokenPair', accessOrWorkspaceAgnosticToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } }; export type CheckUserExistsQueryVariables = Exact<{ email: Scalars['String']; @@ -5751,21 +5917,21 @@ export type CheckUserExistsQueryVariables = Exact<{ }>; -export type CheckUserExistsQuery = { __typename?: 'Query', checkUserExists: { __typename?: 'CheckUserExistOutput', exists: boolean, availableWorkspacesCount: number, isEmailVerified: boolean } }; +export type CheckUserExistsQuery = { __typename?: 'Query', checkUserExists: { __typename?: 'CheckUserExist', exists: boolean, availableWorkspacesCount: number, isEmailVerified: boolean } }; export type GetPublicWorkspaceDataByDomainQueryVariables = Exact<{ origin: Scalars['String']; }>; -export type GetPublicWorkspaceDataByDomainQuery = { __typename?: 'Query', getPublicWorkspaceDataByDomain: { __typename?: 'PublicWorkspaceDataOutput', id: string, logo?: string | null, displayName?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, authProviders: { __typename?: 'AuthProviders', google: boolean, magicLink: boolean, password: boolean, microsoft: boolean, sso: Array<{ __typename?: 'SSOIdentityProvider', id: string, name: string, type: IdentityProviderType, status: SsoIdentityProviderStatus, issuer: string }> }, authBypassProviders?: { __typename?: 'AuthBypassProviders', google: boolean, password: boolean, microsoft: boolean } | null } }; +export type GetPublicWorkspaceDataByDomainQuery = { __typename?: 'Query', getPublicWorkspaceDataByDomain: { __typename?: 'PublicWorkspaceData', id: string, logo?: string | null, displayName?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, authProviders: { __typename?: 'AuthProviders', google: boolean, magicLink: boolean, password: boolean, microsoft: boolean, sso: Array<{ __typename?: 'SSOIdentityProvider', id: string, name: string, type: IdentityProviderType, status: SsoIdentityProviderStatus, issuer: string }> }, authBypassProviders?: { __typename?: 'AuthBypassProviders', google: boolean, password: boolean, microsoft: boolean } | null } }; export type ValidatePasswordResetTokenQueryVariables = Exact<{ token: Scalars['String']; }>; -export type ValidatePasswordResetTokenQuery = { __typename?: 'Query', validatePasswordResetToken: { __typename?: 'ValidatePasswordResetTokenOutput', id: string, email: string, hasPassword: boolean } }; +export type ValidatePasswordResetTokenQuery = { __typename?: 'Query', validatePasswordResetToken: { __typename?: 'ValidatePasswordResetToken', id: string, email: string, hasPassword: boolean } }; export type BillingPriceLicensedFragmentFragment = { __typename?: 'BillingPriceLicensed', stripePriceId: string, unitAmount: number, recurringInterval: SubscriptionInterval, priceUsageType: BillingUsageType }; @@ -5778,17 +5944,17 @@ export type BillingSubscriptionSchedulePhaseItemFragmentFragment = { __typename? export type CancelSwitchBillingIntervalMutationVariables = Exact<{ [key: string]: never; }>; -export type CancelSwitchBillingIntervalMutation = { __typename?: 'Mutation', cancelSwitchBillingInterval: { __typename?: 'BillingUpdateOutput', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItemDTO', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } }; +export type CancelSwitchBillingIntervalMutation = { __typename?: 'Mutation', cancelSwitchBillingInterval: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } }; export type CancelSwitchMeteredPriceMutationVariables = Exact<{ [key: string]: never; }>; -export type CancelSwitchMeteredPriceMutation = { __typename?: 'Mutation', cancelSwitchMeteredPrice: { __typename?: 'BillingUpdateOutput', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItemDTO', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } }; +export type CancelSwitchMeteredPriceMutation = { __typename?: 'Mutation', cancelSwitchMeteredPrice: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } }; export type CancelSwitchBillingPlanMutationVariables = Exact<{ [key: string]: never; }>; -export type CancelSwitchBillingPlanMutation = { __typename?: 'Mutation', cancelSwitchBillingPlan: { __typename?: 'BillingUpdateOutput', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItemDTO', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } }; +export type CancelSwitchBillingPlanMutation = { __typename?: 'Mutation', cancelSwitchBillingPlan: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } }; export type CheckoutSessionMutationVariables = Exact<{ recurringInterval: SubscriptionInterval; @@ -5798,46 +5964,46 @@ export type CheckoutSessionMutationVariables = Exact<{ }>; -export type CheckoutSessionMutation = { __typename?: 'Mutation', checkoutSession: { __typename?: 'BillingSessionOutput', url?: string | null } }; +export type CheckoutSessionMutation = { __typename?: 'Mutation', checkoutSession: { __typename?: 'BillingSession', url?: string | null } }; export type EndSubscriptionTrialPeriodMutationVariables = Exact<{ [key: string]: never; }>; -export type EndSubscriptionTrialPeriodMutation = { __typename?: 'Mutation', endSubscriptionTrialPeriod: { __typename?: 'BillingEndTrialPeriodOutput', status?: SubscriptionStatus | null, hasPaymentMethod: boolean, billingPortalUrl?: string | null } }; +export type EndSubscriptionTrialPeriodMutation = { __typename?: 'Mutation', endSubscriptionTrialPeriod: { __typename?: 'BillingEndTrialPeriod', status?: SubscriptionStatus | null, hasPaymentMethod: boolean, billingPortalUrl?: string | null } }; export type SetMeteredSubscriptionPriceMutationVariables = Exact<{ priceId: Scalars['String']; }>; -export type SetMeteredSubscriptionPriceMutation = { __typename?: 'Mutation', setMeteredSubscriptionPrice: { __typename?: 'BillingUpdateOutput', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItemDTO', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } }; +export type SetMeteredSubscriptionPriceMutation = { __typename?: 'Mutation', setMeteredSubscriptionPrice: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } }; export type SwitchBillingPlanMutationVariables = Exact<{ [key: string]: never; }>; -export type SwitchBillingPlanMutation = { __typename?: 'Mutation', switchBillingPlan: { __typename?: 'BillingUpdateOutput', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItemDTO', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } }; +export type SwitchBillingPlanMutation = { __typename?: 'Mutation', switchBillingPlan: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } }; export type SwitchSubscriptionIntervalMutationVariables = Exact<{ [key: string]: never; }>; -export type SwitchSubscriptionIntervalMutation = { __typename?: 'Mutation', switchSubscriptionInterval: { __typename?: 'BillingUpdateOutput', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItemDTO', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } }; +export type SwitchSubscriptionIntervalMutation = { __typename?: 'Mutation', switchSubscriptionInterval: { __typename?: 'BillingUpdate', currentBillingSubscription: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }> } }; export type BillingPortalSessionQueryVariables = Exact<{ returnUrlPath?: InputMaybe; }>; -export type BillingPortalSessionQuery = { __typename?: 'Query', billingPortalSession: { __typename?: 'BillingSessionOutput', url?: string | null } }; +export type BillingPortalSessionQuery = { __typename?: 'Query', billingPortalSession: { __typename?: 'BillingSession', url?: string | null } }; export type GetMeteredProductsUsageQueryVariables = Exact<{ [key: string]: never; }>; -export type GetMeteredProductsUsageQuery = { __typename?: 'Query', getMeteredProductsUsage: Array<{ __typename?: 'BillingMeteredProductUsageOutput', productKey: BillingProductKey, usedCredits: number, grantedCredits: number, rolloverCredits: number, totalGrantedCredits: number, unitPriceCents: number }> }; +export type GetMeteredProductsUsageQuery = { __typename?: 'Query', getMeteredProductsUsage: Array<{ __typename?: 'BillingMeteredProductUsage', productKey: BillingProductKey, usedCredits: number, grantedCredits: number, rolloverCredits: number, totalGrantedCredits: number, unitPriceCents: number }> }; export type ListPlansQueryVariables = Exact<{ [key: string]: never; }>; -export type ListPlansQuery = { __typename?: 'Query', listPlans: Array<{ __typename?: 'BillingPlanOutput', planKey: BillingPlanKey, licensedProducts: Array<{ __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, prices?: Array<{ __typename?: 'BillingPriceLicensed', stripePriceId: string, unitAmount: number, recurringInterval: SubscriptionInterval, priceUsageType: BillingUsageType }> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } }>, meteredProducts: Array<{ __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, prices?: Array<{ __typename?: 'BillingPriceMetered', priceUsageType: BillingUsageType, recurringInterval: SubscriptionInterval, stripePriceId: string, tiers: Array<{ __typename?: 'BillingPriceTier', flatAmount?: number | null, unitAmount?: number | null, upTo?: number | null }> }> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } }> }> }; +export type ListPlansQuery = { __typename?: 'Query', listPlans: Array<{ __typename?: 'BillingPlan', planKey: BillingPlanKey, licensedProducts: Array<{ __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, prices?: Array<{ __typename?: 'BillingPriceLicensed', stripePriceId: string, unitAmount: number, recurringInterval: SubscriptionInterval, priceUsageType: BillingUsageType }> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } }>, meteredProducts: Array<{ __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, prices?: Array<{ __typename?: 'BillingPriceMetered', priceUsageType: BillingUsageType, recurringInterval: SubscriptionInterval, stripePriceId: string, tiers: Array<{ __typename?: 'BillingPriceTier', flatAmount?: number | null, unitAmount?: number | null, upTo?: number | null }> }> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } }> }> }; export type CommandMenuItemFieldsFragment = { __typename?: 'CommandMenuItem', id: string, workflowVersionId?: string | null, frontComponentId?: string | null, label: string, icon?: string | null, isPinned: boolean, availabilityType: CommandMenuItemAvailabilityType, availabilityObjectMetadataId?: string | null, frontComponent?: { __typename?: 'FrontComponent', id: string, name: string, isHeadless: boolean } | null }; @@ -6105,21 +6271,21 @@ export type BarChartDataQueryVariables = Exact<{ }>; -export type BarChartDataQuery = { __typename?: 'Query', barChartData: { __typename?: 'BarChartDataOutput', data: Array, indexBy: string, keys: Array, xAxisLabel: string, yAxisLabel: string, showLegend: boolean, showDataLabels: boolean, layout: BarChartLayout, groupMode: BarChartGroupMode, hasTooManyGroups: boolean, formattedToRawLookup: any, series: Array<{ __typename?: 'BarChartSeries', key: string, label: string }> } }; +export type BarChartDataQuery = { __typename?: 'Query', barChartData: { __typename?: 'BarChartData', data: Array, indexBy: string, keys: Array, xAxisLabel: string, yAxisLabel: string, showLegend: boolean, showDataLabels: boolean, layout: BarChartLayout, groupMode: BarChartGroupMode, hasTooManyGroups: boolean, formattedToRawLookup: any, series: Array<{ __typename?: 'BarChartSeries', key: string, label: string }> } }; export type LineChartDataQueryVariables = Exact<{ input: LineChartDataInput; }>; -export type LineChartDataQuery = { __typename?: 'Query', lineChartData: { __typename?: 'LineChartDataOutput', xAxisLabel: string, yAxisLabel: string, showLegend: boolean, showDataLabels: boolean, hasTooManyGroups: boolean, formattedToRawLookup: any, series: Array<{ __typename?: 'LineChartSeries', id: string, label: string, data: Array<{ __typename?: 'LineChartDataPoint', x: string, y: number }> }> } }; +export type LineChartDataQuery = { __typename?: 'Query', lineChartData: { __typename?: 'LineChartData', xAxisLabel: string, yAxisLabel: string, showLegend: boolean, showDataLabels: boolean, hasTooManyGroups: boolean, formattedToRawLookup: any, series: Array<{ __typename?: 'LineChartSeries', id: string, label: string, data: Array<{ __typename?: 'LineChartDataPoint', x: string, y: number }> }> } }; export type PieChartDataQueryVariables = Exact<{ input: PieChartDataInput; }>; -export type PieChartDataQuery = { __typename?: 'Query', pieChartData: { __typename?: 'PieChartDataOutput', showLegend: boolean, showDataLabels: boolean, showCenterMetric: boolean, hasTooManyGroups: boolean, formattedToRawLookup: any, data: Array<{ __typename?: 'PieChartDataItem', id: string, value: number }> } }; +export type PieChartDataQuery = { __typename?: 'Query', pieChartData: { __typename?: 'PieChartData', showLegend: boolean, showDataLabels: boolean, showCenterMetric: boolean, hasTooManyGroups: boolean, formattedToRawLookup: any, data: Array<{ __typename?: 'PieChartDataItem', id: string, value: number }> } }; export type SaveImapSmtpCaldavAccountMutationVariables = Exact<{ accountOwnerId: Scalars['UUID']; @@ -6156,7 +6322,7 @@ export type SetAdminAiModelEnabledMutation = { __typename?: 'Mutation', setAdmin export type GetAdminAiModelsQueryVariables = Exact<{ [key: string]: never; }>; -export type GetAdminAiModelsQuery = { __typename?: 'Query', getAdminAiModels: { __typename?: 'AdminAIModelsOutput', autoEnableNewModels: boolean, models: Array<{ __typename?: 'AdminAIModelConfig', modelId: string, label: string, modelFamily?: ModelFamily | null, inferenceProvider: InferenceProvider, isAvailable: boolean, isAdminEnabled: boolean, deprecated?: boolean | null, isRecommended?: boolean | null }> } }; +export type GetAdminAiModelsQuery = { __typename?: 'Query', getAdminAiModels: { __typename?: 'AdminAIModels', autoEnableNewModels: boolean, models: Array<{ __typename?: 'AdminAIModelConfig', modelId: string, label: string, modelFamily?: ModelFamily | null, inferenceProvider: InferenceProvider, isAvailable: boolean, isAdminEnabled: boolean, deprecated?: boolean | null, isRecommended?: boolean | null }> } }; export type CreateDatabaseConfigVariableMutationVariables = Exact<{ key: Scalars['String']; @@ -6184,7 +6350,7 @@ export type UpdateDatabaseConfigVariableMutation = { __typename?: 'Mutation', up export type GetConfigVariablesGroupedQueryVariables = Exact<{ [key: string]: never; }>; -export type GetConfigVariablesGroupedQuery = { __typename?: 'Query', getConfigVariablesGrouped: { __typename?: 'ConfigVariablesOutput', groups: Array<{ __typename?: 'ConfigVariablesGroupData', name: ConfigVariablesGroup, description: string, isHiddenOnLoad: boolean, variables: Array<{ __typename?: 'ConfigVariable', name: string, description: string, value?: any | null, isSensitive: boolean, isEnvOnly: boolean, type: ConfigVariableType, options?: any | null, source: ConfigSource }> }> } }; +export type GetConfigVariablesGroupedQuery = { __typename?: 'Query', getConfigVariablesGrouped: { __typename?: 'ConfigVariables', groups: Array<{ __typename?: 'ConfigVariablesGroupData', name: ConfigVariablesGroup, description: string, isHiddenOnLoad: boolean, variables: Array<{ __typename?: 'ConfigVariable', name: string, description: string, value?: any | null, isSensitive: boolean, isEnvOnly: boolean, type: ConfigVariableType, options?: any | null, source: ConfigSource }> }> } }; export type GetDatabaseConfigVariableQueryVariables = Exact<{ key: Scalars['String']; @@ -6260,6 +6426,69 @@ export type GetSystemHealthStatusQueryVariables = Exact<{ [key: string]: never; export type GetSystemHealthStatusQuery = { __typename?: 'Query', getSystemHealthStatus: { __typename?: 'SystemHealth', services: Array<{ __typename?: 'SystemHealthService', id: HealthIndicatorId, label: string, status: AdminPanelHealthServiceStatus }> } }; +export type ApplicationRegistrationFragmentFragment = { __typename?: 'ApplicationRegistration', id: string, universalIdentifier: string, name: string, description?: string | null, logoUrl?: string | null, author?: string | null, oAuthClientId: string, oAuthRedirectUris: Array, oAuthScopes: Array, websiteUrl?: string | null, termsUrl?: string | null, createdAt: string, updatedAt: string }; + +export type DeleteApplicationRegistrationMutationVariables = Exact<{ + id: Scalars['String']; +}>; + + +export type DeleteApplicationRegistrationMutation = { __typename?: 'Mutation', deleteApplicationRegistration: boolean }; + +export type RotateApplicationRegistrationClientSecretMutationVariables = Exact<{ + id: Scalars['String']; +}>; + + +export type RotateApplicationRegistrationClientSecretMutation = { __typename?: 'Mutation', rotateApplicationRegistrationClientSecret: { __typename?: 'RotateClientSecret', clientSecret: string } }; + +export type UpdateApplicationRegistrationMutationVariables = Exact<{ + input: UpdateApplicationRegistrationInput; +}>; + + +export type UpdateApplicationRegistrationMutation = { __typename?: 'Mutation', updateApplicationRegistration: { __typename?: 'ApplicationRegistration', id: string, universalIdentifier: string, name: string, description?: string | null, logoUrl?: string | null, author?: string | null, oAuthClientId: string, oAuthRedirectUris: Array, oAuthScopes: Array, websiteUrl?: string | null, termsUrl?: string | null, createdAt: string, updatedAt: string } }; + +export type UpdateApplicationRegistrationVariableMutationVariables = Exact<{ + input: UpdateApplicationRegistrationVariableInput; +}>; + + +export type UpdateApplicationRegistrationVariableMutation = { __typename?: 'Mutation', updateApplicationRegistrationVariable: { __typename?: 'ApplicationRegistrationVariable', id: string, key: string, description: string, isSecret: boolean, isRequired: boolean, isFilled: boolean, createdAt: string, updatedAt: string } }; + +export type FindApplicationRegistrationByClientIdQueryVariables = Exact<{ + clientId: Scalars['String']; +}>; + + +export type FindApplicationRegistrationByClientIdQuery = { __typename?: 'Query', findApplicationRegistrationByClientId?: { __typename?: 'ApplicationRegistration', id: string, name: string, oAuthScopes: Array, websiteUrl?: string | null, logoUrl?: string | null } | null }; + +export type FindApplicationRegistrationStatsQueryVariables = Exact<{ + id: Scalars['String']; +}>; + + +export type FindApplicationRegistrationStatsQuery = { __typename?: 'Query', findApplicationRegistrationStats: { __typename?: 'ApplicationRegistrationStats', activeInstalls: number, mostInstalledVersion?: string | null, versionDistribution: Array<{ __typename?: 'VersionDistributionEntry', version: string, count: number }> } }; + +export type FindApplicationRegistrationVariablesQueryVariables = Exact<{ + applicationRegistrationId: Scalars['String']; +}>; + + +export type FindApplicationRegistrationVariablesQuery = { __typename?: 'Query', findApplicationRegistrationVariables: Array<{ __typename?: 'ApplicationRegistrationVariable', id: string, key: string, description: string, isSecret: boolean, isRequired: boolean, isFilled: boolean, createdAt: string, updatedAt: string }> }; + +export type FindManyApplicationRegistrationsQueryVariables = Exact<{ [key: string]: never; }>; + + +export type FindManyApplicationRegistrationsQuery = { __typename?: 'Query', findManyApplicationRegistrations: Array<{ __typename?: 'ApplicationRegistration', id: string, universalIdentifier: string, name: string, description?: string | null, logoUrl?: string | null, author?: string | null, oAuthClientId: string, oAuthRedirectUris: Array, oAuthScopes: Array, websiteUrl?: string | null, termsUrl?: string | null, createdAt: string, updatedAt: string }> }; + +export type FindOneApplicationRegistrationQueryVariables = Exact<{ + id: Scalars['String']; +}>; + + +export type FindOneApplicationRegistrationQuery = { __typename?: 'Query', findOneApplicationRegistration: { __typename?: 'ApplicationRegistration', id: string, universalIdentifier: string, name: string, description?: string | null, logoUrl?: string | null, author?: string | null, oAuthClientId: string, oAuthRedirectUris: Array, oAuthScopes: Array, websiteUrl?: string | null, termsUrl?: string | null, createdAt: string, updatedAt: string } }; + export type UninstallApplicationMutationVariables = Exact<{ universalIdentifier: Scalars['String']; }>; @@ -6403,7 +6632,7 @@ export type UpdateLabPublicFeatureFlagMutationVariables = Exact<{ }>; -export type UpdateLabPublicFeatureFlagMutation = { __typename?: 'Mutation', updateLabPublicFeatureFlag: { __typename?: 'FeatureFlagDTO', key: FeatureFlagKey, value: boolean } }; +export type UpdateLabPublicFeatureFlagMutation = { __typename?: 'Mutation', updateLabPublicFeatureFlag: { __typename?: 'FeatureFlag', key: FeatureFlagKey, value: boolean } }; export type UploadWorkspaceMemberProfilePictureMutationVariables = Exact<{ file: Scalars['Upload']; @@ -6515,14 +6744,14 @@ export type CreateOidcIdentityProviderMutationVariables = Exact<{ }>; -export type CreateOidcIdentityProviderMutation = { __typename?: 'Mutation', createOIDCIdentityProvider: { __typename?: 'SetupSsoOutput', id: string, type: IdentityProviderType, issuer: string, name: string, status: SsoIdentityProviderStatus } }; +export type CreateOidcIdentityProviderMutation = { __typename?: 'Mutation', createOIDCIdentityProvider: { __typename?: 'SetupSso', id: string, type: IdentityProviderType, issuer: string, name: string, status: SsoIdentityProviderStatus } }; export type CreateSamlIdentityProviderMutationVariables = Exact<{ input: SetupSamlSsoInput; }>; -export type CreateSamlIdentityProviderMutation = { __typename?: 'Mutation', createSAMLIdentityProvider: { __typename?: 'SetupSsoOutput', id: string, type: IdentityProviderType, issuer: string, name: string, status: SsoIdentityProviderStatus } }; +export type CreateSamlIdentityProviderMutation = { __typename?: 'Mutation', createSAMLIdentityProvider: { __typename?: 'SetupSso', id: string, type: IdentityProviderType, issuer: string, name: string, status: SsoIdentityProviderStatus } }; export type DeleteApprovedAccessDomainMutationVariables = Exact<{ input: DeleteApprovedAccessDomainInput; @@ -6536,14 +6765,14 @@ export type DeleteSsoIdentityProviderMutationVariables = Exact<{ }>; -export type DeleteSsoIdentityProviderMutation = { __typename?: 'Mutation', deleteSSOIdentityProvider: { __typename?: 'DeleteSsoOutput', identityProviderId: string } }; +export type DeleteSsoIdentityProviderMutation = { __typename?: 'Mutation', deleteSSOIdentityProvider: { __typename?: 'DeleteSso', identityProviderId: string } }; export type EditSsoIdentityProviderMutationVariables = Exact<{ input: EditSsoInput; }>; -export type EditSsoIdentityProviderMutation = { __typename?: 'Mutation', editSSOIdentityProvider: { __typename?: 'EditSsoOutput', id: string, type: IdentityProviderType, issuer: string, name: string, status: SsoIdentityProviderStatus } }; +export type EditSsoIdentityProviderMutation = { __typename?: 'Mutation', editSSOIdentityProvider: { __typename?: 'EditSso', id: string, type: IdentityProviderType, issuer: string, name: string, status: SsoIdentityProviderStatus } }; export type ValidateApprovedAccessDomainMutationVariables = Exact<{ input: ValidateApprovedAccessDomainInput; @@ -6560,20 +6789,20 @@ export type GetApprovedAccessDomainsQuery = { __typename?: 'Query', getApprovedA export type GetSsoIdentityProvidersQueryVariables = Exact<{ [key: string]: never; }>; -export type GetSsoIdentityProvidersQuery = { __typename?: 'Query', getSSOIdentityProviders: Array<{ __typename?: 'FindAvailableSSOIDPOutput', type: IdentityProviderType, id: string, name: string, issuer: string, status: SsoIdentityProviderStatus }> }; +export type GetSsoIdentityProvidersQuery = { __typename?: 'Query', getSSOIdentityProviders: Array<{ __typename?: 'FindAvailableSSOIDP', type: IdentityProviderType, id: string, name: string, issuer: string, status: SsoIdentityProviderStatus }> }; export type VerifyTwoFactorAuthenticationMethodForAuthenticatedUserMutationVariables = Exact<{ otp: Scalars['String']; }>; -export type VerifyTwoFactorAuthenticationMethodForAuthenticatedUserMutation = { __typename?: 'Mutation', verifyTwoFactorAuthenticationMethodForAuthenticatedUser: { __typename?: 'VerifyTwoFactorAuthenticationMethodOutput', success: boolean } }; +export type VerifyTwoFactorAuthenticationMethodForAuthenticatedUserMutation = { __typename?: 'Mutation', verifyTwoFactorAuthenticationMethodForAuthenticatedUser: { __typename?: 'VerifyTwoFactorAuthenticationMethod', success: boolean } }; export type BillingSubscriptionFragmentFragment = { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }; -export type CurrentBillingSubscriptionFragmentFragment = { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItemDTO', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }; +export type CurrentBillingSubscriptionFragmentFragment = { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null }; -export type UserQueryFragmentFragment = { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, hasPassword: boolean, canAccessFullAdminPanel: boolean, canImpersonate: boolean, supportUserHash?: string | null, onboardingStatus?: OnboardingStatus | null, userVars?: any | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, colorScheme: string, avatarUrl?: string | null, locale?: string | null, userEmail: string, userWorkspaceId?: string | null, timeZone?: string | null, dateFormat?: WorkspaceMemberDateFormatEnum | null, timeFormat?: WorkspaceMemberTimeFormatEnum | null, calendarStartDay?: number | null, numberFormat?: WorkspaceMemberNumberFormatEnum | null, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, workspaceMembers?: Array<{ __typename?: 'WorkspaceMember', id: string, avatarUrl?: string | null, userEmail: string, userWorkspaceId?: string | null, name: { __typename?: 'FullName', firstName: string, lastName: string } }> | null, deletedWorkspaceMembers?: Array<{ __typename?: 'DeletedWorkspaceMember', id: string, avatarUrl?: string | null, userEmail: string, name: { __typename?: 'FullName', firstName: string, lastName: string } }> | null, currentUserWorkspace?: { __typename?: 'UserWorkspace', id: string, permissionFlags?: Array | null, objectsPermissions?: Array<{ __typename?: 'ObjectPermission', objectMetadataId: string, canReadObjectRecords?: boolean | null, canUpdateObjectRecords?: boolean | null, canSoftDeleteObjectRecords?: boolean | null, canDestroyObjectRecords?: boolean | null, restrictedFields?: any | null, rowLevelPermissionPredicates?: Array<{ __typename?: 'RowLevelPermissionPredicate', id: string, fieldMetadataId: string, objectMetadataId: string, operand: RowLevelPermissionPredicateOperand, subFieldName?: string | null, workspaceMemberFieldMetadataId?: string | null, workspaceMemberSubFieldName?: string | null, rowLevelPermissionPredicateGroupId?: string | null, positionInRowLevelPermissionPredicateGroup?: number | null, roleId: string, value?: any | null }> | null, rowLevelPermissionPredicateGroups?: Array<{ __typename?: 'RowLevelPermissionPredicateGroup', id: string, parentRowLevelPermissionPredicateGroupId?: string | null, logicalOperator: RowLevelPermissionPredicateGroupLogicalOperator, positionInRowLevelPermissionPredicateGroup?: number | null, roleId: string, objectMetadataId: string }> | null }> | null, twoFactorAuthenticationMethodSummary?: Array<{ __typename?: 'TwoFactorAuthenticationMethodDTO', twoFactorAuthenticationMethodId: string, status: string, strategy: string }> | null } | null, currentWorkspace?: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, inviteHash?: string | null, allowImpersonation: boolean, activationStatus: WorkspaceActivationStatus, isPublicInviteLinkEnabled: boolean, isGoogleAuthEnabled: boolean, isMicrosoftAuthEnabled: boolean, isPasswordAuthEnabled: boolean, isGoogleAuthBypassEnabled: boolean, isMicrosoftAuthBypassEnabled: boolean, isPasswordAuthBypassEnabled: boolean, subdomain: string, customDomain?: string | null, hasValidEnterpriseKey: boolean, isCustomDomainEnabled: boolean, metadataVersion: number, workspaceMembersCount?: number | null, fastModel: string, smartModel: string, aiAdditionalInstructions?: string | null, autoEnableNewAiModels: boolean, disabledAiModelIds?: Array | null, enabledAiModelIds?: Array | null, useRecommendedModels: boolean, isTwoFactorAuthenticationEnforced: boolean, trashRetentionDays: number, eventLogRetentionDays: number, editableProfileFields?: Array | null, workspaceCustomApplication?: { __typename?: 'Application', id: string } | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, featureFlags?: Array<{ __typename?: 'FeatureFlagDTO', key: FeatureFlagKey, value: boolean }> | null, currentBillingSubscription?: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItemDTO', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null } | null, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }>, billingEntitlements: Array<{ __typename?: 'BillingEntitlement', key: BillingEntitlementKey, value: boolean }>, defaultRole?: { __typename?: 'Role', id: string, label: string, description?: string | null, icon?: string | null, canUpdateAllSettings: boolean, canAccessAllTools: boolean, isEditable: boolean, canReadAllObjectRecords: boolean, canUpdateAllObjectRecords: boolean, canSoftDeleteAllObjectRecords: boolean, canDestroyAllObjectRecords: boolean, canBeAssignedToUsers: boolean, canBeAssignedToAgents: boolean, canBeAssignedToApiKeys: boolean } | null } | null, availableWorkspaces: { __typename?: 'AvailableWorkspaces', availableWorkspacesForSignIn: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }>, availableWorkspacesForSignUp: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }> } }; +export type UserQueryFragmentFragment = { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, hasPassword: boolean, canAccessFullAdminPanel: boolean, canImpersonate: boolean, supportUserHash?: string | null, onboardingStatus?: OnboardingStatus | null, userVars?: any | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, colorScheme: string, avatarUrl?: string | null, locale?: string | null, userEmail: string, userWorkspaceId?: string | null, timeZone?: string | null, dateFormat?: WorkspaceMemberDateFormatEnum | null, timeFormat?: WorkspaceMemberTimeFormatEnum | null, calendarStartDay?: number | null, numberFormat?: WorkspaceMemberNumberFormatEnum | null, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, workspaceMembers?: Array<{ __typename?: 'WorkspaceMember', id: string, avatarUrl?: string | null, userEmail: string, userWorkspaceId?: string | null, name: { __typename?: 'FullName', firstName: string, lastName: string } }> | null, deletedWorkspaceMembers?: Array<{ __typename?: 'DeletedWorkspaceMember', id: string, avatarUrl?: string | null, userEmail: string, name: { __typename?: 'FullName', firstName: string, lastName: string } }> | null, currentUserWorkspace?: { __typename?: 'UserWorkspace', id: string, permissionFlags?: Array | null, objectsPermissions?: Array<{ __typename?: 'ObjectPermission', objectMetadataId: string, canReadObjectRecords?: boolean | null, canUpdateObjectRecords?: boolean | null, canSoftDeleteObjectRecords?: boolean | null, canDestroyObjectRecords?: boolean | null, restrictedFields?: any | null, rowLevelPermissionPredicates?: Array<{ __typename?: 'RowLevelPermissionPredicate', id: string, fieldMetadataId: string, objectMetadataId: string, operand: RowLevelPermissionPredicateOperand, subFieldName?: string | null, workspaceMemberFieldMetadataId?: string | null, workspaceMemberSubFieldName?: string | null, rowLevelPermissionPredicateGroupId?: string | null, positionInRowLevelPermissionPredicateGroup?: number | null, roleId: string, value?: any | null }> | null, rowLevelPermissionPredicateGroups?: Array<{ __typename?: 'RowLevelPermissionPredicateGroup', id: string, parentRowLevelPermissionPredicateGroupId?: string | null, logicalOperator: RowLevelPermissionPredicateGroupLogicalOperator, positionInRowLevelPermissionPredicateGroup?: number | null, roleId: string, objectMetadataId: string }> | null }> | null, twoFactorAuthenticationMethodSummary?: Array<{ __typename?: 'TwoFactorAuthenticationMethodSummary', twoFactorAuthenticationMethodId: string, status: string, strategy: string }> | null } | null, currentWorkspace?: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, inviteHash?: string | null, allowImpersonation: boolean, activationStatus: WorkspaceActivationStatus, isPublicInviteLinkEnabled: boolean, isGoogleAuthEnabled: boolean, isMicrosoftAuthEnabled: boolean, isPasswordAuthEnabled: boolean, isGoogleAuthBypassEnabled: boolean, isMicrosoftAuthBypassEnabled: boolean, isPasswordAuthBypassEnabled: boolean, subdomain: string, customDomain?: string | null, hasValidEnterpriseKey: boolean, isCustomDomainEnabled: boolean, metadataVersion: number, workspaceMembersCount?: number | null, fastModel: string, smartModel: string, aiAdditionalInstructions?: string | null, autoEnableNewAiModels: boolean, disabledAiModelIds?: Array | null, enabledAiModelIds?: Array | null, useRecommendedModels: boolean, isTwoFactorAuthenticationEnforced: boolean, trashRetentionDays: number, eventLogRetentionDays: number, editableProfileFields?: Array | null, workspaceCustomApplication?: { __typename?: 'Application', id: string } | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, featureFlags?: Array<{ __typename?: 'FeatureFlag', key: FeatureFlagKey, value: boolean }> | null, currentBillingSubscription?: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null } | null, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }>, billingEntitlements: Array<{ __typename?: 'BillingEntitlement', key: BillingEntitlementKey, value: boolean }>, defaultRole?: { __typename?: 'Role', id: string, label: string, description?: string | null, icon?: string | null, canUpdateAllSettings: boolean, canAccessAllTools: boolean, isEditable: boolean, canReadAllObjectRecords: boolean, canUpdateAllObjectRecords: boolean, canSoftDeleteAllObjectRecords: boolean, canDestroyAllObjectRecords: boolean, canBeAssignedToUsers: boolean, canBeAssignedToAgents: boolean, canBeAssignedToApiKeys: boolean } | null } | null, availableWorkspaces: { __typename?: 'AvailableWorkspaces', availableWorkspacesForSignIn: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }>, availableWorkspacesForSignUp: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }> } }; export type WorkspaceUrlsFragmentFragment = { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }; @@ -6592,7 +6821,7 @@ export type DeleteUserWorkspaceMutation = { __typename?: 'Mutation', deleteUserF export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never; }>; -export type GetCurrentUserQuery = { __typename?: 'Query', currentUser: { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, hasPassword: boolean, canAccessFullAdminPanel: boolean, canImpersonate: boolean, supportUserHash?: string | null, onboardingStatus?: OnboardingStatus | null, userVars?: any | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, colorScheme: string, avatarUrl?: string | null, locale?: string | null, userEmail: string, userWorkspaceId?: string | null, timeZone?: string | null, dateFormat?: WorkspaceMemberDateFormatEnum | null, timeFormat?: WorkspaceMemberTimeFormatEnum | null, calendarStartDay?: number | null, numberFormat?: WorkspaceMemberNumberFormatEnum | null, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, workspaceMembers?: Array<{ __typename?: 'WorkspaceMember', id: string, avatarUrl?: string | null, userEmail: string, userWorkspaceId?: string | null, name: { __typename?: 'FullName', firstName: string, lastName: string } }> | null, deletedWorkspaceMembers?: Array<{ __typename?: 'DeletedWorkspaceMember', id: string, avatarUrl?: string | null, userEmail: string, name: { __typename?: 'FullName', firstName: string, lastName: string } }> | null, currentUserWorkspace?: { __typename?: 'UserWorkspace', id: string, permissionFlags?: Array | null, objectsPermissions?: Array<{ __typename?: 'ObjectPermission', objectMetadataId: string, canReadObjectRecords?: boolean | null, canUpdateObjectRecords?: boolean | null, canSoftDeleteObjectRecords?: boolean | null, canDestroyObjectRecords?: boolean | null, restrictedFields?: any | null, rowLevelPermissionPredicates?: Array<{ __typename?: 'RowLevelPermissionPredicate', id: string, fieldMetadataId: string, objectMetadataId: string, operand: RowLevelPermissionPredicateOperand, subFieldName?: string | null, workspaceMemberFieldMetadataId?: string | null, workspaceMemberSubFieldName?: string | null, rowLevelPermissionPredicateGroupId?: string | null, positionInRowLevelPermissionPredicateGroup?: number | null, roleId: string, value?: any | null }> | null, rowLevelPermissionPredicateGroups?: Array<{ __typename?: 'RowLevelPermissionPredicateGroup', id: string, parentRowLevelPermissionPredicateGroupId?: string | null, logicalOperator: RowLevelPermissionPredicateGroupLogicalOperator, positionInRowLevelPermissionPredicateGroup?: number | null, roleId: string, objectMetadataId: string }> | null }> | null, twoFactorAuthenticationMethodSummary?: Array<{ __typename?: 'TwoFactorAuthenticationMethodDTO', twoFactorAuthenticationMethodId: string, status: string, strategy: string }> | null } | null, currentWorkspace?: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, inviteHash?: string | null, allowImpersonation: boolean, activationStatus: WorkspaceActivationStatus, isPublicInviteLinkEnabled: boolean, isGoogleAuthEnabled: boolean, isMicrosoftAuthEnabled: boolean, isPasswordAuthEnabled: boolean, isGoogleAuthBypassEnabled: boolean, isMicrosoftAuthBypassEnabled: boolean, isPasswordAuthBypassEnabled: boolean, subdomain: string, customDomain?: string | null, hasValidEnterpriseKey: boolean, isCustomDomainEnabled: boolean, metadataVersion: number, workspaceMembersCount?: number | null, fastModel: string, smartModel: string, aiAdditionalInstructions?: string | null, autoEnableNewAiModels: boolean, disabledAiModelIds?: Array | null, enabledAiModelIds?: Array | null, useRecommendedModels: boolean, isTwoFactorAuthenticationEnforced: boolean, trashRetentionDays: number, eventLogRetentionDays: number, editableProfileFields?: Array | null, workspaceCustomApplication?: { __typename?: 'Application', id: string } | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, featureFlags?: Array<{ __typename?: 'FeatureFlagDTO', key: FeatureFlagKey, value: boolean }> | null, currentBillingSubscription?: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItemDTO', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null } | null, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }>, billingEntitlements: Array<{ __typename?: 'BillingEntitlement', key: BillingEntitlementKey, value: boolean }>, defaultRole?: { __typename?: 'Role', id: string, label: string, description?: string | null, icon?: string | null, canUpdateAllSettings: boolean, canAccessAllTools: boolean, isEditable: boolean, canReadAllObjectRecords: boolean, canUpdateAllObjectRecords: boolean, canSoftDeleteAllObjectRecords: boolean, canDestroyAllObjectRecords: boolean, canBeAssignedToUsers: boolean, canBeAssignedToAgents: boolean, canBeAssignedToApiKeys: boolean } | null } | null, availableWorkspaces: { __typename?: 'AvailableWorkspaces', availableWorkspacesForSignIn: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }>, availableWorkspacesForSignUp: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }> } } }; +export type GetCurrentUserQuery = { __typename?: 'Query', currentUser: { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, hasPassword: boolean, canAccessFullAdminPanel: boolean, canImpersonate: boolean, supportUserHash?: string | null, onboardingStatus?: OnboardingStatus | null, userVars?: any | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, colorScheme: string, avatarUrl?: string | null, locale?: string | null, userEmail: string, userWorkspaceId?: string | null, timeZone?: string | null, dateFormat?: WorkspaceMemberDateFormatEnum | null, timeFormat?: WorkspaceMemberTimeFormatEnum | null, calendarStartDay?: number | null, numberFormat?: WorkspaceMemberNumberFormatEnum | null, name: { __typename?: 'FullName', firstName: string, lastName: string } } | null, workspaceMembers?: Array<{ __typename?: 'WorkspaceMember', id: string, avatarUrl?: string | null, userEmail: string, userWorkspaceId?: string | null, name: { __typename?: 'FullName', firstName: string, lastName: string } }> | null, deletedWorkspaceMembers?: Array<{ __typename?: 'DeletedWorkspaceMember', id: string, avatarUrl?: string | null, userEmail: string, name: { __typename?: 'FullName', firstName: string, lastName: string } }> | null, currentUserWorkspace?: { __typename?: 'UserWorkspace', id: string, permissionFlags?: Array | null, objectsPermissions?: Array<{ __typename?: 'ObjectPermission', objectMetadataId: string, canReadObjectRecords?: boolean | null, canUpdateObjectRecords?: boolean | null, canSoftDeleteObjectRecords?: boolean | null, canDestroyObjectRecords?: boolean | null, restrictedFields?: any | null, rowLevelPermissionPredicates?: Array<{ __typename?: 'RowLevelPermissionPredicate', id: string, fieldMetadataId: string, objectMetadataId: string, operand: RowLevelPermissionPredicateOperand, subFieldName?: string | null, workspaceMemberFieldMetadataId?: string | null, workspaceMemberSubFieldName?: string | null, rowLevelPermissionPredicateGroupId?: string | null, positionInRowLevelPermissionPredicateGroup?: number | null, roleId: string, value?: any | null }> | null, rowLevelPermissionPredicateGroups?: Array<{ __typename?: 'RowLevelPermissionPredicateGroup', id: string, parentRowLevelPermissionPredicateGroupId?: string | null, logicalOperator: RowLevelPermissionPredicateGroupLogicalOperator, positionInRowLevelPermissionPredicateGroup?: number | null, roleId: string, objectMetadataId: string }> | null }> | null, twoFactorAuthenticationMethodSummary?: Array<{ __typename?: 'TwoFactorAuthenticationMethodSummary', twoFactorAuthenticationMethodId: string, status: string, strategy: string }> | null } | null, currentWorkspace?: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, inviteHash?: string | null, allowImpersonation: boolean, activationStatus: WorkspaceActivationStatus, isPublicInviteLinkEnabled: boolean, isGoogleAuthEnabled: boolean, isMicrosoftAuthEnabled: boolean, isPasswordAuthEnabled: boolean, isGoogleAuthBypassEnabled: boolean, isMicrosoftAuthBypassEnabled: boolean, isPasswordAuthBypassEnabled: boolean, subdomain: string, customDomain?: string | null, hasValidEnterpriseKey: boolean, isCustomDomainEnabled: boolean, metadataVersion: number, workspaceMembersCount?: number | null, fastModel: string, smartModel: string, aiAdditionalInstructions?: string | null, autoEnableNewAiModels: boolean, disabledAiModelIds?: Array | null, enabledAiModelIds?: Array | null, useRecommendedModels: boolean, isTwoFactorAuthenticationEnforced: boolean, trashRetentionDays: number, eventLogRetentionDays: number, editableProfileFields?: Array | null, workspaceCustomApplication?: { __typename?: 'Application', id: string } | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, featureFlags?: Array<{ __typename?: 'FeatureFlag', key: FeatureFlagKey, value: boolean }> | null, currentBillingSubscription?: { __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, interval?: SubscriptionInterval | null, metadata: any, currentPeriodEnd?: string | null, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }>, billingSubscriptionItems?: Array<{ __typename?: 'BillingSubscriptionItem', id: string, hasReachedCurrentPeriodCap: boolean, quantity?: number | null, stripePriceId: string, billingProduct: { __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } | { __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } } }> | null } | null, billingSubscriptions: Array<{ __typename?: 'BillingSubscription', id: string, status: SubscriptionStatus, metadata: any, phases: Array<{ __typename?: 'BillingSubscriptionSchedulePhase', start_date: number, end_date: number, items: Array<{ __typename?: 'BillingSubscriptionSchedulePhaseItem', price: string, quantity?: number | null }> }> }>, billingEntitlements: Array<{ __typename?: 'BillingEntitlement', key: BillingEntitlementKey, value: boolean }>, defaultRole?: { __typename?: 'Role', id: string, label: string, description?: string | null, icon?: string | null, canUpdateAllSettings: boolean, canAccessAllTools: boolean, isEditable: boolean, canReadAllObjectRecords: boolean, canUpdateAllObjectRecords: boolean, canSoftDeleteAllObjectRecords: boolean, canDestroyAllObjectRecords: boolean, canBeAssignedToUsers: boolean, canBeAssignedToAgents: boolean, canBeAssignedToApiKeys: boolean } | null } | null, availableWorkspaces: { __typename?: 'AvailableWorkspaces', availableWorkspacesForSignIn: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }>, availableWorkspacesForSignUp: Array<{ __typename?: 'AvailableWorkspace', id: string, displayName?: string | null, loginToken?: string | null, inviteHash?: string | null, personalInviteToken?: string | null, logo?: string | null, workspaceUrls: { __typename?: 'WorkspaceUrls', subdomainUrl: string, customUrl?: string | null }, sso: Array<{ __typename?: 'SSOConnection', type: IdentityProviderType, id: string, issuer: string, name: string, status: SsoIdentityProviderStatus }> }> } } }; export type ViewFieldFragmentFragment = { __typename?: 'CoreViewField', id: string, fieldMetadataId: string, viewId: string, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, createdAt: string, updatedAt: string, deletedAt?: string | null }; @@ -6932,14 +7161,14 @@ export type ResendWorkspaceInvitationMutationVariables = Exact<{ }>; -export type ResendWorkspaceInvitationMutation = { __typename?: 'Mutation', resendWorkspaceInvitation: { __typename?: 'SendInvitationsOutput', success: boolean, errors: Array, result: Array<{ __typename?: 'WorkspaceInvitation', id: string, email: string, expiresAt: string }> } }; +export type ResendWorkspaceInvitationMutation = { __typename?: 'Mutation', resendWorkspaceInvitation: { __typename?: 'SendInvitations', success: boolean, errors: Array, result: Array<{ __typename?: 'WorkspaceInvitation', id: string, email: string, expiresAt: string }> } }; export type SendInvitationsMutationVariables = Exact<{ emails: Array | Scalars['String']; }>; -export type SendInvitationsMutation = { __typename?: 'Mutation', sendInvitations: { __typename?: 'SendInvitationsOutput', success: boolean, errors: Array, result: Array<{ __typename?: 'WorkspaceInvitation', id: string, email: string, expiresAt: string }> } }; +export type SendInvitationsMutation = { __typename?: 'Mutation', sendInvitations: { __typename?: 'SendInvitations', success: boolean, errors: Array, result: Array<{ __typename?: 'WorkspaceInvitation', id: string, email: string, expiresAt: string }> } }; export type GetWorkspaceInvitationsQueryVariables = Exact<{ [key: string]: never; }>; @@ -7207,7 +7436,7 @@ export const AuthTokenPairFragmentFragmentDoc = gql` } ${AuthTokenFragmentFragmentDoc}`; export const AvailableSsoIdentityProvidersFragmentFragmentDoc = gql` - fragment AvailableSSOIdentityProvidersFragment on FindAvailableSSOIDPOutput { + fragment AvailableSSOIdentityProvidersFragment on FindAvailableSSOIDP { id issuer name @@ -7588,6 +7817,23 @@ export const NavigationMenuItemQueryFieldsFragmentDoc = gql` } } ${NavigationMenuItemFieldsFragmentDoc}`; +export const ApplicationRegistrationFragmentFragmentDoc = gql` + fragment ApplicationRegistrationFragment on ApplicationRegistration { + id + universalIdentifier + name + description + logoUrl + author + oAuthClientId + oAuthRedirectUris + oAuthScopes + websiteUrl + termsUrl + createdAt + updatedAt +} + `; export const ApiKeyFragmentFragmentDoc = gql` fragment ApiKeyFragment on ApiKey { id @@ -9094,7 +9340,7 @@ export type UploadImageMutationHookResult = ReturnType; export type UploadImageMutationOptions = Apollo.BaseMutationOptions; export const AuthorizeAppDocument = gql` - mutation authorizeApp($clientId: String!, $codeChallenge: String!, $redirectUrl: String!) { + mutation authorizeApp($clientId: String!, $codeChallenge: String, $redirectUrl: String!) { authorizeApp( clientId: $clientId codeChallenge: $codeChallenge @@ -12841,6 +13087,335 @@ export function useGetSystemHealthStatusLazyQuery(baseOptions?: Apollo.LazyQuery export type GetSystemHealthStatusQueryHookResult = ReturnType; export type GetSystemHealthStatusLazyQueryHookResult = ReturnType; export type GetSystemHealthStatusQueryResult = Apollo.QueryResult; +export const DeleteApplicationRegistrationDocument = gql` + mutation DeleteApplicationRegistration($id: String!) { + deleteApplicationRegistration(id: $id) +} + `; +export type DeleteApplicationRegistrationMutationFn = Apollo.MutationFunction; + +/** + * __useDeleteApplicationRegistrationMutation__ + * + * To run a mutation, you first call `useDeleteApplicationRegistrationMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useDeleteApplicationRegistrationMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @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; + * + * @example + * const [deleteApplicationRegistrationMutation, { data, loading, error }] = useDeleteApplicationRegistrationMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useDeleteApplicationRegistrationMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteApplicationRegistrationDocument, options); + } +export type DeleteApplicationRegistrationMutationHookResult = ReturnType; +export type DeleteApplicationRegistrationMutationResult = Apollo.MutationResult; +export type DeleteApplicationRegistrationMutationOptions = Apollo.BaseMutationOptions; +export const RotateApplicationRegistrationClientSecretDocument = gql` + mutation RotateApplicationRegistrationClientSecret($id: String!) { + rotateApplicationRegistrationClientSecret(id: $id) { + clientSecret + } +} + `; +export type RotateApplicationRegistrationClientSecretMutationFn = Apollo.MutationFunction; + +/** + * __useRotateApplicationRegistrationClientSecretMutation__ + * + * To run a mutation, you first call `useRotateApplicationRegistrationClientSecretMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useRotateApplicationRegistrationClientSecretMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @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; + * + * @example + * const [rotateApplicationRegistrationClientSecretMutation, { data, loading, error }] = useRotateApplicationRegistrationClientSecretMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useRotateApplicationRegistrationClientSecretMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(RotateApplicationRegistrationClientSecretDocument, options); + } +export type RotateApplicationRegistrationClientSecretMutationHookResult = ReturnType; +export type RotateApplicationRegistrationClientSecretMutationResult = Apollo.MutationResult; +export type RotateApplicationRegistrationClientSecretMutationOptions = Apollo.BaseMutationOptions; +export const UpdateApplicationRegistrationDocument = gql` + mutation UpdateApplicationRegistration($input: UpdateApplicationRegistrationInput!) { + updateApplicationRegistration(input: $input) { + ...ApplicationRegistrationFragment + } +} + ${ApplicationRegistrationFragmentFragmentDoc}`; +export type UpdateApplicationRegistrationMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateApplicationRegistrationMutation__ + * + * To run a mutation, you first call `useUpdateApplicationRegistrationMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateApplicationRegistrationMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @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; + * + * @example + * const [updateApplicationRegistrationMutation, { data, loading, error }] = useUpdateApplicationRegistrationMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useUpdateApplicationRegistrationMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateApplicationRegistrationDocument, options); + } +export type UpdateApplicationRegistrationMutationHookResult = ReturnType; +export type UpdateApplicationRegistrationMutationResult = Apollo.MutationResult; +export type UpdateApplicationRegistrationMutationOptions = Apollo.BaseMutationOptions; +export const UpdateApplicationRegistrationVariableDocument = gql` + mutation UpdateApplicationRegistrationVariable($input: UpdateApplicationRegistrationVariableInput!) { + updateApplicationRegistrationVariable(input: $input) { + id + key + description + isSecret + isRequired + isFilled + createdAt + updatedAt + } +} + `; +export type UpdateApplicationRegistrationVariableMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateApplicationRegistrationVariableMutation__ + * + * To run a mutation, you first call `useUpdateApplicationRegistrationVariableMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateApplicationRegistrationVariableMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @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; + * + * @example + * const [updateApplicationRegistrationVariableMutation, { data, loading, error }] = useUpdateApplicationRegistrationVariableMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useUpdateApplicationRegistrationVariableMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateApplicationRegistrationVariableDocument, options); + } +export type UpdateApplicationRegistrationVariableMutationHookResult = ReturnType; +export type UpdateApplicationRegistrationVariableMutationResult = Apollo.MutationResult; +export type UpdateApplicationRegistrationVariableMutationOptions = Apollo.BaseMutationOptions; +export const FindApplicationRegistrationByClientIdDocument = gql` + query FindApplicationRegistrationByClientId($clientId: String!) { + findApplicationRegistrationByClientId(clientId: $clientId) { + id + name + oAuthScopes + websiteUrl + logoUrl + } +} + `; + +/** + * __useFindApplicationRegistrationByClientIdQuery__ + * + * To run a query within a React component, call `useFindApplicationRegistrationByClientIdQuery` and pass it any options that fit your needs. + * When your component renders, `useFindApplicationRegistrationByClientIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @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; + * + * @example + * const { data, loading, error } = useFindApplicationRegistrationByClientIdQuery({ + * variables: { + * clientId: // value for 'clientId' + * }, + * }); + */ +export function useFindApplicationRegistrationByClientIdQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(FindApplicationRegistrationByClientIdDocument, options); + } +export function useFindApplicationRegistrationByClientIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(FindApplicationRegistrationByClientIdDocument, options); + } +export type FindApplicationRegistrationByClientIdQueryHookResult = ReturnType; +export type FindApplicationRegistrationByClientIdLazyQueryHookResult = ReturnType; +export type FindApplicationRegistrationByClientIdQueryResult = Apollo.QueryResult; +export const FindApplicationRegistrationStatsDocument = gql` + query FindApplicationRegistrationStats($id: String!) { + findApplicationRegistrationStats(id: $id) { + activeInstalls + mostInstalledVersion + versionDistribution { + version + count + } + } +} + `; + +/** + * __useFindApplicationRegistrationStatsQuery__ + * + * To run a query within a React component, call `useFindApplicationRegistrationStatsQuery` and pass it any options that fit your needs. + * When your component renders, `useFindApplicationRegistrationStatsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @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; + * + * @example + * const { data, loading, error } = useFindApplicationRegistrationStatsQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useFindApplicationRegistrationStatsQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(FindApplicationRegistrationStatsDocument, options); + } +export function useFindApplicationRegistrationStatsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(FindApplicationRegistrationStatsDocument, options); + } +export type FindApplicationRegistrationStatsQueryHookResult = ReturnType; +export type FindApplicationRegistrationStatsLazyQueryHookResult = ReturnType; +export type FindApplicationRegistrationStatsQueryResult = Apollo.QueryResult; +export const FindApplicationRegistrationVariablesDocument = gql` + query FindApplicationRegistrationVariables($applicationRegistrationId: String!) { + findApplicationRegistrationVariables( + applicationRegistrationId: $applicationRegistrationId + ) { + id + key + description + isSecret + isRequired + isFilled + createdAt + updatedAt + } +} + `; + +/** + * __useFindApplicationRegistrationVariablesQuery__ + * + * To run a query within a React component, call `useFindApplicationRegistrationVariablesQuery` and pass it any options that fit your needs. + * When your component renders, `useFindApplicationRegistrationVariablesQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @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; + * + * @example + * const { data, loading, error } = useFindApplicationRegistrationVariablesQuery({ + * variables: { + * applicationRegistrationId: // value for 'applicationRegistrationId' + * }, + * }); + */ +export function useFindApplicationRegistrationVariablesQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(FindApplicationRegistrationVariablesDocument, options); + } +export function useFindApplicationRegistrationVariablesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(FindApplicationRegistrationVariablesDocument, options); + } +export type FindApplicationRegistrationVariablesQueryHookResult = ReturnType; +export type FindApplicationRegistrationVariablesLazyQueryHookResult = ReturnType; +export type FindApplicationRegistrationVariablesQueryResult = Apollo.QueryResult; +export const FindManyApplicationRegistrationsDocument = gql` + query FindManyApplicationRegistrations { + findManyApplicationRegistrations { + ...ApplicationRegistrationFragment + } +} + ${ApplicationRegistrationFragmentFragmentDoc}`; + +/** + * __useFindManyApplicationRegistrationsQuery__ + * + * To run a query within a React component, call `useFindManyApplicationRegistrationsQuery` and pass it any options that fit your needs. + * When your component renders, `useFindManyApplicationRegistrationsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @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; + * + * @example + * const { data, loading, error } = useFindManyApplicationRegistrationsQuery({ + * variables: { + * }, + * }); + */ +export function useFindManyApplicationRegistrationsQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(FindManyApplicationRegistrationsDocument, options); + } +export function useFindManyApplicationRegistrationsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(FindManyApplicationRegistrationsDocument, options); + } +export type FindManyApplicationRegistrationsQueryHookResult = ReturnType; +export type FindManyApplicationRegistrationsLazyQueryHookResult = ReturnType; +export type FindManyApplicationRegistrationsQueryResult = Apollo.QueryResult; +export const FindOneApplicationRegistrationDocument = gql` + query FindOneApplicationRegistration($id: String!) { + findOneApplicationRegistration(id: $id) { + ...ApplicationRegistrationFragment + } +} + ${ApplicationRegistrationFragmentFragmentDoc}`; + +/** + * __useFindOneApplicationRegistrationQuery__ + * + * To run a query within a React component, call `useFindOneApplicationRegistrationQuery` and pass it any options that fit your needs. + * When your component renders, `useFindOneApplicationRegistrationQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @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; + * + * @example + * const { data, loading, error } = useFindOneApplicationRegistrationQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useFindOneApplicationRegistrationQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(FindOneApplicationRegistrationDocument, options); + } +export function useFindOneApplicationRegistrationLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(FindOneApplicationRegistrationDocument, options); + } +export type FindOneApplicationRegistrationQueryHookResult = ReturnType; +export type FindOneApplicationRegistrationLazyQueryHookResult = ReturnType; +export type FindOneApplicationRegistrationQueryResult = Apollo.QueryResult; export const UninstallApplicationDocument = gql` mutation UninstallApplication($universalIdentifier: String!) { uninstallApplication(universalIdentifier: $universalIdentifier) diff --git a/packages/twenty-front/src/generated/graphql.ts b/packages/twenty-front/src/generated/graphql.ts index 12520090d5..8b96d77801 100644 --- a/packages/twenty-front/src/generated/graphql.ts +++ b/packages/twenty-front/src/generated/graphql.ts @@ -134,10 +134,10 @@ export type Mutation = { dismissReconnectAccountBanner: Scalars['Boolean']; duplicateWorkflow: WorkflowVersionDto; duplicateWorkflowVersionStep: WorkflowVersionStepChanges; - runWorkflowVersion: RunWorkflowVersionOutput; + runWorkflowVersion: RunWorkflowVersion; stopWorkflowRun: WorkflowRun; submitFormStep: Scalars['Boolean']; - testHttpRequest: TestHttpRequestOutput; + testHttpRequest: TestHttpRequest; updateWorkflowRunStep: WorkflowAction; updateWorkflowVersionPositions: Scalars['Boolean']; updateWorkflowVersionStep: WorkflowAction; @@ -306,6 +306,11 @@ export type QuerySearchArgs = { searchInput: Scalars['String']; }; +export type RunWorkflowVersion = { + __typename?: 'RunWorkflowVersion'; + workflowRunId: Scalars['UUID']; +}; + export type RunWorkflowVersionInput = { /** Execution result in JSON format */ payload?: InputMaybe; @@ -315,11 +320,6 @@ export type RunWorkflowVersionInput = { workflowVersionId: Scalars['UUID']; }; -export type RunWorkflowVersionOutput = { - __typename?: 'RunWorkflowVersionOutput'; - workflowRunId: Scalars['UUID']; -}; - export type SearchRecord = { __typename?: 'SearchRecord'; imageUrl?: Maybe; @@ -358,19 +358,8 @@ export type SubmitFormStepInput = { workflowRunId: Scalars['UUID']; }; -export type TestHttpRequestInput = { - /** Request body */ - body?: InputMaybe; - /** HTTP headers */ - headers?: InputMaybe; - /** HTTP method */ - method: Scalars['String']; - /** URL to make the request to */ - url: Scalars['String']; -}; - -export type TestHttpRequestOutput = { - __typename?: 'TestHttpRequestOutput'; +export type TestHttpRequest = { + __typename?: 'TestHttpRequest'; /** Error information */ error?: Maybe; /** Response headers */ @@ -387,6 +376,17 @@ export type TestHttpRequestOutput = { success: Scalars['Boolean']; }; +export type TestHttpRequestInput = { + /** Request body */ + body?: InputMaybe; + /** HTTP headers */ + headers?: InputMaybe; + /** HTTP method */ + method: Scalars['String']; + /** URL to make the request to */ + url: Scalars['String']; +}; + export type TimelineCalendarEvent = { __typename?: 'TimelineCalendarEvent'; conferenceLink: LinksMetadata; @@ -722,7 +722,7 @@ export type RunWorkflowVersionMutationVariables = Exact<{ }>; -export type RunWorkflowVersionMutation = { __typename?: 'Mutation', runWorkflowVersion: { __typename?: 'RunWorkflowVersionOutput', workflowRunId: any } }; +export type RunWorkflowVersionMutation = { __typename?: 'Mutation', runWorkflowVersion: { __typename?: 'RunWorkflowVersion', workflowRunId: any } }; export type StopWorkflowRunMutationVariables = Exact<{ workflowRunId: Scalars['UUID']; @@ -757,7 +757,7 @@ export type TestHttpRequestMutationVariables = Exact<{ }>; -export type TestHttpRequestMutation = { __typename?: 'Mutation', testHttpRequest: { __typename?: 'TestHttpRequestOutput', success: boolean, message: string, result?: any | null, error?: any | null, status?: number | null, statusText?: string | null, headers?: any | null } }; +export type TestHttpRequestMutation = { __typename?: 'Mutation', testHttpRequest: { __typename?: 'TestHttpRequest', success: boolean, message: string, result?: any | null, error?: any | null, status?: number | null, statusText?: string | null, headers?: any | null } }; export type UpdateWorkflowVersionPositionsMutationVariables = Exact<{ input: UpdateWorkflowVersionPositionsInput; diff --git a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx index d2e3e73ace..8a940c97cf 100644 --- a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx +++ b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx @@ -170,6 +170,14 @@ const SettingsAvailableApplicationDetails = lazy(() => })), ); +const SettingsApplicationRegistrationDetails = lazy(() => + import( + '~/pages/settings/applications/SettingsApplicationRegistrationDetails' + ).then((module) => ({ + default: module.SettingsApplicationRegistrationDetails, + })), +); + const SettingsAgentForm = lazy(() => import('~/pages/settings/ai/SettingsAgentForm').then((module) => ({ default: module.SettingsAgentForm, @@ -622,6 +630,10 @@ export const SettingsRoutes = ({ isAdminPageEnabled }: SettingsRoutesProps) => ( path={SettingsPath.AvailableApplicationDetail} element={} /> + } + /> } diff --git a/packages/twenty-front/src/modules/auth/graphql/fragments/availableSSOIdentityProvidersFragment.ts b/packages/twenty-front/src/modules/auth/graphql/fragments/availableSSOIdentityProvidersFragment.ts index 45bc6c944c..3f4926d8bd 100644 --- a/packages/twenty-front/src/modules/auth/graphql/fragments/availableSSOIdentityProvidersFragment.ts +++ b/packages/twenty-front/src/modules/auth/graphql/fragments/availableSSOIdentityProvidersFragment.ts @@ -3,7 +3,7 @@ import { gql } from '@apollo/client'; export const AVAILABLE_SSO_IDENTITY_PROVIDERS_FRAGMENT = gql` - fragment AvailableSSOIdentityProvidersFragment on FindAvailableSSOIDPOutput { + fragment AvailableSSOIdentityProvidersFragment on FindAvailableSSOIDP { id issuer name diff --git a/packages/twenty-front/src/modules/auth/graphql/mutations/authorizeApp.ts b/packages/twenty-front/src/modules/auth/graphql/mutations/authorizeApp.ts index df0ae9bbfa..ab2ec03e29 100644 --- a/packages/twenty-front/src/modules/auth/graphql/mutations/authorizeApp.ts +++ b/packages/twenty-front/src/modules/auth/graphql/mutations/authorizeApp.ts @@ -3,7 +3,7 @@ import { gql } from '@apollo/client'; export const AUTHORIZE_APP = gql` mutation authorizeApp( $clientId: String! - $codeChallenge: String! + $codeChallenge: String $redirectUrl: String! ) { authorizeApp( diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/hooks/__tests__/useHandleResetPassword.test.ts b/packages/twenty-front/src/modules/auth/sign-in-up/hooks/__tests__/useHandleResetPassword.test.ts index 3eaccd5950..492d00a78f 100644 --- a/packages/twenty-front/src/modules/auth/sign-in-up/hooks/__tests__/useHandleResetPassword.test.ts +++ b/packages/twenty-front/src/modules/auth/sign-in-up/hooks/__tests__/useHandleResetPassword.test.ts @@ -10,7 +10,7 @@ import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar'; import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore'; import { SOURCE_LOCALE } from 'twenty-shared/translations'; import { - type PublicWorkspaceDataOutput, + type PublicWorkspaceData, useEmailPasswordResetLinkMutation, } from '~/generated-metadata/graphql'; import { dynamicActivate } from '~/utils/i18n/dynamicActivate'; @@ -24,7 +24,7 @@ dynamicActivate(SOURCE_LOCALE); const renderHooks = () => { jotaiStore.set(workspacePublicDataState.atom, { id: 'workspace-id', - } as PublicWorkspaceDataOutput); + } as PublicWorkspaceData); const { result } = renderHook(() => useHandleResetPassword(), { wrapper: ({ children }: { children: ReactNode }) => diff --git a/packages/twenty-front/src/modules/auth/states/workspacePublicDataState.ts b/packages/twenty-front/src/modules/auth/states/workspacePublicDataState.ts index 57b5db6498..9e16130dc5 100644 --- a/packages/twenty-front/src/modules/auth/states/workspacePublicDataState.ts +++ b/packages/twenty-front/src/modules/auth/states/workspacePublicDataState.ts @@ -1,8 +1,8 @@ -import { type PublicWorkspaceDataOutput } from '~/generated-metadata/graphql'; +import { type PublicWorkspaceData } from '~/generated-metadata/graphql'; import { createAtomState } from '@/ui/utilities/state/jotai/utils/createAtomState'; export const workspacePublicDataState = - createAtomState({ + createAtomState({ key: 'workspacePublicDataState', defaultValue: null, }); diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminTableCard.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminTableCard.tsx index 70df572646..c0041d999f 100644 --- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminTableCard.tsx +++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminTableCard.tsx @@ -4,8 +4,9 @@ import { TableCell } from '@/ui/layout/table/components/TableCell'; import { TableRow } from '@/ui/layout/table/components/TableRow'; import { useTheme } from '@emotion/react'; import styled from '@emotion/styled'; -import { Card } from 'twenty-ui/layout'; +import { isDefined } from 'twenty-shared/utils'; import { type IconComponent } from 'twenty-ui/display'; +import { Card } from 'twenty-ui/layout'; const StyledCard = styled(Card)` background-color: ${({ theme }) => theme.background.secondary}; @@ -33,8 +34,10 @@ const StyledTableCellLabel = styled(TableCell)<{ const StyledTableCellValue = styled(TableCell)<{ align?: 'left' | 'center' | 'right'; + clickable?: boolean; }>` color: ${({ theme }) => theme.font.color.primary}; + cursor: ${({ clickable }) => (clickable ? 'pointer' : 'default')}; height: ${({ theme }) => theme.spacing(6)}; justify-content: ${({ align }) => align === 'left' @@ -48,6 +51,7 @@ type TableItem = { Icon?: IconComponent; label: string; value: string | number | React.ReactNode; + onClick?: () => void; }; type SettingsAdminTableCardProps = { @@ -82,7 +86,11 @@ export const SettingsAdminTableCard = ({ {item.Icon && } {item.label} - + {item.value} diff --git a/packages/twenty-front/src/modules/settings/application-registrations/graphql/fragments/applicationRegistrationFragment.ts b/packages/twenty-front/src/modules/settings/application-registrations/graphql/fragments/applicationRegistrationFragment.ts new file mode 100644 index 0000000000..e9756655e6 --- /dev/null +++ b/packages/twenty-front/src/modules/settings/application-registrations/graphql/fragments/applicationRegistrationFragment.ts @@ -0,0 +1,19 @@ +import { gql } from '@apollo/client'; + +export const APPLICATION_REGISTRATION_FRAGMENT = gql` + fragment ApplicationRegistrationFragment on ApplicationRegistration { + id + universalIdentifier + name + description + logoUrl + author + oAuthClientId + oAuthRedirectUris + oAuthScopes + websiteUrl + termsUrl + createdAt + updatedAt + } +`; diff --git a/packages/twenty-front/src/modules/settings/application-registrations/graphql/mutations/deleteApplicationRegistration.ts b/packages/twenty-front/src/modules/settings/application-registrations/graphql/mutations/deleteApplicationRegistration.ts new file mode 100644 index 0000000000..0e48bbdf27 --- /dev/null +++ b/packages/twenty-front/src/modules/settings/application-registrations/graphql/mutations/deleteApplicationRegistration.ts @@ -0,0 +1,7 @@ +import { gql } from '@apollo/client'; + +export const DELETE_APPLICATION_REGISTRATION = gql` + mutation DeleteApplicationRegistration($id: String!) { + deleteApplicationRegistration(id: $id) + } +`; diff --git a/packages/twenty-front/src/modules/settings/application-registrations/graphql/mutations/rotateApplicationRegistrationClientSecret.ts b/packages/twenty-front/src/modules/settings/application-registrations/graphql/mutations/rotateApplicationRegistrationClientSecret.ts new file mode 100644 index 0000000000..658bbecaf4 --- /dev/null +++ b/packages/twenty-front/src/modules/settings/application-registrations/graphql/mutations/rotateApplicationRegistrationClientSecret.ts @@ -0,0 +1,9 @@ +import { gql } from '@apollo/client'; + +export const ROTATE_APPLICATION_REGISTRATION_CLIENT_SECRET = gql` + mutation RotateApplicationRegistrationClientSecret($id: String!) { + rotateApplicationRegistrationClientSecret(id: $id) { + clientSecret + } + } +`; diff --git a/packages/twenty-front/src/modules/settings/application-registrations/graphql/mutations/updateApplicationRegistration.ts b/packages/twenty-front/src/modules/settings/application-registrations/graphql/mutations/updateApplicationRegistration.ts new file mode 100644 index 0000000000..76dee1164e --- /dev/null +++ b/packages/twenty-front/src/modules/settings/application-registrations/graphql/mutations/updateApplicationRegistration.ts @@ -0,0 +1,14 @@ +import { gql } from '@apollo/client'; + +import { APPLICATION_REGISTRATION_FRAGMENT } from '@/settings/application-registrations/graphql/fragments/applicationRegistrationFragment'; + +export const UPDATE_APPLICATION_REGISTRATION = gql` + mutation UpdateApplicationRegistration( + $input: UpdateApplicationRegistrationInput! + ) { + updateApplicationRegistration(input: $input) { + ...ApplicationRegistrationFragment + } + } + ${APPLICATION_REGISTRATION_FRAGMENT} +`; diff --git a/packages/twenty-front/src/modules/settings/application-registrations/graphql/mutations/updateApplicationRegistrationVariable.ts b/packages/twenty-front/src/modules/settings/application-registrations/graphql/mutations/updateApplicationRegistrationVariable.ts new file mode 100644 index 0000000000..7fe2c960d4 --- /dev/null +++ b/packages/twenty-front/src/modules/settings/application-registrations/graphql/mutations/updateApplicationRegistrationVariable.ts @@ -0,0 +1,18 @@ +import { gql } from '@apollo/client'; + +export const UPDATE_APPLICATION_REGISTRATION_VARIABLE = gql` + mutation UpdateApplicationRegistrationVariable( + $input: UpdateApplicationRegistrationVariableInput! + ) { + updateApplicationRegistrationVariable(input: $input) { + id + key + description + isSecret + isRequired + isFilled + createdAt + updatedAt + } + } +`; diff --git a/packages/twenty-front/src/modules/settings/application-registrations/graphql/queries/findApplicationRegistrationByClientId.ts b/packages/twenty-front/src/modules/settings/application-registrations/graphql/queries/findApplicationRegistrationByClientId.ts new file mode 100644 index 0000000000..f125b42c7a --- /dev/null +++ b/packages/twenty-front/src/modules/settings/application-registrations/graphql/queries/findApplicationRegistrationByClientId.ts @@ -0,0 +1,13 @@ +import { gql } from '@apollo/client'; + +export const FIND_APPLICATION_REGISTRATION_BY_CLIENT_ID = gql` + query FindApplicationRegistrationByClientId($clientId: String!) { + findApplicationRegistrationByClientId(clientId: $clientId) { + id + name + oAuthScopes + websiteUrl + logoUrl + } + } +`; diff --git a/packages/twenty-front/src/modules/settings/application-registrations/graphql/queries/findApplicationRegistrationStats.ts b/packages/twenty-front/src/modules/settings/application-registrations/graphql/queries/findApplicationRegistrationStats.ts new file mode 100644 index 0000000000..d84229e133 --- /dev/null +++ b/packages/twenty-front/src/modules/settings/application-registrations/graphql/queries/findApplicationRegistrationStats.ts @@ -0,0 +1,14 @@ +import { gql } from '@apollo/client'; + +export const FIND_APPLICATION_REGISTRATION_STATS = gql` + query FindApplicationRegistrationStats($id: String!) { + findApplicationRegistrationStats(id: $id) { + activeInstalls + mostInstalledVersion + versionDistribution { + version + count + } + } + } +`; diff --git a/packages/twenty-front/src/modules/settings/application-registrations/graphql/queries/findApplicationRegistrationVariables.ts b/packages/twenty-front/src/modules/settings/application-registrations/graphql/queries/findApplicationRegistrationVariables.ts new file mode 100644 index 0000000000..5be591bb89 --- /dev/null +++ b/packages/twenty-front/src/modules/settings/application-registrations/graphql/queries/findApplicationRegistrationVariables.ts @@ -0,0 +1,20 @@ +import { gql } from '@apollo/client'; + +export const FIND_APPLICATION_REGISTRATION_VARIABLES = gql` + query FindApplicationRegistrationVariables( + $applicationRegistrationId: String! + ) { + findApplicationRegistrationVariables( + applicationRegistrationId: $applicationRegistrationId + ) { + id + key + description + isSecret + isRequired + isFilled + createdAt + updatedAt + } + } +`; diff --git a/packages/twenty-front/src/modules/settings/application-registrations/graphql/queries/findManyApplicationRegistrations.ts b/packages/twenty-front/src/modules/settings/application-registrations/graphql/queries/findManyApplicationRegistrations.ts new file mode 100644 index 0000000000..c86bcaee97 --- /dev/null +++ b/packages/twenty-front/src/modules/settings/application-registrations/graphql/queries/findManyApplicationRegistrations.ts @@ -0,0 +1,12 @@ +import { gql } from '@apollo/client'; + +import { APPLICATION_REGISTRATION_FRAGMENT } from '@/settings/application-registrations/graphql/fragments/applicationRegistrationFragment'; + +export const FIND_MANY_APPLICATION_REGISTRATIONS = gql` + query FindManyApplicationRegistrations { + findManyApplicationRegistrations { + ...ApplicationRegistrationFragment + } + } + ${APPLICATION_REGISTRATION_FRAGMENT} +`; diff --git a/packages/twenty-front/src/modules/settings/application-registrations/graphql/queries/findOneApplicationRegistration.ts b/packages/twenty-front/src/modules/settings/application-registrations/graphql/queries/findOneApplicationRegistration.ts new file mode 100644 index 0000000000..56856e61f3 --- /dev/null +++ b/packages/twenty-front/src/modules/settings/application-registrations/graphql/queries/findOneApplicationRegistration.ts @@ -0,0 +1,12 @@ +import { gql } from '@apollo/client'; + +import { APPLICATION_REGISTRATION_FRAGMENT } from '@/settings/application-registrations/graphql/fragments/applicationRegistrationFragment'; + +export const FIND_ONE_APPLICATION_REGISTRATION = gql` + query FindOneApplicationRegistration($id: String!) { + findOneApplicationRegistration(id: $id) { + ...ApplicationRegistrationFragment + } + } + ${APPLICATION_REGISTRATION_FRAGMENT} +`; diff --git a/packages/twenty-front/src/modules/settings/hooks/useSettingsNavigationItems.tsx b/packages/twenty-front/src/modules/settings/hooks/useSettingsNavigationItems.tsx index 5174816730..c3aec543db 100644 --- a/packages/twenty-front/src/modules/settings/hooks/useSettingsNavigationItems.tsx +++ b/packages/twenty-front/src/modules/settings/hooks/useSettingsNavigationItems.tsx @@ -8,10 +8,10 @@ import { supportChatState } from '@/client-config/states/supportChatState'; import { usePermissionFlagMap } from '@/settings/roles/hooks/usePermissionFlagMap'; import { getDocumentationUrl } from '@/support/utils/getDocumentationUrl'; import { type NavigationDrawerItemIndentationLevel } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerItem'; +import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue'; import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled'; import { t } from '@lingui/core/macro'; import { isNonEmptyString } from '@sniptt/guards'; -import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue'; import { IconApi, // IconApps, // TODO: Re-enable when integrations page is ready @@ -173,7 +173,7 @@ const useSettingsNavigationItems = (): SettingsNavigationSection[] => { // isHidden: !permissionMap[PermissionFlagType.API_KEYS_AND_WEBHOOKS], // }, { - label: t`Applications`, + label: t`Apps`, path: SettingsPath.Applications, Icon: IconPlug, isHidden: diff --git a/packages/twenty-front/src/modules/settings/two-factor-authentication/hooks/useCurrentUserWorkspaceTwoFactorAuthentication.ts b/packages/twenty-front/src/modules/settings/two-factor-authentication/hooks/useCurrentUserWorkspaceTwoFactorAuthentication.ts index c0f08e1e85..3146957a2f 100644 --- a/packages/twenty-front/src/modules/settings/two-factor-authentication/hooks/useCurrentUserWorkspaceTwoFactorAuthentication.ts +++ b/packages/twenty-front/src/modules/settings/two-factor-authentication/hooks/useCurrentUserWorkspaceTwoFactorAuthentication.ts @@ -1,7 +1,7 @@ import { currentUserWorkspaceState } from '@/auth/states/currentUserWorkspaceState'; import { useMemo } from 'react'; import { - type TwoFactorAuthenticationMethodDto, + type TwoFactorAuthenticationMethodSummary, useInitiateOtpProvisioningMutation, } from '~/generated-metadata/graphql'; import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue'; @@ -12,7 +12,7 @@ export const useCurrentUserWorkspaceTwoFactorAuthentication = () => { useInitiateOtpProvisioningMutation(); const currentUserWorkspaceTwoFactorAuthenticationMethods = useMemo(() => { - const methods: Record = {}; + const methods: Record = {}; (currentUserWorkspace?.twoFactorAuthenticationMethodSummary ?? []).forEach( (method) => (methods[method.strategy] = method), diff --git a/packages/twenty-front/src/pages/auth/Authorize.tsx b/packages/twenty-front/src/pages/auth/Authorize.tsx index e793677010..4fef494c9f 100644 --- a/packages/twenty-front/src/pages/auth/Authorize.tsx +++ b/packages/twenty-front/src/pages/auth/Authorize.tsx @@ -1,3 +1,4 @@ +import { FIND_APPLICATION_REGISTRATION_BY_CLIENT_ID } from '@/settings/application-registrations/graphql/queries/findApplicationRegistrationByClientId'; import styled from '@emotion/styled'; import { useEffect, useState } from 'react'; import { useSearchParams } from 'react-router-dom'; @@ -5,14 +6,15 @@ import { AppPath } from 'twenty-shared/types'; import { useRedirect } from '@/domain-manager/hooks/useRedirect'; import { Trans, useLingui } from '@lingui/react/macro'; +import { useQuery } from '@apollo/client'; +import { isNonEmptyString } from '@sniptt/guards'; import { isDefined } from 'twenty-shared/utils'; +import { Avatar } from 'twenty-ui/display'; import { MainButton } from 'twenty-ui/input'; import { UndecoratedLink } from 'twenty-ui/navigation'; import { useAuthorizeAppMutation } from '~/generated-metadata/graphql'; import { useNavigateApp } from '~/hooks/useNavigateApp'; -type App = { id: string; name: string; logo: string }; - const StyledContainer = styled.div` display: flex; align-items: center; @@ -56,52 +58,85 @@ const StyledButtonContainer = styled.div` gap: 10px; width: 100%; `; + +const StyledScopeList = styled.ul` + list-style: none; + padding: 0; + margin: 0 0 ${({ theme }) => theme.spacing(4)} 0; + width: 100%; +`; + +const StyledScopeItem = styled.li` + color: ${({ theme }) => theme.font.color.secondary}; + font-size: ${({ theme }) => theme.font.size.md}; + padding: ${({ theme }) => theme.spacing(1)} 0; + border-bottom: 1px solid ${({ theme }) => theme.border.color.light}; + + &:last-child { + border-bottom: none; + } +`; + export const Authorize = () => { const { t } = useLingui(); const navigate = useNavigateApp(); const [searchParam] = useSearchParams(); const { redirect } = useRedirect(); - //TODO: Replace with db call for registered third party apps - const [apps] = useState([ - { - id: 'chrome', - name: 'Chrome Extension', - logo: 'images/integrations/chrome-icon.svg', - }, - ]); - const [app, setApp] = useState(); + + const oauthScopeLabels: { [scope: string]: string | undefined } = { + api: t`Access workspace data`, + profile: t`Read your profile`, + }; + const clientId = searchParam.get('clientId'); const codeChallenge = searchParam.get('codeChallenge'); const redirectUrl = searchParam.get('redirectUrl'); - useEffect(() => { - const app = apps.find((app) => app.id === clientId); - if (!isDefined(app)) navigate(AppPath.NotFound); - else setApp(app); - //eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + const { data, loading } = useQuery( + FIND_APPLICATION_REGISTRATION_BY_CLIENT_ID, + { + variables: { clientId: clientId ?? '' }, + skip: !isDefined(clientId), + }, + ); + const applicationRegistration = data?.findApplicationRegistrationByClientId; const [authorizeApp] = useAuthorizeAppMutation(); + const [hasLogoError, setHasLogoError] = useState(false); + + const shouldRedirectToNotFound = + !isDefined(clientId) || (!loading && !isDefined(applicationRegistration)); + + useEffect(() => { + if (shouldRedirectToNotFound) { + navigate(AppPath.NotFound); + } + }, [shouldRedirectToNotFound, navigate]); + const handleAuthorize = async () => { - if ( - isDefined(clientId) && - isDefined(codeChallenge) && - isDefined(redirectUrl) - ) { + if (isDefined(clientId) && isDefined(redirectUrl)) { await authorizeApp({ variables: { clientId, - codeChallenge, + codeChallenge: codeChallenge ?? undefined, redirectUrl, }, - onCompleted: (data) => { - redirect(data.authorizeApp.redirectUrl); + onCompleted: (responseData) => { + redirect(responseData.authorizeApp.redirectUrl); }, }); } }; - const appName = app?.name; + if (loading || !applicationRegistration) { + return null; + } + + const appName = applicationRegistration.name; + const appLogoUrl = applicationRegistration.logoUrl; + const requestedScopes: string[] = applicationRegistration.oAuthScopes ?? []; + + const showLogoImage = isNonEmptyString(appLogoUrl) && !hasLogoError; return ( @@ -119,11 +154,36 @@ export const Authorize = () => { height={60} width={60} /> - app-icon + {showLogoImage ? ( + {appName} setHasLogoError(true)} + /> + ) : ( + + )} {appName} wants to access your account + {requestedScopes.length > 0 && ( + + {requestedScopes.map((scope) => ( + + {oauthScopeLabels[scope] ?? scope} + + ))} + + )} diff --git a/packages/twenty-front/src/pages/auth/SignInUp.tsx b/packages/twenty-front/src/pages/auth/SignInUp.tsx index 7f3561bc1e..e572ad71fb 100644 --- a/packages/twenty-front/src/pages/auth/SignInUp.tsx +++ b/packages/twenty-front/src/pages/auth/SignInUp.tsx @@ -35,7 +35,7 @@ import { useSearchParams } from 'react-router-dom'; import { isDefined } from 'twenty-shared/utils'; import { Loader } from 'twenty-ui/feedback'; import { AnimatedEaseIn } from 'twenty-ui/utilities'; -import { type PublicWorkspaceDataOutput } from '~/generated-metadata/graphql'; +import { type PublicWorkspaceData } from '~/generated-metadata/graphql'; const StyledLoaderContainer = styled.div` align-items: center; @@ -53,7 +53,7 @@ const StandardContent = ({ title, onClickOnLogo, }: { - workspacePublicData: PublicWorkspaceDataOutput | null; + workspacePublicData: PublicWorkspaceData | null; signInUpForm: JSX.Element | null; signInUpStep: SignInUpStep; title: string; diff --git a/packages/twenty-front/src/pages/auth/__stories__/PasswordReset.stories.tsx b/packages/twenty-front/src/pages/auth/__stories__/PasswordReset.stories.tsx index ad217808eb..a7732dfdec 100644 --- a/packages/twenty-front/src/pages/auth/__stories__/PasswordReset.stories.tsx +++ b/packages/twenty-front/src/pages/auth/__stories__/PasswordReset.stories.tsx @@ -27,7 +27,7 @@ const buildHandlers = (hasPassword: boolean) => [ HttpResponse.json({ data: { validatePasswordResetToken: { - __typename: 'ValidatePasswordResetTokenOutput', + __typename: 'ValidatePasswordResetToken', id: mockedOnboardingUsersData.id, email: mockedOnboardingUsersData.email, hasPassword, diff --git a/packages/twenty-front/src/pages/settings/applications/SettingsApplicationRegistrationDetails.tsx b/packages/twenty-front/src/pages/settings/applications/SettingsApplicationRegistrationDetails.tsx new file mode 100644 index 0000000000..11fa16e105 --- /dev/null +++ b/packages/twenty-front/src/pages/settings/applications/SettingsApplicationRegistrationDetails.tsx @@ -0,0 +1,626 @@ +import { SettingsAdminTableCard } from '@/settings/admin-panel/components/SettingsAdminTableCard'; +import { DELETE_APPLICATION_REGISTRATION } from '@/settings/application-registrations/graphql/mutations/deleteApplicationRegistration'; +import { ROTATE_APPLICATION_REGISTRATION_CLIENT_SECRET } from '@/settings/application-registrations/graphql/mutations/rotateApplicationRegistrationClientSecret'; +import { UPDATE_APPLICATION_REGISTRATION } from '@/settings/application-registrations/graphql/mutations/updateApplicationRegistration'; +import { UPDATE_APPLICATION_REGISTRATION_VARIABLE } from '@/settings/application-registrations/graphql/mutations/updateApplicationRegistrationVariable'; +import { FIND_APPLICATION_REGISTRATION_STATS } from '@/settings/application-registrations/graphql/queries/findApplicationRegistrationStats'; +import { FIND_APPLICATION_REGISTRATION_VARIABLES } from '@/settings/application-registrations/graphql/queries/findApplicationRegistrationVariables'; +import { FIND_MANY_APPLICATION_REGISTRATIONS } from '@/settings/application-registrations/graphql/queries/findManyApplicationRegistrations'; +import { FIND_ONE_APPLICATION_REGISTRATION } from '@/settings/application-registrations/graphql/queries/findOneApplicationRegistration'; +import { SaveAndCancelButtons } from '@/settings/components/SaveAndCancelButtons/SaveAndCancelButtons'; +import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer'; +import { ApiKeyInput } from '@/settings/developers/components/ApiKeyInput'; +import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar'; +import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput'; +import { ConfirmationModal } from '@/ui/layout/modal/components/ConfirmationModal'; +import { useModal } from '@/ui/layout/modal/hooks/useModal'; +import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBarContainer'; +import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue'; +import { useMutation, useQuery } from '@apollo/client'; +import styled from '@emotion/styled'; +import { Trans, useLingui } from '@lingui/react/macro'; +import { isNonEmptyString } from '@sniptt/guards'; +import { useState } from 'react'; +import { useParams } from 'react-router-dom'; +import { SettingsPath } from 'twenty-shared/types'; +import { getSettingsPath, isDefined, isValidUrl } from 'twenty-shared/utils'; +import { + H2Title, + IconChartBar, + IconCheck, + IconDownload, + IconKey, + IconRefresh, + IconShield, + IconTag, + IconTextCaption, + IconTrash, + IconWorld, + Status, +} from 'twenty-ui/display'; +import { Button } from 'twenty-ui/input'; +import { Section } from 'twenty-ui/layout'; +import { useCopyToClipboard } from '~/hooks/useCopyToClipboard'; +import { useNavigateSettings } from '~/hooks/useNavigateSettings'; +import { applicationRegistrationClientSecretFamilyState } from '~/pages/settings/applications/states/applicationRegistrationClientSecretFamilyState'; + +const DELETE_REGISTRATION_MODAL_ID = 'delete-application-registration-modal'; +const ROTATE_SECRET_MODAL_ID = 'rotate-application-registration-secret-modal'; + +const StyledInputContainer = styled.div` + align-items: center; + display: flex; + flex-direction: row; + gap: ${({ theme }) => theme.spacing(2)}; + width: 100%; +`; + +const StyledRedirectUriRow = styled.div` + align-items: center; + display: flex; + gap: ${({ theme }) => theme.spacing(2)}; + padding: ${({ theme }) => theme.spacing(1)} 0; +`; + +const StyledRedirectUriValue = styled.span` + color: ${({ theme }) => theme.font.color.primary}; + font-family: monospace; + word-break: break-all; +`; + +const StyledVariableRow = styled.div` + align-items: center; + border-bottom: 1px solid ${({ theme }) => theme.border.color.light}; + display: flex; + gap: ${({ theme }) => theme.spacing(2)}; + padding: ${({ theme }) => theme.spacing(2)} 0; +`; + +const StyledVariableInfo = styled.div` + flex: 1; + display: flex; + flex-direction: column; + gap: ${({ theme }) => theme.spacing(0.5)}; +`; + +const StyledVariableKey = styled.span` + color: ${({ theme }) => theme.font.color.primary}; + font-family: monospace; + font-weight: ${({ theme }) => theme.font.weight.medium}; +`; + +const StyledVariableDescription = styled.span` + color: ${({ theme }) => theme.font.color.tertiary}; + font-size: ${({ theme }) => theme.font.size.sm}; +`; + +const StyledRotateContainer = styled.div` + padding-top: ${({ theme }) => theme.spacing(2)}; +`; + +type ServerVariable = { + id: string; + key: string; + description: string; + isSecret: boolean; + isRequired: boolean; + isFilled: boolean; +}; + +export const SettingsApplicationRegistrationDetails = () => { + const { t } = useLingui(); + const navigate = useNavigateSettings(); + const { copyToClipboard } = useCopyToClipboard(); + const { enqueueSuccessSnackBar, enqueueErrorSnackBar } = useSnackBar(); + const { openModal } = useModal(); + const { applicationRegistrationId = '' } = useParams<{ + applicationRegistrationId: string; + }>(); + + const applicationRegistrationClientSecret = useAtomFamilyStateValue( + applicationRegistrationClientSecretFamilyState, + applicationRegistrationId, + ); + + const [isLoading, setIsLoading] = useState(false); + const [formRedirectUris, setFormRedirectUris] = useState([]); + const [newRedirectUri, setNewRedirectUri] = useState(''); + const [hasChanges, setHasChanges] = useState(false); + const [rotatedSecret, setRotatedSecret] = useState(null); + + const [variableValues, setVariableValues] = useState>( + {}, + ); + + const { data, loading } = useQuery(FIND_ONE_APPLICATION_REGISTRATION, { + variables: { id: applicationRegistrationId }, + skip: !applicationRegistrationId, + onCompleted: (result) => { + const foundRegistration = result?.findOneApplicationRegistration; + + if (isDefined(foundRegistration)) { + setFormRedirectUris(foundRegistration.oAuthRedirectUris ?? []); + } + }, + }); + + const { data: variablesData } = useQuery( + FIND_APPLICATION_REGISTRATION_VARIABLES, + { + variables: { applicationRegistrationId }, + skip: !applicationRegistrationId, + }, + ); + + const { data: statsData } = useQuery(FIND_APPLICATION_REGISTRATION_STATS, { + variables: { id: applicationRegistrationId }, + skip: !applicationRegistrationId, + }); + + const [updateRegistration] = useMutation(UPDATE_APPLICATION_REGISTRATION, { + refetchQueries: [ + FIND_ONE_APPLICATION_REGISTRATION, + FIND_MANY_APPLICATION_REGISTRATIONS, + ], + }); + const [deleteRegistration] = useMutation(DELETE_APPLICATION_REGISTRATION, { + refetchQueries: [FIND_MANY_APPLICATION_REGISTRATIONS], + }); + const [rotateSecret] = useMutation( + ROTATE_APPLICATION_REGISTRATION_CLIENT_SECRET, + ); + const [updateVariable] = useMutation( + UPDATE_APPLICATION_REGISTRATION_VARIABLE, + { + refetchQueries: [FIND_APPLICATION_REGISTRATION_VARIABLES], + }, + ); + + const registration = data?.findOneApplicationRegistration; + const variables: ServerVariable[] = + variablesData?.findApplicationRegistrationVariables ?? []; + + if (loading || !registration) { + return null; + } + + const markDirty = () => setHasChanges(true); + + const handleSave = async () => { + setIsLoading(true); + try { + await updateRegistration({ + variables: { + input: { + id: applicationRegistrationId, + update: { + oAuthRedirectUris: formRedirectUris, + }, + }, + }, + }); + setHasChanges(false); + enqueueSuccessSnackBar({ message: t`App updated` }); + } catch { + enqueueErrorSnackBar({ message: t`Error updating app` }); + } finally { + setIsLoading(false); + } + }; + + const handleCancel = () => { + setFormRedirectUris(registration.oAuthRedirectUris ?? []); + setHasChanges(false); + }; + + const handleDelete = async () => { + setIsLoading(true); + try { + await deleteRegistration({ + variables: { id: applicationRegistrationId }, + }); + navigate(SettingsPath.Applications); + } catch { + enqueueErrorSnackBar({ + message: t`Error deleting app`, + }); + } finally { + setIsLoading(false); + } + }; + + const handleRotateSecret = async () => { + setIsLoading(true); + try { + const result = await rotateSecret({ + variables: { id: applicationRegistrationId }, + }); + const secret = + result.data?.rotateApplicationRegistrationClientSecret?.clientSecret; + + if (isNonEmptyString(secret)) { + setRotatedSecret(secret); + enqueueSuccessSnackBar({ + message: t`Client secret rotated. Copy it now — it won't be shown again.`, + }); + } + } catch { + enqueueErrorSnackBar({ + message: t`Error rotating client secret`, + }); + } finally { + setIsLoading(false); + } + }; + + const handleAddRedirectUri = () => { + const trimmed = newRedirectUri.trim(); + + if (!trimmed) { + return; + } + + if (!isValidUrl(trimmed)) { + enqueueErrorSnackBar({ message: t`Please enter a valid URL` }); + + return; + } + + if (formRedirectUris.includes(trimmed)) { + enqueueErrorSnackBar({ message: t`This redirect URI is already added` }); + + return; + } + + setFormRedirectUris([...formRedirectUris, trimmed]); + setNewRedirectUri(''); + markDirty(); + }; + + const handleRemoveRedirectUri = (index: number) => { + setFormRedirectUris( + formRedirectUris.filter((_, uriIndex) => uriIndex !== index), + ); + markDirty(); + }; + + const handleSaveVariableValue = async (variable: ServerVariable) => { + const value = variableValues[variable.id]; + const variableKey = variable.key; + + if (!isNonEmptyString(value)) { + return; + } + + try { + await updateVariable({ + variables: { + input: { + id: variable.id, + update: { + value, + }, + }, + }, + }); + setVariableValues((previous) => { + const next = { ...previous }; + + delete next[variable.id]; + + return next; + }); + enqueueSuccessSnackBar({ + message: t`Variable ${variableKey} updated`, + }); + } catch { + enqueueErrorSnackBar({ + message: t`Error updating variable`, + }); + } + }; + + const displayedSecret = applicationRegistrationClientSecret ?? rotatedSecret; + const confirmationValue = t`yes`; + + const credentialItems = [ + { + Icon: IconKey, + label: t`Client ID`, + value: registration.oAuthClientId, + onClick: () => + copyToClipboard(registration.oAuthClientId, t`Client ID copied`), + }, + { + Icon: IconShield, + label: t`Scopes`, + value: (registration.oAuthScopes ?? []).join(', ') || '—', + }, + ]; + + const generalItems = [ + { + Icon: IconTag, + label: t`Name`, + value: registration.name, + }, + ...(isNonEmptyString(registration.description) + ? [ + { + Icon: IconTextCaption, + label: t`Description`, + value: registration.description, + }, + ] + : []), + { + Icon: IconWorld, + label: t`Universal ID`, + value: registration.universalIdentifier, + onClick: () => + copyToClipboard( + registration.universalIdentifier, + t`Universal identifier copied`, + ), + }, + ]; + + const stats = statsData?.findApplicationRegistrationStats; + const hasActiveInstalls = (stats?.activeInstalls ?? 0) > 0; + + const versionDistributionLabel = + stats?.versionDistribution + ?.map( + (entry: { version: string; count: number }) => + `${entry.version} (${entry.count})`, + ) + .join(', ') || '—'; + + const statsItems = [ + { + Icon: IconDownload, + label: t`Active installs`, + value: stats?.activeInstalls ?? '—', + }, + { + Icon: IconTag, + label: t`Most installed version`, + value: stats?.mostInstalledVersion ?? '—', + }, + { + Icon: IconChartBar, + label: t`Distribution`, + value: versionDistributionLabel, + }, + ]; + + return ( + <> + + ) : undefined + } + > + + {stats && stats.activeInstalls > 0 && ( +
+ + +
+ )} + +
+ + +
+ +
+ + + +
+ + {displayedSecret && ( +
+ + +
+ )} + +
+ + {formRedirectUris.map((uri, index) => ( + + {uri} +
+ + {variables.length > 0 && ( +
+ + {variables.map((variable) => ( + + + + {variable.key} + {variable.isRequired && ( + * + )} + + {isNonEmptyString(variable.description) && ( + + {variable.description} + + )} + + {variable.isFilled && + !isNonEmptyString(variableValues[variable.id]) && ( + + )} + {!variable.isFilled && + !isNonEmptyString(variableValues[variable.id]) && ( + + )} + + setVariableValues((previous) => ({ + ...previous, + [variable.id]: value, + })) + } + placeholder={ + variable.isSecret ? t`Enter secret value` : t`Enter value` + } + fullWidth + /> +
+ )} + +
+ +
+
+
+ + + If you rotate this secret, any integration using the current secret + will stop working. Please type {`"${confirmationValue}"`} to + confirm. + + } + onConfirmClick={handleRotateSecret} + confirmButtonText={t`Rotate secret`} + loading={isLoading} + /> + + + Please type {`"${confirmationValue}"`} to confirm you want to delete + this app. All workspace installations linked to it will lose their + OAuth credentials. + + } + onConfirmClick={handleDelete} + confirmButtonText={t`Delete`} + loading={isLoading} + /> + + ); +}; diff --git a/packages/twenty-front/src/pages/settings/applications/SettingsApplications.tsx b/packages/twenty-front/src/pages/settings/applications/SettingsApplications.tsx index 712db07dda..e1afaaa165 100644 --- a/packages/twenty-front/src/pages/settings/applications/SettingsApplications.tsx +++ b/packages/twenty-front/src/pages/settings/applications/SettingsApplications.tsx @@ -1,3 +1,4 @@ +import { useHasPermissionFlag } from '@/settings/roles/hooks/useHasPermissionFlag'; import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer'; import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBarContainer'; import { TabList } from '@/ui/layout/tab-list/components/TabList'; @@ -10,11 +11,12 @@ import { getSettingsPath } from 'twenty-shared/utils'; import { IconApps, IconCode, IconDownload } from 'twenty-ui/display'; import { type FeatureFlagKey, + PermissionFlagType, useFindManyApplicationsQuery, } from '~/generated-metadata/graphql'; import { SettingsApplicationsTable } from '~/pages/settings/applications/components/SettingsApplicationsTable'; import { SettingsApplicationsAvailableTab } from '~/pages/settings/applications/tabs/SettingsApplicationsAvailableTab'; -import { SettingsApplicationsCreateTab } from '~/pages/settings/applications/tabs/SettingsApplicationsCreateTab'; +import { SettingsApplicationsDeveloperTab } from '~/pages/settings/applications/tabs/SettingsApplicationsDeveloperTab'; import { SettingsApplicationsInstalledTab } from '~/pages/settings/applications/tabs/SettingsApplicationsInstalledTab'; const APPLICATIONS_TAB_LIST_ID = 'applications-tab-list'; @@ -22,6 +24,10 @@ const APPLICATIONS_TAB_LIST_ID = 'applications-tab-list'; export const SettingsApplications = () => { const { t } = useLingui(); + const hasDeveloperAccess = useHasPermissionFlag( + PermissionFlagType.API_KEYS_AND_WEBHOOKS, + ); + const isMarketplaceEnabled = useIsFeatureEnabled( 'IS_MARKETPLACE_ENABLED' as FeatureFlagKey, ); @@ -51,26 +57,28 @@ export const SettingsApplications = () => { {applications.length > 0 && ( )} - + {hasDeveloperAccess && } ); } const tabs = [ - { id: 'available', title: t`Available`, Icon: IconDownload }, + { id: 'marketplace', title: t`Marketplace`, Icon: IconDownload }, { id: 'installed', title: t`Installed`, Icon: IconApps }, - { id: 'create', title: t`Create an app`, Icon: IconCode }, + ...(hasDeveloperAccess + ? [{ id: 'developer', title: t`Developer`, Icon: IconCode }] + : []), ]; const renderActiveTabContent = () => { switch (activeTabId) { - case 'available': + case 'marketplace': return ; case 'installed': return ; - case 'create': - return ; + case 'developer': + return ; default: return ; } diff --git a/packages/twenty-front/src/pages/settings/applications/states/applicationRegistrationClientSecretFamilyState.ts b/packages/twenty-front/src/pages/settings/applications/states/applicationRegistrationClientSecretFamilyState.ts new file mode 100644 index 0000000000..239879d1af --- /dev/null +++ b/packages/twenty-front/src/pages/settings/applications/states/applicationRegistrationClientSecretFamilyState.ts @@ -0,0 +1,7 @@ +import { createAtomFamilyState } from '@/ui/utilities/state/jotai/utils/createAtomFamilyState'; + +export const applicationRegistrationClientSecretFamilyState = + createAtomFamilyState({ + key: 'applicationRegistrationClientSecretState', + defaultValue: null, + }); diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsCreateTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsCreateTab.tsx deleted file mode 100644 index 11120f2920..0000000000 --- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsCreateTab.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState'; -import { getDocumentationUrl } from '@/support/utils/getDocumentationUrl'; -import styled from '@emotion/styled'; -import { useLingui } from '@lingui/react/macro'; -import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue'; -import { - CommandBlock, - H2Title, - IconCopy, - IconFileInfo, -} from 'twenty-ui/display'; -import { Button } from 'twenty-ui/input'; -import { Section } from 'twenty-ui/layout'; -import { useCopyToClipboard } from '~/hooks/useCopyToClipboard'; - -const StyledButtonContainer = styled.div` - margin: ${({ theme }) => theme.spacing(2)} 0; -`; - -export const SettingsApplicationsCreateTab = () => { - const { t } = useLingui(); - - const currentWorkspaceMember = useAtomStateValue(currentWorkspaceMemberState); - - const { copyToClipboard } = useCopyToClipboard(); - - const commands = [ - // eslint-disable-next-line lingui/no-unlocalized-strings - 'npx create-twenty-app@latest my-twenty-app', - // eslint-disable-next-line lingui/no-unlocalized-strings - 'cd my-twenty-app', - ]; - - const button = ( -