@solvapay/next 1.2.1 → 1.3.0-preview-e2cd9bda9dee33e68f6bba7098f7d683e6f1b742
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.cjs +6 -0
- package/dist/index.d.cts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +6 -0
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
activatePlan: () => activatePlan,
|
|
34
|
+
attachBusinessDetails: () => attachBusinessDetails,
|
|
34
35
|
cancelRenewal: () => cancelRenewal,
|
|
35
36
|
checkPurchase: () => checkPurchase,
|
|
36
37
|
clearAllPurchaseCache: () => clearAllPurchaseCache,
|
|
@@ -281,6 +282,10 @@ async function processTopupPaymentIntent(request, body, options = {}) {
|
|
|
281
282
|
}
|
|
282
283
|
return toNextRouteResponse(result);
|
|
283
284
|
}
|
|
285
|
+
async function attachBusinessDetails(request, body, options = {}) {
|
|
286
|
+
const result = await (0, import_server8.attachBusinessDetailsCore)(request, body, options);
|
|
287
|
+
return toNextRouteResponse(result);
|
|
288
|
+
}
|
|
284
289
|
|
|
285
290
|
// src/helpers/checkout.ts
|
|
286
291
|
var import_server9 = require("@solvapay/server");
|
|
@@ -537,6 +542,7 @@ async function checkPurchase(request, options = {}) {
|
|
|
537
542
|
// Annotate the CommonJS export names for ESM import in node:
|
|
538
543
|
0 && (module.exports = {
|
|
539
544
|
activatePlan,
|
|
545
|
+
attachBusinessDetails,
|
|
540
546
|
cancelRenewal,
|
|
541
547
|
checkPurchase,
|
|
542
548
|
clearAllPurchaseCache,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NextResponse } from 'next/server';
|
|
2
2
|
import * as _solvapay_server from '@solvapay/server';
|
|
3
3
|
import { AuthenticatedUser, SolvaPay, AutoRechargeInput } from '@solvapay/server';
|
|
4
|
+
import { TaxIdType } from '@solvapay/core';
|
|
4
5
|
export { Auth0AuthMiddlewareOptions, AuthMiddlewareOptions, SupabaseAuthMiddlewareOptions, createAuth0AuthMiddleware, createAuthMiddleware, createSupabaseAuthMiddleware } from './middleware.cjs';
|
|
5
6
|
import '@solvapay/auth';
|
|
6
7
|
import '@solvapay/auth/auth0';
|
|
@@ -314,6 +315,19 @@ declare function processTopupPaymentIntent(request: globalThis.Request, body: {
|
|
|
314
315
|
}, options?: {
|
|
315
316
|
solvaPay?: SolvaPay;
|
|
316
317
|
}): Promise<NextResponse>;
|
|
318
|
+
/**
|
|
319
|
+
* Next.js route wrapper for POST /api/attach-business-details.
|
|
320
|
+
*/
|
|
321
|
+
declare function attachBusinessDetails(request: globalThis.Request, body: {
|
|
322
|
+
paymentIntentId: string;
|
|
323
|
+
isBusiness: boolean;
|
|
324
|
+
businessName?: string;
|
|
325
|
+
country?: string;
|
|
326
|
+
taxId?: string;
|
|
327
|
+
taxIdType?: TaxIdType;
|
|
328
|
+
}, options?: {
|
|
329
|
+
solvaPay?: SolvaPay;
|
|
330
|
+
}): Promise<NextResponse>;
|
|
317
331
|
|
|
318
332
|
/**
|
|
319
333
|
* Next.js Checkout Helpers
|
|
@@ -579,4 +593,4 @@ interface CheckPurchaseOptions {
|
|
|
579
593
|
*/
|
|
580
594
|
declare function checkPurchase(request: Request, options?: CheckPurchaseOptions): Promise<NextResponse>;
|
|
581
595
|
|
|
582
|
-
export { type CheckPurchaseOptions, type PurchaseCheckResult, type RequestDeduplicationOptions, activatePlan, cancelRenewal, checkPurchase, clearAllPurchaseCache, clearPurchaseCache, createCheckoutSession, createCustomerSession, createPaymentIntent, createTopupPaymentIntent, disableAutoRecharge, getAuthenticatedUser, getAutoRecharge, getCustomerBalance, getMerchant, getPaymentMethod, getProduct, getPurchaseCacheStats, listPlans, processPaymentIntent, processTopupPaymentIntent, reactivateRenewal, saveAutoRecharge, syncCustomer, trackUsage };
|
|
596
|
+
export { type CheckPurchaseOptions, type PurchaseCheckResult, type RequestDeduplicationOptions, activatePlan, attachBusinessDetails, cancelRenewal, checkPurchase, clearAllPurchaseCache, clearPurchaseCache, createCheckoutSession, createCustomerSession, createPaymentIntent, createTopupPaymentIntent, disableAutoRecharge, getAuthenticatedUser, getAutoRecharge, getCustomerBalance, getMerchant, getPaymentMethod, getProduct, getPurchaseCacheStats, listPlans, processPaymentIntent, processTopupPaymentIntent, reactivateRenewal, saveAutoRecharge, syncCustomer, trackUsage };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NextResponse } from 'next/server';
|
|
2
2
|
import * as _solvapay_server from '@solvapay/server';
|
|
3
3
|
import { AuthenticatedUser, SolvaPay, AutoRechargeInput } from '@solvapay/server';
|
|
4
|
+
import { TaxIdType } from '@solvapay/core';
|
|
4
5
|
export { Auth0AuthMiddlewareOptions, AuthMiddlewareOptions, SupabaseAuthMiddlewareOptions, createAuth0AuthMiddleware, createAuthMiddleware, createSupabaseAuthMiddleware } from './middleware.js';
|
|
5
6
|
import '@solvapay/auth';
|
|
6
7
|
import '@solvapay/auth/auth0';
|
|
@@ -314,6 +315,19 @@ declare function processTopupPaymentIntent(request: globalThis.Request, body: {
|
|
|
314
315
|
}, options?: {
|
|
315
316
|
solvaPay?: SolvaPay;
|
|
316
317
|
}): Promise<NextResponse>;
|
|
318
|
+
/**
|
|
319
|
+
* Next.js route wrapper for POST /api/attach-business-details.
|
|
320
|
+
*/
|
|
321
|
+
declare function attachBusinessDetails(request: globalThis.Request, body: {
|
|
322
|
+
paymentIntentId: string;
|
|
323
|
+
isBusiness: boolean;
|
|
324
|
+
businessName?: string;
|
|
325
|
+
country?: string;
|
|
326
|
+
taxId?: string;
|
|
327
|
+
taxIdType?: TaxIdType;
|
|
328
|
+
}, options?: {
|
|
329
|
+
solvaPay?: SolvaPay;
|
|
330
|
+
}): Promise<NextResponse>;
|
|
317
331
|
|
|
318
332
|
/**
|
|
319
333
|
* Next.js Checkout Helpers
|
|
@@ -579,4 +593,4 @@ interface CheckPurchaseOptions {
|
|
|
579
593
|
*/
|
|
580
594
|
declare function checkPurchase(request: Request, options?: CheckPurchaseOptions): Promise<NextResponse>;
|
|
581
595
|
|
|
582
|
-
export { type CheckPurchaseOptions, type PurchaseCheckResult, type RequestDeduplicationOptions, activatePlan, cancelRenewal, checkPurchase, clearAllPurchaseCache, clearPurchaseCache, createCheckoutSession, createCustomerSession, createPaymentIntent, createTopupPaymentIntent, disableAutoRecharge, getAuthenticatedUser, getAutoRecharge, getCustomerBalance, getMerchant, getPaymentMethod, getProduct, getPurchaseCacheStats, listPlans, processPaymentIntent, processTopupPaymentIntent, reactivateRenewal, saveAutoRecharge, syncCustomer, trackUsage };
|
|
596
|
+
export { type CheckPurchaseOptions, type PurchaseCheckResult, type RequestDeduplicationOptions, activatePlan, attachBusinessDetails, cancelRenewal, checkPurchase, clearAllPurchaseCache, clearPurchaseCache, createCheckoutSession, createCustomerSession, createPaymentIntent, createTopupPaymentIntent, disableAutoRecharge, getAuthenticatedUser, getAutoRecharge, getCustomerBalance, getMerchant, getPaymentMethod, getProduct, getPurchaseCacheStats, listPlans, processPaymentIntent, processTopupPaymentIntent, reactivateRenewal, saveAutoRecharge, syncCustomer, trackUsage };
|
package/dist/index.js
CHANGED
|
@@ -192,6 +192,7 @@ import {
|
|
|
192
192
|
createTopupPaymentIntentCore,
|
|
193
193
|
processPaymentIntentCore,
|
|
194
194
|
processTopupPaymentIntentCore,
|
|
195
|
+
attachBusinessDetailsCore,
|
|
195
196
|
isErrorResult as isErrorResult5
|
|
196
197
|
} from "@solvapay/server";
|
|
197
198
|
|
|
@@ -236,6 +237,10 @@ async function processTopupPaymentIntent(request, body, options = {}) {
|
|
|
236
237
|
}
|
|
237
238
|
return toNextRouteResponse(result);
|
|
238
239
|
}
|
|
240
|
+
async function attachBusinessDetails(request, body, options = {}) {
|
|
241
|
+
const result = await attachBusinessDetailsCore(request, body, options);
|
|
242
|
+
return toNextRouteResponse(result);
|
|
243
|
+
}
|
|
239
244
|
|
|
240
245
|
// src/helpers/checkout.ts
|
|
241
246
|
import {
|
|
@@ -373,6 +378,7 @@ async function checkPurchase(request, options = {}) {
|
|
|
373
378
|
}
|
|
374
379
|
export {
|
|
375
380
|
activatePlan,
|
|
381
|
+
attachBusinessDetails,
|
|
376
382
|
cancelRenewal,
|
|
377
383
|
checkPurchase,
|
|
378
384
|
clearAllPurchaseCache,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solvapay/next",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0-preview-e2cd9bda9dee33e68f6bba7098f7d683e6f1b742",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"sideEffects": false,
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@solvapay/auth": "1.1.0",
|
|
38
|
-
"@solvapay/core": "1.
|
|
39
|
-
"@solvapay/server": "1.
|
|
38
|
+
"@solvapay/core": "1.2.0-preview-e2cd9bda9dee33e68f6bba7098f7d683e6f1b742",
|
|
39
|
+
"@solvapay/server": "1.4.0-preview-e2cd9bda9dee33e68f6bba7098f7d683e6f1b742"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"next": ">=13.0.0"
|