...

Text file src/edge-infra.dev/pkg/edge/api/graph/schema/organization_queries.graphql

Documentation: edge-infra.dev/pkg/edge/api/graph/schema

     1extend type Query {
     2  """
     3  GetBanners gets all organizations associated with this account from BSP api.
     4  """
     5  banners: [Banner!]!
     6    @hasRole(
     7      roles: [
     8        EDGE_ORG_ADMIN
     9        EDGE_BANNER_ADMIN
    10        EDGE_BANNER_OPERATOR
    11        EDGE_BANNER_VIEWER
    12      ]
    13    )
    14  """
    15  banner not implemented
    16  """
    17  banner(
    18    """
    19    Banner is the id of the banner
    20    """
    21    bannerEdgeId: String! @hasBannerAccess(field: "bannerEdgeId")
    22  ): Banner!
    23    @hasRole(
    24      roles: [
    25        EDGE_ORG_ADMIN
    26        EDGE_BANNER_ADMIN
    27        EDGE_BANNER_OPERATOR
    28        EDGE_BANNER_VIEWER
    29      ]
    30    )
    31  """
    32  bannerStatus return the status of a banner
    33  """
    34  bannerStatus(
    35    """
    36    BannerID is the id of the banner
    37    """
    38    bannerEdgeId: String! @hasBannerAccess(field: "bannerEdgeId")
    39  ): BannerStatus!
    40    @hasRole(
    41      roles: [
    42        EDGE_ORG_ADMIN
    43        EDGE_BANNER_ADMIN
    44        EDGE_BANNER_OPERATOR
    45        EDGE_BANNER_VIEWER
    46      ]
    47    )
    48}
    49
    50extend type Mutation {
    51  """
    52  CreateBanner creates an enterprise unit in BSP api representing an banner and a corresponding namespace in kubernetes.
    53  """
    54  createBanner(
    55    """
    56    Name is the name of the banner
    57    """
    58    name: String!
    59    """
    60    Description is the description of the banner in bsl
    61    """
    62    description: String
    63    """
    64    IsOrgBanner describes banner types: eu banner or org banner
    65    """
    66    isOrgBanner: Boolean
    67    """
    68    BSL ID is the optional bsl id for the banner
    69    """
    70    bslId: String
    71  ): EdgeResponsePayload! @hasRole(roles: [EDGE_ORG_ADMIN])
    72
    73  """
    74  UpdateBanner update name or description of a banner. Updates in bsl and edge sql db
    75  """
    76  updateBanner(
    77    """
    78    edge id for the banner
    79    """
    80    bannerEdgeId: String! @hasBannerAccess(field: "bannerEdgeId")
    81    """
    82    Display Name is the name of the banner that will be shown in the ui
    83    """
    84    displayName: String
    85    """
    86    Description is the description of the banner in bsl
    87    """
    88    description: String
    89    """
    90    banner opt in security compliance setting
    91    """
    92    edgeSecurityCompliance: EdgeSecurityComplianceOptions
    93  ): EdgeResponsePayload! @hasRole(roles: [EDGE_ORG_ADMIN, EDGE_BANNER_ADMIN])
    94
    95  """
    96  DeleteBanner deletes an enterprise unit in BSP api representing an Banner.
    97  """
    98  deleteBanner(
    99    """
   100    id is the edge id for the banner to be deleted
   101    """
   102    bannerEdgeId: String!
   103  ): EdgeResponsePayload! @hasRole(roles: [EDGE_ORG_ADMIN])
   104
   105  """
   106  AssignUserToBanner assigns a user to an organization by first clearing previous organizations associated with this user.
   107  """
   108  assignUserToBanner(
   109    """
   110    Username is the user that will be assigned to the banners requested
   111    """
   112    username: String!
   113    """
   114    banner is the json array of the banner the user will be given access to
   115    """
   116    bannerEdgeIds: [String!]
   117  ): EdgeResponsePayload! @hasRole(roles: [EDGE_ORG_ADMIN])
   118
   119  """
   120  AssignRoleToUser assigns a role for a username.
   121  """
   122  assignRoleToUser(
   123    """
   124    Username is the user the roles will be assigned to
   125    """
   126    username: String!
   127    """
   128    Role is the edge role that will be assigned to a user. Edge roles correspond to more bsl roles. Please see https://docs.edge-infra.dev/architecture/bsl/bsl-edge-apis/ for more info
   129    """
   130    role: String!
   131      @canAssignRole(
   132        abilityMap: {
   133          EDGE_ORG_ADMIN: [
   134            EDGE_ORG_ADMIN
   135            EDGE_BANNER_ADMIN
   136            EDGE_BANNER_OPERATOR
   137            EDGE_BANNER_VIEWER
   138            EDGE_OI_ADMIN
   139            EDGE_SUPER_USER
   140            EDGE_L1
   141            EDGE_L2
   142            EDGE_L3
   143            EDGE_L4
   144          ]
   145          EDGE_BANNER_ADMIN: [
   146            EDGE_BANNER_ADMIN
   147            EDGE_BANNER_OPERATOR 
   148            EDGE_BANNER_VIEWER
   149            EDGE_L1
   150            EDGE_L2
   151            EDGE_L3
   152            EDGE_L4
   153          ]
   154        }
   155      )
   156  ): EdgeResponsePayload! @hasRole(roles: [EDGE_ORG_ADMIN, EDGE_BANNER_ADMIN])
   157
   158  """
   159  AssignRolesToUser assigns a role for a username.
   160  """
   161  assignRolesToUser(
   162    """
   163    Username is the user the roles will be assigned to
   164    """
   165    username: String!
   166    """
   167    Roles is the edge roles that will be assigned to a user. Edge roles correspond to more bsl roles. Please see https://docs.edge-infra.dev/architecture/bsl/bsl-edge-apis/ for more info
   168    """
   169    roles: [String!]
   170      @canAssignRole(
   171        abilityMap: {
   172          EDGE_ORG_ADMIN: [
   173            EDGE_ORG_ADMIN
   174            EDGE_BANNER_ADMIN
   175            EDGE_BANNER_OPERATOR
   176            EDGE_BANNER_VIEWER
   177            EDGE_OI_ADMIN
   178            EDGE_SUPER_USER
   179            EDGE_L1
   180            EDGE_L2
   181            EDGE_L3
   182            EDGE_L4
   183          ]
   184          EDGE_BANNER_ADMIN: [
   185            EDGE_BANNER_ADMIN
   186            EDGE_BANNER_OPERATOR
   187            EDGE_BANNER_VIEWER
   188            EDGE_L1
   189            EDGE_L2
   190            EDGE_L3
   191            EDGE_L4
   192          ]
   193        }
   194      )
   195  ): EdgeResponsePayload! @hasRole(roles: [EDGE_ORG_ADMIN, EDGE_BANNER_ADMIN])
   196
   197  """
   198  ReplaceAdditionalPermissions replaces any additional roles previously granted with specified additional roles (example: Operator Intervention roles) for a username.
   199  """
   200  replaceAdditionalPermissions(
   201    """
   202    Username is the user the additional roles will be assigned to
   203    """
   204    username: String!
   205    """
   206    Roles is the edge roles that will be assigned to a user. Edge roles correspond to more bsl roles. Please see https://docs.edge-infra.dev/architecture/bsl/bsl-edge-apis/ for more info
   207    """
   208    roles: [String!]
   209      @canAssignRole(
   210        abilityMap: {
   211          EDGE_ORG_ADMIN: [
   212            EDGE_OI_ADMIN
   213            EDGE_SUPER_USER
   214            EDGE_L1
   215            EDGE_L2
   216            EDGE_L3
   217            EDGE_L4
   218          ]
   219          EDGE_BANNER_ADMIN: [
   220            EDGE_L1
   221            EDGE_L2
   222            EDGE_L3
   223            EDGE_L4
   224          ]
   225          EDGE_OI_ADMIN: [
   226            EDGE_SUPER_USER
   227            EDGE_L1
   228            EDGE_L2
   229            EDGE_L3
   230            EDGE_L4
   231          ]
   232        }
   233      )
   234  ): EdgeResponsePayload! @hasRole(roles: [EDGE_ORG_ADMIN, EDGE_BANNER_ADMIN, EDGE_OI_ADMIN])
   235}

View as plain text