@api-client/core 0.8.22 → 0.9.1

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 (207) hide show
  1. package/build/browser.d.ts +12 -5
  2. package/build/browser.js +2 -3
  3. package/build/browser.js.map +1 -1
  4. package/build/index.d.ts +12 -5
  5. package/build/index.js +2 -4
  6. package/build/index.js.map +1 -1
  7. package/build/src/events/BaseEvents.d.ts +137 -18
  8. package/build/src/events/BaseEvents.js.map +1 -1
  9. package/build/src/events/EventTypes.d.ts +0 -14
  10. package/build/src/events/EventTypes.js +0 -2
  11. package/build/src/events/EventTypes.js.map +1 -1
  12. package/build/src/events/Events.d.ts +1 -5
  13. package/build/src/events/Events.js +0 -2
  14. package/build/src/events/Events.js.map +1 -1
  15. package/build/src/events/transport/TransportEventTypes.d.ts +0 -1
  16. package/build/src/events/transport/TransportEventTypes.js +0 -1
  17. package/build/src/events/transport/TransportEventTypes.js.map +1 -1
  18. package/build/src/events/transport/TransportEvents.d.ts +0 -8
  19. package/build/src/events/transport/TransportEvents.js +0 -11
  20. package/build/src/events/transport/TransportEvents.js.map +1 -1
  21. package/build/src/mocking/ProjectMock.d.ts +0 -3
  22. package/build/src/mocking/ProjectMock.js +0 -3
  23. package/build/src/mocking/ProjectMock.js.map +1 -1
  24. package/build/src/mocking/lib/History.js +5 -0
  25. package/build/src/mocking/lib/History.js.map +1 -1
  26. package/build/src/models/{Workspace.d.ts → Folder.d.ts} +7 -7
  27. package/build/src/models/{Workspace.js → Folder.js} +5 -5
  28. package/build/src/models/Folder.js.map +1 -0
  29. package/build/src/models/HttpHistory.d.ts +38 -43
  30. package/build/src/models/HttpHistory.js +27 -34
  31. package/build/src/models/HttpHistory.js.map +1 -1
  32. package/build/src/models/HttpProject.d.ts +0 -2
  33. package/build/src/models/HttpProject.js +0 -27
  34. package/build/src/models/HttpProject.js.map +1 -1
  35. package/build/src/models/Project.d.ts +0 -8
  36. package/build/src/models/Project.js +0 -4
  37. package/build/src/models/Project.js.map +1 -1
  38. package/build/src/models/ProjectFolder.d.ts +0 -2
  39. package/build/src/models/ProjectFolder.js +0 -14
  40. package/build/src/models/ProjectFolder.js.map +1 -1
  41. package/build/src/models/ProjectItem.d.ts +0 -2
  42. package/build/src/models/ProjectItem.js +0 -20
  43. package/build/src/models/ProjectItem.js.map +1 -1
  44. package/build/src/models/ProjectRequest.d.ts +2 -3
  45. package/build/src/models/ProjectRequest.js.map +1 -1
  46. package/build/src/models/RequestConfig.d.ts +1 -1
  47. package/build/src/models/Space.d.ts +25 -0
  48. package/build/src/models/Space.js +76 -0
  49. package/build/src/models/Space.js.map +1 -0
  50. package/build/src/models/TrashEntry.d.ts +27 -0
  51. package/build/src/models/TrashEntry.js +2 -0
  52. package/build/src/models/TrashEntry.js.map +1 -0
  53. package/build/src/models/store/Backend.d.ts +0 -315
  54. package/build/src/models/store/Backend.js +0 -1
  55. package/build/src/models/store/Backend.js.map +1 -1
  56. package/build/src/models/store/File.d.ts +31 -1
  57. package/build/src/models/store/File.js +6 -6
  58. package/build/src/models/store/File.js.map +1 -1
  59. package/build/src/proxy/HttpProjectProxy.d.ts +4 -0
  60. package/build/src/proxy/HttpProjectProxy.js +10 -2
  61. package/build/src/proxy/HttpProjectProxy.js.map +1 -1
  62. package/build/src/proxy/ProxyService.d.ts +0 -10
  63. package/build/src/proxy/ProxyService.js +0 -14
  64. package/build/src/proxy/ProxyService.js.map +1 -1
  65. package/build/src/runtime/node/InteropInterfaces.d.ts +1 -2
  66. package/build/src/runtime/node/ProjectParallelRunner.d.ts +2 -3
  67. package/build/src/runtime/node/ProjectParallelRunner.js.map +1 -1
  68. package/build/src/runtime/node/ProjectRequestRunner.d.ts +7 -8
  69. package/build/src/runtime/node/ProjectRequestRunner.js +2 -3
  70. package/build/src/runtime/node/ProjectRequestRunner.js.map +1 -1
  71. package/build/src/runtime/node/ProjectRunner.d.ts +3 -4
  72. package/build/src/runtime/node/ProjectRunner.js.map +1 -1
  73. package/build/src/runtime/node/ProjectRunnerWorker.js +0 -4
  74. package/build/src/runtime/node/ProjectRunnerWorker.js.map +1 -1
  75. package/build/src/runtime/store/CertificatesSdk.d.ts +46 -0
  76. package/build/src/runtime/store/CertificatesSdk.js +227 -0
  77. package/build/src/runtime/store/CertificatesSdk.js.map +1 -0
  78. package/build/src/runtime/store/FilesSdk.d.ts +21 -16
  79. package/build/src/runtime/store/FilesSdk.js +75 -23
  80. package/build/src/runtime/store/FilesSdk.js.map +1 -1
  81. package/build/src/runtime/store/HistorySdk.d.ts +11 -8
  82. package/build/src/runtime/store/HistorySdk.js +140 -17
  83. package/build/src/runtime/store/HistorySdk.js.map +1 -1
  84. package/build/src/runtime/store/RevisionsSdk.d.ts +12 -0
  85. package/build/src/runtime/store/RevisionsSdk.js +43 -0
  86. package/build/src/runtime/store/RevisionsSdk.js.map +1 -0
  87. package/build/src/runtime/store/RouteBuilder.d.ts +16 -18
  88. package/build/src/runtime/store/RouteBuilder.js +33 -60
  89. package/build/src/runtime/store/RouteBuilder.js.map +1 -1
  90. package/build/src/runtime/store/Sdk.d.ts +10 -7
  91. package/build/src/runtime/store/Sdk.js +12 -5
  92. package/build/src/runtime/store/Sdk.js.map +1 -1
  93. package/build/src/runtime/store/SdkBase.js.map +1 -1
  94. package/build/src/runtime/store/SharedSdk.d.ts +2 -2
  95. package/build/src/runtime/store/SharedSdk.js.map +1 -1
  96. package/build/src/runtime/store/SpacesSdk.d.ts +29 -0
  97. package/build/src/runtime/store/SpacesSdk.js +135 -0
  98. package/build/src/runtime/store/SpacesSdk.js.map +1 -0
  99. package/build/src/runtime/store/TrashSdk.d.ts +35 -0
  100. package/build/src/runtime/store/TrashSdk.js +155 -0
  101. package/build/src/runtime/store/TrashSdk.js.map +1 -0
  102. package/build/src/runtime/store/UsersSdk.d.ts +2 -2
  103. package/build/src/runtime/store/UsersSdk.js.map +1 -1
  104. package/build/src/runtime/store/interfaces/ApiClientStore.d.ts +30 -0
  105. package/build/src/runtime/store/interfaces/ApiClientStore.js +2 -0
  106. package/build/src/runtime/store/interfaces/ApiClientStore.js.map +1 -0
  107. package/build/src/runtime/store/interfaces/Certificates.d.ts +49 -0
  108. package/build/src/runtime/store/interfaces/Certificates.js +2 -0
  109. package/build/src/runtime/store/interfaces/Certificates.js.map +1 -0
  110. package/build/src/runtime/store/interfaces/Files.d.ts +63 -0
  111. package/build/src/runtime/store/interfaces/Files.js +2 -0
  112. package/build/src/runtime/store/interfaces/Files.js.map +1 -0
  113. package/build/src/runtime/store/interfaces/History.d.ts +63 -0
  114. package/build/src/runtime/store/interfaces/History.js +2 -0
  115. package/build/src/runtime/store/interfaces/History.js.map +1 -0
  116. package/build/src/runtime/store/interfaces/Media.d.ts +42 -0
  117. package/build/src/runtime/store/interfaces/Media.js +2 -0
  118. package/build/src/runtime/store/interfaces/Media.js.map +1 -0
  119. package/build/src/runtime/store/interfaces/Revisions.d.ts +25 -0
  120. package/build/src/runtime/store/interfaces/Revisions.js +2 -0
  121. package/build/src/runtime/store/interfaces/Revisions.js.map +1 -0
  122. package/build/src/runtime/store/interfaces/Spaces.d.ts +42 -0
  123. package/build/src/runtime/store/interfaces/Spaces.js +2 -0
  124. package/build/src/runtime/store/interfaces/Spaces.js.map +1 -0
  125. package/build/src/runtime/store/interfaces/Trash.d.ts +38 -0
  126. package/build/src/runtime/store/interfaces/Trash.js +2 -0
  127. package/build/src/runtime/store/interfaces/Trash.js.map +1 -0
  128. package/package.json +1 -1
  129. package/src/events/BaseEvents.ts +148 -18
  130. package/src/events/EventTypes.ts +0 -2
  131. package/src/events/Events.ts +0 -2
  132. package/src/events/transport/TransportEventTypes.ts +0 -1
  133. package/src/events/transport/TransportEvents.ts +0 -13
  134. package/src/mocking/ProjectMock.ts +0 -4
  135. package/src/mocking/lib/History.ts +5 -0
  136. package/src/models/{Workspace.ts → Folder.ts} +12 -12
  137. package/src/models/HttpHistory.ts +53 -63
  138. package/src/models/HttpProject.ts +0 -29
  139. package/src/models/Project.ts +0 -8
  140. package/src/models/ProjectFolder.ts +0 -16
  141. package/src/models/ProjectItem.ts +0 -18
  142. package/src/models/ProjectRequest.ts +3 -4
  143. package/src/models/RequestConfig.ts +1 -1
  144. package/src/models/Space.ts +91 -0
  145. package/src/models/TrashEntry.ts +29 -0
  146. package/src/models/store/Backend.ts +0 -342
  147. package/src/models/store/File.ts +39 -6
  148. package/src/proxy/HttpProjectProxy.ts +14 -2
  149. package/src/proxy/ProxyService.ts +0 -15
  150. package/src/proxy/readme.md +0 -1
  151. package/src/runtime/node/InteropInterfaces.ts +1 -2
  152. package/src/runtime/node/ProjectParallelRunner.ts +2 -3
  153. package/src/runtime/node/ProjectRequestRunner.ts +13 -14
  154. package/src/runtime/node/ProjectRunner.ts +3 -4
  155. package/src/runtime/node/ProjectRunnerWorker.ts +1 -4
  156. package/src/runtime/store/CertificatesSdk.ts +231 -0
  157. package/src/runtime/store/FilesSdk.ts +88 -35
  158. package/src/runtime/store/HistorySdk.ts +145 -33
  159. package/src/runtime/store/RevisionsSdk.ts +44 -0
  160. package/src/runtime/store/RouteBuilder.ts +37 -69
  161. package/src/runtime/store/Sdk.ts +17 -7
  162. package/src/runtime/store/SdkBase.ts +1 -1
  163. package/src/runtime/store/SharedSdk.ts +3 -3
  164. package/src/runtime/store/SpacesSdk.ts +136 -0
  165. package/src/runtime/store/TrashSdk.ts +159 -0
  166. package/src/runtime/store/UsersSdk.ts +3 -3
  167. package/src/runtime/store/interfaces/ApiClientStore.ts +39 -0
  168. package/src/runtime/store/interfaces/Certificates.ts +56 -0
  169. package/src/runtime/store/interfaces/Files.ts +70 -0
  170. package/src/runtime/store/interfaces/History.ts +64 -0
  171. package/src/runtime/store/interfaces/Media.ts +46 -0
  172. package/src/runtime/store/interfaces/Revisions.ts +27 -0
  173. package/src/runtime/store/interfaces/Spaces.ts +48 -0
  174. package/src/runtime/store/interfaces/Trash.ts +42 -0
  175. package/build/src/events/models/ClientCertificateEvents.d.ts +0 -54
  176. package/build/src/events/models/ClientCertificateEvents.js +0 -78
  177. package/build/src/events/models/ClientCertificateEvents.js.map +0 -1
  178. package/build/src/events/models/ModelEventTypes.d.ts +0 -13
  179. package/build/src/events/models/ModelEventTypes.js +0 -14
  180. package/build/src/events/models/ModelEventTypes.js.map +0 -1
  181. package/build/src/events/models/ModelEvents.d.ts +0 -4
  182. package/build/src/events/models/ModelEvents.js +0 -5
  183. package/build/src/events/models/ModelEvents.js.map +0 -1
  184. package/build/src/mocking/lib/App.d.ts +0 -36
  185. package/build/src/mocking/lib/App.js +0 -70
  186. package/build/src/mocking/lib/App.js.map +0 -1
  187. package/build/src/models/AppProject.d.ts +0 -817
  188. package/build/src/models/AppProject.js +0 -1721
  189. package/build/src/models/AppProject.js.map +0 -1
  190. package/build/src/models/AppRequest.d.ts +0 -69
  191. package/build/src/models/AppRequest.js +0 -150
  192. package/build/src/models/AppRequest.js.map +0 -1
  193. package/build/src/models/Workspace.js.map +0 -1
  194. package/build/src/proxy/AppProjectProxy.d.ts +0 -28
  195. package/build/src/proxy/AppProjectProxy.js +0 -107
  196. package/build/src/proxy/AppProjectProxy.js.map +0 -1
  197. package/build/src/runtime/store/AppSdk.d.ts +0 -213
  198. package/build/src/runtime/store/AppSdk.js +0 -836
  199. package/build/src/runtime/store/AppSdk.js.map +0 -1
  200. package/src/events/models/ClientCertificateEvents.ts +0 -85
  201. package/src/events/models/ModelEventTypes.ts +0 -13
  202. package/src/events/models/ModelEvents.ts +0 -5
  203. package/src/mocking/lib/App.ts +0 -101
  204. package/src/models/AppProject.ts +0 -2188
  205. package/src/models/AppRequest.ts +0 -176
  206. package/src/proxy/AppProjectProxy.ts +0 -126
  207. package/src/runtime/store/AppSdk.ts +0 -842
