You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
2.2 KiB

  1. # ===============================================
  2. # GROUPS
  3. # ===============================================
  4. extend type Query {
  5. groups: GroupQuery
  6. }
  7. extend type Mutation {
  8. groups: GroupMutation
  9. }
  10. # -----------------------------------------------
  11. # QUERIES
  12. # -----------------------------------------------
  13. type GroupQuery {
  14. list(
  15. filter: String
  16. orderBy: String
  17. ): [GroupMinimal] @auth(requires: ["write:groups", "manage:groups", "manage:system"])
  18. single(
  19. id: Int!
  20. ): Group @auth(requires: ["write:groups", "manage:groups", "manage:system"])
  21. }
  22. # -----------------------------------------------
  23. # MUTATIONS
  24. # -----------------------------------------------
  25. type GroupMutation {
  26. create(
  27. name: String!
  28. ): GroupResponse @auth(requires: ["write:groups", "manage:groups", "manage:system"])
  29. update(
  30. id: Int!
  31. name: String!
  32. redirectOnLogin: String!
  33. permissions: [String]!
  34. pageRules: [PageRuleInput]!
  35. ): DefaultResponse @auth(requires: ["write:groups", "manage:groups", "manage:system"])
  36. delete(
  37. id: Int!
  38. ): DefaultResponse @auth(requires: ["write:groups", "manage:groups", "manage:system"])
  39. assignUser(
  40. groupId: Int!
  41. userId: Int!
  42. ): DefaultResponse @auth(requires: ["write:groups", "manage:groups", "manage:system"])
  43. unassignUser(
  44. groupId: Int!
  45. userId: Int!
  46. ): DefaultResponse @auth(requires: ["write:groups", "manage:groups", "manage:system"])
  47. }
  48. # -----------------------------------------------
  49. # TYPES
  50. # -----------------------------------------------
  51. type GroupResponse {
  52. responseResult: ResponseStatus!
  53. group: Group
  54. }
  55. type GroupMinimal {
  56. id: Int!
  57. name: String!
  58. isSystem: Boolean!
  59. userCount: Int
  60. createdAt: Date!
  61. updatedAt: Date!
  62. }
  63. type Group {
  64. id: Int!
  65. name: String!
  66. isSystem: Boolean!
  67. redirectOnLogin: String
  68. permissions: [String]!
  69. pageRules: [PageRule]
  70. users: [UserMinimal]
  71. createdAt: Date!
  72. updatedAt: Date!
  73. }
  74. type PageRule {
  75. id: String!
  76. deny: Boolean!
  77. match: PageRuleMatch!
  78. roles: [String]!
  79. path: String!
  80. locales: [String]!
  81. }
  82. input PageRuleInput {
  83. id: String!
  84. deny: Boolean!
  85. match: PageRuleMatch!
  86. roles: [String]!
  87. path: String!
  88. locales: [String]!
  89. }
  90. enum PageRuleMatch {
  91. START
  92. EXACT
  93. END
  94. REGEX
  95. TAG
  96. }