@agentpaid/paid-nextjs-client 0.3.0 → 0.3.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/README.md +28 -97
- package/dist/api/api/handleBlocks.ts +144 -0
- package/dist/api/handleBlocks.d.ts +9 -0
- package/dist/api/handleBlocks.d.ts.map +1 -0
- package/dist/api/handleBlocks.js +107 -0
- package/dist/api/handleBlocks.js.map +1 -0
- package/dist/components/PaidActivityLog.d.ts +2 -2
- package/dist/components/PaidActivityLog.d.ts.map +1 -1
- package/dist/components/PaidActivityLog.js +24 -7
- package/dist/components/PaidActivityLog.js.map +1 -1
- package/dist/components/PaidInvoiceTable.d.ts +1 -1
- package/dist/components/PaidInvoiceTable.d.ts.map +1 -1
- package/dist/components/PaidInvoiceTable.js +29 -8
- package/dist/components/PaidInvoiceTable.js.map +1 -1
- package/dist/components/PaidPaymentsTable.d.ts +1 -1
- package/dist/components/PaidPaymentsTable.d.ts.map +1 -1
- package/dist/components/PaidPaymentsTable.js +15 -7
- package/dist/components/PaidPaymentsTable.js.map +1 -1
- package/dist/components/components/PaidActivityLog.js +28 -12
- package/dist/components/components/PaidInvoiceTable.js +33 -13
- package/dist/components/components/PaidPaymentsTable.js +18 -12
- package/dist/hooks/useCache.d.ts +2 -2
- package/dist/hooks/useCache.d.ts.map +1 -1
- package/dist/hooks/useCache.js +10 -17
- package/dist/hooks/useCache.js.map +1 -1
- package/dist/index.d.ts +2 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/apiClient.d.ts +17 -0
- package/dist/utils/apiClient.d.ts.map +1 -0
- package/dist/utils/apiClient.js +60 -0
- package/dist/utils/apiClient.js.map +1 -0
- package/package.json +1 -1
- package/dist/api/api/handlePaidInvoicePdf.ts +0 -79
- package/dist/api/api/handlePaidInvoices.ts +0 -77
- package/dist/api/api/handlePaidPayments.ts +0 -77
- package/dist/api/api/handlePaidUsage.ts +0 -52
- package/dist/api/handlePaidInvoicePdf.d.ts +0 -6
- package/dist/api/handlePaidInvoicePdf.d.ts.map +0 -1
- package/dist/api/handlePaidInvoicePdf.js +0 -60
- package/dist/api/handlePaidInvoicePdf.js.map +0 -1
- package/dist/api/handlePaidInvoices.d.ts +0 -6
- package/dist/api/handlePaidInvoices.d.ts.map +0 -1
- package/dist/api/handlePaidInvoices.js +0 -56
- package/dist/api/handlePaidInvoices.js.map +0 -1
- package/dist/api/handlePaidPayments.d.ts +0 -6
- package/dist/api/handlePaidPayments.d.ts.map +0 -1
- package/dist/api/handlePaidPayments.js +0 -56
- package/dist/api/handlePaidPayments.js.map +0 -1
- package/dist/api/handlePaidUsage.d.ts +0 -6
- package/dist/api/handlePaidUsage.d.ts.map +0 -1
- package/dist/api/handlePaidUsage.js +0 -35
- package/dist/api/handlePaidUsage.js.map +0 -1
- /package/dist/styles/{activity-log-table.css → paid-activity-log.css} +0 -0
package/README.md
CHANGED
@@ -1,16 +1,15 @@
|
|
1
|
-
# Paid
|
1
|
+
# Paid.ai Blocks
|
2
2
|
|
3
|
-
Easily embed Paid.ai blocks in your Next.js app to display payments, invoices, and activity logs for specific
|
3
|
+
Easily embed Paid.ai blocks in your Next.js app to display payments, invoices, and activity logs for specific customers.
|
4
4
|
|
5
|
-
|
5
|
+
## Quick Setup
|
6
6
|
|
7
|
-
|
7
|
+
1. **Install**: `npm install @agentpaid/paid-nextjs-client`
|
8
|
+
2. **Add API key**: Set `PAID_API_KEY` in your `.env.local`
|
9
|
+
3. **Create one API route**: `src/app/api/[paidEndpoint]/[...params]/route.ts`
|
10
|
+
4. **Use components**: Import and use `PaidContainer` or individual blocks
|
8
11
|
|
9
|
-
|
10
|
-
- **Individual Blocks**: Standalone blocks for payments, invoices, and activity logs
|
11
|
-
- **Universal Styling**: Consistent styling system across all blocks
|
12
|
-
- **Plug-and-play**: Designed for Next.js 13+ (App Router)
|
13
|
-
- **Fully Responsive**: Works seamlessly across all device sizes
|
12
|
+
That's it! No complex configuration needed.
|
14
13
|
|
15
14
|
---
|
16
15
|
|
@@ -46,17 +45,17 @@ import {
|
|
46
45
|
{
|
47
46
|
id: 'payments',
|
48
47
|
label: 'Payments',
|
49
|
-
component: <PaidPaymentsTable
|
48
|
+
component: <PaidPaymentsTable customerExternalId="customer_123" />
|
50
49
|
},
|
51
50
|
{
|
52
51
|
id: 'invoices',
|
53
52
|
label: 'Invoices',
|
54
|
-
component: <PaidInvoiceTable
|
53
|
+
component: <PaidInvoiceTable customerExternalId="customer_123" />
|
55
54
|
},
|
56
55
|
{
|
57
56
|
id: 'activity-log',
|
58
57
|
label: 'Activity Log',
|
59
|
-
component: <PaidActivityLog
|
58
|
+
component: <PaidActivityLog customerExternalId="customer_123" />
|
60
59
|
}
|
61
60
|
]}
|
62
61
|
paidStyle={{
|
@@ -80,73 +79,38 @@ import {
|
|
80
79
|
} from '@agentpaid/paid-nextjs-client';
|
81
80
|
|
82
81
|
// Payments only
|
83
|
-
<PaidPaymentsTable
|
82
|
+
<PaidPaymentsTable customerExternalId="customer_123" />
|
84
83
|
|
85
84
|
// Invoices only
|
86
|
-
<PaidInvoiceTable
|
85
|
+
<PaidInvoiceTable customerExternalId="customer_123" />
|
87
86
|
|
88
87
|
// Activity log only
|
89
|
-
<PaidActivityLog
|
88
|
+
<PaidActivityLog customerExternalId="customer_123" />
|
90
89
|
```
|
91
90
|
|
92
91
|
---
|
93
92
|
|
94
93
|
## API Routes Setup
|
95
94
|
|
96
|
-
You need to create API
|
95
|
+
You need to create a single API route to handle all Paid.ai endpoints. **First, add your Paid.ai API key to `.env.local`:**
|
97
96
|
|
98
97
|
```env
|
99
98
|
PAID_API_KEY=your_paid_ai_api_key_here
|
100
99
|
```
|
101
100
|
|
102
|
-
###
|
103
|
-
|
104
|
-
**1. Payments API Route**
|
105
|
-
```bash
|
106
|
-
mkdir -p "src/app/api/payments/[accountExternalId]" && touch "src/app/api/payments/[accountExternalId]/route.ts"
|
107
|
-
```
|
108
|
-
|
109
|
-
Add to `src/app/api/payments/[accountExternalId]/route.ts`:
|
110
|
-
```ts
|
111
|
-
import { handlePaidPayments } from '@agentpaid/paid-nextjs-client';
|
112
|
-
|
113
|
-
export const GET = handlePaidPayments(process.env.PAID_API_KEY!);
|
114
|
-
```
|
115
|
-
|
116
|
-
**2. Invoices API Route**
|
117
|
-
```bash
|
118
|
-
mkdir -p "src/app/api/invoices/[accountExternalId]" && touch "src/app/api/invoices/[accountExternalId]/route.ts"
|
119
|
-
```
|
120
|
-
|
121
|
-
Add to `src/app/api/invoices/[accountExternalId]/route.ts`:
|
122
|
-
```ts
|
123
|
-
import { handlePaidInvoices } from '@agentpaid/paid-nextjs-client';
|
124
|
-
|
125
|
-
export const GET = handlePaidInvoices(process.env.PAID_API_KEY!);
|
126
|
-
```
|
127
|
-
|
128
|
-
**3. Activity Log API Route**
|
129
|
-
```bash
|
130
|
-
mkdir -p "src/app/api/usage/[accountExternalId]" && touch "src/app/api/usage/[accountExternalId]/route.ts"
|
131
|
-
```
|
132
|
-
|
133
|
-
Add to `src/app/api/usage/[accountExternalId]/route.ts`:
|
134
|
-
```ts
|
135
|
-
import { handlePaidUsage } from '@agentpaid/paid-nextjs-client';
|
101
|
+
### Single Unified API Route
|
136
102
|
|
137
|
-
|
138
|
-
```
|
103
|
+
Create one API route that handles all four endpoints:
|
139
104
|
|
140
|
-
**4. Invoice PDF API Route**
|
141
105
|
```bash
|
142
|
-
mkdir -p "src/app/api/
|
106
|
+
mkdir -p "src/app/api/[paidEndpoint]/[...params]" && touch "src/app/api/[paidEndpoint]/[...params]/route.ts"
|
143
107
|
```
|
144
108
|
|
145
|
-
Add to `src/app/api/
|
109
|
+
Add to `src/app/api/[paidEndpoint]/[...params]/route.ts`:
|
146
110
|
```ts
|
147
|
-
import {
|
111
|
+
import { handleBlocks } from '@agentpaid/paid-nextjs-client';
|
148
112
|
|
149
|
-
export const GET =
|
113
|
+
export const GET = handleBlocks();
|
150
114
|
```
|
151
115
|
|
152
116
|
---
|
@@ -168,7 +132,7 @@ export default function CustomerDashboard() {
|
|
168
132
|
|
169
133
|
<section style={{ marginBottom: '2rem' }}>
|
170
134
|
<p><strong>Welcome back!</strong></p>
|
171
|
-
<p>Here's a complete overview for
|
135
|
+
<p>Here's a complete overview for customer <code>customer_123</code>.</p>
|
172
136
|
</section>
|
173
137
|
|
174
138
|
<PaidContainer
|
@@ -179,17 +143,17 @@ export default function CustomerDashboard() {
|
|
179
143
|
{
|
180
144
|
id: 'payments',
|
181
145
|
label: 'Payments',
|
182
|
-
component: <PaidPaymentsTable
|
146
|
+
component: <PaidPaymentsTable customerExternalId="customer_123" />
|
183
147
|
},
|
184
148
|
{
|
185
149
|
id: 'invoices',
|
186
150
|
label: 'Invoices',
|
187
|
-
component: <PaidInvoiceTable
|
151
|
+
component: <PaidInvoiceTable customerExternalId="customer_123" />
|
188
152
|
},
|
189
153
|
{
|
190
154
|
id: 'activity-log',
|
191
155
|
label: 'Activity Log',
|
192
|
-
component: <PaidActivityLog
|
156
|
+
component: <PaidActivityLog customerExternalId="customer_123" />
|
193
157
|
}
|
194
158
|
]}
|
195
159
|
paidStyle={{
|
@@ -261,7 +225,7 @@ The Paid.ai blocks use a simplified, universal styling system. All blocks accept
|
|
261
225
|
{
|
262
226
|
id: 'payments',
|
263
227
|
label: 'Payments',
|
264
|
-
component: <PaidPaymentsTable
|
228
|
+
component: <PaidPaymentsTable customerExternalId="customer_123" />
|
265
229
|
}
|
266
230
|
]}
|
267
231
|
paidStyle={{
|
@@ -284,44 +248,11 @@ The Paid.ai blocks use a simplified, universal styling system. All blocks accept
|
|
284
248
|
|
285
249
|
```tsx
|
286
250
|
<PaidPaymentsTable
|
287
|
-
|
251
|
+
customerExternalId="customer_123"
|
288
252
|
paidStyle={{
|
289
253
|
primaryColor: '#dc2626',
|
290
254
|
buttonBgColor: '#fef2f2',
|
291
255
|
tableHoverColor: '#fee2e2'
|
292
256
|
}}
|
293
257
|
/>
|
294
|
-
```
|
295
|
-
|
296
|
-
---
|
297
|
-
|
298
|
-
## Props
|
299
|
-
|
300
|
-
### PaidContainer
|
301
|
-
|
302
|
-
| Prop | Type | Required | Description |
|
303
|
-
|------|------|----------|-------------|
|
304
|
-
| `title` | `string` | ❌ | Container title |
|
305
|
-
| `description` | `string` | ❌ | Container description |
|
306
|
-
| `defaultActiveTab` | `string` | ❌ | Default active tab ID |
|
307
|
-
| `tabs` | `Tab[]` | ✅ | Array of tab configurations |
|
308
|
-
| `paidStyle` | `PaidStyleProperties` | ❌ | Styling configuration |
|
309
|
-
|
310
|
-
### Individual Blocks
|
311
|
-
|
312
|
-
| Prop | Type | Required | Description |
|
313
|
-
|------|------|----------|-------------|
|
314
|
-
| `accountExternalId` | `string` | ✅ | Customer external ID |
|
315
|
-
| `paidStyle` | `PaidStyleProperties` | ❌ | Styling configuration |
|
316
|
-
|
317
|
-
---
|
318
|
-
|
319
|
-
## Features
|
320
|
-
|
321
|
-
- **Tabbed Interface**: PaidContainer provides easy navigation between data views
|
322
|
-
- **Pagination**: All tables include built-in pagination for large datasets
|
323
|
-
- **Responsive Design**: Works seamlessly on desktop, tablet, and mobile
|
324
|
-
- **Loading States**: Elegant loading indicators while data fetches
|
325
|
-
- **Error Handling**: Graceful error messages for failed requests
|
326
|
-
- **Caching**: Built-in request caching for improved performance
|
327
|
-
- **PDF Preview**: Invoice table includes PDF preview and download functionality
|
258
|
+
```
|
@@ -0,0 +1,144 @@
|
|
1
|
+
type PaidEndpoint = 'invoices' | 'payments' | 'invoice-pdf' | 'usage';
|
2
|
+
|
3
|
+
interface Params {
|
4
|
+
paidEndpoint: string;
|
5
|
+
params: string[];
|
6
|
+
}
|
7
|
+
|
8
|
+
export function handleBlocks(apiBase?: string) {
|
9
|
+
return async function GET(
|
10
|
+
_request: Request,
|
11
|
+
{ params }: { params: Params }
|
12
|
+
) {
|
13
|
+
try {
|
14
|
+
const apiKey = process.env.PAID_API_KEY;
|
15
|
+
|
16
|
+
if (!apiKey) {
|
17
|
+
console.log('handlePaidUnified - No API key found in environment variables');
|
18
|
+
return new Response(
|
19
|
+
JSON.stringify({ error: 'API key not configured. Please set PAID_API_KEY environment variable.' }),
|
20
|
+
{
|
21
|
+
status: 500,
|
22
|
+
headers: { 'Content-Type': 'application/json' }
|
23
|
+
}
|
24
|
+
);
|
25
|
+
}
|
26
|
+
|
27
|
+
if (!apiBase) {
|
28
|
+
apiBase = 'https://api.agentpaid.io';
|
29
|
+
}
|
30
|
+
|
31
|
+
const paidEndpoint = params.paidEndpoint as PaidEndpoint;
|
32
|
+
const routeParams = params.params || [];
|
33
|
+
|
34
|
+
let customerExternalId: string | undefined;
|
35
|
+
let invoiceId: string | undefined;
|
36
|
+
|
37
|
+
if (paidEndpoint === 'invoice-pdf') {
|
38
|
+
invoiceId = routeParams[0];
|
39
|
+
} else {
|
40
|
+
customerExternalId = routeParams[0];
|
41
|
+
}
|
42
|
+
|
43
|
+
if ((paidEndpoint === 'invoices' || paidEndpoint === 'payments' || paidEndpoint === 'usage') && !customerExternalId) {
|
44
|
+
return new Response(
|
45
|
+
JSON.stringify({ error: 'customerExternalId is required for this endpoint' }),
|
46
|
+
{
|
47
|
+
status: 400,
|
48
|
+
headers: { 'Content-Type': 'application/json' }
|
49
|
+
}
|
50
|
+
);
|
51
|
+
}
|
52
|
+
|
53
|
+
if (paidEndpoint === 'invoice-pdf' && !invoiceId) {
|
54
|
+
return new Response(
|
55
|
+
JSON.stringify({ error: 'invoiceId is required for invoice PDF endpoint' }),
|
56
|
+
{
|
57
|
+
status: 400,
|
58
|
+
headers: { 'Content-Type': 'application/json' }
|
59
|
+
}
|
60
|
+
);
|
61
|
+
}
|
62
|
+
|
63
|
+
let url: string;
|
64
|
+
switch (paidEndpoint) {
|
65
|
+
case 'invoices':
|
66
|
+
url = `${apiBase}/api/organizations/org/customer/external/${customerExternalId}/invoices`;
|
67
|
+
break;
|
68
|
+
case 'payments':
|
69
|
+
url = `${apiBase}/api/organizations/org/customer/external/${customerExternalId}/payments`;
|
70
|
+
break;
|
71
|
+
case 'invoice-pdf':
|
72
|
+
url = `${apiBase}/api/organizations/org/invoices/${invoiceId}/pdf`;
|
73
|
+
break;
|
74
|
+
case 'usage':
|
75
|
+
url = `${apiBase}/api/organizations/org/customer/external/${customerExternalId}`;
|
76
|
+
break;
|
77
|
+
default:
|
78
|
+
return new Response(
|
79
|
+
JSON.stringify({ error: `Unknown endpoint: ${paidEndpoint}` }),
|
80
|
+
{
|
81
|
+
status: 400,
|
82
|
+
headers: { 'Content-Type': 'application/json' }
|
83
|
+
}
|
84
|
+
);
|
85
|
+
}
|
86
|
+
|
87
|
+
const response = await fetch(url, {
|
88
|
+
headers: {
|
89
|
+
'Authorization': `Bearer ${apiKey}`,
|
90
|
+
},
|
91
|
+
});
|
92
|
+
|
93
|
+
if (!response.ok) {
|
94
|
+
let errorMessage = `HTTP ${response.status}: ${response.statusText}`;
|
95
|
+
try {
|
96
|
+
const errorData = await response.json();
|
97
|
+
errorMessage = errorData.error || errorData.message || errorMessage;
|
98
|
+
} catch (parseError) {
|
99
|
+
if (paidEndpoint === 'invoice-pdf') {
|
100
|
+
try {
|
101
|
+
const errorText = await response.text();
|
102
|
+
if (errorText) {
|
103
|
+
errorMessage = errorText;
|
104
|
+
}
|
105
|
+
} catch (textError) {
|
106
|
+
console.log(`handlePaidUnified - Could not parse error response for ${paidEndpoint}`);
|
107
|
+
}
|
108
|
+
} else {
|
109
|
+
console.log(`handlePaidUnified - Could not parse error response as JSON for ${paidEndpoint}`);
|
110
|
+
}
|
111
|
+
}
|
112
|
+
|
113
|
+
return new Response(
|
114
|
+
JSON.stringify({ error: errorMessage }),
|
115
|
+
{
|
116
|
+
status: response.status,
|
117
|
+
headers: { 'Content-Type': 'application/json' }
|
118
|
+
}
|
119
|
+
);
|
120
|
+
}
|
121
|
+
|
122
|
+
const data = await response.json();
|
123
|
+
return new Response(
|
124
|
+
JSON.stringify(data),
|
125
|
+
{
|
126
|
+
status: 200,
|
127
|
+
headers: { 'Content-Type': 'application/json' }
|
128
|
+
}
|
129
|
+
);
|
130
|
+
} catch (error) {
|
131
|
+
console.error(`Error in handlePaidUnified for ${params.paidEndpoint}:`, error);
|
132
|
+
return new Response(
|
133
|
+
JSON.stringify({
|
134
|
+
error: `Failed to fetch ${params.paidEndpoint} data`,
|
135
|
+
details: error instanceof Error ? error.message : String(error)
|
136
|
+
}),
|
137
|
+
{
|
138
|
+
status: 500,
|
139
|
+
headers: { 'Content-Type': 'application/json' }
|
140
|
+
}
|
141
|
+
);
|
142
|
+
}
|
143
|
+
};
|
144
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"handleBlocks.d.ts","sourceRoot":"","sources":["../../src/api/handleBlocks.ts"],"names":[],"mappings":"AAEA,UAAU,MAAM;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,cAE/B,OAAO;YACK,MAAM;wBAqI/B"}
|
@@ -0,0 +1,107 @@
|
|
1
|
+
export function handleBlocks(apiBase) {
|
2
|
+
return async function GET(_request, { params }) {
|
3
|
+
try {
|
4
|
+
const apiKey = process.env.PAID_API_KEY;
|
5
|
+
if (!apiKey) {
|
6
|
+
console.log('handlePaidUnified - No API key found in environment variables');
|
7
|
+
return new Response(JSON.stringify({ error: 'API key not configured. Please set PAID_API_KEY environment variable.' }), {
|
8
|
+
status: 500,
|
9
|
+
headers: { 'Content-Type': 'application/json' }
|
10
|
+
});
|
11
|
+
}
|
12
|
+
if (!apiBase) {
|
13
|
+
apiBase = 'https://api.agentpaid.io';
|
14
|
+
}
|
15
|
+
const paidEndpoint = params.paidEndpoint;
|
16
|
+
const routeParams = params.params || [];
|
17
|
+
let customerExternalId;
|
18
|
+
let invoiceId;
|
19
|
+
if (paidEndpoint === 'invoice-pdf') {
|
20
|
+
invoiceId = routeParams[0];
|
21
|
+
}
|
22
|
+
else {
|
23
|
+
customerExternalId = routeParams[0];
|
24
|
+
}
|
25
|
+
if ((paidEndpoint === 'invoices' || paidEndpoint === 'payments' || paidEndpoint === 'usage') && !customerExternalId) {
|
26
|
+
return new Response(JSON.stringify({ error: 'customerExternalId is required for this endpoint' }), {
|
27
|
+
status: 400,
|
28
|
+
headers: { 'Content-Type': 'application/json' }
|
29
|
+
});
|
30
|
+
}
|
31
|
+
if (paidEndpoint === 'invoice-pdf' && !invoiceId) {
|
32
|
+
return new Response(JSON.stringify({ error: 'invoiceId is required for invoice PDF endpoint' }), {
|
33
|
+
status: 400,
|
34
|
+
headers: { 'Content-Type': 'application/json' }
|
35
|
+
});
|
36
|
+
}
|
37
|
+
let url;
|
38
|
+
switch (paidEndpoint) {
|
39
|
+
case 'invoices':
|
40
|
+
url = `${apiBase}/api/organizations/org/customer/external/${customerExternalId}/invoices`;
|
41
|
+
break;
|
42
|
+
case 'payments':
|
43
|
+
url = `${apiBase}/api/organizations/org/customer/external/${customerExternalId}/payments`;
|
44
|
+
break;
|
45
|
+
case 'invoice-pdf':
|
46
|
+
url = `${apiBase}/api/organizations/org/invoices/${invoiceId}/pdf`;
|
47
|
+
break;
|
48
|
+
case 'usage':
|
49
|
+
url = `${apiBase}/api/organizations/org/customer/external/${customerExternalId}`;
|
50
|
+
break;
|
51
|
+
default:
|
52
|
+
return new Response(JSON.stringify({ error: `Unknown endpoint: ${paidEndpoint}` }), {
|
53
|
+
status: 400,
|
54
|
+
headers: { 'Content-Type': 'application/json' }
|
55
|
+
});
|
56
|
+
}
|
57
|
+
const response = await fetch(url, {
|
58
|
+
headers: {
|
59
|
+
'Authorization': `Bearer ${apiKey}`,
|
60
|
+
},
|
61
|
+
});
|
62
|
+
if (!response.ok) {
|
63
|
+
let errorMessage = `HTTP ${response.status}: ${response.statusText}`;
|
64
|
+
try {
|
65
|
+
const errorData = await response.json();
|
66
|
+
errorMessage = errorData.error || errorData.message || errorMessage;
|
67
|
+
}
|
68
|
+
catch (parseError) {
|
69
|
+
if (paidEndpoint === 'invoice-pdf') {
|
70
|
+
try {
|
71
|
+
const errorText = await response.text();
|
72
|
+
if (errorText) {
|
73
|
+
errorMessage = errorText;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
catch (textError) {
|
77
|
+
console.log(`handlePaidUnified - Could not parse error response for ${paidEndpoint}`);
|
78
|
+
}
|
79
|
+
}
|
80
|
+
else {
|
81
|
+
console.log(`handlePaidUnified - Could not parse error response as JSON for ${paidEndpoint}`);
|
82
|
+
}
|
83
|
+
}
|
84
|
+
return new Response(JSON.stringify({ error: errorMessage }), {
|
85
|
+
status: response.status,
|
86
|
+
headers: { 'Content-Type': 'application/json' }
|
87
|
+
});
|
88
|
+
}
|
89
|
+
const data = await response.json();
|
90
|
+
return new Response(JSON.stringify(data), {
|
91
|
+
status: 200,
|
92
|
+
headers: { 'Content-Type': 'application/json' }
|
93
|
+
});
|
94
|
+
}
|
95
|
+
catch (error) {
|
96
|
+
console.error(`Error in handlePaidUnified for ${params.paidEndpoint}:`, error);
|
97
|
+
return new Response(JSON.stringify({
|
98
|
+
error: `Failed to fetch ${params.paidEndpoint} data`,
|
99
|
+
details: error instanceof Error ? error.message : String(error)
|
100
|
+
}), {
|
101
|
+
status: 500,
|
102
|
+
headers: { 'Content-Type': 'application/json' }
|
103
|
+
});
|
104
|
+
}
|
105
|
+
};
|
106
|
+
}
|
107
|
+
//# sourceMappingURL=handleBlocks.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"handleBlocks.js","sourceRoot":"","sources":["../../src/api/handleBlocks.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,YAAY,CAAC,OAAgB;IAC3C,OAAO,KAAK,UAAU,GAAG,CACvB,QAAiB,EACjB,EAAE,MAAM,EAAsB;QAE9B,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;YAExC,IAAI,CAAC,MAAM,EAAE,CAAC;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AkB,EAAE;aAChD,CACF,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import '../styles/activity-log
|
2
|
+
import '../styles/paid-activity-log.css';
|
3
3
|
interface PaidStyleProperties {
|
4
4
|
fontFamily?: string;
|
5
5
|
primaryColor?: string;
|
@@ -14,7 +14,7 @@ interface PaidStyleProperties {
|
|
14
14
|
buttonBgColor?: string;
|
15
15
|
}
|
16
16
|
interface PaidActivityLogProps {
|
17
|
-
|
17
|
+
customerExternalId: string;
|
18
18
|
paidStyle?: PaidStyleProperties;
|
19
19
|
}
|
20
20
|
export declare const PaidActivityLog: React.FC<PaidActivityLogProps>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PaidActivityLog.d.ts","sourceRoot":"","sources":["../../src/components/PaidActivityLog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,
|
1
|
+
{"version":3,"file":"PaidActivityLog.d.ts","sourceRoot":"","sources":["../../src/components/PaidActivityLog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,iCAAiC,CAAC;AAEzC,UAAU,mBAAmB;IAEzB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IAGpC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAGjC,eAAe,CAAC,EAAE,MAAM,CAAC;IAGzB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AA2BD,UAAU,oBAAoB;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACnC;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA+L1D,CAAC"}
|
@@ -2,10 +2,10 @@
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
3
3
|
import { useEffect, useState } from 'react';
|
4
4
|
import { useIsInContainer } from './PaidContainer';
|
5
|
-
import { cachedFetch, getCacheKey, CACHE_TTL } from '../utils/cache';
|
6
5
|
import { Pagination } from './ui/Pagination';
|
7
|
-
import '../
|
8
|
-
|
6
|
+
import { fetchPaidData } from '../utils/apiClient';
|
7
|
+
import '../styles/paid-activity-log.css';
|
8
|
+
export const PaidActivityLog = ({ customerExternalId, paidStyle = {} }) => {
|
9
9
|
const [usageSummaries, setUsageSummaries] = useState([]);
|
10
10
|
const [loading, setLoading] = useState(true);
|
11
11
|
const [error, setError] = useState(null);
|
@@ -85,9 +85,15 @@ export const PaidActivityLog = ({ accountExternalId, paidStyle = {} }) => {
|
|
85
85
|
const fetchUsageData = async () => {
|
86
86
|
try {
|
87
87
|
setLoading(true);
|
88
|
-
// Use
|
89
|
-
const
|
90
|
-
|
88
|
+
// Use new API client for usage data
|
89
|
+
const response = await fetchPaidData({
|
90
|
+
paidEndpoint: 'usage',
|
91
|
+
customerExternalId
|
92
|
+
});
|
93
|
+
if (!response.ok) {
|
94
|
+
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
95
|
+
}
|
96
|
+
const data = await response.json();
|
91
97
|
const mappedUsageSummaries = (data.data.usageSummary || []).map((summary) => ({
|
92
98
|
...summary,
|
93
99
|
accountId: summary.customerId,
|
@@ -102,7 +108,18 @@ export const PaidActivityLog = ({ accountExternalId, paidStyle = {} }) => {
|
|
102
108
|
}
|
103
109
|
};
|
104
110
|
fetchUsageData();
|
105
|
-
|
111
|
+
// Listen for cache refresh events
|
112
|
+
const handleCacheRefresh = (event) => {
|
113
|
+
var _a, _b;
|
114
|
+
if (((_a = event.detail) === null || _a === void 0 ? void 0 : _a.customerId) === customerExternalId || ((_b = event.detail) === null || _b === void 0 ? void 0 : _b.type) === 'all') {
|
115
|
+
fetchUsageData();
|
116
|
+
}
|
117
|
+
};
|
118
|
+
window.addEventListener('cache-refresh', handleCacheRefresh);
|
119
|
+
return () => {
|
120
|
+
window.removeEventListener('cache-refresh', handleCacheRefresh);
|
121
|
+
};
|
122
|
+
}, [customerExternalId]);
|
106
123
|
if (loading) {
|
107
124
|
return _jsx("div", { children: "Loading usage data..." });
|
108
125
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PaidActivityLog.js","sourceRoot":"","sources":["../../src/components/PaidActivityLog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"PaidActivityLog.js","sourceRoot":"","sources":["../../src/components/PaidActivityLog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,iCAAiC,CAAC;AAyDzC,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAC5D,kBAAkB,EAClB,SAAS,GAAG,EAAE,EACjB,EAAE,EAAE;IACD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAiB,EAAE,CAAC,CAAC;IACzE,MAAM,CAAC,OAAO,EAAE,UAAU,C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AAW,EACxB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,gBAAgB,GAChC,IACA,GACJ,CACT,CAAC;AACN,CAAC,CAAC"}
|
@@ -14,7 +14,7 @@ interface PaidStyleProperties {
|
|
14
14
|
buttonBgColor?: string;
|
15
15
|
}
|
16
16
|
interface PaidInvoiceTableProps {
|
17
|
-
|
17
|
+
customerExternalId: string;
|
18
18
|
paidStyle?: PaidStyleProperties;
|
19
19
|
}
|
20
20
|
export declare const PaidInvoiceTable: React.FC<PaidInvoiceTableProps>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PaidInvoiceTable.d.ts","sourceRoot":"","sources":["../../src/components/PaidInvoiceTable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"PaidInvoiceTable.d.ts","sourceRoot":"","sources":["../../src/components/PaidInvoiceTable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAKnD,OAAO,kCAAkC,CAAC;AAE1C,UAAU,mBAAmB;IAEzB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IAGpC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAGjC,eAAe,CAAC,EAAE,MAAM,CAAC;IAGzB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAqBD,UAAU,qBAAqB;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACnC;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA2S5D,CAAC"}
|