@capxul/sdk-react 0.1.0-alpha.2 → 0.1.0-alpha.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @capxul/sdk-react
2
2
 
3
+ ## 0.1.0-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Re-export `tryCatch` from `@capxul/sdk`.
8
+
9
+ `tryCatch` is referenced in `packages/sdk/README.md` (live on npm at
10
+ `0.1.0-alpha.2`) and in `.claude/rules/sdk.md` as the canonical
11
+ async-error helper for SDK operations:
12
+
13
+ ```ts
14
+ import { tryCatch } from "@capxul/sdk";
15
+
16
+ const [err, payment] = await tryCatch(capxul.payments.create({ ... }));
17
+ ```
18
+
19
+ The helper lives at `@repo/observability/try-catch.ts` and is bundled
20
+ into the SDK dist via tsup `noExternal`, but it was never re-exported
21
+ from `packages/sdk/src/index.ts`. Consumers following the README example
22
+ hit `Module '"@capxul/sdk"' has no exported member 'tryCatch'.` at
23
+ import time.
24
+
25
+ Caught during alpha.2 spike-install verification (REVIEW.html, "What's
26
+ not proven" row 6). One-line public-export addition; no runtime change.
27
+
28
+ - Updated dependencies
29
+ - @capxul/sdk@0.1.0-alpha.3
30
+
3
31
  ## 0.1.0-alpha.2
4
32
 
5
33
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -322,12 +322,8 @@ function useBalanceLedgerEntry(_args) {
322
322
  function useDocument(_documentId) {
323
323
  return notImplementedQuery("useDocument");
324
324
  }
325
- function useWithdrawal(withdrawalId) {
326
- const capxul = useCapxul();
327
- return useSdkQuery(() => capxul.withdrawals.retrieve(withdrawalId), [
328
- capxul,
329
- withdrawalId
330
- ]);
325
+ function useWithdrawal(_withdrawalId) {
326
+ return notImplementedQuery("useWithdrawal");
331
327
  }
332
328
  function useOperation(operationId) {
333
329
  const capxul = useCapxul();
@@ -383,19 +379,11 @@ function useDocuments(_filters) {
383
379
  function useOrgDocuments(_args) {
384
380
  return notImplementedQuery("useOrgDocuments");
385
381
  }
386
- function useWithdrawals(filters) {
387
- const capxul = useCapxul();
388
- return useSdkQuery(
389
- () => capxul.withdrawals.list(filters),
390
- [capxul, filters?.limit, filters?.cursor]
391
- );
382
+ function useWithdrawals(_filters) {
383
+ return notImplementedQuery("useWithdrawals");
392
384
  }
393
- function useOrgWithdrawals(args) {
394
- const capxul = useCapxul();
395
- return useSdkQuery(
396
- () => capxul.organizations.withdrawals.list(args),
397
- [capxul, args.organizationId, args.limit, args.cursor]
398
- );
385
+ function useOrgWithdrawals(_args) {
386
+ return notImplementedQuery("useOrgWithdrawals");
399
387
  }
400
388
  function useApiKeys(_organizationId) {
401
389
  return notImplementedQuery("useApiKeys");
package/dist/index.d.cts CHANGED
@@ -249,12 +249,7 @@ declare function useTransfer(_transferId: TransferId): QueryResult<Transfer>;
249
249
  */
250
250
  declare function useBalanceLedgerEntry(_args: UseBalanceLedgerEntryArgs): QueryResult<BalanceLedgerEntry>;
251
251
  declare function useDocument(_documentId: DocumentId): QueryResult<Document>;
252
- /**
253
- * Withdrawals v1 slice 1 (#440) — wired through `capxul.withdrawals.retrieve`.
254
- * Mirrors `useOperation` (the canonical evidence subscription) since
255
- * the withdrawal resource is operation-shaped at its core.
256
- */
257
- declare function useWithdrawal(withdrawalId: WithdrawalId): QueryResult<Withdrawal>;
252
+ declare function useWithdrawal(_withdrawalId: WithdrawalId): QueryResult<Withdrawal>;
258
253
  /**
259
254
  * The canonical evidence subscription per CANON.md §3.3 —
260
255
  * `operationId` + `correlationId` are the cross-layer join keys for
@@ -357,15 +352,8 @@ declare function useBalanceLedger(_args: OwnerScopedFilters): QueryResult<List<B
357
352
  */
358
353
  declare function useDocuments(_filters?: DocumentsFilters): QueryResult<List<Document>>;
359
354
  declare function useOrgDocuments(_args: OrgDocumentsFilters): QueryResult<List<Document>>;
360
- /**
361
- * Withdrawals v1 slice 1 (#440) — wired through `capxul.withdrawals.list`.
362
- */
363
- declare function useWithdrawals(filters?: WithdrawalsFilters): QueryResult<List<Withdrawal>>;
364
- /**
365
- * Withdrawals v1 slice 1 (#440) — wired through
366
- * `capxul.organizations.withdrawals.list`.
367
- */
368
- declare function useOrgWithdrawals(args: OrgScopedFilters): QueryResult<List<Withdrawal>>;
355
+ declare function useWithdrawals(_filters?: WithdrawalsFilters): QueryResult<List<Withdrawal>>;
356
+ declare function useOrgWithdrawals(_args: OrgScopedFilters): QueryResult<List<Withdrawal>>;
369
357
  /**
370
358
  * Org-admin lens only — the hook NEVER returns `secret` for any row.
371
359
  */
package/dist/index.d.ts CHANGED
@@ -249,12 +249,7 @@ declare function useTransfer(_transferId: TransferId): QueryResult<Transfer>;
249
249
  */
250
250
  declare function useBalanceLedgerEntry(_args: UseBalanceLedgerEntryArgs): QueryResult<BalanceLedgerEntry>;
251
251
  declare function useDocument(_documentId: DocumentId): QueryResult<Document>;
252
- /**
253
- * Withdrawals v1 slice 1 (#440) — wired through `capxul.withdrawals.retrieve`.
254
- * Mirrors `useOperation` (the canonical evidence subscription) since
255
- * the withdrawal resource is operation-shaped at its core.
256
- */
257
- declare function useWithdrawal(withdrawalId: WithdrawalId): QueryResult<Withdrawal>;
252
+ declare function useWithdrawal(_withdrawalId: WithdrawalId): QueryResult<Withdrawal>;
258
253
  /**
259
254
  * The canonical evidence subscription per CANON.md §3.3 —
260
255
  * `operationId` + `correlationId` are the cross-layer join keys for
@@ -357,15 +352,8 @@ declare function useBalanceLedger(_args: OwnerScopedFilters): QueryResult<List<B
357
352
  */
358
353
  declare function useDocuments(_filters?: DocumentsFilters): QueryResult<List<Document>>;
359
354
  declare function useOrgDocuments(_args: OrgDocumentsFilters): QueryResult<List<Document>>;
360
- /**
361
- * Withdrawals v1 slice 1 (#440) — wired through `capxul.withdrawals.list`.
362
- */
363
- declare function useWithdrawals(filters?: WithdrawalsFilters): QueryResult<List<Withdrawal>>;
364
- /**
365
- * Withdrawals v1 slice 1 (#440) — wired through
366
- * `capxul.organizations.withdrawals.list`.
367
- */
368
- declare function useOrgWithdrawals(args: OrgScopedFilters): QueryResult<List<Withdrawal>>;
355
+ declare function useWithdrawals(_filters?: WithdrawalsFilters): QueryResult<List<Withdrawal>>;
356
+ declare function useOrgWithdrawals(_args: OrgScopedFilters): QueryResult<List<Withdrawal>>;
369
357
  /**
370
358
  * Org-admin lens only — the hook NEVER returns `secret` for any row.
371
359
  */
package/dist/index.js CHANGED
@@ -320,12 +320,8 @@ function useBalanceLedgerEntry(_args) {
320
320
  function useDocument(_documentId) {
321
321
  return notImplementedQuery("useDocument");
322
322
  }
323
- function useWithdrawal(withdrawalId) {
324
- const capxul = useCapxul();
325
- return useSdkQuery(() => capxul.withdrawals.retrieve(withdrawalId), [
326
- capxul,
327
- withdrawalId
328
- ]);
323
+ function useWithdrawal(_withdrawalId) {
324
+ return notImplementedQuery("useWithdrawal");
329
325
  }
330
326
  function useOperation(operationId) {
331
327
  const capxul = useCapxul();
@@ -381,19 +377,11 @@ function useDocuments(_filters) {
381
377
  function useOrgDocuments(_args) {
382
378
  return notImplementedQuery("useOrgDocuments");
383
379
  }
384
- function useWithdrawals(filters) {
385
- const capxul = useCapxul();
386
- return useSdkQuery(
387
- () => capxul.withdrawals.list(filters),
388
- [capxul, filters?.limit, filters?.cursor]
389
- );
380
+ function useWithdrawals(_filters) {
381
+ return notImplementedQuery("useWithdrawals");
390
382
  }
391
- function useOrgWithdrawals(args) {
392
- const capxul = useCapxul();
393
- return useSdkQuery(
394
- () => capxul.organizations.withdrawals.list(args),
395
- [capxul, args.organizationId, args.limit, args.cursor]
396
- );
383
+ function useOrgWithdrawals(_args) {
384
+ return notImplementedQuery("useOrgWithdrawals");
397
385
  }
398
386
  function useApiKeys(_organizationId) {
399
387
  return notImplementedQuery("useApiKeys");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capxul/sdk-react",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.3",
4
4
  "description": "React provider + hooks for the @capxul/sdk headless client.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -41,7 +41,7 @@
41
41
  "access": "public"
42
42
  },
43
43
  "dependencies": {
44
- "@capxul/sdk": "0.1.0-alpha.2"
44
+ "@capxul/sdk": "0.1.0-alpha.3"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@tanstack/react-query": "^5",