@djangocfg/ext-payments 1.0.19 → 1.0.21

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.js CHANGED
@@ -1791,10 +1791,6 @@ var API = class {
1791
1791
  return "./schema.json";
1792
1792
  }
1793
1793
  };
1794
-
1795
- // src/api/index.ts
1796
- initializeExtensionAPI(configureAPI);
1797
- var apiPayments = createExtensionAPI(API);
1798
1794
  function usePaymentsBalanceRetrieve(client) {
1799
1795
  return useSWR(
1800
1796
  "cfg-payments-balance",
@@ -1849,6 +1845,10 @@ function useCreatePaymentsWithdrawalsCreateCreate() {
1849
1845
  return result;
1850
1846
  };
1851
1847
  }
1848
+
1849
+ // src/api/index.ts
1850
+ initializeExtensionAPI(configureAPI);
1851
+ var apiPayments = createExtensionAPI(API);
1852
1852
  var WalletContext = createContext(void 0);
1853
1853
  function WalletProvider({ children }) {
1854
1854
  const {
@@ -3437,7 +3437,7 @@ function WalletPage() {
3437
3437
  // package.json
3438
3438
  var package_default = {
3439
3439
  name: "@djangocfg/ext-payments",
3440
- version: "1.0.19",
3440
+ version: "1.0.21",
3441
3441
  description: "Payments system extension for DjangoCFG",
3442
3442
  keywords: [
3443
3443
  "django",
@@ -3478,6 +3478,16 @@ var package_default = {
3478
3478
  types: "./dist/config.d.ts",
3479
3479
  import: "./dist/config.js",
3480
3480
  require: "./dist/config.cjs"
3481
+ },
3482
+ "./api": {
3483
+ types: "./dist/api/index.d.ts",
3484
+ import: "./dist/api/index.js",
3485
+ require: "./dist/api/index.cjs"
3486
+ },
3487
+ "./api/hooks": {
3488
+ types: "./dist/api/hooks.d.ts",
3489
+ import: "./dist/api/hooks.js",
3490
+ require: "./dist/api/hooks.cjs"
3481
3491
  }
3482
3492
  },
3483
3493
  files: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/ext-payments",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "Payments system extension for DjangoCFG",
5
5
  "keywords": [
6
6
  "django",
@@ -41,6 +41,16 @@
41
41
  "types": "./dist/config.d.ts",
42
42
  "import": "./dist/config.js",
43
43
  "require": "./dist/config.cjs"
44
+ },
45
+ "./api": {
46
+ "types": "./dist/api/index.d.ts",
47
+ "import": "./dist/api/index.js",
48
+ "require": "./dist/api/index.cjs"
49
+ },
50
+ "./api/hooks": {
51
+ "types": "./dist/api/hooks.d.ts",
52
+ "import": "./dist/api/hooks.js",
53
+ "require": "./dist/api/hooks.cjs"
44
54
  }
45
55
  },
46
56
  "files": [
@@ -55,7 +65,7 @@
55
65
  },
56
66
  "peerDependencies": {
57
67
  "@djangocfg/api": "^2.1.109",
58
- "@djangocfg/ext-base": "^1.0.14",
68
+ "@djangocfg/ext-base": "^1.0.16",
59
69
  "@djangocfg/ui-core": "^2.1.109",
60
70
  "@djangocfg/ui-nextjs": "^2.1.109",
61
71
  "consola": "^3.4.2",
@@ -71,7 +81,7 @@
71
81
  },
72
82
  "devDependencies": {
73
83
  "@djangocfg/api": "^2.1.109",
74
- "@djangocfg/ext-base": "^1.0.14",
84
+ "@djangocfg/ext-base": "^1.0.16",
75
85
  "@djangocfg/typescript-config": "^2.1.109",
76
86
  "@djangocfg/ui-nextjs": "^2.1.109",
77
87
  "@types/node": "^24.7.2",
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Payments API Hooks (SWR)
3
+ *
4
+ * Generated SWR hooks for payments API.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * import { usePaymentsBalanceRetrieve } from '@djangocfg/ext-payments/api-hooks';
9
+ *
10
+ * const { data: balance, isLoading } = usePaymentsBalanceRetrieve();
11
+ * ```
12
+ */
13
+
14
+ 'use client';
15
+
16
+ export * from './generated/ext_payments/_utils/hooks';
package/src/api/index.ts CHANGED
@@ -3,7 +3,14 @@ import { createExtensionAPI, initializeExtensionAPI } from '@djangocfg/ext-base/
3
3
  /**
4
4
  * Payments Extension API
5
5
  *
6
- * Pre-configured API instance with shared authentication
6
+ * Pre-configured API instance with shared authentication.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * import { apiPayments } from '@djangocfg/ext-payments/api';
11
+ *
12
+ * const balance = await apiPayments.payments.balanceRetrieve();
13
+ * ```
7
14
  */
8
15
  import { API } from './generated/ext_payments';
9
16
  import { configureAPI } from './generated/ext_payments/api-instance';
@@ -13,3 +20,15 @@ initializeExtensionAPI(configureAPI);
13
20
 
14
21
  // Create instance for direct usage
15
22
  export const apiPayments = createExtensionAPI(API);
23
+
24
+ // Re-export API client
25
+ export { API } from './generated/ext_payments';
26
+
27
+ // Re-export schemas/types
28
+ export * from './generated/ext_payments/_utils/schemas';
29
+
30
+ // Re-export fetchers
31
+ export * from './generated/ext_payments/_utils/fetchers';
32
+
33
+ // Re-export hooks
34
+ export * from './generated/ext_payments/_utils/hooks';