@fantastic.dev/better-stripe 0.19.0 → 0.20.0
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 +6 -0
- package/README.md +5 -3
- package/dist/client/connect/transferReceipt.d.ts.map +1 -1
- package/dist/client/connect/transferReceipt.js +1 -14
- package/dist/client/connect/transferReceipt.js.map +1 -1
- package/dist/component/_generated/component.d.ts +297 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/earnings/triggers.d.ts +134 -0
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/payoutRelease/allocation.d.ts +48 -0
- package/dist/component/payoutRelease/allocation.d.ts.map +1 -0
- package/dist/component/payoutRelease/allocation.js +98 -0
- package/dist/component/payoutRelease/allocation.js.map +1 -0
- package/dist/component/payoutRelease/helpers.d.ts +106 -0
- package/dist/component/payoutRelease/helpers.d.ts.map +1 -0
- package/dist/component/payoutRelease/helpers.js +119 -0
- package/dist/component/payoutRelease/helpers.js.map +1 -0
- package/dist/component/payoutRelease/mutations.d.ts +218 -0
- package/dist/component/payoutRelease/mutations.d.ts.map +1 -0
- package/dist/component/payoutRelease/mutations.js +254 -0
- package/dist/component/payoutRelease/mutations.js.map +1 -0
- package/dist/component/payoutRelease/queries.d.ts +84 -0
- package/dist/component/payoutRelease/queries.d.ts.map +1 -0
- package/dist/component/payoutRelease/queries.js +51 -0
- package/dist/component/payoutRelease/queries.js.map +1 -0
- package/dist/component/payoutRelease/schema.d.ts +289 -0
- package/dist/component/payoutRelease/schema.d.ts.map +1 -0
- package/dist/component/payoutRelease/schema.js +56 -0
- package/dist/component/payoutRelease/schema.js.map +1 -0
- package/dist/component/schema.d.ts +110 -0
- package/dist/component/schema.js +3 -0
- package/dist/component/schema.js.map +1 -1
- package/docs/settlement.md +31 -0
- package/package.json +1 -1
- package/src/client/connect/payoutAllocation.test.ts +292 -0
- package/src/client/connect/transferReceipt.ts +1 -14
- package/src/component/_generated/api.ts +8 -0
- package/src/component/_generated/component.ts +372 -0
- package/src/component/payout-release.test.ts +588 -0
- package/src/component/payoutRelease/allocation.ts +147 -0
- package/src/component/payoutRelease/helpers.ts +168 -0
- package/src/component/payoutRelease/mutations.ts +309 -0
- package/src/component/payoutRelease/queries.ts +56 -0
- package/src/component/payoutRelease/schema.ts +69 -0
- package/src/component/schema.ts +6 -0
|
@@ -2474,6 +2474,378 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2474
2474
|
>;
|
|
2475
2475
|
};
|
|
2476
2476
|
};
|
|
2477
|
+
payoutRelease: {
|
|
2478
|
+
mutations: {
|
|
2479
|
+
beginAttempt: FunctionReference<
|
|
2480
|
+
"mutation",
|
|
2481
|
+
"internal",
|
|
2482
|
+
{ accountId: string; operationKey: string; ownerKey: string },
|
|
2483
|
+
{
|
|
2484
|
+
_creationTime: number;
|
|
2485
|
+
_id: string;
|
|
2486
|
+
accountId: string;
|
|
2487
|
+
allocations: Array<{
|
|
2488
|
+
amount: number;
|
|
2489
|
+
role?: "store" | "affiliate" | "other";
|
|
2490
|
+
stripeTransferId: string;
|
|
2491
|
+
}>;
|
|
2492
|
+
amount: number;
|
|
2493
|
+
attemptedAt?: number;
|
|
2494
|
+
currency: string;
|
|
2495
|
+
expectedRevision: number;
|
|
2496
|
+
observations: Array<{
|
|
2497
|
+
currency: string;
|
|
2498
|
+
ledgerFingerprint: string;
|
|
2499
|
+
matureNet: number;
|
|
2500
|
+
observedAt: number;
|
|
2501
|
+
pendingCredits: number;
|
|
2502
|
+
stripeTransferId: string;
|
|
2503
|
+
transactionIds: Array<string>;
|
|
2504
|
+
}>;
|
|
2505
|
+
operationKey: string;
|
|
2506
|
+
ownerKey: string;
|
|
2507
|
+
rejection?: {
|
|
2508
|
+
code: "balance_insufficient" | "amount_too_small";
|
|
2509
|
+
requestId: string;
|
|
2510
|
+
};
|
|
2511
|
+
returnTransactionId?: string;
|
|
2512
|
+
status:
|
|
2513
|
+
| "reserved"
|
|
2514
|
+
| "submitted"
|
|
2515
|
+
| "paid"
|
|
2516
|
+
| "returned"
|
|
2517
|
+
| "canceled"
|
|
2518
|
+
| "rejected";
|
|
2519
|
+
stripePayoutId?: string;
|
|
2520
|
+
},
|
|
2521
|
+
Name
|
|
2522
|
+
>;
|
|
2523
|
+
cancelUnattempted: FunctionReference<
|
|
2524
|
+
"mutation",
|
|
2525
|
+
"internal",
|
|
2526
|
+
{ accountId: string; operationKey: string; ownerKey: string },
|
|
2527
|
+
{
|
|
2528
|
+
_creationTime: number;
|
|
2529
|
+
_id: string;
|
|
2530
|
+
accountId: string;
|
|
2531
|
+
allocations: Array<{
|
|
2532
|
+
amount: number;
|
|
2533
|
+
role?: "store" | "affiliate" | "other";
|
|
2534
|
+
stripeTransferId: string;
|
|
2535
|
+
}>;
|
|
2536
|
+
amount: number;
|
|
2537
|
+
attemptedAt?: number;
|
|
2538
|
+
currency: string;
|
|
2539
|
+
expectedRevision: number;
|
|
2540
|
+
observations: Array<{
|
|
2541
|
+
currency: string;
|
|
2542
|
+
ledgerFingerprint: string;
|
|
2543
|
+
matureNet: number;
|
|
2544
|
+
observedAt: number;
|
|
2545
|
+
pendingCredits: number;
|
|
2546
|
+
stripeTransferId: string;
|
|
2547
|
+
transactionIds: Array<string>;
|
|
2548
|
+
}>;
|
|
2549
|
+
operationKey: string;
|
|
2550
|
+
ownerKey: string;
|
|
2551
|
+
rejection?: {
|
|
2552
|
+
code: "balance_insufficient" | "amount_too_small";
|
|
2553
|
+
requestId: string;
|
|
2554
|
+
};
|
|
2555
|
+
returnTransactionId?: string;
|
|
2556
|
+
status:
|
|
2557
|
+
| "reserved"
|
|
2558
|
+
| "submitted"
|
|
2559
|
+
| "paid"
|
|
2560
|
+
| "returned"
|
|
2561
|
+
| "canceled"
|
|
2562
|
+
| "rejected";
|
|
2563
|
+
stripePayoutId?: string;
|
|
2564
|
+
},
|
|
2565
|
+
Name
|
|
2566
|
+
>;
|
|
2567
|
+
claim: FunctionReference<
|
|
2568
|
+
"mutation",
|
|
2569
|
+
"internal",
|
|
2570
|
+
{
|
|
2571
|
+
accountId: string;
|
|
2572
|
+
currency: string;
|
|
2573
|
+
expectedRevision: number;
|
|
2574
|
+
independentLiabilities: number;
|
|
2575
|
+
observations: Array<{
|
|
2576
|
+
currency: string;
|
|
2577
|
+
ledgerFingerprint: string;
|
|
2578
|
+
matureNet: number;
|
|
2579
|
+
observedAt: number;
|
|
2580
|
+
pendingCredits: number;
|
|
2581
|
+
stripeTransferId: string;
|
|
2582
|
+
transactionIds: Array<string>;
|
|
2583
|
+
}>;
|
|
2584
|
+
operationKey: string;
|
|
2585
|
+
ownerKey: string;
|
|
2586
|
+
providerAvailable: number;
|
|
2587
|
+
},
|
|
2588
|
+
| {
|
|
2589
|
+
_creationTime: number;
|
|
2590
|
+
_id: string;
|
|
2591
|
+
accountId: string;
|
|
2592
|
+
allocations: Array<{
|
|
2593
|
+
amount: number;
|
|
2594
|
+
role?: "store" | "affiliate" | "other";
|
|
2595
|
+
stripeTransferId: string;
|
|
2596
|
+
}>;
|
|
2597
|
+
amount: number;
|
|
2598
|
+
attemptedAt?: number;
|
|
2599
|
+
currency: string;
|
|
2600
|
+
expectedRevision: number;
|
|
2601
|
+
observations: Array<{
|
|
2602
|
+
currency: string;
|
|
2603
|
+
ledgerFingerprint: string;
|
|
2604
|
+
matureNet: number;
|
|
2605
|
+
observedAt: number;
|
|
2606
|
+
pendingCredits: number;
|
|
2607
|
+
stripeTransferId: string;
|
|
2608
|
+
transactionIds: Array<string>;
|
|
2609
|
+
}>;
|
|
2610
|
+
operationKey: string;
|
|
2611
|
+
ownerKey: string;
|
|
2612
|
+
rejection?: {
|
|
2613
|
+
code: "balance_insufficient" | "amount_too_small";
|
|
2614
|
+
requestId: string;
|
|
2615
|
+
};
|
|
2616
|
+
returnTransactionId?: string;
|
|
2617
|
+
status:
|
|
2618
|
+
| "reserved"
|
|
2619
|
+
| "submitted"
|
|
2620
|
+
| "paid"
|
|
2621
|
+
| "returned"
|
|
2622
|
+
| "canceled"
|
|
2623
|
+
| "rejected";
|
|
2624
|
+
stripePayoutId?: string;
|
|
2625
|
+
}
|
|
2626
|
+
| {
|
|
2627
|
+
amount: 0;
|
|
2628
|
+
currency: string;
|
|
2629
|
+
matureUnpaid?: number;
|
|
2630
|
+
pendingCredits?: number;
|
|
2631
|
+
providerMinimum: null;
|
|
2632
|
+
reason:
|
|
2633
|
+
"below_threshold" | "insufficient_available" | "pending_claim";
|
|
2634
|
+
status: "held";
|
|
2635
|
+
},
|
|
2636
|
+
Name
|
|
2637
|
+
>;
|
|
2638
|
+
recordOutcome: FunctionReference<
|
|
2639
|
+
"mutation",
|
|
2640
|
+
"internal",
|
|
2641
|
+
{
|
|
2642
|
+
accountId: string;
|
|
2643
|
+
amount: number;
|
|
2644
|
+
currency: string;
|
|
2645
|
+
operationKey: string;
|
|
2646
|
+
ownerKey: string;
|
|
2647
|
+
providerStatus:
|
|
2648
|
+
"pending" | "in_transit" | "paid" | "failed" | "canceled";
|
|
2649
|
+
returnTransactionId?: string;
|
|
2650
|
+
stripePayoutId: string;
|
|
2651
|
+
},
|
|
2652
|
+
{
|
|
2653
|
+
_creationTime: number;
|
|
2654
|
+
_id: string;
|
|
2655
|
+
accountId: string;
|
|
2656
|
+
allocations: Array<{
|
|
2657
|
+
amount: number;
|
|
2658
|
+
role?: "store" | "affiliate" | "other";
|
|
2659
|
+
stripeTransferId: string;
|
|
2660
|
+
}>;
|
|
2661
|
+
amount: number;
|
|
2662
|
+
attemptedAt?: number;
|
|
2663
|
+
currency: string;
|
|
2664
|
+
expectedRevision: number;
|
|
2665
|
+
observations: Array<{
|
|
2666
|
+
currency: string;
|
|
2667
|
+
ledgerFingerprint: string;
|
|
2668
|
+
matureNet: number;
|
|
2669
|
+
observedAt: number;
|
|
2670
|
+
pendingCredits: number;
|
|
2671
|
+
stripeTransferId: string;
|
|
2672
|
+
transactionIds: Array<string>;
|
|
2673
|
+
}>;
|
|
2674
|
+
operationKey: string;
|
|
2675
|
+
ownerKey: string;
|
|
2676
|
+
rejection?: {
|
|
2677
|
+
code: "balance_insufficient" | "amount_too_small";
|
|
2678
|
+
requestId: string;
|
|
2679
|
+
};
|
|
2680
|
+
returnTransactionId?: string;
|
|
2681
|
+
status:
|
|
2682
|
+
| "reserved"
|
|
2683
|
+
| "submitted"
|
|
2684
|
+
| "paid"
|
|
2685
|
+
| "returned"
|
|
2686
|
+
| "canceled"
|
|
2687
|
+
| "rejected";
|
|
2688
|
+
stripePayoutId?: string;
|
|
2689
|
+
},
|
|
2690
|
+
Name
|
|
2691
|
+
>;
|
|
2692
|
+
recordRejection: FunctionReference<
|
|
2693
|
+
"mutation",
|
|
2694
|
+
"internal",
|
|
2695
|
+
{
|
|
2696
|
+
accountId: string;
|
|
2697
|
+
code: "balance_insufficient" | "amount_too_small";
|
|
2698
|
+
operationKey: string;
|
|
2699
|
+
ownerKey: string;
|
|
2700
|
+
requestId: string;
|
|
2701
|
+
},
|
|
2702
|
+
{
|
|
2703
|
+
_creationTime: number;
|
|
2704
|
+
_id: string;
|
|
2705
|
+
accountId: string;
|
|
2706
|
+
allocations: Array<{
|
|
2707
|
+
amount: number;
|
|
2708
|
+
role?: "store" | "affiliate" | "other";
|
|
2709
|
+
stripeTransferId: string;
|
|
2710
|
+
}>;
|
|
2711
|
+
amount: number;
|
|
2712
|
+
attemptedAt?: number;
|
|
2713
|
+
currency: string;
|
|
2714
|
+
expectedRevision: number;
|
|
2715
|
+
observations: Array<{
|
|
2716
|
+
currency: string;
|
|
2717
|
+
ledgerFingerprint: string;
|
|
2718
|
+
matureNet: number;
|
|
2719
|
+
observedAt: number;
|
|
2720
|
+
pendingCredits: number;
|
|
2721
|
+
stripeTransferId: string;
|
|
2722
|
+
transactionIds: Array<string>;
|
|
2723
|
+
}>;
|
|
2724
|
+
operationKey: string;
|
|
2725
|
+
ownerKey: string;
|
|
2726
|
+
rejection?: {
|
|
2727
|
+
code: "balance_insufficient" | "amount_too_small";
|
|
2728
|
+
requestId: string;
|
|
2729
|
+
};
|
|
2730
|
+
returnTransactionId?: string;
|
|
2731
|
+
status:
|
|
2732
|
+
| "reserved"
|
|
2733
|
+
| "submitted"
|
|
2734
|
+
| "paid"
|
|
2735
|
+
| "returned"
|
|
2736
|
+
| "canceled"
|
|
2737
|
+
| "rejected";
|
|
2738
|
+
stripePayoutId?: string;
|
|
2739
|
+
},
|
|
2740
|
+
Name
|
|
2741
|
+
>;
|
|
2742
|
+
};
|
|
2743
|
+
queries: {
|
|
2744
|
+
get: FunctionReference<
|
|
2745
|
+
"query",
|
|
2746
|
+
"internal",
|
|
2747
|
+
{ accountId: string; operationKey: string; ownerKey: string },
|
|
2748
|
+
{
|
|
2749
|
+
_creationTime: number;
|
|
2750
|
+
_id: string;
|
|
2751
|
+
accountId: string;
|
|
2752
|
+
allocations: Array<{
|
|
2753
|
+
amount: number;
|
|
2754
|
+
role?: "store" | "affiliate" | "other";
|
|
2755
|
+
stripeTransferId: string;
|
|
2756
|
+
}>;
|
|
2757
|
+
amount: number;
|
|
2758
|
+
attemptedAt?: number;
|
|
2759
|
+
currency: string;
|
|
2760
|
+
expectedRevision: number;
|
|
2761
|
+
observations: Array<{
|
|
2762
|
+
currency: string;
|
|
2763
|
+
ledgerFingerprint: string;
|
|
2764
|
+
matureNet: number;
|
|
2765
|
+
observedAt: number;
|
|
2766
|
+
pendingCredits: number;
|
|
2767
|
+
stripeTransferId: string;
|
|
2768
|
+
transactionIds: Array<string>;
|
|
2769
|
+
}>;
|
|
2770
|
+
operationKey: string;
|
|
2771
|
+
ownerKey: string;
|
|
2772
|
+
rejection?: {
|
|
2773
|
+
code: "balance_insufficient" | "amount_too_small";
|
|
2774
|
+
requestId: string;
|
|
2775
|
+
};
|
|
2776
|
+
returnTransactionId?: string;
|
|
2777
|
+
status:
|
|
2778
|
+
| "reserved"
|
|
2779
|
+
| "submitted"
|
|
2780
|
+
| "paid"
|
|
2781
|
+
| "returned"
|
|
2782
|
+
| "canceled"
|
|
2783
|
+
| "rejected";
|
|
2784
|
+
stripePayoutId?: string;
|
|
2785
|
+
} | null,
|
|
2786
|
+
Name
|
|
2787
|
+
>;
|
|
2788
|
+
pending: FunctionReference<
|
|
2789
|
+
"query",
|
|
2790
|
+
"internal",
|
|
2791
|
+
{
|
|
2792
|
+
accountId: string;
|
|
2793
|
+
ownerKey: string;
|
|
2794
|
+
paginationOpts: {
|
|
2795
|
+
cursor: string | null;
|
|
2796
|
+
endCursor?: string | null;
|
|
2797
|
+
id?: number;
|
|
2798
|
+
maximumBytesRead?: number;
|
|
2799
|
+
maximumRowsRead?: number;
|
|
2800
|
+
numItems: number;
|
|
2801
|
+
};
|
|
2802
|
+
},
|
|
2803
|
+
{
|
|
2804
|
+
continueCursor: string;
|
|
2805
|
+
isDone: boolean;
|
|
2806
|
+
page: Array<{
|
|
2807
|
+
_creationTime: number;
|
|
2808
|
+
_id: string;
|
|
2809
|
+
accountId: string;
|
|
2810
|
+
allocations: Array<{
|
|
2811
|
+
amount: number;
|
|
2812
|
+
role?: "store" | "affiliate" | "other";
|
|
2813
|
+
stripeTransferId: string;
|
|
2814
|
+
}>;
|
|
2815
|
+
amount: number;
|
|
2816
|
+
attemptedAt?: number;
|
|
2817
|
+
currency: string;
|
|
2818
|
+
expectedRevision: number;
|
|
2819
|
+
observations: Array<{
|
|
2820
|
+
currency: string;
|
|
2821
|
+
ledgerFingerprint: string;
|
|
2822
|
+
matureNet: number;
|
|
2823
|
+
observedAt: number;
|
|
2824
|
+
pendingCredits: number;
|
|
2825
|
+
stripeTransferId: string;
|
|
2826
|
+
transactionIds: Array<string>;
|
|
2827
|
+
}>;
|
|
2828
|
+
operationKey: string;
|
|
2829
|
+
ownerKey: string;
|
|
2830
|
+
rejection?: {
|
|
2831
|
+
code: "balance_insufficient" | "amount_too_small";
|
|
2832
|
+
requestId: string;
|
|
2833
|
+
};
|
|
2834
|
+
returnTransactionId?: string;
|
|
2835
|
+
status:
|
|
2836
|
+
| "reserved"
|
|
2837
|
+
| "submitted"
|
|
2838
|
+
| "paid"
|
|
2839
|
+
| "returned"
|
|
2840
|
+
| "canceled"
|
|
2841
|
+
| "rejected";
|
|
2842
|
+
stripePayoutId?: string;
|
|
2843
|
+
}>;
|
|
2844
|
+
},
|
|
2845
|
+
Name
|
|
2846
|
+
>;
|
|
2847
|
+
};
|
|
2848
|
+
};
|
|
2477
2849
|
products: {
|
|
2478
2850
|
mutations: {
|
|
2479
2851
|
upsertPrice: FunctionReference<
|