Feat/front metadata request (#1977)

* wip

* Wip

* Wip

* Finished v1

* Fix from PR

* Removed unused fragment masking feature
This commit is contained in:
Lucas Bordeau
2023-10-13 18:01:57 +02:00
committed by GitHub
parent 41ae30cada
commit cafcfdc95e
28 changed files with 1439 additions and 140 deletions

View File

@ -13,6 +13,7 @@ export type Scalars = {
Boolean: boolean;
Int: number;
Float: number;
ConnectionCursor: any;
DateTime: string;
JSON: any;
Upload: any;
@ -445,6 +446,63 @@ export type Analytics = {
success: Scalars['Boolean'];
};
export type ApiKey = {
__typename?: 'ApiKey';
createdAt: Scalars['DateTime'];
expiresAt?: Maybe<Scalars['DateTime']>;
id: Scalars['ID'];
name: Scalars['String'];
updatedAt: Scalars['DateTime'];
};
export type ApiKeyCreateInput = {
createdAt?: InputMaybe<Scalars['DateTime']>;
expiresAt?: InputMaybe<Scalars['DateTime']>;
id?: InputMaybe<Scalars['String']>;
name: Scalars['String'];
updatedAt?: InputMaybe<Scalars['DateTime']>;
};
export type ApiKeyOrderByWithRelationInput = {
createdAt?: InputMaybe<SortOrder>;
expiresAt?: InputMaybe<SortOrder>;
id?: InputMaybe<SortOrder>;
name?: InputMaybe<SortOrder>;
updatedAt?: InputMaybe<SortOrder>;
};
export enum ApiKeyScalarFieldEnum {
CreatedAt = 'createdAt',
DeletedAt = 'deletedAt',
ExpiresAt = 'expiresAt',
Id = 'id',
Name = 'name',
RevokedAt = 'revokedAt',
UpdatedAt = 'updatedAt',
WorkspaceId = 'workspaceId'
}
export type ApiKeyUpdateManyWithoutWorkspaceNestedInput = {
connect?: InputMaybe<Array<ApiKeyWhereUniqueInput>>;
disconnect?: InputMaybe<Array<ApiKeyWhereUniqueInput>>;
set?: InputMaybe<Array<ApiKeyWhereUniqueInput>>;
};
export type ApiKeyWhereInput = {
AND?: InputMaybe<Array<ApiKeyWhereInput>>;
NOT?: InputMaybe<Array<ApiKeyWhereInput>>;
OR?: InputMaybe<Array<ApiKeyWhereInput>>;
createdAt?: InputMaybe<DateTimeFilter>;
expiresAt?: InputMaybe<DateTimeNullableFilter>;
id?: InputMaybe<StringFilter>;
name?: InputMaybe<StringFilter>;
updatedAt?: InputMaybe<DateTimeFilter>;
};
export type ApiKeyWhereUniqueInput = {
id?: InputMaybe<Scalars['String']>;
};
export type Attachment = {
__typename?: 'Attachment';
activity?: Maybe<Activity>;
@ -1070,6 +1128,17 @@ export enum Currency {
Zwl = 'ZWL'
}
export type CursorPaging = {
/** Paginate after opaque cursor */
after?: InputMaybe<Scalars['ConnectionCursor']>;
/** Paginate before opaque cursor */
before?: InputMaybe<Scalars['ConnectionCursor']>;
/** Paginate first */
first?: InputMaybe<Scalars['Int']>;
/** Paginate last */
last?: InputMaybe<Scalars['Int']>;
};
export type DateTimeFilter = {
equals?: InputMaybe<Scalars['DateTime']>;
gt?: InputMaybe<Scalars['DateTime']>;
@ -1219,6 +1288,16 @@ export type FavoriteWhereUniqueInput = {
id?: InputMaybe<Scalars['String']>;
};
export type FieldConnection = {
__typename?: 'FieldConnection';
/** Array of edges. */
edges: Array<FieldEdge>;
/** Paging information */
pageInfo: PageInfo;
/** Fetch total count of records */
totalCount: Scalars['Int'];
};
export enum FileFolder {
Attachment = 'Attachment',
PersonPicture = 'PersonPicture',
@ -1274,7 +1353,6 @@ export type Mutation = {
UpdateOneWorkspaceMember: WorkspaceMember;
allowImpersonation: WorkspaceMember;
challenge: LoginToken;
createCustomField: Scalars['String'];
createEvent: Analytics;
createFavoriteForCompany: Favorite;
createFavoriteForPerson: Favorite;
@ -1285,6 +1363,7 @@ export type Mutation = {
createManyViewFilter: AffectedRows;
createManyViewSort: AffectedRows;
createOneActivity: Activity;
createOneApiKey: AuthToken;
createOneComment: Comment;
createOneCompany: Company;
createOnePerson: Person;
@ -1307,6 +1386,7 @@ export type Mutation = {
deleteWorkspaceMember: WorkspaceMember;
impersonate: Verify;
renewToken: AuthTokens;
revokeOneApiKey: ApiKey;
signUp: LoginToken;
updateOneActivity: Activity;
updateOneCompany?: Maybe<Company>;
@ -1346,13 +1426,6 @@ export type MutationChallengeArgs = {
};
export type MutationCreateCustomFieldArgs = {
name: Scalars['String'];
objectId: Scalars['String'];
type: Scalars['String'];
};
export type MutationCreateEventArgs = {
data: Scalars['JSON'];
type: Scalars['String'];
@ -1410,6 +1483,11 @@ export type MutationCreateOneActivityArgs = {
};
export type MutationCreateOneApiKeyArgs = {
data: ApiKeyCreateInput;
};
export type MutationCreateOneCommentArgs = {
data: CommentCreateInput;
};
@ -1510,6 +1588,11 @@ export type MutationRenewTokenArgs = {
};
export type MutationRevokeOneApiKeyArgs = {
where: ApiKeyWhereUniqueInput;
};
export type MutationSignUpArgs = {
email: Scalars['String'];
password: Scalars['String'];
@ -1755,19 +1838,36 @@ export type NestedStringNullableFilter = {
startsWith?: InputMaybe<Scalars['String']>;
};
export type PageInfo = {
__typename?: 'PageInfo';
endCursor?: Maybe<Scalars['String']>;
hasNextPage: Scalars['Boolean'];
hasPreviousPage: Scalars['Boolean'];
startCursor?: Maybe<Scalars['String']>;
export type ObjectConnection = {
__typename?: 'ObjectConnection';
/** Array of edges. */
edges: Array<ObjectEdge>;
/** Paging information */
pageInfo: PageInfo;
/** Fetch total count of records */
totalCount: Scalars['Int'];
};
export type PaginatedUniversalEntity = {
__typename?: 'PaginatedUniversalEntity';
edges?: Maybe<Array<UniversalEntityEdge>>;
pageInfo?: Maybe<PageInfo>;
totalCount: Scalars['Float'];
export type ObjectFieldsConnection = {
__typename?: 'ObjectFieldsConnection';
/** Array of edges. */
edges: Array<FieldEdge>;
/** Paging information */
pageInfo: PageInfo;
/** Fetch total count of records */
totalCount: Scalars['Int'];
};
export type PageInfo = {
__typename?: 'PageInfo';
/** The cursor of the last returned record. */
endCursor?: Maybe<Scalars['ConnectionCursor']>;
/** true if paging forward and there are more records. */
hasNextPage?: Maybe<Scalars['Boolean']>;
/** true if paging backwards and there are more records. */
hasPreviousPage?: Maybe<Scalars['Boolean']>;
/** The cursor of the first returned record. */
startCursor?: Maybe<Scalars['ConnectionCursor']>;
};
export type Person = {
@ -2350,10 +2450,9 @@ export type Query = {
clientConfig: ClientConfig;
currentUser: User;
currentWorkspace: Workspace;
deleteOneCustom: UniversalEntity;
findFavorites: Array<Favorite>;
findMany: PaginatedUniversalEntity;
findManyActivities: Array<Activity>;
findManyApiKey: Array<ApiKey>;
findManyCompany: Array<Company>;
findManyPerson: Array<Person>;
findManyPipeline: Array<Pipeline>;
@ -2365,11 +2464,9 @@ export type Query = {
findManyViewFilter: Array<ViewFilter>;
findManyViewSort: Array<ViewSort>;
findManyWorkspaceMember: Array<WorkspaceMember>;
findUnique: UniversalEntity;
findUniqueCompany: Company;
findUniquePerson: Person;
findWorkspaceFromInviteHash: Workspace;
updateOneCustom: UniversalEntity;
};
@ -2383,21 +2480,6 @@ export type QueryCheckWorkspaceInviteHashIsValidArgs = {
};
export type QueryFindManyArgs = {
after?: InputMaybe<Scalars['String']>;
before?: InputMaybe<Scalars['String']>;
cursor?: InputMaybe<Scalars['JSON']>;
distinct?: InputMaybe<Array<Scalars['String']>>;
entity: Scalars['String'];
first?: InputMaybe<Scalars['Float']>;
last?: InputMaybe<Scalars['Float']>;
orderBy?: InputMaybe<UniversalEntityOrderByRelationInput>;
skip?: InputMaybe<Scalars['Int']>;
take?: InputMaybe<Scalars['Int']>;
where?: InputMaybe<UniversalEntityInput>;
};
export type QueryFindManyActivitiesArgs = {
cursor?: InputMaybe<ActivityWhereUniqueInput>;
distinct?: InputMaybe<Array<ActivityScalarFieldEnum>>;
@ -2408,6 +2490,16 @@ export type QueryFindManyActivitiesArgs = {
};
export type QueryFindManyApiKeyArgs = {
cursor?: InputMaybe<ApiKeyWhereUniqueInput>;
distinct?: InputMaybe<Array<ApiKeyScalarFieldEnum>>;
orderBy?: InputMaybe<Array<ApiKeyOrderByWithRelationInput>>;
skip?: InputMaybe<Scalars['Int']>;
take?: InputMaybe<Scalars['Int']>;
where?: InputMaybe<ApiKeyWhereInput>;
};
export type QueryFindManyCompanyArgs = {
cursor?: InputMaybe<CompanyWhereUniqueInput>;
distinct?: InputMaybe<Array<CompanyScalarFieldEnum>>;
@ -2518,12 +2610,6 @@ export type QueryFindManyWorkspaceMemberArgs = {
};
export type QueryFindUniqueArgs = {
entity: Scalars['String'];
where?: InputMaybe<UniversalEntityInput>;
};
export type QueryFindUniqueCompanyArgs = {
where: CompanyWhereUniqueInput;
};
@ -2590,39 +2676,6 @@ export type Telemetry = {
enabled: Scalars['Boolean'];
};
export enum TypeOrmSortOrder {
Asc = 'ASC',
Desc = 'DESC'
}
export type UniversalEntity = {
__typename?: 'UniversalEntity';
createdAt: Scalars['DateTime'];
data: Scalars['JSON'];
id: Scalars['ID'];
updatedAt: Scalars['DateTime'];
};
export type UniversalEntityEdge = {
__typename?: 'UniversalEntityEdge';
cursor?: Maybe<Scalars['String']>;
node?: Maybe<UniversalEntity>;
};
export type UniversalEntityInput = {
createdAt?: InputMaybe<Scalars['DateTime']>;
data?: InputMaybe<Scalars['JSON']>;
id?: InputMaybe<Scalars['ID']>;
updatedAt?: InputMaybe<Scalars['DateTime']>;
};
export type UniversalEntityOrderByRelationInput = {
createdAt?: InputMaybe<TypeOrmSortOrder>;
data?: InputMaybe<Scalars['JSON']>;
id?: InputMaybe<TypeOrmSortOrder>;
updatedAt?: InputMaybe<TypeOrmSortOrder>;
};
export type User = {
__typename?: 'User';
assignedActivities?: Maybe<Array<Activity>>;
@ -3282,6 +3335,7 @@ export type Workspace = {
Attachment?: Maybe<Array<Attachment>>;
activities?: Maybe<Array<Activity>>;
activityTargets?: Maybe<Array<ActivityTarget>>;
apiKeys?: Maybe<Array<ApiKey>>;
comments?: Maybe<Array<Comment>>;
companies?: Maybe<Array<Company>>;
createdAt: Scalars['DateTime'];
@ -3456,6 +3510,7 @@ export type WorkspaceUpdateInput = {
Attachment?: InputMaybe<AttachmentUpdateManyWithoutWorkspaceNestedInput>;
activities?: InputMaybe<ActivityUpdateManyWithoutWorkspaceNestedInput>;
activityTargets?: InputMaybe<ActivityTargetUpdateManyWithoutWorkspaceNestedInput>;
apiKeys?: InputMaybe<ApiKeyUpdateManyWithoutWorkspaceNestedInput>;
comments?: InputMaybe<CommentUpdateManyWithoutWorkspaceNestedInput>;
companies?: InputMaybe<CompanyUpdateManyWithoutWorkspaceNestedInput>;
createdAt?: InputMaybe<Scalars['DateTime']>;
@ -3476,6 +3531,62 @@ export type WorkspaceUpdateInput = {
workspaceMember?: InputMaybe<WorkspaceMemberUpdateManyWithoutWorkspaceNestedInput>;
};
export type Field = {
__typename?: 'field';
createdAt: Scalars['DateTime'];
description?: Maybe<Scalars['String']>;
icon?: Maybe<Scalars['String']>;
id: Scalars['ID'];
isActive: Scalars['Boolean'];
isCustom: Scalars['Boolean'];
isNullable: Scalars['Boolean'];
labelPlural: Scalars['String'];
labelSingular: Scalars['String'];
namePlural: Scalars['String'];
nameSingular: Scalars['String'];
placeholder?: Maybe<Scalars['String']>;
type: Scalars['String'];
updatedAt: Scalars['DateTime'];
};
export type FieldEdge = {
__typename?: 'fieldEdge';
/** Cursor for this node. */
cursor: Scalars['ConnectionCursor'];
/** The node containing the field */
node: Field;
};
export type Object = {
__typename?: 'object';
createdAt: Scalars['DateTime'];
dataSourceId: Scalars['String'];
description?: Maybe<Scalars['String']>;
fields: ObjectFieldsConnection;
icon?: Maybe<Scalars['String']>;
id: Scalars['ID'];
isActive: Scalars['Boolean'];
isCustom: Scalars['Boolean'];
labelPlural: Scalars['String'];
labelSingular: Scalars['String'];
namePlural: Scalars['String'];
nameSingular: Scalars['String'];
updatedAt: Scalars['DateTime'];
};
export type ObjectFieldsArgs = {
paging?: CursorPaging;
};
export type ObjectEdge = {
__typename?: 'objectEdge';
/** Cursor for this node. */
cursor: Scalars['ConnectionCursor'];
/** The node containing the object */
node: Object;
};
export type ActivityWithTargetsFragment = { __typename?: 'Activity', id: string, createdAt: string, updatedAt: string, activityTargets?: Array<{ __typename?: 'ActivityTarget', id: string, createdAt: string, updatedAt: string, companyId?: string | null, personId?: string | null }> | null };
export type ActivityQueryFragmentFragment = { __typename?: 'Activity', id: string, createdAt: string, title?: string | null, body?: string | null, type: ActivityType, completedAt?: string | null, dueAt?: string | null, assignee?: { __typename?: 'User', id: string, firstName?: string | null, lastName?: string | null, displayName: string, avatarUrl?: string | null } | null, author: { __typename?: 'User', id: string, firstName?: string | null, lastName?: string | null, displayName: string }, comments?: Array<{ __typename?: 'Comment', id: string, body: string, createdAt: string, updatedAt: string, author: { __typename?: 'User', id: string, displayName: string, firstName?: string | null, lastName?: string | null, avatarUrl?: string | null } }> | null, activityTargets?: Array<{ __typename?: 'ActivityTarget', id: string, companyId?: string | null, personId?: string | null, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null, person?: { __typename?: 'Person', id: string, displayName: string, avatarUrl?: string | null } | null }> | null };