Default Adapter for Organization

Description

This class is used to define the default adapter for Organization. This adapter uses the REST SDK to communicate with Organization functionality.

Implements

Constructors

Properties

addOrUpdateUsersPath: string
createOrganizationPath: string
getAttachmentByIds: ((idList, requestContext?) => Promise<(null | AttachmentResponse)[]>)

Type declaration

    • (idList, requestContext?): Promise<(null | AttachmentResponse)[]>
    • Parameters

      Returns Promise<(null | AttachmentResponse)[]>

getAttachmentsPath: string
getOneOrganizationAttachmentPath: string
getOrganizationAttachmentsPath: string
getOrganizationByIdPath: string
getOrganizationUsersPath: string
getOrganizationsPath: string
getUserOrganizationRolePath: string
getUserOrganizationsPath: string
internalToken: string
isUserInOrganizationPath: string
organizationServiceEndpoint: string
patchOrganizationPath: string
DEFAULT_ADD_OR_UPDATE_USERS: "/organizations/:orgId/users" = '/organizations/:orgId/users'
DEFAULT_CREATE_ORGANIZATION: "/organizations" = '/organizations'
DEFAULT_GET_ATTACHMENTS: "/attachments" = '/attachments'
DEFAULT_GET_ONE_ORGANIZATION_ATTACHMENT: "/organizations/:orgId/attachments/:attachmentId" = '/organizations/:orgId/attachments/:attachmentId'
DEFAULT_GET_ORGANIZATIONS: "/organizations" = '/organizations'
DEFAULT_GET_ORGANIZATION_ATTACHMENTS: "/organizations/:orgId/attachments" = '/organizations/:orgId/attachments'
DEFAULT_GET_ORGANIZATION_BY_ID: "/organizations/:orgId" = '/organizations/:orgId'
DEFAULT_GET_ORGANIZATION_USERS: "/organizations/:orgId/users" = '/organizations/:orgId/users'
DEFAULT_GET_USER_ORGANIZATIONS: "/users/:userId/organizations" = '/users/:userId/organizations'
DEFAULT_GET_USER_ORGANIZATION_ROLE: "/organizations/:orgId/users/:userId/role" = '/organizations/:orgId/users/:userId/role'
DEFAULT_IS_USER_IN_ORGANIZATION: "/organizations/:orgId/users:exists?userId=:userId" = '/organizations/:orgId/users:exists?userId=:userId'
DEFAULT_PATCH_ORGANIZATION: "/organizations/:orgId" = '/organizations/:orgId'

Organization

  • API for getting role of a user in an organization.

    Parameters

    • args: {
          orgId: string;
          userId: string;
      }

      Input containing parameters for fetching organizations.

      • orgId: string
      • userId: string
    • Optional requestContext: RequestContext

      request context (requestId, serviceHistory)

    Returns Promise<{
        role: string;
    }>

    Object containing the role of the user in the organization.

    Description

    This API is used to get the role a user has in an organization.

  • API for checking if a user belongs to an organization

    Parameters

    • args: {
          orgId: string;
          userId: string;
      }

      Input containing properties for checking if a user belongs to an organization.

      • orgId: string
      • userId: string
    • Optional requestContext: RequestContext

      request context (requestId, serviceHistory)

    Returns Promise<{
        isUserInOrg: boolean;
    }>

    Object containing the boolean result of the check.

    Description

    This API is used to check if a user belongs to an organization.

  • API for updating review statistics for a single organization

    Parameters

    • args: {
          orgId: string;
          reviewStats: {
              averageRate?: number;
              averageSubRates?: Record<string, number>;
              totalCount?: number;
          };
      }

      Input containing properties for updating statistics.

      • orgId: string
      • reviewStats: {
            averageRate?: number;
            averageSubRates?: Record<string, number>;
            totalCount?: number;
        }
        • Optional averageRate?: number
        • Optional averageSubRates?: Record<string, number>
        • Optional totalCount?: number
    • Optional requestContext: RequestContext

    Returns Promise<undefined | Organization>

    Organization data that was updated.

    Description

    This API is used to update review statistics for a single org in the Organization service.

Generated using TypeDoc