@opendatalabs/vana-sdk 3.3.0 → 3.4.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.
- package/dist/index.browser.d.ts +1 -1
- package/dist/index.browser.js +12 -6
- package/dist/index.browser.js.map +2 -2
- package/dist/index.node.cjs +12 -6
- package/dist/index.node.cjs.map +2 -2
- package/dist/index.node.d.ts +1 -1
- package/dist/index.node.js +12 -6
- package/dist/index.node.js.map +2 -2
- package/dist/protocol/gateway.cjs +12 -6
- package/dist/protocol/gateway.cjs.map +1 -1
- package/dist/protocol/gateway.d.ts +30 -1
- package/dist/protocol/gateway.js +12 -6
- package/dist/protocol/gateway.js.map +1 -1
- package/package.json +1 -1
package/dist/index.node.cjs
CHANGED
|
@@ -33356,7 +33356,8 @@ function createGatewayClient(baseUrl) {
|
|
|
33356
33356
|
owner: record.owner ?? record.ownerAddress ?? "",
|
|
33357
33357
|
url: record.url,
|
|
33358
33358
|
schemaId: record.schemaId,
|
|
33359
|
-
createdAt: record.createdAt ?? record.addedAt ?? ""
|
|
33359
|
+
createdAt: record.createdAt ?? record.addedAt ?? "",
|
|
33360
|
+
deletedAt: record.deletedAt ?? null
|
|
33360
33361
|
};
|
|
33361
33362
|
}
|
|
33362
33363
|
function getMutationId(body, key) {
|
|
@@ -33416,19 +33417,24 @@ function createGatewayClient(baseUrl) {
|
|
|
33416
33417
|
}
|
|
33417
33418
|
return normalizeFileRecord(await unwrapEnvelope(res));
|
|
33418
33419
|
},
|
|
33419
|
-
async listFilesSince(owner, cursor) {
|
|
33420
|
+
async listFilesSince(owner, cursor, options) {
|
|
33420
33421
|
const params = new URLSearchParams({ user: owner });
|
|
33421
33422
|
if (cursor !== null) {
|
|
33422
|
-
params.set("
|
|
33423
|
+
params.set("cursor", cursor);
|
|
33424
|
+
}
|
|
33425
|
+
if (options?.includeDeleted) {
|
|
33426
|
+
params.set("includeDeleted", "true");
|
|
33423
33427
|
}
|
|
33424
33428
|
const res = await fetch(`${base}/v1/files?${params.toString()}`);
|
|
33425
33429
|
if (!res.ok) {
|
|
33426
33430
|
throw new Error(`Gateway error: ${res.status} ${res.statusText}`);
|
|
33427
33431
|
}
|
|
33428
|
-
const
|
|
33432
|
+
const envelope = await res.json();
|
|
33433
|
+
const { pagination } = envelope;
|
|
33434
|
+
const nextCursor = pagination?.hasMore === false ? null : pagination?.nextCursor ?? envelope.data.cursor ?? null;
|
|
33429
33435
|
return {
|
|
33430
|
-
files: data.files.map(normalizeFileRecord),
|
|
33431
|
-
cursor:
|
|
33436
|
+
files: envelope.data.files.map(normalizeFileRecord),
|
|
33437
|
+
cursor: nextCursor
|
|
33432
33438
|
};
|
|
33433
33439
|
},
|
|
33434
33440
|
async getSchema(schemaId) {
|