RocketChat/Rocket.Chat

View on GitHub
packages/rest-typings/src/v1/omnichannel.ts

Summary

Maintainability
F
1 mo
Test Coverage

File omnichannel.ts has 3622 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import type {
    IOmnichannelCannedResponse,
    ILivechatAgent,
    ILivechatDepartment,
    ILivechatDepartmentAgents,
Severity: Major
Found in packages/rest-typings/src/v1/omnichannel.ts - About 1 wk to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const LivechatUsersManagerGETSchema = {
        type: 'object',
        properties: {
            text: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 6 hrs to fix
    packages/rest-typings/src/v1/users/UsersUpdateOwnBasicInfoParamsPOST.ts on lines 25..67

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 168.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const LivechatPrioritiesPropsSchema = {
        type: 'object',
        properties: {
            text: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 4 hrs to fix
    packages/rest-typings/src/v1/voip.ts on lines 268..298

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 121.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        properties: {
            count: {
                type: 'number',
                nullable: true,
            },
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 4 hrs to fix
    packages/rest-typings/src/v1/misc.ts on lines 68..97

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 118.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const LivechatUsersAgentSchema = {
        type: 'object',
        properties: {
            text: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 3 hrs to fix
    packages/rest-typings/src/v1/statistics.ts on lines 47..73

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 110.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

    const LiveChatRoomForwardSchema = {
        type: 'object',
        properties: {
            roomId: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 9 other locations - About 3 hrs to fix
    packages/rest-typings/src/v1/channels/ChannelsGetAllUserMentionsByChannelProps.ts on lines 9..35
    packages/rest-typings/src/v1/channels/ChannelsMessagesProps.ts on lines 11..37
    packages/rest-typings/src/v1/chat.ts on lines 258..283
    packages/rest-typings/src/v1/omnichannel.ts on lines 443..468
    packages/rest-typings/src/v1/omnichannel.ts on lines 694..719
    packages/rest-typings/src/v1/omnichannel.ts on lines 725..750
    packages/rest-typings/src/v1/omnichannel.ts on lines 810..835
    packages/rest-typings/src/v1/roles.ts on lines 67..92
    packages/rest-typings/src/v1/rooms.ts on lines 30..55

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 106.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

    const LivechatDepartmentsByUnitIdSchema = {
        type: 'object',
        properties: {
            text: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 9 other locations - About 3 hrs to fix
    packages/rest-typings/src/v1/channels/ChannelsGetAllUserMentionsByChannelProps.ts on lines 9..35
    packages/rest-typings/src/v1/channels/ChannelsMessagesProps.ts on lines 11..37
    packages/rest-typings/src/v1/chat.ts on lines 258..283
    packages/rest-typings/src/v1/omnichannel.ts on lines 319..344
    packages/rest-typings/src/v1/omnichannel.ts on lines 443..468
    packages/rest-typings/src/v1/omnichannel.ts on lines 694..719
    packages/rest-typings/src/v1/omnichannel.ts on lines 810..835
    packages/rest-typings/src/v1/roles.ts on lines 67..92
    packages/rest-typings/src/v1/rooms.ts on lines 30..55

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 106.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

    const LivechatMonitorsListSchema = {
        type: 'object',
        properties: {
            text: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 9 other locations - About 3 hrs to fix
    packages/rest-typings/src/v1/channels/ChannelsGetAllUserMentionsByChannelProps.ts on lines 9..35
    packages/rest-typings/src/v1/channels/ChannelsMessagesProps.ts on lines 11..37
    packages/rest-typings/src/v1/chat.ts on lines 258..283
    packages/rest-typings/src/v1/omnichannel.ts on lines 319..344
    packages/rest-typings/src/v1/omnichannel.ts on lines 694..719
    packages/rest-typings/src/v1/omnichannel.ts on lines 725..750
    packages/rest-typings/src/v1/omnichannel.ts on lines 810..835
    packages/rest-typings/src/v1/roles.ts on lines 67..92
    packages/rest-typings/src/v1/rooms.ts on lines 30..55

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 106.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

    const LivechatUsersManagerPOSTSchema = {
        type: 'object',
        properties: {
            username: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 9 other locations - About 3 hrs to fix
    packages/rest-typings/src/v1/channels/ChannelsGetAllUserMentionsByChannelProps.ts on lines 9..35
    packages/rest-typings/src/v1/channels/ChannelsMessagesProps.ts on lines 11..37
    packages/rest-typings/src/v1/chat.ts on lines 258..283
    packages/rest-typings/src/v1/omnichannel.ts on lines 319..344
    packages/rest-typings/src/v1/omnichannel.ts on lines 443..468
    packages/rest-typings/src/v1/omnichannel.ts on lines 694..719
    packages/rest-typings/src/v1/omnichannel.ts on lines 725..750
    packages/rest-typings/src/v1/roles.ts on lines 67..92
    packages/rest-typings/src/v1/rooms.ts on lines 30..55

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 106.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

    const LivechatDepartmentsByUnitSchema = {
        type: 'object',
        properties: {
            text: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 9 other locations - About 3 hrs to fix
    packages/rest-typings/src/v1/channels/ChannelsGetAllUserMentionsByChannelProps.ts on lines 9..35
    packages/rest-typings/src/v1/channels/ChannelsMessagesProps.ts on lines 11..37
    packages/rest-typings/src/v1/chat.ts on lines 258..283
    packages/rest-typings/src/v1/omnichannel.ts on lines 319..344
    packages/rest-typings/src/v1/omnichannel.ts on lines 443..468
    packages/rest-typings/src/v1/omnichannel.ts on lines 725..750
    packages/rest-typings/src/v1/omnichannel.ts on lines 810..835
    packages/rest-typings/src/v1/roles.ts on lines 67..92
    packages/rest-typings/src/v1/rooms.ts on lines 30..55

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 106.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    const DELETELivechatMessageIdParamsSchema = {
        type: 'object',
        properties: {
            token: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 2 other locations - About 3 hrs to fix
    packages/rest-typings/src/v1/chat.ts on lines 609..633
    packages/rest-typings/src/v1/chat.ts on lines 671..695

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 102.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const POSTLivechatOfflineMessageParamsSchema = {
        type: 'object',
        properties: {
            name: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 3 hrs to fix
    packages/rest-typings/src/v1/mailer/MailerParamsPOST.ts on lines 15..38

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 98.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    const GETLivechatPrioritiesParamsSchema = {
        type: 'object',
        properties: {
            count: {
                type: 'number',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 3 other locations - About 2 hrs to fix
    packages/rest-typings/src/v1/email-inbox.ts on lines 13..35
    packages/rest-typings/src/v1/omnichannel.ts on lines 1037..1059
    packages/rest-typings/src/v1/voip.ts on lines 27..49

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 94.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    const LivechatRidMessagesSchema = {
        type: 'object',
        properties: {
            count: {
                type: 'number',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 3 other locations - About 2 hrs to fix
    packages/rest-typings/src/v1/email-inbox.ts on lines 13..35
    packages/rest-typings/src/v1/omnichannel.ts on lines 2687..2709
    packages/rest-typings/src/v1/voip.ts on lines 27..49

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 94.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

    const GETLivechatInquiriesListParamsSchema = {
        type: 'object',
        properties: {
            count: {
                type: 'number',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 4 other locations - About 2 hrs to fix
    packages/rest-typings/src/v1/directory.ts on lines 13..34
    packages/rest-typings/src/v1/federation/FederationPublicRoomsProps.ts on lines 12..33
    packages/rest-typings/src/v1/omnichannel.ts on lines 2801..2822
    packages/rest-typings/src/v1/omnichannel.ts on lines 2828..2849

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

    const GETLivechatInquiriesQueuedForUserParamsSchema = {
        type: 'object',
        properties: {
            count: {
                type: 'number',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 4 other locations - About 2 hrs to fix
    packages/rest-typings/src/v1/directory.ts on lines 13..34
    packages/rest-typings/src/v1/federation/FederationPublicRoomsProps.ts on lines 12..33
    packages/rest-typings/src/v1/omnichannel.ts on lines 2752..2773
    packages/rest-typings/src/v1/omnichannel.ts on lines 2801..2822

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

    const GETLivechatInquiriesQueuedParamsSchema = {
        type: 'object',
        properties: {
            count: {
                type: 'number',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 4 other locations - About 2 hrs to fix
    packages/rest-typings/src/v1/directory.ts on lines 13..34
    packages/rest-typings/src/v1/federation/FederationPublicRoomsProps.ts on lines 12..33
    packages/rest-typings/src/v1/omnichannel.ts on lines 2752..2773
    packages/rest-typings/src/v1/omnichannel.ts on lines 2828..2849

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

    const GETOmnichannelContactSearchSchema = {
        anyOf: [
            {
                type: 'object',
                properties: {
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 8 other locations - About 2 hrs to fix
    packages/rest-typings/src/v1/channels/ChannelsArchiveProps.ts on lines 6..29
    packages/rest-typings/src/v1/channels/ChannelsConvertToTeamProps.ts on lines 10..29
    packages/rest-typings/src/v1/channels/ChannelsDeleteProps.ts on lines 7..30
    packages/rest-typings/src/v1/channels/ChannelsLeaveProps.ts on lines 7..30
    packages/rest-typings/src/v1/channels/ChannelsRolesProps.ts on lines 6..29
    packages/rest-typings/src/v1/channels/ChannelsUnarchiveProps.ts on lines 6..29
    packages/rest-typings/src/v1/dm/DmLeaveProps.ts on lines 13..36
    packages/rest-typings/src/v1/rooms.ts on lines 99..122

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 86.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const LivechatAnalyticsDepartmentsAmountOfChatsSchema = {
        type: 'object',
        properties: {
            start: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 2 hrs to fix
    packages/rest-typings/src/v1/chat.ts on lines 413..433

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 86.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const LivechatAnalyticsAgentOverviewPropsSchema = {
        type: 'object',
        properties: {
            name: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 2 hrs to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3259..3278

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 82.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const LivechatAnalyticsOverviewPropsSchema = {
        type: 'object',
        properties: {
            name: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 2 hrs to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3227..3246

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 82.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    const POSTLivechatCustomFieldParamsSchema = {
        type: 'object',
        properties: {
            token: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 2 other locations - About 2 hrs to fix
    packages/rest-typings/src/v1/oauthapps/UpdateOAuthAppParamsPOST.ts on lines 12..30
    packages/rest-typings/src/v1/omnichannel.ts on lines 251..269

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 78.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    const LivechatVisitorCallStatusSchema = {
        type: 'object',
        properties: {
            token: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 2 other locations - About 2 hrs to fix
    packages/rest-typings/src/v1/oauthapps/UpdateOAuthAppParamsPOST.ts on lines 12..30
    packages/rest-typings/src/v1/omnichannel.ts on lines 1630..1648

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 78.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

                queue: {
                    _id: string;
                    user: { _id: string; userId: string; username: string; status: string };
                    department: { _id: string; name: string };
                    chats: number;
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 1 hr to fix
    apps/meteor/app/livechat/server/api/lib/queue.ts on lines 16..21

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 74.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        '/v1/livechat/users/user/:_id': {
            GET: () => { user: Pick<ILivechatAgent, '_id' | 'username' | 'name' | 'status' | 'statusLivechat' | 'emails' | 'livechat'> | null };
            DELETE: () => void;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3521..3524

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 74.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        '/v1/livechat/users/manager/:_id': {
            GET: () => { user: Pick<ILivechatAgent, '_id' | 'username' | 'name' | 'status' | 'statusLivechat' | 'emails' | 'livechat'> | null };
            DELETE: () => void;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3525..3528

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 74.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    const GETLivechatVisitorsPagesVisitedRoomIdParamsSchema = {
        type: 'object',
        properties: {
            count: {
                type: 'number',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 3 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 1602..1619
    packages/rest-typings/src/v1/omnichannel.ts on lines 2370..2387
    packages/rest-typings/src/v1/omnichannel.ts on lines 2524..2541

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 72.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    const GETLivechatConfigParamsSchema = {
        type: 'object',
        properties: {
            token: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 3 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 2345..2362
    packages/rest-typings/src/v1/omnichannel.ts on lines 2370..2387
    packages/rest-typings/src/v1/omnichannel.ts on lines 2524..2541

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 72.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    const GETLivechatVisitorsChatHistoryRoomRoomIdVisitorVisitorIdParamsSchema = {
        type: 'object',
        properties: {
            count: {
                type: 'number',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 3 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 1602..1619
    packages/rest-typings/src/v1/omnichannel.ts on lines 2345..2362
    packages/rest-typings/src/v1/omnichannel.ts on lines 2524..2541

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 72.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    const GETLivechatTriggersParamsSchema = {
        type: 'object',
        properties: {
            count: {
                type: 'number',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 3 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 1602..1619
    packages/rest-typings/src/v1/omnichannel.ts on lines 2345..2362
    packages/rest-typings/src/v1/omnichannel.ts on lines 2370..2387

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 72.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 11 locations. Consider refactoring.
    Open

    const LivechatAnalyticsAgentsAvailableForServiceHistorySchema = {
        type: 'object',
        properties: {
            start: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 10 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/chat.ts on lines 314..330
    packages/rest-typings/src/v1/omnichannel.ts on lines 125..141
    packages/rest-typings/src/v1/omnichannel.ts on lines 1391..1407
    packages/rest-typings/src/v1/omnichannel.ts on lines 1419..1435
    packages/rest-typings/src/v1/omnichannel.ts on lines 1446..1462
    packages/rest-typings/src/v1/omnichannel.ts on lines 1474..1490
    packages/rest-typings/src/v1/omnichannel.ts on lines 1502..1518
    packages/rest-typings/src/v1/omnichannel.ts on lines 1530..1546
    packages/rest-typings/src/v1/omnichannel.ts on lines 1558..1574
    packages/rest-typings/src/v1/users/UserSetActiveStatusParamsPOST.ts on lines 13..22

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 70.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 11 locations. Consider refactoring.
    Open

    const LivechatAnalyticsDepartmentsAverageServiceTimeSchema = {
        type: 'object',
        properties: {
            start: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 10 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/chat.ts on lines 314..330
    packages/rest-typings/src/v1/omnichannel.ts on lines 125..141
    packages/rest-typings/src/v1/omnichannel.ts on lines 1330..1346
    packages/rest-typings/src/v1/omnichannel.ts on lines 1419..1435
    packages/rest-typings/src/v1/omnichannel.ts on lines 1446..1462
    packages/rest-typings/src/v1/omnichannel.ts on lines 1474..1490
    packages/rest-typings/src/v1/omnichannel.ts on lines 1502..1518
    packages/rest-typings/src/v1/omnichannel.ts on lines 1530..1546
    packages/rest-typings/src/v1/omnichannel.ts on lines 1558..1574
    packages/rest-typings/src/v1/users/UserSetActiveStatusParamsPOST.ts on lines 13..22

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 70.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 11 locations. Consider refactoring.
    Open

    const LivechatAnalyticsDepartmentsTotalServiceTimeSchema = {
        type: 'object',
        properties: {
            start: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 10 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/chat.ts on lines 314..330
    packages/rest-typings/src/v1/omnichannel.ts on lines 125..141
    packages/rest-typings/src/v1/omnichannel.ts on lines 1330..1346
    packages/rest-typings/src/v1/omnichannel.ts on lines 1391..1407
    packages/rest-typings/src/v1/omnichannel.ts on lines 1419..1435
    packages/rest-typings/src/v1/omnichannel.ts on lines 1474..1490
    packages/rest-typings/src/v1/omnichannel.ts on lines 1502..1518
    packages/rest-typings/src/v1/omnichannel.ts on lines 1530..1546
    packages/rest-typings/src/v1/omnichannel.ts on lines 1558..1574
    packages/rest-typings/src/v1/users/UserSetActiveStatusParamsPOST.ts on lines 13..22

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 70.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 11 locations. Consider refactoring.
    Open

    const LivechatAnalyticsDepartmentsAverageWaitingTimeSchema = {
        type: 'object',
        properties: {
            start: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 10 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/chat.ts on lines 314..330
    packages/rest-typings/src/v1/omnichannel.ts on lines 125..141
    packages/rest-typings/src/v1/omnichannel.ts on lines 1330..1346
    packages/rest-typings/src/v1/omnichannel.ts on lines 1391..1407
    packages/rest-typings/src/v1/omnichannel.ts on lines 1419..1435
    packages/rest-typings/src/v1/omnichannel.ts on lines 1446..1462
    packages/rest-typings/src/v1/omnichannel.ts on lines 1502..1518
    packages/rest-typings/src/v1/omnichannel.ts on lines 1530..1546
    packages/rest-typings/src/v1/omnichannel.ts on lines 1558..1574
    packages/rest-typings/src/v1/users/UserSetActiveStatusParamsPOST.ts on lines 13..22

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 70.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 11 locations. Consider refactoring.
    Open

    const LivechatAnalyticsDepartmentsPercentageAbandonedChatsSchema = {
        type: 'object',
        properties: {
            start: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 10 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/chat.ts on lines 314..330
    packages/rest-typings/src/v1/omnichannel.ts on lines 125..141
    packages/rest-typings/src/v1/omnichannel.ts on lines 1330..1346
    packages/rest-typings/src/v1/omnichannel.ts on lines 1391..1407
    packages/rest-typings/src/v1/omnichannel.ts on lines 1419..1435
    packages/rest-typings/src/v1/omnichannel.ts on lines 1446..1462
    packages/rest-typings/src/v1/omnichannel.ts on lines 1474..1490
    packages/rest-typings/src/v1/omnichannel.ts on lines 1502..1518
    packages/rest-typings/src/v1/omnichannel.ts on lines 1530..1546
    packages/rest-typings/src/v1/users/UserSetActiveStatusParamsPOST.ts on lines 13..22

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 70.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 11 locations. Consider refactoring.
    Open

    const LivechatAnalyticsDepartmentsTotalAbandonedChatsSchema = {
        type: 'object',
        properties: {
            start: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 10 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/chat.ts on lines 314..330
    packages/rest-typings/src/v1/omnichannel.ts on lines 125..141
    packages/rest-typings/src/v1/omnichannel.ts on lines 1330..1346
    packages/rest-typings/src/v1/omnichannel.ts on lines 1391..1407
    packages/rest-typings/src/v1/omnichannel.ts on lines 1419..1435
    packages/rest-typings/src/v1/omnichannel.ts on lines 1446..1462
    packages/rest-typings/src/v1/omnichannel.ts on lines 1474..1490
    packages/rest-typings/src/v1/omnichannel.ts on lines 1502..1518
    packages/rest-typings/src/v1/omnichannel.ts on lines 1558..1574
    packages/rest-typings/src/v1/users/UserSetActiveStatusParamsPOST.ts on lines 13..22

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 70.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 11 locations. Consider refactoring.
    Open

    const LivechatAnalyticsDepartmentsTotalTransferredChatsSchema = {
        type: 'object',
        properties: {
            start: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 10 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/chat.ts on lines 314..330
    packages/rest-typings/src/v1/omnichannel.ts on lines 125..141
    packages/rest-typings/src/v1/omnichannel.ts on lines 1330..1346
    packages/rest-typings/src/v1/omnichannel.ts on lines 1391..1407
    packages/rest-typings/src/v1/omnichannel.ts on lines 1419..1435
    packages/rest-typings/src/v1/omnichannel.ts on lines 1446..1462
    packages/rest-typings/src/v1/omnichannel.ts on lines 1474..1490
    packages/rest-typings/src/v1/omnichannel.ts on lines 1530..1546
    packages/rest-typings/src/v1/omnichannel.ts on lines 1558..1574
    packages/rest-typings/src/v1/users/UserSetActiveStatusParamsPOST.ts on lines 13..22

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 70.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 11 locations. Consider refactoring.
    Open

    const LivechatDepartmentAutocompleteSchema = {
        type: 'object',
        properties: {
            selector: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 10 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/chat.ts on lines 314..330
    packages/rest-typings/src/v1/omnichannel.ts on lines 1330..1346
    packages/rest-typings/src/v1/omnichannel.ts on lines 1391..1407
    packages/rest-typings/src/v1/omnichannel.ts on lines 1419..1435
    packages/rest-typings/src/v1/omnichannel.ts on lines 1446..1462
    packages/rest-typings/src/v1/omnichannel.ts on lines 1474..1490
    packages/rest-typings/src/v1/omnichannel.ts on lines 1502..1518
    packages/rest-typings/src/v1/omnichannel.ts on lines 1530..1546
    packages/rest-typings/src/v1/omnichannel.ts on lines 1558..1574
    packages/rest-typings/src/v1/users/UserSetActiveStatusParamsPOST.ts on lines 13..22

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 70.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 11 locations. Consider refactoring.
    Open

    const LivechatAnalyticsDepartmentsAverageChatDurationTimeSchema = {
        type: 'object',
        properties: {
            start: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 10 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/chat.ts on lines 314..330
    packages/rest-typings/src/v1/omnichannel.ts on lines 125..141
    packages/rest-typings/src/v1/omnichannel.ts on lines 1330..1346
    packages/rest-typings/src/v1/omnichannel.ts on lines 1391..1407
    packages/rest-typings/src/v1/omnichannel.ts on lines 1446..1462
    packages/rest-typings/src/v1/omnichannel.ts on lines 1474..1490
    packages/rest-typings/src/v1/omnichannel.ts on lines 1502..1518
    packages/rest-typings/src/v1/omnichannel.ts on lines 1530..1546
    packages/rest-typings/src/v1/omnichannel.ts on lines 1558..1574
    packages/rest-typings/src/v1/users/UserSetActiveStatusParamsPOST.ts on lines 13..22

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 70.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        '/v1/livechat/users/user': {
            GET: (params: LivechatUsersManagerGETProps) => PaginatedResult<{
                users: ILivechatAgent[];
            }>;
            POST: (params: POSTLivechatUsersTypeProps) => { success: boolean };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3508..3513

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 69.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        '/v1/livechat/users/manager': {
            GET: (params: LivechatUsersManagerGETProps) => PaginatedResult<{
                users: ILivechatAgent[];
            }>;
            POST: (params: POSTLivechatUsersTypeProps) => { success: boolean };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3515..3520

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 69.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            extraData: {
                type: 'array',
                items: {
                    type: 'object',
                    properties: {
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3342..3358

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 68.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            extraData: {
                type: 'array',
                items: {
                    type: 'object',
                    properties: {
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3304..3320

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 68.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const GETLivechatRoomParamsSchema = {
        type: 'object',
        properties: {
            token: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 627..644

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 68.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                items: {
                    type: 'object',
                    properties: {
                        agentId: {
                            type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 2065..2082

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 68.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

    const POSTLivechatTranscriptParamsSchema = {
        type: 'object',
        properties: {
            rid: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 6 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/chat.ts on lines 389..404
    packages/rest-typings/src/v1/e2e.ts on lines 50..65
    packages/rest-typings/src/v1/oauthapps/OAuthAppsAddParamsPOST.ts on lines 9..24
    packages/rest-typings/src/v1/omnichannel.ts on lines 1912..1927
    packages/rest-typings/src/v1/omnichannel.ts on lines 2180..2195
    packages/rest-typings/src/v1/omnichannel.ts on lines 2247..2262

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 66.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

    const POSTLivechatRoomTransferParamsSchema = {
        type: 'object',
        properties: {
            token: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 6 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/chat.ts on lines 389..404
    packages/rest-typings/src/v1/e2e.ts on lines 50..65
    packages/rest-typings/src/v1/oauthapps/OAuthAppsAddParamsPOST.ts on lines 9..24
    packages/rest-typings/src/v1/omnichannel.ts on lines 1732..1747
    packages/rest-typings/src/v1/omnichannel.ts on lines 1912..1927
    packages/rest-typings/src/v1/omnichannel.ts on lines 2247..2262

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 66.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

    const PUTLivechatMessageIdParamsSchema = {
        type: 'object',
        properties: {
            token: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 6 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/chat.ts on lines 389..404
    packages/rest-typings/src/v1/e2e.ts on lines 50..65
    packages/rest-typings/src/v1/oauthapps/OAuthAppsAddParamsPOST.ts on lines 9..24
    packages/rest-typings/src/v1/omnichannel.ts on lines 1732..1747
    packages/rest-typings/src/v1/omnichannel.ts on lines 2180..2195
    packages/rest-typings/src/v1/omnichannel.ts on lines 2247..2262

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 66.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

    const PUTLivechatRoomVisitorParamsSchema = {
        type: 'object',
        properties: {
            rid: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 6 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/chat.ts on lines 389..404
    packages/rest-typings/src/v1/e2e.ts on lines 50..65
    packages/rest-typings/src/v1/oauthapps/OAuthAppsAddParamsPOST.ts on lines 9..24
    packages/rest-typings/src/v1/omnichannel.ts on lines 1732..1747
    packages/rest-typings/src/v1/omnichannel.ts on lines 1912..1927
    packages/rest-typings/src/v1/omnichannel.ts on lines 2180..2195

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 66.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

        '/v1/livechat/analytics/departments/average-chat-duration-time': {
            GET: (params: LivechatAnalyticsDepartmentsAverageChatDurationTimeProps) => PaginatedResult<{
                departments: {
                    _id: string;
                    averageChatDurationTimeInSeconds: number;
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 5 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3888..3895
    packages/rest-typings/src/v1/omnichannel.ts on lines 3913..3920
    packages/rest-typings/src/v1/omnichannel.ts on lines 3921..3928
    packages/rest-typings/src/v1/omnichannel.ts on lines 3929..3936
    packages/rest-typings/src/v1/omnichannel.ts on lines 3937..3944

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 58.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

        '/v1/livechat/analytics/departments/total-abandoned-chats': {
            GET: (params: LivechatAnalyticsDepartmentsTotalAbandonedChatsProps) => PaginatedResult<{
                departments: {
                    _id: string;
                    abandonedRooms: number;
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 5 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3888..3895
    packages/rest-typings/src/v1/omnichannel.ts on lines 3896..3903
    packages/rest-typings/src/v1/omnichannel.ts on lines 3913..3920
    packages/rest-typings/src/v1/omnichannel.ts on lines 3921..3928
    packages/rest-typings/src/v1/omnichannel.ts on lines 3937..3944

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 58.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

        '/v1/livechat/analytics/departments/total-transferred-chats': {
            GET: (params: LivechatAnalyticsDepartmentsTotalTransferredChatsProps) => PaginatedResult<{
                departments: {
                    _id: string;
                    numberOfTransferredRooms: number;
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 5 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3888..3895
    packages/rest-typings/src/v1/omnichannel.ts on lines 3896..3903
    packages/rest-typings/src/v1/omnichannel.ts on lines 3913..3920
    packages/rest-typings/src/v1/omnichannel.ts on lines 3929..3936
    packages/rest-typings/src/v1/omnichannel.ts on lines 3937..3944

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 58.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

        '/v1/livechat/analytics/departments/average-service-time': {
            GET: (params: LivechatAnalyticsDepartmentsAverageServiceTimeProps) => PaginatedResult<{
                departments: {
                    _id: string;
                    averageServiceTimeInSeconds: number;
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 5 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3896..3903
    packages/rest-typings/src/v1/omnichannel.ts on lines 3913..3920
    packages/rest-typings/src/v1/omnichannel.ts on lines 3921..3928
    packages/rest-typings/src/v1/omnichannel.ts on lines 3929..3936
    packages/rest-typings/src/v1/omnichannel.ts on lines 3937..3944

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 58.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

        '/v1/livechat/analytics/departments/percentage-abandoned-chats': {
            GET: (params: LivechatAnalyticsDepartmentsPercentageAbandonedChatsProps) => PaginatedResult<{
                departments: {
                    _id: string;
                    percentageOfAbandonedRooms: number;
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 5 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3888..3895
    packages/rest-typings/src/v1/omnichannel.ts on lines 3896..3903
    packages/rest-typings/src/v1/omnichannel.ts on lines 3913..3920
    packages/rest-typings/src/v1/omnichannel.ts on lines 3921..3928
    packages/rest-typings/src/v1/omnichannel.ts on lines 3929..3936

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 58.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

        '/v1/livechat/analytics/departments/average-waiting-time': {
            GET: (params: LivechatAnalyticsDepartmentsAverageWaitingTimeProps) => PaginatedResult<{
                departments: {
                    _id: string;
                    averageWaitingTimeInSeconds: number;
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 5 other locations - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3888..3895
    packages/rest-typings/src/v1/omnichannel.ts on lines 3896..3903
    packages/rest-typings/src/v1/omnichannel.ts on lines 3921..3928
    packages/rest-typings/src/v1/omnichannel.ts on lines 3929..3936
    packages/rest-typings/src/v1/omnichannel.ts on lines 3937..3944

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 58.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        '/v1/livechat/analytics/dashboards/charts/chats': {
            GET: (params: GETDashboardTotalizers) => {
                open: number;
                closed: number;
                queued: number;
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3828..3830

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 56.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const LivechatDepartmentIdSchema = {
        type: 'object',
        properties: {
            onlyMyDepartments: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 2505..2518

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 56.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        '/v1/livechat/analytics/dashboards/charts/agents-status': {
            GET: (params: GETDashboardsAgentStatusParams) => { offline: number; away: number; busy: number; available: number };
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3803..3810

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 56.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const GETBusinessHourParamsSchema = {
        type: 'object',
        properties: {
            _id: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 1 hr to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 102..115

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 56.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 15 locations. Consider refactoring.
    Open

    const LivechatAnalyticsAgentsAverageServiceTimeSchema = {
        type: 'object',
        properties: {
            start: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 14 other locations - About 55 mins to fix
    packages/rest-typings/src/v1/chat.ts on lines 236..248
    packages/rest-typings/src/v1/chat.ts on lines 292..304
    packages/rest-typings/src/v1/chat.ts on lines 588..600
    packages/rest-typings/src/v1/chat.ts on lines 797..809
    packages/rest-typings/src/v1/cloud.ts on lines 30..42
    packages/rest-typings/src/v1/e2e.ts on lines 13..25
    packages/rest-typings/src/v1/e2e.ts on lines 74..86
    packages/rest-typings/src/v1/mailer/MailerUnsubscribeParamsPOST.ts on lines 12..24
    packages/rest-typings/src/v1/omnichannel.ts on lines 278..290
    packages/rest-typings/src/v1/omnichannel.ts on lines 1306..1318
    packages/rest-typings/src/v1/omnichannel.ts on lines 1710..1722
    packages/rest-typings/src/v1/omnichannel.ts on lines 1890..1902
    packages/rest-typings/src/v1/omnichannel.ts on lines 2091..2103
    packages/rest-typings/src/v1/omnichannel.ts on lines 3022..3034

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 54.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 15 locations. Consider refactoring.
    Open

    const GETLivechatMessageIdParamsSchema = {
        type: 'object',
        properties: {
            token: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 14 other locations - About 55 mins to fix
    packages/rest-typings/src/v1/chat.ts on lines 236..248
    packages/rest-typings/src/v1/chat.ts on lines 292..304
    packages/rest-typings/src/v1/chat.ts on lines 588..600
    packages/rest-typings/src/v1/chat.ts on lines 797..809
    packages/rest-typings/src/v1/cloud.ts on lines 30..42
    packages/rest-typings/src/v1/e2e.ts on lines 13..25
    packages/rest-typings/src/v1/e2e.ts on lines 74..86
    packages/rest-typings/src/v1/mailer/MailerUnsubscribeParamsPOST.ts on lines 12..24
    packages/rest-typings/src/v1/omnichannel.ts on lines 278..290
    packages/rest-typings/src/v1/omnichannel.ts on lines 1236..1248
    packages/rest-typings/src/v1/omnichannel.ts on lines 1306..1318
    packages/rest-typings/src/v1/omnichannel.ts on lines 1710..1722
    packages/rest-typings/src/v1/omnichannel.ts on lines 2091..2103
    packages/rest-typings/src/v1/omnichannel.ts on lines 3022..3034

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 54.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 15 locations. Consider refactoring.
    Open

    const LivechatAnalyticsAgentsTotalServiceTimeSchema = {
        type: 'object',
        properties: {
            start: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 14 other locations - About 55 mins to fix
    packages/rest-typings/src/v1/chat.ts on lines 236..248
    packages/rest-typings/src/v1/chat.ts on lines 292..304
    packages/rest-typings/src/v1/chat.ts on lines 588..600
    packages/rest-typings/src/v1/chat.ts on lines 797..809
    packages/rest-typings/src/v1/cloud.ts on lines 30..42
    packages/rest-typings/src/v1/e2e.ts on lines 13..25
    packages/rest-typings/src/v1/e2e.ts on lines 74..86
    packages/rest-typings/src/v1/mailer/MailerUnsubscribeParamsPOST.ts on lines 12..24
    packages/rest-typings/src/v1/omnichannel.ts on lines 278..290
    packages/rest-typings/src/v1/omnichannel.ts on lines 1236..1248
    packages/rest-typings/src/v1/omnichannel.ts on lines 1710..1722
    packages/rest-typings/src/v1/omnichannel.ts on lines 1890..1902
    packages/rest-typings/src/v1/omnichannel.ts on lines 2091..2103
    packages/rest-typings/src/v1/omnichannel.ts on lines 3022..3034

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 54.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 15 locations. Consider refactoring.
    Open

    const PUTWebRTCCallIdSchema = {
        type: 'object',
        properties: {
            rid: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 14 other locations - About 55 mins to fix
    packages/rest-typings/src/v1/chat.ts on lines 236..248
    packages/rest-typings/src/v1/chat.ts on lines 292..304
    packages/rest-typings/src/v1/chat.ts on lines 588..600
    packages/rest-typings/src/v1/chat.ts on lines 797..809
    packages/rest-typings/src/v1/cloud.ts on lines 30..42
    packages/rest-typings/src/v1/e2e.ts on lines 13..25
    packages/rest-typings/src/v1/e2e.ts on lines 74..86
    packages/rest-typings/src/v1/mailer/MailerUnsubscribeParamsPOST.ts on lines 12..24
    packages/rest-typings/src/v1/omnichannel.ts on lines 278..290
    packages/rest-typings/src/v1/omnichannel.ts on lines 1236..1248
    packages/rest-typings/src/v1/omnichannel.ts on lines 1306..1318
    packages/rest-typings/src/v1/omnichannel.ts on lines 1890..1902
    packages/rest-typings/src/v1/omnichannel.ts on lines 2091..2103
    packages/rest-typings/src/v1/omnichannel.ts on lines 3022..3034

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 54.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 15 locations. Consider refactoring.
    Open

    const LivechatVisitorStatusSchema = {
        type: 'object',
        properties: {
            token: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 14 other locations - About 55 mins to fix
    packages/rest-typings/src/v1/chat.ts on lines 236..248
    packages/rest-typings/src/v1/chat.ts on lines 292..304
    packages/rest-typings/src/v1/chat.ts on lines 588..600
    packages/rest-typings/src/v1/chat.ts on lines 797..809
    packages/rest-typings/src/v1/cloud.ts on lines 30..42
    packages/rest-typings/src/v1/e2e.ts on lines 13..25
    packages/rest-typings/src/v1/e2e.ts on lines 74..86
    packages/rest-typings/src/v1/mailer/MailerUnsubscribeParamsPOST.ts on lines 12..24
    packages/rest-typings/src/v1/omnichannel.ts on lines 1236..1248
    packages/rest-typings/src/v1/omnichannel.ts on lines 1306..1318
    packages/rest-typings/src/v1/omnichannel.ts on lines 1710..1722
    packages/rest-typings/src/v1/omnichannel.ts on lines 1890..1902
    packages/rest-typings/src/v1/omnichannel.ts on lines 2091..2103
    packages/rest-typings/src/v1/omnichannel.ts on lines 3022..3034

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 54.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 15 locations. Consider refactoring.
    Open

    const POSTLivechatRoomCloseParamsSchema = {
        type: 'object',
        properties: {
            token: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 14 other locations - About 55 mins to fix
    packages/rest-typings/src/v1/chat.ts on lines 236..248
    packages/rest-typings/src/v1/chat.ts on lines 292..304
    packages/rest-typings/src/v1/chat.ts on lines 588..600
    packages/rest-typings/src/v1/chat.ts on lines 797..809
    packages/rest-typings/src/v1/cloud.ts on lines 30..42
    packages/rest-typings/src/v1/e2e.ts on lines 13..25
    packages/rest-typings/src/v1/e2e.ts on lines 74..86
    packages/rest-typings/src/v1/mailer/MailerUnsubscribeParamsPOST.ts on lines 12..24
    packages/rest-typings/src/v1/omnichannel.ts on lines 278..290
    packages/rest-typings/src/v1/omnichannel.ts on lines 1236..1248
    packages/rest-typings/src/v1/omnichannel.ts on lines 1306..1318
    packages/rest-typings/src/v1/omnichannel.ts on lines 1710..1722
    packages/rest-typings/src/v1/omnichannel.ts on lines 1890..1902
    packages/rest-typings/src/v1/omnichannel.ts on lines 3022..3034

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 54.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 15 locations. Consider refactoring.
    Open

    const POSTLivechatTranscriptRequestParamsSchema = {
        type: 'object',
        properties: {
            email: {
                type: 'string',
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 14 other locations - About 55 mins to fix
    packages/rest-typings/src/v1/chat.ts on lines 236..248
    packages/rest-typings/src/v1/chat.ts on lines 292..304
    packages/rest-typings/src/v1/chat.ts on lines 588..600
    packages/rest-typings/src/v1/chat.ts on lines 797..809
    packages/rest-typings/src/v1/cloud.ts on lines 30..42
    packages/rest-typings/src/v1/e2e.ts on lines 13..25
    packages/rest-typings/src/v1/e2e.ts on lines 74..86
    packages/rest-typings/src/v1/mailer/MailerUnsubscribeParamsPOST.ts on lines 12..24
    packages/rest-typings/src/v1/omnichannel.ts on lines 278..290
    packages/rest-typings/src/v1/omnichannel.ts on lines 1236..1248
    packages/rest-typings/src/v1/omnichannel.ts on lines 1306..1318
    packages/rest-typings/src/v1/omnichannel.ts on lines 1710..1722
    packages/rest-typings/src/v1/omnichannel.ts on lines 1890..1902
    packages/rest-typings/src/v1/omnichannel.ts on lines 2091..2103

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 54.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

        '/v1/livechat/analytics/dashboards/conversation-totalizers': {
            GET: (params: GETDashboardTotalizers) => {
                totalizers: { title: string; value: number }[];
            };
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 3 other locations - About 50 mins to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3788..3792
    packages/rest-typings/src/v1/omnichannel.ts on lines 3793..3797
    packages/rest-typings/src/v1/omnichannel.ts on lines 3798..3802

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 52.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

        '/v1/livechat/analytics/dashboards/productivity-totalizers': {
            GET: (params: GETDashboardTotalizers) => {
                totalizers: { title: string; value: number }[];
            };
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 3 other locations - About 50 mins to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3783..3787
    packages/rest-typings/src/v1/omnichannel.ts on lines 3788..3792
    packages/rest-typings/src/v1/omnichannel.ts on lines 3793..3797

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 52.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

        '/v1/livechat/analytics/dashboards/agents-productivity-totalizers': {
            GET: (params: GETDashboardTotalizers) => {
                totalizers: { title: string; value: number }[];
            };
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 3 other locations - About 50 mins to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3783..3787
    packages/rest-typings/src/v1/omnichannel.ts on lines 3793..3797
    packages/rest-typings/src/v1/omnichannel.ts on lines 3798..3802

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 52.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

        '/v1/livechat/analytics/dashboards/chats-totalizers': {
            GET: (params: GETDashboardTotalizers) => {
                totalizers: { title: string; value: number }[];
            };
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 3 other locations - About 50 mins to fix
    packages/rest-typings/src/v1/omnichannel.ts on lines 3783..3787
    packages/rest-typings/src/v1/omnichannel.ts on lines 3788..3792
    packages/rest-typings/src/v1/omnichannel.ts on lines 3798..3802

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 52.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            | {
                    sendToVisitor: true;
                    requestData: Pick<NonNullable<IOmnichannelRoom['transcriptRequest']>, 'email' | 'subject'>;
              };
    Severity: Minor
    Found in packages/rest-typings/src/v1/omnichannel.ts and 1 other location - About 35 mins to fix
    apps/meteor/app/livechat/server/methods/closeRoom.ts on lines 17..20

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 46.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/units/:unitId/departments': {
            GET: (params: LivechatDepartmentsByUnitIdProps) => PaginatedResult<{
                departments: ILivechatDepartment[];
            }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3393..3397
    packages/rest-typings/src/v1/omnichannel.ts on lines 3401..3405
    packages/rest-typings/src/v1/omnichannel.ts on lines 3432..3436
    packages/rest-typings/src/v1/omnichannel.ts on lines 3453..3457
    packages/rest-typings/src/v1/omnichannel.ts on lines 3458..3462
    packages/rest-typings/src/v1/omnichannel.ts on lines 3480..3484
    packages/rest-typings/src/v1/omnichannel.ts on lines 3488..3492
    packages/rest-typings/src/v1/omnichannel.ts on lines 3622..3624
    packages/rest-typings/src/v1/omnichannel.ts on lines 3713..3715
    packages/rest-typings/src/v1/omnichannel.ts on lines 3716..3718
    packages/rest-typings/src/v1/omnichannel.ts on lines 3719..3723
    packages/rest-typings/src/v1/omnichannel.ts on lines 3745..3747
    packages/rest-typings/src/v1/omnichannel.ts on lines 3768..3770
    packages/rest-typings/src/v1/omnichannel.ts on lines 3774..3776
    packages/rest-typings/src/v1/omnichannel.ts on lines 3777..3779
    packages/rest-typings/src/v1/omnichannel.ts on lines 3878..3882
    packages/rest-typings/src/v1/omnichannel.ts on lines 3883..3887
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/visitors.searchChats/room/:roomId/visitor/:visitorId': {
            GET: (
                params: GETLivechatVisitorsSearchChatsRoomRoomIdVisitorVisitorIdParams,
            ) => PaginatedResult<{ history: VisitorSearchChatsResult[] }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3393..3397
    packages/rest-typings/src/v1/omnichannel.ts on lines 3401..3405
    packages/rest-typings/src/v1/omnichannel.ts on lines 3432..3436
    packages/rest-typings/src/v1/omnichannel.ts on lines 3453..3457
    packages/rest-typings/src/v1/omnichannel.ts on lines 3458..3462
    packages/rest-typings/src/v1/omnichannel.ts on lines 3464..3468
    packages/rest-typings/src/v1/omnichannel.ts on lines 3480..3484
    packages/rest-typings/src/v1/omnichannel.ts on lines 3488..3492
    packages/rest-typings/src/v1/omnichannel.ts on lines 3622..3624
    packages/rest-typings/src/v1/omnichannel.ts on lines 3713..3715
    packages/rest-typings/src/v1/omnichannel.ts on lines 3716..3718
    packages/rest-typings/src/v1/omnichannel.ts on lines 3745..3747
    packages/rest-typings/src/v1/omnichannel.ts on lines 3768..3770
    packages/rest-typings/src/v1/omnichannel.ts on lines 3774..3776
    packages/rest-typings/src/v1/omnichannel.ts on lines 3777..3779
    packages/rest-typings/src/v1/omnichannel.ts on lines 3878..3882
    packages/rest-typings/src/v1/omnichannel.ts on lines 3883..3887
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/inquiries.queuedForUser': {
            GET: (params: GETLivechatInquiriesQueuedForUserParams) => PaginatedResult<{ inquiries: ILivechatInquiryRecord[] }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3393..3397
    packages/rest-typings/src/v1/omnichannel.ts on lines 3401..3405
    packages/rest-typings/src/v1/omnichannel.ts on lines 3432..3436
    packages/rest-typings/src/v1/omnichannel.ts on lines 3453..3457
    packages/rest-typings/src/v1/omnichannel.ts on lines 3458..3462
    packages/rest-typings/src/v1/omnichannel.ts on lines 3464..3468
    packages/rest-typings/src/v1/omnichannel.ts on lines 3480..3484
    packages/rest-typings/src/v1/omnichannel.ts on lines 3488..3492
    packages/rest-typings/src/v1/omnichannel.ts on lines 3622..3624
    packages/rest-typings/src/v1/omnichannel.ts on lines 3713..3715
    packages/rest-typings/src/v1/omnichannel.ts on lines 3716..3718
    packages/rest-typings/src/v1/omnichannel.ts on lines 3719..3723
    packages/rest-typings/src/v1/omnichannel.ts on lines 3745..3747
    packages/rest-typings/src/v1/omnichannel.ts on lines 3768..3770
    packages/rest-typings/src/v1/omnichannel.ts on lines 3774..3776
    packages/rest-typings/src/v1/omnichannel.ts on lines 3878..3882
    packages/rest-typings/src/v1/omnichannel.ts on lines 3883..3887
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/custom-fields': {
            GET: (params?: LivechatCustomFieldsProps) => PaginatedResult<{
                customFields: ILivechatCustomField[];
            }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3393..3397
    packages/rest-typings/src/v1/omnichannel.ts on lines 3401..3405
    packages/rest-typings/src/v1/omnichannel.ts on lines 3432..3436
    packages/rest-typings/src/v1/omnichannel.ts on lines 3453..3457
    packages/rest-typings/src/v1/omnichannel.ts on lines 3458..3462
    packages/rest-typings/src/v1/omnichannel.ts on lines 3464..3468
    packages/rest-typings/src/v1/omnichannel.ts on lines 3488..3492
    packages/rest-typings/src/v1/omnichannel.ts on lines 3622..3624
    packages/rest-typings/src/v1/omnichannel.ts on lines 3713..3715
    packages/rest-typings/src/v1/omnichannel.ts on lines 3716..3718
    packages/rest-typings/src/v1/omnichannel.ts on lines 3719..3723
    packages/rest-typings/src/v1/omnichannel.ts on lines 3745..3747
    packages/rest-typings/src/v1/omnichannel.ts on lines 3768..3770
    packages/rest-typings/src/v1/omnichannel.ts on lines 3774..3776
    packages/rest-typings/src/v1/omnichannel.ts on lines 3777..3779
    packages/rest-typings/src/v1/omnichannel.ts on lines 3878..3882
    packages/rest-typings/src/v1/omnichannel.ts on lines 3883..3887
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/visitors.chatHistory/room/:roomId/visitor/:visitorId': {
            GET: (params: GETLivechatVisitorsChatHistoryRoomRoomIdVisitorVisitorIdParams) => PaginatedResult<{ history: IOmnichannelRoom[] }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3393..3397
    packages/rest-typings/src/v1/omnichannel.ts on lines 3401..3405
    packages/rest-typings/src/v1/omnichannel.ts on lines 3432..3436
    packages/rest-typings/src/v1/omnichannel.ts on lines 3453..3457
    packages/rest-typings/src/v1/omnichannel.ts on lines 3458..3462
    packages/rest-typings/src/v1/omnichannel.ts on lines 3464..3468
    packages/rest-typings/src/v1/omnichannel.ts on lines 3480..3484
    packages/rest-typings/src/v1/omnichannel.ts on lines 3488..3492
    packages/rest-typings/src/v1/omnichannel.ts on lines 3622..3624
    packages/rest-typings/src/v1/omnichannel.ts on lines 3713..3715
    packages/rest-typings/src/v1/omnichannel.ts on lines 3719..3723
    packages/rest-typings/src/v1/omnichannel.ts on lines 3745..3747
    packages/rest-typings/src/v1/omnichannel.ts on lines 3768..3770
    packages/rest-typings/src/v1/omnichannel.ts on lines 3774..3776
    packages/rest-typings/src/v1/omnichannel.ts on lines 3777..3779
    packages/rest-typings/src/v1/omnichannel.ts on lines 3878..3882
    packages/rest-typings/src/v1/omnichannel.ts on lines 3883..3887
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/:rid/messages': {
            GET: (params: LivechatRidMessagesProps) => PaginatedResult<{
                messages: IMessage[];
            }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3393..3397
    packages/rest-typings/src/v1/omnichannel.ts on lines 3401..3405
    packages/rest-typings/src/v1/omnichannel.ts on lines 3432..3436
    packages/rest-typings/src/v1/omnichannel.ts on lines 3453..3457
    packages/rest-typings/src/v1/omnichannel.ts on lines 3458..3462
    packages/rest-typings/src/v1/omnichannel.ts on lines 3464..3468
    packages/rest-typings/src/v1/omnichannel.ts on lines 3480..3484
    packages/rest-typings/src/v1/omnichannel.ts on lines 3622..3624
    packages/rest-typings/src/v1/omnichannel.ts on lines 3713..3715
    packages/rest-typings/src/v1/omnichannel.ts on lines 3716..3718
    packages/rest-typings/src/v1/omnichannel.ts on lines 3719..3723
    packages/rest-typings/src/v1/omnichannel.ts on lines 3745..3747
    packages/rest-typings/src/v1/omnichannel.ts on lines 3768..3770
    packages/rest-typings/src/v1/omnichannel.ts on lines 3774..3776
    packages/rest-typings/src/v1/omnichannel.ts on lines 3777..3779
    packages/rest-typings/src/v1/omnichannel.ts on lines 3878..3882
    packages/rest-typings/src/v1/omnichannel.ts on lines 3883..3887
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/monitors': {
            GET: (params: LivechatMonitorsListProps) => PaginatedResult<{
                monitors: ILivechatMonitor[];
            }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3401..3405
    packages/rest-typings/src/v1/omnichannel.ts on lines 3432..3436
    packages/rest-typings/src/v1/omnichannel.ts on lines 3453..3457
    packages/rest-typings/src/v1/omnichannel.ts on lines 3458..3462
    packages/rest-typings/src/v1/omnichannel.ts on lines 3464..3468
    packages/rest-typings/src/v1/omnichannel.ts on lines 3480..3484
    packages/rest-typings/src/v1/omnichannel.ts on lines 3488..3492
    packages/rest-typings/src/v1/omnichannel.ts on lines 3622..3624
    packages/rest-typings/src/v1/omnichannel.ts on lines 3713..3715
    packages/rest-typings/src/v1/omnichannel.ts on lines 3716..3718
    packages/rest-typings/src/v1/omnichannel.ts on lines 3719..3723
    packages/rest-typings/src/v1/omnichannel.ts on lines 3745..3747
    packages/rest-typings/src/v1/omnichannel.ts on lines 3768..3770
    packages/rest-typings/src/v1/omnichannel.ts on lines 3774..3776
    packages/rest-typings/src/v1/omnichannel.ts on lines 3777..3779
    packages/rest-typings/src/v1/omnichannel.ts on lines 3878..3882
    packages/rest-typings/src/v1/omnichannel.ts on lines 3883..3887
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/priorities': {
            GET: (params: GETLivechatPrioritiesParams) => PaginatedResult<{ priorities: ILivechatPriority[] }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3393..3397
    packages/rest-typings/src/v1/omnichannel.ts on lines 3401..3405
    packages/rest-typings/src/v1/omnichannel.ts on lines 3432..3436
    packages/rest-typings/src/v1/omnichannel.ts on lines 3453..3457
    packages/rest-typings/src/v1/omnichannel.ts on lines 3458..3462
    packages/rest-typings/src/v1/omnichannel.ts on lines 3464..3468
    packages/rest-typings/src/v1/omnichannel.ts on lines 3480..3484
    packages/rest-typings/src/v1/omnichannel.ts on lines 3488..3492
    packages/rest-typings/src/v1/omnichannel.ts on lines 3713..3715
    packages/rest-typings/src/v1/omnichannel.ts on lines 3716..3718
    packages/rest-typings/src/v1/omnichannel.ts on lines 3719..3723
    packages/rest-typings/src/v1/omnichannel.ts on lines 3745..3747
    packages/rest-typings/src/v1/omnichannel.ts on lines 3768..3770
    packages/rest-typings/src/v1/omnichannel.ts on lines 3774..3776
    packages/rest-typings/src/v1/omnichannel.ts on lines 3777..3779
    packages/rest-typings/src/v1/omnichannel.ts on lines 3878..3882
    packages/rest-typings/src/v1/omnichannel.ts on lines 3883..3887
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/departments.by-unit/': {
            GET: (params: LivechatDepartmentsByUnitProps) => PaginatedResult<{
                departments: ILivechatDepartment[];
            }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3393..3397
    packages/rest-typings/src/v1/omnichannel.ts on lines 3401..3405
    packages/rest-typings/src/v1/omnichannel.ts on lines 3432..3436
    packages/rest-typings/src/v1/omnichannel.ts on lines 3453..3457
    packages/rest-typings/src/v1/omnichannel.ts on lines 3464..3468
    packages/rest-typings/src/v1/omnichannel.ts on lines 3480..3484
    packages/rest-typings/src/v1/omnichannel.ts on lines 3488..3492
    packages/rest-typings/src/v1/omnichannel.ts on lines 3622..3624
    packages/rest-typings/src/v1/omnichannel.ts on lines 3713..3715
    packages/rest-typings/src/v1/omnichannel.ts on lines 3716..3718
    packages/rest-typings/src/v1/omnichannel.ts on lines 3719..3723
    packages/rest-typings/src/v1/omnichannel.ts on lines 3745..3747
    packages/rest-typings/src/v1/omnichannel.ts on lines 3768..3770
    packages/rest-typings/src/v1/omnichannel.ts on lines 3774..3776
    packages/rest-typings/src/v1/omnichannel.ts on lines 3777..3779
    packages/rest-typings/src/v1/omnichannel.ts on lines 3878..3882
    packages/rest-typings/src/v1/omnichannel.ts on lines 3883..3887
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/inquiries.list': {
            GET: (params: GETLivechatInquiriesListParams) => PaginatedResult<{ inquiries: ILivechatInquiryRecord[] }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3393..3397
    packages/rest-typings/src/v1/omnichannel.ts on lines 3401..3405
    packages/rest-typings/src/v1/omnichannel.ts on lines 3432..3436
    packages/rest-typings/src/v1/omnichannel.ts on lines 3453..3457
    packages/rest-typings/src/v1/omnichannel.ts on lines 3458..3462
    packages/rest-typings/src/v1/omnichannel.ts on lines 3464..3468
    packages/rest-typings/src/v1/omnichannel.ts on lines 3480..3484
    packages/rest-typings/src/v1/omnichannel.ts on lines 3488..3492
    packages/rest-typings/src/v1/omnichannel.ts on lines 3622..3624
    packages/rest-typings/src/v1/omnichannel.ts on lines 3713..3715
    packages/rest-typings/src/v1/omnichannel.ts on lines 3716..3718
    packages/rest-typings/src/v1/omnichannel.ts on lines 3719..3723
    packages/rest-typings/src/v1/omnichannel.ts on lines 3745..3747
    packages/rest-typings/src/v1/omnichannel.ts on lines 3774..3776
    packages/rest-typings/src/v1/omnichannel.ts on lines 3777..3779
    packages/rest-typings/src/v1/omnichannel.ts on lines 3878..3882
    packages/rest-typings/src/v1/omnichannel.ts on lines 3883..3887
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/visitors.pagesVisited/:roomId': {
            GET: (params: GETLivechatVisitorsPagesVisitedRoomIdParams) => PaginatedResult<{ pages: IMessage[] }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3393..3397
    packages/rest-typings/src/v1/omnichannel.ts on lines 3401..3405
    packages/rest-typings/src/v1/omnichannel.ts on lines 3432..3436
    packages/rest-typings/src/v1/omnichannel.ts on lines 3453..3457
    packages/rest-typings/src/v1/omnichannel.ts on lines 3458..3462
    packages/rest-typings/src/v1/omnichannel.ts on lines 3464..3468
    packages/rest-typings/src/v1/omnichannel.ts on lines 3480..3484
    packages/rest-typings/src/v1/omnichannel.ts on lines 3488..3492
    packages/rest-typings/src/v1/omnichannel.ts on lines 3622..3624
    packages/rest-typings/src/v1/omnichannel.ts on lines 3716..3718
    packages/rest-typings/src/v1/omnichannel.ts on lines 3719..3723
    packages/rest-typings/src/v1/omnichannel.ts on lines 3745..3747
    packages/rest-typings/src/v1/omnichannel.ts on lines 3768..3770
    packages/rest-typings/src/v1/omnichannel.ts on lines 3774..3776
    packages/rest-typings/src/v1/omnichannel.ts on lines 3777..3779
    packages/rest-typings/src/v1/omnichannel.ts on lines 3878..3882
    packages/rest-typings/src/v1/omnichannel.ts on lines 3883..3887
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/tags': {
            GET: (params: LivechatTagsListProps) => PaginatedResult<{
                tags: ILivechatTag[];
            }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3393..3397
    packages/rest-typings/src/v1/omnichannel.ts on lines 3432..3436
    packages/rest-typings/src/v1/omnichannel.ts on lines 3453..3457
    packages/rest-typings/src/v1/omnichannel.ts on lines 3458..3462
    packages/rest-typings/src/v1/omnichannel.ts on lines 3464..3468
    packages/rest-typings/src/v1/omnichannel.ts on lines 3480..3484
    packages/rest-typings/src/v1/omnichannel.ts on lines 3488..3492
    packages/rest-typings/src/v1/omnichannel.ts on lines 3622..3624
    packages/rest-typings/src/v1/omnichannel.ts on lines 3713..3715
    packages/rest-typings/src/v1/omnichannel.ts on lines 3716..3718
    packages/rest-typings/src/v1/omnichannel.ts on lines 3719..3723
    packages/rest-typings/src/v1/omnichannel.ts on lines 3745..3747
    packages/rest-typings/src/v1/omnichannel.ts on lines 3768..3770
    packages/rest-typings/src/v1/omnichannel.ts on lines 3774..3776
    packages/rest-typings/src/v1/omnichannel.ts on lines 3777..3779
    packages/rest-typings/src/v1/omnichannel.ts on lines 3878..3882
    packages/rest-typings/src/v1/omnichannel.ts on lines 3883..3887
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/departments/archived': {
            GET: (params?: LivechatDepartmentProps) => PaginatedResult<{
                departments: ILivechatDepartment[];
            }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3393..3397
    packages/rest-typings/src/v1/omnichannel.ts on lines 3401..3405
    packages/rest-typings/src/v1/omnichannel.ts on lines 3453..3457
    packages/rest-typings/src/v1/omnichannel.ts on lines 3458..3462
    packages/rest-typings/src/v1/omnichannel.ts on lines 3464..3468
    packages/rest-typings/src/v1/omnichannel.ts on lines 3480..3484
    packages/rest-typings/src/v1/omnichannel.ts on lines 3488..3492
    packages/rest-typings/src/v1/omnichannel.ts on lines 3622..3624
    packages/rest-typings/src/v1/omnichannel.ts on lines 3713..3715
    packages/rest-typings/src/v1/omnichannel.ts on lines 3716..3718
    packages/rest-typings/src/v1/omnichannel.ts on lines 3719..3723
    packages/rest-typings/src/v1/omnichannel.ts on lines 3745..3747
    packages/rest-typings/src/v1/omnichannel.ts on lines 3768..3770
    packages/rest-typings/src/v1/omnichannel.ts on lines 3774..3776
    packages/rest-typings/src/v1/omnichannel.ts on lines 3777..3779
    packages/rest-typings/src/v1/omnichannel.ts on lines 3878..3882
    packages/rest-typings/src/v1/omnichannel.ts on lines 3883..3887
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/units/:unitId/departments/available': {
            GET: (params: LivechatDepartmentsAvailableByUnitIdProps) => PaginatedResult<{
                departments: ILivechatDepartment[];
            }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3393..3397
    packages/rest-typings/src/v1/omnichannel.ts on lines 3401..3405
    packages/rest-typings/src/v1/omnichannel.ts on lines 3432..3436
    packages/rest-typings/src/v1/omnichannel.ts on lines 3458..3462
    packages/rest-typings/src/v1/omnichannel.ts on lines 3464..3468
    packages/rest-typings/src/v1/omnichannel.ts on lines 3480..3484
    packages/rest-typings/src/v1/omnichannel.ts on lines 3488..3492
    packages/rest-typings/src/v1/omnichannel.ts on lines 3622..3624
    packages/rest-typings/src/v1/omnichannel.ts on lines 3713..3715
    packages/rest-typings/src/v1/omnichannel.ts on lines 3716..3718
    packages/rest-typings/src/v1/omnichannel.ts on lines 3719..3723
    packages/rest-typings/src/v1/omnichannel.ts on lines 3745..3747
    packages/rest-typings/src/v1/omnichannel.ts on lines 3768..3770
    packages/rest-typings/src/v1/omnichannel.ts on lines 3774..3776
    packages/rest-typings/src/v1/omnichannel.ts on lines 3777..3779
    packages/rest-typings/src/v1/omnichannel.ts on lines 3878..3882
    packages/rest-typings/src/v1/omnichannel.ts on lines 3883..3887
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/inquiries.queued': {
            GET: (params: GETLivechatInquiriesQueuedParams) => PaginatedResult<{ inquiries: ILivechatInquiryRecord[] }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3393..3397
    packages/rest-typings/src/v1/omnichannel.ts on lines 3401..3405
    packages/rest-typings/src/v1/omnichannel.ts on lines 3432..3436
    packages/rest-typings/src/v1/omnichannel.ts on lines 3453..3457
    packages/rest-typings/src/v1/omnichannel.ts on lines 3458..3462
    packages/rest-typings/src/v1/omnichannel.ts on lines 3464..3468
    packages/rest-typings/src/v1/omnichannel.ts on lines 3480..3484
    packages/rest-typings/src/v1/omnichannel.ts on lines 3488..3492
    packages/rest-typings/src/v1/omnichannel.ts on lines 3622..3624
    packages/rest-typings/src/v1/omnichannel.ts on lines 3713..3715
    packages/rest-typings/src/v1/omnichannel.ts on lines 3716..3718
    packages/rest-typings/src/v1/omnichannel.ts on lines 3719..3723
    packages/rest-typings/src/v1/omnichannel.ts on lines 3745..3747
    packages/rest-typings/src/v1/omnichannel.ts on lines 3768..3770
    packages/rest-typings/src/v1/omnichannel.ts on lines 3777..3779
    packages/rest-typings/src/v1/omnichannel.ts on lines 3878..3882
    packages/rest-typings/src/v1/omnichannel.ts on lines 3883..3887
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/analytics/agents/available-for-service-history': {
            GET: (params: LivechatAnalyticsAgentsAvailableForServiceHistoryProps) => PaginatedResult<{
                agents: ILivechatAgentActivity[];
            }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3393..3397
    packages/rest-typings/src/v1/omnichannel.ts on lines 3401..3405
    packages/rest-typings/src/v1/omnichannel.ts on lines 3432..3436
    packages/rest-typings/src/v1/omnichannel.ts on lines 3453..3457
    packages/rest-typings/src/v1/omnichannel.ts on lines 3458..3462
    packages/rest-typings/src/v1/omnichannel.ts on lines 3464..3468
    packages/rest-typings/src/v1/omnichannel.ts on lines 3480..3484
    packages/rest-typings/src/v1/omnichannel.ts on lines 3488..3492
    packages/rest-typings/src/v1/omnichannel.ts on lines 3622..3624
    packages/rest-typings/src/v1/omnichannel.ts on lines 3713..3715
    packages/rest-typings/src/v1/omnichannel.ts on lines 3716..3718
    packages/rest-typings/src/v1/omnichannel.ts on lines 3719..3723
    packages/rest-typings/src/v1/omnichannel.ts on lines 3745..3747
    packages/rest-typings/src/v1/omnichannel.ts on lines 3768..3770
    packages/rest-typings/src/v1/omnichannel.ts on lines 3774..3776
    packages/rest-typings/src/v1/omnichannel.ts on lines 3777..3779
    packages/rest-typings/src/v1/omnichannel.ts on lines 3883..3887
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/rooms': {
            GET: (params: GETLivechatRoomsParams) => PaginatedResult<{ rooms: IOmnichannelRoom[] }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3393..3397
    packages/rest-typings/src/v1/omnichannel.ts on lines 3401..3405
    packages/rest-typings/src/v1/omnichannel.ts on lines 3432..3436
    packages/rest-typings/src/v1/omnichannel.ts on lines 3453..3457
    packages/rest-typings/src/v1/omnichannel.ts on lines 3458..3462
    packages/rest-typings/src/v1/omnichannel.ts on lines 3464..3468
    packages/rest-typings/src/v1/omnichannel.ts on lines 3480..3484
    packages/rest-typings/src/v1/omnichannel.ts on lines 3488..3492
    packages/rest-typings/src/v1/omnichannel.ts on lines 3622..3624
    packages/rest-typings/src/v1/omnichannel.ts on lines 3713..3715
    packages/rest-typings/src/v1/omnichannel.ts on lines 3716..3718
    packages/rest-typings/src/v1/omnichannel.ts on lines 3719..3723
    packages/rest-typings/src/v1/omnichannel.ts on lines 3768..3770
    packages/rest-typings/src/v1/omnichannel.ts on lines 3774..3776
    packages/rest-typings/src/v1/omnichannel.ts on lines 3777..3779
    packages/rest-typings/src/v1/omnichannel.ts on lines 3878..3882
    packages/rest-typings/src/v1/omnichannel.ts on lines 3883..3887
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 36 locations. Consider refactoring.
    Open

        '/v1/livechat/analytics/departments/amount-of-chats': {
            GET: (params: LivechatAnalyticsDepartmentsAmountOfChatsProps) => PaginatedResult<{
                departments: IOmnichannelRoom[];
            }>;
        };
    Severity: Major
    Found in packages/rest-typings/src/v1/omnichannel.ts and 35 other locations - About 30 mins to fix
    packages/rest-typings/src/v1/channels/channels.ts on lines 42..46
    packages/rest-typings/src/v1/channels/channels.ts on lines 56..60
    packages/rest-typings/src/v1/channels/channels.ts on lines 133..137
    packages/rest-typings/src/v1/channels/channels.ts on lines 161..165
    packages/rest-typings/src/v1/customSounds.ts on lines 39..43
    packages/rest-typings/src/v1/customUserStatus.ts on lines 39..43
    packages/rest-typings/src/v1/dm/im.ts on lines 43..47
    packages/rest-typings/src/v1/dm/im.ts on lines 59..63
    packages/rest-typings/src/v1/email-inbox.ts on lines 160..162
    packages/rest-typings/src/v1/federation/rooms.ts on lines 17..21
    packages/rest-typings/src/v1/groups/groups.ts on lines 43..47
    packages/rest-typings/src/v1/groups/groups.ts on lines 56..60
    packages/rest-typings/src/v1/groups/groups.ts on lines 101..105
    packages/rest-typings/src/v1/omnichannel.ts on lines 3393..3397
    packages/rest-typings/src/v1/omnichannel.ts on lines 3401..3405
    packages/rest-typings/src/v1/omnichannel.ts on lines 3432..3436
    packages/rest-typings/src/v1/omnichannel.ts on lines 3453..3457
    packages/rest-typings/src/v1/omnichannel.ts on lines 3458..3462
    packages/rest-typings/src/v1/omnichannel.ts on lines 3464..3468
    packages/rest-typings/src/v1/omnichannel.ts on lines 3480..3484
    packages/rest-typings/src/v1/omnichannel.ts on lines 3488..3492
    packages/rest-typings/src/v1/omnichannel.ts on lines 3622..3624
    packages/rest-typings/src/v1/omnichannel.ts on lines 3713..3715
    packages/rest-typings/src/v1/omnichannel.ts on lines 3716..3718
    packages/rest-typings/src/v1/omnichannel.ts on lines 3719..3723
    packages/rest-typings/src/v1/omnichannel.ts on lines 3745..3747
    packages/rest-typings/src/v1/omnichannel.ts on lines 3768..3770
    packages/rest-typings/src/v1/omnichannel.ts on lines 3774..3776
    packages/rest-typings/src/v1/omnichannel.ts on lines 3777..3779
    packages/rest-typings/src/v1/omnichannel.ts on lines 3878..3882
    packages/rest-typings/src/v1/rooms.ts on lines 570..574
    packages/rest-typings/src/v1/videoConference/index.ts on lines 33..35
    packages/rest-typings/src/v1/voip.ts on lines 543..545
    packages/rest-typings/src/v1/voip.ts on lines 558..560
    packages/rest-typings/src/v1/voip.ts on lines 576..578

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status