dmart 1.4.40.post5__py3-none-any.whl → 1.4.40.post7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. dmart/cxb/assets/{EntryRenderer-QpjKwgQI.js → EntryRenderer-Dl21Ysgp.js} +1 -1
  2. dmart/cxb/assets/{ListView-Cz-UZmqX.js → ListView-C_wRAfdT.js} +1 -1
  3. dmart/cxb/assets/{_module-CDkgIsM3.js → _module-Bm3T06xS.js} +1 -1
  4. dmart/cxb/assets/{_module-DvU-yewY.js → _module-MiGz5eGu.js} +1 -1
  5. dmart/cxb/assets/{index-CwevVSTS.js → index-BhQ5LUMe.js} +1 -1
  6. dmart/cxb/assets/{index-i_zxDl_u.js → index-CaAQl5Gz.js} +2 -2
  7. dmart/cxb/assets/{index-PIn1toui.js → index-Clz9NEW5.js} +1 -1
  8. dmart/cxb/assets/{index-B7TuVFro.js → index-De7lX1xZ.js} +1 -1
  9. dmart/cxb/assets/{index-PaDjlbgT.js → index-DfVT_WZY.js} +1 -1
  10. dmart/cxb/assets/{index-BeplzYRb.js → index-jNnn2ioU.js} +1 -1
  11. dmart/cxb/index.html +1 -1
  12. dmart/dmart.py +18 -3
  13. dmart/info.json +1 -1
  14. dmart/sample/spaces/applications/.dm/meta.space.json +30 -0
  15. dmart/sample/spaces/applications/api/.dm/meta.folder.json +1 -0
  16. dmart/sample/spaces/applications/api/.dm/query_all_applications/meta.content.json +1 -0
  17. dmart/sample/spaces/applications/api/.dm/test_by_saad/attachments.media/meta.warframe.json +1 -0
  18. dmart/sample/spaces/applications/api/.dm/test_by_saad/attachments.media/warframe.png +0 -0
  19. dmart/sample/spaces/applications/api/.dm/test_by_saad/meta.content.json +1 -0
  20. dmart/sample/spaces/applications/api/.dm/user_profile/meta.content.json +1 -0
  21. dmart/sample/spaces/applications/api/applications/.dm/create_log/meta.content.json +1 -0
  22. dmart/sample/spaces/applications/api/applications/.dm/create_public_logs/meta.content.json +1 -0
  23. dmart/sample/spaces/applications/api/applications/.dm/meta.folder.json +1 -0
  24. dmart/sample/spaces/applications/api/applications/.dm/query_all_translated_data/meta.content.json +1 -0
  25. dmart/sample/spaces/applications/api/applications/.dm/query_logs/meta.content.json +1 -0
  26. dmart/sample/spaces/applications/api/applications/.dm/query_translated_enums/meta.content.json +1 -0
  27. dmart/sample/spaces/applications/api/applications/.dm/query_translated_others/meta.content.json +1 -0
  28. dmart/sample/spaces/applications/api/applications/.dm/query_translated_resolution/meta.content.json +1 -0
  29. dmart/sample/spaces/applications/api/applications/create_log.json +1 -0
  30. dmart/sample/spaces/applications/api/applications/create_public_logs.json +1 -0
  31. dmart/sample/spaces/applications/api/applications/query_all_translated_data.json +1 -0
  32. dmart/sample/spaces/applications/api/applications/query_logs.json +1 -0
  33. dmart/sample/spaces/applications/api/applications/query_translated_enums.json +1 -0
  34. dmart/sample/spaces/applications/api/applications/query_translated_others.json +1 -0
  35. dmart/sample/spaces/applications/api/applications/query_translated_resolution.json +1 -0
  36. dmart/sample/spaces/applications/api/applications.json +1 -0
  37. dmart/sample/spaces/applications/api/management/.dm/create_subaccount/meta.content.json +1 -0
  38. dmart/sample/spaces/applications/api/management/.dm/meta.folder.json +1 -0
  39. dmart/sample/spaces/applications/api/management/.dm/update_password/meta.content.json +1 -0
  40. dmart/sample/spaces/applications/api/management/create_subaccount.json +53 -0
  41. dmart/sample/spaces/applications/api/management/update_password.json +1 -0
  42. dmart/sample/spaces/applications/api/management.json +1 -0
  43. dmart/sample/spaces/applications/api/query_all_applications.json +15 -0
  44. dmart/sample/spaces/applications/api/test_by_saad.json +1 -0
  45. dmart/sample/spaces/applications/api/user/.dm/meta.folder.json +1 -0
  46. dmart/sample/spaces/applications/api/user/.dm/test_by_saad/meta.content.json +1 -0
  47. dmart/sample/spaces/applications/api/user/.dm/user_profile/meta.content.json +1 -0
  48. dmart/sample/spaces/applications/api/user/test_by_saad.json +1 -0
  49. dmart/sample/spaces/applications/api/user/user_profile.json +1 -0
  50. dmart/sample/spaces/applications/api/user_profile.json +1 -0
  51. dmart/sample/spaces/applications/api.json +1 -0
  52. dmart/sample/spaces/applications/collections/.dm/meta.folder.json +19 -0
  53. dmart/sample/spaces/applications/collections.json +1 -0
  54. dmart/sample/spaces/applications/configurations/.dm/meta.folder.json +1 -0
  55. dmart/sample/spaces/applications/configurations/time_out.json +1 -0
  56. dmart/sample/spaces/applications/configurations.json +19 -0
  57. dmart/sample/spaces/applications/errors.json +1 -0
  58. dmart/sample/spaces/applications/logs/.dm/meta.folder.json +1 -0
  59. dmart/sample/spaces/applications/logs.json +1 -0
  60. dmart/sample/spaces/applications/queries/.dm/meta.folder.json +1 -0
  61. dmart/sample/spaces/applications/queries/.dm/order/meta.content.json +1 -0
  62. dmart/sample/spaces/applications/queries/order.json +1 -0
  63. dmart/sample/spaces/applications/queries.json +1 -0
  64. dmart/sample/spaces/applications/schema/.dm/api/meta.schema.json +1 -0
  65. dmart/sample/spaces/applications/schema/.dm/configuration/meta.schema.json +1 -0
  66. dmart/sample/spaces/applications/schema/.dm/error/meta.schema.json +1 -0
  67. dmart/sample/spaces/applications/schema/.dm/log/meta.schema.json +1 -0
  68. dmart/sample/spaces/applications/schema/.dm/meta.folder.json +1 -0
  69. dmart/sample/spaces/applications/schema/.dm/query/meta.schema.json +16 -0
  70. dmart/sample/spaces/applications/schema/.dm/translation/meta.schema.json +1 -0
  71. dmart/sample/spaces/applications/schema/api.json +28 -0
  72. dmart/sample/spaces/applications/schema/configuration.json +1 -0
  73. dmart/sample/spaces/applications/schema/error.json +43 -0
  74. dmart/sample/spaces/applications/schema/log.json +1 -0
  75. dmart/sample/spaces/applications/schema/query.json +118 -0
  76. dmart/sample/spaces/applications/schema/translation.json +26 -0
  77. dmart/sample/spaces/applications/schema.json +1 -0
  78. dmart/sample/spaces/applications/translations/.dm/meta.folder.json +1 -0
  79. dmart/sample/spaces/applications/translations.json +1 -0
  80. dmart/sample/spaces/archive/.dm/meta.space.json +27 -0
  81. dmart/sample/spaces/custom_plugins/dummy/__pycache__/plugin.cpython-314.pyc +0 -0
  82. dmart/sample/spaces/custom_plugins/dummy/config.json +28 -0
  83. dmart/sample/spaces/custom_plugins/dummy/plugin.py +6 -0
  84. dmart/sample/spaces/custom_plugins/missed_entry/config.json +12 -0
  85. dmart/sample/spaces/custom_plugins/missed_entry/plugin.py +119 -0
  86. dmart/sample/spaces/custom_plugins/own_changed_notification/__pycache__/plugin.cpython-314.pyc +0 -0
  87. dmart/sample/spaces/custom_plugins/own_changed_notification/config.json +12 -0
  88. dmart/sample/spaces/custom_plugins/own_changed_notification/plugin.py +65 -0
  89. dmart/sample/spaces/custom_plugins/reports_stats/config.json +14 -0
  90. dmart/sample/spaces/custom_plugins/reports_stats/plugin.py +82 -0
  91. dmart/sample/spaces/custom_plugins/system_notification_sender/config.json +22 -0
  92. dmart/sample/spaces/custom_plugins/system_notification_sender/notification.py +268 -0
  93. dmart/sample/spaces/custom_plugins/system_notification_sender/plugin.py +98 -0
  94. dmart/sample/spaces/management/.dm/events.jsonl +32 -0
  95. dmart/sample/spaces/management/.dm/meta.space.json +48 -0
  96. dmart/sample/spaces/management/.dm/notifications/attachments.view.json/admin.json +36 -0
  97. dmart/sample/spaces/management/.dm/notifications/attachments.view.json/meta.admin.json +1 -0
  98. dmart/sample/spaces/management/.dm/notifications/attachments.view.json/meta.system.json +1 -0
  99. dmart/sample/spaces/management/.dm/notifications/attachments.view.json/system.json +32 -0
  100. dmart/sample/spaces/management/collections/.dm/meta.folder.json +1 -0
  101. dmart/sample/spaces/management/collections.json +1 -0
  102. dmart/sample/spaces/management/groups/.dm/meta.folder.json +1 -0
  103. dmart/sample/spaces/management/groups.json +1 -0
  104. dmart/sample/spaces/management/health_check/.dm/meta.folder.json +1 -0
  105. dmart/sample/spaces/management/health_check.json +1 -0
  106. dmart/sample/spaces/management/notifications/.dm/meta.folder.json +1 -0
  107. dmart/sample/spaces/management/notifications/admin/.dm/meta.folder.json +9 -0
  108. dmart/sample/spaces/management/notifications/system/.dm/meta.folder.json +9 -0
  109. dmart/sample/spaces/management/notifications.json +1 -0
  110. dmart/sample/spaces/management/permissions/.dm/access_applications/meta.permission.json +31 -0
  111. dmart/sample/spaces/management/permissions/.dm/access_applications_world/meta.permission.json +31 -0
  112. dmart/sample/spaces/management/permissions/.dm/access_messages/meta.permission.json +23 -0
  113. dmart/sample/spaces/management/permissions/.dm/access_personal/meta.permission.json +40 -0
  114. dmart/sample/spaces/management/permissions/.dm/access_protected/meta.permission.json +33 -0
  115. dmart/sample/spaces/management/permissions/.dm/access_public/meta.permission.json +24 -0
  116. dmart/sample/spaces/management/permissions/.dm/browse_all_folders/meta.permission.json +23 -0
  117. dmart/sample/spaces/management/permissions/.dm/create_log/meta.permission.json +24 -0
  118. dmart/sample/spaces/management/permissions/.dm/interviewer/meta.permission.json +1 -0
  119. dmart/sample/spaces/management/permissions/.dm/manage_applications/meta.permission.json +1 -0
  120. dmart/sample/spaces/management/permissions/.dm/manage_debug/meta.permission.json +25 -0
  121. dmart/sample/spaces/management/permissions/.dm/manage_spaces/meta.permission.json +24 -0
  122. dmart/sample/spaces/management/permissions/.dm/meta.folder.json +1 -0
  123. dmart/sample/spaces/management/permissions/.dm/rules_management_default/meta.permission.json +32 -0
  124. dmart/sample/spaces/management/permissions/.dm/super_manager/meta.permission.json +52 -0
  125. dmart/sample/spaces/management/permissions/.dm/view_activity_log/meta.permission.json +26 -0
  126. dmart/sample/spaces/management/permissions/.dm/view_collections/meta.permission.json +29 -0
  127. dmart/sample/spaces/management/permissions/.dm/view_logs/meta.permission.json +30 -0
  128. dmart/sample/spaces/management/permissions/.dm/view_roles/meta.permission.json +29 -0
  129. dmart/sample/spaces/management/permissions/.dm/view_users/meta.permission.json +25 -0
  130. dmart/sample/spaces/management/permissions/.dm/view_world/meta.permission.json +31 -0
  131. dmart/sample/spaces/management/permissions/.dm/world/meta.permission.json +35 -0
  132. dmart/sample/spaces/management/permissions.json +1 -0
  133. dmart/sample/spaces/management/requests.json +1 -0
  134. dmart/sample/spaces/management/roles/.dm/dummy/meta.role.json +12 -0
  135. dmart/sample/spaces/management/roles/.dm/logged_in/meta.role.json +18 -0
  136. dmart/sample/spaces/management/roles/.dm/manager/meta.role.json +13 -0
  137. dmart/sample/spaces/management/roles/.dm/meta.folder.json +1 -0
  138. dmart/sample/spaces/management/roles/.dm/moderator/meta.role.json +13 -0
  139. dmart/sample/spaces/management/roles/.dm/super_admin/meta.role.json +14 -0
  140. dmart/sample/spaces/management/roles/.dm/test_role/meta.role.json +13 -0
  141. dmart/sample/spaces/management/roles/.dm/world/meta.role.json +15 -0
  142. dmart/sample/spaces/management/roles.json +1 -0
  143. dmart/sample/spaces/management/schema/.dm/admin_notification_request/attachments.media/meta.ui_schema.json +10 -0
  144. dmart/sample/spaces/management/schema/.dm/admin_notification_request/attachments.media/ui_schema.json +32 -0
  145. dmart/sample/spaces/management/schema/.dm/admin_notification_request/meta.schema.json +1 -0
  146. dmart/sample/spaces/management/schema/.dm/api/meta.schema.json +1 -0
  147. dmart/sample/spaces/management/schema/.dm/folder_rendering/meta.schema.json +1 -0
  148. dmart/sample/spaces/management/schema/.dm/health_check/meta.schema.json +17 -0
  149. dmart/sample/spaces/management/schema/.dm/meta.folder.json +1 -0
  150. dmart/sample/spaces/management/schema/.dm/meta_schema/meta.schema.json +1 -0
  151. dmart/sample/spaces/management/schema/.dm/metafile/meta.schema.json +14 -0
  152. dmart/sample/spaces/management/schema/.dm/notification/meta.schema.json +1 -0
  153. dmart/sample/spaces/management/schema/.dm/system_notification_request/attachments.media/meta.ui_schema.json +10 -0
  154. dmart/sample/spaces/management/schema/.dm/system_notification_request/attachments.media/ui_schema.json +32 -0
  155. dmart/sample/spaces/management/schema/.dm/system_notification_request/meta.schema.json +1 -0
  156. dmart/sample/spaces/management/schema/.dm/view/meta.schema.json +1 -0
  157. dmart/sample/spaces/management/schema/.dm/workflow/meta.schema.json +1 -0
  158. dmart/sample/spaces/management/schema/admin_notification_request.json +89 -0
  159. dmart/sample/spaces/management/schema/api.json +1 -0
  160. dmart/sample/spaces/management/schema/folder_rendering.json +238 -0
  161. dmart/sample/spaces/management/schema/health_check.json +8 -0
  162. dmart/sample/spaces/management/schema/meta_schema.json +74 -0
  163. dmart/sample/spaces/management/schema/metafile.json +153 -0
  164. dmart/sample/spaces/management/schema/notification.json +28 -0
  165. dmart/sample/spaces/management/schema/system_notification_request.json +57 -0
  166. dmart/sample/spaces/management/schema/view.json +23 -0
  167. dmart/sample/spaces/management/schema/workflow.json +87 -0
  168. dmart/sample/spaces/management/schema.json +1 -0
  169. dmart/sample/spaces/management/users/.dm/alibaba/meta.user.json +23 -0
  170. dmart/sample/spaces/management/users/.dm/anonymous/meta.user.json +18 -0
  171. dmart/sample/spaces/management/users/.dm/dmart/meta.user.json +26 -0
  172. dmart/sample/spaces/management/users/.dm/meta.folder.json +14 -0
  173. dmart/sample/spaces/management/workflows/.dm/channel/meta.content.json +1 -0
  174. dmart/sample/spaces/management/workflows/.dm/meta.folder.json +1 -0
  175. dmart/sample/spaces/management/workflows/channel.json +148 -0
  176. dmart/sample/spaces/management/workflows.json +1 -0
  177. dmart/sample/spaces/maqola/.dm/meta.space.json +33 -0
  178. dmart/sample/spaces/personal/.dm/meta.space.json +24 -0
  179. dmart/sample/spaces/personal/people/.dm/meta.folder.json +1 -0
  180. dmart/sample/spaces/personal/people/dmart/.dm/meta.folder.json +1 -0
  181. dmart/sample/spaces/personal/people/dmart/messages/.dm/0b5f7e7f/meta.content.json +1 -0
  182. dmart/sample/spaces/personal/people/dmart/messages/.dm/meta.folder.json +1 -0
  183. dmart/sample/spaces/personal/people/dmart/messages/.dm/mytest/meta.content.json +1 -0
  184. dmart/sample/spaces/personal/people/dmart/messages/0b5f7e7f.json +1 -0
  185. dmart/sample/spaces/personal/people/dmart/messages/mytest.json +1 -0
  186. dmart/sample/spaces/personal/people/dmart/notifications/.dm/meta.folder.json +1 -0
  187. dmart/sample/spaces/personal/people/dmart/private/.dm/inner/meta.content.json +1 -0
  188. dmart/sample/spaces/personal/people/dmart/private/.dm/meta.folder.json +1 -0
  189. dmart/sample/spaces/personal/people/dmart/private/inner.json +1 -0
  190. dmart/sample/spaces/personal/people/dmart/protected/.dm/avatar/meta.content.json +1 -0
  191. dmart/sample/spaces/personal/people/dmart/protected/.dm/meta.folder.json +1 -0
  192. dmart/sample/spaces/personal/people/dmart/protected/avatar.png +0 -0
  193. dmart/sample/spaces/personal/people/dmart/public/.dm/meta.folder.json +1 -0
  194. dmart/sample/test/.gitignore +2 -0
  195. dmart/sample/test/createcontent.json +9 -0
  196. dmart/sample/test/createmedia.json +9 -0
  197. dmart/sample/test/createmedia_entry.json +6 -0
  198. dmart/sample/test/createschema.json +8 -0
  199. dmart/sample/test/createschemawork.json +11 -0
  200. dmart/sample/test/createticket.json +13 -0
  201. dmart/sample/test/data.json +4 -0
  202. dmart/sample/test/deletecontent.json +12 -0
  203. dmart/sample/test/logo.jpeg +0 -0
  204. dmart/sample/test/my.jpg +0 -0
  205. dmart/sample/test/myticket.json +23 -0
  206. dmart/sample/test/resources.csv +12 -0
  207. dmart/sample/test/schema.json +16 -0
  208. dmart/sample/test/temp.json +1 -0
  209. dmart/sample/test/test.dmart +45 -0
  210. dmart/sample/test/ticket_schema.json +23 -0
  211. dmart/sample/test/ticket_workflow.json +85 -0
  212. dmart/sample/test/ticketbody.json +4 -0
  213. dmart/sample/test/ticketcontent.json +14 -0
  214. dmart/sample/test/updatecontent.json +20 -0
  215. dmart/sample/test/workflow_schema.json +68 -0
  216. dmart/set_admin_passwd.py +3 -14
  217. {dmart-1.4.40.post5.dist-info → dmart-1.4.40.post7.dist-info}/METADATA +1 -1
  218. dmart-1.4.40.post7.dist-info/RECORD +489 -0
  219. dmart-1.4.40.post5.dist-info/RECORD +0 -287
  220. {dmart-1.4.40.post5.dist-info → dmart-1.4.40.post7.dist-info}/WHEEL +0 -0
  221. {dmart-1.4.40.post5.dist-info → dmart-1.4.40.post7.dist-info}/entry_points.txt +0 -0
  222. {dmart-1.4.40.post5.dist-info → dmart-1.4.40.post7.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ {"end_point": "/managed/request", "verb": "post", "request_body": {"space_name": "management", "request_type": "update", "records": [{"resource_type": "user", "subpath": "users", "shortname": "bahaa_alla", "attributes": {"old_password": "Test1234", "password": "Test1234"}}]}}
@@ -0,0 +1 @@
1
+ {"shortname_title": "schema", "index_attributes": [{"key": "shortname", "name": "name"}], "allow_create": true, "allow_update": true, "allow_delete": true, "use_media": true, "content_schema_shortnames": ["api"]}
@@ -0,0 +1,15 @@
1
+ {
2
+ "end_point": "/managed/query",
3
+ "verb": "post",
4
+ "request_body": {
5
+ "type": "search",
6
+ "space_name": "applications",
7
+ "subpath": "/",
8
+ "filter_types": [
9
+ "content"
10
+ ],
11
+ "retrieve_json_payload": true,
12
+ "search": "",
13
+ "limit": 100
14
+ }
15
+ }
@@ -0,0 +1 @@
1
+ {"end_point": "/user/profile", "verb": "get"}
@@ -0,0 +1 @@
1
+ {"uuid": "fbf23835-7bc2-4563-a37e-f221e463cdc5", "shortname": "user", "is_active": true, "tags": [], "created_at": "2023-03-15T20:32:09.053064", "updated_at": "2023-03-16T12:51:10.655916", "owner_shortname": "dmart"}
@@ -0,0 +1 @@
1
+ {"uuid": "43e753d4-b366-40c7-ae2b-cef61e74df2c", "shortname": "test_by_saad", "is_active": false, "tags": [], "created_at": "2023-01-15T11:03:05.649580", "updated_at": "2023-01-15T11:03:05.649630", "owner_shortname": "dmart", "payload": {"content_type": "json", "schema_shortname": "api", "body": "test_by_saad.json", "last_validated": "2022-12-30T11:55:39.822513", "validation_status": "valid"}}
@@ -0,0 +1 @@
1
+ {"uuid": "96462d90-9539-4836-9e7b-cd725577c490", "shortname": "user_profile", "is_active": true, "tags": [], "created_at": "2022-11-25T12:04:01.147266", "updated_at": "2022-11-25T15:00:18.533086", "owner_shortname": "dmart", "payload": {"content_type": "json", "schema_shortname": "api", "body": "user_profile.json", "last_validated": "2022-12-30T11:55:39.822513", "validation_status": "valid"}}
@@ -0,0 +1 @@
1
+ {"end_point": "/user/profile", "verb": "get"}
@@ -0,0 +1 @@
1
+ {"end_point": "/user/profile", "verb": "get"}
@@ -0,0 +1 @@
1
+ {"end_point": "/user/profile", "verb": "get"}
@@ -0,0 +1 @@
1
+ {"shortname_title": "API Name", "content_schema_shortnames": ["api"], "content_resource_types": ["content"], "index_attributes": [{"key": "shortname", "name": "name"}, {"key": "subpath", "name": "Sub path"}, {"key": "end_point", "name": "End point"}, {"key": "verb", "name": "Verb"}], "icon_closed": "", "icon_opened": "", "icon": "", "filter": [], "allow_create": true, "expand_children": true, "allow_update": true, "allow_delete": true, "use_media": false, "allow_csv": true, "append_subpath": "", "allow_view": true}
@@ -0,0 +1,19 @@
1
+ {
2
+ "uuid": "c23ba9d2-ae6a-4050-9f76-006ce63b0cdc",
3
+ "shortname": "collections",
4
+ "is_active": true,
5
+ "displayname": {
6
+ "en": "Collections",
7
+ "ar": "\u062a\u0634\u0643\u064a\u0644\u0627\u062a",
8
+ "ku": "collections"
9
+ },
10
+ "tags": [],
11
+ "created_at": "2022-10-31T10:39:12.459572",
12
+ "updated_at": "2023-08-17T03:57:47.026574",
13
+ "owner_shortname": "dmart",
14
+ "payload": {
15
+ "content_type": "json",
16
+ "schema_shortname": "folder_rendering",
17
+ "body": "collections.json"
18
+ }
19
+ }
@@ -0,0 +1 @@
1
+ {"shortname_title": "collections", "index_attributes": [{"key": "shortname", "name": "id"}, {"key": "schema_shortname", "name": "type"}, {"key": "displayname", "name": "name"}], "allow_create": false, "allow_update": false, "allow_delete": false, "use_media": false, "content_schema_shortnames": [], "expand_children": true, "icon": "BSICons508", "filter": [], "allow_view": true}
@@ -0,0 +1 @@
1
+ {"uuid": "5c7aabf8-2454-4446-a701-9ddd20d222d6", "shortname": "configurations", "is_active": true, "tags": [], "created_at": "2023-02-27T15:13:07.854234", "updated_at": "2023-02-28T12:59:45.664889", "owner_shortname": "dmart", "payload": {"content_type": "json", "schema_shortname": "folder_rendering", "body": "configurations.json", "last_validated": "2023-05-04T22:55:48.527192", "validation_status": "valid"}}
@@ -0,0 +1 @@
1
+ {"items": [{"key": "time_out", "value": ["less than 1 min"]}]}
@@ -0,0 +1,19 @@
1
+ {
2
+ "shortname_title": "configurations",
3
+ "index_attributes": [
4
+ {
5
+ "key": "shortname",
6
+ "name": "name"
7
+ }
8
+ ],
9
+ "allow_create": true,
10
+ "allow_update": true,
11
+ "allow_delete": true,
12
+ "use_media": true,
13
+ "content_schema_shortnames": [
14
+ "configuration"
15
+ ],
16
+ "content_resource_types": [
17
+ "content"
18
+ ]
19
+ }
@@ -0,0 +1 @@
1
+ {"shortname_title": "errors", "index_attributes": [{"key": "shortname", "name": "name"}], "allow_create": true, "allow_update": true, "allow_delete": true, "use_media": true, "content_schema_shortnames": ["error"]}
@@ -0,0 +1 @@
1
+ {"uuid": "97908d66-7a34-4058-b4fe-3a052a1ff38a", "shortname": "logs", "is_active": true, "displayname": {"en": "Logs"}, "tags": [], "created_at": "2022-11-17T13:35:52.537017", "updated_at": "2023-04-09T14:14:31.976150", "owner_shortname": "dmart"}
@@ -0,0 +1 @@
1
+ {"shortname_title": "API Name", "content_schema_shortnames": ["log"], "content_resource_types": ["content"], "index_attributes": [{"key": "shortname", "name": "name"}, {"key": "language", "name": "language"}, {"key": "environment", "name": "environment"}], "icon_closed": "", "icon_opened": "", "icon": "", "filter": [], "allow_create": true, "expand_children": false, "allow_update": true, "allow_delete": true, "use_media": false, "allow_csv": false, "append_subpath": "", "allow_view": true}
@@ -0,0 +1 @@
1
+ {"uuid": "c8725e1c-14b0-4d95-acd7-9d1bf729b11e", "shortname": "queries", "is_active": true, "tags": [], "created_at": "2023-01-19T16:30:20.845395", "updated_at": "2023-01-23T13:20:15.395569", "owner_shortname": "dmart", "payload": {"content_type": "json", "schema_shortname": "folder_rendering", "body": "queries.json"}}
@@ -0,0 +1 @@
1
+ {"uuid": "60b902b7-0573-45d6-b8c5-7e12bbc896a6", "shortname": "order", "is_active": true, "tags": [], "created_at": "2023-01-23T13:29:32.107531", "updated_at": "2023-01-23T13:29:32.107585", "owner_shortname": "dmart", "payload": {"content_type": "json", "schema_shortname": "query", "body": "order.json", "last_validated": "2023-01-24T09:55:07.030051", "validation_status": "valid"}}
@@ -0,0 +1 @@
1
+ {"filter_types": ["ticket"], "filter_schema_names": ["order"], "limit": 10, "offset": 0, "retrieve_json_payload": true, "search": "", "space_name": "ordering", "query_subpath": "/orders", "type": "search", "sort_by": "updated_at", "sort_type": "descending"}
@@ -0,0 +1 @@
1
+ {"shortname_title": "saved_queries", "index_attributes": [{"key": "shortname", "name": "name"}], "allow_create": true, "allow_update": true, "allow_delete": true, "use_media": true, "content_schema_shortnames": ["query"], "filter": []}
@@ -0,0 +1 @@
1
+ {"uuid": "c74f1c9b-49c9-49ee-9b3b-9f25d2ed074c", "shortname": "api", "is_active": true, "tags": [], "created_at": "2022-10-11T12:24:41.901359", "updated_at": "2022-10-11T12:24:41.901364", "owner_shortname": "dmart", "payload": {"content_type": "json", "schema_shortname": "meta_schema", "checksum": "9688f8258a7a476c4c0a32f1062362557f6f13a1", "body": "api.json", "last_validated": "2022-12-30T11:55:39.691929", "validation_status": "valid"}}
@@ -0,0 +1 @@
1
+ {"uuid": "83b67abd-9042-4947-854f-33adbe6a78ed", "shortname": "configuration", "is_active": false, "tags": [], "created_at": "2023-02-28T12:11:31.751374", "updated_at": "2023-02-28T12:11:31.751390", "owner_shortname": "dmart", "payload": {"content_type": "json", "schema_shortname": "meta_schema", "body": "configuration.json"}}
@@ -0,0 +1 @@
1
+ {"uuid": "14b9e8f6-54b0-4874-8d30-17366e6a2cdf", "shortname": "error", "is_active": false, "tags": [], "created_at": "2023-03-12T11:53:12.870469", "updated_at": "2023-03-12T11:53:12.870483", "owner_shortname": "dmart", "payload": {"content_type": "json", "schema_shortname": "meta_schema", "body": "error.json"}}
@@ -0,0 +1 @@
1
+ {"uuid": "424113a3-5533-4688-9343-bc17719f78c1", "shortname": "log", "is_active": true, "tags": [], "created_at": "2023-02-27T16:02:03.505370", "updated_at": "2023-07-27T11:39:41.976184", "owner_shortname": "dmart", "payload": {"content_type": "json", "schema_shortname": "meta_schema", "body": "log.json"}}
@@ -0,0 +1 @@
1
+ {"uuid": "3e138cd7-17e2-4d82-b18f-20d071ae2ac6", "shortname": "schema", "is_active": true, "tags": [], "created_at": "2023-02-27T15:14:28.883942", "updated_at": "2023-02-27T16:33:05.829163", "owner_shortname": "dmart", "payload": {"content_type": "json", "schema_shortname": "folder_rendering", "body": "schema.json"}}
@@ -0,0 +1,16 @@
1
+ {
2
+ "uuid": "1be17d0d-2eb0-41e4-8565-6a606257d28c",
3
+ "shortname": "query",
4
+ "is_active": true,
5
+ "tags": [],
6
+ "created_at": "2023-01-22T14:05:57.742434",
7
+ "updated_at": "2023-01-22T14:05:57.742441",
8
+ "owner_shortname": "dmart",
9
+ "payload": {
10
+ "content_type": "json",
11
+ "schema_shortname": "meta_schema",
12
+ "body": "query.json",
13
+ "last_validated": "2022-12-30T12:11:32.546522",
14
+ "validation_status": "valid"
15
+ }
16
+ }
@@ -0,0 +1 @@
1
+ {"uuid": "44b16498-d3dd-4751-b459-e2e83c53f50f", "shortname": "translation", "is_active": true, "tags": [], "created_at": "2023-02-28T07:44:52.226274", "updated_at": "2023-02-28T07:45:25.727270", "owner_shortname": "dmart", "payload": {"content_type": "json", "body": "translation.json"}}
@@ -0,0 +1,28 @@
1
+ {
2
+ "title": "Api Schema",
3
+ "description": "Api debug schema",
4
+ "type": "object",
5
+ "additionalProperties": true,
6
+ "properties": {
7
+ "end_point": {
8
+ "title": "end_point",
9
+ "description": "The api base url",
10
+ "type": "string"
11
+ },
12
+ "verb": {
13
+ "title": "verb",
14
+ "description": "The Api http verb",
15
+ "type": "string",
16
+ "enum": ["post", "get", "patch", "delete","put"]
17
+ },
18
+ "request_body": {
19
+ "title": "request_body",
20
+ "description" : "JSON request body",
21
+ "type": "object"
22
+ }
23
+ },
24
+ "required": [
25
+ "end_point",
26
+ "verb"
27
+ ]
28
+ }
@@ -0,0 +1 @@
1
+ {"type": "object", "title": "title", "properties": {"items": {"type": "array", "items": {"type": "object", "properties": {"key": {"type": "string"}, "value": {"type": ["object", "string","boolean","number", "array"]}}}}}}
@@ -0,0 +1,43 @@
1
+ {
2
+ "type": "object",
3
+ "title": "title",
4
+ "properties": {
5
+ "errors": {
6
+ "type": "array",
7
+ "items": {
8
+ "type": "object",
9
+ "properties": {
10
+ "code": {
11
+ "type": "integer"
12
+ },
13
+ "type": {
14
+ "type": "string"
15
+ },
16
+ "key": {
17
+ "type": "string"
18
+ },
19
+ "ar": {
20
+ "type": "string"
21
+ },
22
+ "en": {
23
+ "type": "string"
24
+ },
25
+ "ku": {
26
+ "type": "string"
27
+ }
28
+ },
29
+ "required": [
30
+ "code",
31
+ "type",
32
+ "key",
33
+ "ar",
34
+ "en",
35
+ "ku"
36
+ ]
37
+ }
38
+ }
39
+ },
40
+ "required": [
41
+ "errors"
42
+ ]
43
+ }
@@ -0,0 +1 @@
1
+ {"type": "object", "title": "log", "properties": {"version": {"type": "string", "description": "", "title": ""}, "language": {"type": "string", "description": "", "title": ""}, "environment": {"type": "string", "enum": ["android", "ios", "web"], "description": "", "title": ""}, "attributes": {"type": "object", "properties": {}, "description": "", "title": ""}, "error": {"type": "object", "properties": {}, "description": "", "title": ""}, "context": {"type": "object", "properties": {}, "required": [], "description": "", "title": ""}, "user_agent": {"type": "string", "description": "", "title": ""}, "ip_address": {"type": "string", "description": "", "title": ""}, "request": {"type": "object", "properties": {"headers": {"type": "object", "properties": {}, "description": "", "title": ""}, "body": {"type": "object", "properties": {}, "description": "", "title": ""}}, "required": [], "description": "", "title": ""}, "response": {"type": "object", "properties": {"headers": {"type": "object", "properties": {}, "description": "", "title": ""}, "body": {"type": "object", "properties": {}, "description": "", "title": ""}}, "required": [], "description": "", "title": ""}}, "required": [], "description": ""}
@@ -0,0 +1,118 @@
1
+ {
2
+ "title": "Report",
3
+ "type": "object",
4
+ "required": [],
5
+ "properties": {
6
+ "type": {
7
+ "title": "Query Type",
8
+ "type": "string",
9
+ "default": "search"
10
+ },
11
+ "space_name": {
12
+ "title": "Space Name",
13
+ "type": "string",
14
+ "default": "aftersales"
15
+ },
16
+ "query_subpath": {
17
+ "title": "Subpath",
18
+ "type": "string"
19
+ },
20
+ "filter_schema_names": {
21
+ "title": "Filter Schema Names",
22
+ "type": "array",
23
+ "items": {
24
+ "type": "string"
25
+ }
26
+ },
27
+ "filter_shortnames": {
28
+ "title": "Filter Shortnames",
29
+ "type": "array",
30
+ "items": {
31
+ "type": "string"
32
+ }
33
+ },
34
+ "filter_types": {
35
+ "title": "Filter Resource Type",
36
+ "type": "array",
37
+ "items": {
38
+ "type": "string",
39
+ "enum": [
40
+ "user",
41
+ "group",
42
+ "folder",
43
+ "schema",
44
+ "content",
45
+ "acl",
46
+ "comment",
47
+ "media",
48
+ "locator",
49
+ "relationship",
50
+ "alteration",
51
+ "history",
52
+ "space",
53
+ "permission",
54
+ "role",
55
+ "ticket",
56
+ "plugin_wrapper"
57
+ ]
58
+ }
59
+ },
60
+ "filter_tags": {
61
+ "title": "Filter Tags",
62
+ "type": "array",
63
+ "items": {
64
+ "type": "string"
65
+ }
66
+ },
67
+ "exclude_fields": {
68
+ "title": "Exclude Fields",
69
+ "type": "array",
70
+ "items": {
71
+ "type": "string"
72
+ }
73
+ },
74
+ "include_fields": {
75
+ "title": "Include Fields",
76
+ "type": "array",
77
+ "items": {
78
+ "type": "string"
79
+ }
80
+ },
81
+ "search": {
82
+ "title": "Redis Search String",
83
+ "type": "string"
84
+ },
85
+ "highlight_fields": {
86
+ "title": "Highlight Fields",
87
+ "type": "object",
88
+ "properties": {}
89
+ },
90
+ "offset": {
91
+ "title": "Offset",
92
+ "type": "integer"
93
+ },
94
+ "limit": {
95
+ "title": "Limit",
96
+ "type": "integer"
97
+ },
98
+ "retrieve_json_payload": {
99
+ "type": "boolean"
100
+ },
101
+ "retrieve_attachments": {
102
+ "type": "boolean",
103
+ "title": "Retrieve Attachments"
104
+ },
105
+ "sort_by": {
106
+ "title": "Sort By",
107
+ "type": "string"
108
+ },
109
+ "sort_type": {
110
+ "title": "Sort Type",
111
+ "type": "string",
112
+ "enum": [
113
+ "ascending",
114
+ "descending"
115
+ ]
116
+ }
117
+ }
118
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "type": "object",
3
+ "title": "title",
4
+ "properties": {
5
+ "items": {
6
+ "type": "array",
7
+ "items": {
8
+ "type": "object",
9
+ "properties": {
10
+ "key": {
11
+ "type": "string"
12
+ },
13
+ "en": {
14
+ "type": "string"
15
+ },
16
+ "ar": {
17
+ "type": "string"
18
+ },
19
+ "ku": {
20
+ "type": "string"
21
+ }
22
+ }
23
+ }
24
+ }
25
+ }
26
+ }
@@ -0,0 +1 @@
1
+ {"shortname_title": "schema", "index_attributes": [{"key": "shortname", "name": "name"}], "allow_create": true, "allow_update": true, "allow_delete": true, "use_media": true, "content_resource_types": ["schema"]}
@@ -0,0 +1 @@
1
+ {"uuid": "120ebe81-d5c4-49c5-8051-02049229a6e2", "shortname": "translations", "is_active": true, "tags": [], "created_at": "2023-02-27T15:11:30.204623", "updated_at": "2023-03-18T14:21:11.514700", "owner_shortname": "dmart", "payload": {"content_type": "json", "schema_shortname": "folder_rendering", "body": "translations.json"}}
@@ -0,0 +1 @@
1
+ {"shortname_title": "translations", "index_attributes": [{"key": "shortname", "name": "name"}], "allow_create": true, "allow_update": true, "allow_delete": true, "use_media": true, "content_schema_shortnames": ["translation", "error"], "content_resource_types": ["content"], "filter": [], "expand_children": true, "allow_view": true}
@@ -0,0 +1,27 @@
1
+ {
2
+ "uuid": "4a001e1f-a844-4bb9-a340-7f8eb1a77480",
3
+ "shortname": "archive",
4
+ "is_active": true,
5
+ "displayname": {
6
+ "en": "archive"
7
+ },
8
+ "tags": [],
9
+ "created_at": "2024-09-02T12:55:00.899747",
10
+ "updated_at": "2024-09-02T12:55:00.906988",
11
+ "owner_shortname": "dmart",
12
+ "root_registration_signature": "",
13
+ "primary_website": "",
14
+ "indexing_enabled": false,
15
+ "capture_misses": false,
16
+ "check_health": false,
17
+ "languages": [
18
+ "english"
19
+ ],
20
+ "icon": "",
21
+ "mirrors": [],
22
+ "hide_folders": [],
23
+ "hide_space": true,
24
+ "active_plugins": [
25
+ ],
26
+ "ordinal": 1
27
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "shortname": "dummy",
3
+ "is_active": true,
4
+ "filters": {
5
+ "subpaths": [
6
+ "__ALL__"
7
+ ],
8
+ "resource_types": [
9
+ "__ALL__"
10
+ ],
11
+ "schema_shortnames": [
12
+ "__ALL__"
13
+ ],
14
+ "actions": [
15
+ "query",
16
+ "view",
17
+ "update",
18
+ "create",
19
+ "delete",
20
+ "move",
21
+ "progress_ticket",
22
+ "lock",
23
+ "unlock"
24
+ ]
25
+ },
26
+ "type": "hook",
27
+ "listen_time": "after"
28
+ }
@@ -0,0 +1,6 @@
1
+ from models.core import PluginBase, Event
2
+
3
+
4
+ class Plugin(PluginBase):
5
+ async def hook(self, data: Event):
6
+ print(f"Reached to the dummy custom plugin, data recieved: {data}")
@@ -0,0 +1,12 @@
1
+ {
2
+ "shortname": "missed",
3
+ "is_active": false,
4
+ "filters": {
5
+ "subpaths": ["__ALL__"],
6
+ "resource_types": ["__ALL__"],
7
+ "schema_shortnames": ["__ALL__"],
8
+ "actions": ["view", "query"]
9
+ },
10
+ "type": "hook",
11
+ "listen_time": "before"
12
+ }
@@ -0,0 +1,119 @@
1
+ import json
2
+ import sys
3
+ import aiofiles
4
+ from models.core import ActionType, PluginBase, Event, Space
5
+ from utils.helpers import camel_case
6
+ from utils.redis_services import RedisServices
7
+ from utils.spaces import get_spaces
8
+ from data_adapters.adapter import data_adapter as db
9
+ from models import core
10
+ from models.enums import ContentType, ResourceType
11
+ from utils.settings import settings
12
+ from fastapi.logger import logger
13
+
14
+ class Plugin(PluginBase):
15
+
16
+ def __init__(self) -> None:
17
+ pass
18
+
19
+
20
+ async def hook(self, data: Event):
21
+
22
+ # Type narrowing for PyRight
23
+ if not isinstance(data.shortname, str) and not isinstance(data.attributes, dict):
24
+ logger.error(f"invalid data at missed_entry")
25
+ return
26
+
27
+ spaces = await get_spaces()
28
+ if not Space.parse_raw(spaces[data.space_name]).capture_misses:
29
+ return
30
+
31
+ if data.action_type == ActionType.query and "filter_shortnames" in data.attributes:
32
+ for shortname in data.attributes["filter_shortnames"]:
33
+ data.shortname = shortname
34
+ data.resource_type = data.resource_type or ResourceType.content
35
+ await self.check_miss(data)
36
+
37
+ else:
38
+ await self.check_miss(data)
39
+
40
+
41
+
42
+ async def check_miss(self, data: Event):
43
+ # Type narrowing for PyRight
44
+ if not isinstance(data.shortname, str):
45
+ logger.error(f"data.shortname is None and str is required at missed_entry")
46
+ return
47
+
48
+ class_type = getattr(
49
+ sys.modules["models.core"], camel_case(core.ResourceType(data.resource_type))
50
+ )
51
+ path, filename = db.metapath(data.space_name, data.subpath, data.shortname, class_type)
52
+ if (path/filename).is_file():
53
+ return
54
+
55
+ if data.subpath[0] == "/":
56
+ data.subpath = data.subpath.replace("/", "", 1)
57
+
58
+ miss_shortname = f"{data.subpath}_{data.shortname}"
59
+ if len(miss_shortname) > 32:
60
+ miss_shortname = miss_shortname[:32]
61
+
62
+ miss_file = (
63
+ settings.spaces_folder /
64
+ data.space_name /
65
+ f"misses/{miss_shortname}.json"
66
+ )
67
+ miss_content = None
68
+ if miss_file.is_file():
69
+ async with aiofiles.open(miss_file, "r") as file:
70
+ miss_content = json.loads(await file.read())
71
+
72
+ missed_obj_meta = core.Content(
73
+ shortname=miss_shortname,
74
+ owner_shortname=data.user_shortname,
75
+ is_active=True,
76
+ payload=core.Payload(
77
+ content_type=ContentType.json,
78
+ schema_shortname="miss",
79
+ body=miss_shortname + ".json",
80
+ ),
81
+ )
82
+ async with RedisServices() as redis_services:
83
+ meta_doc_id, meta_json = redis_services.prepate_meta_doc(
84
+ data.space_name, "misses", missed_obj_meta
85
+ )
86
+ if not miss_content:
87
+ await db.save(data.space_name, "misses", missed_obj_meta)
88
+ await redis_services.save_doc(meta_doc_id, meta_json)
89
+ num_of_requests = 1
90
+
91
+ else:
92
+ num_of_requests = miss_content["num_of_requests"] + 1
93
+
94
+ await db.save_payload_from_json(
95
+ data.space_name,
96
+ "misses",
97
+ missed_obj_meta,
98
+ {
99
+ "requested_subpath": data.subpath,
100
+ "requested_shortname": data.shortname,
101
+ "num_of_requests": num_of_requests,
102
+ "actioned": "No",
103
+ },
104
+ )
105
+ payload_dict = {
106
+ **meta_json,
107
+ "requested_subpath": data.subpath,
108
+ "requested_shortname": data.shortname,
109
+ "num_of_requests": num_of_requests,
110
+ "actioned": "No"
111
+
112
+ }
113
+ await redis_services.save_payload_doc(
114
+ space_name=data.space_name,
115
+ subpath="misses",
116
+ meta=missed_obj_meta,
117
+ payload=payload_dict,
118
+ resource_type=ResourceType.content
119
+ )
@@ -0,0 +1,12 @@
1
+ {
2
+ "shortname": "own_changed_notification",
3
+ "is_active": true,
4
+ "filters": {
5
+ "subpaths": ["__ALL__"],
6
+ "resource_types": ["__ALL__"],
7
+ "schema_shortnames": ["__ALL__"],
8
+ "actions": ["update", "delete"]
9
+ },
10
+ "type": "hook",
11
+ "listen_time": "after"
12
+ }