jourycms-sdk 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (235) hide show
  1. package/dist/base.app-container.d.ts +7 -0
  2. package/dist/base.app-container.d.ts.map +1 -0
  3. package/dist/base.app-container.js +10 -0
  4. package/dist/base.client.d.ts +10 -0
  5. package/dist/base.client.d.ts.map +1 -0
  6. package/dist/base.client.js +16 -0
  7. package/dist/base.service-container.d.ts +8 -0
  8. package/dist/base.service-container.d.ts.map +1 -0
  9. package/dist/base.service-container.js +12 -0
  10. package/dist/containers/auth/clients/api-keys.client.d.ts +13 -0
  11. package/dist/containers/auth/clients/api-keys.client.d.ts.map +1 -0
  12. package/dist/containers/auth/clients/api-keys.client.js +48 -0
  13. package/dist/containers/auth/clients/auth.client.d.ts +12 -0
  14. package/dist/containers/auth/clients/auth.client.d.ts.map +1 -0
  15. package/dist/containers/auth/clients/auth.client.js +39 -0
  16. package/dist/containers/auth/clients/permission-groups.client.d.ts +12 -0
  17. package/dist/containers/auth/clients/permission-groups.client.d.ts.map +1 -0
  18. package/dist/containers/auth/clients/permission-groups.client.js +42 -0
  19. package/dist/containers/auth/clients/permissions.client.d.ts +13 -0
  20. package/dist/containers/auth/clients/permissions.client.d.ts.map +1 -0
  21. package/dist/containers/auth/clients/permissions.client.js +48 -0
  22. package/dist/containers/auth/clients/roles.client.d.ts +17 -0
  23. package/dist/containers/auth/clients/roles.client.d.ts.map +1 -0
  24. package/dist/containers/auth/clients/roles.client.js +72 -0
  25. package/dist/containers/auth/clients/users.client.d.ts +26 -0
  26. package/dist/containers/auth/clients/users.client.d.ts.map +1 -0
  27. package/dist/containers/auth/clients/users.client.js +128 -0
  28. package/dist/containers/auth/service-container.d.ts +23 -0
  29. package/dist/containers/auth/service-container.d.ts.map +1 -0
  30. package/dist/containers/auth/service-container.js +48 -0
  31. package/dist/containers/content/clients/article-types.client.d.ts +15 -0
  32. package/dist/containers/content/clients/article-types.client.d.ts.map +1 -0
  33. package/dist/containers/content/clients/article-types.client.js +60 -0
  34. package/dist/containers/content/clients/articles.client.d.ts +15 -0
  35. package/dist/containers/content/clients/articles.client.d.ts.map +1 -0
  36. package/dist/containers/content/clients/articles.client.js +60 -0
  37. package/dist/containers/content/clients/comments.client.d.ts +15 -0
  38. package/dist/containers/content/clients/comments.client.d.ts.map +1 -0
  39. package/dist/containers/content/clients/comments.client.js +60 -0
  40. package/dist/containers/content/clients/reviews.client.d.ts +15 -0
  41. package/dist/containers/content/clients/reviews.client.d.ts.map +1 -0
  42. package/dist/containers/content/clients/reviews.client.js +60 -0
  43. package/dist/containers/content/clients/taxonomies.client.d.ts +15 -0
  44. package/dist/containers/content/clients/taxonomies.client.d.ts.map +1 -0
  45. package/dist/containers/content/clients/taxonomies.client.js +60 -0
  46. package/dist/containers/content/clients/terms.client.d.ts +15 -0
  47. package/dist/containers/content/clients/terms.client.d.ts.map +1 -0
  48. package/dist/containers/content/clients/terms.client.js +60 -0
  49. package/dist/containers/content/clients/translation.items.client.d.ts +16 -0
  50. package/dist/containers/content/clients/translation.items.client.d.ts.map +1 -0
  51. package/dist/containers/content/clients/translation.items.client.js +66 -0
  52. package/dist/containers/content/clients/translation.namespaces.client.d.ts +16 -0
  53. package/dist/containers/content/clients/translation.namespaces.client.d.ts.map +1 -0
  54. package/dist/containers/content/clients/translation.namespaces.client.js +66 -0
  55. package/dist/containers/content/clients/translation.projects.client.d.ts +16 -0
  56. package/dist/containers/content/clients/translation.projects.client.d.ts.map +1 -0
  57. package/dist/containers/content/clients/translation.projects.client.js +66 -0
  58. package/dist/containers/content/service-container.d.ts +29 -0
  59. package/dist/containers/content/service-container.d.ts.map +1 -0
  60. package/dist/containers/content/service-container.js +66 -0
  61. package/dist/containers/storage/clients/files.client.d.ts +13 -0
  62. package/dist/containers/storage/clients/files.client.d.ts.map +1 -0
  63. package/dist/containers/storage/clients/files.client.js +48 -0
  64. package/dist/containers/storage/clients/uploader.client.d.ts +6 -0
  65. package/dist/containers/storage/clients/uploader.client.d.ts.map +1 -0
  66. package/dist/containers/storage/clients/uploader.client.js +12 -0
  67. package/dist/containers/storage/clients/utils.client.d.ts +15 -0
  68. package/dist/containers/storage/clients/utils.client.d.ts.map +1 -0
  69. package/dist/containers/storage/clients/utils.client.js +45 -0
  70. package/dist/containers/storage/service-container.d.ts +31 -0
  71. package/dist/containers/storage/service-container.d.ts.map +1 -0
  72. package/dist/containers/storage/service-container.js +63 -0
  73. package/dist/containers/system/clients/apps.client.d.ts +16 -0
  74. package/dist/containers/system/clients/apps.client.d.ts.map +1 -0
  75. package/dist/containers/system/clients/apps.client.js +66 -0
  76. package/dist/containers/system/service-container.d.ts +13 -0
  77. package/dist/containers/system/service-container.d.ts.map +1 -0
  78. package/dist/containers/system/service-container.js +18 -0
  79. package/dist/exceptions/api-response.exception.d.ts +15 -0
  80. package/dist/exceptions/api-response.exception.d.ts.map +1 -0
  81. package/dist/exceptions/api-response.exception.js +26 -0
  82. package/dist/http-client.d.ts +20 -0
  83. package/dist/http-client.d.ts.map +1 -0
  84. package/dist/http-client.js +187 -0
  85. package/dist/index.d.ts +37 -0
  86. package/dist/index.d.ts.map +1 -0
  87. package/dist/index.js +237 -0
  88. package/dist/init-sdk.d.ts +21 -0
  89. package/dist/init-sdk.d.ts.map +1 -0
  90. package/dist/init-sdk.js +17 -0
  91. package/dist/sdk.test.d.ts +1 -0
  92. package/dist/sdk.test.d.ts.map +1 -0
  93. package/dist/sdk.test.js +1 -0
  94. package/dist/utils/helpers.d.ts +5 -0
  95. package/dist/utils/helpers.d.ts.map +1 -0
  96. package/dist/utils/helpers.js +13 -0
  97. package/dist/utils/logger.d.ts +133 -0
  98. package/dist/utils/logger.d.ts.map +1 -0
  99. package/dist/utils/logger.js +176 -0
  100. package/package.json +49 -0
  101. package/typings/index.d.ts +1 -0
  102. package/typings/v1/cache-manager/class.d.ts +0 -0
  103. package/typings/v1/cache-manager/entity.d.ts +83 -0
  104. package/typings/v1/cache-manager/index.d.ts +5 -0
  105. package/typings/v1/cache-manager/store.d.ts +35 -0
  106. package/typings/v1/events/index.d.ts +3 -0
  107. package/typings/v1/events/payloads.d.ts +339 -0
  108. package/typings/v1/index.d.ts +8 -0
  109. package/typings/v1/lib/execution-scenario/index.d.ts +27 -0
  110. package/typings/v1/lib/index.d.ts +4 -0
  111. package/typings/v1/lib/logger/index.d.ts +3 -0
  112. package/typings/v1/lib/logger/logger.d.ts +53 -0
  113. package/typings/v1/modules/express/express.d.ts +40 -0
  114. package/typings/v1/modules/express/index.d.ts +3 -0
  115. package/typings/v1/modules/index.d.ts +4 -0
  116. package/typings/v1/modules/mongoose/index.d.ts +3 -0
  117. package/typings/v1/modules/mongoose/mongoose.d.ts +48 -0
  118. package/typings/v1/sdk/index.d.ts +3 -0
  119. package/typings/v1/sdk/sdk.d.ts +158 -0
  120. package/typings/v1/security/auth-data.d.ts +36 -0
  121. package/typings/v1/security/index.d.ts +4 -0
  122. package/typings/v1/security/jwt.d.ts +36 -0
  123. package/typings/v1/services/auth/api/api-key.d.ts +144 -0
  124. package/typings/v1/services/auth/api/auth.d.ts +168 -0
  125. package/typings/v1/services/auth/api/index.d.ts +9 -0
  126. package/typings/v1/services/auth/api/permission-group.d.ts +95 -0
  127. package/typings/v1/services/auth/api/permission.d.ts +128 -0
  128. package/typings/v1/services/auth/api/role.d.ts +193 -0
  129. package/typings/v1/services/auth/api/tools.d.ts +33 -0
  130. package/typings/v1/services/auth/api/user.d.ts +391 -0
  131. package/typings/v1/services/auth/entities/_shared.d.ts +11 -0
  132. package/typings/v1/services/auth/entities/api-key.d.ts +29 -0
  133. package/typings/v1/services/auth/entities/federated-credential.d.ts +22 -0
  134. package/typings/v1/services/auth/entities/index.d.ts +9 -0
  135. package/typings/v1/services/auth/entities/permission-group.d.ts +20 -0
  136. package/typings/v1/services/auth/entities/permission.d.ts +24 -0
  137. package/typings/v1/services/auth/entities/role.d.ts +25 -0
  138. package/typings/v1/services/auth/entities/user.d.ts +153 -0
  139. package/typings/v1/services/auth/index.d.ts +5 -0
  140. package/typings/v1/services/auth/models/.DS_Store +0 -0
  141. package/typings/v1/services/auth/models/api-key.d.ts +19 -0
  142. package/typings/v1/services/auth/models/api-key.model.d.ts +3 -0
  143. package/typings/v1/services/auth/models/federated-credential.d.ts +24 -0
  144. package/typings/v1/services/auth/models/index.d.ts +9 -0
  145. package/typings/v1/services/auth/models/permission-group.d.ts +24 -0
  146. package/typings/v1/services/auth/models/permission.d.ts +22 -0
  147. package/typings/v1/services/auth/models/role.d.ts +22 -0
  148. package/typings/v1/services/auth/models/user.d.ts +22 -0
  149. package/typings/v1/services/content/api/article-type.d.ts +160 -0
  150. package/typings/v1/services/content/api/article.d.ts +108 -0
  151. package/typings/v1/services/content/api/comment.d.ts +106 -0
  152. package/typings/v1/services/content/api/index.d.ts +12 -0
  153. package/typings/v1/services/content/api/review.d.ts +105 -0
  154. package/typings/v1/services/content/api/taxonomy.d.ts +101 -0
  155. package/typings/v1/services/content/api/term.d.ts +101 -0
  156. package/typings/v1/services/content/api/translation.item.d.ts +195 -0
  157. package/typings/v1/services/content/api/translation.namespace.d.ts +135 -0
  158. package/typings/v1/services/content/api/translation.project.d.ts +196 -0
  159. package/typings/v1/services/content/api/translation.tools.d.ts +85 -0
  160. package/typings/v1/services/content/entities/article-type.d.ts +51 -0
  161. package/typings/v1/services/content/entities/article.d.ts +53 -0
  162. package/typings/v1/services/content/entities/comment.d.ts +34 -0
  163. package/typings/v1/services/content/entities/index.d.ts +11 -0
  164. package/typings/v1/services/content/entities/review.d.ts +35 -0
  165. package/typings/v1/services/content/entities/taxonomy.d.ts +40 -0
  166. package/typings/v1/services/content/entities/term.d.ts +43 -0
  167. package/typings/v1/services/content/entities/translation.item.d.ts +48 -0
  168. package/typings/v1/services/content/entities/translation.namespace.d.ts +29 -0
  169. package/typings/v1/services/content/entities/translation.project.d.ts +98 -0
  170. package/typings/v1/services/content/index.d.ts +5 -0
  171. package/typings/v1/services/content/models/article-type.d.ts +19 -0
  172. package/typings/v1/services/content/models/article.d.ts +19 -0
  173. package/typings/v1/services/content/models/comment.d.ts +19 -0
  174. package/typings/v1/services/content/models/index.d.ts +11 -0
  175. package/typings/v1/services/content/models/review.d.ts +19 -0
  176. package/typings/v1/services/content/models/taxonomy.d.ts +19 -0
  177. package/typings/v1/services/content/models/term.d.ts +19 -0
  178. package/typings/v1/services/content/models/translation.item.d.ts +21 -0
  179. package/typings/v1/services/content/models/translation.namespace.d.ts +22 -0
  180. package/typings/v1/services/content/models/translation.project.d.ts +21 -0
  181. package/typings/v1/services/index.d.ts +4 -0
  182. package/typings/v1/services/storage/api/index.d.ts +3 -0
  183. package/typings/v1/services/storage/api/uploaded-file.d.ts +166 -0
  184. package/typings/v1/services/storage/entities/index.d.ts +3 -0
  185. package/typings/v1/services/storage/entities/uploaded-file.d.ts +49 -0
  186. package/typings/v1/services/storage/index.d.ts +5 -0
  187. package/typings/v1/services/storage/models/index.d.ts +3 -0
  188. package/typings/v1/services/storage/models/uploaded-file.d.ts +19 -0
  189. package/typings/v1/services/system/api/app.d.ts +130 -0
  190. package/typings/v1/services/system/api/index.d.ts +3 -0
  191. package/typings/v1/services/system/entities/app.d.ts +97 -0
  192. package/typings/v1/services/system/entities/index.d.ts +3 -0
  193. package/typings/v1/services/system/index.d.ts +5 -0
  194. package/typings/v1/services/system/models/app.d.ts +19 -0
  195. package/typings/v1/services/system/models/index.d.ts +3 -0
  196. package/typings/v1/ui/admin/index.d.ts +1 -0
  197. package/typings/v1/ui/forms/article/custom-fieds/custom-field.d.ts +189 -0
  198. package/typings/v1/ui/forms/article/custom-fieds/fields/article_object.custom-field.d.ts +29 -0
  199. package/typings/v1/ui/forms/article/custom-fieds/fields/boolean.custom-field.d.ts +24 -0
  200. package/typings/v1/ui/forms/article/custom-fieds/fields/checkbox.custom-field.d.ts +26 -0
  201. package/typings/v1/ui/forms/article/custom-fieds/fields/date.custom-field.d.ts +23 -0
  202. package/typings/v1/ui/forms/article/custom-fieds/fields/date_range.custom-field.d.ts +26 -0
  203. package/typings/v1/ui/forms/article/custom-fieds/fields/file.custom-field.d.ts +26 -0
  204. package/typings/v1/ui/forms/article/custom-fieds/fields/image.custom-field.d.ts +25 -0
  205. package/typings/v1/ui/forms/article/custom-fieds/fields/index.d.ts +11 -0
  206. package/typings/v1/ui/forms/article/custom-fieds/fields/number.custom-field.d.ts +26 -0
  207. package/typings/v1/ui/forms/article/custom-fieds/fields/radiobox.custom-field.d.ts +27 -0
  208. package/typings/v1/ui/forms/article/custom-fieds/fields/select.custom-field.d.ts +27 -0
  209. package/typings/v1/ui/forms/article/custom-fieds/fields/text.custom-field.d.ts +26 -0
  210. package/typings/v1/ui/forms/article/custom-fieds/fields/time.custom-field.d.ts +24 -0
  211. package/typings/v1/ui/forms/article/custom-fieds/index.d.ts +1 -0
  212. package/typings/v1/ui/forms/article/index.d.ts +1 -0
  213. package/typings/v1/ui/forms/index.d.ts +1 -0
  214. package/typings/v1/ui/index.d.ts +3 -0
  215. package/typings/v1/ui/routes/index.d.ts +1 -0
  216. package/typings/v1/ui/routes/routes.d.ts +73 -0
  217. package/typings/v1/utils/api/index.d.ts +4 -0
  218. package/typings/v1/utils/api/request.d.ts +215 -0
  219. package/typings/v1/utils/api/response.d.ts +188 -0
  220. package/typings/v1/utils/common/common.d.ts +53 -0
  221. package/typings/v1/utils/common/index.d.ts +3 -0
  222. package/typings/v1/utils/dev/config.d.ts +135 -0
  223. package/typings/v1/utils/dev/index.d.ts +4 -0
  224. package/typings/v1/utils/dev/instrumentation.d.ts +41 -0
  225. package/typings/v1/utils/entities/entities.d.ts +66 -0
  226. package/typings/v1/utils/entities/index.d.ts +4 -0
  227. package/typings/v1/utils/entities/snapshots.d.ts +69 -0
  228. package/typings/v1/utils/index.d.ts +10 -0
  229. package/typings/v1/utils/models/index.d.ts +3 -0
  230. package/typings/v1/utils/models/models.d.ts +50 -0
  231. package/typings/v1/utils/seed/index.d.ts +3 -0
  232. package/typings/v1/utils/seed/locations.d.ts +41 -0
  233. package/typings/v1/utils/system/microservice.d.ts +11 -0
  234. package/typings/v1/utils/system/models.d.ts +21 -0
  235. package/typings/v1/utils/utils.d.ts +171 -0
