feat: add bulk action api schema
This commit is contained in:
@ -222,6 +222,13 @@ export type ArticlesSuccess = {
|
||||
pageInfo: PageInfo;
|
||||
};
|
||||
|
||||
export type BulkAction = {
|
||||
itemIds: Array<Scalars['ID']>;
|
||||
itemType: BulkActionItemType;
|
||||
labelIds?: InputMaybe<Array<Scalars['ID']>>;
|
||||
type: BulkActionType;
|
||||
};
|
||||
|
||||
export type BulkActionError = {
|
||||
__typename?: 'BulkActionError';
|
||||
errorCodes: Array<BulkActionErrorCode>;
|
||||
@ -231,6 +238,18 @@ export enum BulkActionErrorCode {
|
||||
Unauthorized = 'UNAUTHORIZED'
|
||||
}
|
||||
|
||||
export type BulkActionInput = {
|
||||
actions: Array<BulkAction>;
|
||||
query?: InputMaybe<Scalars['String']>;
|
||||
};
|
||||
|
||||
export enum BulkActionItemType {
|
||||
Highlight = 'HIGHLIGHT',
|
||||
Label = 'LABEL',
|
||||
Page = 'PAGE',
|
||||
Subscription = 'SUBSCRIPTION'
|
||||
}
|
||||
|
||||
export type BulkActionResult = BulkActionError | BulkActionSuccess;
|
||||
|
||||
export type BulkActionSuccess = {
|
||||
@ -239,8 +258,10 @@ export type BulkActionSuccess = {
|
||||
};
|
||||
|
||||
export enum BulkActionType {
|
||||
AddLabels = 'ADD_LABELS',
|
||||
Archive = 'ARCHIVE',
|
||||
Delete = 'DELETE'
|
||||
Delete = 'DELETE',
|
||||
MarkAsRead = 'MARK_AS_READ'
|
||||
}
|
||||
|
||||
export enum ContentReader {
|
||||
@ -1298,8 +1319,7 @@ export type MutationAddPopularReadArgs = {
|
||||
|
||||
|
||||
export type MutationBulkActionArgs = {
|
||||
action: BulkActionType;
|
||||
query?: InputMaybe<Scalars['String']>;
|
||||
input: BulkActionInput;
|
||||
};
|
||||
|
||||
|
||||
@ -3293,8 +3313,11 @@ export type ResolversTypes = {
|
||||
ArticlesResult: ResolversTypes['ArticlesError'] | ResolversTypes['ArticlesSuccess'];
|
||||
ArticlesSuccess: ResolverTypeWrapper<ArticlesSuccess>;
|
||||
Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
|
||||
BulkAction: BulkAction;
|
||||
BulkActionError: ResolverTypeWrapper<BulkActionError>;
|
||||
BulkActionErrorCode: BulkActionErrorCode;
|
||||
BulkActionInput: BulkActionInput;
|
||||
BulkActionItemType: BulkActionItemType;
|
||||
BulkActionResult: ResolversTypes['BulkActionError'] | ResolversTypes['BulkActionSuccess'];
|
||||
BulkActionSuccess: ResolverTypeWrapper<BulkActionSuccess>;
|
||||
BulkActionType: BulkActionType;
|
||||
@ -3773,7 +3796,9 @@ export type ResolversParentTypes = {
|
||||
ArticlesResult: ResolversParentTypes['ArticlesError'] | ResolversParentTypes['ArticlesSuccess'];
|
||||
ArticlesSuccess: ArticlesSuccess;
|
||||
Boolean: Scalars['Boolean'];
|
||||
BulkAction: BulkAction;
|
||||
BulkActionError: BulkActionError;
|
||||
BulkActionInput: BulkActionInput;
|
||||
BulkActionResult: ResolversParentTypes['BulkActionError'] | ResolversParentTypes['BulkActionSuccess'];
|
||||
BulkActionSuccess: BulkActionSuccess;
|
||||
CreateArticleError: CreateArticleError;
|
||||
@ -5012,7 +5037,7 @@ export type MoveLabelSuccessResolvers<ContextType = ResolverContext, ParentType
|
||||
|
||||
export type MutationResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['Mutation'] = ResolversParentTypes['Mutation']> = {
|
||||
addPopularRead?: Resolver<ResolversTypes['AddPopularReadResult'], ParentType, ContextType, RequireFields<MutationAddPopularReadArgs, 'name'>>;
|
||||
bulkAction?: Resolver<ResolversTypes['BulkActionResult'], ParentType, ContextType, RequireFields<MutationBulkActionArgs, 'action'>>;
|
||||
bulkAction?: Resolver<ResolversTypes['BulkActionResult'], ParentType, ContextType, RequireFields<MutationBulkActionArgs, 'input'>>;
|
||||
createArticle?: Resolver<ResolversTypes['CreateArticleResult'], ParentType, ContextType, RequireFields<MutationCreateArticleArgs, 'input'>>;
|
||||
createArticleSavingRequest?: Resolver<ResolversTypes['CreateArticleSavingRequestResult'], ParentType, ContextType, RequireFields<MutationCreateArticleSavingRequestArgs, 'input'>>;
|
||||
createGroup?: Resolver<ResolversTypes['CreateGroupResult'], ParentType, ContextType, RequireFields<MutationCreateGroupArgs, 'input'>>;
|
||||
|
||||
@ -183,6 +183,13 @@ type ArticlesSuccess {
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
input BulkAction {
|
||||
itemIds: [ID!]!
|
||||
itemType: BulkActionItemType!
|
||||
labelIds: [ID!]
|
||||
type: BulkActionType!
|
||||
}
|
||||
|
||||
type BulkActionError {
|
||||
errorCodes: [BulkActionErrorCode!]!
|
||||
}
|
||||
@ -191,6 +198,18 @@ enum BulkActionErrorCode {
|
||||
UNAUTHORIZED
|
||||
}
|
||||
|
||||
input BulkActionInput {
|
||||
actions: [BulkAction!]!
|
||||
query: String
|
||||
}
|
||||
|
||||
enum BulkActionItemType {
|
||||
HIGHLIGHT
|
||||
LABEL
|
||||
PAGE
|
||||
SUBSCRIPTION
|
||||
}
|
||||
|
||||
union BulkActionResult = BulkActionError | BulkActionSuccess
|
||||
|
||||
type BulkActionSuccess {
|
||||
@ -198,8 +217,10 @@ type BulkActionSuccess {
|
||||
}
|
||||
|
||||
enum BulkActionType {
|
||||
ADD_LABELS
|
||||
ARCHIVE
|
||||
DELETE
|
||||
MARK_AS_READ
|
||||
}
|
||||
|
||||
enum ContentReader {
|
||||
@ -1090,7 +1111,7 @@ type MoveLabelSuccess {
|
||||
|
||||
type Mutation {
|
||||
addPopularRead(name: String!): AddPopularReadResult!
|
||||
bulkAction(action: BulkActionType!, query: String): BulkActionResult!
|
||||
bulkAction(input: BulkActionInput!): BulkActionResult!
|
||||
createArticle(input: CreateArticleInput!): CreateArticleResult!
|
||||
createArticleSavingRequest(input: CreateArticleSavingRequestInput!): CreateArticleSavingRequestResult!
|
||||
createGroup(input: CreateGroupInput!): CreateGroupResult!
|
||||
|
||||
@ -2416,6 +2416,27 @@ const schema = gql`
|
||||
enum BulkActionType {
|
||||
DELETE
|
||||
ARCHIVE
|
||||
MARK_AS_READ
|
||||
ADD_LABELS
|
||||
}
|
||||
|
||||
input BulkAction {
|
||||
itemType: BulkActionItemType!
|
||||
type: BulkActionType!
|
||||
itemIds: [ID!]!
|
||||
labelIds: [ID!]
|
||||
}
|
||||
|
||||
enum BulkActionItemType {
|
||||
PAGE
|
||||
HIGHLIGHT
|
||||
LABEL
|
||||
SUBSCRIPTION
|
||||
}
|
||||
|
||||
input BulkActionInput {
|
||||
query: String
|
||||
actions: [BulkAction!]!
|
||||
}
|
||||
|
||||
union BulkActionResult = BulkActionSuccess | BulkActionError
|
||||
@ -2538,7 +2559,7 @@ const schema = gql`
|
||||
contentType: String!
|
||||
): UploadImportFileResult!
|
||||
markEmailAsItem(recentEmailId: ID!): MarkEmailAsItemResult!
|
||||
bulkAction(query: String, action: BulkActionType!): BulkActionResult!
|
||||
bulkAction(input: BulkActionInput!): BulkActionResult!
|
||||
importFromIntegration(integrationId: ID!): ImportFromIntegrationResult!
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user