@fantastic.dev/better-stripe 0.38.0 → 0.40.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 +34 -0
- package/MIGRATION.md +9 -0
- package/README.md +21 -1
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +506 -2
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts +253 -1
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +506 -2
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutSyncTestHelpers.d.ts +253 -1
- package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
- package/dist/client/costRecovery-invoices.d.ts.map +1 -1
- package/dist/client/costRecovery-invoices.js +3 -5
- package/dist/client/costRecovery-invoices.js.map +1 -1
- package/dist/client/costRecovery.d.ts +18 -0
- package/dist/client/costRecovery.d.ts.map +1 -1
- package/dist/client/costRecovery.js +4 -0
- package/dist/client/costRecovery.js.map +1 -1
- package/dist/client/index.d.ts +4 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +3 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/paymentSource/client.d.ts +21 -0
- package/dist/client/paymentSource/client.d.ts.map +1 -0
- package/dist/client/paymentSource/client.js +8 -0
- package/dist/client/paymentSource/client.js.map +1 -0
- package/dist/client/paymentSource/contracts.d.ts +30 -0
- package/dist/client/paymentSource/contracts.d.ts.map +1 -0
- package/dist/client/paymentSource/contracts.js +16 -0
- package/dist/client/paymentSource/contracts.js.map +1 -0
- package/dist/client/paymentSource/economics.d.ts +12 -0
- package/dist/client/paymentSource/economics.d.ts.map +1 -0
- package/dist/client/paymentSource/economics.js +13 -0
- package/dist/client/paymentSource/economics.js.map +1 -0
- package/dist/client/paymentSource/funding.d.ts +10 -0
- package/dist/client/paymentSource/funding.d.ts.map +1 -0
- package/dist/client/paymentSource/funding.js +12 -0
- package/dist/client/paymentSource/funding.js.map +1 -0
- package/dist/client/paymentSource/history.d.ts +13 -0
- package/dist/client/paymentSource/history.d.ts.map +1 -0
- package/dist/client/paymentSource/history.js +41 -0
- package/dist/client/paymentSource/history.js.map +1 -0
- package/dist/client/paymentSource/resolver.d.ts +6 -0
- package/dist/client/paymentSource/resolver.d.ts.map +1 -0
- package/dist/client/paymentSource/resolver.js +222 -0
- package/dist/client/paymentSource/resolver.js.map +1 -0
- package/dist/client/processingCostDeficit/index.d.ts +27 -0
- package/dist/client/processingCostDeficit/index.d.ts.map +1 -0
- package/dist/client/processingCostDeficit/index.js +54 -0
- package/dist/client/processingCostDeficit/index.js.map +1 -0
- package/dist/client/settlement/verifiedSale.d.ts.map +1 -1
- package/dist/client/settlement/verifiedSale.js +4 -6
- package/dist/client/settlement/verifiedSale.js.map +1 -1
- package/dist/component/_generated/api.d.ts +284 -0
- package/dist/component/_generated/api.d.ts.map +1 -0
- package/dist/component/_generated/api.js +31 -0
- package/dist/component/_generated/api.js.map +1 -0
- package/dist/component/_generated/component.d.ts +527 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/balanceFunding/helpers.d.ts +86 -0
- package/dist/component/balanceFunding/helpers.d.ts.map +1 -0
- package/dist/component/balanceFunding/helpers.js +68 -0
- package/dist/component/balanceFunding/helpers.js.map +1 -0
- package/dist/component/balanceFunding/importHandler.d.ts +13 -0
- package/dist/component/balanceFunding/importHandler.d.ts.map +1 -0
- package/dist/component/balanceFunding/importHandler.js +130 -0
- package/dist/component/balanceFunding/importHandler.js.map +1 -0
- package/dist/component/balanceFunding/lifecycleHandlers.d.ts +85 -0
- package/dist/component/balanceFunding/lifecycleHandlers.d.ts.map +1 -0
- package/dist/component/balanceFunding/lifecycleHandlers.js +60 -0
- package/dist/component/balanceFunding/lifecycleHandlers.js.map +1 -0
- package/dist/component/balanceFunding/mutationValidators.d.ts +238 -0
- package/dist/component/balanceFunding/mutationValidators.d.ts.map +1 -0
- package/dist/component/balanceFunding/mutationValidators.js +55 -0
- package/dist/component/balanceFunding/mutationValidators.js.map +1 -0
- package/dist/component/balanceFunding/mutations.d.ts +335 -0
- package/dist/component/balanceFunding/mutations.d.ts.map +1 -0
- package/dist/component/balanceFunding/mutations.js +106 -0
- package/dist/component/balanceFunding/mutations.js.map +1 -0
- package/dist/component/balanceFunding/preparationHandlers.d.ts +55 -0
- package/dist/component/balanceFunding/preparationHandlers.d.ts.map +1 -0
- package/dist/component/balanceFunding/preparationHandlers.js +165 -0
- package/dist/component/balanceFunding/preparationHandlers.js.map +1 -0
- package/dist/component/balanceFunding/queries.d.ts +151 -0
- package/dist/component/balanceFunding/queries.d.ts.map +1 -0
- package/dist/component/balanceFunding/queries.js +180 -0
- package/dist/component/balanceFunding/queries.js.map +1 -0
- package/dist/component/balanceFunding/schema.d.ts +748 -0
- package/dist/component/balanceFunding/schema.d.ts.map +1 -0
- package/dist/component/balanceFunding/schema.js +124 -0
- package/dist/component/balanceFunding/schema.js.map +1 -0
- package/dist/component/balanceFunding/stateHandlers.d.ts +58 -0
- package/dist/component/balanceFunding/stateHandlers.d.ts.map +1 -0
- package/dist/component/balanceFunding/stateHandlers.js +160 -0
- package/dist/component/balanceFunding/stateHandlers.js.map +1 -0
- package/dist/component/convex.config.d.ts.map +1 -1
- package/dist/component/convex.config.js +2 -0
- package/dist/component/convex.config.js.map +1 -1
- package/dist/component/costRecovery/completion.d.ts +1 -0
- package/dist/component/costRecovery/completion.d.ts.map +1 -1
- package/dist/component/costRecovery/helpers.d.ts +1 -0
- package/dist/component/costRecovery/helpers.d.ts.map +1 -1
- package/dist/component/costRecovery/mutations.d.ts +5 -0
- package/dist/component/costRecovery/mutations.d.ts.map +1 -1
- package/dist/component/costRecovery/preparation.d.ts +50 -0
- package/dist/component/costRecovery/preparation.d.ts.map +1 -0
- package/dist/component/costRecovery/preparation.js +108 -0
- package/dist/component/costRecovery/preparation.js.map +1 -0
- package/dist/component/costRecovery/queries.d.ts +1 -0
- package/dist/component/costRecovery/queries.d.ts.map +1 -1
- package/dist/component/costRecovery/reservations.d.ts +2 -0
- package/dist/component/costRecovery/reservations.d.ts.map +1 -1
- package/dist/component/costRecovery/schema.d.ts +7 -2
- package/dist/component/costRecovery/schema.d.ts.map +1 -1
- package/dist/component/costRecovery/schema.js +1 -0
- package/dist/component/costRecovery/schema.js.map +1 -1
- package/dist/component/durableExecution/runtime.d.ts +3 -0
- package/dist/component/durableExecution/runtime.d.ts.map +1 -0
- package/dist/component/durableExecution/runtime.js +12 -0
- package/dist/component/durableExecution/runtime.js.map +1 -0
- package/dist/component/earnings/triggers.d.ts +242 -2
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/schema.d.ts +253 -1
- package/dist/component/schema.js +4 -0
- package/dist/component/schema.js.map +1 -1
- package/docs/settlement.md +48 -0
- package/package.json +4 -2
- package/src/client/costRecovery-invoices.ts +3 -7
- package/src/client/costRecovery.test.ts +34 -0
- package/src/client/costRecovery.ts +21 -0
- package/src/client/index.ts +7 -2
- package/src/client/paymentSource/client.ts +13 -0
- package/src/client/paymentSource/contracts.ts +33 -0
- package/src/client/paymentSource/economics.ts +20 -0
- package/src/client/paymentSource/funding.ts +23 -0
- package/src/client/paymentSource/history.ts +48 -0
- package/src/client/paymentSource/resolver.test.ts +582 -0
- package/src/client/paymentSource/resolver.ts +350 -0
- package/src/client/processingCostDeficit/README.md +35 -0
- package/src/client/processingCostDeficit/calculator.test.ts +176 -0
- package/src/client/processingCostDeficit/index.ts +91 -0
- package/src/client/settlement/verifiedSale.ts +4 -10
- package/src/component/_generated/api.ts +23 -1
- package/src/component/_generated/component.ts +693 -0
- package/src/component/balanceFunding/failure.test.ts +116 -0
- package/src/component/balanceFunding/helpers.ts +102 -0
- package/src/component/balanceFunding/import.test.ts +221 -0
- package/src/component/balanceFunding/importHandler.ts +146 -0
- package/src/component/balanceFunding/lifecycleHandlers.ts +90 -0
- package/src/component/balanceFunding/lookup.test.ts +113 -0
- package/src/component/balanceFunding/mutationValidators.ts +63 -0
- package/src/component/balanceFunding/mutations.ts +136 -0
- package/src/component/balanceFunding/preparation.test.ts +146 -0
- package/src/component/balanceFunding/preparationHandlers.ts +204 -0
- package/src/component/balanceFunding/queries.ts +221 -0
- package/src/component/balanceFunding/requestLookup.test.ts +160 -0
- package/src/component/balanceFunding/schema.ts +169 -0
- package/src/component/balanceFunding/state.test.ts +352 -0
- package/src/component/balanceFunding/stateHandlers.ts +198 -0
- package/src/component/balanceFunding/validation.test.ts +100 -0
- package/src/component/convex.config.ts +2 -0
- package/src/component/costRecovery/preparation.test.ts +355 -0
- package/src/component/costRecovery/preparation.ts +124 -0
- package/src/component/costRecovery/schema.ts +1 -0
- package/src/component/durableExecution/composition.test.ts +568 -0
- package/src/component/durableExecution/runtime.ts +12 -0
- package/src/component/schema.ts +8 -0
|
@@ -473,6 +473,477 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
473
473
|
}, Name>;
|
|
474
474
|
};
|
|
475
475
|
};
|
|
476
|
+
balanceFunding: {
|
|
477
|
+
mutations: {
|
|
478
|
+
begin: FunctionReference<"mutation", "internal", {
|
|
479
|
+
accountId: string;
|
|
480
|
+
consent?: true;
|
|
481
|
+
enabled: boolean;
|
|
482
|
+
preparationId: string;
|
|
483
|
+
requestKey: string;
|
|
484
|
+
scopeKey: string;
|
|
485
|
+
}, {
|
|
486
|
+
operation: {
|
|
487
|
+
accountId: string;
|
|
488
|
+
operationId: string;
|
|
489
|
+
scopeKey: string;
|
|
490
|
+
version: number;
|
|
491
|
+
};
|
|
492
|
+
status: "accepted";
|
|
493
|
+
} | {
|
|
494
|
+
enabled: boolean;
|
|
495
|
+
status: "unchanged";
|
|
496
|
+
} | {
|
|
497
|
+
reason: "scope_busy" | "identity_changed" | "revision_changed";
|
|
498
|
+
retryable: false;
|
|
499
|
+
status: "conflict";
|
|
500
|
+
} | {
|
|
501
|
+
reason: "policy_invalid";
|
|
502
|
+
retryable: false;
|
|
503
|
+
status: "rejected";
|
|
504
|
+
} | {
|
|
505
|
+
reason: "provider_pending";
|
|
506
|
+
retryable: true;
|
|
507
|
+
status: "not_ready";
|
|
508
|
+
}, Name>;
|
|
509
|
+
failBeforeStart: FunctionReference<"mutation", "internal", {
|
|
510
|
+
accountId: string;
|
|
511
|
+
failureCode: "invalid_scope" | "unsupported_source" | "policy_invalid";
|
|
512
|
+
operationId: string;
|
|
513
|
+
scopeKey: string;
|
|
514
|
+
version: number;
|
|
515
|
+
}, {
|
|
516
|
+
_creationTime: number;
|
|
517
|
+
_id: string;
|
|
518
|
+
accountId: string;
|
|
519
|
+
cancelRequested: boolean;
|
|
520
|
+
enabled: boolean;
|
|
521
|
+
failureCode?: "invalid_scope" | "unsupported_source" | "policy_invalid";
|
|
522
|
+
kind: "prepare" | "apply";
|
|
523
|
+
preparationId: string;
|
|
524
|
+
providerKey: string;
|
|
525
|
+
providerKeys: {
|
|
526
|
+
attach?: string;
|
|
527
|
+
create?: string;
|
|
528
|
+
disable: string;
|
|
529
|
+
enable: string;
|
|
530
|
+
};
|
|
531
|
+
receipt?: {
|
|
532
|
+
customerAccount: string;
|
|
533
|
+
paymentMethodId: string | null;
|
|
534
|
+
paymentMethodTypes: Array<string> | null;
|
|
535
|
+
providerApiVersion: string;
|
|
536
|
+
stripeSubscriptionId: string;
|
|
537
|
+
};
|
|
538
|
+
scopeKey: string;
|
|
539
|
+
state: "pending" | "running" | "unknown" | "succeeded" | "canceled" | "failed";
|
|
540
|
+
version: number;
|
|
541
|
+
}, Name>;
|
|
542
|
+
finish: FunctionReference<"mutation", "internal", {
|
|
543
|
+
accountId: string;
|
|
544
|
+
enabled: boolean;
|
|
545
|
+
operationId: string;
|
|
546
|
+
receipt: {
|
|
547
|
+
customerAccount: string;
|
|
548
|
+
paymentMethodId: string | null;
|
|
549
|
+
paymentMethodTypes: Array<string> | null;
|
|
550
|
+
providerApiVersion: string;
|
|
551
|
+
stripeSubscriptionId: string;
|
|
552
|
+
};
|
|
553
|
+
scopeKey: string;
|
|
554
|
+
version: number;
|
|
555
|
+
}, {
|
|
556
|
+
_creationTime: number;
|
|
557
|
+
_id: string;
|
|
558
|
+
accountId: string;
|
|
559
|
+
cancelRequested: boolean;
|
|
560
|
+
enabled: boolean;
|
|
561
|
+
failureCode?: "invalid_scope" | "unsupported_source" | "policy_invalid";
|
|
562
|
+
kind: "prepare" | "apply";
|
|
563
|
+
preparationId: string;
|
|
564
|
+
providerKey: string;
|
|
565
|
+
providerKeys: {
|
|
566
|
+
attach?: string;
|
|
567
|
+
create?: string;
|
|
568
|
+
disable: string;
|
|
569
|
+
enable: string;
|
|
570
|
+
};
|
|
571
|
+
receipt?: {
|
|
572
|
+
customerAccount: string;
|
|
573
|
+
paymentMethodId: string | null;
|
|
574
|
+
paymentMethodTypes: Array<string> | null;
|
|
575
|
+
providerApiVersion: string;
|
|
576
|
+
stripeSubscriptionId: string;
|
|
577
|
+
};
|
|
578
|
+
scopeKey: string;
|
|
579
|
+
state: "pending" | "running" | "unknown" | "succeeded" | "canceled" | "failed";
|
|
580
|
+
version: number;
|
|
581
|
+
}, Name>;
|
|
582
|
+
finishPreparation: FunctionReference<"mutation", "internal", {
|
|
583
|
+
accountId: string;
|
|
584
|
+
operationId: string;
|
|
585
|
+
preparation: {
|
|
586
|
+
customerAccount: string;
|
|
587
|
+
paymentMethodId: string;
|
|
588
|
+
previousPaymentMethodId: string | null;
|
|
589
|
+
previousPaymentMethodTypes: Array<string> | null;
|
|
590
|
+
stripeSubscriptionId: string;
|
|
591
|
+
};
|
|
592
|
+
providerApiVersion: string;
|
|
593
|
+
scopeKey: string;
|
|
594
|
+
version: number;
|
|
595
|
+
}, {
|
|
596
|
+
_creationTime: number;
|
|
597
|
+
_id: string;
|
|
598
|
+
accountId: string;
|
|
599
|
+
cancelRequested: boolean;
|
|
600
|
+
enabled: boolean;
|
|
601
|
+
failureCode?: "invalid_scope" | "unsupported_source" | "policy_invalid";
|
|
602
|
+
kind: "prepare" | "apply";
|
|
603
|
+
preparationId: string;
|
|
604
|
+
providerKey: string;
|
|
605
|
+
providerKeys: {
|
|
606
|
+
attach?: string;
|
|
607
|
+
create?: string;
|
|
608
|
+
disable: string;
|
|
609
|
+
enable: string;
|
|
610
|
+
};
|
|
611
|
+
receipt?: {
|
|
612
|
+
customerAccount: string;
|
|
613
|
+
paymentMethodId: string | null;
|
|
614
|
+
paymentMethodTypes: Array<string> | null;
|
|
615
|
+
providerApiVersion: string;
|
|
616
|
+
stripeSubscriptionId: string;
|
|
617
|
+
};
|
|
618
|
+
scopeKey: string;
|
|
619
|
+
state: "pending" | "running" | "unknown" | "succeeded" | "canceled" | "failed";
|
|
620
|
+
version: number;
|
|
621
|
+
}, Name>;
|
|
622
|
+
importPreparation: FunctionReference<"mutation", "internal", {
|
|
623
|
+
accountId: string;
|
|
624
|
+
consentAt: number;
|
|
625
|
+
consentReference: string;
|
|
626
|
+
enabled: boolean;
|
|
627
|
+
operationVersion: number;
|
|
628
|
+
pending?: {
|
|
629
|
+
enabled: boolean;
|
|
630
|
+
kind?: "prepare" | "apply";
|
|
631
|
+
providerKey: string;
|
|
632
|
+
requestKey: string;
|
|
633
|
+
};
|
|
634
|
+
preparation: {
|
|
635
|
+
customerAccount: string;
|
|
636
|
+
paymentMethodId?: string;
|
|
637
|
+
previousPaymentMethodId: string | null;
|
|
638
|
+
previousPaymentMethodTypes: Array<string> | null;
|
|
639
|
+
stripeSubscriptionId: string;
|
|
640
|
+
};
|
|
641
|
+
providerApiVersion: string;
|
|
642
|
+
scopeKey: string;
|
|
643
|
+
sourceKey: string;
|
|
644
|
+
}, {
|
|
645
|
+
operation?: {
|
|
646
|
+
accountId: string;
|
|
647
|
+
operationId: string;
|
|
648
|
+
scopeKey: string;
|
|
649
|
+
version: number;
|
|
650
|
+
};
|
|
651
|
+
preparationId: string;
|
|
652
|
+
}, Name>;
|
|
653
|
+
markUnknown: FunctionReference<"mutation", "internal", {
|
|
654
|
+
accountId: string;
|
|
655
|
+
operationId: string;
|
|
656
|
+
scopeKey: string;
|
|
657
|
+
version: number;
|
|
658
|
+
}, {
|
|
659
|
+
_creationTime: number;
|
|
660
|
+
_id: string;
|
|
661
|
+
accountId: string;
|
|
662
|
+
cancelRequested: boolean;
|
|
663
|
+
enabled: boolean;
|
|
664
|
+
failureCode?: "invalid_scope" | "unsupported_source" | "policy_invalid";
|
|
665
|
+
kind: "prepare" | "apply";
|
|
666
|
+
preparationId: string;
|
|
667
|
+
providerKey: string;
|
|
668
|
+
providerKeys: {
|
|
669
|
+
attach?: string;
|
|
670
|
+
create?: string;
|
|
671
|
+
disable: string;
|
|
672
|
+
enable: string;
|
|
673
|
+
};
|
|
674
|
+
receipt?: {
|
|
675
|
+
customerAccount: string;
|
|
676
|
+
paymentMethodId: string | null;
|
|
677
|
+
paymentMethodTypes: Array<string> | null;
|
|
678
|
+
providerApiVersion: string;
|
|
679
|
+
stripeSubscriptionId: string;
|
|
680
|
+
};
|
|
681
|
+
scopeKey: string;
|
|
682
|
+
state: "pending" | "running" | "unknown" | "succeeded" | "canceled" | "failed";
|
|
683
|
+
version: number;
|
|
684
|
+
}, Name>;
|
|
685
|
+
prepare: FunctionReference<"mutation", "internal", {
|
|
686
|
+
accountId: string;
|
|
687
|
+
consent: true;
|
|
688
|
+
consentAt: number;
|
|
689
|
+
consentReference: string;
|
|
690
|
+
preparation: {
|
|
691
|
+
customerAccount: string;
|
|
692
|
+
previousPaymentMethodId: string | null;
|
|
693
|
+
previousPaymentMethodTypes: Array<string> | null;
|
|
694
|
+
stripeSubscriptionId: string;
|
|
695
|
+
};
|
|
696
|
+
providerApiVersion: string;
|
|
697
|
+
requestKey: string;
|
|
698
|
+
scopeKey: string;
|
|
699
|
+
}, {
|
|
700
|
+
operation: {
|
|
701
|
+
accountId: string;
|
|
702
|
+
operationId: string;
|
|
703
|
+
scopeKey: string;
|
|
704
|
+
version: number;
|
|
705
|
+
};
|
|
706
|
+
status: "accepted";
|
|
707
|
+
} | {
|
|
708
|
+
enabled: boolean;
|
|
709
|
+
status: "unchanged";
|
|
710
|
+
} | {
|
|
711
|
+
reason: "scope_busy" | "identity_changed" | "revision_changed";
|
|
712
|
+
retryable: false;
|
|
713
|
+
status: "conflict";
|
|
714
|
+
} | {
|
|
715
|
+
reason: "policy_invalid";
|
|
716
|
+
retryable: false;
|
|
717
|
+
status: "rejected";
|
|
718
|
+
} | {
|
|
719
|
+
reason: "provider_pending";
|
|
720
|
+
retryable: true;
|
|
721
|
+
status: "not_ready";
|
|
722
|
+
}, Name>;
|
|
723
|
+
requestCancel: FunctionReference<"mutation", "internal", {
|
|
724
|
+
accountId: string;
|
|
725
|
+
operationId: string;
|
|
726
|
+
scopeKey: string;
|
|
727
|
+
version: number;
|
|
728
|
+
}, {
|
|
729
|
+
_creationTime: number;
|
|
730
|
+
_id: string;
|
|
731
|
+
accountId: string;
|
|
732
|
+
cancelRequested: boolean;
|
|
733
|
+
enabled: boolean;
|
|
734
|
+
failureCode?: "invalid_scope" | "unsupported_source" | "policy_invalid";
|
|
735
|
+
kind: "prepare" | "apply";
|
|
736
|
+
preparationId: string;
|
|
737
|
+
providerKey: string;
|
|
738
|
+
providerKeys: {
|
|
739
|
+
attach?: string;
|
|
740
|
+
create?: string;
|
|
741
|
+
disable: string;
|
|
742
|
+
enable: string;
|
|
743
|
+
};
|
|
744
|
+
receipt?: {
|
|
745
|
+
customerAccount: string;
|
|
746
|
+
paymentMethodId: string | null;
|
|
747
|
+
paymentMethodTypes: Array<string> | null;
|
|
748
|
+
providerApiVersion: string;
|
|
749
|
+
stripeSubscriptionId: string;
|
|
750
|
+
};
|
|
751
|
+
scopeKey: string;
|
|
752
|
+
state: "pending" | "running" | "unknown" | "succeeded" | "canceled" | "failed";
|
|
753
|
+
version: number;
|
|
754
|
+
}, Name>;
|
|
755
|
+
savePreparation: FunctionReference<"mutation", "internal", {
|
|
756
|
+
accountId: string;
|
|
757
|
+
consentAt: number;
|
|
758
|
+
consentReference: string;
|
|
759
|
+
preparation: {
|
|
760
|
+
customerAccount: string;
|
|
761
|
+
paymentMethodId: string;
|
|
762
|
+
previousPaymentMethodId: string | null;
|
|
763
|
+
previousPaymentMethodTypes: Array<string> | null;
|
|
764
|
+
stripeSubscriptionId: string;
|
|
765
|
+
};
|
|
766
|
+
providerApiVersion: string;
|
|
767
|
+
scopeKey: string;
|
|
768
|
+
}, {
|
|
769
|
+
preparationId: string;
|
|
770
|
+
}, Name>;
|
|
771
|
+
setStartsPaused: FunctionReference<"mutation", "internal", {
|
|
772
|
+
accountId: string;
|
|
773
|
+
paused: boolean;
|
|
774
|
+
preparationId: string;
|
|
775
|
+
scopeKey: string;
|
|
776
|
+
stripeSubscriptionId: string;
|
|
777
|
+
}, null, Name>;
|
|
778
|
+
start: FunctionReference<"mutation", "internal", {
|
|
779
|
+
accountId: string;
|
|
780
|
+
operationId: string;
|
|
781
|
+
scopeKey: string;
|
|
782
|
+
version: number;
|
|
783
|
+
}, {
|
|
784
|
+
_creationTime: number;
|
|
785
|
+
_id: string;
|
|
786
|
+
accountId: string;
|
|
787
|
+
cancelRequested: boolean;
|
|
788
|
+
enabled: boolean;
|
|
789
|
+
failureCode?: "invalid_scope" | "unsupported_source" | "policy_invalid";
|
|
790
|
+
kind: "prepare" | "apply";
|
|
791
|
+
preparationId: string;
|
|
792
|
+
providerKey: string;
|
|
793
|
+
providerKeys: {
|
|
794
|
+
attach?: string;
|
|
795
|
+
create?: string;
|
|
796
|
+
disable: string;
|
|
797
|
+
enable: string;
|
|
798
|
+
};
|
|
799
|
+
receipt?: {
|
|
800
|
+
customerAccount: string;
|
|
801
|
+
paymentMethodId: string | null;
|
|
802
|
+
paymentMethodTypes: Array<string> | null;
|
|
803
|
+
providerApiVersion: string;
|
|
804
|
+
stripeSubscriptionId: string;
|
|
805
|
+
};
|
|
806
|
+
scopeKey: string;
|
|
807
|
+
state: "pending" | "running" | "unknown" | "succeeded" | "canceled" | "failed";
|
|
808
|
+
version: number;
|
|
809
|
+
}, Name>;
|
|
810
|
+
};
|
|
811
|
+
queries: {
|
|
812
|
+
findPreparationOperation: FunctionReference<"query", "internal", {
|
|
813
|
+
accountId: string;
|
|
814
|
+
consent: boolean;
|
|
815
|
+
providerApiVersion: string;
|
|
816
|
+
requestKey: string;
|
|
817
|
+
scopeKey: string;
|
|
818
|
+
stripeSubscriptionId: string;
|
|
819
|
+
}, {
|
|
820
|
+
accountId: string;
|
|
821
|
+
cancelRequested: boolean;
|
|
822
|
+
failureCode?: "invalid_scope" | "unsupported_source" | "policy_invalid";
|
|
823
|
+
operationId: string;
|
|
824
|
+
scopeKey: string;
|
|
825
|
+
state: "pending" | "running" | "unknown" | "succeeded" | "canceled" | "failed";
|
|
826
|
+
version: number;
|
|
827
|
+
} | {
|
|
828
|
+
reason: "scope_busy" | "identity_changed" | "revision_changed";
|
|
829
|
+
retryable: false;
|
|
830
|
+
status: "conflict";
|
|
831
|
+
} | {
|
|
832
|
+
reason: "invalid_scope";
|
|
833
|
+
retryable: false;
|
|
834
|
+
status: "rejected";
|
|
835
|
+
} | null, Name>;
|
|
836
|
+
getOperation: FunctionReference<"query", "internal", {
|
|
837
|
+
accountId: string;
|
|
838
|
+
operationId: string;
|
|
839
|
+
scopeKey: string;
|
|
840
|
+
stripeSubscriptionId: string;
|
|
841
|
+
version: number;
|
|
842
|
+
}, {
|
|
843
|
+
accountId: string;
|
|
844
|
+
cancelRequested: boolean;
|
|
845
|
+
failureCode?: "invalid_scope" | "unsupported_source" | "policy_invalid";
|
|
846
|
+
operationId: string;
|
|
847
|
+
scopeKey: string;
|
|
848
|
+
state: "pending" | "running" | "unknown" | "succeeded" | "canceled" | "failed";
|
|
849
|
+
version: number;
|
|
850
|
+
} | null, Name>;
|
|
851
|
+
getPreparation: FunctionReference<"query", "internal", {
|
|
852
|
+
accountId: string;
|
|
853
|
+
operationId: string;
|
|
854
|
+
scopeKey: string;
|
|
855
|
+
stripeSubscriptionId: string;
|
|
856
|
+
version: number;
|
|
857
|
+
}, {
|
|
858
|
+
operation: {
|
|
859
|
+
accountId: string;
|
|
860
|
+
operationId: string;
|
|
861
|
+
scopeKey: string;
|
|
862
|
+
version: number;
|
|
863
|
+
};
|
|
864
|
+
preparationId: string;
|
|
865
|
+
status: "prepared";
|
|
866
|
+
stripeSubscriptionId: string;
|
|
867
|
+
} | {
|
|
868
|
+
failureCode?: "invalid_scope" | "unsupported_source" | "policy_invalid";
|
|
869
|
+
operation: {
|
|
870
|
+
accountId: string;
|
|
871
|
+
operationId: string;
|
|
872
|
+
scopeKey: string;
|
|
873
|
+
version: number;
|
|
874
|
+
};
|
|
875
|
+
status: "pending" | "running" | "unknown" | "canceled" | "failed";
|
|
876
|
+
} | {
|
|
877
|
+
reason: "scope_busy" | "identity_changed" | "revision_changed";
|
|
878
|
+
retryable: false;
|
|
879
|
+
status: "conflict";
|
|
880
|
+
} | {
|
|
881
|
+
reason: "invalid_scope";
|
|
882
|
+
retryable: false;
|
|
883
|
+
status: "rejected";
|
|
884
|
+
} | null, Name>;
|
|
885
|
+
inspectOperation: FunctionReference<"query", "internal", {
|
|
886
|
+
accountId: string;
|
|
887
|
+
operationId: string;
|
|
888
|
+
scopeKey: string;
|
|
889
|
+
stripeSubscriptionId: string;
|
|
890
|
+
version: number;
|
|
891
|
+
}, {
|
|
892
|
+
_creationTime: number;
|
|
893
|
+
_id: string;
|
|
894
|
+
accountId: string;
|
|
895
|
+
cancelRequested: boolean;
|
|
896
|
+
enabled: boolean;
|
|
897
|
+
failureCode?: "invalid_scope" | "unsupported_source" | "policy_invalid";
|
|
898
|
+
kind: "prepare" | "apply";
|
|
899
|
+
preparationId: string;
|
|
900
|
+
providerKey: string;
|
|
901
|
+
providerKeys: {
|
|
902
|
+
attach?: string;
|
|
903
|
+
create?: string;
|
|
904
|
+
disable: string;
|
|
905
|
+
enable: string;
|
|
906
|
+
};
|
|
907
|
+
receipt?: {
|
|
908
|
+
customerAccount: string;
|
|
909
|
+
paymentMethodId: string | null;
|
|
910
|
+
paymentMethodTypes: Array<string> | null;
|
|
911
|
+
providerApiVersion: string;
|
|
912
|
+
stripeSubscriptionId: string;
|
|
913
|
+
};
|
|
914
|
+
scopeKey: string;
|
|
915
|
+
state: "pending" | "running" | "unknown" | "succeeded" | "canceled" | "failed";
|
|
916
|
+
version: number;
|
|
917
|
+
} | null, Name>;
|
|
918
|
+
readPreparation: FunctionReference<"query", "internal", {
|
|
919
|
+
accountId: string;
|
|
920
|
+
preparationId: string;
|
|
921
|
+
scopeKey: string;
|
|
922
|
+
stripeSubscriptionId: string;
|
|
923
|
+
}, {
|
|
924
|
+
_creationTime: number;
|
|
925
|
+
_id: string;
|
|
926
|
+
accountId: string;
|
|
927
|
+
activeOperationId?: string;
|
|
928
|
+
consentAt: number;
|
|
929
|
+
consentReference: string;
|
|
930
|
+
enabled: boolean;
|
|
931
|
+
operationVersion: number;
|
|
932
|
+
preparation: {
|
|
933
|
+
customerAccount: string;
|
|
934
|
+
paymentMethodId?: string;
|
|
935
|
+
previousPaymentMethodId: string | null;
|
|
936
|
+
previousPaymentMethodTypes: Array<string> | null;
|
|
937
|
+
stripeSubscriptionId: string;
|
|
938
|
+
};
|
|
939
|
+
preparationOperationId?: string;
|
|
940
|
+
providerApiVersion: string;
|
|
941
|
+
scopeKey: string;
|
|
942
|
+
startsPaused: boolean;
|
|
943
|
+
verified: boolean;
|
|
944
|
+
} | null, Name>;
|
|
945
|
+
};
|
|
946
|
+
};
|
|
476
947
|
billing: {
|
|
477
948
|
mutations: {
|
|
478
949
|
upsertCheckoutSession: FunctionReference<"mutation", "internal", {
|
|
@@ -1797,6 +2268,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1797
2268
|
maxCredit: number;
|
|
1798
2269
|
maxDebit: number;
|
|
1799
2270
|
pendingOperations: number;
|
|
2271
|
+
preparationSequence?: number;
|
|
1800
2272
|
scopeKey: string;
|
|
1801
2273
|
sourceGross?: number;
|
|
1802
2274
|
sourceId: string;
|
|
@@ -1823,6 +2295,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1823
2295
|
maxCredit: number;
|
|
1824
2296
|
maxDebit: number;
|
|
1825
2297
|
pendingOperations: number;
|
|
2298
|
+
preparationSequence?: number;
|
|
1826
2299
|
scopeKey: string;
|
|
1827
2300
|
sourceGross?: number;
|
|
1828
2301
|
sourceId: string;
|
|
@@ -1851,6 +2324,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1851
2324
|
maxCredit: number;
|
|
1852
2325
|
maxDebit: number;
|
|
1853
2326
|
pendingOperations: number;
|
|
2327
|
+
preparationSequence?: number;
|
|
1854
2328
|
scopeKey: string;
|
|
1855
2329
|
sourceGross?: number;
|
|
1856
2330
|
sourceId: string;
|
|
@@ -1958,6 +2432,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1958
2432
|
maxCredit: number;
|
|
1959
2433
|
maxDebit: number;
|
|
1960
2434
|
pendingOperations: number;
|
|
2435
|
+
preparationSequence?: number;
|
|
1961
2436
|
scopeKey: string;
|
|
1962
2437
|
sourceGross?: number;
|
|
1963
2438
|
sourceId: string;
|
|
@@ -2025,6 +2500,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2025
2500
|
maxCredit: number;
|
|
2026
2501
|
maxDebit: number;
|
|
2027
2502
|
pendingOperations: number;
|
|
2503
|
+
preparationSequence?: number;
|
|
2028
2504
|
scopeKey: string;
|
|
2029
2505
|
sourceGross?: number;
|
|
2030
2506
|
sourceId: string;
|
|
@@ -2033,6 +2509,56 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2033
2509
|
status: "open" | "sealed" | "collecting" | "releasing" | "collected" | "released";
|
|
2034
2510
|
}, Name>;
|
|
2035
2511
|
};
|
|
2512
|
+
preparation: {
|
|
2513
|
+
prepare: FunctionReference<"mutation", "internal", {
|
|
2514
|
+
accountId: string;
|
|
2515
|
+
currency: string;
|
|
2516
|
+
groupKey: string;
|
|
2517
|
+
limit?: number;
|
|
2518
|
+
maxCredit: number;
|
|
2519
|
+
maxDebit: number;
|
|
2520
|
+
scopeKey: string;
|
|
2521
|
+
sourceGross?: number;
|
|
2522
|
+
sourceId: string;
|
|
2523
|
+
sourceKind: "settlement" | "invoice";
|
|
2524
|
+
sourceProcessingFee?: number;
|
|
2525
|
+
}, {
|
|
2526
|
+
group: {
|
|
2527
|
+
_creationTime: number;
|
|
2528
|
+
_id: string;
|
|
2529
|
+
accountId: string;
|
|
2530
|
+
amount: number;
|
|
2531
|
+
currency: string;
|
|
2532
|
+
groupKey: string;
|
|
2533
|
+
invoiceFunding?: {
|
|
2534
|
+
sourceChargeId: string;
|
|
2535
|
+
sourceGross: number;
|
|
2536
|
+
sourceProcessingFee: number;
|
|
2537
|
+
};
|
|
2538
|
+
invoiceItemId?: string;
|
|
2539
|
+
maxCredit: number;
|
|
2540
|
+
maxDebit: number;
|
|
2541
|
+
pendingOperations: number;
|
|
2542
|
+
preparationSequence?: number;
|
|
2543
|
+
scopeKey: string;
|
|
2544
|
+
sourceGross?: number;
|
|
2545
|
+
sourceId: string;
|
|
2546
|
+
sourceKind: "settlement" | "invoice";
|
|
2547
|
+
sourceProcessingFee?: number;
|
|
2548
|
+
status: "open" | "sealed" | "collecting" | "releasing" | "collected" | "released";
|
|
2549
|
+
};
|
|
2550
|
+
isDone: boolean;
|
|
2551
|
+
status: "prepared";
|
|
2552
|
+
} | {
|
|
2553
|
+
reason: "scope_busy" | "identity_changed";
|
|
2554
|
+
retryable: false;
|
|
2555
|
+
status: "conflict";
|
|
2556
|
+
} | {
|
|
2557
|
+
reason: "invalid_scope" | "policy_invalid";
|
|
2558
|
+
retryable: false;
|
|
2559
|
+
status: "rejected";
|
|
2560
|
+
}, Name>;
|
|
2561
|
+
};
|
|
2036
2562
|
queries: {
|
|
2037
2563
|
balance: FunctionReference<"query", "internal", {
|
|
2038
2564
|
accountId: string;
|
|
@@ -2091,6 +2617,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2091
2617
|
maxCredit: number;
|
|
2092
2618
|
maxDebit: number;
|
|
2093
2619
|
pendingOperations: number;
|
|
2620
|
+
preparationSequence?: number;
|
|
2094
2621
|
scopeKey: string;
|
|
2095
2622
|
sourceGross?: number;
|
|
2096
2623
|
sourceId: string;
|