@facto-to/connect 0.0.1-beta.5 → 0.0.1-beta1

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.
@@ -1,114 +0,0 @@
1
- declare const MANDATE_LIMIT_PERIOD_VALUES: readonly ["daily", "weekly", "monthly"];
2
- type MandateLimitPeriod = (typeof MANDATE_LIMIT_PERIOD_VALUES)[number];
3
- declare const MANDATE_USE_CASE_VALUES: readonly ["immediate", "recurring", "top_up", "metered"];
4
- type MandateUseCase = (typeof MANDATE_USE_CASE_VALUES)[number];
5
- interface CreateMandatePaymentRequest {
6
- amount: string;
7
- currency: string;
8
- description?: string | null;
9
- mandateId: string;
10
- merchantPaymentRef: string;
11
- metadata?: Record<string, string> | null;
12
- paymentOptionId?: string | null;
13
- /**
14
- * The sub-merchant name to show on the consumer's billing line. Returned
15
- * on authenticated payment reads; NOT included in webhook payloads.
16
- * Rejects control, zero-width and bidi override characters.
17
- */
18
- subMerchantDisplayName?: string | null;
19
- /**
20
- * Your reconciliation anchor for the sub-merchant this payment was
21
- * collected for. Echoed on every payment projection and included in
22
- * payment webhooks. Display and reconciliation only — Facto never keys,
23
- * joins or deduplicates on it.
24
- */
25
- subMerchantRef?: string | null;
26
- useCase: MandateUseCase;
27
- }
28
- interface ExchangeLinkCodeResponse {
29
- appId: string;
30
- cardRef?: string | null;
31
- factoServerWalletAddress?: string | null;
32
- factoUserId?: string | null;
33
- grantStatus: string;
34
- pipelineReady: boolean;
35
- scopes: string[];
36
- /**
37
- * Opaque public link handle (GA contract). Store this; the legacy
38
- * factoUserId/factoServerWalletAddress fields remain for pre-GA callers.
39
- */
40
- userLinkRef: string;
41
- }
42
- declare const MANDATE_DECLINE_REASON_VALUES: readonly ["mandate_inactive", "mandate_revoked", "mandate_expired", "use_case_not_allowed", "mandate_limit_exceeded", "mandate_period_limit_exceeded", "user_limit_exceeded", "limit_check_unavailable", "payment_path_unavailable", "funding_source_not_authorized", "payment_option_not_pinned", "settlement_reverted", "idempotency_conflict"];
43
- type MandateDeclineReason = (typeof MANDATE_DECLINE_REASON_VALUES)[number];
44
- declare const MANDATE_PAYMENT_STATUS_VALUES: readonly ["accepted", "declined", "charging", "finalizing", "succeeded", "paid_via_coverage", "failed", "canceled"];
45
- type MandatePaymentStatus = (typeof MANDATE_PAYMENT_STATUS_VALUES)[number];
46
- declare const MANDATE_STATUS_VALUES: readonly ["pending", "active", "paused", "revoked", "expired", "suspended"];
47
- type MandateStatus = (typeof MANDATE_STATUS_VALUES)[number];
48
- declare const MANDATE_AUTHORIZATION_SESSION_STATUS_VALUES: readonly ["created", "authorized", "declined", "expired"];
49
- type MandateAuthorizationSessionStatus = (typeof MANDATE_AUTHORIZATION_SESSION_STATUS_VALUES)[number];
50
- interface MandatePayment {
51
- amount: string;
52
- /**
53
- * Cumulative refunded amount — merchants compute the remaining
54
- * refundable headroom as `amount - amountRefunded` without local
55
- * bookkeeping (spec 012 FR-004).
56
- */
57
- amountRefunded: string;
58
- chargeId?: string | null;
59
- createdAt: string;
60
- currency: string;
61
- declineReason?: MandateDeclineReason | null;
62
- finalityEtaSeconds?: number | null;
63
- mandateId: string;
64
- merchantPaymentRef: string;
65
- paymentId: string;
66
- status: MandatePaymentStatus;
67
- /** The name shown on the consumer's billing line. */
68
- subMerchantDisplayName?: string | null;
69
- /**
70
- * Echoed back so a PSP can reconcile without a local join. DISPLAY ONLY:
71
- * no read path keys, matches, joins or deduplicates on it (migration 281's
72
- * rule, inherited by 329).
73
- */
74
- subMerchantRef?: string | null;
75
- /** When the payment reached a terminal status. Serialized as `terminalAt`. */
76
- terminalAt?: string | null;
77
- /**
78
- * On-chain settlement tx hash of the linked charge, stamped by the settler
79
- * once the payment reaches a terminal status. Serialized as `txHash`.
80
- */
81
- txHash?: string | null;
82
- updatedAt?: string | null;
83
- useCase: MandateUseCase;
84
- }
85
- /** Property bag shared by every `anyOf` branch of `PaymentCapabilityRequest`. */
86
- interface PaymentCapabilityRequestProperties {
87
- /** Legacy shape: merchant app id, sent together with `facto_server_wallet_address`. */
88
- app_id?: string;
89
- /** Legacy shape: Facto server wallet address of the linked user. */
90
- facto_server_wallet_address?: string;
91
- /** Optional merchant mandate. When present, readiness follows that mandate's pinned route. */
92
- mandateId?: string;
93
- /** GA shape: opaque user-link reference minted by the link-code exchange. */
94
- userLinkRef?: string;
95
- }
96
- declare const PAYMENT_READINESS_NOT_READY_REASON_VALUES: readonly ["payment_route_not_provisioned", "protocol_config_incomplete"];
97
- type PaymentReadinessNotReadyReason = (typeof PAYMENT_READINESS_NOT_READY_REASON_VALUES)[number];
98
- declare const PAYMENT_READINESS_SCOPE_VALUES: readonly ["account_default", "mandate_pinned"];
99
- type PaymentReadinessScope = (typeof PAYMENT_READINESS_SCOPE_VALUES)[number];
100
- interface PaymentCapabilityResponse {
101
- appId: string;
102
- assetSymbol: string;
103
- chainId: number;
104
- factoServerWalletAddress?: string | null;
105
- factoUserId?: string | null;
106
- notReadyReason?: PaymentReadinessNotReadyReason | null;
107
- pipelineReady: boolean;
108
- protocolId: string;
109
- readinessScope: PaymentReadinessScope;
110
- spendMode: string;
111
- userLinkRef: string;
112
- }
113
-
114
- export type { CreateMandatePaymentRequest as C, ExchangeLinkCodeResponse as E, MandatePayment as M, PaymentCapabilityRequestProperties as P, MandateUseCase as a, MandateLimitPeriod as b, PaymentCapabilityResponse as c, MandateAuthorizationSessionStatus as d, MandateStatus as e, MandatePaymentStatus as f, MandateDeclineReason as g, PaymentReadinessNotReadyReason as h, PaymentReadinessScope as i };