@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,155 @@
1
+ import { SdkBase, E_RESPONSE_STATUS, E_RESPONSE_NO_VALUE, E_INVALID_JSON, E_RESPONSE_UNKNOWN } from './SdkBase.js';
2
+ import { RouteBuilder } from './RouteBuilder.js';
3
+ import { SdkError } from './Errors.js';
4
+ export class TrashSdk extends SdkBase {
5
+ /**
6
+ * Inserts a record of file delete.
7
+ *
8
+ * @param entry The trash entry definition
9
+ * @param space The parent space of the file
10
+ */
11
+ async add(entry, space, request = {}) {
12
+ const token = request.token || this.sdk.token;
13
+ const url = this.sdk.getUrl(RouteBuilder.trash());
14
+ url.searchParams.set('space', space);
15
+ const body = JSON.stringify(entry);
16
+ const result = await this.sdk.http.post(url.toString(), { token, body });
17
+ this.inspectCommonStatusCodes(result.status);
18
+ const E_PREFIX = 'Unable to create a trash. ';
19
+ if (result.status !== 200) {
20
+ this.logInvalidResponse(result);
21
+ let e = this.createGenericSdkError(result.body);
22
+ if (!e) {
23
+ e = new SdkError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.status);
24
+ e.response = result.body;
25
+ }
26
+ throw e;
27
+ }
28
+ if (!result.body) {
29
+ throw new Error(`${E_PREFIX}${E_RESPONSE_NO_VALUE}`);
30
+ }
31
+ let data;
32
+ try {
33
+ data = JSON.parse(result.body);
34
+ }
35
+ catch (e) {
36
+ throw new Error(`${E_PREFIX}${E_INVALID_JSON}.`);
37
+ }
38
+ if (!data.key) {
39
+ throw new Error(`${E_PREFIX}${E_RESPONSE_UNKNOWN}.`);
40
+ }
41
+ return data;
42
+ }
43
+ /**
44
+ * Lists trashed entires.
45
+ * @param options The list query options.
46
+ */
47
+ async list(options, request = {}) {
48
+ const token = request.token || this.sdk.token;
49
+ const url = this.sdk.getUrl(RouteBuilder.trash());
50
+ this.sdk.appendListOptions(url, options);
51
+ const result = await this.sdk.http.get(url.toString(), { token });
52
+ this.inspectCommonStatusCodes(result.status);
53
+ const E_PREFIX = 'Unable to list trash. ';
54
+ if (result.status !== 200) {
55
+ this.logInvalidResponse(result);
56
+ let e = this.createGenericSdkError(result.body);
57
+ if (!e) {
58
+ e = new SdkError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.status);
59
+ e.response = result.body;
60
+ }
61
+ throw e;
62
+ }
63
+ if (!result.body) {
64
+ throw new Error(`${E_PREFIX}${E_RESPONSE_NO_VALUE}`);
65
+ }
66
+ let data;
67
+ try {
68
+ data = JSON.parse(result.body);
69
+ }
70
+ catch (e) {
71
+ throw new Error(`${E_PREFIX}${E_INVALID_JSON}.`);
72
+ }
73
+ if (!Array.isArray(data.items)) {
74
+ throw new Error(`${E_PREFIX}${E_RESPONSE_UNKNOWN}.`);
75
+ }
76
+ return data;
77
+ }
78
+ /**
79
+ * Removes a trash entry permanently from the store.
80
+ * @param key The key of the deleted object
81
+ */
82
+ async delete(key, request = {}) {
83
+ const token = request.token || this.sdk.token;
84
+ const url = this.sdk.getUrl(RouteBuilder.trashItem(key));
85
+ const result = await this.sdk.http.delete(url.toString(), { token });
86
+ this.inspectCommonStatusCodes(result.status, result.body);
87
+ const E_PREFIX = 'Unable to delete the trash entry. ';
88
+ if (result.status !== 204) {
89
+ this.logInvalidResponse(result);
90
+ let e = this.createGenericSdkError(result.body);
91
+ if (!e) {
92
+ e = new SdkError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.status);
93
+ e.response = result.body;
94
+ }
95
+ throw e;
96
+ }
97
+ }
98
+ /**
99
+ * Restores a file from the trash.
100
+ * It deletes a trash entry and updates the `file` object.
101
+ *
102
+ * @param key The key of the file to restore
103
+ */
104
+ async restore(key, request = {}) {
105
+ const token = request.token || this.sdk.token;
106
+ const url = this.sdk.getUrl(RouteBuilder.trashRestore(key));
107
+ const result = await this.sdk.http.put(url.toString(), { token });
108
+ this.inspectCommonStatusCodes(result.status, result.body);
109
+ const E_PREFIX = 'Unable to restore from trash. ';
110
+ if (result.status !== 204) {
111
+ this.logInvalidResponse(result);
112
+ let e = this.createGenericSdkError(result.body);
113
+ if (!e) {
114
+ e = new SdkError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.status);
115
+ e.response = result.body;
116
+ }
117
+ throw e;
118
+ }
119
+ if (!result.body) {
120
+ throw new Error(`${E_PREFIX}${E_RESPONSE_NO_VALUE}`);
121
+ }
122
+ let data;
123
+ try {
124
+ data = JSON.parse(result.body);
125
+ }
126
+ catch (e) {
127
+ throw new Error(`${E_PREFIX}${E_INVALID_JSON}.`);
128
+ }
129
+ if (!data.key) {
130
+ throw new Error(`${E_PREFIX}${E_RESPONSE_UNKNOWN}.`);
131
+ }
132
+ return data;
133
+ }
134
+ /**
135
+ * Empties the trash for the given space.
136
+ * @param space The space key to remove trash for.
137
+ */
138
+ async empty(space, request = {}) {
139
+ const token = request.token || this.sdk.token;
140
+ const url = this.sdk.getUrl(RouteBuilder.trashEmpty(space));
141
+ const result = await this.sdk.http.delete(url.toString(), { token });
142
+ this.inspectCommonStatusCodes(result.status, result.body);
143
+ const E_PREFIX = 'Unable to empty trash. ';
144
+ if (result.status !== 204) {
145
+ this.logInvalidResponse(result);
146
+ let e = this.createGenericSdkError(result.body);
147
+ if (!e) {
148
+ e = new SdkError(`${E_PREFIX}${E_RESPONSE_STATUS}${result.status}`, result.status);
149
+ e.response = result.body;
150
+ }
151
+ throw e;
152
+ }
153
+ }
154
+ }
155
+ //# sourceMappingURL=TrashSdk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrashSdk.js","sourceRoot":"","sources":["../../../../src/runtime/store/TrashSdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAE,kBAAkB,EAAsB,MAAM,cAAc,CAAC;AACvI,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAIvC,MAAM,OAAO,QAAS,SAAQ,OAAO;IACnC;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CAAC,KAAuB,EAAE,KAAa,EAAE,UAA8B,EAAE;QAChF,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;QAC9C,MAAM,GAAG,GAAG,IAAI,CAAC,GA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AC,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;gBACnF,CAAC,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC;aAC1B;YACD,MAAM,CAAC,CAAC;SACT;IACH,CAAC;CACF"}
@@ -1,6 +1,6 @@
1
1
  import { SdkBase, ISdkRequestOptions } from './SdkBase.js';
