@01.software/sdk 0.5.0 → 0.5.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/auth.d.cts +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/{const-hqVXNZoy.d.cts → const-CDpRB7XK.d.cts} +1 -1
- package/dist/{const-BO4SPN7f.d.ts → const-DQIDvvB-.d.ts} +1 -1
- package/dist/index.cjs +13 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +35 -23
- package/dist/index.d.ts +35 -23
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-mZpmjJBz.d.cts → payload-types-C-keX5go.d.cts} +10 -37
- package/dist/{payload-types-mZpmjJBz.d.ts → payload-types-C-keX5go.d.ts} +10 -37
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/realtime.js.map +1 -1
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/video.d.cts +1 -1
- package/dist/ui/video.d.ts +1 -1
- package/dist/{webhook-D65mzWt2.d.cts → webhook-Dqe2_xMx.d.cts} +2 -2
- package/dist/{webhook-CMi4JRCp.d.ts → webhook-DseJdRFT.d.ts} +2 -2
- package/dist/webhook.d.cts +3 -3
- package/dist/webhook.d.ts +3 -3
- package/package.json +3 -3
package/dist/auth.d.cts
CHANGED
package/dist/auth.d.ts
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1698,14 +1698,15 @@ var CollectionHooks = class {
|
|
|
1698
1698
|
// ===== useQuery =====
|
|
1699
1699
|
useQuery(params, options) {
|
|
1700
1700
|
const { collection, options: queryOptions } = params;
|
|
1701
|
-
|
|
1701
|
+
const _a = options != null ? options : {}, { placeholderData } = _a, restOptions = __objRest(_a, ["placeholderData"]);
|
|
1702
|
+
return (0, import_react_query2.useQuery)(__spreadValues(__spreadValues({
|
|
1702
1703
|
queryKey: collectionKeys(collection).list(queryOptions),
|
|
1703
1704
|
queryFn: () => __async(this, null, function* () {
|
|
1704
|
-
|
|
1705
|
-
const response = yield this.collectionClient.from(collection).find(queryOptions);
|
|
1706
|
-
return (_a = response.docs) != null ? _a : [];
|
|
1705
|
+
return yield this.collectionClient.from(collection).find(queryOptions);
|
|
1707
1706
|
})
|
|
1708
|
-
},
|
|
1707
|
+
}, restOptions), placeholderData !== void 0 && {
|
|
1708
|
+
placeholderData
|
|
1709
|
+
}));
|
|
1709
1710
|
}
|
|
1710
1711
|
// ===== useSuspenseQuery =====
|
|
1711
1712
|
useSuspenseQuery(params, options) {
|
|
@@ -1713,21 +1714,22 @@ var CollectionHooks = class {
|
|
|
1713
1714
|
return (0, import_react_query2.useSuspenseQuery)(__spreadValues({
|
|
1714
1715
|
queryKey: collectionKeys(collection).list(queryOptions),
|
|
1715
1716
|
queryFn: () => __async(this, null, function* () {
|
|
1716
|
-
|
|
1717
|
-
const response = yield this.collectionClient.from(collection).find(queryOptions);
|
|
1718
|
-
return (_a = response.docs) != null ? _a : [];
|
|
1717
|
+
return yield this.collectionClient.from(collection).find(queryOptions);
|
|
1719
1718
|
})
|
|
1720
1719
|
}, options));
|
|
1721
1720
|
}
|
|
1722
1721
|
// ===== useQueryById =====
|
|
1723
1722
|
useQueryById(params, options) {
|
|
1724
1723
|
const { collection, id, options: queryOptions } = params;
|
|
1725
|
-
|
|
1724
|
+
const _a = options != null ? options : {}, { placeholderData } = _a, restOptions = __objRest(_a, ["placeholderData"]);
|
|
1725
|
+
return (0, import_react_query2.useQuery)(__spreadValues(__spreadValues({
|
|
1726
1726
|
queryKey: collectionKeys(collection).detail(id, queryOptions),
|
|
1727
1727
|
queryFn: () => __async(this, null, function* () {
|
|
1728
1728
|
return yield this.collectionClient.from(collection).findById(id, queryOptions);
|
|
1729
1729
|
})
|
|
1730
|
-
},
|
|
1730
|
+
}, restOptions), placeholderData !== void 0 && {
|
|
1731
|
+
placeholderData
|
|
1732
|
+
}));
|
|
1731
1733
|
}
|
|
1732
1734
|
// ===== useSuspenseQueryById =====
|
|
1733
1735
|
useSuspenseQueryById(params, options) {
|
|
@@ -1784,9 +1786,7 @@ var CollectionHooks = class {
|
|
|
1784
1786
|
return this.queryClient.prefetchQuery(__spreadValues({
|
|
1785
1787
|
queryKey: collectionKeys(collection).list(queryOptions),
|
|
1786
1788
|
queryFn: () => __async(this, null, function* () {
|
|
1787
|
-
|
|
1788
|
-
const response = yield this.collectionClient.from(collection).find(queryOptions);
|
|
1789
|
-
return (_a = response.docs) != null ? _a : [];
|
|
1789
|
+
return yield this.collectionClient.from(collection).find(queryOptions);
|
|
1790
1790
|
})
|
|
1791
1791
|
}, options));
|
|
1792
1792
|
});
|