@@ -0,0 +1,128 @@
1
+ declare module Levelup {
2
+ namespace CMS {
3
+ namespace V1 {
4
+ namespace Auth {
5
+ export namespace Api {
6
+ export namespace Permissions {
7
+ /**
8
+ * --------------------------------------------------------------------------
9
+ * Create
10
+ * --------------------------------------------------------------------------
11
+ * @link
12
+ * @fires RolesService.Create
13
+ * @param {Levelup.V2.Auth.Api.Permissions.Create.Request} query
14
+ * @returns {Levelup.V2.Auth.Api.Permissions.Create.Response}
15
+ * @method POST
16
+ *
17
+ */
18
+ export namespace Create {
19
+ export type Request =
20
+ Levelup.V2.Utils.Api.Request.BuildCreateRequest<Entity.Permission>;
21
+ export type Response =
22
+ Utils.Api.Response.BuildSingleItemResponse<Entity.Permission>;
23
+ }
24
+
25
+ /**
26
+ * --------------------------------------------------------------------------
27
+ * Update
28
+ * --------------------------------------------------------------------------
29
+ * @link
30
+ * @fires PermissionService.Update
31
+ * @param {Levelup.V2.Auth.Api.Permissions.Update.Request} query
32
+ * @returns {Levelup.V2.Auth.Api.Permissions.Update.Response}
33
+ * @method PUT
34
+ *
35
+ */
36
+ export namespace Update {
37
+ export type Request =
38
+ Levelup.V2.Utils.Api.Request.BuildUpdateRequest<Entity.Permission>;
39
+ export type Response =
40
+ Utils.Api.Response.BuildSingleItemResponse<Entity.Permission>;
41
+ }
42
+
43
+ /**
44
+ * --------------------------------------------------------------------------
45
+ * Delete
46
+ * --------------------------------------------------------------------------
47
+ * @link
48
+ * @fires PermissionService.Delete
49
+ * @param {Levelup.V2.Auth.Api.Permissions.Delete.Request} query
50
+ * @returns {Levelup.V2.Auth.Api.Permissions.Delete.Response}
51
+ * @method DELETE
52
+ *
53
+ */
54
+ export namespace Delete {
55
+ export type Response = Utils.Api.Response.DefaultDeleteResponse;
56
+ }
57
+
58
+ /**
59
+ * --------------------------------------------------------------------------
60
+ * One
61
+ * --------------------------------------------------------------------------
62
+ * @link
63
+ * @fires PermissionService.One
64
+ * @param {Levelup.V2.Auth.Api.Permissions.GetOne.Request} query
65
+ * @returns {Levelup.V2.Auth.Api.Permissions.GetOne.Response}
66
+ * @method GET
67
+ *
68
+ */
69
+ export namespace GetOne {
70
+ export type Scope = "";
71
+
72
+ export type Request = Levelup.V2.Utils.Api.Request.Build<never>;
73
+ export type Response =
74
+ Utils.Api.Response.BuildSingleItemResponse<Entity.Permission>;
75
+ }
76
+
77
+ /**
78
+ * --------------------------------------------------------------------------
79
+ * List
80
+ * --------------------------------------------------------------------------
81
+ * @link
82
+ * @fires PermissionService.List
83
+ * @param {Levelup.V2.Auth.Api.Permissions.List.Request} query
84
+ * @returns {Levelup.V2.Auth.Api.Permissions.List.Response}
85
+ * @method GET
86
+ *
87
+ */
88
+ export namespace List {
89
+ export type Scope = "";
90
+
91
+ export type Request =
92
+ Levelup.V2.Utils.Api.Request.BuildSearchablePagedSortableFilterableProjectable<Entity.Permission>;
93
+ export type Response =
94
+ Utils.Api.Response.BuildListResponse<Entity.Permission>;
95
+ }
96
+
97
+ /**
98
+ * --------------------------------------------------------------------------
99
+ * AssignPermissionToUser
100
+ * --------------------------------------------------------------------------
101
+ * @link
102
+ * @fires PermissionService.AssignPermissionToUser
103
+ * @param {Levelup.V2.Auth.Api.Permissions.AssignPermissionToUser.Request} query
104
+ * @returns {Levelup.V2.Auth.Api.Permissions.AssignPermissionToUser.Response}
105
+ * @method POST
106
+ *
107
+ */
108
+ export namespace AssignPermissionToUser {
109
+ export type Request = Levelup.V2.Utils.Api.Request.Build<{
110
+ permissions: {
111
+ group: string;
112
+ permissions: string[];
113
+ }[];
114
+ roles: {
115
+ role: string;
116
+ permissions: string[];
117
+ }[];
118
+ }>;
119
+ export type Response = Utils.Api.Response.DefaultResponse & {
120
+ permissions?: Entity.Permission[];
121
+ };
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
128
+ }
@@ -0,0 +1,193 @@
1
+ declare module Levelup {
2
+ namespace CMS {
3
+ namespace V1 {
4
+ namespace Auth {
5
+ export namespace Api {
6
+ export namespace Roles {
7
+ /**
8
+ * --------------------------------------------------------------------------
9
+ * Create
10
+ * --------------------------------------------------------------------------
11
+ * @link
12
+ * @fires RolesService.Create
13
+ * @param {Levelup.V2.Auth.Api.Roles.Create.Request} query
14
+ * @returns {Levelup.V2.Auth.Api.Roles.Create.Response}
15
+ * @method POST
16
+ *
17
+ */
18
+ export namespace Create {
19
+ export type Request =
20
+ Levelup.V2.Utils.Api.Request.BuildCreateRequest<Entity.Role>;
21
+ export type Response =
22
+ Utils.Api.Response.BuildSingleItemResponse<Entity.Role>;
23
+ }
24
+
25
+ /**
26
+ * --------------------------------------------------------------------------
27
+ * Update
28
+ * --------------------------------------------------------------------------
29
+ * @link
30
+ * @fires RolesService.Update
31
+ * @param {Levelup.V2.Auth.Api.Roles.Update.Request} query
32
+ * @returns {Levelup.V2.Auth.Api.Roles.Update.Response}
33
+ * @method PUT
34
+ *
35
+ */
36
+ export namespace Update {
37
+ export type Request =
38
+ Levelup.V2.Utils.Api.Request.BuildUpdateRequest<Entity.Role>;
39
+ export type Response =
40
+ Utils.Api.Response.BuildSingleItemResponse<Entity.Role>;
41
+ }
42
+
43
+ /**
44
+ * --------------------------------------------------------------------------
45
+ * Delete
46
+ * --------------------------------------------------------------------------
47
+ * @link
48
+ * @fires RolesService.Delete
49
+ * @param {Levelup.V2.Auth.Api.Roles.Delete.Request} query
50
+ * @returns {Levelup.V2.Auth.Api.Roles.Delete.Response}
51
+ * @method DELETE
52
+ *
53
+ */
54
+ export namespace Delete {
55
+ export type Request = Levelup.V2.Utils.Api.Request.Build<
56
+ Record<string, unknown>
57
+ >;
58
+ export type Response = Utils.Api.Response.DefaultDeleteResponse;
59
+ }
60
+
61
+ /**
62
+ * --------------------------------------------------------------------------
63
+ * Get
64
+ * --------------------------------------------------------------------------
65
+ * @link
66
+ * @fires RolesService.Get
67
+ * @param {Levelup.V2.Auth.Api.Roles.GetOne.Request} query
68
+ * @returns {Levelup.V2.Auth.Api.Roles.GetOne.Response}
69
+ * @method GET
70
+ *
71
+ */
72
+ export namespace GetOne {
73
+ export type GetRoleApScope = "";
74
+
75
+ export type Request = Levelup.V2.Utils.Api.Request.Build<never>;
76
+ export type Response =
77
+ Utils.Api.Response.BuildSingleItemResponse<Entity.Role>;
78
+ }
79
+
80
+ /**
81
+ * --------------------------------------------------------------------------
82
+ * List
83
+ * --------------------------------------------------------------------------
84
+ * @link
85
+ * @fires RolesService.List
86
+ * @param {Levelup.V2.Auth.Api.Roles.List.Request} query
87
+ * @returns {Levelup.V2.Auth.Api.Roles.List.Response}
88
+ * @method GET
89
+ *
90
+ */
91
+ export namespace List {
92
+ export type Scope = "";
93
+
94
+ export type Request =
95
+ Levelup.V2.Utils.Api.Request.BuildSearchablePagedSortableFilterableProjectable<Entity.Role>;
96
+ export type Response =
97
+ Utils.Api.Response.BuildListResponse<Entity.Role>;
98
+ }
99
+
100
+ /**
101
+ * --------------------------------------------------------------------------
102
+ * AggregateUserCount
103
+ * --------------------------------------------------------------------------
104
+ * @link
105
+ * @fires RolesService.AggregateUserCount
106
+ * @param {Levelup.V2.Auth.Api.Roles.AggregateUserCount.Request} query
107
+ * @returns {Levelup.V2.Auth.Api.Roles.AggregateUserCount.Response}
108
+ * @method Get
109
+ *
110
+ */
111
+ export namespace AggregateUserCount {
112
+ export type Request = Levelup.V2.Utils.Api.Request.Build<
113
+ Record<string, unknown>
114
+ >;
115
+ export type Response = Utils.Api.Response.DefaultResponse & {
116
+ data?: {
117
+ [role: string]: number;
118
+ };
119
+ };
120
+ }
121
+
122
+ /**
123
+ * --------------------------------------------------------------------------
124
+ * MergeRoles
125
+ * --------------------------------------------------------------------------
126
+ * @method PUT
127
+ * @link /roles/merge/:source_id/:destination_id
128
+ * @fires RolesService.mergeRoles
129
+ * @param {Levelup.V2.Auth.Api.Roles.MergeRoles.Request} query
130
+ * @returns {Levelup.V2.Auth.Api.Roles.MergeRoles.Response}
131
+ *
132
+ */
133
+ export namespace MergeRoles {
134
+ export type Request = Levelup.V2.Utils.Api.Request.Build<never>;
135
+ export type Response =
136
+ Utils.Api.Response.BuildSingleItemResponse<Entity.Role>;
137
+ }
138
+
139
+ /**
140
+ * --------------------------------------------------------------------------
141
+ * ChangePermissions
142
+ * --------------------------------------------------------------------------
143
+ * @method PUT
144
+ * @link /api/v2/roles/:id/change-permissions
145
+ * @fires RolesService.changePermissions
146
+ * @param {Levelup.V2.Auth.Api.Roles.ChangePermissions.Request} query
147
+ * @returns {Levelup.V2.Auth.Api.Roles.ChangePermissions.Response}
148
+ *
149
+ */
150
+ export namespace ChangePermissions {
151
+ export type Request =
152
+ Levelup.V2.Utils.Api.Request.BuildUpdateRequest<{
153
+ role_id?: Utils.Common.ID;
154
+ permissions: Utils.Common.ID[];
155
+ }>;
156
+ export type Response =
157
+ Utils.Api.Response.BuildSingleItemResponse<Entity.Role>;
158
+ }
159
+
160
+ /**
161
+ * --------------------------------------------------------------------------
162
+ * ListUserPermissions
163
+ * --------------------------------------------------------------------------
164
+ * @method GET
165
+ * @link /api/v2/roles/:id/permissions
166
+ * @fires RolesService.listRolePermissions
167
+ * @param {Levelup.V2.Auth.Api.Roles.ListRolePermissions.Request} query
168
+ * @returns {Levelup.V2.Auth.Api.Roles.ListRolePermissions.Response}
169
+ *
170
+ */
171
+ export namespace ListRolePermissions {
172
+ export type Request = Levelup.V2.Utils.Api.Request.Build<
173
+ Record<string, unknown>
174
+ >;
175
+ export type Response =
176
+ Utils.Api.Response.BuildSingleItemResponse<{
177
+ /**
178
+ * List of permission names
179
+ */
180
+ permissions: {
181
+ _id: Utils.Common.ID;
182
+ group: Utils.Common.ID;
183
+ name: string;
184
+ }[];
185
+ role: Entity.Role;
186
+ }>;
187
+ }
188
+ }
189
+ }
190
+ }
191
+ }
192
+ }
193
+ }
@@ -0,0 +1,33 @@
1
+ declare module Levelup {
2
+ namespace CMS {
3
+ namespace V1 {
4
+ namespace Auth {
5
+ export namespace Api {
6
+ export namespace Tools {
7
+ export namespace InitializeCompanyConfig {
8
+ export interface Request {
9
+ company_id: string;
10
+ }
11
+
12
+ export type Response =
13
+ Utils.Api.Response.BuildSingleItemResponse<{
14
+ company_id: string;
15
+ app: { _id: string; name: string } | null;
16
+ company: { _id: string; name: string } | null;
17
+ permission_group_count: number;
18
+ permission_count: number;
19
+ role_count: number;
20
+ created_permission_groups: number;
21
+ created_permissions: number;
22
+ created_roles: number;
23
+ owner_already_linked: boolean;
24
+ owner: Levelup.V2.Users.Entity.ExposedUser | null;
25
+ error: any;
26
+ }>;
27
+ }
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }