@twin.org/blob-storage-models 0.0.1-next.13 → 0.0.1-next.15
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.
- package/dist/types/models/IBlobStorageComponent.d.ts +3 -5
- package/dist/types/models/api/IBlobStorageListRequest.d.ts +8 -2
- package/docs/changelog.md +1 -1
- package/docs/reference/interfaces/IBlobStorageComponent.md +7 -3
- package/docs/reference/interfaces/IBlobStorageListRequest.md +9 -3
- package/package.json +1 -1
|
@@ -53,7 +53,8 @@ export interface IBlobStorageComponent extends IComponent {
|
|
|
53
53
|
/**
|
|
54
54
|
* Query all the blob storage entries which match the conditions.
|
|
55
55
|
* @param conditions The conditions to match for the entries.
|
|
56
|
-
* @param
|
|
56
|
+
* @param orderBy The order for the results, defaults to created.
|
|
57
|
+
* @param orderByDirection The direction for the order, defaults to descending.
|
|
57
58
|
* @param cursor The cursor to request the next page of entries.
|
|
58
59
|
* @param pageSize The suggested number of entries to return in each chunk, in some scenarios can return a different amount.
|
|
59
60
|
* @param userIdentity The user identity to use with storage operations.
|
|
@@ -61,8 +62,5 @@ export interface IBlobStorageComponent extends IComponent {
|
|
|
61
62
|
* @returns All the entries for the storage matching the conditions,
|
|
62
63
|
* and a cursor which can be used to request more entities.
|
|
63
64
|
*/
|
|
64
|
-
query(conditions?: EntityCondition<IBlobStorageEntry>,
|
|
65
|
-
property: keyof Pick<IBlobStorageEntry, "dateCreated" | "dateModified">;
|
|
66
|
-
sortDirection: SortDirection;
|
|
67
|
-
}[], cursor?: string, pageSize?: number, userIdentity?: string, nodeIdentity?: string): Promise<IBlobStorageEntryList>;
|
|
65
|
+
query(conditions?: EntityCondition<IBlobStorageEntry>, orderBy?: keyof Pick<IBlobStorageEntry, "dateCreated" | "dateModified">, orderByDirection?: SortDirection, cursor?: string, pageSize?: number, userIdentity?: string, nodeIdentity?: string): Promise<IBlobStorageEntryList>;
|
|
68
66
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { SortDirection } from "@twin.org/entity";
|
|
1
2
|
import type { HeaderTypes, MimeTypes } from "@twin.org/web";
|
|
3
|
+
import type { IBlobStorageEntry } from "../IBlobStorageEntry";
|
|
2
4
|
/**
|
|
3
5
|
* Query the entries from blob storage.
|
|
4
6
|
*/
|
|
@@ -18,9 +20,13 @@ export interface IBlobStorageListRequest {
|
|
|
18
20
|
*/
|
|
19
21
|
conditions?: string;
|
|
20
22
|
/**
|
|
21
|
-
* The
|
|
23
|
+
* The order for the results, default to created.
|
|
22
24
|
*/
|
|
23
|
-
|
|
25
|
+
orderBy?: keyof Pick<IBlobStorageEntry, "dateCreated" | "dateModified">;
|
|
26
|
+
/**
|
|
27
|
+
* The direction for the order, defaults to desc.
|
|
28
|
+
*/
|
|
29
|
+
orderByDirection?: SortDirection;
|
|
24
30
|
/**
|
|
25
31
|
* The number of entries to return per page.
|
|
26
32
|
*/
|
package/docs/changelog.md
CHANGED
|
@@ -166,7 +166,7 @@ Not found error if the blob cannot be found.
|
|
|
166
166
|
|
|
167
167
|
### query()
|
|
168
168
|
|
|
169
|
-
> **query**(`conditions`?, `
|
|
169
|
+
> **query**(`conditions`?, `orderBy`?, `orderByDirection`?, `cursor`?, `pageSize`?, `userIdentity`?, `nodeIdentity`?): `Promise`\<[`IBlobStorageEntryList`](IBlobStorageEntryList.md)\>
|
|
170
170
|
|
|
171
171
|
Query all the blob storage entries which match the conditions.
|
|
172
172
|
|
|
@@ -176,9 +176,13 @@ Query all the blob storage entries which match the conditions.
|
|
|
176
176
|
|
|
177
177
|
The conditions to match for the entries.
|
|
178
178
|
|
|
179
|
-
• **
|
|
179
|
+
• **orderBy?**: `"dateCreated"` \| `"dateModified"`
|
|
180
180
|
|
|
181
|
-
The
|
|
181
|
+
The order for the results, defaults to created.
|
|
182
|
+
|
|
183
|
+
• **orderByDirection?**: `SortDirection`
|
|
184
|
+
|
|
185
|
+
The direction for the order, defaults to descending.
|
|
182
186
|
|
|
183
187
|
• **cursor?**: `string`
|
|
184
188
|
|
|
@@ -28,11 +28,17 @@ The parameters from the query.
|
|
|
28
28
|
|
|
29
29
|
The condition for the query as JSON version of EntityCondition type.
|
|
30
30
|
|
|
31
|
-
####
|
|
31
|
+
#### orderBy?
|
|
32
32
|
|
|
33
|
-
> `optional` **
|
|
33
|
+
> `optional` **orderBy**: `"dateCreated"` \| `"dateModified"`
|
|
34
34
|
|
|
35
|
-
The
|
|
35
|
+
The order for the results, default to created.
|
|
36
|
+
|
|
37
|
+
#### orderByDirection?
|
|
38
|
+
|
|
39
|
+
> `optional` **orderByDirection**: `SortDirection`
|
|
40
|
+
|
|
41
|
+
The direction for the order, defaults to desc.
|
|
36
42
|
|
|
37
43
|
#### pageSize?
|
|
38
44
|
|