@twin.org/blob-storage-rest-client 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/cjs/index.cjs
CHANGED
|
@@ -109,20 +109,22 @@ class BlobStorageClient extends apiCore.BaseRestClient {
|
|
|
109
109
|
/**
|
|
110
110
|
* Query all the blob storage entries which match the conditions.
|
|
111
111
|
* @param conditions The conditions to match for the entries.
|
|
112
|
-
* @param
|
|
112
|
+
* @param orderBy The order for the results, defaults to created.
|
|
113
|
+
* @param orderByDirection The direction for the order, defaults to descending.
|
|
113
114
|
* @param cursor The cursor to request the next page of entries.
|
|
114
115
|
* @param pageSize The suggested number of entries to return in each chunk, in some scenarios can return a different amount.
|
|
115
116
|
* @returns All the entries for the storage matching the conditions,
|
|
116
117
|
* and a cursor which can be used to request more entities.
|
|
117
118
|
*/
|
|
118
|
-
async query(conditions,
|
|
119
|
+
async query(conditions, orderBy, orderByDirection, cursor, pageSize) {
|
|
119
120
|
const response = await this.fetch("/", "GET", {
|
|
120
121
|
headers: {
|
|
121
122
|
[web.HeaderTypes.Accept]: web.MimeTypes.JsonLd
|
|
122
123
|
},
|
|
123
124
|
query: {
|
|
124
125
|
conditions: apiModels.HttpParameterHelper.objectToString(conditions),
|
|
125
|
-
|
|
126
|
+
orderBy,
|
|
127
|
+
orderByDirection,
|
|
126
128
|
pageSize,
|
|
127
129
|
cursor
|
|
128
130
|
}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -107,20 +107,22 @@ class BlobStorageClient extends BaseRestClient {
|
|
|
107
107
|
/**
|
|
108
108
|
* Query all the blob storage entries which match the conditions.
|
|
109
109
|
* @param conditions The conditions to match for the entries.
|
|
110
|
-
* @param
|
|
110
|
+
* @param orderBy The order for the results, defaults to created.
|
|
111
|
+
* @param orderByDirection The direction for the order, defaults to descending.
|
|
111
112
|
* @param cursor The cursor to request the next page of entries.
|
|
112
113
|
* @param pageSize The suggested number of entries to return in each chunk, in some scenarios can return a different amount.
|
|
113
114
|
* @returns All the entries for the storage matching the conditions,
|
|
114
115
|
* and a cursor which can be used to request more entities.
|
|
115
116
|
*/
|
|
116
|
-
async query(conditions,
|
|
117
|
+
async query(conditions, orderBy, orderByDirection, cursor, pageSize) {
|
|
117
118
|
const response = await this.fetch("/", "GET", {
|
|
118
119
|
headers: {
|
|
119
120
|
[HeaderTypes.Accept]: MimeTypes.JsonLd
|
|
120
121
|
},
|
|
121
122
|
query: {
|
|
122
123
|
conditions: HttpParameterHelper.objectToString(conditions),
|
|
123
|
-
|
|
124
|
+
orderBy,
|
|
125
|
+
orderByDirection,
|
|
124
126
|
pageSize,
|
|
125
127
|
cursor
|
|
126
128
|
}
|
|
@@ -53,16 +53,14 @@ export declare class BlobStorageClient extends BaseRestClient implements IBlobSt
|
|
|
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
|
* @returns All the entries for the storage matching the conditions,
|
|
60
61
|
* and a cursor which can be used to request more entities.
|
|
61
62
|
*/
|
|
62
|
-
query(conditions?: EntityCondition<IBlobStorageEntry>,
|
|
63
|
-
property: keyof Pick<IBlobStorageEntry, "dateCreated" | "dateModified">;
|
|
64
|
-
sortDirection: SortDirection;
|
|
65
|
-
}[], cursor?: string, pageSize?: number): Promise<IBlobStorageEntryList>;
|
|
63
|
+
query(conditions?: EntityCondition<IBlobStorageEntry>, orderBy?: keyof Pick<IBlobStorageEntry, "dateCreated" | "dateModified">, orderByDirection?: SortDirection, cursor?: string, pageSize?: number): Promise<IBlobStorageEntryList>;
|
|
66
64
|
/**
|
|
67
65
|
* Create a download link for the blob.
|
|
68
66
|
* @param id The id of the blob to get in urn format.
|
package/docs/changelog.md
CHANGED
|
@@ -184,7 +184,7 @@ Nothing.
|
|
|
184
184
|
|
|
185
185
|
### query()
|
|
186
186
|
|
|
187
|
-
> **query**(`conditions`?, `
|
|
187
|
+
> **query**(`conditions`?, `orderBy`?, `orderByDirection`?, `cursor`?, `pageSize`?): `Promise`\<`IBlobStorageEntryList`\>
|
|
188
188
|
|
|
189
189
|
Query all the blob storage entries which match the conditions.
|
|
190
190
|
|
|
@@ -194,9 +194,13 @@ Query all the blob storage entries which match the conditions.
|
|
|
194
194
|
|
|
195
195
|
The conditions to match for the entries.
|
|
196
196
|
|
|
197
|
-
• **
|
|
197
|
+
• **orderBy?**: `"dateCreated"` \| `"dateModified"`
|
|
198
198
|
|
|
199
|
-
The
|
|
199
|
+
The order for the results, defaults to created.
|
|
200
|
+
|
|
201
|
+
• **orderByDirection?**: `SortDirection`
|
|
202
|
+
|
|
203
|
+
The direction for the order, defaults to descending.
|
|
200
204
|
|
|
201
205
|
• **cursor?**: `string`
|
|
202
206
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/blob-storage-rest-client",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.15",
|
|
4
4
|
"description": "Blob storage implementation which can connect to REST endpoints",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@twin.org/api-core": "next",
|
|
18
18
|
"@twin.org/api-models": "next",
|
|
19
|
-
"@twin.org/blob-storage-models": "0.0.1-next.
|
|
19
|
+
"@twin.org/blob-storage-models": "0.0.1-next.15",
|
|
20
20
|
"@twin.org/core": "next",
|
|
21
21
|
"@twin.org/data-json-ld": "next",
|
|
22
22
|
"@twin.org/entity": "next",
|