@singi-labs/sifa-sdk 0.12.37 → 0.12.39

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.
Files changed (49) hide show
  1. package/dist/badge/index.cjs +3 -0
  2. package/dist/badge/index.cjs.map +1 -1
  3. package/dist/badge/index.js +3 -0
  4. package/dist/badge/index.js.map +1 -1
  5. package/dist/{index-G5HiA-nk.d.cts → index-BPImvVQq.d.cts} +44 -2
  6. package/dist/{index-N0-ctbY1.d.ts → index-C1szgnQc.d.ts} +44 -2
  7. package/dist/{index-C-TwdQWh.d.cts → index-CO3z2uAZ.d.cts} +1 -1
  8. package/dist/{index-DzjbfKwZ.d.ts → index-DyffAaPT.d.ts} +1 -1
  9. package/dist/index.cjs +10 -3
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.cts +1 -1
  12. package/dist/index.d.ts +1 -1
  13. package/dist/index.js +10 -4
  14. package/dist/index.js.map +1 -1
  15. package/dist/{org-OPyzh-oe.d.cts → org-DPfmXSYv.d.cts} +24 -2
  16. package/dist/{org-BFi9g37U.d.ts → org-dEe3TbBJ.d.ts} +24 -2
  17. package/dist/publishing/index.cjs +3 -0
  18. package/dist/publishing/index.cjs.map +1 -1
  19. package/dist/publishing/index.js +3 -0
  20. package/dist/publishing/index.js.map +1 -1
  21. package/dist/query/fetchers/index.cjs +32 -2
  22. package/dist/query/fetchers/index.cjs.map +1 -1
  23. package/dist/query/fetchers/index.d.cts +2 -2
  24. package/dist/query/fetchers/index.d.ts +2 -2
  25. package/dist/query/fetchers/index.js +30 -3
  26. package/dist/query/fetchers/index.js.map +1 -1
  27. package/dist/query/hooks/index.cjs +8 -2
  28. package/dist/query/hooks/index.cjs.map +1 -1
  29. package/dist/query/hooks/index.d.cts +2 -2
  30. package/dist/query/hooks/index.d.ts +2 -2
  31. package/dist/query/hooks/index.js +8 -2
  32. package/dist/query/hooks/index.js.map +1 -1
  33. package/dist/query/index.cjs +83 -2
  34. package/dist/query/index.cjs.map +1 -1
  35. package/dist/query/index.d.cts +28 -6
  36. package/dist/query/index.d.ts +28 -6
  37. package/dist/query/index.js +78 -3
  38. package/dist/query/index.js.map +1 -1
  39. package/dist/schemas/index.cjs +9 -2
  40. package/dist/schemas/index.cjs.map +1 -1
  41. package/dist/schemas/index.d.cts +12 -3
  42. package/dist/schemas/index.d.ts +12 -3
  43. package/dist/schemas/index.js +9 -3
  44. package/dist/schemas/index.js.map +1 -1
  45. package/dist/schemas/write/index.cjs +3 -0
  46. package/dist/schemas/write/index.cjs.map +1 -1
  47. package/dist/schemas/write/index.js +3 -0
  48. package/dist/schemas/write/index.js.map +1 -1
  49. package/package.json +1 -1
@@ -87,6 +87,9 @@ async function apiFetch(config, path, options = {}) {
87
87
  }
88
88
  throw new ApiError(`Sifa API ${res.status} on ${path}`, res.status, errBody);
89
89
  }
90
+ if (res.status === 204 || res.status === 205) {
91
+ return void 0;
92
+ }
90
93
  return await res.json();
91
94
  }
92
95
  throw new ApiError(`Sifa API exhausted retries on ${path}`, 429);
@@ -216,7 +219,10 @@ var sifaQueryKeys = {
216
219
  },
217
220
  endorsement: {
218
221
  all: () => ["sifa", "endorsement"],
219
- count: (did) => ["sifa", "endorsement", "count", did]
222
+ count: (did) => ["sifa", "endorsement", "count", did],
223
+ // Scoped to the session rather than a DID -- the AppView reads the subject
224
+ // from the session cookie, so there is only ever one inbox per client.
225
+ pending: () => ["sifa", "endorsement", "pending"]
220
226
  },
221
227
  stream: {
222
228
  all: () => ["sifa", "stream"],
@@ -1025,7 +1031,7 @@ function useVerifyExternalAccount(ownerHandleOrDid, options) {
1025
1031
 
1026
1032
  // src/query/fetchers/endorsements.ts
1027
1033
  function createEndorsement(config, data, options = {}) {
1028
- return apiWriteCreate(config, "/api/endorsements", data, options);
1034
+ return apiWriteCreate(config, "/api/endorsement", data, options);
1029
1035
  }
1030
1036
 
1031
1037
  // src/query/hooks/use-endorsement-mutations.ts