@plyaz/types 1.13.13 → 1.13.15
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/api/index.cjs +538 -5286
- package/dist/api/index.cjs.map +1 -1
- package/dist/errors/index.cjs +577 -5327
- package/dist/errors/index.cjs.map +1 -1
- package/dist/index.cjs +775 -1344
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -8
- package/dist/index.js.map +1 -1
- package/dist/payments/base-error/enum.d.ts +0 -9
- package/dist/payments/base-error/types.d.ts +8 -7
- package/dist/payments/gateways/provider/types.d.ts +13 -13
- package/dist/payments/gateways/routings/types.d.ts +30 -11
- package/dist/payments/index.cjs +0 -8
- package/dist/payments/index.cjs.map +1 -1
- package/dist/payments/index.js +1 -8
- package/dist/payments/index.js.map +1 -1
- package/dist/payments/provider/adapter/types.d.ts +2 -2
- package/dist/payments/provider/core/types.d.ts +6 -6
- package/dist/payments/provider/payment-provider/types.d.ts +2 -2
- package/dist/payments/transaction/types.d.ts +3 -3
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CurrencyCode } from '@plyaz/config';
|
|
2
2
|
import type { FeeBreakdown, Money } from '../../transaction';
|
|
3
3
|
import type { PAYMENTMETHOD, PAYMENTPROVIDERTYPE, PAYMENTSTATUS } from '../provider-capability';
|
|
4
4
|
/**
|
|
@@ -256,7 +256,7 @@ export interface NormalizedPaymentRequest<TMetadata extends object = object> {
|
|
|
256
256
|
/** Payment method */
|
|
257
257
|
method: PAYMENTMETHOD;
|
|
258
258
|
/** CurrencyCode */
|
|
259
|
-
CurrencyCode:
|
|
259
|
+
CurrencyCode: CurrencyCode;
|
|
260
260
|
/** User initiating the transaction */
|
|
261
261
|
userId: string;
|
|
262
262
|
/** Product or service being purchased */
|
|
@@ -288,7 +288,7 @@ export interface TransactionDetails<TMetadata extends object = object> {
|
|
|
288
288
|
/** Payment method used */
|
|
289
289
|
method: PAYMENTMETHOD;
|
|
290
290
|
/** CurrencyCode of the transaction */
|
|
291
|
-
CurrencyCode:
|
|
291
|
+
CurrencyCode: CurrencyCode;
|
|
292
292
|
/** Timestamp when transaction was created */
|
|
293
293
|
createdAt: Date;
|
|
294
294
|
/** Timestamp of the latest status update */
|
|
@@ -329,7 +329,7 @@ export interface AdapterConfiguration<TMetadata extends object = object> {
|
|
|
329
329
|
};
|
|
330
330
|
/** Supported payment methods and currencies */
|
|
331
331
|
supportedMethods: PAYMENTMETHOD[];
|
|
332
|
-
supportedCurrencies:
|
|
332
|
+
supportedCurrencies: CurrencyCode[];
|
|
333
333
|
/** Additional configuration or metadata */
|
|
334
334
|
metadata?: TMetadata;
|
|
335
335
|
}
|
|
@@ -383,7 +383,7 @@ export interface PayoutParams<TMetadata extends object = object> {
|
|
|
383
383
|
/** Amount to pay out */
|
|
384
384
|
amount: Money;
|
|
385
385
|
/** CurrencyCode of payout */
|
|
386
|
-
CurrencyCode:
|
|
386
|
+
CurrencyCode: CurrencyCode;
|
|
387
387
|
/** Optional bank account / wallet ID at provider */
|
|
388
388
|
destinationId?: string;
|
|
389
389
|
/** Optional description */
|
|
@@ -415,7 +415,7 @@ export interface ReceiptData<TMetadata extends object = object> {
|
|
|
415
415
|
receiptId: string;
|
|
416
416
|
issuedAt: Date;
|
|
417
417
|
amount: Money;
|
|
418
|
-
CurrencyCode:
|
|
418
|
+
CurrencyCode: CurrencyCode;
|
|
419
419
|
lineItems?: Array<{
|
|
420
420
|
name: string;
|
|
421
421
|
quantity: number;
|
|
@@ -4,7 +4,7 @@ import type { PaymentResult, ProcessPaymentRequest } from '../../request';
|
|
|
4
4
|
import type { FeeBreakdown, Money } from '../../transaction';
|
|
5
5
|
import type { CreateCustomerParams, CustomerResult, FeeCalculationOptions, PaymentStatusResult, RefundParams, RefundResult, SavedPaymentMethodResult, SavePaymentMethodParams, TransactionHistory, TransactionHistoryParams, WebhookPayload, WebhookResult } from '../core';
|
|
6
6
|
import type { PAYMENTMETHOD, PAYMENTPROVIDERTYPE } from '../provider-capability';
|
|
7
|
-
import type {
|
|
7
|
+
import type { CurrencyCode } from '@plyaz/config';
|
|
8
8
|
/**
|
|
9
9
|
* Core interface that all payment providers must implement.
|
|
10
10
|
* This interface ensures consistent behavior across all providers
|
|
@@ -22,7 +22,7 @@ export interface PaymentProvider {
|
|
|
22
22
|
/** Payment methods supported by this provider */
|
|
23
23
|
readonly supportedMethods: PAYMENTMETHOD[];
|
|
24
24
|
/** Currencies supported by this provider */
|
|
25
|
-
readonly supportedCurrencies:
|
|
25
|
+
readonly supportedCurrencies: CurrencyCode[];
|
|
26
26
|
/** Detailed capabilities of this provider */
|
|
27
27
|
readonly capabilities: ProviderCapabilities;
|
|
28
28
|
/** Provider configuration and metadata */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CurrencyCode } from '@plyaz/config';
|
|
2
2
|
/**
|
|
3
3
|
* Core money interface for handling monetary values throughout the system.
|
|
4
4
|
* All monetary amounts are stored in the smallest currency unit to avoid
|
|
@@ -20,7 +20,7 @@ export interface Money {
|
|
|
20
20
|
* Currency code following ISO 4217 standard for fiat currencies
|
|
21
21
|
* and custom codes for cryptocurrencies (BTC, ETH, etc.)
|
|
22
22
|
*/
|
|
23
|
-
currency:
|
|
23
|
+
currency: CurrencyCode;
|
|
24
24
|
/**
|
|
25
25
|
* Human-readable formatted amount for display purposes
|
|
26
26
|
* Example: "$50.00", "€45.50", "0.001 BTC"
|
|
@@ -35,7 +35,7 @@ export interface Money {
|
|
|
35
35
|
* Original currency if this amount was converted
|
|
36
36
|
* Helps with audit trails and reconciliation
|
|
37
37
|
*/
|
|
38
|
-
originalCurrency?:
|
|
38
|
+
originalCurrency?: CurrencyCode;
|
|
39
39
|
/**
|
|
40
40
|
* Timestamp when exchange rate was calculated
|
|
41
41
|
* Important for cryptocurrency and volatile currency exchanges
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plyaz/types",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.15",
|
|
4
4
|
"author": "Redeemer Pace",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"description": "Provides shared TypeScript types and schema utilities for validation and parsing in the @playz ecosystem.",
|
|
@@ -192,6 +192,7 @@
|
|
|
192
192
|
"keywords": [],
|
|
193
193
|
"packageManager": "pnpm@10.11.0",
|
|
194
194
|
"dependencies": {
|
|
195
|
+
"@plyaz/config": "^1.7.3",
|
|
195
196
|
"pino": "^10.0.0",
|
|
196
197
|
"type-fest": "^4.41.0",
|
|
197
198
|
"zustand": "^5.0.0"
|
|
@@ -204,7 +205,6 @@
|
|
|
204
205
|
"@eslint/markdown": "^6.5.0",
|
|
205
206
|
"@nestjs/common": "^11.1.7",
|
|
206
207
|
"@next/eslint-plugin-next": "^15.0.3",
|
|
207
|
-
"@plyaz/config": "^1.6.5",
|
|
208
208
|
"@plyaz/devtools": "^1.9.4",
|
|
209
209
|
"@tanstack/react-query": "5.85.6",
|
|
210
210
|
"@testing-library/react": "^16.3.0",
|