|
|
|
|
@@ -855,6 +855,28 @@ export class UnsupportedClientVersion extends UserFriendlyError {
|
|
|
|
|
super('action_forbidden', 'unsupported_client_version', message, args);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class NotificationNotFound extends UserFriendlyError {
|
|
|
|
|
constructor(message?: string) {
|
|
|
|
|
super('resource_not_found', 'notification_not_found', message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ObjectType()
|
|
|
|
|
class MentionUserDocAccessDeniedDataType {
|
|
|
|
|
@Field() docId!: string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class MentionUserDocAccessDenied extends UserFriendlyError {
|
|
|
|
|
constructor(args: MentionUserDocAccessDeniedDataType, message?: string | ((args: MentionUserDocAccessDeniedDataType) => string)) {
|
|
|
|
|
super('no_permission', 'mention_user_doc_access_denied', message, args);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class MentionUserOneselfDenied extends UserFriendlyError {
|
|
|
|
|
constructor(message?: string) {
|
|
|
|
|
super('action_forbidden', 'mention_user_oneself_denied', message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
export enum ErrorNames {
|
|
|
|
|
INTERNAL_SERVER_ERROR,
|
|
|
|
|
NETWORK_ERROR,
|
|
|
|
|
@@ -963,7 +985,10 @@ export enum ErrorNames {
|
|
|
|
|
INVALID_LICENSE_TO_ACTIVATE,
|
|
|
|
|
INVALID_LICENSE_UPDATE_PARAMS,
|
|
|
|
|
WORKSPACE_MEMBERS_EXCEED_LIMIT_TO_DOWNGRADE,
|
|
|
|
|
UNSUPPORTED_CLIENT_VERSION
|
|
|
|
|
UNSUPPORTED_CLIENT_VERSION,
|
|
|
|
|
NOTIFICATION_NOT_FOUND,
|
|
|
|
|
MENTION_USER_DOC_ACCESS_DENIED,
|
|
|
|
|
MENTION_USER_ONESELF_DENIED
|
|
|
|
|
}
|
|
|
|
|
registerEnumType(ErrorNames, {
|
|
|
|
|
name: 'ErrorNames'
|
|
|
|
|
@@ -972,5 +997,5 @@ registerEnumType(ErrorNames, {
|
|
|
|
|
export const ErrorDataUnionType = createUnionType({
|
|
|
|
|
name: 'ErrorDataUnion',
|
|
|
|
|
types: () =>
|
|
|
|
|
[GraphqlBadRequestDataType, QueryTooLongDataType, ValidationErrorDataType, WrongSignInCredentialsDataType, UnknownOauthProviderDataType, InvalidOauthCallbackCodeDataType, MissingOauthQueryParameterDataType, InvalidEmailDataType, InvalidPasswordLengthDataType, WorkspacePermissionNotFoundDataType, SpaceNotFoundDataType, MemberNotFoundInSpaceDataType, NotInSpaceDataType, AlreadyInSpaceDataType, SpaceAccessDeniedDataType, SpaceOwnerNotFoundDataType, SpaceShouldHaveOnlyOneOwnerDataType, DocNotFoundDataType, DocActionDeniedDataType, DocUpdateBlockedDataType, VersionRejectedDataType, InvalidHistoryTimestampDataType, DocHistoryNotFoundDataType, BlobNotFoundDataType, ExpectToGrantDocUserRolesDataType, ExpectToRevokeDocUserRolesDataType, ExpectToUpdateDocUserRoleDataType, UnsupportedSubscriptionPlanDataType, SubscriptionAlreadyExistsDataType, SubscriptionNotExistsDataType, SameSubscriptionRecurringDataType, SubscriptionPlanNotFoundDataType, CopilotDocNotFoundDataType, CopilotMessageNotFoundDataType, CopilotPromptNotFoundDataType, CopilotProviderSideErrorDataType, CopilotInvalidContextDataType, CopilotContextFileNotSupportedDataType, CopilotFailedToModifyContextDataType, CopilotFailedToMatchContextDataType, RuntimeConfigNotFoundDataType, InvalidRuntimeConfigTypeDataType, InvalidLicenseUpdateParamsDataType, WorkspaceMembersExceedLimitToDowngradeDataType, UnsupportedClientVersionDataType] as const,
|
|
|
|
|
[GraphqlBadRequestDataType, QueryTooLongDataType, ValidationErrorDataType, WrongSignInCredentialsDataType, UnknownOauthProviderDataType, InvalidOauthCallbackCodeDataType, MissingOauthQueryParameterDataType, InvalidEmailDataType, InvalidPasswordLengthDataType, WorkspacePermissionNotFoundDataType, SpaceNotFoundDataType, MemberNotFoundInSpaceDataType, NotInSpaceDataType, AlreadyInSpaceDataType, SpaceAccessDeniedDataType, SpaceOwnerNotFoundDataType, SpaceShouldHaveOnlyOneOwnerDataType, DocNotFoundDataType, DocActionDeniedDataType, DocUpdateBlockedDataType, VersionRejectedDataType, InvalidHistoryTimestampDataType, DocHistoryNotFoundDataType, BlobNotFoundDataType, ExpectToGrantDocUserRolesDataType, ExpectToRevokeDocUserRolesDataType, ExpectToUpdateDocUserRoleDataType, UnsupportedSubscriptionPlanDataType, SubscriptionAlreadyExistsDataType, SubscriptionNotExistsDataType, SameSubscriptionRecurringDataType, SubscriptionPlanNotFoundDataType, CopilotDocNotFoundDataType, CopilotMessageNotFoundDataType, CopilotPromptNotFoundDataType, CopilotProviderSideErrorDataType, CopilotInvalidContextDataType, CopilotContextFileNotSupportedDataType, CopilotFailedToModifyContextDataType, CopilotFailedToMatchContextDataType, RuntimeConfigNotFoundDataType, InvalidRuntimeConfigTypeDataType, InvalidLicenseUpdateParamsDataType, WorkspaceMembersExceedLimitToDowngradeDataType, UnsupportedClientVersionDataType, MentionUserDocAccessDeniedDataType] as const,
|
|
|
|
|
});
|
|
|
|
|
|