@fantastic.dev/better-stripe 0.22.0 → 0.23.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/CHANGELOG.md +12 -0
- package/README.md +5 -3
- package/dist/client/connect/payoutActivationProof.d.ts +16 -0
- package/dist/client/connect/payoutActivationProof.d.ts.map +1 -0
- package/dist/client/connect/payoutActivationProof.js +72 -0
- package/dist/client/connect/payoutActivationProof.js.map +1 -0
- package/dist/client/connect/payoutAdoption.d.ts +35 -0
- package/dist/client/connect/payoutAdoption.d.ts.map +1 -0
- package/dist/client/connect/payoutAdoption.js +231 -0
- package/dist/client/connect/payoutAdoption.js.map +1 -0
- package/dist/client/connect/payoutAdoptionAge.d.ts +19 -0
- package/dist/client/connect/payoutAdoptionAge.d.ts.map +1 -0
- package/dist/client/connect/payoutAdoptionAge.js +56 -0
- package/dist/client/connect/payoutAdoptionAge.js.map +1 -0
- package/dist/client/connect/payoutAdoptionAllocation.d.ts +24 -0
- package/dist/client/connect/payoutAdoptionAllocation.d.ts.map +1 -0
- package/dist/client/connect/payoutAdoptionAllocation.js +78 -0
- package/dist/client/connect/payoutAdoptionAllocation.js.map +1 -0
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +2617 -0
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -0
- package/dist/client/connect/payoutAdoptionTestHelpers.js +231 -0
- package/dist/client/connect/payoutAdoptionTestHelpers.js.map +1 -0
- package/dist/client/connect/payoutReconciliation.d.ts.map +1 -1
- package/dist/client/connect/payoutReconciliation.js +4 -2
- package/dist/client/connect/payoutReconciliation.js.map +1 -1
- package/dist/client/payoutPolicy.d.ts +7 -1
- package/dist/client/payoutPolicy.d.ts.map +1 -1
- package/dist/client/payoutPolicy.js +78 -7
- package/dist/client/payoutPolicy.js.map +1 -1
- package/dist/component/_generated/component.d.ts +196 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/earnings/triggers.d.ts +38 -4
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/payoutPolicy/adoption.d.ts +9 -0
- package/dist/component/payoutPolicy/adoption.d.ts.map +1 -0
- package/dist/component/payoutPolicy/adoption.js +45 -0
- package/dist/component/payoutPolicy/adoption.js.map +1 -0
- package/dist/component/payoutPolicy/mutations.d.ts +96 -0
- package/dist/component/payoutPolicy/mutations.d.ts.map +1 -1
- package/dist/component/payoutPolicy/mutations.js +38 -5
- package/dist/component/payoutPolicy/mutations.js.map +1 -1
- package/dist/component/payoutPolicy/queries.d.ts +16 -0
- package/dist/component/payoutPolicy/queries.d.ts.map +1 -1
- package/dist/component/payoutPolicy/schema.d.ts +299 -2
- package/dist/component/payoutPolicy/schema.d.ts.map +1 -1
- package/dist/component/payoutPolicy/schema.js +7 -0
- package/dist/component/payoutPolicy/schema.js.map +1 -1
- package/dist/component/payoutRelease/adoption.d.ts +269 -0
- package/dist/component/payoutRelease/adoption.d.ts.map +1 -0
- package/dist/component/payoutRelease/adoption.js +197 -0
- package/dist/component/payoutRelease/adoption.js.map +1 -0
- package/dist/component/payoutRelease/helpers.d.ts +3 -0
- package/dist/component/payoutRelease/helpers.d.ts.map +1 -1
- package/dist/component/payoutRelease/helpers.js +20 -0
- package/dist/component/payoutRelease/helpers.js.map +1 -1
- package/dist/component/payoutRelease/mutations.d.ts +81 -0
- package/dist/component/payoutRelease/mutations.d.ts.map +1 -1
- package/dist/component/payoutRelease/mutations.js +6 -0
- package/dist/component/payoutRelease/mutations.js.map +1 -1
- package/dist/component/payoutRelease/observation.d.ts +18 -0
- package/dist/component/payoutRelease/observation.d.ts.map +1 -0
- package/dist/component/payoutRelease/observation.js +11 -0
- package/dist/component/payoutRelease/observation.js.map +1 -0
- package/dist/component/payoutRelease/queries.d.ts +3 -0
- package/dist/component/payoutRelease/queries.d.ts.map +1 -1
- package/dist/component/payoutRelease/schema.d.ts +8 -19
- package/dist/component/payoutRelease/schema.d.ts.map +1 -1
- package/dist/component/payoutRelease/schema.js +3 -9
- package/dist/component/payoutRelease/schema.js.map +1 -1
- package/dist/component/schema.d.ts +73 -2
- package/docs/settlement.md +127 -40
- package/package.json +1 -1
- package/src/client/connect/payoutActivationProof.ts +101 -0
- package/src/client/connect/payoutAdoption.test.ts +186 -0
- package/src/client/connect/payoutAdoption.ts +331 -0
- package/src/client/connect/payoutAdoptionAge.test.ts +89 -0
- package/src/client/connect/payoutAdoptionAge.ts +74 -0
- package/src/client/connect/payoutAdoptionAllocation.test.ts +132 -0
- package/src/client/connect/payoutAdoptionAllocation.ts +106 -0
- package/src/client/connect/payoutAdoptionTestHelpers.ts +253 -0
- package/src/client/connect/payoutReconciliation.test.ts +16 -0
- package/src/client/connect/payoutReconciliation.ts +6 -2
- package/src/client/connect/payoutReturnedAdoption.test.ts +157 -0
- package/src/client/payoutPolicy.test.ts +16 -0
- package/src/client/payoutPolicy.ts +107 -5
- package/src/component/_generated/api.ts +6 -0
- package/src/component/_generated/component.ts +192 -1
- package/src/component/payout-adoption.test.ts +272 -0
- package/src/component/payout-policy-adoption.test.ts +131 -0
- package/src/component/payoutPolicy/adoption.ts +76 -0
- package/src/component/payoutPolicy/mutations.ts +46 -3
- package/src/component/payoutPolicy/schema.ts +9 -0
- package/src/component/payoutRelease/adoption.ts +262 -0
- package/src/component/payoutRelease/helpers.ts +21 -0
- package/src/component/payoutRelease/mutations.ts +10 -0
- package/src/component/payoutRelease/observation.ts +10 -0
- package/src/component/payoutRelease/schema.ts +3 -9
|
@@ -1656,12 +1656,44 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1656
1656
|
mutations: {
|
|
1657
1657
|
beginAttempt: FunctionReference<"mutation", "internal", {
|
|
1658
1658
|
accountId: string;
|
|
1659
|
+
adoption?: {
|
|
1660
|
+
claims: Array<{
|
|
1661
|
+
fingerprint: string;
|
|
1662
|
+
operationKey: string;
|
|
1663
|
+
}>;
|
|
1664
|
+
observations: Array<{
|
|
1665
|
+
currency: string;
|
|
1666
|
+
ledgerFingerprint: string;
|
|
1667
|
+
matureNet: number;
|
|
1668
|
+
observedAt: number;
|
|
1669
|
+
pendingCredits: number;
|
|
1670
|
+
stripeTransferId: string;
|
|
1671
|
+
transactionIds: Array<string>;
|
|
1672
|
+
}>;
|
|
1673
|
+
oldestHeldAt?: number;
|
|
1674
|
+
};
|
|
1659
1675
|
operationKey: string;
|
|
1660
1676
|
ownerKey: string;
|
|
1661
1677
|
}, {
|
|
1662
1678
|
_creationTime: number;
|
|
1663
1679
|
_id: string;
|
|
1664
1680
|
accountId: string;
|
|
1681
|
+
adoption?: {
|
|
1682
|
+
claims: Array<{
|
|
1683
|
+
fingerprint: string;
|
|
1684
|
+
operationKey: string;
|
|
1685
|
+
}>;
|
|
1686
|
+
observations: Array<{
|
|
1687
|
+
currency: string;
|
|
1688
|
+
ledgerFingerprint: string;
|
|
1689
|
+
matureNet: number;
|
|
1690
|
+
observedAt: number;
|
|
1691
|
+
pendingCredits: number;
|
|
1692
|
+
stripeTransferId: string;
|
|
1693
|
+
transactionIds: Array<string>;
|
|
1694
|
+
}>;
|
|
1695
|
+
oldestHeldAt?: number;
|
|
1696
|
+
};
|
|
1665
1697
|
attempted?: boolean;
|
|
1666
1698
|
country: string;
|
|
1667
1699
|
expectedRevision: number;
|
|
@@ -1704,6 +1736,22 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1704
1736
|
_creationTime: number;
|
|
1705
1737
|
_id: string;
|
|
1706
1738
|
accountId: string;
|
|
1739
|
+
adoption?: {
|
|
1740
|
+
claims: Array<{
|
|
1741
|
+
fingerprint: string;
|
|
1742
|
+
operationKey: string;
|
|
1743
|
+
}>;
|
|
1744
|
+
observations: Array<{
|
|
1745
|
+
currency: string;
|
|
1746
|
+
ledgerFingerprint: string;
|
|
1747
|
+
matureNet: number;
|
|
1748
|
+
observedAt: number;
|
|
1749
|
+
pendingCredits: number;
|
|
1750
|
+
stripeTransferId: string;
|
|
1751
|
+
transactionIds: Array<string>;
|
|
1752
|
+
}>;
|
|
1753
|
+
oldestHeldAt?: number;
|
|
1754
|
+
};
|
|
1707
1755
|
attempted?: boolean;
|
|
1708
1756
|
country: string;
|
|
1709
1757
|
expectedRevision: number;
|
|
@@ -1746,6 +1794,22 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1746
1794
|
_creationTime: number;
|
|
1747
1795
|
_id: string;
|
|
1748
1796
|
accountId: string;
|
|
1797
|
+
adoption?: {
|
|
1798
|
+
claims: Array<{
|
|
1799
|
+
fingerprint: string;
|
|
1800
|
+
operationKey: string;
|
|
1801
|
+
}>;
|
|
1802
|
+
observations: Array<{
|
|
1803
|
+
currency: string;
|
|
1804
|
+
ledgerFingerprint: string;
|
|
1805
|
+
matureNet: number;
|
|
1806
|
+
observedAt: number;
|
|
1807
|
+
pendingCredits: number;
|
|
1808
|
+
stripeTransferId: string;
|
|
1809
|
+
transactionIds: Array<string>;
|
|
1810
|
+
}>;
|
|
1811
|
+
oldestHeldAt?: number;
|
|
1812
|
+
};
|
|
1749
1813
|
attempted?: boolean;
|
|
1750
1814
|
country: string;
|
|
1751
1815
|
expectedRevision: number;
|
|
@@ -1777,6 +1841,22 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1777
1841
|
}, Name>;
|
|
1778
1842
|
prepare: FunctionReference<"mutation", "internal", {
|
|
1779
1843
|
accountId: string;
|
|
1844
|
+
adoption?: {
|
|
1845
|
+
claims: Array<{
|
|
1846
|
+
fingerprint: string;
|
|
1847
|
+
operationKey: string;
|
|
1848
|
+
}>;
|
|
1849
|
+
observations: Array<{
|
|
1850
|
+
currency: string;
|
|
1851
|
+
ledgerFingerprint: string;
|
|
1852
|
+
matureNet: number;
|
|
1853
|
+
observedAt: number;
|
|
1854
|
+
pendingCredits: number;
|
|
1855
|
+
stripeTransferId: string;
|
|
1856
|
+
transactionIds: Array<string>;
|
|
1857
|
+
}>;
|
|
1858
|
+
oldestHeldAt?: number;
|
|
1859
|
+
};
|
|
1780
1860
|
country: string;
|
|
1781
1861
|
expectedRevision: number;
|
|
1782
1862
|
mode: "stripe_managed" | "custom";
|
|
@@ -1796,6 +1876,22 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1796
1876
|
_creationTime: number;
|
|
1797
1877
|
_id: string;
|
|
1798
1878
|
accountId: string;
|
|
1879
|
+
adoption?: {
|
|
1880
|
+
claims: Array<{
|
|
1881
|
+
fingerprint: string;
|
|
1882
|
+
operationKey: string;
|
|
1883
|
+
}>;
|
|
1884
|
+
observations: Array<{
|
|
1885
|
+
currency: string;
|
|
1886
|
+
ledgerFingerprint: string;
|
|
1887
|
+
matureNet: number;
|
|
1888
|
+
observedAt: number;
|
|
1889
|
+
pendingCredits: number;
|
|
1890
|
+
stripeTransferId: string;
|
|
1891
|
+
transactionIds: Array<string>;
|
|
1892
|
+
}>;
|
|
1893
|
+
oldestHeldAt?: number;
|
|
1894
|
+
};
|
|
1799
1895
|
attempted?: boolean;
|
|
1800
1896
|
country: string;
|
|
1801
1897
|
expectedRevision: number;
|
|
@@ -1894,6 +1990,22 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1894
1990
|
_creationTime: number;
|
|
1895
1991
|
_id: string;
|
|
1896
1992
|
accountId: string;
|
|
1993
|
+
adoption?: {
|
|
1994
|
+
claims: Array<{
|
|
1995
|
+
fingerprint: string;
|
|
1996
|
+
operationKey: string;
|
|
1997
|
+
}>;
|
|
1998
|
+
observations: Array<{
|
|
1999
|
+
currency: string;
|
|
2000
|
+
ledgerFingerprint: string;
|
|
2001
|
+
matureNet: number;
|
|
2002
|
+
observedAt: number;
|
|
2003
|
+
pendingCredits: number;
|
|
2004
|
+
stripeTransferId: string;
|
|
2005
|
+
transactionIds: Array<string>;
|
|
2006
|
+
}>;
|
|
2007
|
+
oldestHeldAt?: number;
|
|
2008
|
+
};
|
|
1897
2009
|
attempted?: boolean;
|
|
1898
2010
|
country: string;
|
|
1899
2011
|
expectedRevision: number;
|
|
@@ -1927,6 +2039,82 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1927
2039
|
};
|
|
1928
2040
|
payoutRelease: {
|
|
1929
2041
|
mutations: {
|
|
2042
|
+
adoptHistoricalBatch: FunctionReference<"mutation", "internal", {
|
|
2043
|
+
accountId: string;
|
|
2044
|
+
expectedClaims: Array<{
|
|
2045
|
+
fingerprint: string;
|
|
2046
|
+
operationKey: string;
|
|
2047
|
+
}>;
|
|
2048
|
+
expectedRevision: number;
|
|
2049
|
+
observations: Array<{
|
|
2050
|
+
currency: string;
|
|
2051
|
+
ledgerFingerprint: string;
|
|
2052
|
+
matureNet: number;
|
|
2053
|
+
observedAt: number;
|
|
2054
|
+
pendingCredits: number;
|
|
2055
|
+
stripeTransferId: string;
|
|
2056
|
+
transactionIds: Array<string>;
|
|
2057
|
+
}>;
|
|
2058
|
+
ownerKey: string;
|
|
2059
|
+
payouts: Array<{
|
|
2060
|
+
allocations: Array<{
|
|
2061
|
+
amount: number;
|
|
2062
|
+
role?: "store" | "affiliate" | "other";
|
|
2063
|
+
stripeTransferId: string;
|
|
2064
|
+
}>;
|
|
2065
|
+
payout: {
|
|
2066
|
+
amount: number;
|
|
2067
|
+
created: number;
|
|
2068
|
+
currency: string;
|
|
2069
|
+
debitFee: number;
|
|
2070
|
+
debitTransactionId: string;
|
|
2071
|
+
destinationId: string;
|
|
2072
|
+
returnFee?: number;
|
|
2073
|
+
returnTransactionId?: string;
|
|
2074
|
+
status: "paid" | "returned";
|
|
2075
|
+
stripePayoutId: string;
|
|
2076
|
+
};
|
|
2077
|
+
}>;
|
|
2078
|
+
}, {
|
|
2079
|
+
claims: Array<{
|
|
2080
|
+
_creationTime: number;
|
|
2081
|
+
_id: string;
|
|
2082
|
+
accountId: string;
|
|
2083
|
+
allocations: Array<{
|
|
2084
|
+
amount: number;
|
|
2085
|
+
role?: "store" | "affiliate" | "other";
|
|
2086
|
+
stripeTransferId: string;
|
|
2087
|
+
}>;
|
|
2088
|
+
amount: number;
|
|
2089
|
+
attemptedAt?: number;
|
|
2090
|
+
currency: string;
|
|
2091
|
+
debitFee?: number;
|
|
2092
|
+
debitTransactionId?: string;
|
|
2093
|
+
destinationId?: string;
|
|
2094
|
+
expectedRevision: number;
|
|
2095
|
+
feeRevision?: number;
|
|
2096
|
+
historical?: boolean;
|
|
2097
|
+
observations: Array<{
|
|
2098
|
+
currency: string;
|
|
2099
|
+
ledgerFingerprint: string;
|
|
2100
|
+
matureNet: number;
|
|
2101
|
+
observedAt: number;
|
|
2102
|
+
pendingCredits: number;
|
|
2103
|
+
stripeTransferId: string;
|
|
2104
|
+
transactionIds: Array<string>;
|
|
2105
|
+
}>;
|
|
2106
|
+
operationKey: string;
|
|
2107
|
+
ownerKey: string;
|
|
2108
|
+
providerFee?: number;
|
|
2109
|
+
rejection?: {
|
|
2110
|
+
code: "balance_insufficient" | "amount_too_small";
|
|
2111
|
+
requestId: string;
|
|
2112
|
+
};
|
|
2113
|
+
returnTransactionId?: string;
|
|
2114
|
+
status: "reserved" | "submitted" | "paid" | "returned" | "canceled" | "rejected";
|
|
2115
|
+
stripePayoutId?: string;
|
|
2116
|
+
}>;
|
|
2117
|
+
}, Name>;
|
|
1930
2118
|
beginAttempt: FunctionReference<"mutation", "internal", {
|
|
1931
2119
|
accountId: string;
|
|
1932
2120
|
operationKey: string;
|
|
@@ -1948,6 +2136,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1948
2136
|
destinationId?: string;
|
|
1949
2137
|
expectedRevision: number;
|
|
1950
2138
|
feeRevision?: number;
|
|
2139
|
+
historical?: boolean;
|
|
1951
2140
|
observations: Array<{
|
|
1952
2141
|
currency: string;
|
|
1953
2142
|
ledgerFingerprint: string;
|
|
@@ -1989,6 +2178,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1989
2178
|
destinationId?: string;
|
|
1990
2179
|
expectedRevision: number;
|
|
1991
2180
|
feeRevision?: number;
|
|
2181
|
+
historical?: boolean;
|
|
1992
2182
|
observations: Array<{
|
|
1993
2183
|
currency: string;
|
|
1994
2184
|
ledgerFingerprint: string;
|
|
@@ -2044,6 +2234,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2044
2234
|
destinationId?: string;
|
|
2045
2235
|
expectedRevision: number;
|
|
2046
2236
|
feeRevision?: number;
|
|
2237
|
+
historical?: boolean;
|
|
2047
2238
|
observations: Array<{
|
|
2048
2239
|
currency: string;
|
|
2049
2240
|
ledgerFingerprint: string;
|
|
@@ -2101,6 +2292,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2101
2292
|
destinationId?: string;
|
|
2102
2293
|
expectedRevision: number;
|
|
2103
2294
|
feeRevision?: number;
|
|
2295
|
+
historical?: boolean;
|
|
2104
2296
|
observations: Array<{
|
|
2105
2297
|
currency: string;
|
|
2106
2298
|
ledgerFingerprint: string;
|
|
@@ -2144,6 +2336,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2144
2336
|
destinationId?: string;
|
|
2145
2337
|
expectedRevision: number;
|
|
2146
2338
|
feeRevision?: number;
|
|
2339
|
+
historical?: boolean;
|
|
2147
2340
|
observations: Array<{
|
|
2148
2341
|
currency: string;
|
|
2149
2342
|
ledgerFingerprint: string;
|
|
@@ -2195,6 +2388,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2195
2388
|
destinationId?: string;
|
|
2196
2389
|
expectedRevision: number;
|
|
2197
2390
|
feeRevision?: number;
|
|
2391
|
+
historical?: boolean;
|
|
2198
2392
|
observations: Array<{
|
|
2199
2393
|
currency: string;
|
|
2200
2394
|
ledgerFingerprint: string;
|
|
@@ -2246,6 +2440,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2246
2440
|
destinationId?: string;
|
|
2247
2441
|
expectedRevision: number;
|
|
2248
2442
|
feeRevision?: number;
|
|
2443
|
+
historical?: boolean;
|
|
2249
2444
|
observations: Array<{
|
|
2250
2445
|
currency: string;
|
|
2251
2446
|
ledgerFingerprint: string;
|
|
@@ -2291,6 +2486,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2291
2486
|
destinationId?: string;
|
|
2292
2487
|
expectedRevision: number;
|
|
2293
2488
|
feeRevision?: number;
|
|
2489
|
+
historical?: boolean;
|
|
2294
2490
|
observations: Array<{
|
|
2295
2491
|
currency: string;
|
|
2296
2492
|
ledgerFingerprint: string;
|