2
- import { IListOptions, IListResponse } from '../../models/store/Backend.js';
3
2
  import { IUser } from '../../models/store/User.js';
3
+ import { ContextListResult, ContextListOptions } from '../../events/BaseEvents.js';
4
4
  export declare class UsersSdk extends SdkBase {
5
5
  /**
6
6
  * Reads the current user.
@@ -13,7 +13,7 @@ export declare class UsersSdk extends SdkBase {
13
13
  * @param options Optional query options.
14
14
  * @param request Optional request options.
15
15
  */
16
- list(options?: IListOptions, request?: ISdkRequestOptions): Promise<IListResponse<IUser>>;
16
+ list(options?: ContextListOptions, request?: ISdkRequestOptions): Promise<ContextListResult<IUser>>;
17
17
  /**
18
18
  * Reads a user information from the store.
19
19
  * @param key The user key.
@@ -1 +1 @@
1
- {"version":3,"file":"UsersSdk.js","sourceRoot":"","sources":["../../../../src/runtime/store/UsersSdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAE,kBAAkB,EAAsB,MAAM,cAAc,CAAC;AACvI,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAIjD,MAAM,OAAO,QAAS,SAAQ,OAAO;IACnC;;;OAGG;IACH,KAAK,CAAC,EAAE,CAAC,UAA8B,EAAE;QACvC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;QAC9C,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC;QACpD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAA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AG,CAAC,KAAK,CAAC;QAC9C,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QACpD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAClE,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7C,MAAM,QAAQ,GAAG,gCAAgC,CAAC;QAClD,IAAI,MAAM,CAAC,MAAM,KAAK,GAAG,EAAE;YACzB,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,GAAG,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;SACpE;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;YAChB,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,GAAG,mBAAmB,EAAE,CAAC,CAAC;SACtD;QACD,IAAI,IAAW,CAAC;QAChB,IAAI;YACF,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;SAChC;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,GAAG,cAAc,GAAG,CAAC,CAAC;SAClD;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -0,0 +1,30 @@
1
+ import { Certificates } from "./Certificates.js";
2
+ import { Files } from "./Files.js";
3
+ import { History } from "./History.js";
4
+ import { Media } from "./Media.js";
5
+ import { Revisions } from "./Revisions.js";
6
+ import { Spaces } from "./Spaces.js";
7
+ import { Trash } from "./Trash.js";
8
+ /**
9
+ * A base class to define access to the API Client store.
10
+ * This is used by particular store implementation (like IDB or net-store).
11
+ */
12
+ export interface ApiClientStore {
13
+ /**
14
+ * The current space.
15
+ * The bindings will fill up workspace key information when needed.
16
+ * This way the events won't need to contain this information.
17
+ */
18
+ space?: string;
19
+ /**
20
+ * Initializes the store.
21
+ */
22
+ initializeStore(): Promise<void>;
23
+ history: History;
24
+ spaces: Spaces;
25
+ certificates: Certificates;
26
+ trash: Trash;
27
+ revisions: Revisions;
28
+ media: Media;
29
+ files: Files;
30
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ApiClientStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiClientStore.js","sourceRoot":"","sources":["../../../../../src/runtime/store/interfaces/ApiClientStore.ts"],"names":[],"mappings":""}
@@ -0,0 +1,49 @@
1
+ import { HttpCertificate } from "../../../models/ClientCertificate.js";
2
+ import { ContextChangeRecord, ContextDeleteRecord, ContextListResult, ContextSpaceListOptions, IBulkOperationResult } from "../../../events/BaseEvents.js";
3
+ /**
4
+ * A store for the client certificates.
5
+ * This just keeps record of removed files. File location does not change.
6
+ */
7
+ export interface Certificates {
8
+ /**
9
+ * Inserts a certificate to the store
10
+ *
11
+ * @param value The value to insert.
12
+ * @param space The parent space of the certificate.
13
+ */
14
+ add(value: HttpCertificate, space: string): Promise<ContextChangeRecord<HttpCertificate>>;
15
+ /**
16
+ * Adds certificates in a bulk operation.
17
+ * @param value The lits of certificates to add.
18
+ * @param space The parent workspace
19
+ * @returns The list of inserted certificates. `undefined` when there was an error inserting a certificate.
20
+ */
21
+ addBulk(values: HttpCertificate[], space: string): Promise<IBulkOperationResult<ContextChangeRecord<HttpCertificate>>>;
22
+ /**
23
+ * @param key The key of the certificate to read.
24
+ */
25
+ read(key: string): Promise<HttpCertificate>;
26
+ /**
27
+ * Lists certificate entires.
28
+ *
29
+ * @param space The parent space of the certificate.
30
+ * @param options The list query options.
31
+ */
32
+ list(options?: ContextSpaceListOptions): Promise<ContextListResult<HttpCertificate>>;
33
+ /**
34
+ * Marks the certificate as deleted.
35
+ *
36
+ * @param key The key of the certificate to delete.
37
+ */
38
+ delete(key: string): Promise<ContextDeleteRecord>;
39
+ /**
40
+ * Removed certificates in a bulk operation.
41
+ * @param keys The list of certificate keys to delete.
42
+ */
43
+ deleteBulk(keys: string[]): Promise<IBulkOperationResult<ContextDeleteRecord>>;
44
+ /**
45
+ * Removes all certificates from the store for the given workspace.
46
+ * @param space The parent workspace key
47
+ */
48
+ empty(space: string): Promise<void>;
49
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Certificates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Certificates.js","sourceRoot":"","sources":["../../../../../src/runtime/store/interfaces/Certificates.ts"],"names":[],"mappings":""}
@@ -0,0 +1,63 @@
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
+ * A store that stores file/folder metadata in a filesystem like structure.
5
+ *
6
+ * In API Client the `space` is a parent for all data kept in the application.
7
+ */
8
+ export interface Files {
9
+ /**
10
+ * Lists files in a space.
11
+ * @param options Query options. It must include `space`.
12
+ * @param kinds Optionally, lists the files with the listed kinds.
13
+ */
14
+ list(options: ContextSpaceListOptions, kinds?: string[]): Promise<ContextListResult<IFile>>;
15
+ /**
16
+ * Adds a new file to the store. Note, this throws an error when a file already exists.
17
+ *
18
+ * @param input The file to add.
19
+ * @param space The id of the parent space.
20
+ * @param opts The file add options.
21
+ */
22
+ add(input: IFile, space: string, opts?: FileAddOptions): Promise<ContextChangeRecord<IFile>>;
23
+ /**
24
+ * Reads a file meta from the store.
25
+ * It throws when the file does not exist or was deleted.
26
+ *
27
+ * @param key The id of the file to read the metadata for.
28
+ */
29
+ read(space: string, key: string): Promise<IFile>;
30
+ /**
31
+ * Reads multiple files in a single call.
32
+ * Unlike the `read()` method, this does not throw when a file is not found or deleted.
33
+ * When the file is missing it inserts `undefined` or `null` in the resulting array at the index
34
+ * of the missing key.
35
+ *
36
+ * Note, this returns `undefined` when directly querying the store but it may return `null` when
37
+ * structured clone algorithm is used between the application and the database.
38
+ *
39
+ * @param keys The list of keys to read
40
+ */
41
+ readBulk(space: string, keys: string[]): Promise<IBulkOperationResult<IFile>>;
42
+ /**
43
+ * Marks file as deleted.
44
+ * Files are not deleted by using this method. They are marked as deleted and later ignored
45
+ * by most of the API.
46
+ *
47
+ * @param key The database id of the file to remove.
48
+ */
49
+ delete(space: string, key: string): Promise<ContextDeleteRecord>;
50
+ /**
51
+ * This is the preferred way to update a file metadata. It allows to apply a reversible patch
52
+ * to the file and reverse it on demand.
53
+ *
54
+ * @param key The datastore id of the file to patch
55
+ * @param info The patch to apply.
56
+ */
57
+ patch(space: string, key: string, info: IPatchInfo): Promise<IPatchRevision>;
58
+ /**
59
+ * Lists breadcrumbs to the file.
60
+ * @param key The lowest file in the hierarchy
61
+ */
62
+ breadcrumbs(space: string, key: string): Promise<ContextListResult<FileBreadcrumb>>;
63
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Files.js","sourceRoot":"","sources":["../../../../../src/runtime/store/interfaces/Files.ts"],"names":[],"mappings":""}
@@ -0,0 +1,63 @@
1
+ import { ContextChangeRecord, ContextDeleteRecord, ContextListResult, HistoryListOptions, IBulkOperationResult } from "../../../events/BaseEvents.js";
2
+ import { IHttpHistory, IHttpHistoryBulkAdd } from "../../../models/HttpHistory.js";
3
+ /**
4
+ * A store for the HTTP requests history.
5
+ */
6
+ export interface History {
7
+ /**
8
+ * Adds a history object to the store.
9
+ *
10
+ * @param history The history object
11
+ * @param space The parent space key
12
+ */
13
+ add(item: IHttpHistory): Promise<ContextChangeRecord<IHttpHistory>>;
14
+ /**
15
+ * Adds history in a bulk operation.
16
+ * @param info The bulk add operation schema.
17
+ * @param space The parent space key
18
+ */
19
+ addBulk(info: IHttpHistoryBulkAdd): Promise<IBulkOperationResult<ContextChangeRecord<IHttpHistory>>>;
20
+ /**
21
+ * Lists the history data.
22
+ * @param space The parent space key
23
+ * @param options List options
24
+ */
25
+ list(options?: HistoryListOptions): Promise<ContextListResult<IHttpHistory>>;
26
+ /**
27
+ * Marks the data as deleted. It also removes the data from the indexes.
28
+ * Only the owner can delete the history object. This may change in the future.
29
+ *
30
+ * @param key The history object key to delete. This is an URL-encoded key.
31
+ */
32
+ delete(key: string): Promise<ContextDeleteRecord>;
33
+ /**
34
+ * Deletes a history in a bulk operation.
35
+ * @param keys The list of history keys to delete. This is base64url encoded keys
36
+ */
37
+ deleteBulk(keys: string[]): Promise<IBulkOperationResult<ContextDeleteRecord>>;
38
+ /**
39
+ * Reads a history item.
40
+ *
41
+ * @param key The key of the history object to read.
42
+ */
43
+ read(key: string): Promise<IHttpHistory>;
44
+ /**
45
+ * Clears the datastore from history for a space.
46
+ *
47
+ * @param space The parent space key
48
+ */
49
+ clearSpace(space: string): Promise<void>;
50
+ /**
51
+ * Clears all history from a project
52
+ *
53
+ * @param project The parent project key
54
+ */
55
+ clearProject(space: string, project: string): Promise<void>;
56
+ /**
57
+ * Clears all history from a request
58
+ *
59
+ * @param project The parent project key
60
+ * @param request The parent request key
61
+ */
62
+ clearRequest(space: string, project: string, request: string): Promise<void>;
63
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=History.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"History.js","sourceRoot":"","sources":["../../../../../src/runtime/store/interfaces/History.ts"],"names":[],"mappings":""}
@@ -0,0 +1,42 @@
1
+ import { IPatchInfo, IPatchRevision } from "../../../events/BaseEvents.js";
2
+ import { MediaReadOptions } from "../../../models/store/File.js";
3
+ /**
4
+ * A media is the contents of a File.
5
+ * Keys are the same as for a file but kept in a different namespace.
6
+ *
7
+ * Note, this class does not check for space dependency. This should be done when requesting a file, not contents.
8
+ */
9
+ export interface Media {
10
+ /**
11
+ * Creates / re-creates file contents.
12
+ *
13
+ * @param key The datastore id of the file to create/update the contents for.
14
+ * @param contents The contents to store.
15
+ * @param mime The content mime type. Used for (de)serialization.
16
+ * @param allowOverwrite Whether overwriting is permitted. When not then in throws an error when trying to re-create a file.
17
+ */
18
+ add(key: string, contents: unknown, mime: string, allowOverwrite: boolean): Promise<void>;
19
+ /**
20
+ * Reads file contents.
21
+ * @param key The datastore key of the file
22
+ * @param opts Read options.
23
+ */
24
+ read(key: string, opts?: MediaReadOptions): Promise<unknown>;
25
+ /**
26
+ * Deletes file contents.
27
+ * Note, this won't broadcast the delete event as this is done by the `files?alt=meta`.
28
+ *
29
+ * @param key The file key to delete.
30
+ */
31
+ delete(key: string): Promise<void>;
32
+ /**
33
+ * This is the preferred way to update a file contents.
34
+ *
35
+ * Note, the broadcast event will most likely contain the `kind` of the **file** metadata and not content's.
36
+ * The media has no concept of a `kind` as it may store any data.
37
+ *
38
+ * @param key The datastore key of the file to patch
39
+ * @param info The patch to apply.
40
+ */
41
+ patch(key: string, info: IPatchInfo): Promise<IPatchRevision>;
42
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Media.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Media.js","sourceRoot":"","sources":["../../../../../src/runtime/store/interfaces/Media.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
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
+ * A store to keep revision data for a file.
6
+ * This only stores revision data for file contents, not metadata.
7
+ */
8
+ export interface Revisions {
9
+ /**
10
+ * Lists revisions for a single file.
11
+ *
12
+ * @param key The id of the file to lists revisions for.
13
+ * @param options The list query options
14
+ */
15
+ list(key: string, options: ContextSpaceListOptions): Promise<ContextListResult<IRevision>>;
16
+ /**
17
+ * Creates a new revision for a file contents.
18
+ *
19
+ * @param key The datastore id of the file
20
+ * @param space The parent space
21
+ * @param kind The kind of the file that was patched
22
+ * @param patch The applied patch.
23
+ */
24
+ add(key: string, space: string, kind: string, patch: JsonPatch): Promise<IRevision>;
25
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Revisions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Revisions.js","sourceRoot":"","sources":["../../../../../src/runtime/store/interfaces/Revisions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,42 @@
1
+ import { ISpace } from "../../../models/Space.js";
2
+ import { ContextListResult, ContextListOptions, ContextDeleteRecord, ContextChangeRecord } from "../../../events/BaseEvents.js";
3
+ /**
4
+ * A store that keeps a list of spaces created in the application.
5
+ */
6
+ export interface Spaces {
7
+ /**
8
+ * Lists spaces created by the user.
9
+ * @param options The list query options
10
+ */
11
+ list(options?: ContextListOptions): Promise<ContextListResult<ISpace>>;
12
+ /**
13
+ * Creates a space from the name.
14
+ *
15
+ * @param name The name of the space to create
16
+ */
17
+ add(name: string): Promise<ContextChangeRecord<ISpace>>;
18
+ /**
19
+ * Creates a space from a space definition.
20
+ * @param space The space definition.
21
+ */
22
+ add(space: ISpace): Promise<ContextChangeRecord<ISpace>>;
23
+ /**
24
+ * Creates a space from a name or a definition.
25
+ *
26
+ * @param nameOrObject The space name or definition.
27
+ */
28
+ add(nameOrObject: string | ISpace): Promise<ContextChangeRecord<ISpace>>;
29
+ /**
30
+ * Reads a single space from the store.
31
+ * @param key The key of the space to read.
32
+ */
33
+ read(key: string): Promise<ISpace>;
34
+ /**
35
+ * Marks space as deleted.
36
+ * Note, this does not remove any data from the store. It marks the space as deleted
37
+ * and then the space is ignored by most of the API.
38
+ *
39
+ * @param key The key of the space to delete.
40
+ */
41
+ delete(key: string): Promise<ContextDeleteRecord>;
42
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Spaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spaces.js","sourceRoot":"","sources":["../../../../../src/runtime/store/interfaces/Spaces.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
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
+ * A store for the file trash.
6
+ * This just keeps record of removed files. File location does not change.
7
+ */
8
+ export interface Trash {
9
+ /**
10
+ * Inserts a record of file delete.
11
+ *
12
+ * @param entry The trash entry definition
13
+ * @param space The parent space of the file
14
+ */
15
+ add(entry: TrashEntryCreate, space: string): Promise<ContextChangeRecord<TrashEntry>>;
16
+ /**
17
+ * Lists trashed entires.
18
+ * @param options The list query options.
19
+ */
20
+ list(options: ContextSpaceListOptions): Promise<ContextListResult<TrashEntry>>;
21
+ /**
22
+ * Removes a trash entry permanently from the store.
23
+ * @param key The key of the deleted object
24
+ */
25
+ delete(key: string): Promise<void>;
26
+ /**
27
+ * Restores a file from the trash.
28
+ * It deletes a trash entry and updates the `file` object.
29
+ *
30
+ * @param key The key of the file to restore
31
+ */
32
+ restore(key: string): Promise<ContextChangeRecord<IFile>>;
33
+ /**
34
+ * Empties the trash for the given space.
35
+ * @param space The space key to remove trash for.
36
+ */
37
+ empty(space: string): Promise<void>;
38
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Trash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Trash.js","sourceRoot":"","sources":["../../../../../src/runtime/store/interfaces/Trash.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@api-client/core",
3
3
  "description": "The API Client's core client library. Works in NodeJS and in a ES enabled browser.",
4
- "version": "0.8.22",
4
+ "version": "0.9.1",
5
5
  "license": "Apache-2.0",
6
6
  "main": "build/index.js",
7
7
  "module": "build/index.js",