@plyaz/types 1.19.2 → 1.19.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/dist/api/endpoints/index.d.ts +1 -0
- package/dist/api/endpoints/payments/index.d.ts +1 -0
- package/dist/api/endpoints/payments/types.d.ts +22 -0
- package/dist/api/endpoints/types.d.ts +2 -1
- package/dist/examples/schemas.d.ts +1 -1
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/payments/events/enums.d.ts +10 -0
- package/dist/payments/index.cjs +10 -0
- package/dist/payments/index.cjs.map +1 -1
- package/dist/payments/index.js +10 -0
- package/dist/payments/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from './types';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ProcessPaymentRequest, PaymentResult, RefundParams, RefundResult, PAYMENT_PROVIDER_TYPE, SubscriptionResult, PayoutParams, PayoutResult, TransactionHistoryParams, TransactionHistory, CreateSubscriptionParams } from '../../../payments';
|
|
2
|
+
import type { Endpoint, Req } from 'fetchff';
|
|
3
|
+
export interface PaymentEndpointTypes {
|
|
4
|
+
processPayment: Endpoint<Req<PaymentResult, ProcessPaymentRequest>>;
|
|
5
|
+
cancelPayment: Endpoint<Req<void, {
|
|
6
|
+
provider: PAYMENT_PROVIDER_TYPE;
|
|
7
|
+
transactionId: string;
|
|
8
|
+
reason?: string;
|
|
9
|
+
}>>;
|
|
10
|
+
refundPayment: Endpoint<Req<RefundResult, RefundParams & {
|
|
11
|
+
provider: PAYMENT_PROVIDER_TYPE;
|
|
12
|
+
}>>;
|
|
13
|
+
createSubscription: Endpoint<Req<SubscriptionResult, CreateSubscriptionParams & {
|
|
14
|
+
provider: PAYMENT_PROVIDER_TYPE;
|
|
15
|
+
}>>;
|
|
16
|
+
processPayout: Endpoint<Req<PayoutResult, PayoutParams & {
|
|
17
|
+
provider: PAYMENT_PROVIDER_TYPE;
|
|
18
|
+
}>>;
|
|
19
|
+
getTransactionHistory: Endpoint<Req<TransactionHistory, TransactionHistoryParams & {
|
|
20
|
+
provider: PAYMENT_PROVIDER_TYPE;
|
|
21
|
+
}>>;
|
|
22
|
+
}
|
|
@@ -4,6 +4,7 @@ import type { InfobipEndpointTypes } from './infobip';
|
|
|
4
4
|
import type { VirusTotalEndpointTypes } from './virustotal';
|
|
5
5
|
import type { CloudflareEndpointTypes, CloudFrontEndpointTypes, FastlyEndpointTypes } from './cdn';
|
|
6
6
|
import type { FeatureFlagEndpointTypes } from './featureFlags';
|
|
7
|
+
import type { PaymentEndpointTypes } from './payments';
|
|
7
8
|
/**
|
|
8
9
|
* Query parameters type - matches fetchff's flexible param handling
|
|
9
10
|
* Supports objects, URLSearchParams, and arrays of name-value pairs
|
|
@@ -12,5 +13,5 @@ export type QueryParams = Record<string, string | number | boolean | string[] |
|
|
|
12
13
|
/**
|
|
13
14
|
* All endpoint types combined
|
|
14
15
|
*/
|
|
15
|
-
export interface EndpointTypes extends CampaignEndpointTypes, PollingEndpointTypes, InfobipEndpointTypes, VirusTotalEndpointTypes, CloudflareEndpointTypes, CloudFrontEndpointTypes, FastlyEndpointTypes, FeatureFlagEndpointTypes {
|
|
16
|
+
export interface EndpointTypes extends CampaignEndpointTypes, PaymentEndpointTypes, PollingEndpointTypes, InfobipEndpointTypes, VirusTotalEndpointTypes, CloudflareEndpointTypes, CloudFrontEndpointTypes, FastlyEndpointTypes, FeatureFlagEndpointTypes {
|
|
16
17
|
}
|
|
@@ -47,9 +47,9 @@ export declare const QueryExampleSchema: z.ZodObject<{
|
|
|
47
47
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
48
48
|
sort_by: z.ZodDefault<z.ZodEnum<{
|
|
49
49
|
name: "name";
|
|
50
|
+
amount: "amount";
|
|
50
51
|
created_at: "created_at";
|
|
51
52
|
updated_at: "updated_at";
|
|
52
|
-
amount: "amount";
|
|
53
53
|
}>>;
|
|
54
54
|
sort_order: z.ZodDefault<z.ZodEnum<{
|
|
55
55
|
asc: "asc";
|
package/dist/index.cjs
CHANGED
|
@@ -6485,6 +6485,10 @@ var PAYMENT_EVENT_TYPE = /* @__PURE__ */ ((PAYMENT_EVENT_TYPE2) => {
|
|
|
6485
6485
|
PAYMENT_EVENT_TYPE2["RefundCompleted"] = "refund.completed";
|
|
6486
6486
|
PAYMENT_EVENT_TYPE2["RefundFailed"] = "refund.failed";
|
|
6487
6487
|
PAYMENT_EVENT_TYPE2["RefundCancelled"] = "refund.cancelled";
|
|
6488
|
+
PAYMENT_EVENT_TYPE2["WithdrawalRequested"] = "withdrawal.requested";
|
|
6489
|
+
PAYMENT_EVENT_TYPE2["WithdrawalProcessed"] = "withdrawal.processed";
|
|
6490
|
+
PAYMENT_EVENT_TYPE2["WithdrawalFailed"] = "withdrawal.failed";
|
|
6491
|
+
PAYMENT_EVENT_TYPE2["WithdrawalCancelled"] = "withdrawal.cancelled";
|
|
6488
6492
|
PAYMENT_EVENT_TYPE2["ProviderWebhookReceived"] = "provider.webhook.received";
|
|
6489
6493
|
PAYMENT_EVENT_TYPE2["ProviderWebhookProcessed"] = "provider.webhook.processed";
|
|
6490
6494
|
PAYMENT_EVENT_TYPE2["ProviderWebhookFailed"] = "provider.webhook.failed";
|
|
@@ -6526,6 +6530,12 @@ var PAYMENT_EVENT_TYPE = /* @__PURE__ */ ((PAYMENT_EVENT_TYPE2) => {
|
|
|
6526
6530
|
PAYMENT_EVENT_TYPE2["SubscriptionFailed"] = "subscription.failed";
|
|
6527
6531
|
PAYMENT_EVENT_TYPE2["SubscriptionTrialStarted"] = "subscription.trial_started";
|
|
6528
6532
|
PAYMENT_EVENT_TYPE2["SubscriptionTrialEnded"] = "subscription.trial_ended";
|
|
6533
|
+
PAYMENT_EVENT_TYPE2["ProductCreated"] = "product.created";
|
|
6534
|
+
PAYMENT_EVENT_TYPE2["ProductUpdated"] = "product.updated";
|
|
6535
|
+
PAYMENT_EVENT_TYPE2["ProductDeleted"] = "product.deleted";
|
|
6536
|
+
PAYMENT_EVENT_TYPE2["PriceCreated"] = "price.created";
|
|
6537
|
+
PAYMENT_EVENT_TYPE2["PriceUpdated"] = "price.updated";
|
|
6538
|
+
PAYMENT_EVENT_TYPE2["PriceDeleted"] = "price.deleted";
|
|
6529
6539
|
PAYMENT_EVENT_TYPE2["PaymentLimitsUpdated"] = "payment_limits.updated";
|
|
6530
6540
|
PAYMENT_EVENT_TYPE2["PaymentLimitsExceeded"] = "payment_limits.exceeded";
|
|
6531
6541
|
PAYMENT_EVENT_TYPE2["ProviderConfigUpdated"] = "provider.config_updated";
|