Identification cleanup (#17301)
# Introduction following https://github.com/twentyhq/twenty/pull/17279 As we've finally identified all the syncable metadata entities, which means they're expected to have non nullable applicationId and universalIdentifier at pg_level we can remove previous retro comp universalIdentifier fallbacking and update the dto too ~~This needs IdentifyRemainingEntitiesMetadataCommand and MakeRemainingEntitiesUniversalIdentifierAndApplicationIdNotNullableMigrationCommand to be run~~ ```ts [Nest] 197 - 01/21/2026, 3:08:35 PM LOG [MakeRemainingEntitiesUniversalIdentifierAndApplicationIdNotNullableMigrationCommand] Successfully run MakeRemainingEntitiesUniversalIdentifierAndApplicationIdNotNullableMigrationCommand ```
This commit is contained in:
@@ -1460,7 +1460,7 @@ export enum FeatureFlagKey {
|
||||
|
||||
export type Field = {
|
||||
__typename?: 'Field';
|
||||
applicationId?: Maybe<Scalars['UUID']>;
|
||||
applicationId: Scalars['UUID'];
|
||||
createdAt: Scalars['DateTime'];
|
||||
defaultValue?: Maybe<Scalars['JSON']>;
|
||||
description?: Maybe<Scalars['String']>;
|
||||
@@ -3164,7 +3164,7 @@ export type NotesConfiguration = {
|
||||
|
||||
export type Object = {
|
||||
__typename?: 'Object';
|
||||
applicationId?: Maybe<Scalars['UUID']>;
|
||||
applicationId: Scalars['UUID'];
|
||||
createdAt: Scalars['DateTime'];
|
||||
description?: Maybe<Scalars['String']>;
|
||||
duplicateCriteria?: Maybe<Array<Array<Scalars['String']>>>;
|
||||
@@ -5688,7 +5688,7 @@ export type UpdateOneApplicationVariableMutationVariables = Exact<{
|
||||
|
||||
export type UpdateOneApplicationVariableMutation = { __typename?: 'Mutation', updateOneApplicationVariable: boolean };
|
||||
|
||||
export type ApplicationFieldsFragment = { __typename?: 'Application', id: string, name: string, description: string, version: string, universalIdentifier: string, canBeUninstalled: boolean, applicationVariables: Array<{ __typename?: 'ApplicationVariable', id: string, key: string, value: string, description: string, isSecret: boolean }>, agents: Array<{ __typename?: 'Agent', id: string, name: string, label: string, description?: string | null, icon?: string | null, prompt: string, modelId: string, responseFormat?: any | null, roleId?: string | null, isCustom: boolean, modelConfiguration?: any | null, evaluationInputs: Array<string>, applicationId?: string | null, createdAt: string, updatedAt: string }>, objects: Array<{ __typename?: 'Object', id: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIReadOnly: boolean, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId?: string | null, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, duplicateCriteria?: Array<Array<string>> | null, indexMetadataList: Array<{ __typename?: 'Index', id: string, createdAt: string, updatedAt: string, name: string, indexWhereClause?: string | null, indexType: IndexType, isUnique: boolean, isCustom?: boolean | null, indexFieldMetadataList: Array<{ __typename?: 'IndexField', id: string, fieldMetadataId: string, createdAt: string, updatedAt: string, order: number }> }>, fieldsList: Array<{ __typename?: 'Field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isUIReadOnly?: boolean | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId?: string | null, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> }>, serverlessFunctions: Array<{ __typename?: 'ServerlessFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, latestVersion?: string | null, publishedVersions: Array<string>, handlerPath: string, handlerName: string, toolInputSchema?: any | null, isTool: boolean, applicationId?: string | null, createdAt: string, updatedAt: string, cronTriggers?: Array<{ __typename?: 'CronTrigger', id: string, settings: any, createdAt: string, updatedAt: string }> | null, databaseEventTriggers?: Array<{ __typename?: 'DatabaseEventTrigger', id: string, settings: any, createdAt: string, updatedAt: string }> | null, routeTriggers?: Array<{ __typename?: 'RouteTrigger', id: string, path: string, isAuthRequired: boolean, httpMethod: HttpMethod, forwardedRequestHeaders: Array<string>, createdAt: string, updatedAt: string }> | null }> };
|
||||
export type ApplicationFieldsFragment = { __typename?: 'Application', id: string, name: string, description: string, version: string, universalIdentifier: string, canBeUninstalled: boolean, applicationVariables: Array<{ __typename?: 'ApplicationVariable', id: string, key: string, value: string, description: string, isSecret: boolean }>, agents: Array<{ __typename?: 'Agent', id: string, name: string, label: string, description?: string | null, icon?: string | null, prompt: string, modelId: string, responseFormat?: any | null, roleId?: string | null, isCustom: boolean, modelConfiguration?: any | null, evaluationInputs: Array<string>, applicationId?: string | null, createdAt: string, updatedAt: string }>, objects: Array<{ __typename?: 'Object', id: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIReadOnly: boolean, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId: string, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, duplicateCriteria?: Array<Array<string>> | null, indexMetadataList: Array<{ __typename?: 'Index', id: string, createdAt: string, updatedAt: string, name: string, indexWhereClause?: string | null, indexType: IndexType, isUnique: boolean, isCustom?: boolean | null, indexFieldMetadataList: Array<{ __typename?: 'IndexField', id: string, fieldMetadataId: string, createdAt: string, updatedAt: string, order: number }> }>, fieldsList: Array<{ __typename?: 'Field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isUIReadOnly?: boolean | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId: string, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> }>, serverlessFunctions: Array<{ __typename?: 'ServerlessFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, latestVersion?: string | null, publishedVersions: Array<string>, handlerPath: string, handlerName: string, toolInputSchema?: any | null, isTool: boolean, applicationId?: string | null, createdAt: string, updatedAt: string, cronTriggers?: Array<{ __typename?: 'CronTrigger', id: string, settings: any, createdAt: string, updatedAt: string }> | null, databaseEventTriggers?: Array<{ __typename?: 'DatabaseEventTrigger', id: string, settings: any, createdAt: string, updatedAt: string }> | null, routeTriggers?: Array<{ __typename?: 'RouteTrigger', id: string, path: string, isAuthRequired: boolean, httpMethod: HttpMethod, forwardedRequestHeaders: Array<string>, createdAt: string, updatedAt: string }> | null }> };
|
||||
|
||||
export type FindManyApplicationsQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
@@ -5700,7 +5700,7 @@ export type FindOneApplicationQueryVariables = Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type FindOneApplicationQuery = { __typename?: 'Query', findOneApplication: { __typename?: 'Application', id: string, name: string, description: string, version: string, universalIdentifier: string, canBeUninstalled: boolean, applicationVariables: Array<{ __typename?: 'ApplicationVariable', id: string, key: string, value: string, description: string, isSecret: boolean }>, agents: Array<{ __typename?: 'Agent', id: string, name: string, label: string, description?: string | null, icon?: string | null, prompt: string, modelId: string, responseFormat?: any | null, roleId?: string | null, isCustom: boolean, modelConfiguration?: any | null, evaluationInputs: Array<string>, applicationId?: string | null, createdAt: string, updatedAt: string }>, objects: Array<{ __typename?: 'Object', id: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIReadOnly: boolean, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId?: string | null, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, duplicateCriteria?: Array<Array<string>> | null, indexMetadataList: Array<{ __typename?: 'Index', id: string, createdAt: string, updatedAt: string, name: string, indexWhereClause?: string | null, indexType: IndexType, isUnique: boolean, isCustom?: boolean | null, indexFieldMetadataList: Array<{ __typename?: 'IndexField', id: string, fieldMetadataId: string, createdAt: string, updatedAt: string, order: number }> }>, fieldsList: Array<{ __typename?: 'Field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isUIReadOnly?: boolean | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId?: string | null, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> }>, serverlessFunctions: Array<{ __typename?: 'ServerlessFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, latestVersion?: string | null, publishedVersions: Array<string>, handlerPath: string, handlerName: string, toolInputSchema?: any | null, isTool: boolean, applicationId?: string | null, createdAt: string, updatedAt: string, cronTriggers?: Array<{ __typename?: 'CronTrigger', id: string, settings: any, createdAt: string, updatedAt: string }> | null, databaseEventTriggers?: Array<{ __typename?: 'DatabaseEventTrigger', id: string, settings: any, createdAt: string, updatedAt: string }> | null, routeTriggers?: Array<{ __typename?: 'RouteTrigger', id: string, path: string, isAuthRequired: boolean, httpMethod: HttpMethod, forwardedRequestHeaders: Array<string>, createdAt: string, updatedAt: string }> | null }> } };
|
||||
export type FindOneApplicationQuery = { __typename?: 'Query', findOneApplication: { __typename?: 'Application', id: string, name: string, description: string, version: string, universalIdentifier: string, canBeUninstalled: boolean, applicationVariables: Array<{ __typename?: 'ApplicationVariable', id: string, key: string, value: string, description: string, isSecret: boolean }>, agents: Array<{ __typename?: 'Agent', id: string, name: string, label: string, description?: string | null, icon?: string | null, prompt: string, modelId: string, responseFormat?: any | null, roleId?: string | null, isCustom: boolean, modelConfiguration?: any | null, evaluationInputs: Array<string>, applicationId?: string | null, createdAt: string, updatedAt: string }>, objects: Array<{ __typename?: 'Object', id: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIReadOnly: boolean, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId: string, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, duplicateCriteria?: Array<Array<string>> | null, indexMetadataList: Array<{ __typename?: 'Index', id: string, createdAt: string, updatedAt: string, name: string, indexWhereClause?: string | null, indexType: IndexType, isUnique: boolean, isCustom?: boolean | null, indexFieldMetadataList: Array<{ __typename?: 'IndexField', id: string, fieldMetadataId: string, createdAt: string, updatedAt: string, order: number }> }>, fieldsList: Array<{ __typename?: 'Field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isUIReadOnly?: boolean | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId: string, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> }>, serverlessFunctions: Array<{ __typename?: 'ServerlessFunction', id: string, name: string, description?: string | null, runtime: string, timeoutSeconds: number, latestVersion?: string | null, publishedVersions: Array<string>, handlerPath: string, handlerName: string, toolInputSchema?: any | null, isTool: boolean, applicationId?: string | null, createdAt: string, updatedAt: string, cronTriggers?: Array<{ __typename?: 'CronTrigger', id: string, settings: any, createdAt: string, updatedAt: string }> | null, databaseEventTriggers?: Array<{ __typename?: 'DatabaseEventTrigger', id: string, settings: any, createdAt: string, updatedAt: string }> | null, routeTriggers?: Array<{ __typename?: 'RouteTrigger', id: string, path: string, isAuthRequired: boolean, httpMethod: HttpMethod, forwardedRequestHeaders: Array<string>, createdAt: string, updatedAt: string }> | null }> } };
|
||||
|
||||
export type UploadFileMutationVariables = Exact<{
|
||||
file: Scalars['Upload'];
|
||||
@@ -6010,7 +6010,7 @@ export type DeleteFileMutationVariables = Exact<{
|
||||
|
||||
export type DeleteFileMutation = { __typename?: 'Mutation', deleteFile: { __typename?: 'File', id: string, path: string, size: number, createdAt: string } };
|
||||
|
||||
export type ObjectMetadataFieldsFragment = { __typename?: 'Object', id: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIReadOnly: boolean, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId?: string | null, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, duplicateCriteria?: Array<Array<string>> | null, indexMetadataList: Array<{ __typename?: 'Index', id: string, createdAt: string, updatedAt: string, name: string, indexWhereClause?: string | null, indexType: IndexType, isUnique: boolean, isCustom?: boolean | null, indexFieldMetadataList: Array<{ __typename?: 'IndexField', id: string, fieldMetadataId: string, createdAt: string, updatedAt: string, order: number }> }>, fieldsList: Array<{ __typename?: 'Field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isUIReadOnly?: boolean | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId?: string | null, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> };
|
||||
export type ObjectMetadataFieldsFragment = { __typename?: 'Object', id: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIReadOnly: boolean, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId: string, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, duplicateCriteria?: Array<Array<string>> | null, indexMetadataList: Array<{ __typename?: 'Index', id: string, createdAt: string, updatedAt: string, name: string, indexWhereClause?: string | null, indexType: IndexType, isUnique: boolean, isCustom?: boolean | null, indexFieldMetadataList: Array<{ __typename?: 'IndexField', id: string, fieldMetadataId: string, createdAt: string, updatedAt: string, order: number }> }>, fieldsList: Array<{ __typename?: 'Field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isUIReadOnly?: boolean | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId: string, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> };
|
||||
|
||||
export type CreateOneObjectMetadataItemMutationVariables = Exact<{
|
||||
input: CreateOneObjectInput;
|
||||
@@ -6024,7 +6024,7 @@ export type CreateOneFieldMetadataItemMutationVariables = Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type CreateOneFieldMetadataItemMutation = { __typename?: 'Mutation', createOneField: { __typename?: 'Field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isUnique?: boolean | null, isNullable?: boolean | null, createdAt: string, updatedAt: string, settings?: any | null, defaultValue?: any | null, options?: any | null, isLabelSyncedWithName?: boolean | null, applicationId?: string | null, object?: { __typename?: 'Object', id: string } | null } };
|
||||
export type CreateOneFieldMetadataItemMutation = { __typename?: 'Mutation', createOneField: { __typename?: 'Field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isUnique?: boolean | null, isNullable?: boolean | null, createdAt: string, updatedAt: string, settings?: any | null, defaultValue?: any | null, options?: any | null, isLabelSyncedWithName?: boolean | null, applicationId: string, object?: { __typename?: 'Object', id: string } | null } };
|
||||
|
||||
export type UpdateOneFieldMetadataItemMutationVariables = Exact<{
|
||||
idToUpdate: Scalars['UUID'];
|
||||
@@ -6032,7 +6032,7 @@ export type UpdateOneFieldMetadataItemMutationVariables = Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type UpdateOneFieldMetadataItemMutation = { __typename?: 'Mutation', updateOneField: { __typename?: 'Field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isUnique?: boolean | null, isNullable?: boolean | null, createdAt: string, updatedAt: string, settings?: any | null, isLabelSyncedWithName?: boolean | null, applicationId?: string | null, object?: { __typename?: 'Object', id: string } | null } };
|
||||
export type UpdateOneFieldMetadataItemMutation = { __typename?: 'Mutation', updateOneField: { __typename?: 'Field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isUnique?: boolean | null, isNullable?: boolean | null, createdAt: string, updatedAt: string, settings?: any | null, isLabelSyncedWithName?: boolean | null, applicationId: string, object?: { __typename?: 'Object', id: string } | null } };
|
||||
|
||||
export type UpdateOneObjectMetadataItemMutationVariables = Exact<{
|
||||
idToUpdate: Scalars['UUID'];
|
||||
@@ -6054,12 +6054,12 @@ export type DeleteOneFieldMetadataItemMutationVariables = Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type DeleteOneFieldMetadataItemMutation = { __typename?: 'Mutation', deleteOneField: { __typename?: 'Field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isUnique?: boolean | null, isNullable?: boolean | null, createdAt: string, updatedAt: string, settings?: any | null, applicationId?: string | null, object?: { __typename?: 'Object', id: string } | null } };
|
||||
export type DeleteOneFieldMetadataItemMutation = { __typename?: 'Mutation', deleteOneField: { __typename?: 'Field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isUnique?: boolean | null, isNullable?: boolean | null, createdAt: string, updatedAt: string, settings?: any | null, applicationId: string, object?: { __typename?: 'Object', id: string } | null } };
|
||||
|
||||
export type ObjectMetadataItemsQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type ObjectMetadataItemsQuery = { __typename?: 'Query', objects: { __typename?: 'ObjectConnection', edges: Array<{ __typename?: 'ObjectEdge', node: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIReadOnly: boolean, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId?: string | null, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, duplicateCriteria?: Array<Array<string>> | null, indexMetadataList: Array<{ __typename?: 'Index', id: string, createdAt: string, updatedAt: string, name: string, indexWhereClause?: string | null, indexType: IndexType, isUnique: boolean, isCustom?: boolean | null, indexFieldMetadataList: Array<{ __typename?: 'IndexField', id: string, fieldMetadataId: string, createdAt: string, updatedAt: string, order: number }> }>, fieldsList: Array<{ __typename?: 'Field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isUIReadOnly?: boolean | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId?: string | null, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> } }>, pageInfo: { __typename?: 'PageInfo', hasNextPage?: boolean | null, hasPreviousPage?: boolean | null, startCursor?: any | null, endCursor?: any | null } } };
|
||||
export type ObjectMetadataItemsQuery = { __typename?: 'Query', objects: { __typename?: 'ObjectConnection', edges: Array<{ __typename?: 'ObjectEdge', node: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, isUIReadOnly: boolean, createdAt: string, updatedAt: string, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, applicationId: string, shortcut?: string | null, isLabelSyncedWithName: boolean, isSearchable: boolean, duplicateCriteria?: Array<Array<string>> | null, indexMetadataList: Array<{ __typename?: 'Index', id: string, createdAt: string, updatedAt: string, name: string, indexWhereClause?: string | null, indexType: IndexType, isUnique: boolean, isCustom?: boolean | null, indexFieldMetadataList: Array<{ __typename?: 'IndexField', id: string, fieldMetadataId: string, createdAt: string, updatedAt: string, order: number }> }>, fieldsList: Array<{ __typename?: 'Field', id: string, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isUIReadOnly?: boolean | null, isNullable?: boolean | null, isUnique?: boolean | null, createdAt: string, updatedAt: string, defaultValue?: any | null, options?: any | null, settings?: any | null, isLabelSyncedWithName?: boolean | null, morphId?: string | null, applicationId: string, relation?: { __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } } | null, morphRelations?: Array<{ __typename?: 'Relation', type: RelationType, sourceObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, targetObjectMetadata: { __typename?: 'Object', id: string, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'Field', id: string, name: string }, targetFieldMetadata: { __typename?: 'Field', id: string, name: string } }> | null }> } }>, pageInfo: { __typename?: 'PageInfo', hasNextPage?: boolean | null, hasPreviousPage?: boolean | null, startCursor?: any | null, endCursor?: any | null } } };
|
||||
|
||||
export type SkipBookOnboardingStepMutationVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@@ -1437,7 +1437,7 @@ export enum FeatureFlagKey {
|
||||
|
||||
export type Field = {
|
||||
__typename?: 'Field';
|
||||
applicationId?: Maybe<Scalars['UUID']>;
|
||||
applicationId: Scalars['UUID'];
|
||||
createdAt: Scalars['DateTime'];
|
||||
defaultValue?: Maybe<Scalars['JSON']>;
|
||||
description?: Maybe<Scalars['String']>;
|
||||
@@ -3074,7 +3074,7 @@ export type NotesConfiguration = {
|
||||
|
||||
export type Object = {
|
||||
__typename?: 'Object';
|
||||
applicationId?: Maybe<Scalars['UUID']>;
|
||||
applicationId: Scalars['UUID'];
|
||||
createdAt: Scalars['DateTime'];
|
||||
description?: Maybe<Scalars['String']>;
|
||||
duplicateCriteria?: Maybe<Array<Array<Scalars['String']>>>;
|
||||
|
||||
+1
-2
@@ -43,8 +43,7 @@ export class WorkspaceFlatCronTriggerMapCacheService extends WorkspaceCacheProvi
|
||||
cronTriggerEntity,
|
||||
getMetadataEntityRelationProperties('cronTrigger'),
|
||||
),
|
||||
universalIdentifier:
|
||||
cronTriggerEntity.universalIdentifier ?? cronTriggerEntity.id,
|
||||
universalIdentifier: cronTriggerEntity.universalIdentifier,
|
||||
createdAt: cronTriggerEntity.createdAt.toISOString(),
|
||||
updatedAt: cronTriggerEntity.updatedAt.toISOString(),
|
||||
} satisfies FlatCronTrigger;
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ export const fromCreateCronTriggerInputToFlatCronTrigger = ({
|
||||
|
||||
return {
|
||||
id,
|
||||
universalIdentifier: createCronTriggerInput.universalIdentifier ?? id,
|
||||
universalIdentifier: createCronTriggerInput.universalIdentifier ?? v4(),
|
||||
settings: createCronTriggerInput.settings,
|
||||
serverlessFunctionId: createCronTriggerInput.serverlessFunctionId,
|
||||
applicationId: workspaceCustomApplicationId,
|
||||
|
||||
+1
-3
@@ -44,9 +44,7 @@ export class WorkspaceFlatDatabaseEventTriggerMapCacheService extends WorkspaceC
|
||||
databaseEventTriggerEntity,
|
||||
getMetadataEntityRelationProperties('databaseEventTrigger'),
|
||||
),
|
||||
universalIdentifier:
|
||||
databaseEventTriggerEntity.universalIdentifier ??
|
||||
databaseEventTriggerEntity.id,
|
||||
universalIdentifier: databaseEventTriggerEntity.universalIdentifier,
|
||||
createdAt: databaseEventTriggerEntity.createdAt.toISOString(),
|
||||
updatedAt: databaseEventTriggerEntity.updatedAt.toISOString(),
|
||||
} satisfies FlatDatabaseEventTrigger;
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ export const fromCreateDatabaseEventTriggerInputToFlatDatabaseEventTrigger = ({
|
||||
return {
|
||||
id,
|
||||
universalIdentifier:
|
||||
createDatabaseEventTriggerInput.universalIdentifier ?? id,
|
||||
createDatabaseEventTriggerInput.universalIdentifier ?? uuidV4(),
|
||||
settings: createDatabaseEventTriggerInput.settings,
|
||||
serverlessFunctionId: createDatabaseEventTriggerInput.serverlessFunctionId,
|
||||
workspaceId,
|
||||
|
||||
+2
-3
@@ -166,7 +166,6 @@ export class FieldMetadataDTO<T extends FieldMetadataType = FieldMetadataType> {
|
||||
@Field()
|
||||
updatedAt: Date;
|
||||
|
||||
// TODO prastoin make non nullable once MakeFieldMetadataUniversalIdentifierAndApplicationIdNotNullableMigrationCommand has passed in production @Field(() => UUIDScalarType, { nullable: true })
|
||||
@Field(() => UUIDScalarType, { nullable: true })
|
||||
applicationId?: string;
|
||||
@Field(() => UUIDScalarType)
|
||||
applicationId: string;
|
||||
}
|
||||
|
||||
+1
-2
@@ -19,8 +19,7 @@ export const transformAgentEntityToFlatAgent = (
|
||||
responseFormat: agentEntity.responseFormat,
|
||||
workspaceId: agentEntity.workspaceId,
|
||||
isCustom: agentEntity.isCustom,
|
||||
// TODO remove once MakeAgentUniversalIdentifierAndApplicationIdNotNullableMigrationCommand has been run once
|
||||
universalIdentifier: agentEntity.universalIdentifier ?? agentEntity.id,
|
||||
universalIdentifier: agentEntity.universalIdentifier,
|
||||
applicationId: agentEntity.applicationId,
|
||||
modelConfiguration: agentEntity.modelConfiguration,
|
||||
evaluationInputs: agentEntity.evaluationInputs,
|
||||
|
||||
+1
-5
@@ -18,11 +18,7 @@ export const fromFieldMetadataEntityToFlatFieldMetadata = <
|
||||
|
||||
return {
|
||||
...fieldMetadataWithoutRelations,
|
||||
// TODO remove once MakeFieldMetadataUniversalIdentifierAndApplicationIdNotNullableMigrationCommand has been run once
|
||||
universalIdentifier:
|
||||
fieldMetadataWithoutRelations.universalIdentifier ??
|
||||
fieldMetadataWithoutRelations.standardId ??
|
||||
fieldMetadataWithoutRelations.id,
|
||||
universalIdentifier: fieldMetadataWithoutRelations.universalIdentifier,
|
||||
createdAt: fieldMetadataWithoutRelations.createdAt.toISOString(),
|
||||
updatedAt: fieldMetadataWithoutRelations.updatedAt.toISOString(),
|
||||
kanbanAggregateOperationViewIds:
|
||||
|
||||
+2
-2
@@ -1,4 +1,5 @@
|
||||
import { extractAndSanitizeObjectStringFields } from 'twenty-shared/utils';
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
import { type CreateFieldInput } from 'src/engine/metadata-modules/field-metadata/dtos/create-field.input';
|
||||
import { generateDefaultValue } from 'src/engine/metadata-modules/field-metadata/utils/generate-default-value';
|
||||
@@ -48,8 +49,7 @@ export const getDefaultFlatFieldMetadata = ({
|
||||
standardId: createFieldInput.standardId ?? null,
|
||||
standardOverrides: null,
|
||||
type: createFieldInput.type,
|
||||
universalIdentifier:
|
||||
createFieldInput.universalIdentifier ?? fieldMetadataId,
|
||||
universalIdentifier: createFieldInput.universalIdentifier ?? v4(),
|
||||
workspaceId,
|
||||
options: createFieldInput.options ?? null,
|
||||
defaultValue: defaultValue ?? generateDefaultValue(createFieldInput.type),
|
||||
|
||||
+1
-2
@@ -17,8 +17,7 @@ export const fromIndexMetadataEntityToFlatIndexMetadata = (
|
||||
createdAt: indexMetadataEntity.createdAt.toISOString(),
|
||||
updatedAt: indexMetadataEntity.updatedAt.toISOString(),
|
||||
universalIdentifier:
|
||||
indexMetadataEntityWithoutRelations.universalIdentifier ??
|
||||
indexMetadataEntityWithoutRelations.id,
|
||||
indexMetadataEntityWithoutRelations.universalIdentifier,
|
||||
flatIndexFieldMetadatas: indexMetadataEntity.indexFieldMetadatas.map(
|
||||
(indexFieldMetadata) => ({
|
||||
...removePropertiesFromRecord(indexFieldMetadata, [
|
||||
|
||||
+1
-2
@@ -96,8 +96,7 @@ export const fromCreateObjectInputToFlatObjectMetadataAndFlatFieldMetadatasToCre
|
||||
standardId: createObjectInput.standardId ?? null,
|
||||
standardOverrides: null,
|
||||
applicationId: workspaceCustomApplicationId,
|
||||
universalIdentifier:
|
||||
createObjectInput.universalIdentifier ?? objectMetadataId,
|
||||
universalIdentifier: createObjectInput.universalIdentifier ?? v4(),
|
||||
targetTableName: 'DEPRECATED',
|
||||
workspaceId,
|
||||
};
|
||||
|
||||
+2
@@ -27,6 +27,7 @@ export const fromFlatObjectMetadataToObjectMetadataDto = (
|
||||
workspaceId,
|
||||
imageIdentifierFieldMetadataId,
|
||||
labelIdentifierFieldMetadataId,
|
||||
applicationId,
|
||||
} = flatObjectMetadata;
|
||||
|
||||
return {
|
||||
@@ -52,5 +53,6 @@ export const fromFlatObjectMetadataToObjectMetadataDto = (
|
||||
standardOverrides: standardOverrides ?? undefined,
|
||||
shortcut: shortcut ?? undefined,
|
||||
duplicateCriteria: duplicateCriteria ?? undefined,
|
||||
applicationId,
|
||||
};
|
||||
};
|
||||
|
||||
+1
-4
@@ -14,11 +14,8 @@ export const fromObjectMetadataEntityToFlatObjectMetadata = (
|
||||
|
||||
return {
|
||||
...objectMetadataEntityWithoutRelations,
|
||||
// TODO remove once MakeObjectMetadataUniversalIdentifierAndApplicationIdNotNullableMigrationCommand has been run once
|
||||
universalIdentifier:
|
||||
objectMetadataEntityWithoutRelations.universalIdentifier ??
|
||||
objectMetadataEntityWithoutRelations.standardId ??
|
||||
objectMetadataEntityWithoutRelations.id,
|
||||
objectMetadataEntityWithoutRelations.universalIdentifier,
|
||||
createdAt: objectMetadataEntity.createdAt.toISOString(),
|
||||
updatedAt: objectMetadataEntity.updatedAt.toISOString(),
|
||||
viewIds: objectMetadataEntity.views.map((viewEntity) => viewEntity.id),
|
||||
|
||||
+1
-2
@@ -13,8 +13,7 @@ export const transformPageLayoutTabEntityToFlatPageLayoutTab = (
|
||||
position: pageLayoutTabEntity.position,
|
||||
pageLayoutId: pageLayoutTabEntity.pageLayoutId,
|
||||
workspaceId: pageLayoutTabEntity.workspaceId,
|
||||
universalIdentifier:
|
||||
pageLayoutTabEntity.universalIdentifier ?? pageLayoutTabEntity.id,
|
||||
universalIdentifier: pageLayoutTabEntity.universalIdentifier,
|
||||
applicationId: pageLayoutTabEntity.applicationId,
|
||||
widgetIds: pageLayoutTabEntity.widgets.map((widget) => widget.id),
|
||||
};
|
||||
|
||||
+2
-3
@@ -18,8 +18,7 @@ export const fromPageLayoutWidgetEntityToFlatPageLayoutWidget = (
|
||||
updatedAt: pageLayoutWidgetEntity.updatedAt.toISOString(),
|
||||
deletedAt: pageLayoutWidgetEntity.deletedAt?.toISOString() ?? null,
|
||||
universalIdentifier:
|
||||
pageLayoutWidgetEntityWithoutRelations.universalIdentifier ??
|
||||
pageLayoutWidgetEntityWithoutRelations.id,
|
||||
applicationId: pageLayoutWidgetEntityWithoutRelations.applicationId ?? null,
|
||||
pageLayoutWidgetEntityWithoutRelations.universalIdentifier,
|
||||
applicationId: pageLayoutWidgetEntityWithoutRelations.applicationId,
|
||||
};
|
||||
};
|
||||
|
||||
+1
-2
@@ -13,8 +13,7 @@ export const transformPageLayoutEntityToFlatPageLayout = (
|
||||
type: pageLayoutEntity.type,
|
||||
objectMetadataId: pageLayoutEntity.objectMetadataId,
|
||||
workspaceId: pageLayoutEntity.workspaceId,
|
||||
universalIdentifier:
|
||||
pageLayoutEntity.universalIdentifier ?? pageLayoutEntity.id,
|
||||
universalIdentifier: pageLayoutEntity.universalIdentifier,
|
||||
applicationId: pageLayoutEntity.applicationId,
|
||||
tabIds: pageLayoutEntity.tabs.map((tab) => tab.id),
|
||||
};
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ export const fromRoleTargetsEntityToFlatRoleTarget = (
|
||||
agentId: roleTarget.agentId,
|
||||
apiKeyId: roleTarget.apiKeyId,
|
||||
applicationId: roleTarget.applicationId,
|
||||
universalIdentifier: roleTarget.universalIdentifier ?? roleTarget.id,
|
||||
universalIdentifier: roleTarget.universalIdentifier,
|
||||
createdAt: roleTarget.createdAt.toISOString(),
|
||||
updatedAt: roleTarget.updatedAt.toISOString(),
|
||||
};
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ export const fromCreateRoleInputToFlatRoleToCreate = ({
|
||||
workspaceId,
|
||||
createdAt: now,
|
||||
updatedAt: now,
|
||||
universalIdentifier: createRoleInput.universalIdentifier ?? id,
|
||||
universalIdentifier: createRoleInput.universalIdentifier ?? v4(),
|
||||
applicationId,
|
||||
roleTargetIds: [],
|
||||
objectPermissionIds: [],
|
||||
|
||||
+2
-2
@@ -21,8 +21,8 @@ export const fromRoleEntityToFlatRole = (role: RoleEntity): FlatRole => {
|
||||
workspaceId: role.workspaceId,
|
||||
createdAt: role.createdAt.toISOString(),
|
||||
updatedAt: role.updatedAt.toISOString(),
|
||||
universalIdentifier: role.universalIdentifier ?? role.standardId ?? role.id,
|
||||
applicationId: role.applicationId ?? null,
|
||||
universalIdentifier: role.universalIdentifier,
|
||||
applicationId: role.applicationId,
|
||||
roleTargetIds: role.roleTargets.map((rt) => rt.id),
|
||||
objectPermissionIds: role.objectPermissions.map((op) => op.id),
|
||||
permissionFlagIds: role.permissionFlags.map((pf) => pf.id),
|
||||
|
||||
+1
-2
@@ -22,7 +22,6 @@ export const fromRowLevelPermissionPredicateEntityToFlatRowLevelPermissionPredic
|
||||
deletedAt:
|
||||
rowLevelPermissionPredicateEntity.deletedAt?.toISOString() ?? null,
|
||||
universalIdentifier:
|
||||
rowLevelPermissionPredicateEntityWithoutRelations.universalIdentifier ??
|
||||
rowLevelPermissionPredicateEntityWithoutRelations.id,
|
||||
rowLevelPermissionPredicateEntityWithoutRelations.universalIdentifier,
|
||||
};
|
||||
};
|
||||
|
||||
+1
-2
@@ -22,8 +22,7 @@ export const fromRowLevelPermissionPredicateGroupEntityToFlatRowLevelPermissionP
|
||||
deletedAt:
|
||||
rowLevelPermissionPredicateGroupEntity.deletedAt?.toISOString() ?? null,
|
||||
universalIdentifier:
|
||||
rowLevelPermissionPredicateGroupEntityWithoutRelations.universalIdentifier ??
|
||||
rowLevelPermissionPredicateGroupEntityWithoutRelations.id,
|
||||
rowLevelPermissionPredicateGroupEntityWithoutRelations.universalIdentifier,
|
||||
childRowLevelPermissionPredicateGroupIds: (
|
||||
rowLevelPermissionPredicateGroupEntity.childRowLevelPermissionPredicateGroups ??
|
||||
[]
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ export const fromSkillEntityToFlatSkill = (
|
||||
workspaceId: skillEntity.workspaceId,
|
||||
isCustom: skillEntity.isCustom,
|
||||
isActive: skillEntity.isActive,
|
||||
universalIdentifier: skillEntity.standardId || skillEntity.id,
|
||||
universalIdentifier: skillEntity.universalIdentifier,
|
||||
applicationId: skillEntity.applicationId,
|
||||
};
|
||||
};
|
||||
|
||||
+1
-2
@@ -33,8 +33,7 @@ export const fromCreateViewFieldInputToFlatViewFieldToCreate = ({
|
||||
createdAt: createdAt,
|
||||
updatedAt: createdAt,
|
||||
deletedAt: null,
|
||||
universalIdentifier:
|
||||
createViewFieldInput.universalIdentifier ?? viewFieldId,
|
||||
universalIdentifier: createViewFieldInput.universalIdentifier ?? v4(),
|
||||
isVisible: createViewFieldInput.isVisible ?? true,
|
||||
size: createViewFieldInput.size ?? DEFAULT_VIEW_FIELD_SIZE,
|
||||
position: createViewFieldInput.position ?? 0,
|
||||
|
||||
+1
-3
@@ -17,8 +17,6 @@ export const fromViewFieldEntityToFlatViewField = (
|
||||
createdAt: viewFieldEntity.createdAt.toISOString(),
|
||||
updatedAt: viewFieldEntity.updatedAt.toISOString(),
|
||||
deletedAt: viewFieldEntity.deletedAt?.toISOString() ?? null,
|
||||
universalIdentifier:
|
||||
viewFieldEntityWithoutRelations.universalIdentifier ??
|
||||
viewFieldEntityWithoutRelations.id,
|
||||
universalIdentifier: viewFieldEntityWithoutRelations.universalIdentifier,
|
||||
};
|
||||
};
|
||||
|
||||
+1
-2
@@ -18,8 +18,7 @@ export const fromViewFilterGroupEntityToFlatViewFilterGroup = (
|
||||
updatedAt: viewFilterGroupEntity.updatedAt.toISOString(),
|
||||
deletedAt: viewFilterGroupEntity.deletedAt?.toISOString() ?? null,
|
||||
universalIdentifier:
|
||||
viewFilterGroupEntityWithoutRelations.universalIdentifier ??
|
||||
viewFilterGroupEntityWithoutRelations.id,
|
||||
viewFilterGroupEntityWithoutRelations.universalIdentifier,
|
||||
viewFilterIds:
|
||||
viewFilterGroupEntity.viewFilters?.map((viewFilter) => viewFilter.id) ??
|
||||
[],
|
||||
|
||||
+1
-2
@@ -38,8 +38,7 @@ export const fromCreateViewFilterInputToFlatViewFilterToCreate = ({
|
||||
createdAt: createdAt,
|
||||
updatedAt: createdAt,
|
||||
deletedAt: null,
|
||||
universalIdentifier:
|
||||
createViewFilterInput.universalIdentifier ?? viewFilterId,
|
||||
universalIdentifier: createViewFilterInput.universalIdentifier ?? v4(),
|
||||
operand: createViewFilterInput.operand ?? ViewFilterOperand.CONTAINS,
|
||||
value: value,
|
||||
viewFilterGroupId: createViewFilterInput.viewFilterGroupId ?? null,
|
||||
|
||||
+1
-3
@@ -17,8 +17,6 @@ export const fromViewFilterEntityToFlatViewFilter = (
|
||||
createdAt: viewFilterEntity.createdAt.toISOString(),
|
||||
updatedAt: viewFilterEntity.updatedAt.toISOString(),
|
||||
deletedAt: viewFilterEntity.deletedAt?.toISOString() ?? null,
|
||||
universalIdentifier:
|
||||
viewFilterEntityWithoutRelations.universalIdentifier ??
|
||||
viewFilterEntityWithoutRelations.id,
|
||||
universalIdentifier: viewFilterEntityWithoutRelations.universalIdentifier,
|
||||
};
|
||||
};
|
||||
|
||||
+1
-2
@@ -29,8 +29,7 @@ export const fromCreateViewGroupInputToFlatViewGroupToCreate = ({
|
||||
createdAt: createdAt,
|
||||
updatedAt: createdAt,
|
||||
deletedAt: null,
|
||||
universalIdentifier:
|
||||
createViewGroupInput.universalIdentifier ?? viewGroupId,
|
||||
universalIdentifier: createViewGroupInput.universalIdentifier ?? v4(),
|
||||
isVisible: createViewGroupInput.isVisible ?? true,
|
||||
fieldValue: createViewGroupInput.fieldValue,
|
||||
position: createViewGroupInput.position ?? 0,
|
||||
|
||||
+1
-3
@@ -17,8 +17,6 @@ export const fromViewGroupEntityToFlatViewGroup = (
|
||||
createdAt: viewGroupEntity.createdAt.toISOString(),
|
||||
updatedAt: viewGroupEntity.updatedAt.toISOString(),
|
||||
deletedAt: viewGroupEntity.deletedAt?.toISOString() ?? null,
|
||||
universalIdentifier:
|
||||
viewGroupEntityWithoutRelations.universalIdentifier ??
|
||||
viewGroupEntityWithoutRelations.id,
|
||||
universalIdentifier: viewGroupEntityWithoutRelations.universalIdentifier,
|
||||
};
|
||||
};
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ export const fromCreateViewInputToFlatViewToCreate = ({
|
||||
openRecordIn: createViewInput.openRecordIn ?? ViewOpenRecordIn.SIDE_PANEL,
|
||||
position: createViewInput.position ?? 0,
|
||||
type: createViewInput.type ?? ViewType.TABLE,
|
||||
universalIdentifier: createViewInput.universalIdentifier ?? viewId,
|
||||
universalIdentifier: createViewInput.universalIdentifier ?? v4(),
|
||||
visibility: createViewInput.visibility ?? ViewVisibility.WORKSPACE,
|
||||
createdByUserWorkspaceId: createdByUserWorkspaceId ?? null,
|
||||
viewFieldIds: [],
|
||||
|
||||
+1
-3
@@ -15,9 +15,7 @@ export const fromViewEntityToFlatView = (viewEntity: ViewEntity): FlatView => {
|
||||
createdAt: viewEntity.createdAt.toISOString(),
|
||||
updatedAt: viewEntity.updatedAt.toISOString(),
|
||||
deletedAt: viewEntity.deletedAt?.toISOString() ?? null,
|
||||
universalIdentifier:
|
||||
viewEntityWithoutRelations.universalIdentifier ??
|
||||
viewEntityWithoutRelations.id,
|
||||
universalIdentifier: viewEntityWithoutRelations.universalIdentifier,
|
||||
viewFieldIds: viewEntity.viewFields.map((viewField) => viewField.id),
|
||||
viewFilterIds: viewEntity.viewFilters.map((viewFilter) => viewFilter.id),
|
||||
viewGroupIds: viewEntity.viewGroups.map((viewGroup) => viewGroup.id),
|
||||
|
||||
+2
-2
@@ -77,8 +77,8 @@ export class ObjectMetadataDTO {
|
||||
@HideField()
|
||||
workspaceId: string;
|
||||
|
||||
@Field(() => UUIDScalarType, { nullable: true })
|
||||
applicationId?: string;
|
||||
@Field(() => UUIDScalarType)
|
||||
applicationId: string;
|
||||
|
||||
@Field()
|
||||
createdAt: Date;
|
||||
|
||||
@@ -313,7 +313,7 @@ export class RoleResolver {
|
||||
createdAt: agentEntity.createdAt.toISOString(),
|
||||
updatedAt: agentEntity.updatedAt.toISOString(),
|
||||
deletedAt: agentEntity.deletedAt?.toISOString() ?? null,
|
||||
universalIdentifier: agentEntity.universalIdentifier ?? agentEntity.id,
|
||||
universalIdentifier: agentEntity.universalIdentifier,
|
||||
roleId: role.id,
|
||||
}),
|
||||
);
|
||||
|
||||
+1
-1
@@ -35,6 +35,6 @@ export const fromFlatRoleToRoleDto = ({
|
||||
description: description ?? undefined,
|
||||
icon: icon ?? undefined,
|
||||
standardId: standardId ?? undefined,
|
||||
universalIdentifier: universalIdentifier ?? undefined,
|
||||
universalIdentifier,
|
||||
};
|
||||
};
|
||||
|
||||
+1
-2
@@ -46,8 +46,7 @@ export class WorkspaceFlatRouteTriggerMapCacheService extends WorkspaceCacheProv
|
||||
...routeTriggerEntityWithoutRelations,
|
||||
createdAt: routeTriggerEntity.createdAt.toISOString(),
|
||||
updatedAt: routeTriggerEntity.updatedAt.toISOString(),
|
||||
universalIdentifier:
|
||||
routeTriggerEntity.universalIdentifier ?? routeTriggerEntity.id,
|
||||
universalIdentifier: routeTriggerEntity.universalIdentifier,
|
||||
} satisfies FlatRouteTrigger;
|
||||
|
||||
addFlatEntityToFlatEntityMapsThroughMutationOrThrow({
|
||||
|
||||
+2
-1
@@ -17,7 +17,8 @@ export const fromCreateRouteTriggerInputToFlatRouteTrigger = ({
|
||||
|
||||
return {
|
||||
id,
|
||||
universalIdentifier: createRouteTriggerInput.universalIdentifier ?? id,
|
||||
universalIdentifier:
|
||||
createRouteTriggerInput.universalIdentifier ?? uuidV4(),
|
||||
path: createRouteTriggerInput.path,
|
||||
isAuthRequired: createRouteTriggerInput.isAuthRequired,
|
||||
httpMethod: createRouteTriggerInput.httpMethod,
|
||||
|
||||
+1
-3
@@ -28,8 +28,6 @@ export const fromServerlessFunctionEntityToFlatServerlessFunction = (
|
||||
serverlessFunctionEntity.routeTriggers.map((el) => el.id) ?? [],
|
||||
databaseEventTriggerIds:
|
||||
serverlessFunctionEntity.databaseEventTriggers.map((el) => el.id) ?? [],
|
||||
universalIdentifier:
|
||||
serverlessFunctionEntity.universalIdentifier ??
|
||||
serverlessFunctionEntity.id,
|
||||
universalIdentifier: serverlessFunctionEntity.universalIdentifier,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user