@01.software/sdk 0.5.0 → 0.5.2

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 CHANGED
@@ -1,4 +1,4 @@
1
- import './payload-types-mZpmjJBz.cjs';
1
+ import './payload-types-JCbsSVeL.cjs';
2
2
 
3
3
  interface JwtPayload {
4
4
  clientKey: string;
package/dist/auth.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import './payload-types-mZpmjJBz.js';
1
+ import './payload-types-JCbsSVeL.js';
2
2
 
3
3
  interface JwtPayload {
4
4
  clientKey: string;
@@ -1,4 +1,4 @@
1
- import { C as Config } from './payload-types-mZpmjJBz.js';
1
+ import { C as Config } from './payload-types-JCbsSVeL.js';
2
2
 
3
3
  /**
4
4
  * Collection type derived from Payload Config.
@@ -1,4 +1,4 @@
1
- import { C as Config } from './payload-types-mZpmjJBz.cjs';
1
+ import { C as Config } from './payload-types-JCbsSVeL.cjs';
2
2
 
3
3
  /**
4
4
  * Collection type derived from Payload Config.
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
- return (0, import_react_query2.useQuery)(__spreadValues({
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
- var _a;
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
- }, options));
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
- var _a;
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
- return (0, import_react_query2.useQuery)(__spreadValues({
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
- }, options));
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
- var _a;
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
  });