@@ -0,0 +1,70 @@
1
+ import { IFile, FileAddOptions, FileBreadcrumb } from '../../../models/store/File.js';
2
+ import { ContextChangeRecord, ContextDeleteRecord, ContextListResult, ContextSpaceListOptions, IBulkOperationResult, IPatchInfo, IPatchRevision } from '../../../events/BaseEvents.js';
3
+
4
+ /**
5
+ * A store that stores file/folder metadata in a filesystem like structure.
6
+ *
7
+ * In API Client the `space` is a parent for all data kept in the application.
8
+ */
9
+ export interface Files {
10
+ /**
11
+ * Lists files in a space.
12
+ * @param options Query options. It must include `space`.
13
+ * @param kinds Optionally, lists the files with the listed kinds.
14
+ */
15
+ list(options: ContextSpaceListOptions, kinds?: string[]): Promise<ContextListResult<IFile>>;
16
+
17
+ /**
18
+ * Adds a new file to the store. Note, this throws an error when a file already exists.
19
+ *
20
+ * @param input The file to add.
21
+ * @param space The id of the parent space.
22
+ * @param opts The file add options.
23
+ */
24
+ add(input: IFile, space: string, opts?: FileAddOptions): Promise<ContextChangeRecord<IFile>>;
25
+
26
+ /**
27
+ * Reads a file meta from the store.
28
+ * It throws when the file does not exist or was deleted.
29
+ *
30
+ * @param key The id of the file to read the metadata for.
31
+ */
32
+ read(space: string, key: string): Promise<IFile>;
33
+
34
+ /**
35
+ * Reads multiple files in a single call.
36
+ * Unlike the `read()` method, this does not throw when a file is not found or deleted.
37
+ * When the file is missing it inserts `undefined` or `null` in the resulting array at the index
38
+ * of the missing key.
39
+ *
40
+ * Note, this returns `undefined` when directly querying the store but it may return `null` when
41
+ * structured clone algorithm is used between the application and the database.
42
+ *
43
+ * @param keys The list of keys to read
44
+ */
45
+ readBulk(space: string, keys: string[]): Promise<IBulkOperationResult<IFile>>;
46
+
47
+ /**
48
+ * Marks file as deleted.
49
+ * Files are not deleted by using this method. They are marked as deleted and later ignored
50
+ * by most of the API.
51
+ *
52
+ * @param key The database id of the file to remove.
53
+ */
54
+ delete(space: string, key: string): Promise<ContextDeleteRecord>;
55
+
56
+ /**
57
+ * This is the preferred way to update a file metadata. It allows to apply a reversible patch
58
+ * to the file and reverse it on demand.
59
+ *
60
+ * @param key The datastore id of the file to patch
61
+ * @param info The patch to apply.
62
+ */
63
+ patch(space: string, key: string, info: IPatchInfo): Promise<IPatchRevision>;
64
+
65
+ /**
66
+ * Lists breadcrumbs to the file.
67
+ * @param key The lowest file in the hierarchy
68
+ */
69
+ breadcrumbs(space: string, key: string): Promise<ContextListResult<FileBreadcrumb>>;
70
+ }
@@ -0,0 +1,64 @@
1
+ import { ContextChangeRecord, ContextDeleteRecord, ContextListResult, HistoryListOptions, IBulkOperationResult } from "../../../events/BaseEvents.js";
2
+ import { IHttpHistory, IHttpHistoryBulkAdd } from "../../../models/HttpHistory.js";
3
+
4
+ /**
5
+ * A store for the HTTP requests history.
6
+ */
7
+ export interface History {
8
+ /**
9
+ * Adds a history object to the store.
10
+ *
11
+ * @param history The history object
12
+ * @param space The parent space key
13
+ */
14
+ add(item: IHttpHistory): Promise<ContextChangeRecord<IHttpHistory>>;
15
+ /**
16
+ * Adds history in a bulk operation.
17
+ * @param info The bulk add operation schema.
18
+ * @param space The parent space key
19
+ */
20
+ addBulk(info: IHttpHistoryBulkAdd): Promise<IBulkOperationResult<ContextChangeRecord<IHttpHistory>>>;
21
+ /**
22
+ * Lists the history data.
23
+ * @param space The parent space key
24
+ * @param options List options
25
+ */
26
+ list(options?: HistoryListOptions): Promise<ContextListResult<IHttpHistory>>;
27
+ /**
28
+ * Marks the data as deleted. It also removes the data from the indexes.
29
+ * Only the owner can delete the history object. This may change in the future.
30
+ *
31
+ * @param key The history object key to delete. This is an URL-encoded key.
32
+ */
33
+ delete(key: string): Promise<ContextDeleteRecord>;
34
+ /**
35
+ * Deletes a history in a bulk operation.
36
+ * @param keys The list of history keys to delete. This is base64url encoded keys
37
+ */
38
+ deleteBulk(keys: string[]): Promise<IBulkOperationResult<ContextDeleteRecord>>;
39
+ /**
40
+ * Reads a history item.
41
+ *
42
+ * @param key The key of the history object to read.
43
+ */
44
+ read(key: string): Promise<IHttpHistory>;
45
+ /**
46
+ * Clears the datastore from history for a space.
47
+ *
48
+ * @param space The parent space key
49
+ */
50
+ clearSpace(space: string): Promise<void>;
51
+ /**
52
+ * Clears all history from a project
53
+ *
54
+ * @param project The parent project key
55
+ */
56
+ clearProject(space: string, project: string): Promise<void>;
57
+ /**
58
+ * Clears all history from a request
59
+ *
60
+ * @param project The parent project key
61
+ * @param request The parent request key
62
+ */
63
+ clearRequest(space: string, project: string, request: string): Promise<void>;
64
+ }
@@ -0,0 +1,46 @@
1
+ import { IPatchInfo, IPatchRevision } from "../../../events/BaseEvents.js";
2
+ import { MediaReadOptions } from "../../../models/store/File.js";
3
+
4
+ /**
5
+ * A media is the contents of a File.
6
+ * Keys are the same as for a file but kept in a different namespace.
7
+ *
8
+ * Note, this class does not check for space dependency. This should be done when requesting a file, not contents.
9
+ */
10
+ export interface Media {
11
+ /**
12
+ * Creates / re-creates file contents.
13
+ *
14
+ * @param key The datastore id of the file to create/update the contents for.
15
+ * @param contents The contents to store.
16
+ * @param mime The content mime type. Used for (de)serialization.
17
+ * @param allowOverwrite Whether overwriting is permitted. When not then in throws an error when trying to re-create a file.
18
+ */
19
+ add(key: string, contents: unknown, mime: string, allowOverwrite: boolean): Promise<void>;
20
+
21
+ /**
22
+ * Reads file contents.
23
+ * @param key The datastore key of the file
24
+ * @param opts Read options.
25
+ */
26
+ read(key: string, opts?: MediaReadOptions): Promise<unknown>;
27
+
28
+ /**
29
+ * Deletes file contents.
30
+ * Note, this won't broadcast the delete event as this is done by the `files?alt=meta`.
31
+ *
32
+ * @param key The file key to delete.
33
+ */
34
+ delete(key: string): Promise<void>;
35
+
36
+ /**
37
+ * This is the preferred way to update a file contents.
38
+ *
39
+ * Note, the broadcast event will most likely contain the `kind` of the **file** metadata and not content's.
40
+ * The media has no concept of a `kind` as it may store any data.
41
+ *
42
+ * @param key The datastore key of the file to patch
43
+ * @param info The patch to apply.
44
+ */
45
+ patch(key: string, info: IPatchInfo): Promise<IPatchRevision>;
46
+ }
@@ -0,0 +1,27 @@
1
+ import { IRevision } from "../../../models/store/Revision.js";
2
+ import { ContextListResult, ContextSpaceListOptions } from "../../../events/BaseEvents.js";
3
+ import { JsonPatch } from "@api-client/json";
4
+
5
+ /**
6
+ * A store to keep revision data for a file.
7
+ * This only stores revision data for file contents, not metadata.
8
+ */
9
+ export interface Revisions {
10
+ /**
11
+ * Lists revisions for a single file.
12
+ *
13
+ * @param key The id of the file to lists revisions for.
14
+ * @param options The list query options
15
+ */
16
+ list(key: string, options: ContextSpaceListOptions): Promise<ContextListResult<IRevision>>;
17
+
18
+ /**
19
+ * Creates a new revision for a file contents.
20
+ *
21
+ * @param key The datastore id of the file
22
+ * @param space The parent space
23
+ * @param kind The kind of the file that was patched
24
+ * @param patch The applied patch.
25
+ */
26
+ add(key: string, space: string, kind: string, patch: JsonPatch): Promise<IRevision>;
27
+ }
@@ -0,0 +1,48 @@
1
+ import { ISpace } from "../../../models/Space.js";
2
+ import { ContextListResult, ContextListOptions, ContextDeleteRecord, ContextChangeRecord } from "../../../events/BaseEvents.js";
3
+
4
+ /**
5
+ * A store that keeps a list of spaces created in the application.
6
+ */
7
+ export interface Spaces {
8
+ /**
9
+ * Lists spaces created by the user.
10
+ * @param options The list query options
11
+ */
12
+ list(options?: ContextListOptions): Promise<ContextListResult<ISpace>>;
13
+
14
+ /**
15
+ * Creates a space from the name.
16
+ *
17
+ * @param name The name of the space to create
18
+ */
19
+ add(name: string): Promise<ContextChangeRecord<ISpace>>;
20
+
21
+ /**
22
+ * Creates a space from a space definition.
23
+ * @param space The space definition.
24
+ */
25
+ add(space: ISpace): Promise<ContextChangeRecord<ISpace>>;
26
+
27
+ /**
28
+ * Creates a space from a name or a definition.
29
+ *
30
+ * @param nameOrObject The space name or definition.
31
+ */
32
+ add(nameOrObject: string | ISpace): Promise<ContextChangeRecord<ISpace>>;
33
+
34
+ /**
35
+ * Reads a single space from the store.
36
+ * @param key The key of the space to read.
37
+ */
38
+ read(key: string): Promise<ISpace>;
39
+
40
+ /**
41
+ * Marks space as deleted.
42
+ * Note, this does not remove any data from the store. It marks the space as deleted
43
+ * and then the space is ignored by most of the API.
44
+ *
45
+ * @param key The key of the space to delete.
46
+ */
47
+ delete(key: string): Promise<ContextDeleteRecord>;
48
+ }
@@ -0,0 +1,42 @@
1
+ import { IFile } from "../../../models/store/File.js";
2
+ import { ContextChangeRecord, ContextListResult, ContextSpaceListOptions } from "../../../events/BaseEvents.js";
3
+ import { TrashEntry, TrashEntryCreate } from "../../../models/TrashEntry.js";
4
+
5
+ /**
6
+ * A store for the file trash.
7
+ * This just keeps record of removed files. File location does not change.
8
+ */
9
+ export interface Trash {
10
+ /**
11
+ * Inserts a record of file delete.
12
+ *
13
+ * @param entry The trash entry definition
14
+ * @param space The parent space of the file
15
+ */
16
+ add(entry: TrashEntryCreate, space: string): Promise<ContextChangeRecord<TrashEntry>>;
17
+
18
+ /**
19
+ * Lists trashed entires.
20
+ * @param options The list query options.
21
+ */
22
+ list(options: ContextSpaceListOptions): Promise<ContextListResult<TrashEntry>>;
23
+
24
+ /**
25
+ * Removes a trash entry permanently from the store.
26
+ * @param key The key of the deleted object
27
+ */
28
+ delete(key: string): Promise<void>;
29
+ /**
30
+ * Restores a file from the trash.
31
+ * It deletes a trash entry and updates the `file` object.
32
+ *
33
+ * @param key The key of the file to restore
34
+ */
35
+ restore(key: string): Promise<ContextChangeRecord<IFile>>;
36
+
37
+ /**
38
+ * Empties the trash for the given space.
39
+ * @param space The space key to remove trash for.
40
+ */
41
+ empty(space: string): Promise<void>;
42
+ }
@@ -1,54 +0,0 @@
1
- import { HttpCertificate, ICertificateCreateOptions } from '../../models/ClientCertificate.js';
2
- import { ContextListOptions, ContextListResult, ContextDeleteRecord, ContextChangeRecord } from '../BaseEvents.js';
3
- export declare class ClientCertificateEvents {
4
- /**
5
- * Dispatches an event handled by the data store to read the client certificate.
6
- *
7
- * @param key The key of the client certificate
8
- * @param target A node on which to dispatch the event.
9
- * @returns Promise resolved to a client certificate model.
10
- */
11
- static read(key: string, target?: EventTarget): Promise<HttpCertificate | undefined>;
12
- /**
13
- * Dispatches an event to list the client certificates data.
14
- *
15
- * @param opts Query options.
16
- * @param target A node on which to dispatch the event.
17
- * @returns The list result.
18
- */
19
- static list(opts?: ContextListOptions, target?: EventTarget): Promise<ContextListResult<HttpCertificate> | undefined>;
20
- /**
21
- * Dispatches an event handled by the data store to delete a client certificate
22
- *
23
- * @param key The key of the project to delete.
24
- * @param target A node on which to dispatch the event.
25
- * @returns Promise resolved to a new revision after delete.
26
- */
27
- static delete(key: string, target?: EventTarget): Promise<ContextDeleteRecord | undefined>;
28
- /**
29
- * Dispatches an event handled by the data store to insert a new client certificate.
30
- *
31
- * @param item The certificate object.
32
- * @param target A node on which to dispatch the event.
33
- * @returns Promise resolved to the change record
34
- */
35
- static insert(item: ICertificateCreateOptions, target?: EventTarget): Promise<ContextChangeRecord<HttpCertificate> | undefined>;
36
- static get State(): typeof StateEvents;
37
- }
38
- declare class StateEvents {
39
- /**
40
- * Dispatches an event after a client certificate was updated
41
- *
42
- * @param target A node on which to dispatch the event.
43
- * @param record Change record
44
- */
45
- static update(record: ContextChangeRecord<HttpCertificate>, target?: EventTarget): void;
46
- /**
47
- * Dispatches an event after a client certificate was deleted
48
- *
49
- * @param record The context store delete record
50
- * @param target A node on which to dispatch the event.
51
- */
52
- static delete(record: ContextDeleteRecord, target?: EventTarget): void;
53
- }
54
- export {};
@@ -1,78 +0,0 @@
1
- import { ContextReadEvent, ContextListEvent, ContextDeleteEvent, ContextUpdateEvent, ContextStateUpdateEvent, ContextStateDeleteEvent } from '../BaseEvents.js';
2
- import { ModelEventTypes } from './ModelEventTypes.js';
3
- export class ClientCertificateEvents {
4
- /**
5
- * Dispatches an event handled by the data store to read the client certificate.
6
- *
7
- * @param key The key of the client certificate
8
- * @param target A node on which to dispatch the event.
9
- * @returns Promise resolved to a client certificate model.
10
- */
11
- static async read(key, target = window) {
12
- const e = new ContextReadEvent(ModelEventTypes.ClientCertificate.read, key);
13
- target.dispatchEvent(e);
14
- return e.detail.result;
15
- }
16
- /**
17
- * Dispatches an event to list the client certificates data.
18
- *
19
- * @param opts Query options.
20
- * @param target A node on which to dispatch the event.
21
- * @returns The list result.
22
- */
23
- static async list(opts, target = window) {
24
- const e = new ContextListEvent(ModelEventTypes.ClientCertificate.list, opts);
25
- target.dispatchEvent(e);
26
- return e.detail.result;
27
- }
28
- /**
29
- * Dispatches an event handled by the data store to delete a client certificate
30
- *
31
- * @param key The key of the project to delete.
32
- * @param target A node on which to dispatch the event.
33
- * @returns Promise resolved to a new revision after delete.
34
- */
35
- static async delete(key, target = window) {
36
- const e = new ContextDeleteEvent(ModelEventTypes.ClientCertificate.delete, key, undefined);
37
- target.dispatchEvent(e);
38
- return e.detail.result;
39
- }
40
- /**
41
- * Dispatches an event handled by the data store to insert a new client certificate.
42
- *
43
- * @param item The certificate object.
44
- * @param target A node on which to dispatch the event.
45
- * @returns Promise resolved to the change record
46
- */
47
- static async insert(item, target = window) {
48
- const e = new ContextUpdateEvent(ModelEventTypes.ClientCertificate.insert, { item, });
49
- target.dispatchEvent(e);
50
- return e.detail.result;
51
- }
52
- static get State() {
53
- return StateEvents;
54
- }
55
- }
56
- class StateEvents {
57
- /**
58
- * Dispatches an event after a client certificate was updated
59
- *
60
- * @param target A node on which to dispatch the event.
61
- * @param record Change record
62
- */
63
- static update(record, target = window) {
64
- const e = new ContextStateUpdateEvent(ModelEventTypes.ClientCertificate.State.update, record);
65
- target.dispatchEvent(e);
66
- }
67
- /**
68
- * Dispatches an event after a client certificate was deleted
69
- *
70
- * @param record The context store delete record
71
- * @param target A node on which to dispatch the event.
72
- */
73
- static delete(record, target = window) {
74
- const e = new ContextStateDeleteEvent(ModelEventTypes.ClientCertificate.State.delete, record);
75
- target.dispatchEvent(e);
76
- }
77
- }
78
- //# sourceMappingURL=ClientCertificateEvents.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ClientCertificateEvents.js","sourceRoot":"","sources":["../../../../src/events/models/ClientCertificateEvents.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAyC,kBAAkB,EAAuB,kBAAkB,EAAuB,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AACjP,OAAO,EAA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,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;IAED,MAAM,KAAK,KAAK;QACd,OAAO,WAAW,CAAC;IACrB,CAAC;CACF;AAED,MAAM,WAAW;IACf;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,MAA4C,EAAE,SAAsB,MAAM;QACtF,MAAM,CAAC,GAAG,IAAI,uBAAuB,CAAkB,eAAe,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC/G,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,MAA2B,EAAE,SAAsB,MAAM;QACrE,MAAM,CAAC,GAAG,IAAI,uBAAuB,CAAC,eAAe,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC9F,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC;CACF"}
@@ -1,13 +0,0 @@
1
- export declare const ModelEventTypes: {
2
- ClientCertificate: Readonly<{
3
- read: "storeclientcertificateread";
4
- list: "storeclientcertificatelist";
5
- delete: "storeclientcertificatedelete";
6
- update: "storeclientcertificateupdate";
7
- insert: "storeclientcertificateinsert";
8
- State: Readonly<{
9
- update: "storestateclientcertificateupdate";
10
- delete: "storestateclientcertificatedelete";
11
- }>;
12
- }>;
13
- };
@@ -1,14 +0,0 @@
1
- export const ModelEventTypes = {
2
- ClientCertificate: Object.freeze({
3
- read: 'storeclientcertificateread',
4
- list: 'storeclientcertificatelist',
5
- delete: 'storeclientcertificatedelete',
6
- update: 'storeclientcertificateupdate',
7
- insert: 'storeclientcertificateinsert',
8
- State: Object.freeze({
9
- update: 'storestateclientcertificateupdate',
10
- delete: 'storestateclientcertificatedelete',
11
- }),
12
- }),
13
- };
14
- //# sourceMappingURL=ModelEventTypes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ModelEventTypes.js","sourceRoot":"","sources":["../../../../src/events/models/ModelEventTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,iBAAiB,EAAE,MAAM,CAAC,MAAM,CAAC;QAC/B,IAAI,EAAE,4BAA4B;QAClC,IAAI,EAAE,4BAA4B;QAClC,MAAM,EAAE,8BAA8B;QACtC,MAAM,EAAE,8BAA8B;QACtC,MAAM,EAAE,8BAA8B;QACtC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC;YACnB,MAAM,EAAE,mCAAmC;YAC3C,MAAM,EAAE,mCAAmC;SAC5C,CAAC;KACH,CAAC;CACH,CAAA"}
@@ -1,4 +0,0 @@
1
- import { ClientCertificateEvents } from './ClientCertificateEvents.js';
2
- export declare const ModelEvents: Readonly<{
3
- ClientCertificate: typeof ClientCertificateEvents;
4
- }>;
@@ -1,5 +0,0 @@
1
- import { ClientCertificateEvents } from './ClientCertificateEvents.js';
2
- export const ModelEvents = Object.freeze({
3
- ClientCertificate: ClientCertificateEvents,
4
- });
5
- //# sourceMappingURL=ModelEvents.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ModelEvents.js","sourceRoot":"","sources":["../../../../src/events/models/ModelEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IACvC,iBAAiB,EAAE,uBAAuB;CAC3C,CAAC,CAAC"}
@@ -1,36 +0,0 @@
1
- import { IDataMockInit, IHttpRequestInit, Types, Lorem } from '@pawel-up/data-mock';
2
- import { IAppRequest } from '../../models/AppRequest.js';
3
- import { IAppProject } from '../../models/AppProject.js';
4
- import { Request } from './Request.js';
5
- export interface IAppRequestInit extends IHttpRequestInit {
6
- /**
7
- * The application id that generated the request.
8
- * When not set a random id is generated.
9
- */
10
- app?: string;
11
- /**
12
- * Whether the generated key should be an ISO time string.
13
- */
14
- isoKey?: boolean;
15
- }
16
- export interface IAppProjectInit {
17
- /**
18
- * The number of folders to generate with the project.
19
- * Set to 0 to not add folders.
20
- */
21
- foldersSize?: number;
22
- /**
23
- * Whether to prohibit adding requests to folders (randomly distributed).
24
- */
25
- noRequests?: boolean;
26
- }
27
- export declare class App {
28
- protected request: Request;
29
- protected types: Types;
30
- protected lorem: Lorem;
31
- constructor(init?: IDataMockInit);
32
- appRequest(init?: IAppRequestInit): IAppRequest;
33
- appRequests(size?: number, init?: IAppRequestInit): IAppRequest[];
34
- appProject(init?: IAppProjectInit): IAppProject;
35
- appProjects(size?: number, init?: IAppProjectInit): IAppProject[];
36
- }
@@ -1,70 +0,0 @@
1
- import { Types, Lorem } from '@pawel-up/data-mock';
2
- import { Kind as AppRequestKind } from '../../models/AppRequest.js';
3
- import { AppProject, AppProjectRequest } from '../../models/AppProject.js';
4
- import { Request } from './Request.js';
5
- export class App {
6
- request;
7
- types;
8
- lorem;
9
- constructor(init = {}) {
10
- this.request = new Request(init);
11
- this.types = new Types(init.seed);
12
- this.lorem = new Lorem(init);
13
- }
14
- appRequest(init = {}) {
15
- const cnf = { ...init };
16
- if (!cnf.app) {
17
- cnf.app = this.types.hash({ length: 6 });
18
- }
19
- const request = this.request.request(cnf);
20
- const key = init.isoKey ? new Date(request.created || Date.now()).toJSON() : this.types.uuid();
21
- return {
22
- key,
23
- ...request,
24
- kind: AppRequestKind,
25
- app: cnf.app,
26
- };
27
- }
28
- appRequests(size = 25, init = {}) {
29
- const cnf = { ...init };
30
- if (!cnf.app) {
31
- cnf.app = this.types.hash({ length: 6 });
32
- }
33
- const result = [];
34
- for (let i = 0; i < size; i++) {
35
- result.push(this.appRequest(cnf));
36
- }
37
- return result;
38
- }
39
- appProject(init = {}) {
40
- const { foldersSize = this.types.number({ min: 0, max: 10 }) } = init;
41
- const project = AppProject.fromName(this.lorem.words());
42
- const requests = init.noRequests ? [] : this.appRequests(this.types.number({ min: foldersSize, max: foldersSize * 2 }));
43
- for (let j = 0; j < foldersSize; j++) {
44
- const folder = project.addFolder(this.lorem.words());
45
- const requestLen = init.noRequests ? 0 : this.types.number({ min: 0, max: 2 });
46
- if (requestLen) {
47
- const folderRequests = requests.splice(0, requestLen);
48
- folderRequests.forEach((item) => {
49
- const adapted = AppProjectRequest.fromRequest(item, project);
50
- folder.addRequest(adapted);
51
- });
52
- }
53
- }
54
- if (requests.length) {
55
- requests.forEach((item) => {
56
- const adapted = AppProjectRequest.fromRequest(item, project);
57
- project.addRequest(adapted);
58
- });
59
- }
60
- return project.toJSON();
61
- }
62
- appProjects(size = 25, init = {}) {
63
- const result = [];
64
- for (let i = 0; i < size; i++) {
65
- result.push(this.appProject(init));
66
- }
67
- return result;
68
- }
69
- }
70
- //# sourceMappingURL=App.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"App.js","sourceRoot":"","sources":["../../../../src/mocking/lib/App.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,EAAe,IAAI,IAAI,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAe,UAAU,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACxF,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA0BvC,MAAM,OAAO,GAAG;IACJ,OAAO,CAAU;IACjB,KAAK,CAAQ;IACb,KAAK,CAAQ;IAEvB,YAAY,OAAsB,EAAE;QAClC,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,UAAU,CAAC,OAAwB,EAAE;QACnC,MAAM,GAAG,GAAG,EAAE,GAAG,IAAI,EAAqB,CAAC;QAC3C,IAAI,CAA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