mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Add rules api gql schema
This commit is contained in:
parent
db4f225b5c
commit
775180d785
3 changed files with 392 additions and 0 deletions
|
|
@ -571,6 +571,24 @@ export type DeleteReminderSuccess = {
|
|||
reminder: Reminder;
|
||||
};
|
||||
|
||||
export type DeleteRuleError = {
|
||||
__typename?: 'DeleteRuleError';
|
||||
errorCodes: Array<DeleteRuleErrorCode>;
|
||||
};
|
||||
|
||||
export enum DeleteRuleErrorCode {
|
||||
BadRequest = 'BAD_REQUEST',
|
||||
NotFound = 'NOT_FOUND',
|
||||
Unauthorized = 'UNAUTHORIZED'
|
||||
}
|
||||
|
||||
export type DeleteRuleResult = DeleteRuleError | DeleteRuleSuccess;
|
||||
|
||||
export type DeleteRuleSuccess = {
|
||||
__typename?: 'DeleteRuleSuccess';
|
||||
rule: Rule;
|
||||
};
|
||||
|
||||
export type DeleteWebhookError = {
|
||||
__typename?: 'DeleteWebhookError';
|
||||
errorCodes: Array<DeleteWebhookErrorCode>;
|
||||
|
|
@ -975,6 +993,7 @@ export type Mutation = {
|
|||
deleteNewsletterEmail: DeleteNewsletterEmailResult;
|
||||
deleteReaction: DeleteReactionResult;
|
||||
deleteReminder: DeleteReminderResult;
|
||||
deleteRule: DeleteRuleResult;
|
||||
deleteWebhook: DeleteWebhookResult;
|
||||
generateApiKey: GenerateApiKeyResult;
|
||||
googleLogin: LoginResult;
|
||||
|
|
@ -996,6 +1015,7 @@ export type Mutation = {
|
|||
setLabels: SetLabelsResult;
|
||||
setLabelsForHighlight: SetLabelsResult;
|
||||
setLinkArchived: ArchiveLinkResult;
|
||||
setRule: SetRuleResult;
|
||||
setShareArticle: SetShareArticleResult;
|
||||
setShareHighlight: SetShareHighlightResult;
|
||||
setUserPersonalization: SetUserPersonalizationResult;
|
||||
|
|
@ -1095,6 +1115,11 @@ export type MutationDeleteReminderArgs = {
|
|||
};
|
||||
|
||||
|
||||
export type MutationDeleteRuleArgs = {
|
||||
id: Scalars['ID'];
|
||||
};
|
||||
|
||||
|
||||
export type MutationDeleteWebhookArgs = {
|
||||
id: Scalars['ID'];
|
||||
};
|
||||
|
|
@ -1195,6 +1220,11 @@ export type MutationSetLinkArchivedArgs = {
|
|||
};
|
||||
|
||||
|
||||
export type MutationSetRuleArgs = {
|
||||
input: SetRuleInput;
|
||||
};
|
||||
|
||||
|
||||
export type MutationSetShareArticleArgs = {
|
||||
input: SetShareArticleInput;
|
||||
};
|
||||
|
|
@ -1397,6 +1427,7 @@ export type Query = {
|
|||
newsletterEmails: NewsletterEmailsResult;
|
||||
recentSearches: RecentSearchesResult;
|
||||
reminder: ReminderResult;
|
||||
rules: RulesResult;
|
||||
search: SearchResult;
|
||||
sendInstallInstructions: SendInstallInstructionsResult;
|
||||
sharedArticle: SharedArticleResult;
|
||||
|
|
@ -1616,6 +1647,57 @@ export type RevokeApiKeySuccess = {
|
|||
apiKey: ApiKey;
|
||||
};
|
||||
|
||||
export type Rule = {
|
||||
__typename?: 'Rule';
|
||||
actions: Array<RuleAction>;
|
||||
createdAt: Scalars['Date'];
|
||||
id: Scalars['ID'];
|
||||
name?: Maybe<Scalars['String']>;
|
||||
query: Scalars['String'];
|
||||
triggerType: RuleTriggerType;
|
||||
updatedAt: Scalars['Date'];
|
||||
};
|
||||
|
||||
export type RuleAction = {
|
||||
__typename?: 'RuleAction';
|
||||
type: RuleActionType;
|
||||
value?: Maybe<Scalars['String']>;
|
||||
};
|
||||
|
||||
export type RuleActionInput = {
|
||||
type: RuleActionType;
|
||||
value?: InputMaybe<Scalars['String']>;
|
||||
};
|
||||
|
||||
export enum RuleActionType {
|
||||
AddLabel = 'ADD_LABEL',
|
||||
Archive = 'ARCHIVE',
|
||||
MarkAsRead = 'MARK_AS_READ',
|
||||
SendNotification = 'SEND_NOTIFICATION'
|
||||
}
|
||||
|
||||
export enum RuleTriggerType {
|
||||
Cron = 'CRON',
|
||||
OnPageUpdated = 'ON_PAGE_UPDATED'
|
||||
}
|
||||
|
||||
export type RulesError = {
|
||||
__typename?: 'RulesError';
|
||||
errorCodes: Array<RulesErrorCode>;
|
||||
};
|
||||
|
||||
export enum RulesErrorCode {
|
||||
BadRequest = 'BAD_REQUEST',
|
||||
Unauthorized = 'UNAUTHORIZED'
|
||||
}
|
||||
|
||||
export type RulesResult = RulesError | RulesSuccess;
|
||||
|
||||
export type RulesSuccess = {
|
||||
__typename?: 'RulesSuccess';
|
||||
rules: Array<Rule>;
|
||||
};
|
||||
|
||||
export type SaveArticleReadingProgressError = {
|
||||
__typename?: 'SaveArticleReadingProgressError';
|
||||
errorCodes: Array<SaveArticleReadingProgressErrorCode>;
|
||||
|
|
@ -1881,6 +1963,32 @@ export type SetLabelsSuccess = {
|
|||
labels: Array<Label>;
|
||||
};
|
||||
|
||||
export type SetRuleError = {
|
||||
__typename?: 'SetRuleError';
|
||||
errorCodes: Array<SetRuleErrorCode>;
|
||||
};
|
||||
|
||||
export enum SetRuleErrorCode {
|
||||
BadRequest = 'BAD_REQUEST',
|
||||
NotFound = 'NOT_FOUND',
|
||||
Unauthorized = 'UNAUTHORIZED'
|
||||
}
|
||||
|
||||
export type SetRuleInput = {
|
||||
actions: Array<RuleActionInput>;
|
||||
id?: InputMaybe<Scalars['ID']>;
|
||||
name?: InputMaybe<Scalars['String']>;
|
||||
query: Scalars['String'];
|
||||
triggerType: RuleTriggerType;
|
||||
};
|
||||
|
||||
export type SetRuleResult = SetRuleError | SetRuleSuccess;
|
||||
|
||||
export type SetRuleSuccess = {
|
||||
__typename?: 'SetRuleSuccess';
|
||||
rule: Rule;
|
||||
};
|
||||
|
||||
export type SetShareArticleError = {
|
||||
__typename?: 'SetShareArticleError';
|
||||
errorCodes: Array<SetShareArticleErrorCode>;
|
||||
|
|
@ -2726,6 +2834,10 @@ export type ResolversTypes = {
|
|||
DeleteReminderErrorCode: DeleteReminderErrorCode;
|
||||
DeleteReminderResult: ResolversTypes['DeleteReminderError'] | ResolversTypes['DeleteReminderSuccess'];
|
||||
DeleteReminderSuccess: ResolverTypeWrapper<DeleteReminderSuccess>;
|
||||
DeleteRuleError: ResolverTypeWrapper<DeleteRuleError>;
|
||||
DeleteRuleErrorCode: DeleteRuleErrorCode;
|
||||
DeleteRuleResult: ResolversTypes['DeleteRuleError'] | ResolversTypes['DeleteRuleSuccess'];
|
||||
DeleteRuleSuccess: ResolverTypeWrapper<DeleteRuleSuccess>;
|
||||
DeleteWebhookError: ResolverTypeWrapper<DeleteWebhookError>;
|
||||
DeleteWebhookErrorCode: DeleteWebhookErrorCode;
|
||||
DeleteWebhookResult: ResolversTypes['DeleteWebhookError'] | ResolversTypes['DeleteWebhookSuccess'];
|
||||
|
|
@ -2835,6 +2947,15 @@ export type ResolversTypes = {
|
|||
RevokeApiKeyErrorCode: RevokeApiKeyErrorCode;
|
||||
RevokeApiKeyResult: ResolversTypes['RevokeApiKeyError'] | ResolversTypes['RevokeApiKeySuccess'];
|
||||
RevokeApiKeySuccess: ResolverTypeWrapper<RevokeApiKeySuccess>;
|
||||
Rule: ResolverTypeWrapper<Rule>;
|
||||
RuleAction: ResolverTypeWrapper<RuleAction>;
|
||||
RuleActionInput: RuleActionInput;
|
||||
RuleActionType: RuleActionType;
|
||||
RuleTriggerType: RuleTriggerType;
|
||||
RulesError: ResolverTypeWrapper<RulesError>;
|
||||
RulesErrorCode: RulesErrorCode;
|
||||
RulesResult: ResolversTypes['RulesError'] | ResolversTypes['RulesSuccess'];
|
||||
RulesSuccess: ResolverTypeWrapper<RulesSuccess>;
|
||||
SaveArticleReadingProgressError: ResolverTypeWrapper<SaveArticleReadingProgressError>;
|
||||
SaveArticleReadingProgressErrorCode: SaveArticleReadingProgressErrorCode;
|
||||
SaveArticleReadingProgressInput: SaveArticleReadingProgressInput;
|
||||
|
|
@ -2883,6 +3004,11 @@ export type ResolversTypes = {
|
|||
SetLabelsInput: SetLabelsInput;
|
||||
SetLabelsResult: ResolversTypes['SetLabelsError'] | ResolversTypes['SetLabelsSuccess'];
|
||||
SetLabelsSuccess: ResolverTypeWrapper<SetLabelsSuccess>;
|
||||
SetRuleError: ResolverTypeWrapper<SetRuleError>;
|
||||
SetRuleErrorCode: SetRuleErrorCode;
|
||||
SetRuleInput: SetRuleInput;
|
||||
SetRuleResult: ResolversTypes['SetRuleError'] | ResolversTypes['SetRuleSuccess'];
|
||||
SetRuleSuccess: ResolverTypeWrapper<SetRuleSuccess>;
|
||||
SetShareArticleError: ResolverTypeWrapper<SetShareArticleError>;
|
||||
SetShareArticleErrorCode: SetShareArticleErrorCode;
|
||||
SetShareArticleInput: SetShareArticleInput;
|
||||
|
|
@ -3094,6 +3220,9 @@ export type ResolversParentTypes = {
|
|||
DeleteReminderError: DeleteReminderError;
|
||||
DeleteReminderResult: ResolversParentTypes['DeleteReminderError'] | ResolversParentTypes['DeleteReminderSuccess'];
|
||||
DeleteReminderSuccess: DeleteReminderSuccess;
|
||||
DeleteRuleError: DeleteRuleError;
|
||||
DeleteRuleResult: ResolversParentTypes['DeleteRuleError'] | ResolversParentTypes['DeleteRuleSuccess'];
|
||||
DeleteRuleSuccess: DeleteRuleSuccess;
|
||||
DeleteWebhookError: DeleteWebhookError;
|
||||
DeleteWebhookResult: ResolversParentTypes['DeleteWebhookError'] | ResolversParentTypes['DeleteWebhookSuccess'];
|
||||
DeleteWebhookSuccess: DeleteWebhookSuccess;
|
||||
|
|
@ -3182,6 +3311,12 @@ export type ResolversParentTypes = {
|
|||
RevokeApiKeyError: RevokeApiKeyError;
|
||||
RevokeApiKeyResult: ResolversParentTypes['RevokeApiKeyError'] | ResolversParentTypes['RevokeApiKeySuccess'];
|
||||
RevokeApiKeySuccess: RevokeApiKeySuccess;
|
||||
Rule: Rule;
|
||||
RuleAction: RuleAction;
|
||||
RuleActionInput: RuleActionInput;
|
||||
RulesError: RulesError;
|
||||
RulesResult: ResolversParentTypes['RulesError'] | ResolversParentTypes['RulesSuccess'];
|
||||
RulesSuccess: RulesSuccess;
|
||||
SaveArticleReadingProgressError: SaveArticleReadingProgressError;
|
||||
SaveArticleReadingProgressInput: SaveArticleReadingProgressInput;
|
||||
SaveArticleReadingProgressResult: ResolversParentTypes['SaveArticleReadingProgressError'] | ResolversParentTypes['SaveArticleReadingProgressSuccess'];
|
||||
|
|
@ -3221,6 +3356,10 @@ export type ResolversParentTypes = {
|
|||
SetLabelsInput: SetLabelsInput;
|
||||
SetLabelsResult: ResolversParentTypes['SetLabelsError'] | ResolversParentTypes['SetLabelsSuccess'];
|
||||
SetLabelsSuccess: SetLabelsSuccess;
|
||||
SetRuleError: SetRuleError;
|
||||
SetRuleInput: SetRuleInput;
|
||||
SetRuleResult: ResolversParentTypes['SetRuleError'] | ResolversParentTypes['SetRuleSuccess'];
|
||||
SetRuleSuccess: SetRuleSuccess;
|
||||
SetShareArticleError: SetShareArticleError;
|
||||
SetShareArticleInput: SetShareArticleInput;
|
||||
SetShareArticleResult: ResolversParentTypes['SetShareArticleError'] | ResolversParentTypes['SetShareArticleSuccess'];
|
||||
|
|
@ -3714,6 +3853,20 @@ export type DeleteReminderSuccessResolvers<ContextType = ResolverContext, Parent
|
|||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type DeleteRuleErrorResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['DeleteRuleError'] = ResolversParentTypes['DeleteRuleError']> = {
|
||||
errorCodes?: Resolver<Array<ResolversTypes['DeleteRuleErrorCode']>, ParentType, ContextType>;
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type DeleteRuleResultResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['DeleteRuleResult'] = ResolversParentTypes['DeleteRuleResult']> = {
|
||||
__resolveType: TypeResolveFn<'DeleteRuleError' | 'DeleteRuleSuccess', ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type DeleteRuleSuccessResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['DeleteRuleSuccess'] = ResolversParentTypes['DeleteRuleSuccess']> = {
|
||||
rule?: Resolver<ResolversTypes['Rule'], ParentType, ContextType>;
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type DeleteWebhookErrorResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['DeleteWebhookError'] = ResolversParentTypes['DeleteWebhookError']> = {
|
||||
errorCodes?: Resolver<Array<ResolversTypes['DeleteWebhookErrorCode']>, ParentType, ContextType>;
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
|
|
@ -4033,6 +4186,7 @@ export type MutationResolvers<ContextType = ResolverContext, ParentType extends
|
|||
deleteNewsletterEmail?: Resolver<ResolversTypes['DeleteNewsletterEmailResult'], ParentType, ContextType, RequireFields<MutationDeleteNewsletterEmailArgs, 'newsletterEmailId'>>;
|
||||
deleteReaction?: Resolver<ResolversTypes['DeleteReactionResult'], ParentType, ContextType, RequireFields<MutationDeleteReactionArgs, 'id'>>;
|
||||
deleteReminder?: Resolver<ResolversTypes['DeleteReminderResult'], ParentType, ContextType, RequireFields<MutationDeleteReminderArgs, 'id'>>;
|
||||
deleteRule?: Resolver<ResolversTypes['DeleteRuleResult'], ParentType, ContextType, RequireFields<MutationDeleteRuleArgs, 'id'>>;
|
||||
deleteWebhook?: Resolver<ResolversTypes['DeleteWebhookResult'], ParentType, ContextType, RequireFields<MutationDeleteWebhookArgs, 'id'>>;
|
||||
generateApiKey?: Resolver<ResolversTypes['GenerateApiKeyResult'], ParentType, ContextType, RequireFields<MutationGenerateApiKeyArgs, 'input'>>;
|
||||
googleLogin?: Resolver<ResolversTypes['LoginResult'], ParentType, ContextType, RequireFields<MutationGoogleLoginArgs, 'input'>>;
|
||||
|
|
@ -4054,6 +4208,7 @@ export type MutationResolvers<ContextType = ResolverContext, ParentType extends
|
|||
setLabels?: Resolver<ResolversTypes['SetLabelsResult'], ParentType, ContextType, RequireFields<MutationSetLabelsArgs, 'input'>>;
|
||||
setLabelsForHighlight?: Resolver<ResolversTypes['SetLabelsResult'], ParentType, ContextType, RequireFields<MutationSetLabelsForHighlightArgs, 'input'>>;
|
||||
setLinkArchived?: Resolver<ResolversTypes['ArchiveLinkResult'], ParentType, ContextType, RequireFields<MutationSetLinkArchivedArgs, 'input'>>;
|
||||
setRule?: Resolver<ResolversTypes['SetRuleResult'], ParentType, ContextType, RequireFields<MutationSetRuleArgs, 'input'>>;
|
||||
setShareArticle?: Resolver<ResolversTypes['SetShareArticleResult'], ParentType, ContextType, RequireFields<MutationSetShareArticleArgs, 'input'>>;
|
||||
setShareHighlight?: Resolver<ResolversTypes['SetShareHighlightResult'], ParentType, ContextType, RequireFields<MutationSetShareHighlightArgs, 'input'>>;
|
||||
setUserPersonalization?: Resolver<ResolversTypes['SetUserPersonalizationResult'], ParentType, ContextType, RequireFields<MutationSetUserPersonalizationArgs, 'input'>>;
|
||||
|
|
@ -4159,6 +4314,7 @@ export type QueryResolvers<ContextType = ResolverContext, ParentType extends Res
|
|||
newsletterEmails?: Resolver<ResolversTypes['NewsletterEmailsResult'], ParentType, ContextType>;
|
||||
recentSearches?: Resolver<ResolversTypes['RecentSearchesResult'], ParentType, ContextType>;
|
||||
reminder?: Resolver<ResolversTypes['ReminderResult'], ParentType, ContextType, RequireFields<QueryReminderArgs, 'linkId'>>;
|
||||
rules?: Resolver<ResolversTypes['RulesResult'], ParentType, ContextType>;
|
||||
search?: Resolver<ResolversTypes['SearchResult'], ParentType, ContextType, Partial<QuerySearchArgs>>;
|
||||
sendInstallInstructions?: Resolver<ResolversTypes['SendInstallInstructionsResult'], ParentType, ContextType>;
|
||||
sharedArticle?: Resolver<ResolversTypes['SharedArticleResult'], ParentType, ContextType, RequireFields<QuerySharedArticleArgs, 'slug' | 'username'>>;
|
||||
|
|
@ -4251,6 +4407,37 @@ export type RevokeApiKeySuccessResolvers<ContextType = ResolverContext, ParentTy
|
|||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type RuleResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['Rule'] = ResolversParentTypes['Rule']> = {
|
||||
actions?: Resolver<Array<ResolversTypes['RuleAction']>, ParentType, ContextType>;
|
||||
createdAt?: Resolver<ResolversTypes['Date'], ParentType, ContextType>;
|
||||
id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>;
|
||||
name?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
||||
query?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
||||
triggerType?: Resolver<ResolversTypes['RuleTriggerType'], ParentType, ContextType>;
|
||||
updatedAt?: Resolver<ResolversTypes['Date'], ParentType, ContextType>;
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type RuleActionResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['RuleAction'] = ResolversParentTypes['RuleAction']> = {
|
||||
type?: Resolver<ResolversTypes['RuleActionType'], ParentType, ContextType>;
|
||||
value?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type RulesErrorResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['RulesError'] = ResolversParentTypes['RulesError']> = {
|
||||
errorCodes?: Resolver<Array<ResolversTypes['RulesErrorCode']>, ParentType, ContextType>;
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type RulesResultResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['RulesResult'] = ResolversParentTypes['RulesResult']> = {
|
||||
__resolveType: TypeResolveFn<'RulesError' | 'RulesSuccess', ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type RulesSuccessResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['RulesSuccess'] = ResolversParentTypes['RulesSuccess']> = {
|
||||
rules?: Resolver<Array<ResolversTypes['Rule']>, ParentType, ContextType>;
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type SaveArticleReadingProgressErrorResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['SaveArticleReadingProgressError'] = ResolversParentTypes['SaveArticleReadingProgressError']> = {
|
||||
errorCodes?: Resolver<Array<ResolversTypes['SaveArticleReadingProgressErrorCode']>, ParentType, ContextType>;
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
|
|
@ -4423,6 +4610,20 @@ export type SetLabelsSuccessResolvers<ContextType = ResolverContext, ParentType
|
|||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type SetRuleErrorResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['SetRuleError'] = ResolversParentTypes['SetRuleError']> = {
|
||||
errorCodes?: Resolver<Array<ResolversTypes['SetRuleErrorCode']>, ParentType, ContextType>;
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type SetRuleResultResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['SetRuleResult'] = ResolversParentTypes['SetRuleResult']> = {
|
||||
__resolveType: TypeResolveFn<'SetRuleError' | 'SetRuleSuccess', ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type SetRuleSuccessResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['SetRuleSuccess'] = ResolversParentTypes['SetRuleSuccess']> = {
|
||||
rule?: Resolver<ResolversTypes['Rule'], ParentType, ContextType>;
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
};
|
||||
|
||||
export type SetShareArticleErrorResolvers<ContextType = ResolverContext, ParentType extends ResolversParentTypes['SetShareArticleError'] = ResolversParentTypes['SetShareArticleError']> = {
|
||||
errorCodes?: Resolver<Array<ResolversTypes['SetShareArticleErrorCode']>, ParentType, ContextType>;
|
||||
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
||||
|
|
@ -4919,6 +5120,9 @@ export type Resolvers<ContextType = ResolverContext> = {
|
|||
DeleteReminderError?: DeleteReminderErrorResolvers<ContextType>;
|
||||
DeleteReminderResult?: DeleteReminderResultResolvers<ContextType>;
|
||||
DeleteReminderSuccess?: DeleteReminderSuccessResolvers<ContextType>;
|
||||
DeleteRuleError?: DeleteRuleErrorResolvers<ContextType>;
|
||||
DeleteRuleResult?: DeleteRuleResultResolvers<ContextType>;
|
||||
DeleteRuleSuccess?: DeleteRuleSuccessResolvers<ContextType>;
|
||||
DeleteWebhookError?: DeleteWebhookErrorResolvers<ContextType>;
|
||||
DeleteWebhookResult?: DeleteWebhookResultResolvers<ContextType>;
|
||||
DeleteWebhookSuccess?: DeleteWebhookSuccessResolvers<ContextType>;
|
||||
|
|
@ -4995,6 +5199,11 @@ export type Resolvers<ContextType = ResolverContext> = {
|
|||
RevokeApiKeyError?: RevokeApiKeyErrorResolvers<ContextType>;
|
||||
RevokeApiKeyResult?: RevokeApiKeyResultResolvers<ContextType>;
|
||||
RevokeApiKeySuccess?: RevokeApiKeySuccessResolvers<ContextType>;
|
||||
Rule?: RuleResolvers<ContextType>;
|
||||
RuleAction?: RuleActionResolvers<ContextType>;
|
||||
RulesError?: RulesErrorResolvers<ContextType>;
|
||||
RulesResult?: RulesResultResolvers<ContextType>;
|
||||
RulesSuccess?: RulesSuccessResolvers<ContextType>;
|
||||
SaveArticleReadingProgressError?: SaveArticleReadingProgressErrorResolvers<ContextType>;
|
||||
SaveArticleReadingProgressResult?: SaveArticleReadingProgressResultResolvers<ContextType>;
|
||||
SaveArticleReadingProgressSuccess?: SaveArticleReadingProgressSuccessResolvers<ContextType>;
|
||||
|
|
@ -5024,6 +5233,9 @@ export type Resolvers<ContextType = ResolverContext> = {
|
|||
SetLabelsError?: SetLabelsErrorResolvers<ContextType>;
|
||||
SetLabelsResult?: SetLabelsResultResolvers<ContextType>;
|
||||
SetLabelsSuccess?: SetLabelsSuccessResolvers<ContextType>;
|
||||
SetRuleError?: SetRuleErrorResolvers<ContextType>;
|
||||
SetRuleResult?: SetRuleResultResolvers<ContextType>;
|
||||
SetRuleSuccess?: SetRuleSuccessResolvers<ContextType>;
|
||||
SetShareArticleError?: SetShareArticleErrorResolvers<ContextType>;
|
||||
SetShareArticleResult?: SetShareArticleResultResolvers<ContextType>;
|
||||
SetShareArticleSuccess?: SetShareArticleSuccessResolvers<ContextType>;
|
||||
|
|
|
|||
|
|
@ -502,6 +502,22 @@ type DeleteReminderSuccess {
|
|||
reminder: Reminder!
|
||||
}
|
||||
|
||||
type DeleteRuleError {
|
||||
errorCodes: [DeleteRuleErrorCode!]!
|
||||
}
|
||||
|
||||
enum DeleteRuleErrorCode {
|
||||
BAD_REQUEST
|
||||
NOT_FOUND
|
||||
UNAUTHORIZED
|
||||
}
|
||||
|
||||
union DeleteRuleResult = DeleteRuleError | DeleteRuleSuccess
|
||||
|
||||
type DeleteRuleSuccess {
|
||||
rule: Rule!
|
||||
}
|
||||
|
||||
type DeleteWebhookError {
|
||||
errorCodes: [DeleteWebhookErrorCode!]!
|
||||
}
|
||||
|
|
@ -868,6 +884,7 @@ type Mutation {
|
|||
deleteNewsletterEmail(newsletterEmailId: ID!): DeleteNewsletterEmailResult!
|
||||
deleteReaction(id: ID!): DeleteReactionResult!
|
||||
deleteReminder(id: ID!): DeleteReminderResult!
|
||||
deleteRule(id: ID!): DeleteRuleResult!
|
||||
deleteWebhook(id: ID!): DeleteWebhookResult!
|
||||
generateApiKey(input: GenerateApiKeyInput!): GenerateApiKeyResult!
|
||||
googleLogin(input: GoogleLoginInput!): LoginResult!
|
||||
|
|
@ -889,6 +906,7 @@ type Mutation {
|
|||
setLabels(input: SetLabelsInput!): SetLabelsResult!
|
||||
setLabelsForHighlight(input: SetLabelsForHighlightInput!): SetLabelsResult!
|
||||
setLinkArchived(input: ArchiveLinkInput!): ArchiveLinkResult!
|
||||
setRule(input: SetRuleInput!): SetRuleResult!
|
||||
setShareArticle(input: SetShareArticleInput!): SetShareArticleResult!
|
||||
setShareHighlight(input: SetShareHighlightInput!): SetShareHighlightResult!
|
||||
setUserPersonalization(input: SetUserPersonalizationInput!): SetUserPersonalizationResult!
|
||||
|
|
@ -1021,6 +1039,7 @@ type Query {
|
|||
newsletterEmails: NewsletterEmailsResult!
|
||||
recentSearches: RecentSearchesResult!
|
||||
reminder(linkId: ID!): ReminderResult!
|
||||
rules: RulesResult!
|
||||
search(after: String, first: Int, query: String): SearchResult!
|
||||
sendInstallInstructions: SendInstallInstructionsResult!
|
||||
sharedArticle(selectedHighlightId: String, slug: String!, username: String!): SharedArticleResult!
|
||||
|
|
@ -1137,6 +1156,53 @@ type RevokeApiKeySuccess {
|
|||
apiKey: ApiKey!
|
||||
}
|
||||
|
||||
type Rule {
|
||||
actions: [RuleAction!]!
|
||||
createdAt: Date!
|
||||
id: ID!
|
||||
name: String
|
||||
query: String!
|
||||
triggerType: RuleTriggerType!
|
||||
updatedAt: Date!
|
||||
}
|
||||
|
||||
type RuleAction {
|
||||
type: RuleActionType!
|
||||
value: String
|
||||
}
|
||||
|
||||
input RuleActionInput {
|
||||
type: RuleActionType!
|
||||
value: String
|
||||
}
|
||||
|
||||
enum RuleActionType {
|
||||
ADD_LABEL
|
||||
ARCHIVE
|
||||
MARK_AS_READ
|
||||
SEND_NOTIFICATION
|
||||
}
|
||||
|
||||
enum RuleTriggerType {
|
||||
CRON
|
||||
ON_PAGE_UPDATED
|
||||
}
|
||||
|
||||
type RulesError {
|
||||
errorCodes: [RulesErrorCode!]!
|
||||
}
|
||||
|
||||
enum RulesErrorCode {
|
||||
BAD_REQUEST
|
||||
UNAUTHORIZED
|
||||
}
|
||||
|
||||
union RulesResult = RulesError | RulesSuccess
|
||||
|
||||
type RulesSuccess {
|
||||
rules: [Rule!]!
|
||||
}
|
||||
|
||||
type SaveArticleReadingProgressError {
|
||||
errorCodes: [SaveArticleReadingProgressErrorCode!]!
|
||||
}
|
||||
|
|
@ -1382,6 +1448,30 @@ type SetLabelsSuccess {
|
|||
labels: [Label!]!
|
||||
}
|
||||
|
||||
type SetRuleError {
|
||||
errorCodes: [SetRuleErrorCode!]!
|
||||
}
|
||||
|
||||
enum SetRuleErrorCode {
|
||||
BAD_REQUEST
|
||||
NOT_FOUND
|
||||
UNAUTHORIZED
|
||||
}
|
||||
|
||||
input SetRuleInput {
|
||||
actions: [RuleActionInput!]!
|
||||
id: ID
|
||||
name: String
|
||||
query: String!
|
||||
triggerType: RuleTriggerType!
|
||||
}
|
||||
|
||||
union SetRuleResult = SetRuleError | SetRuleSuccess
|
||||
|
||||
type SetRuleSuccess {
|
||||
rule: Rule!
|
||||
}
|
||||
|
||||
type SetShareArticleError {
|
||||
errorCodes: [SetShareArticleErrorCode!]!
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1950,6 +1950,93 @@ const schema = gql`
|
|||
NOT_FOUND
|
||||
}
|
||||
|
||||
union RulesResult = RulesSuccess | RulesError
|
||||
|
||||
type RulesSuccess {
|
||||
rules: [Rule!]!
|
||||
}
|
||||
|
||||
type Rule {
|
||||
id: ID!
|
||||
name: String
|
||||
query: String!
|
||||
actions: [RuleAction!]!
|
||||
triggerType: RuleTriggerType!
|
||||
createdAt: Date!
|
||||
updatedAt: Date!
|
||||
}
|
||||
|
||||
type RuleAction {
|
||||
type: RuleActionType!
|
||||
value: String
|
||||
}
|
||||
|
||||
enum RuleActionType {
|
||||
ADD_LABEL
|
||||
ARCHIVE
|
||||
MARK_AS_READ
|
||||
SEND_NOTIFICATION
|
||||
}
|
||||
|
||||
enum RuleTriggerType {
|
||||
ON_PAGE_UPDATED
|
||||
CRON
|
||||
}
|
||||
|
||||
type RulesError {
|
||||
errorCodes: [RulesErrorCode!]!
|
||||
}
|
||||
|
||||
enum RulesErrorCode {
|
||||
UNAUTHORIZED
|
||||
BAD_REQUEST
|
||||
}
|
||||
|
||||
input SetRuleInput {
|
||||
id: ID
|
||||
name: String
|
||||
query: String!
|
||||
actions: [RuleActionInput!]!
|
||||
triggerType: RuleTriggerType!
|
||||
}
|
||||
|
||||
input RuleActionInput {
|
||||
type: RuleActionType!
|
||||
value: String
|
||||
}
|
||||
|
||||
union SetRuleResult = SetRuleSuccess | SetRuleError
|
||||
|
||||
type SetRuleSuccess {
|
||||
rule: Rule!
|
||||
}
|
||||
|
||||
type SetRuleError {
|
||||
errorCodes: [SetRuleErrorCode!]!
|
||||
}
|
||||
|
||||
enum SetRuleErrorCode {
|
||||
UNAUTHORIZED
|
||||
BAD_REQUEST
|
||||
NOT_FOUND
|
||||
}
|
||||
|
||||
union DeleteRuleResult = DeleteRuleSuccess | DeleteRuleError
|
||||
|
||||
type DeleteRuleSuccess {
|
||||
rule: Rule!
|
||||
}
|
||||
|
||||
type DeleteRuleError {
|
||||
errorCodes: [DeleteRuleErrorCode!]!
|
||||
}
|
||||
|
||||
enum DeleteRuleErrorCode {
|
||||
UNAUTHORIZED
|
||||
BAD_REQUEST
|
||||
NOT_FOUND
|
||||
}
|
||||
|
||||
# Mutations
|
||||
type Mutation {
|
||||
googleLogin(input: GoogleLoginInput!): LoginResult!
|
||||
|
|
@ -2022,6 +2109,8 @@ const schema = gql`
|
|||
setIntegration(input: SetIntegrationInput!): SetIntegrationResult!
|
||||
deleteIntegration(id: ID!): DeleteIntegrationResult!
|
||||
optInFeature(input: OptInFeatureInput!): OptInFeatureResult!
|
||||
setRule(input: SetRuleInput!): SetRuleResult!
|
||||
deleteRule(id: ID!): DeleteRuleResult!
|
||||
}
|
||||
|
||||
# FIXME: remove sort from feedArticles after all cached tabs are closed
|
||||
|
|
@ -2069,6 +2158,7 @@ const schema = gql`
|
|||
updatesSince(after: String, first: Int, since: Date!): UpdatesSinceResult!
|
||||
integrations: IntegrationsResult!
|
||||
recentSearches: RecentSearchesResult!
|
||||
rules: RulesResult!
|
||||
}
|
||||
`
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue