Fix ObjectType casing and conflict between Relation and RelationMetadata (#9849)
Fixes #9827 Also uncovered a conflict with `@objectType('Relation')` and `@objectType('relation)` I don't want to address it in this PR so I will create a followup issue when we close this but I think there's a confusion between Relation/RelationMetadata, it's unclear what is what --------- Co-authored-by: Antoine Moreaux <moreaux.antoine@gmail.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
|||||||
import * as Apollo from '@apollo/client';
|
|
||||||
import { gql } from '@apollo/client';
|
import { gql } from '@apollo/client';
|
||||||
|
import * as Apollo from '@apollo/client';
|
||||||
export type Maybe<T> = T | null;
|
export type Maybe<T> = T | null;
|
||||||
export type InputMaybe<T> = Maybe<T>;
|
export type InputMaybe<T> = Maybe<T>;
|
||||||
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
|
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
|
||||||
@ -401,6 +401,32 @@ export enum FeatureFlagKey {
|
|||||||
IsWorkflowEnabled = 'IsWorkflowEnabled'
|
IsWorkflowEnabled = 'IsWorkflowEnabled'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type Field = {
|
||||||
|
__typename?: 'Field';
|
||||||
|
createdAt: Scalars['DateTime'];
|
||||||
|
defaultValue?: Maybe<Scalars['JSON']>;
|
||||||
|
description?: Maybe<Scalars['String']>;
|
||||||
|
fromRelationMetadata?: Maybe<RelationMetadata>;
|
||||||
|
icon?: Maybe<Scalars['String']>;
|
||||||
|
id: Scalars['UUID'];
|
||||||
|
isActive?: Maybe<Scalars['Boolean']>;
|
||||||
|
isCustom?: Maybe<Scalars['Boolean']>;
|
||||||
|
isLabelSyncedWithName?: Maybe<Scalars['Boolean']>;
|
||||||
|
isNullable?: Maybe<Scalars['Boolean']>;
|
||||||
|
isSystem?: Maybe<Scalars['Boolean']>;
|
||||||
|
isUnique?: Maybe<Scalars['Boolean']>;
|
||||||
|
label: Scalars['String'];
|
||||||
|
name: Scalars['String'];
|
||||||
|
object?: Maybe<Object>;
|
||||||
|
options?: Maybe<Scalars['JSON']>;
|
||||||
|
relation?: Maybe<Relation>;
|
||||||
|
relationDefinition?: Maybe<RelationDefinition>;
|
||||||
|
settings?: Maybe<Scalars['JSON']>;
|
||||||
|
toRelationMetadata?: Maybe<RelationMetadata>;
|
||||||
|
type: FieldMetadataType;
|
||||||
|
updatedAt: Scalars['DateTime'];
|
||||||
|
};
|
||||||
|
|
||||||
export type FieldConnection = {
|
export type FieldConnection = {
|
||||||
__typename?: 'FieldConnection';
|
__typename?: 'FieldConnection';
|
||||||
/** Array of edges. */
|
/** Array of edges. */
|
||||||
@ -409,6 +435,23 @@ export type FieldConnection = {
|
|||||||
pageInfo: PageInfo;
|
pageInfo: PageInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type FieldEdge = {
|
||||||
|
__typename?: 'FieldEdge';
|
||||||
|
/** Cursor for this node. */
|
||||||
|
cursor: Scalars['ConnectionCursor'];
|
||||||
|
/** The node containing the Field */
|
||||||
|
node: Field;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type FieldFilter = {
|
||||||
|
and?: InputMaybe<Array<FieldFilter>>;
|
||||||
|
id?: InputMaybe<UuidFilterComparison>;
|
||||||
|
isActive?: InputMaybe<BooleanFieldComparison>;
|
||||||
|
isCustom?: InputMaybe<BooleanFieldComparison>;
|
||||||
|
isSystem?: InputMaybe<BooleanFieldComparison>;
|
||||||
|
or?: InputMaybe<Array<FieldFilter>>;
|
||||||
|
};
|
||||||
|
|
||||||
/** Type of the field */
|
/** Type of the field */
|
||||||
export enum FieldMetadataType {
|
export enum FieldMetadataType {
|
||||||
ACTOR = 'ACTOR',
|
ACTOR = 'ACTOR',
|
||||||
@ -489,6 +532,32 @@ export type ImpersonateOutput = {
|
|||||||
workspace: WorkspaceSubdomainAndId;
|
workspace: WorkspaceSubdomainAndId;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type Index = {
|
||||||
|
__typename?: 'Index';
|
||||||
|
createdAt: Scalars['DateTime'];
|
||||||
|
id: Scalars['UUID'];
|
||||||
|
indexFieldMetadatas: IndexIndexFieldMetadatasConnection;
|
||||||
|
indexType: IndexType;
|
||||||
|
indexWhereClause?: Maybe<Scalars['String']>;
|
||||||
|
isCustom?: Maybe<Scalars['Boolean']>;
|
||||||
|
isUnique: Scalars['Boolean'];
|
||||||
|
name: Scalars['String'];
|
||||||
|
objectMetadata: IndexObjectMetadataConnection;
|
||||||
|
updatedAt: Scalars['DateTime'];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type IndexIndexFieldMetadatasArgs = {
|
||||||
|
filter?: IndexFieldFilter;
|
||||||
|
paging?: CursorPaging;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type IndexObjectMetadataArgs = {
|
||||||
|
filter?: ObjectFilter;
|
||||||
|
paging?: CursorPaging;
|
||||||
|
};
|
||||||
|
|
||||||
export type IndexConnection = {
|
export type IndexConnection = {
|
||||||
__typename?: 'IndexConnection';
|
__typename?: 'IndexConnection';
|
||||||
/** Array of edges. */
|
/** Array of edges. */
|
||||||
@ -497,6 +566,45 @@ export type IndexConnection = {
|
|||||||
pageInfo: PageInfo;
|
pageInfo: PageInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type IndexEdge = {
|
||||||
|
__typename?: 'IndexEdge';
|
||||||
|
/** Cursor for this node. */
|
||||||
|
cursor: Scalars['ConnectionCursor'];
|
||||||
|
/** The node containing the Index */
|
||||||
|
node: Index;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type IndexField = {
|
||||||
|
__typename?: 'IndexField';
|
||||||
|
createdAt: Scalars['DateTime'];
|
||||||
|
fieldMetadataId: Scalars['UUID'];
|
||||||
|
id: Scalars['UUID'];
|
||||||
|
order: Scalars['Float'];
|
||||||
|
updatedAt: Scalars['DateTime'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type IndexFieldEdge = {
|
||||||
|
__typename?: 'IndexFieldEdge';
|
||||||
|
/** Cursor for this node. */
|
||||||
|
cursor: Scalars['ConnectionCursor'];
|
||||||
|
/** The node containing the IndexField */
|
||||||
|
node: IndexField;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type IndexFieldFilter = {
|
||||||
|
and?: InputMaybe<Array<IndexFieldFilter>>;
|
||||||
|
fieldMetadataId?: InputMaybe<UuidFilterComparison>;
|
||||||
|
id?: InputMaybe<UuidFilterComparison>;
|
||||||
|
or?: InputMaybe<Array<IndexFieldFilter>>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type IndexFilter = {
|
||||||
|
and?: InputMaybe<Array<IndexFilter>>;
|
||||||
|
id?: InputMaybe<UuidFilterComparison>;
|
||||||
|
isCustom?: InputMaybe<BooleanFieldComparison>;
|
||||||
|
or?: InputMaybe<Array<IndexFilter>>;
|
||||||
|
};
|
||||||
|
|
||||||
export type IndexIndexFieldMetadatasConnection = {
|
export type IndexIndexFieldMetadatasConnection = {
|
||||||
__typename?: 'IndexIndexFieldMetadatasConnection';
|
__typename?: 'IndexIndexFieldMetadatasConnection';
|
||||||
/** Array of edges. */
|
/** Array of edges. */
|
||||||
@ -871,6 +979,42 @@ export type MutationUserLookupAdminPanelArgs = {
|
|||||||
userIdentifier: Scalars['String'];
|
userIdentifier: Scalars['String'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type Object = {
|
||||||
|
__typename?: 'Object';
|
||||||
|
createdAt: Scalars['DateTime'];
|
||||||
|
dataSourceId: Scalars['String'];
|
||||||
|
description?: Maybe<Scalars['String']>;
|
||||||
|
fields: ObjectFieldsConnection;
|
||||||
|
icon?: Maybe<Scalars['String']>;
|
||||||
|
id: Scalars['UUID'];
|
||||||
|
imageIdentifierFieldMetadataId?: Maybe<Scalars['String']>;
|
||||||
|
indexMetadatas: ObjectIndexMetadatasConnection;
|
||||||
|
isActive: Scalars['Boolean'];
|
||||||
|
isCustom: Scalars['Boolean'];
|
||||||
|
isLabelSyncedWithName: Scalars['Boolean'];
|
||||||
|
isRemote: Scalars['Boolean'];
|
||||||
|
isSystem: Scalars['Boolean'];
|
||||||
|
labelIdentifierFieldMetadataId?: Maybe<Scalars['String']>;
|
||||||
|
labelPlural: Scalars['String'];
|
||||||
|
labelSingular: Scalars['String'];
|
||||||
|
namePlural: Scalars['String'];
|
||||||
|
nameSingular: Scalars['String'];
|
||||||
|
shortcut?: Maybe<Scalars['String']>;
|
||||||
|
updatedAt: Scalars['DateTime'];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type ObjectFieldsArgs = {
|
||||||
|
filter?: FieldFilter;
|
||||||
|
paging?: CursorPaging;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type ObjectIndexMetadatasArgs = {
|
||||||
|
filter?: IndexFilter;
|
||||||
|
paging?: CursorPaging;
|
||||||
|
};
|
||||||
|
|
||||||
export type ObjectConnection = {
|
export type ObjectConnection = {
|
||||||
__typename?: 'ObjectConnection';
|
__typename?: 'ObjectConnection';
|
||||||
/** Array of edges. */
|
/** Array of edges. */
|
||||||
@ -879,6 +1023,14 @@ export type ObjectConnection = {
|
|||||||
pageInfo: PageInfo;
|
pageInfo: PageInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type ObjectEdge = {
|
||||||
|
__typename?: 'ObjectEdge';
|
||||||
|
/** Cursor for this node. */
|
||||||
|
cursor: Scalars['ConnectionCursor'];
|
||||||
|
/** The node containing the Object */
|
||||||
|
node: Object;
|
||||||
|
};
|
||||||
|
|
||||||
export type ObjectFieldsConnection = {
|
export type ObjectFieldsConnection = {
|
||||||
__typename?: 'ObjectFieldsConnection';
|
__typename?: 'ObjectFieldsConnection';
|
||||||
/** Array of edges. */
|
/** Array of edges. */
|
||||||
@ -887,6 +1039,16 @@ export type ObjectFieldsConnection = {
|
|||||||
pageInfo: PageInfo;
|
pageInfo: PageInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type ObjectFilter = {
|
||||||
|
and?: InputMaybe<Array<ObjectFilter>>;
|
||||||
|
id?: InputMaybe<UuidFilterComparison>;
|
||||||
|
isActive?: InputMaybe<BooleanFieldComparison>;
|
||||||
|
isCustom?: InputMaybe<BooleanFieldComparison>;
|
||||||
|
isRemote?: InputMaybe<BooleanFieldComparison>;
|
||||||
|
isSystem?: InputMaybe<BooleanFieldComparison>;
|
||||||
|
or?: InputMaybe<Array<ObjectFilter>>;
|
||||||
|
};
|
||||||
|
|
||||||
export type ObjectIndexMetadatasConnection = {
|
export type ObjectIndexMetadatasConnection = {
|
||||||
__typename?: 'ObjectIndexMetadatasConnection';
|
__typename?: 'ObjectIndexMetadatasConnection';
|
||||||
/** Array of edges. */
|
/** Array of edges. */
|
||||||
@ -1079,14 +1241,6 @@ export type Relation = {
|
|||||||
type: RelationType;
|
type: RelationType;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type RelationConnection = {
|
|
||||||
__typename?: 'RelationConnection';
|
|
||||||
/** Array of edges. */
|
|
||||||
edges: Array<RelationEdge>;
|
|
||||||
/** Paging information */
|
|
||||||
pageInfo: PageInfo;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type RelationDefinition = {
|
export type RelationDefinition = {
|
||||||
__typename?: 'RelationDefinition';
|
__typename?: 'RelationDefinition';
|
||||||
direction: RelationDefinitionType;
|
direction: RelationDefinitionType;
|
||||||
@ -1105,6 +1259,36 @@ export enum RelationDefinitionType {
|
|||||||
ONE_TO_ONE = 'ONE_TO_ONE'
|
ONE_TO_ONE = 'ONE_TO_ONE'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type RelationMetadata = {
|
||||||
|
__typename?: 'RelationMetadata';
|
||||||
|
createdAt: Scalars['DateTime'];
|
||||||
|
fromFieldMetadataId: Scalars['String'];
|
||||||
|
fromObjectMetadata: Object;
|
||||||
|
fromObjectMetadataId: Scalars['String'];
|
||||||
|
id: Scalars['UUID'];
|
||||||
|
relationType: RelationMetadataType;
|
||||||
|
toFieldMetadataId: Scalars['String'];
|
||||||
|
toObjectMetadata: Object;
|
||||||
|
toObjectMetadataId: Scalars['String'];
|
||||||
|
updatedAt: Scalars['DateTime'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type RelationMetadataConnection = {
|
||||||
|
__typename?: 'RelationMetadataConnection';
|
||||||
|
/** Array of edges. */
|
||||||
|
edges: Array<RelationMetadataEdge>;
|
||||||
|
/** Paging information */
|
||||||
|
pageInfo: PageInfo;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type RelationMetadataEdge = {
|
||||||
|
__typename?: 'RelationMetadataEdge';
|
||||||
|
/** Cursor for this node. */
|
||||||
|
cursor: Scalars['ConnectionCursor'];
|
||||||
|
/** The node containing the RelationMetadata */
|
||||||
|
node: RelationMetadata;
|
||||||
|
};
|
||||||
|
|
||||||
/** Type of the relation */
|
/** Type of the relation */
|
||||||
export enum RelationMetadataType {
|
export enum RelationMetadataType {
|
||||||
MANY_TO_MANY = 'MANY_TO_MANY',
|
MANY_TO_MANY = 'MANY_TO_MANY',
|
||||||
@ -1668,176 +1852,6 @@ export type WorkspaceSubdomainAndId = {
|
|||||||
subdomain: Scalars['String'];
|
subdomain: Scalars['String'];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Field = {
|
|
||||||
__typename?: 'field';
|
|
||||||
createdAt: Scalars['DateTime'];
|
|
||||||
defaultValue?: Maybe<Scalars['JSON']>;
|
|
||||||
description?: Maybe<Scalars['String']>;
|
|
||||||
fromRelationMetadata?: Maybe<Relation>;
|
|
||||||
icon?: Maybe<Scalars['String']>;
|
|
||||||
id: Scalars['UUID'];
|
|
||||||
isActive?: Maybe<Scalars['Boolean']>;
|
|
||||||
isCustom?: Maybe<Scalars['Boolean']>;
|
|
||||||
isLabelSyncedWithName?: Maybe<Scalars['Boolean']>;
|
|
||||||
isNullable?: Maybe<Scalars['Boolean']>;
|
|
||||||
isSystem?: Maybe<Scalars['Boolean']>;
|
|
||||||
isUnique?: Maybe<Scalars['Boolean']>;
|
|
||||||
label: Scalars['String'];
|
|
||||||
name: Scalars['String'];
|
|
||||||
object?: Maybe<Object>;
|
|
||||||
options?: Maybe<Scalars['JSON']>;
|
|
||||||
relation?: Maybe<Relation>;
|
|
||||||
relationDefinition?: Maybe<RelationDefinition>;
|
|
||||||
settings?: Maybe<Scalars['JSON']>;
|
|
||||||
toRelationMetadata?: Maybe<Relation>;
|
|
||||||
type: FieldMetadataType;
|
|
||||||
updatedAt: Scalars['DateTime'];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type FieldEdge = {
|
|
||||||
__typename?: 'fieldEdge';
|
|
||||||
/** Cursor for this node. */
|
|
||||||
cursor: Scalars['ConnectionCursor'];
|
|
||||||
/** The node containing the field */
|
|
||||||
node: Field;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type FieldFilter = {
|
|
||||||
and?: InputMaybe<Array<FieldFilter>>;
|
|
||||||
id?: InputMaybe<UuidFilterComparison>;
|
|
||||||
isActive?: InputMaybe<BooleanFieldComparison>;
|
|
||||||
isCustom?: InputMaybe<BooleanFieldComparison>;
|
|
||||||
isSystem?: InputMaybe<BooleanFieldComparison>;
|
|
||||||
or?: InputMaybe<Array<FieldFilter>>;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type Index = {
|
|
||||||
__typename?: 'index';
|
|
||||||
createdAt: Scalars['DateTime'];
|
|
||||||
id: Scalars['UUID'];
|
|
||||||
indexFieldMetadatas: IndexIndexFieldMetadatasConnection;
|
|
||||||
indexType: IndexType;
|
|
||||||
indexWhereClause?: Maybe<Scalars['String']>;
|
|
||||||
isCustom?: Maybe<Scalars['Boolean']>;
|
|
||||||
isUnique: Scalars['Boolean'];
|
|
||||||
name: Scalars['String'];
|
|
||||||
objectMetadata: IndexObjectMetadataConnection;
|
|
||||||
updatedAt: Scalars['DateTime'];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
export type IndexIndexFieldMetadatasArgs = {
|
|
||||||
filter?: IndexFieldFilter;
|
|
||||||
paging?: CursorPaging;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
export type IndexObjectMetadataArgs = {
|
|
||||||
filter?: ObjectFilter;
|
|
||||||
paging?: CursorPaging;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type IndexEdge = {
|
|
||||||
__typename?: 'indexEdge';
|
|
||||||
/** Cursor for this node. */
|
|
||||||
cursor: Scalars['ConnectionCursor'];
|
|
||||||
/** The node containing the index */
|
|
||||||
node: Index;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type IndexField = {
|
|
||||||
__typename?: 'indexField';
|
|
||||||
createdAt: Scalars['DateTime'];
|
|
||||||
fieldMetadataId: Scalars['UUID'];
|
|
||||||
id: Scalars['UUID'];
|
|
||||||
order: Scalars['Float'];
|
|
||||||
updatedAt: Scalars['DateTime'];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type IndexFieldEdge = {
|
|
||||||
__typename?: 'indexFieldEdge';
|
|
||||||
/** Cursor for this node. */
|
|
||||||
cursor: Scalars['ConnectionCursor'];
|
|
||||||
/** The node containing the indexField */
|
|
||||||
node: IndexField;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type IndexFieldFilter = {
|
|
||||||
and?: InputMaybe<Array<IndexFieldFilter>>;
|
|
||||||
fieldMetadataId?: InputMaybe<UuidFilterComparison>;
|
|
||||||
id?: InputMaybe<UuidFilterComparison>;
|
|
||||||
or?: InputMaybe<Array<IndexFieldFilter>>;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type IndexFilter = {
|
|
||||||
and?: InputMaybe<Array<IndexFilter>>;
|
|
||||||
id?: InputMaybe<UuidFilterComparison>;
|
|
||||||
isCustom?: InputMaybe<BooleanFieldComparison>;
|
|
||||||
or?: InputMaybe<Array<IndexFilter>>;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type Object = {
|
|
||||||
__typename?: 'object';
|
|
||||||
createdAt: Scalars['DateTime'];
|
|
||||||
dataSourceId: Scalars['String'];
|
|
||||||
description?: Maybe<Scalars['String']>;
|
|
||||||
fields: ObjectFieldsConnection;
|
|
||||||
icon?: Maybe<Scalars['String']>;
|
|
||||||
id: Scalars['UUID'];
|
|
||||||
imageIdentifierFieldMetadataId?: Maybe<Scalars['String']>;
|
|
||||||
indexMetadatas: ObjectIndexMetadatasConnection;
|
|
||||||
isActive: Scalars['Boolean'];
|
|
||||||
isCustom: Scalars['Boolean'];
|
|
||||||
isLabelSyncedWithName: Scalars['Boolean'];
|
|
||||||
isRemote: Scalars['Boolean'];
|
|
||||||
isSystem: Scalars['Boolean'];
|
|
||||||
labelIdentifierFieldMetadataId?: Maybe<Scalars['String']>;
|
|
||||||
labelPlural: Scalars['String'];
|
|
||||||
labelSingular: Scalars['String'];
|
|
||||||
namePlural: Scalars['String'];
|
|
||||||
nameSingular: Scalars['String'];
|
|
||||||
shortcut?: Maybe<Scalars['String']>;
|
|
||||||
updatedAt: Scalars['DateTime'];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
export type ObjectFieldsArgs = {
|
|
||||||
filter?: FieldFilter;
|
|
||||||
paging?: CursorPaging;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
export type ObjectIndexMetadatasArgs = {
|
|
||||||
filter?: IndexFilter;
|
|
||||||
paging?: CursorPaging;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type ObjectEdge = {
|
|
||||||
__typename?: 'objectEdge';
|
|
||||||
/** Cursor for this node. */
|
|
||||||
cursor: Scalars['ConnectionCursor'];
|
|
||||||
/** The node containing the object */
|
|
||||||
node: Object;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type ObjectFilter = {
|
|
||||||
and?: InputMaybe<Array<ObjectFilter>>;
|
|
||||||
id?: InputMaybe<UuidFilterComparison>;
|
|
||||||
isActive?: InputMaybe<BooleanFieldComparison>;
|
|
||||||
isCustom?: InputMaybe<BooleanFieldComparison>;
|
|
||||||
isRemote?: InputMaybe<BooleanFieldComparison>;
|
|
||||||
isSystem?: InputMaybe<BooleanFieldComparison>;
|
|
||||||
or?: InputMaybe<Array<ObjectFilter>>;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type RelationEdge = {
|
|
||||||
__typename?: 'relationEdge';
|
|
||||||
/** Cursor for this node. */
|
|
||||||
cursor: Scalars['ConnectionCursor'];
|
|
||||||
/** The node containing the relation */
|
|
||||||
node: Relation;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type TimelineCalendarEventFragmentFragment = { __typename?: 'TimelineCalendarEvent', id: any, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: CalendarChannelVisibility, participants: Array<{ __typename?: 'TimelineCalendarEventParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> };
|
export type TimelineCalendarEventFragmentFragment = { __typename?: 'TimelineCalendarEvent', id: any, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: CalendarChannelVisibility, participants: Array<{ __typename?: 'TimelineCalendarEventParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> };
|
||||||
|
|
||||||
export type TimelineCalendarEventParticipantFragmentFragment = { __typename?: 'TimelineCalendarEventParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string };
|
export type TimelineCalendarEventParticipantFragmentFragment = { __typename?: 'TimelineCalendarEventParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string };
|
||||||
|
|||||||
@ -43,8 +43,10 @@ export const CREATE_ONE_FIELD_METADATA_ITEM = gql`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export const CREATE_ONE_RELATION_METADATA_ITEM = gql`
|
export const CREATE_ONE_RELATION_METADATA_ITEM = gql`
|
||||||
mutation CreateOneRelationMetadata($input: CreateOneRelationInput!) {
|
mutation CreateOneRelationMetadataItem(
|
||||||
createOneRelation(input: $input) {
|
$input: CreateOneRelationMetadataInput!
|
||||||
|
) {
|
||||||
|
createOneRelationMetadata(input: $input) {
|
||||||
id
|
id
|
||||||
relationType
|
relationType
|
||||||
fromObjectMetadataId
|
fromObjectMetadataId
|
||||||
|
|||||||
@ -2,8 +2,8 @@ import { gql } from '@apollo/client';
|
|||||||
|
|
||||||
export const FIND_MANY_OBJECT_METADATA_ITEMS = gql`
|
export const FIND_MANY_OBJECT_METADATA_ITEMS = gql`
|
||||||
query ObjectMetadataItems(
|
query ObjectMetadataItems(
|
||||||
$objectFilter: objectFilter
|
$objectFilter: ObjectFilter
|
||||||
$fieldFilter: fieldFilter
|
$fieldFilter: FieldFilter
|
||||||
) {
|
) {
|
||||||
objects(paging: { first: 1000 }, filter: $objectFilter) {
|
objects(paging: { first: 1000 }, filter: $objectFilter) {
|
||||||
edges {
|
edges {
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
import { gql } from '@apollo/client';
|
import { gql } from '@apollo/client';
|
||||||
|
|
||||||
export const query = gql`
|
export const query = gql`
|
||||||
mutation CreateOneRelationMetadata($input: CreateOneRelationInput!) {
|
mutation CreateOneRelationMetadataItem(
|
||||||
createOneRelation(input: $input) {
|
$input: CreateOneRelationMetadataInput!
|
||||||
|
) {
|
||||||
|
createOneRelationMetadata(input: $input) {
|
||||||
id
|
id
|
||||||
relationType
|
relationType
|
||||||
fromObjectMetadataId
|
fromObjectMetadataId
|
||||||
@ -17,7 +19,7 @@ export const query = gql`
|
|||||||
|
|
||||||
export const variables = {
|
export const variables = {
|
||||||
input: {
|
input: {
|
||||||
relation: {
|
relationMetadata: {
|
||||||
fromDescription: null,
|
fromDescription: null,
|
||||||
fromIcon: undefined,
|
fromIcon: undefined,
|
||||||
fromLabel: 'label',
|
fromLabel: 'label',
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { gql } from '@apollo/client';
|
|||||||
import { mockedStandardObjectMetadataQueryResult } from '~/testing/mock-data/generated/mock-metadata-query-result';
|
import { mockedStandardObjectMetadataQueryResult } from '~/testing/mock-data/generated/mock-metadata-query-result';
|
||||||
|
|
||||||
export const query = gql`
|
export const query = gql`
|
||||||
query ObjectMetadataItems($objectFilter: objectFilter, $fieldFilter: fieldFilter) {
|
query ObjectMetadataItems($objectFilter: ObjectFilter, $fieldFilter: FieldFilter) {
|
||||||
objects(paging: {first: 1000}, filter: $objectFilter) {
|
objects(paging: {first: 1000}, filter: $objectFilter) {
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { useMutation } from '@apollo/client';
|
import { useMutation } from '@apollo/client';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
CreateOneRelationMetadataMutation,
|
CreateOneRelationMetadataItemMutation,
|
||||||
CreateOneRelationMetadataMutationVariables,
|
CreateOneRelationMetadataItemMutationVariables,
|
||||||
} from '~/generated-metadata/graphql';
|
} from '~/generated-metadata/graphql';
|
||||||
|
|
||||||
import { CREATE_ONE_RELATION_METADATA_ITEM } from '../graphql/mutations';
|
import { CREATE_ONE_RELATION_METADATA_ITEM } from '../graphql/mutations';
|
||||||
@ -18,8 +18,8 @@ export const useCreateOneRelationMetadataItem = () => {
|
|||||||
const apolloMetadataClient = useApolloMetadataClient();
|
const apolloMetadataClient = useApolloMetadataClient();
|
||||||
|
|
||||||
const [mutate] = useMutation<
|
const [mutate] = useMutation<
|
||||||
CreateOneRelationMetadataMutation,
|
CreateOneRelationMetadataItemMutation,
|
||||||
CreateOneRelationMetadataMutationVariables
|
CreateOneRelationMetadataItemMutationVariables
|
||||||
>(CREATE_ONE_RELATION_METADATA_ITEM, {
|
>(CREATE_ONE_RELATION_METADATA_ITEM, {
|
||||||
client: apolloMetadataClient,
|
client: apolloMetadataClient,
|
||||||
});
|
});
|
||||||
@ -31,7 +31,9 @@ export const useCreateOneRelationMetadataItem = () => {
|
|||||||
input: FormatRelationMetadataInputParams,
|
input: FormatRelationMetadataInputParams,
|
||||||
) => {
|
) => {
|
||||||
const result = await mutate({
|
const result = await mutate({
|
||||||
variables: { input: { relation: formatRelationMetadataInput(input) } },
|
variables: {
|
||||||
|
input: { relationMetadata: formatRelationMetadataInput(input) },
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
await refreshObjectMetadataItems();
|
await refreshObjectMetadataItems();
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import { camelCaseStringSchema } from '~/utils/validation-schemas/camelCaseStrin
|
|||||||
|
|
||||||
export const fieldMetadataItemSchema = (existingLabels?: string[]) => {
|
export const fieldMetadataItemSchema = (existingLabels?: string[]) => {
|
||||||
return z.object({
|
return z.object({
|
||||||
__typename: z.literal('field').optional(),
|
__typename: z.literal('Field').optional(),
|
||||||
createdAt: z.string().datetime(),
|
createdAt: z.string().datetime(),
|
||||||
defaultValue: z.any().optional(),
|
defaultValue: z.any().optional(),
|
||||||
description: z.string().trim().nullable().optional(),
|
description: z.string().trim().nullable().optional(),
|
||||||
@ -44,23 +44,23 @@ export const fieldMetadataItemSchema = (existingLabels?: string[]) => {
|
|||||||
relationId: z.string().uuid(),
|
relationId: z.string().uuid(),
|
||||||
direction: z.nativeEnum(RelationDefinitionType),
|
direction: z.nativeEnum(RelationDefinitionType),
|
||||||
sourceFieldMetadata: z.object({
|
sourceFieldMetadata: z.object({
|
||||||
__typename: z.literal('field').optional(),
|
__typename: z.literal('Field').optional(),
|
||||||
id: z.string().uuid(),
|
id: z.string().uuid(),
|
||||||
name: z.string().trim().min(1),
|
name: z.string().trim().min(1),
|
||||||
}),
|
}),
|
||||||
sourceObjectMetadata: z.object({
|
sourceObjectMetadata: z.object({
|
||||||
__typename: z.literal('object').optional(),
|
__typename: z.literal('Object').optional(),
|
||||||
id: z.string().uuid(),
|
id: z.string().uuid(),
|
||||||
namePlural: z.string().trim().min(1),
|
namePlural: z.string().trim().min(1),
|
||||||
nameSingular: z.string().trim().min(1),
|
nameSingular: z.string().trim().min(1),
|
||||||
}),
|
}),
|
||||||
targetFieldMetadata: z.object({
|
targetFieldMetadata: z.object({
|
||||||
__typename: z.literal('field').optional(),
|
__typename: z.literal('Field').optional(),
|
||||||
id: z.string().uuid(),
|
id: z.string().uuid(),
|
||||||
name: z.string().trim().min(1),
|
name: z.string().trim().min(1),
|
||||||
}),
|
}),
|
||||||
targetObjectMetadata: z.object({
|
targetObjectMetadata: z.object({
|
||||||
__typename: z.literal('object').optional(),
|
__typename: z.literal('Object').optional(),
|
||||||
id: z.string().uuid(),
|
id: z.string().uuid(),
|
||||||
namePlural: z.string().trim().min(1),
|
namePlural: z.string().trim().min(1),
|
||||||
nameSingular: z.string().trim().min(1),
|
nameSingular: z.string().trim().min(1),
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { z } from 'zod';
|
|||||||
import { IndexFieldMetadataItem } from '@/object-metadata/types/IndexFieldMetadataItem';
|
import { IndexFieldMetadataItem } from '@/object-metadata/types/IndexFieldMetadataItem';
|
||||||
|
|
||||||
export const indexFieldMetadataItemSchema = z.object({
|
export const indexFieldMetadataItemSchema = z.object({
|
||||||
__typename: z.literal('indexField'),
|
__typename: z.literal('IndexField'),
|
||||||
fieldMetadataId: z.string().uuid(),
|
fieldMetadataId: z.string().uuid(),
|
||||||
id: z.string(),
|
id: z.string(),
|
||||||
createdAt: z.string(),
|
createdAt: z.string(),
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { indexFieldMetadataItemSchema } from '@/object-metadata/validation-schem
|
|||||||
import { IndexType } from '~/generated-metadata/graphql';
|
import { IndexType } from '~/generated-metadata/graphql';
|
||||||
|
|
||||||
export const indexMetadataItemSchema = z.object({
|
export const indexMetadataItemSchema = z.object({
|
||||||
__typename: z.literal('index'),
|
__typename: z.literal('Index'),
|
||||||
id: z.string().uuid(),
|
id: z.string().uuid(),
|
||||||
name: z.string(),
|
name: z.string(),
|
||||||
indexFieldMetadatas: z.array(indexFieldMetadataItemSchema),
|
indexFieldMetadatas: z.array(indexFieldMetadataItemSchema),
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import { metadataLabelSchema } from '@/object-metadata/validation-schemas/metada
|
|||||||
import { camelCaseStringSchema } from '~/utils/validation-schemas/camelCaseStringSchema';
|
import { camelCaseStringSchema } from '~/utils/validation-schemas/camelCaseStringSchema';
|
||||||
|
|
||||||
export const objectMetadataItemSchema = z.object({
|
export const objectMetadataItemSchema = z.object({
|
||||||
__typename: z.literal('object').optional(),
|
__typename: z.literal('Object').optional(),
|
||||||
createdAt: z.string().datetime(),
|
createdAt: z.string().datetime(),
|
||||||
dataSourceId: z.string().uuid(),
|
dataSourceId: z.string().uuid(),
|
||||||
description: z.string().trim().nullable().optional(),
|
description: z.string().trim().nullable().optional(),
|
||||||
|
|||||||
@ -17,7 +17,7 @@ import {
|
|||||||
IconSettings,
|
IconSettings,
|
||||||
} from 'twenty-ui';
|
} from 'twenty-ui';
|
||||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||||
import { FeatureFlag, FeatureFlagKey } from '~/generated/graphql';
|
import { FeatureFlagKey } from '~/generated/graphql';
|
||||||
|
|
||||||
export const useRecordShowContainerTabs = (
|
export const useRecordShowContainerTabs = (
|
||||||
loading: boolean,
|
loading: boolean,
|
||||||
@ -252,7 +252,7 @@ export const useRecordShowContainerTabs = (
|
|||||||
hide.ifFeaturesDisabled.length > 0 &&
|
hide.ifFeaturesDisabled.length > 0 &&
|
||||||
!hide.ifFeaturesDisabled.every((flagKey) => {
|
!hide.ifFeaturesDisabled.every((flagKey) => {
|
||||||
return !!currentWorkspace?.featureFlags?.find(
|
return !!currentWorkspace?.featureFlags?.find(
|
||||||
(flag: FeatureFlag) => flag.key === flagKey && flag.value,
|
(flag) => flag.key === flagKey && flag.value,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@ import { UpgradeTo0_40CommandModule } from 'src/database/commands/upgrade-versio
|
|||||||
import { UpgradeTo0_41CommandModule } from 'src/database/commands/upgrade-version/0-41/0-41-upgrade-version.module';
|
import { UpgradeTo0_41CommandModule } from 'src/database/commands/upgrade-version/0-41/0-41-upgrade-version.module';
|
||||||
import { TypeORMModule } from 'src/database/typeorm/typeorm.module';
|
import { TypeORMModule } from 'src/database/typeorm/typeorm.module';
|
||||||
import { BillingSubscription } from 'src/engine/core-modules/billing/entities/billing-subscription.entity';
|
import { BillingSubscription } from 'src/engine/core-modules/billing/entities/billing-subscription.entity';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module';
|
import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module';
|
||||||
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||||
import { WorkspaceModule } from 'src/engine/core-modules/workspace/workspace.module';
|
import { WorkspaceModule } from 'src/engine/core-modules/workspace/workspace.module';
|
||||||
@ -34,7 +34,7 @@ import { WorkspaceSyncMetadataModule } from 'src/engine/workspace-manager/worksp
|
|||||||
DataSourceModule,
|
DataSourceModule,
|
||||||
TypeORMModule,
|
TypeORMModule,
|
||||||
TypeOrmModule.forFeature(
|
TypeOrmModule.forFeature(
|
||||||
[Workspace, BillingSubscription, FeatureFlagEntity],
|
[Workspace, BillingSubscription, FeatureFlag],
|
||||||
'core',
|
'core',
|
||||||
),
|
),
|
||||||
TypeOrmModule.forFeature(
|
TypeOrmModule.forFeature(
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import { rawDataSource } from 'src/database/typeorm/raw/raw.datasource';
|
|||||||
import { TypeORMService } from 'src/database/typeorm/typeorm.service';
|
import { TypeORMService } from 'src/database/typeorm/typeorm.service';
|
||||||
import { BillingSubscription } from 'src/engine/core-modules/billing/entities/billing-subscription.entity';
|
import { BillingSubscription } from 'src/engine/core-modules/billing/entities/billing-subscription.entity';
|
||||||
import { SubscriptionStatus } from 'src/engine/core-modules/billing/enums/billing-subscription-status.enum';
|
import { SubscriptionStatus } from 'src/engine/core-modules/billing/enums/billing-subscription-status.enum';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { KeyValuePair } from 'src/engine/core-modules/key-value-pair/key-value-pair.entity';
|
import { KeyValuePair } from 'src/engine/core-modules/key-value-pair/key-value-pair.entity';
|
||||||
import { UserWorkspace } from 'src/engine/core-modules/user-workspace/user-workspace.entity';
|
import { UserWorkspace } from 'src/engine/core-modules/user-workspace/user-workspace.entity';
|
||||||
import { User } from 'src/engine/core-modules/user/user.entity';
|
import { User } from 'src/engine/core-modules/user/user.entity';
|
||||||
@ -40,8 +40,8 @@ export class UpdateInactiveWorkspaceStatusCommand extends BaseCommandRunner {
|
|||||||
protected readonly workspaceMigrationRepository: Repository<WorkspaceMigrationEntity>,
|
protected readonly workspaceMigrationRepository: Repository<WorkspaceMigrationEntity>,
|
||||||
@InjectRepository(BillingSubscription, 'core')
|
@InjectRepository(BillingSubscription, 'core')
|
||||||
protected readonly subscriptionRepository: Repository<BillingSubscription>,
|
protected readonly subscriptionRepository: Repository<BillingSubscription>,
|
||||||
@InjectRepository(FeatureFlagEntity, 'core')
|
@InjectRepository(FeatureFlag, 'core')
|
||||||
protected readonly featureFlagRepository: Repository<FeatureFlagEntity>,
|
protected readonly featureFlagRepository: Repository<FeatureFlag>,
|
||||||
@InjectRepository(KeyValuePair, 'core')
|
@InjectRepository(KeyValuePair, 'core')
|
||||||
protected readonly keyValuePairRepository: Repository<KeyValuePair>,
|
protected readonly keyValuePairRepository: Repository<KeyValuePair>,
|
||||||
@InjectRepository(UserWorkspace, 'core')
|
@InjectRepository(UserWorkspace, 'core')
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import { UpdateInactiveWorkspaceStatusCommand } from 'src/database/commands/upgr
|
|||||||
import { UpgradeTo0_40Command } from 'src/database/commands/upgrade-version/0-40/0-40-upgrade-version.command';
|
import { UpgradeTo0_40Command } from 'src/database/commands/upgrade-version/0-40/0-40-upgrade-version.command';
|
||||||
import { TypeORMModule } from 'src/database/typeorm/typeorm.module';
|
import { TypeORMModule } from 'src/database/typeorm/typeorm.module';
|
||||||
import { BillingSubscription } from 'src/engine/core-modules/billing/entities/billing-subscription.entity';
|
import { BillingSubscription } from 'src/engine/core-modules/billing/entities/billing-subscription.entity';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { KeyValuePair } from 'src/engine/core-modules/key-value-pair/key-value-pair.entity';
|
import { KeyValuePair } from 'src/engine/core-modules/key-value-pair/key-value-pair.entity';
|
||||||
import { UserWorkspace } from 'src/engine/core-modules/user-workspace/user-workspace.entity';
|
import { UserWorkspace } from 'src/engine/core-modules/user-workspace/user-workspace.entity';
|
||||||
import { User } from 'src/engine/core-modules/user/user.entity';
|
import { User } from 'src/engine/core-modules/user/user.entity';
|
||||||
@ -25,7 +25,7 @@ import { WorkspaceMigrationRunnerModule } from 'src/engine/workspace-manager/wor
|
|||||||
[
|
[
|
||||||
Workspace,
|
Workspace,
|
||||||
BillingSubscription,
|
BillingSubscription,
|
||||||
FeatureFlagEntity,
|
FeatureFlag,
|
||||||
KeyValuePair,
|
KeyValuePair,
|
||||||
User,
|
User,
|
||||||
UserWorkspace,
|
UserWorkspace,
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import { BillingProduct } from 'src/engine/core-modules/billing/entities/billing
|
|||||||
import { BillingSubscriptionItem } from 'src/engine/core-modules/billing/entities/billing-subscription-item.entity';
|
import { BillingSubscriptionItem } from 'src/engine/core-modules/billing/entities/billing-subscription-item.entity';
|
||||||
import { BillingSubscription } from 'src/engine/core-modules/billing/entities/billing-subscription.entity';
|
import { BillingSubscription } from 'src/engine/core-modules/billing/entities/billing-subscription.entity';
|
||||||
import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service';
|
import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { KeyValuePair } from 'src/engine/core-modules/key-value-pair/key-value-pair.entity';
|
import { KeyValuePair } from 'src/engine/core-modules/key-value-pair/key-value-pair.entity';
|
||||||
import { PostgresCredentials } from 'src/engine/core-modules/postgres-credentials/postgres-credentials.entity';
|
import { PostgresCredentials } from 'src/engine/core-modules/postgres-credentials/postgres-credentials.entity';
|
||||||
import { WorkspaceSSOIdentityProvider } from 'src/engine/core-modules/sso/workspace-sso-identity-provider.entity';
|
import { WorkspaceSSOIdentityProvider } from 'src/engine/core-modules/sso/workspace-sso-identity-provider.entity';
|
||||||
@ -38,7 +38,7 @@ export class TypeORMService implements OnModuleInit, OnModuleDestroy {
|
|||||||
UserWorkspace,
|
UserWorkspace,
|
||||||
AppToken,
|
AppToken,
|
||||||
KeyValuePair,
|
KeyValuePair,
|
||||||
FeatureFlagEntity,
|
FeatureFlag,
|
||||||
BillingSubscription,
|
BillingSubscription,
|
||||||
BillingSubscriptionItem,
|
BillingSubscriptionItem,
|
||||||
BillingMeter,
|
BillingMeter,
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import { TelemetryListener } from 'src/engine/api/graphql/workspace-query-runner
|
|||||||
import { WorkspaceQueryHookModule } from 'src/engine/api/graphql/workspace-query-runner/workspace-query-hook/workspace-query-hook.module';
|
import { WorkspaceQueryHookModule } from 'src/engine/api/graphql/workspace-query-runner/workspace-query-hook/workspace-query-hook.module';
|
||||||
import { AnalyticsModule } from 'src/engine/core-modules/analytics/analytics.module';
|
import { AnalyticsModule } from 'src/engine/core-modules/analytics/analytics.module';
|
||||||
import { AuthModule } from 'src/engine/core-modules/auth/auth.module';
|
import { AuthModule } from 'src/engine/core-modules/auth/auth.module';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module';
|
import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module';
|
||||||
import { FileModule } from 'src/engine/core-modules/file/file.module';
|
import { FileModule } from 'src/engine/core-modules/file/file.module';
|
||||||
import { TelemetryModule } from 'src/engine/core-modules/telemetry/telemetry.module';
|
import { TelemetryModule } from 'src/engine/core-modules/telemetry/telemetry.module';
|
||||||
@ -24,7 +24,7 @@ import { EntityEventsToDbListener } from './listeners/entity-events-to-db.listen
|
|||||||
WorkspaceDataSourceModule,
|
WorkspaceDataSourceModule,
|
||||||
WorkspaceQueryHookModule,
|
WorkspaceQueryHookModule,
|
||||||
ObjectMetadataRepositoryModule.forFeature([WorkspaceMemberWorkspaceEntity]),
|
ObjectMetadataRepositoryModule.forFeature([WorkspaceMemberWorkspaceEntity]),
|
||||||
TypeOrmModule.forFeature([FeatureFlagEntity], 'core'),
|
TypeOrmModule.forFeature([FeatureFlag], 'core'),
|
||||||
AnalyticsModule,
|
AnalyticsModule,
|
||||||
TelemetryModule,
|
TelemetryModule,
|
||||||
FileModule,
|
FileModule,
|
||||||
|
|||||||
@ -4,13 +4,13 @@ import { TypeOrmModule } from '@nestjs/typeorm';
|
|||||||
import { AdminPanelResolver } from 'src/engine/core-modules/admin-panel/admin-panel.resolver';
|
import { AdminPanelResolver } from 'src/engine/core-modules/admin-panel/admin-panel.resolver';
|
||||||
import { AdminPanelService } from 'src/engine/core-modules/admin-panel/admin-panel.service';
|
import { AdminPanelService } from 'src/engine/core-modules/admin-panel/admin-panel.service';
|
||||||
import { AuthModule } from 'src/engine/core-modules/auth/auth.module';
|
import { AuthModule } from 'src/engine/core-modules/auth/auth.module';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { User } from 'src/engine/core-modules/user/user.entity';
|
import { User } from 'src/engine/core-modules/user/user.entity';
|
||||||
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
TypeOrmModule.forFeature([User, Workspace, FeatureFlagEntity], 'core'),
|
TypeOrmModule.forFeature([User, Workspace, FeatureFlag], 'core'),
|
||||||
AuthModule,
|
AuthModule,
|
||||||
],
|
],
|
||||||
providers: [AdminPanelResolver, AdminPanelService],
|
providers: [AdminPanelResolver, AdminPanelService],
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import {
|
|||||||
} from 'src/engine/core-modules/auth/auth.exception';
|
} from 'src/engine/core-modules/auth/auth.exception';
|
||||||
import { LoginTokenService } from 'src/engine/core-modules/auth/token/services/login-token.service';
|
import { LoginTokenService } from 'src/engine/core-modules/auth/token/services/login-token.service';
|
||||||
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import {
|
import {
|
||||||
FeatureFlagException,
|
FeatureFlagException,
|
||||||
FeatureFlagExceptionCode,
|
FeatureFlagExceptionCode,
|
||||||
@ -29,8 +29,8 @@ export class AdminPanelService {
|
|||||||
private readonly userRepository: Repository<User>,
|
private readonly userRepository: Repository<User>,
|
||||||
@InjectRepository(Workspace, 'core')
|
@InjectRepository(Workspace, 'core')
|
||||||
private readonly workspaceRepository: Repository<Workspace>,
|
private readonly workspaceRepository: Repository<Workspace>,
|
||||||
@InjectRepository(FeatureFlagEntity, 'core')
|
@InjectRepository(FeatureFlag, 'core')
|
||||||
private readonly featureFlagRepository: Repository<FeatureFlagEntity>,
|
private readonly featureFlagRepository: Repository<FeatureFlag>,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async impersonate(userId: string, workspaceId: string) {
|
async impersonate(userId: string, workspaceId: string) {
|
||||||
@ -115,7 +115,7 @@ export class AdminPanelService {
|
|||||||
userWorkspace.workspace.featureFlags?.find(
|
userWorkspace.workspace.featureFlags?.find(
|
||||||
(flag) => flag.key === key,
|
(flag) => flag.key === key,
|
||||||
)?.value ?? false,
|
)?.value ?? false,
|
||||||
})) as FeatureFlagEntity[],
|
})) as FeatureFlag[],
|
||||||
})),
|
})),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import {
|
|||||||
} from 'src/engine/core-modules/auth/auth.exception';
|
} from 'src/engine/core-modules/auth/auth.exception';
|
||||||
import { LoginTokenService } from 'src/engine/core-modules/auth/token/services/login-token.service';
|
import { LoginTokenService } from 'src/engine/core-modules/auth/token/services/login-token.service';
|
||||||
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { User } from 'src/engine/core-modules/user/user.entity';
|
import { User } from 'src/engine/core-modules/user/user.entity';
|
||||||
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ describe('AdminPanelService', () => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provide: getRepositoryToken(FeatureFlagEntity, 'core'),
|
provide: getRepositoryToken(FeatureFlag, 'core'),
|
||||||
useValue: {
|
useValue: {
|
||||||
update: FeatureFlagUpdateMock,
|
update: FeatureFlagUpdateMock,
|
||||||
save: FeatureFlagSaveMock,
|
save: FeatureFlagSaveMock,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { Field, ObjectType } from '@nestjs/graphql';
|
import { Field, ObjectType } from '@nestjs/graphql';
|
||||||
|
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
|
|
||||||
@ObjectType()
|
@ObjectType()
|
||||||
class UserInfo {
|
class UserInfo {
|
||||||
@ -37,8 +37,8 @@ class WorkspaceInfo {
|
|||||||
@Field(() => [UserInfo])
|
@Field(() => [UserInfo])
|
||||||
users: UserInfo[];
|
users: UserInfo[];
|
||||||
|
|
||||||
@Field(() => [FeatureFlagEntity])
|
@Field(() => [FeatureFlag])
|
||||||
featureFlags: FeatureFlagEntity[];
|
featureFlags: FeatureFlag[];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ObjectType()
|
@ObjectType()
|
||||||
|
|||||||
@ -28,7 +28,7 @@ export enum AppTokenType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Entity({ name: 'appToken', schema: 'core' })
|
@Entity({ name: 'appToken', schema: 'core' })
|
||||||
@ObjectType('AppToken')
|
@ObjectType()
|
||||||
@BeforeCreateOne(BeforeCreateOneAppToken)
|
@BeforeCreateOne(BeforeCreateOneAppToken)
|
||||||
export class AppToken {
|
export class AppToken {
|
||||||
@IDField(() => UUIDScalarType)
|
@IDField(() => UUIDScalarType)
|
||||||
|
|||||||
@ -26,7 +26,7 @@ import { TransientTokenService } from 'src/engine/core-modules/auth/token/servic
|
|||||||
import { TokenModule } from 'src/engine/core-modules/auth/token/token.module';
|
import { TokenModule } from 'src/engine/core-modules/auth/token/token.module';
|
||||||
import { DomainManagerModule } from 'src/engine/core-modules/domain-manager/domain-manager.module';
|
import { DomainManagerModule } from 'src/engine/core-modules/domain-manager/domain-manager.module';
|
||||||
import { EmailVerificationModule } from 'src/engine/core-modules/email-verification/email-verification.module';
|
import { EmailVerificationModule } from 'src/engine/core-modules/email-verification/email-verification.module';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module';
|
import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module';
|
||||||
import { FileUploadModule } from 'src/engine/core-modules/file/file-upload/file-upload.module';
|
import { FileUploadModule } from 'src/engine/core-modules/file/file-upload/file-upload.module';
|
||||||
import { JwtModule } from 'src/engine/core-modules/jwt/jwt.module';
|
import { JwtModule } from 'src/engine/core-modules/jwt/jwt.module';
|
||||||
@ -67,7 +67,7 @@ import { JwtAuthStrategy } from './strategies/jwt.auth.strategy';
|
|||||||
Workspace,
|
Workspace,
|
||||||
User,
|
User,
|
||||||
AppToken,
|
AppToken,
|
||||||
FeatureFlagEntity,
|
FeatureFlag,
|
||||||
WorkspaceSSOIdentityProvider,
|
WorkspaceSSOIdentityProvider,
|
||||||
KeyValuePair,
|
KeyValuePair,
|
||||||
],
|
],
|
||||||
|
|||||||
@ -25,7 +25,7 @@ import { BillingWebhookPriceService } from 'src/engine/core-modules/billing/webh
|
|||||||
import { BillingWebhookProductService } from 'src/engine/core-modules/billing/webhooks/services/billing-webhook-product.service';
|
import { BillingWebhookProductService } from 'src/engine/core-modules/billing/webhooks/services/billing-webhook-product.service';
|
||||||
import { BillingWebhookSubscriptionService } from 'src/engine/core-modules/billing/webhooks/services/billing-webhook-subscription.service';
|
import { BillingWebhookSubscriptionService } from 'src/engine/core-modules/billing/webhooks/services/billing-webhook-subscription.service';
|
||||||
import { DomainManagerModule } from 'src/engine/core-modules/domain-manager/domain-manager.module';
|
import { DomainManagerModule } from 'src/engine/core-modules/domain-manager/domain-manager.module';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module';
|
import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module';
|
||||||
import { MessageQueueModule } from 'src/engine/core-modules/message-queue/message-queue.module';
|
import { MessageQueueModule } from 'src/engine/core-modules/message-queue/message-queue.module';
|
||||||
import { UserWorkspace } from 'src/engine/core-modules/user-workspace/user-workspace.entity';
|
import { UserWorkspace } from 'src/engine/core-modules/user-workspace/user-workspace.entity';
|
||||||
@ -48,7 +48,7 @@ import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
|||||||
BillingEntitlement,
|
BillingEntitlement,
|
||||||
Workspace,
|
Workspace,
|
||||||
UserWorkspace,
|
UserWorkspace,
|
||||||
FeatureFlagEntity,
|
FeatureFlag,
|
||||||
],
|
],
|
||||||
'core',
|
'core',
|
||||||
),
|
),
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import { BillingEntitlement } from 'src/engine/core-modules/billing/entities/bil
|
|||||||
import { BillingSubscription } from 'src/engine/core-modules/billing/entities/billing-subscription.entity';
|
import { BillingSubscription } from 'src/engine/core-modules/billing/entities/billing-subscription.entity';
|
||||||
|
|
||||||
@Entity({ name: 'billingCustomer', schema: 'core' })
|
@Entity({ name: 'billingCustomer', schema: 'core' })
|
||||||
@ObjectType('billingCustomer')
|
@ObjectType()
|
||||||
export class BillingCustomer {
|
export class BillingCustomer {
|
||||||
@IDField(() => UUIDScalarType)
|
@IDField(() => UUIDScalarType)
|
||||||
@PrimaryGeneratedColumn('uuid')
|
@PrimaryGeneratedColumn('uuid')
|
||||||
|
|||||||
@ -17,7 +17,7 @@ import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/
|
|||||||
import { BillingCustomer } from 'src/engine/core-modules/billing/entities/billing-customer.entity';
|
import { BillingCustomer } from 'src/engine/core-modules/billing/entities/billing-customer.entity';
|
||||||
import { BillingEntitlementKey } from 'src/engine/core-modules/billing/enums/billing-entitlement-key.enum';
|
import { BillingEntitlementKey } from 'src/engine/core-modules/billing/enums/billing-entitlement-key.enum';
|
||||||
@Entity({ name: 'billingEntitlement', schema: 'core' })
|
@Entity({ name: 'billingEntitlement', schema: 'core' })
|
||||||
@ObjectType('billingEntitlement')
|
@ObjectType()
|
||||||
@Unique('IndexOnFeatureKeyAndWorkspaceIdUnique', ['key', 'workspaceId'])
|
@Unique('IndexOnFeatureKeyAndWorkspaceIdUnique', ['key', 'workspaceId'])
|
||||||
export class BillingEntitlement {
|
export class BillingEntitlement {
|
||||||
@IDField(() => UUIDScalarType)
|
@IDField(() => UUIDScalarType)
|
||||||
|
|||||||
@ -30,7 +30,7 @@ registerEnumType(SubscriptionInterval, { name: 'SubscriptionInterval' });
|
|||||||
unique: true,
|
unique: true,
|
||||||
where: `status IN ('trialing', 'active', 'past_due')`,
|
where: `status IN ('trialing', 'active', 'past_due')`,
|
||||||
})
|
})
|
||||||
@ObjectType('BillingSubscription')
|
@ObjectType()
|
||||||
export class BillingSubscription {
|
export class BillingSubscription {
|
||||||
@IDField(() => UUIDScalarType)
|
@IDField(() => UUIDScalarType)
|
||||||
@PrimaryGeneratedColumn('uuid')
|
@PrimaryGeneratedColumn('uuid')
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { ObjectType, Field } from '@nestjs/graphql';
|
import { Field, ObjectType } from '@nestjs/graphql';
|
||||||
|
|
||||||
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||||
|
|
||||||
@ObjectType('TimelineCalendarEventParticipant')
|
@ObjectType()
|
||||||
export class TimelineCalendarEventParticipant {
|
export class TimelineCalendarEventParticipant {
|
||||||
@Field(() => UUIDScalarType, { nullable: true })
|
@Field(() => UUIDScalarType, { nullable: true })
|
||||||
personId: string | null;
|
personId: string | null;
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/
|
|||||||
import { TimelineCalendarEventParticipant } from 'src/engine/core-modules/calendar/dtos/timeline-calendar-event-participant.dto';
|
import { TimelineCalendarEventParticipant } from 'src/engine/core-modules/calendar/dtos/timeline-calendar-event-participant.dto';
|
||||||
import { CalendarChannelVisibility } from 'src/modules/calendar/common/standard-objects/calendar-channel.workspace-entity';
|
import { CalendarChannelVisibility } from 'src/modules/calendar/common/standard-objects/calendar-channel.workspace-entity';
|
||||||
|
|
||||||
@ObjectType('LinkMetadata')
|
@ObjectType()
|
||||||
class LinkMetadata {
|
class LinkMetadata {
|
||||||
@Field()
|
@Field()
|
||||||
label: string;
|
label: string;
|
||||||
@ -13,7 +13,7 @@ class LinkMetadata {
|
|||||||
url: string;
|
url: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ObjectType('LinksMetadata')
|
@ObjectType()
|
||||||
export class LinksMetadata {
|
export class LinksMetadata {
|
||||||
@Field()
|
@Field()
|
||||||
primaryLinkLabel: string;
|
primaryLinkLabel: string;
|
||||||
@ -25,7 +25,7 @@ export class LinksMetadata {
|
|||||||
secondaryLinks: LinkMetadata[] | null;
|
secondaryLinks: LinkMetadata[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ObjectType('TimelineCalendarEvent')
|
@ObjectType()
|
||||||
export class TimelineCalendarEvent {
|
export class TimelineCalendarEvent {
|
||||||
@Field(() => UUIDScalarType)
|
@Field(() => UUIDScalarType)
|
||||||
id: string;
|
id: string;
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { Field, Int, ObjectType } from '@nestjs/graphql';
|
|||||||
|
|
||||||
import { TimelineCalendarEvent } from 'src/engine/core-modules/calendar/dtos/timeline-calendar-event.dto';
|
import { TimelineCalendarEvent } from 'src/engine/core-modules/calendar/dtos/timeline-calendar-event.dto';
|
||||||
|
|
||||||
@ObjectType('TimelineCalendarEventsWithTotal')
|
@ObjectType()
|
||||||
export class TimelineCalendarEventsWithTotal {
|
export class TimelineCalendarEventsWithTotal {
|
||||||
@Field(() => Int)
|
@Field(() => Int)
|
||||||
totalNumberOfCalendarEvents: number;
|
totalNumberOfCalendarEvents: number;
|
||||||
|
|||||||
@ -17,9 +17,9 @@ import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/featu
|
|||||||
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||||
|
|
||||||
@Entity({ name: 'featureFlag', schema: 'core' })
|
@Entity({ name: 'featureFlag', schema: 'core' })
|
||||||
@ObjectType('FeatureFlag')
|
@ObjectType()
|
||||||
@Unique('IndexOnKeyAndWorkspaceIdUnique', ['key', 'workspaceId'])
|
@Unique('IndexOnKeyAndWorkspaceIdUnique', ['key', 'workspaceId'])
|
||||||
export class FeatureFlagEntity {
|
export class FeatureFlag {
|
||||||
@IDField(() => UUIDScalarType)
|
@IDField(() => UUIDScalarType)
|
||||||
@PrimaryGeneratedColumn('uuid')
|
@PrimaryGeneratedColumn('uuid')
|
||||||
id: string;
|
id: string;
|
||||||
|
|||||||
@ -4,16 +4,14 @@ import { NestjsQueryGraphQLModule } from '@ptc-org/nestjs-query-graphql';
|
|||||||
import { NestjsQueryTypeOrmModule } from '@ptc-org/nestjs-query-typeorm';
|
import { NestjsQueryTypeOrmModule } from '@ptc-org/nestjs-query-typeorm';
|
||||||
|
|
||||||
import { TypeORMModule } from 'src/database/typeorm/typeorm.module';
|
import { TypeORMModule } from 'src/database/typeorm/typeorm.module';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service';
|
import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
TypeORMModule,
|
TypeORMModule,
|
||||||
NestjsQueryGraphQLModule.forFeature({
|
NestjsQueryGraphQLModule.forFeature({
|
||||||
imports: [
|
imports: [NestjsQueryTypeOrmModule.forFeature([FeatureFlag], 'core')],
|
||||||
NestjsQueryTypeOrmModule.forFeature([FeatureFlagEntity], 'core'),
|
|
||||||
],
|
|
||||||
services: [],
|
services: [],
|
||||||
resolvers: [],
|
resolvers: [],
|
||||||
}),
|
}),
|
||||||
|
|||||||
@ -6,13 +6,13 @@ import { Repository } from 'typeorm';
|
|||||||
import { FeatureFlagMap } from 'src/engine/core-modules/feature-flag/interfaces/feature-flag-map.interface';
|
import { FeatureFlagMap } from 'src/engine/core-modules/feature-flag/interfaces/feature-flag-map.interface';
|
||||||
|
|
||||||
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class FeatureFlagService {
|
export class FeatureFlagService {
|
||||||
constructor(
|
constructor(
|
||||||
@InjectRepository(FeatureFlagEntity, 'core')
|
@InjectRepository(FeatureFlag, 'core')
|
||||||
private readonly featureFlagRepository: Repository<FeatureFlagEntity>,
|
private readonly featureFlagRepository: Repository<FeatureFlag>,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public async isFeatureEnabled(
|
public async isFeatureEnabled(
|
||||||
@ -30,7 +30,7 @@ export class FeatureFlagService {
|
|||||||
|
|
||||||
public async getWorkspaceFeatureFlags(
|
public async getWorkspaceFeatureFlags(
|
||||||
workspaceId: string,
|
workspaceId: string,
|
||||||
): Promise<FeatureFlagEntity[]> {
|
): Promise<FeatureFlag[]> {
|
||||||
return this.featureFlagRepository.find({ where: { workspaceId } });
|
return this.featureFlagRepository.find({ where: { workspaceId } });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ export enum KeyValuePairType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Entity({ name: 'keyValuePair', schema: 'core' })
|
@Entity({ name: 'keyValuePair', schema: 'core' })
|
||||||
@ObjectType('KeyValuePair')
|
@ObjectType()
|
||||||
@Unique('IndexOnKeyUserIdWorkspaceIdUnique', ['key', 'userId', 'workspaceId'])
|
@Unique('IndexOnKeyUserIdWorkspaceIdUnique', ['key', 'userId', 'workspaceId'])
|
||||||
@Index('IndexOnKeyWorkspaceIdAndNullUserIdUnique', ['key', 'workspaceId'], {
|
@Index('IndexOnKeyWorkspaceIdAndNullUserIdUnique', ['key', 'workspaceId'], {
|
||||||
unique: true,
|
unique: true,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { Module } from '@nestjs/common';
|
import { Module } from '@nestjs/common';
|
||||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||||
|
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||||
|
|
||||||
import { LabResolver } from './lab.resolver';
|
import { LabResolver } from './lab.resolver';
|
||||||
@ -9,7 +9,7 @@ import { LabResolver } from './lab.resolver';
|
|||||||
import { LabService } from './services/lab.service';
|
import { LabService } from './services/lab.service';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [TypeOrmModule.forFeature([FeatureFlagEntity, Workspace], 'core')],
|
imports: [TypeOrmModule.forFeature([FeatureFlag, Workspace], 'core')],
|
||||||
providers: [LabService, LabResolver],
|
providers: [LabService, LabResolver],
|
||||||
exports: [LabService],
|
exports: [LabService],
|
||||||
})
|
})
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import {
|
|||||||
AuthExceptionCode,
|
AuthExceptionCode,
|
||||||
} from 'src/engine/core-modules/auth/auth.exception';
|
} from 'src/engine/core-modules/auth/auth.exception';
|
||||||
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import {
|
import {
|
||||||
FeatureFlagException,
|
FeatureFlagException,
|
||||||
FeatureFlagExceptionCode,
|
FeatureFlagExceptionCode,
|
||||||
@ -22,8 +22,8 @@ import { workspaceValidator } from 'src/engine/core-modules/workspace/workspace.
|
|||||||
@Injectable()
|
@Injectable()
|
||||||
export class LabService {
|
export class LabService {
|
||||||
constructor(
|
constructor(
|
||||||
@InjectRepository(FeatureFlagEntity, 'core')
|
@InjectRepository(FeatureFlag, 'core')
|
||||||
private readonly featureFlagRepository: Repository<FeatureFlagEntity>,
|
private readonly featureFlagRepository: Repository<FeatureFlag>,
|
||||||
@InjectRepository(Workspace, 'core')
|
@InjectRepository(Workspace, 'core')
|
||||||
private readonly workspaceRepository: Repository<Workspace>,
|
private readonly workspaceRepository: Repository<Workspace>,
|
||||||
) {}
|
) {}
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { Field, ObjectType } from '@nestjs/graphql';
|
|||||||
|
|
||||||
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||||
|
|
||||||
@ObjectType('TimelineThreadParticipant')
|
@ObjectType()
|
||||||
export class TimelineThreadParticipant {
|
export class TimelineThreadParticipant {
|
||||||
@Field(() => UUIDScalarType, { nullable: true })
|
@Field(() => UUIDScalarType, { nullable: true })
|
||||||
personId: string | null;
|
personId: string | null;
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/
|
|||||||
import { TimelineThreadParticipant } from 'src/engine/core-modules/messaging/dtos/timeline-thread-participant.dto';
|
import { TimelineThreadParticipant } from 'src/engine/core-modules/messaging/dtos/timeline-thread-participant.dto';
|
||||||
import { MessageChannelVisibility } from 'src/modules/messaging/common/standard-objects/message-channel.workspace-entity';
|
import { MessageChannelVisibility } from 'src/modules/messaging/common/standard-objects/message-channel.workspace-entity';
|
||||||
|
|
||||||
@ObjectType('TimelineThread')
|
@ObjectType()
|
||||||
export class TimelineThread {
|
export class TimelineThread {
|
||||||
@Field(() => UUIDScalarType)
|
@Field(() => UUIDScalarType)
|
||||||
id: string;
|
id: string;
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { Field, Int, ObjectType } from '@nestjs/graphql';
|
|||||||
|
|
||||||
import { TimelineThread } from 'src/engine/core-modules/messaging/dtos/timeline-thread.dto';
|
import { TimelineThread } from 'src/engine/core-modules/messaging/dtos/timeline-thread.dto';
|
||||||
|
|
||||||
@ObjectType('TimelineThreadsWithTotal')
|
@ObjectType()
|
||||||
export class TimelineThreadsWithTotal {
|
export class TimelineThreadsWithTotal {
|
||||||
@Field(() => Int)
|
@Field(() => Int)
|
||||||
totalNumberOfThreads: number;
|
totalNumberOfThreads: number;
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import { NestjsQueryTypeOrmModule } from '@ptc-org/nestjs-query-typeorm';
|
|||||||
|
|
||||||
import { AppToken } from 'src/engine/core-modules/app-token/app-token.entity';
|
import { AppToken } from 'src/engine/core-modules/app-token/app-token.entity';
|
||||||
import { BillingModule } from 'src/engine/core-modules/billing/billing.module';
|
import { BillingModule } from 'src/engine/core-modules/billing/billing.module';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { SSOService } from 'src/engine/core-modules/sso/services/sso.service';
|
import { SSOService } from 'src/engine/core-modules/sso/services/sso.service';
|
||||||
import { SSOResolver } from 'src/engine/core-modules/sso/sso.resolver';
|
import { SSOResolver } from 'src/engine/core-modules/sso/sso.resolver';
|
||||||
import { WorkspaceSSOIdentityProvider } from 'src/engine/core-modules/sso/workspace-sso-identity-provider.entity';
|
import { WorkspaceSSOIdentityProvider } from 'src/engine/core-modules/sso/workspace-sso-identity-provider.entity';
|
||||||
@ -17,7 +17,7 @@ import { GuardRedirectModule } from 'src/engine/core-modules/guard-redirect/guar
|
|||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
NestjsQueryTypeOrmModule.forFeature(
|
NestjsQueryTypeOrmModule.forFeature(
|
||||||
[WorkspaceSSOIdentityProvider, User, AppToken, FeatureFlagEntity],
|
[WorkspaceSSOIdentityProvider, User, AppToken, FeatureFlag],
|
||||||
'core',
|
'core',
|
||||||
),
|
),
|
||||||
BillingModule,
|
BillingModule,
|
||||||
|
|||||||
@ -45,7 +45,7 @@ registerEnumType(SSOIdentityProviderStatus, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
@Entity({ name: 'workspaceSSOIdentityProvider', schema: 'core' })
|
@Entity({ name: 'workspaceSSOIdentityProvider', schema: 'core' })
|
||||||
@ObjectType('WorkspaceSSOIdentityProvider')
|
@ObjectType()
|
||||||
export class WorkspaceSSOIdentityProvider {
|
export class WorkspaceSSOIdentityProvider {
|
||||||
// COMMON
|
// COMMON
|
||||||
@IDField(() => UUIDScalarType)
|
@IDField(() => UUIDScalarType)
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import {
|
|||||||
import { UserWorkspace } from 'src/engine/core-modules/user-workspace/user-workspace.entity';
|
import { UserWorkspace } from 'src/engine/core-modules/user-workspace/user-workspace.entity';
|
||||||
|
|
||||||
@Entity({ name: 'twoFactorMethod', schema: 'core' })
|
@Entity({ name: 'twoFactorMethod', schema: 'core' })
|
||||||
@ObjectType('TwoFactorMethod')
|
@ObjectType()
|
||||||
export class TwoFactorMethod {
|
export class TwoFactorMethod {
|
||||||
@Field()
|
@Field()
|
||||||
@PrimaryGeneratedColumn('uuid')
|
@PrimaryGeneratedColumn('uuid')
|
||||||
|
|||||||
@ -20,7 +20,7 @@ import { User } from 'src/engine/core-modules/user/user.entity';
|
|||||||
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||||
|
|
||||||
@Entity({ name: 'userWorkspace', schema: 'core' })
|
@Entity({ name: 'userWorkspace', schema: 'core' })
|
||||||
@ObjectType('UserWorkspace')
|
@ObjectType()
|
||||||
@Unique('IndexOnUserIdAndWorkspaceIdUnique', ['userId', 'workspaceId'])
|
@Unique('IndexOnUserIdAndWorkspaceIdUnique', ['userId', 'workspaceId'])
|
||||||
export class UserWorkspace {
|
export class UserWorkspace {
|
||||||
@IDField(() => UUIDScalarType)
|
@IDField(() => UUIDScalarType)
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import {
|
|||||||
WorkspaceMemberTimeFormatEnum,
|
WorkspaceMemberTimeFormatEnum,
|
||||||
} from 'src/modules/workspace-member/standard-objects/workspace-member.workspace-entity';
|
} from 'src/modules/workspace-member/standard-objects/workspace-member.workspace-entity';
|
||||||
|
|
||||||
@ObjectType('FullName')
|
@ObjectType()
|
||||||
export class FullName {
|
export class FullName {
|
||||||
@Field({ nullable: false })
|
@Field({ nullable: false })
|
||||||
firstName: string;
|
firstName: string;
|
||||||
@ -17,7 +17,7 @@ export class FullName {
|
|||||||
lastName: string;
|
lastName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ObjectType('WorkspaceMember')
|
@ObjectType()
|
||||||
export class WorkspaceMember {
|
export class WorkspaceMember {
|
||||||
@IDField(() => UUIDScalarType)
|
@IDField(() => UUIDScalarType)
|
||||||
id: string;
|
id: string;
|
||||||
|
|||||||
@ -27,7 +27,7 @@ registerEnumType(OnboardingStatus, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
@Entity({ name: 'user', schema: 'core' })
|
@Entity({ name: 'user', schema: 'core' })
|
||||||
@ObjectType('User')
|
@ObjectType()
|
||||||
@Index('UQ_USER_EMAIL', ['email'], {
|
@Index('UQ_USER_EMAIL', ['email'], {
|
||||||
unique: true,
|
unique: true,
|
||||||
where: '"deletedAt" IS NULL',
|
where: '"deletedAt" IS NULL',
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import {
|
|||||||
|
|
||||||
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||||
import { AppToken } from 'src/engine/core-modules/app-token/app-token.entity';
|
import { AppToken } from 'src/engine/core-modules/app-token/app-token.entity';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { KeyValuePair } from 'src/engine/core-modules/key-value-pair/key-value-pair.entity';
|
import { KeyValuePair } from 'src/engine/core-modules/key-value-pair/key-value-pair.entity';
|
||||||
import { PostgresCredentials } from 'src/engine/core-modules/postgres-credentials/postgres-credentials.entity';
|
import { PostgresCredentials } from 'src/engine/core-modules/postgres-credentials/postgres-credentials.entity';
|
||||||
import { WorkspaceSSOIdentityProvider } from 'src/engine/core-modules/sso/workspace-sso-identity-provider.entity';
|
import { WorkspaceSSOIdentityProvider } from 'src/engine/core-modules/sso/workspace-sso-identity-provider.entity';
|
||||||
@ -26,7 +26,7 @@ registerEnumType(WorkspaceActivationStatus, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
@Entity({ name: 'workspace', schema: 'core' })
|
@Entity({ name: 'workspace', schema: 'core' })
|
||||||
@ObjectType('Workspace')
|
@ObjectType()
|
||||||
export class Workspace {
|
export class Workspace {
|
||||||
@IDField(() => UUIDScalarType)
|
@IDField(() => UUIDScalarType)
|
||||||
@PrimaryGeneratedColumn('uuid')
|
@PrimaryGeneratedColumn('uuid')
|
||||||
@ -83,8 +83,8 @@ export class Workspace {
|
|||||||
@Column({ default: true })
|
@Column({ default: true })
|
||||||
isPublicInviteLinkEnabled: boolean;
|
isPublicInviteLinkEnabled: boolean;
|
||||||
|
|
||||||
@OneToMany(() => FeatureFlagEntity, (featureFlag) => featureFlag.workspace)
|
@OneToMany(() => FeatureFlag, (featureFlag) => featureFlag.workspace)
|
||||||
featureFlags: Relation<FeatureFlagEntity[]>;
|
featureFlags: Relation<FeatureFlag[]>;
|
||||||
|
|
||||||
@Field({ nullable: true })
|
@Field({ nullable: true })
|
||||||
workspaceMembersCount: number;
|
workspaceMembersCount: number;
|
||||||
|
|||||||
@ -19,7 +19,7 @@ import { BillingSubscriptionService } from 'src/engine/core-modules/billing/serv
|
|||||||
import { DomainManagerService } from 'src/engine/core-modules/domain-manager/services/domain-manager.service';
|
import { DomainManagerService } from 'src/engine/core-modules/domain-manager/services/domain-manager.service';
|
||||||
import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service';
|
import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service';
|
||||||
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service';
|
import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service';
|
||||||
import { FileUploadService } from 'src/engine/core-modules/file/file-upload/services/file-upload.service';
|
import { FileUploadService } from 'src/engine/core-modules/file/file-upload/services/file-upload.service';
|
||||||
import { FileService } from 'src/engine/core-modules/file/services/file.service';
|
import { FileService } from 'src/engine/core-modules/file/services/file.service';
|
||||||
@ -142,10 +142,8 @@ export class WorkspaceResolver {
|
|||||||
return `${paths[0]}?token=${workspaceLogoToken}`;
|
return `${paths[0]}?token=${workspaceLogoToken}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ResolveField(() => [FeatureFlagEntity], { nullable: true })
|
@ResolveField(() => [FeatureFlag], { nullable: true })
|
||||||
async featureFlags(
|
async featureFlags(@Parent() workspace: Workspace): Promise<FeatureFlag[]> {
|
||||||
@Parent() workspace: Workspace,
|
|
||||||
): Promise<FeatureFlagEntity[]> {
|
|
||||||
const featureFlags = await this.featureFlagService.getWorkspaceFeatureFlags(
|
const featureFlags = await this.featureFlagService.getWorkspaceFeatureFlags(
|
||||||
workspace.id,
|
workspace.id,
|
||||||
);
|
);
|
||||||
|
|||||||
@ -44,7 +44,7 @@ registerEnumType(FieldMetadataType, {
|
|||||||
description: 'Type of the field',
|
description: 'Type of the field',
|
||||||
});
|
});
|
||||||
|
|
||||||
@ObjectType('field')
|
@ObjectType('Field')
|
||||||
@Authorize({
|
@Authorize({
|
||||||
authorize: (context: any) => ({
|
authorize: (context: any) => ({
|
||||||
workspaceId: { eq: context?.req?.workspace?.id },
|
workspaceId: { eq: context?.req?.workspace?.id },
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import { FieldMetadataDTO } from 'src/engine/metadata-modules/field-metadata/dto
|
|||||||
|
|
||||||
import { IndexMetadataDTO } from './index-metadata.dto';
|
import { IndexMetadataDTO } from './index-metadata.dto';
|
||||||
|
|
||||||
@ObjectType('indexField')
|
@ObjectType('IndexField')
|
||||||
@Authorize({
|
@Authorize({
|
||||||
authorize: (context: any) => ({
|
authorize: (context: any) => ({
|
||||||
workspaceId: { eq: context?.req?.workspace?.id },
|
workspaceId: { eq: context?.req?.workspace?.id },
|
||||||
|
|||||||
@ -33,7 +33,7 @@ registerEnumType(IndexType, {
|
|||||||
description: 'Type of the index',
|
description: 'Type of the index',
|
||||||
});
|
});
|
||||||
|
|
||||||
@ObjectType('index')
|
@ObjectType('Index')
|
||||||
@Authorize({
|
@Authorize({
|
||||||
authorize: (context: any) => ({
|
authorize: (context: any) => ({
|
||||||
workspaceId: { eq: context?.req?.workspace?.id },
|
workspaceId: { eq: context?.req?.workspace?.id },
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import { FieldMetadataDTO } from 'src/engine/metadata-modules/field-metadata/dto
|
|||||||
import { IndexMetadataDTO } from 'src/engine/metadata-modules/index-metadata/dtos/index-metadata.dto';
|
import { IndexMetadataDTO } from 'src/engine/metadata-modules/index-metadata/dtos/index-metadata.dto';
|
||||||
import { BeforeDeleteOneObject } from 'src/engine/metadata-modules/object-metadata/hooks/before-delete-one-object.hook';
|
import { BeforeDeleteOneObject } from 'src/engine/metadata-modules/object-metadata/hooks/before-delete-one-object.hook';
|
||||||
|
|
||||||
@ObjectType('object')
|
@ObjectType('Object')
|
||||||
@Authorize({
|
@Authorize({
|
||||||
authorize: (context: any) => ({
|
authorize: (context: any) => ({
|
||||||
workspaceId: { eq: context?.req?.workspace?.id },
|
workspaceId: { eq: context?.req?.workspace?.id },
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import {
|
|||||||
import { NestjsQueryTypeOrmModule } from '@ptc-org/nestjs-query-typeorm';
|
import { NestjsQueryTypeOrmModule } from '@ptc-org/nestjs-query-typeorm';
|
||||||
|
|
||||||
import { TypeORMModule } from 'src/database/typeorm/typeorm.module';
|
import { TypeORMModule } from 'src/database/typeorm/typeorm.module';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard';
|
import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard';
|
||||||
import { DataSourceModule } from 'src/engine/metadata-modules/data-source/data-source.module';
|
import { DataSourceModule } from 'src/engine/metadata-modules/data-source/data-source.module';
|
||||||
import { FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
|
import { FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
|
||||||
@ -43,7 +43,7 @@ import { UpdateObjectPayload } from './dtos/update-object.input';
|
|||||||
[ObjectMetadataEntity, FieldMetadataEntity, RelationMetadataEntity],
|
[ObjectMetadataEntity, FieldMetadataEntity, RelationMetadataEntity],
|
||||||
'metadata',
|
'metadata',
|
||||||
),
|
),
|
||||||
TypeOrmModule.forFeature([FeatureFlagEntity], 'core'),
|
TypeOrmModule.forFeature([FeatureFlag], 'core'),
|
||||||
DataSourceModule,
|
DataSourceModule,
|
||||||
WorkspaceMigrationModule,
|
WorkspaceMigrationModule,
|
||||||
WorkspaceMigrationRunnerModule,
|
WorkspaceMigrationRunnerModule,
|
||||||
|
|||||||
@ -24,7 +24,7 @@ registerEnumType(RelationMetadataType, {
|
|||||||
description: 'Type of the relation',
|
description: 'Type of the relation',
|
||||||
});
|
});
|
||||||
|
|
||||||
@ObjectType('relation')
|
@ObjectType('RelationMetadata')
|
||||||
@Authorize({
|
@Authorize({
|
||||||
authorize: (context: any) => ({
|
authorize: (context: any) => ({
|
||||||
workspaceId: { eq: context?.req?.workspace?.id },
|
workspaceId: { eq: context?.req?.workspace?.id },
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { Module } from '@nestjs/common';
|
|||||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||||
|
|
||||||
import { ForeignDataWrapperServerQueryFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/foreign-data-wrapper-server-query.factory';
|
import { ForeignDataWrapperServerQueryFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/foreign-data-wrapper-server-query.factory';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { JwtModule } from 'src/engine/core-modules/jwt/jwt.module';
|
import { JwtModule } from 'src/engine/core-modules/jwt/jwt.module';
|
||||||
import { RemoteServerEntity } from 'src/engine/metadata-modules/remote-server/remote-server.entity';
|
import { RemoteServerEntity } from 'src/engine/metadata-modules/remote-server/remote-server.entity';
|
||||||
import { RemoteServerResolver } from 'src/engine/metadata-modules/remote-server/remote-server.resolver';
|
import { RemoteServerResolver } from 'src/engine/metadata-modules/remote-server/remote-server.resolver';
|
||||||
@ -16,7 +16,7 @@ import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/works
|
|||||||
TypeOrmModule.forFeature([RemoteServerEntity], 'metadata'),
|
TypeOrmModule.forFeature([RemoteServerEntity], 'metadata'),
|
||||||
RemoteTableModule,
|
RemoteTableModule,
|
||||||
WorkspaceDataSourceModule,
|
WorkspaceDataSourceModule,
|
||||||
TypeOrmModule.forFeature([FeatureFlagEntity], 'core'),
|
TypeOrmModule.forFeature([FeatureFlag], 'core'),
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
RemoteServerService,
|
RemoteServerService,
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import { v4 } from 'uuid';
|
|||||||
|
|
||||||
import { ForeignDataWrapperServerQueryFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/foreign-data-wrapper-server-query.factory';
|
import { ForeignDataWrapperServerQueryFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/foreign-data-wrapper-server-query.factory';
|
||||||
import { encryptText } from 'src/engine/core-modules/auth/auth.util';
|
import { encryptText } from 'src/engine/core-modules/auth/auth.util';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { JwtWrapperService } from 'src/engine/core-modules/jwt/services/jwt-wrapper.service';
|
import { JwtWrapperService } from 'src/engine/core-modules/jwt/services/jwt-wrapper.service';
|
||||||
import { CreateRemoteServerInput } from 'src/engine/metadata-modules/remote-server/dtos/create-remote-server.input';
|
import { CreateRemoteServerInput } from 'src/engine/metadata-modules/remote-server/dtos/create-remote-server.input';
|
||||||
import { UpdateRemoteServerInput } from 'src/engine/metadata-modules/remote-server/dtos/update-remote-server.input';
|
import { UpdateRemoteServerInput } from 'src/engine/metadata-modules/remote-server/dtos/update-remote-server.input';
|
||||||
@ -41,8 +41,8 @@ export class RemoteServerService<T extends RemoteServerType> {
|
|||||||
private readonly foreignDataWrapperServerQueryFactory: ForeignDataWrapperServerQueryFactory,
|
private readonly foreignDataWrapperServerQueryFactory: ForeignDataWrapperServerQueryFactory,
|
||||||
private readonly remoteTableService: RemoteTableService,
|
private readonly remoteTableService: RemoteTableService,
|
||||||
private readonly workspaceDataSourceService: WorkspaceDataSourceService,
|
private readonly workspaceDataSourceService: WorkspaceDataSourceService,
|
||||||
@InjectRepository(FeatureFlagEntity, 'core')
|
@InjectRepository(FeatureFlag, 'core')
|
||||||
private readonly featureFlagRepository: Repository<FeatureFlagEntity>,
|
private readonly featureFlagRepository: Repository<FeatureFlag>,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public async createOneRemoteServer(
|
public async createOneRemoteServer(
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { Repository } from 'typeorm';
|
import { Repository } from 'typeorm';
|
||||||
|
|
||||||
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { RemoteServerType } from 'src/engine/metadata-modules/remote-server/remote-server.entity';
|
import { RemoteServerType } from 'src/engine/metadata-modules/remote-server/remote-server.entity';
|
||||||
import {
|
import {
|
||||||
RemoteServerException,
|
RemoteServerException,
|
||||||
@ -10,7 +10,7 @@ import {
|
|||||||
|
|
||||||
export const validateRemoteServerType = async (
|
export const validateRemoteServerType = async (
|
||||||
remoteServerType: RemoteServerType,
|
remoteServerType: RemoteServerType,
|
||||||
featureFlagRepository: Repository<FeatureFlagEntity>,
|
featureFlagRepository: Repository<FeatureFlag>,
|
||||||
workspaceId: string,
|
workspaceId: string,
|
||||||
) => {
|
) => {
|
||||||
const featureFlagKey = getFeatureFlagKey(remoteServerType);
|
const featureFlagKey = getFeatureFlagKey(remoteServerType);
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { TypeOrmModule } from '@nestjs/typeorm';
|
|||||||
import { NestjsQueryTypeOrmModule } from '@ptc-org/nestjs-query-typeorm';
|
import { NestjsQueryTypeOrmModule } from '@ptc-org/nestjs-query-typeorm';
|
||||||
|
|
||||||
import { AnalyticsModule } from 'src/engine/core-modules/analytics/analytics.module';
|
import { AnalyticsModule } from 'src/engine/core-modules/analytics/analytics.module';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { FileUploadModule } from 'src/engine/core-modules/file/file-upload/file-upload.module';
|
import { FileUploadModule } from 'src/engine/core-modules/file/file-upload/file-upload.module';
|
||||||
import { FileModule } from 'src/engine/core-modules/file/file.module';
|
import { FileModule } from 'src/engine/core-modules/file/file.module';
|
||||||
import { ThrottlerModule } from 'src/engine/core-modules/throttler/throttler.module';
|
import { ThrottlerModule } from 'src/engine/core-modules/throttler/throttler.module';
|
||||||
@ -17,7 +17,7 @@ import { BuildServerlessFunctionJob } from 'src/engine/metadata-modules/serverle
|
|||||||
imports: [
|
imports: [
|
||||||
FileUploadModule,
|
FileUploadModule,
|
||||||
NestjsQueryTypeOrmModule.forFeature([ServerlessFunctionEntity], 'metadata'),
|
NestjsQueryTypeOrmModule.forFeature([ServerlessFunctionEntity], 'metadata'),
|
||||||
TypeOrmModule.forFeature([FeatureFlagEntity], 'core'),
|
TypeOrmModule.forFeature([FeatureFlag], 'core'),
|
||||||
FileModule,
|
FileModule,
|
||||||
ThrottlerModule,
|
ThrottlerModule,
|
||||||
AnalyticsModule,
|
AnalyticsModule,
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import graphqlTypeJson from 'graphql-type-json';
|
|||||||
import { Repository } from 'typeorm';
|
import { Repository } from 'typeorm';
|
||||||
|
|
||||||
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||||
import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator';
|
import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator';
|
||||||
import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard';
|
import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard';
|
||||||
@ -30,8 +30,8 @@ import { serverlessFunctionGraphQLApiExceptionHandler } from 'src/engine/metadat
|
|||||||
export class ServerlessFunctionResolver {
|
export class ServerlessFunctionResolver {
|
||||||
constructor(
|
constructor(
|
||||||
private readonly serverlessFunctionService: ServerlessFunctionService,
|
private readonly serverlessFunctionService: ServerlessFunctionService,
|
||||||
@InjectRepository(FeatureFlagEntity, 'core')
|
@InjectRepository(FeatureFlag, 'core')
|
||||||
private readonly featureFlagRepository: Repository<FeatureFlagEntity>,
|
private readonly featureFlagRepository: Repository<FeatureFlag>,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async checkFeatureFlag(workspaceId: string) {
|
async checkFeatureFlag(workspaceId: string) {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { Module } from '@nestjs/common';
|
import { Module } from '@nestjs/common';
|
||||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||||
|
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module';
|
import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module';
|
||||||
import { FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
|
import { FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
|
||||||
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
|
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
|
||||||
@ -34,7 +34,7 @@ import { WorkspaceSyncMetadataService } from 'src/engine/workspace-manager/works
|
|||||||
],
|
],
|
||||||
'metadata',
|
'metadata',
|
||||||
),
|
),
|
||||||
TypeOrmModule.forFeature([FeatureFlagEntity], 'core'),
|
TypeOrmModule.forFeature([FeatureFlag], 'core'),
|
||||||
WorkspaceMetadataVersionModule,
|
WorkspaceMetadataVersionModule,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { DataSource, QueryFailedError, Repository } from 'typeorm';
|
|||||||
|
|
||||||
import { WorkspaceSyncContext } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/workspace-sync-context.interface';
|
import { WorkspaceSyncContext } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/workspace-sync-context.interface';
|
||||||
|
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service';
|
import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service';
|
||||||
import { WorkspaceMetadataVersionService } from 'src/engine/metadata-modules/workspace-metadata-version/services/workspace-metadata-version.service';
|
import { WorkspaceMetadataVersionService } from 'src/engine/metadata-modules/workspace-metadata-version/services/workspace-metadata-version.service';
|
||||||
import { WorkspaceMigrationEntity } from 'src/engine/metadata-modules/workspace-migration/workspace-migration.entity';
|
import { WorkspaceMigrationEntity } from 'src/engine/metadata-modules/workspace-migration/workspace-migration.entity';
|
||||||
@ -36,8 +36,8 @@ export class WorkspaceSyncMetadataService {
|
|||||||
private readonly workspaceSyncIndexMetadataService: WorkspaceSyncIndexMetadataService,
|
private readonly workspaceSyncIndexMetadataService: WorkspaceSyncIndexMetadataService,
|
||||||
private readonly workspaceSyncObjectMetadataIdentifiersService: WorkspaceSyncObjectMetadataIdentifiersService,
|
private readonly workspaceSyncObjectMetadataIdentifiersService: WorkspaceSyncObjectMetadataIdentifiersService,
|
||||||
private readonly workspaceMetadataVersionService: WorkspaceMetadataVersionService,
|
private readonly workspaceMetadataVersionService: WorkspaceMetadataVersionService,
|
||||||
@InjectRepository(FeatureFlagEntity, 'core')
|
@InjectRepository(FeatureFlag, 'core')
|
||||||
private readonly featureFlagRepository: Repository<FeatureFlagEntity>,
|
private readonly featureFlagRepository: Repository<FeatureFlag>,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { Module } from '@nestjs/common';
|
|||||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||||
|
|
||||||
import { BillingModule } from 'src/engine/core-modules/billing/billing.module';
|
import { BillingModule } from 'src/engine/core-modules/billing/billing.module';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||||
import { DataSourceEntity } from 'src/engine/metadata-modules/data-source/data-source.entity';
|
import { DataSourceEntity } from 'src/engine/metadata-modules/data-source/data-source.entity';
|
||||||
import { ObjectMetadataRepositoryModule } from 'src/engine/object-metadata-repository/object-metadata-repository.module';
|
import { ObjectMetadataRepositoryModule } from 'src/engine/object-metadata-repository/object-metadata-repository.module';
|
||||||
@ -39,7 +39,7 @@ import { WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/sta
|
|||||||
WorkspaceMemberWorkspaceEntity,
|
WorkspaceMemberWorkspaceEntity,
|
||||||
]),
|
]),
|
||||||
CalendarEventParticipantManagerModule,
|
CalendarEventParticipantManagerModule,
|
||||||
TypeOrmModule.forFeature([FeatureFlagEntity, Workspace], 'core'),
|
TypeOrmModule.forFeature([FeatureFlag, Workspace], 'core'),
|
||||||
TypeOrmModule.forFeature([DataSourceEntity], 'metadata'),
|
TypeOrmModule.forFeature([DataSourceEntity], 'metadata'),
|
||||||
WorkspaceDataSourceModule,
|
WorkspaceDataSourceModule,
|
||||||
CalendarEventCleanerModule,
|
CalendarEventCleanerModule,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { Module } from '@nestjs/common';
|
import { Module } from '@nestjs/common';
|
||||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||||
|
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/workspace-datasource.module';
|
import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/workspace-datasource.module';
|
||||||
import { CalendarChannelSyncStatusService } from 'src/modules/calendar/common/services/calendar-channel-sync-status.service';
|
import { CalendarChannelSyncStatusService } from 'src/modules/calendar/common/services/calendar-channel-sync-status.service';
|
||||||
import { ConnectedAccountModule } from 'src/modules/connected-account/connected-account.module';
|
import { ConnectedAccountModule } from 'src/modules/connected-account/connected-account.module';
|
||||||
@ -9,7 +9,7 @@ import { ConnectedAccountModule } from 'src/modules/connected-account/connected-
|
|||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
WorkspaceDataSourceModule,
|
WorkspaceDataSourceModule,
|
||||||
TypeOrmModule.forFeature([FeatureFlagEntity], 'core'),
|
TypeOrmModule.forFeature([FeatureFlag], 'core'),
|
||||||
ConnectedAccountModule,
|
ConnectedAccountModule,
|
||||||
],
|
],
|
||||||
providers: [CalendarChannelSyncStatusService],
|
providers: [CalendarChannelSyncStatusService],
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { Module } from '@nestjs/common';
|
import { Module } from '@nestjs/common';
|
||||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||||
|
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
|
import { FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
|
||||||
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
|
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
|
||||||
import { ObjectMetadataRepositoryModule } from 'src/engine/object-metadata-repository/object-metadata-repository.module';
|
import { ObjectMetadataRepositoryModule } from 'src/engine/object-metadata-repository/object-metadata-repository.module';
|
||||||
@ -17,7 +17,7 @@ import { WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/sta
|
|||||||
imports: [
|
imports: [
|
||||||
ObjectMetadataRepositoryModule.forFeature([WorkspaceMemberWorkspaceEntity]),
|
ObjectMetadataRepositoryModule.forFeature([WorkspaceMemberWorkspaceEntity]),
|
||||||
WorkspaceDataSourceModule,
|
WorkspaceDataSourceModule,
|
||||||
TypeOrmModule.forFeature([FeatureFlagEntity], 'core'),
|
TypeOrmModule.forFeature([FeatureFlag], 'core'),
|
||||||
TypeOrmModule.forFeature(
|
TypeOrmModule.forFeature(
|
||||||
[ObjectMetadataEntity, FieldMetadataEntity],
|
[ObjectMetadataEntity, FieldMetadataEntity],
|
||||||
'metadata',
|
'metadata',
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { Module } from '@nestjs/common';
|
import { Module } from '@nestjs/common';
|
||||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||||
|
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/workspace-datasource.module';
|
import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/workspace-datasource.module';
|
||||||
import { ConnectedAccountModule } from 'src/modules/connected-account/connected-account.module';
|
import { ConnectedAccountModule } from 'src/modules/connected-account/connected-account.module';
|
||||||
import { MessageChannelSyncStatusService } from 'src/modules/messaging/common/services/message-channel-sync-status.service';
|
import { MessageChannelSyncStatusService } from 'src/modules/messaging/common/services/message-channel-sync-status.service';
|
||||||
@ -9,7 +9,7 @@ import { MessageChannelSyncStatusService } from 'src/modules/messaging/common/se
|
|||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
WorkspaceDataSourceModule,
|
WorkspaceDataSourceModule,
|
||||||
TypeOrmModule.forFeature([FeatureFlagEntity], 'core'),
|
TypeOrmModule.forFeature([FeatureFlag], 'core'),
|
||||||
ConnectedAccountModule,
|
ConnectedAccountModule,
|
||||||
],
|
],
|
||||||
providers: [MessageChannelSyncStatusService],
|
providers: [MessageChannelSyncStatusService],
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { Module } from '@nestjs/common';
|
|||||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||||
|
|
||||||
import { EnvironmentModule } from 'src/engine/core-modules/environment/environment.module';
|
import { EnvironmentModule } from 'src/engine/core-modules/environment/environment.module';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module';
|
import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module';
|
||||||
import { ObjectMetadataRepositoryModule } from 'src/engine/object-metadata-repository/object-metadata-repository.module';
|
import { ObjectMetadataRepositoryModule } from 'src/engine/object-metadata-repository/object-metadata-repository.module';
|
||||||
import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/workspace-datasource.module';
|
import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/workspace-datasource.module';
|
||||||
@ -27,7 +27,7 @@ import { MessageParticipantManagerModule } from 'src/modules/messaging/message-p
|
|||||||
EnvironmentModule,
|
EnvironmentModule,
|
||||||
ObjectMetadataRepositoryModule.forFeature([BlocklistWorkspaceEntity]),
|
ObjectMetadataRepositoryModule.forFeature([BlocklistWorkspaceEntity]),
|
||||||
MessagingCommonModule,
|
MessagingCommonModule,
|
||||||
TypeOrmModule.forFeature([FeatureFlagEntity], 'core'),
|
TypeOrmModule.forFeature([FeatureFlag], 'core'),
|
||||||
OAuth2ClientManagerModule,
|
OAuth2ClientManagerModule,
|
||||||
EmailAliasManagerModule,
|
EmailAliasManagerModule,
|
||||||
FeatureFlagModule,
|
FeatureFlagModule,
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { Module } from '@nestjs/common';
|
|||||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||||
|
|
||||||
import { AnalyticsModule } from 'src/engine/core-modules/analytics/analytics.module';
|
import { AnalyticsModule } from 'src/engine/core-modules/analytics/analytics.module';
|
||||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
import { FeatureFlag } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||||
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||||
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
|
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
|
||||||
import { ObjectMetadataRepositoryModule } from 'src/engine/object-metadata-repository/object-metadata-repository.module';
|
import { ObjectMetadataRepositoryModule } from 'src/engine/object-metadata-repository/object-metadata-repository.module';
|
||||||
@ -21,7 +21,7 @@ import { TimelineActivityWorkspaceEntity } from 'src/modules/timeline/standard-o
|
|||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
TypeOrmModule.forFeature([FeatureFlagEntity, Workspace], 'core'),
|
TypeOrmModule.forFeature([FeatureFlag, Workspace], 'core'),
|
||||||
AnalyticsModule,
|
AnalyticsModule,
|
||||||
ContactCreationManagerModule,
|
ContactCreationManagerModule,
|
||||||
WorkspaceDataSourceModule,
|
WorkspaceDataSourceModule,
|
||||||
|
|||||||
@ -13,7 +13,7 @@ export const objectsMetadataFactory = ({
|
|||||||
input,
|
input,
|
||||||
}: ObjectsFactoryParams) => ({
|
}: ObjectsFactoryParams) => ({
|
||||||
query: gql`
|
query: gql`
|
||||||
query ObjectsMetadata($filter: objectFilter!, $paging: CursorPaging!) {
|
query ObjectsMetadata($filter: ObjectFilter!, $paging: CursorPaging!) {
|
||||||
objects(filter: $filter, paging: $paging) {
|
objects(filter: $filter, paging: $paging) {
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
|
|||||||
@ -14,8 +14,8 @@ export const createOneRelationMetadataFactory = ({
|
|||||||
input,
|
input,
|
||||||
}: CreateOneRelationFactoryParams) => ({
|
}: CreateOneRelationFactoryParams) => ({
|
||||||
query: gql`
|
query: gql`
|
||||||
mutation CreateOneRelationMetadata($input: CreateOneRelationInput!) {
|
mutation CreateOneRelationMetadata($input: CreateOneRelationMetadataInput!) {
|
||||||
createOneRelation(input: $input) {
|
createOneRelationMetadata(input: $input) {
|
||||||
${gqlFields}
|
${gqlFields}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user