@whop/sdk 0.0.6 → 0.0.8
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 +47 -0
- package/client.d.mts +19 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +19 -10
- package/client.d.ts.map +1 -1
- package/client.js +9 -0
- package/client.js.map +1 -1
- package/client.mjs +9 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/access-tokens.d.mts +48 -26
- package/resources/access-tokens.d.mts.map +1 -1
- package/resources/access-tokens.d.ts +48 -26
- package/resources/access-tokens.d.ts.map +1 -1
- package/resources/access-tokens.js +5 -5
- package/resources/access-tokens.mjs +5 -5
- package/resources/apps.d.mts +17 -1
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +17 -1
- package/resources/apps.d.ts.map +1 -1
- package/resources/checkout-configurations.d.mts +169 -12
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +169 -12
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/checkout-configurations.js +1 -0
- package/resources/checkout-configurations.js.map +1 -1
- package/resources/checkout-configurations.mjs +1 -0
- package/resources/checkout-configurations.mjs.map +1 -1
- package/resources/course-lessons.d.mts +199 -1
- package/resources/course-lessons.d.mts.map +1 -1
- package/resources/course-lessons.d.ts +199 -1
- package/resources/course-lessons.d.ts.map +1 -1
- package/resources/course-lessons.js +40 -0
- package/resources/course-lessons.js.map +1 -1
- package/resources/course-lessons.mjs +40 -0
- package/resources/course-lessons.mjs.map +1 -1
- package/resources/courses.d.mts +8 -0
- package/resources/courses.d.mts.map +1 -1
- package/resources/courses.d.ts +8 -0
- package/resources/courses.d.ts.map +1 -1
- package/resources/disputes.d.mts +704 -0
- package/resources/disputes.d.mts.map +1 -0
- package/resources/disputes.d.ts +704 -0
- package/resources/disputes.d.ts.map +1 -0
- package/resources/disputes.js +77 -0
- package/resources/disputes.js.map +1 -0
- package/resources/disputes.mjs +73 -0
- package/resources/disputes.mjs.map +1 -0
- package/resources/forum-posts.d.mts +13 -1
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +13 -1
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/index.d.mts +8 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -5
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/ledger-accounts.d.mts +1 -1
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +1 -1
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/payments.d.mts +1 -1
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +1 -1
- package/resources/payments.d.ts.map +1 -1
- package/resources/refunds.d.mts +295 -0
- package/resources/refunds.d.mts.map +1 -0
- package/resources/refunds.d.ts +295 -0
- package/resources/refunds.d.ts.map +1 -0
- package/resources/refunds.js +34 -0
- package/resources/refunds.js.map +1 -0
- package/resources/refunds.mjs +30 -0
- package/resources/refunds.mjs.map +1 -0
- package/resources/shared.d.mts +46 -5
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +46 -5
- package/resources/shared.d.ts.map +1 -1
- package/resources/shipments.d.mts +1 -1
- package/resources/shipments.d.mts.map +1 -1
- package/resources/shipments.d.ts +1 -1
- package/resources/shipments.d.ts.map +1 -1
- package/resources/webhooks.d.mts +427 -2
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +427 -2
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/resources/withdrawals.d.mts +233 -0
- package/resources/withdrawals.d.mts.map +1 -0
- package/resources/withdrawals.d.ts +233 -0
- package/resources/withdrawals.d.ts.map +1 -0
- package/resources/withdrawals.js +31 -0
- package/resources/withdrawals.js.map +1 -0
- package/resources/withdrawals.mjs +27 -0
- package/resources/withdrawals.mjs.map +1 -0
- package/src/client.ts +93 -0
- package/src/resources/access-tokens.ts +53 -26
- package/src/resources/apps.ts +21 -0
- package/src/resources/checkout-configurations.ts +193 -12
- package/src/resources/course-lessons.ts +250 -0
- package/src/resources/courses.ts +10 -0
- package/src/resources/disputes.ts +873 -0
- package/src/resources/forum-posts.ts +16 -0
- package/src/resources/index.ts +42 -0
- package/src/resources/ledger-accounts.ts +1 -0
- package/src/resources/payments.ts +1 -0
- package/src/resources/refunds.ts +383 -0
- package/src/resources/shared.ts +62 -5
- package/src/resources/shipments.ts +1 -1
- package/src/resources/webhooks.ts +522 -1
- package/src/resources/withdrawals.ts +361 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as DisputesAPI from './disputes';
|
|
5
|
+
import * as PaymentsAPI from './payments';
|
|
6
|
+
import * as RefundsAPI from './refunds';
|
|
4
7
|
import * as Shared from './shared';
|
|
5
8
|
import { Webhook } from 'standardwebhooks';
|
|
6
9
|
|
|
@@ -399,6 +402,516 @@ export interface PaymentPendingWebhookEvent {
|
|
|
399
402
|
type: 'payment.pending';
|
|
400
403
|
}
|
|
401
404
|
|
|
405
|
+
export interface DisputeCreatedWebhookEvent {
|
|
406
|
+
/**
|
|
407
|
+
* A unique ID for every single webhook request
|
|
408
|
+
*/
|
|
409
|
+
id: string;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* The API version for this webhook
|
|
413
|
+
*/
|
|
414
|
+
api_version: 'v1';
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* An object representing a dispute against a company.
|
|
418
|
+
*/
|
|
419
|
+
data: DisputesAPI.Dispute;
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
423
|
+
*/
|
|
424
|
+
timestamp: string;
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* The webhook event type
|
|
428
|
+
*/
|
|
429
|
+
type: 'dispute.created';
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export interface DisputeUpdatedWebhookEvent {
|
|
433
|
+
/**
|
|
434
|
+
* A unique ID for every single webhook request
|
|
435
|
+
*/
|
|
436
|
+
id: string;
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* The API version for this webhook
|
|
440
|
+
*/
|
|
441
|
+
api_version: 'v1';
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* An object representing a dispute against a company.
|
|
445
|
+
*/
|
|
446
|
+
data: DisputesAPI.Dispute;
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
450
|
+
*/
|
|
451
|
+
timestamp: string;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* The webhook event type
|
|
455
|
+
*/
|
|
456
|
+
type: 'dispute.updated';
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
export interface RefundCreatedWebhookEvent {
|
|
460
|
+
/**
|
|
461
|
+
* A unique ID for every single webhook request
|
|
462
|
+
*/
|
|
463
|
+
id: string;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* The API version for this webhook
|
|
467
|
+
*/
|
|
468
|
+
api_version: 'v1';
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* An object representing a refund made on a payment.
|
|
472
|
+
*/
|
|
473
|
+
data: RefundCreatedWebhookEvent.Data;
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
477
|
+
*/
|
|
478
|
+
timestamp: string;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* The webhook event type
|
|
482
|
+
*/
|
|
483
|
+
type: 'refund.created';
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
export namespace RefundCreatedWebhookEvent {
|
|
487
|
+
/**
|
|
488
|
+
* An object representing a refund made on a payment.
|
|
489
|
+
*/
|
|
490
|
+
export interface Data {
|
|
491
|
+
/**
|
|
492
|
+
* The ID of the refund.
|
|
493
|
+
*/
|
|
494
|
+
id: string;
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* The amount of the refund.
|
|
498
|
+
*/
|
|
499
|
+
amount: number;
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* The time the refund was created.
|
|
503
|
+
*/
|
|
504
|
+
created_at: string;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* The currency of the refund.
|
|
508
|
+
*/
|
|
509
|
+
currency: Shared.Currency;
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* The payment associated with the refund.
|
|
513
|
+
*/
|
|
514
|
+
payment: Data.Payment | null;
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* The provider of the refund.
|
|
518
|
+
*/
|
|
519
|
+
provider: RefundsAPI.PaymentProvider;
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* The time the refund was created by the provider.
|
|
523
|
+
*/
|
|
524
|
+
provider_created_at: string | null;
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* The status of the refund reference.
|
|
528
|
+
*/
|
|
529
|
+
reference_status: RefundsAPI.RefundReferenceStatus | null;
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* The type of refund reference that was made available by the payment provider.
|
|
533
|
+
*/
|
|
534
|
+
reference_type: RefundsAPI.RefundReferenceType | null;
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* The value of the reference.
|
|
538
|
+
*/
|
|
539
|
+
reference_value: string | null;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* The status of the refund.
|
|
543
|
+
*/
|
|
544
|
+
status: RefundsAPI.RefundStatus;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
export namespace Data {
|
|
548
|
+
/**
|
|
549
|
+
* The payment associated with the refund.
|
|
550
|
+
*/
|
|
551
|
+
export interface Payment {
|
|
552
|
+
/**
|
|
553
|
+
* The payment ID
|
|
554
|
+
*/
|
|
555
|
+
id: string;
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* The reason why a specific payment was billed
|
|
559
|
+
*/
|
|
560
|
+
billing_reason: PaymentsAPI.BillingReasons | null;
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Possible card brands that a payment token can have
|
|
564
|
+
*/
|
|
565
|
+
card_brand: PaymentsAPI.CardBrands | null;
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* The last 4 digits of the card used to make the payment.
|
|
569
|
+
*/
|
|
570
|
+
card_last4: string | null;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* The datetime the payment was created
|
|
574
|
+
*/
|
|
575
|
+
created_at: string;
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* The available currencies on the platform
|
|
579
|
+
*/
|
|
580
|
+
currency: Shared.Currency | null;
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* When an alert came in that this transaction will be disputed
|
|
584
|
+
*/
|
|
585
|
+
dispute_alerted_at: string | null;
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* The member attached to this payment.
|
|
589
|
+
*/
|
|
590
|
+
member: Payment.Member | null;
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* The membership attached to this payment.
|
|
594
|
+
*/
|
|
595
|
+
membership: Payment.Membership | null;
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* The datetime the payment was paid
|
|
599
|
+
*/
|
|
600
|
+
paid_at: string | null;
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* The different types of payment methods that can be used.
|
|
604
|
+
*/
|
|
605
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes | null;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* The subtotal to show to the creator (excluding buyer fees).
|
|
609
|
+
*/
|
|
610
|
+
subtotal: number | null;
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* The total to show to the creator (excluding buyer fees).
|
|
614
|
+
*/
|
|
615
|
+
total: number | null;
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* The total in USD to show to the creator (excluding buyer fees).
|
|
619
|
+
*/
|
|
620
|
+
usd_total: number | null;
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* The user that made this payment.
|
|
624
|
+
*/
|
|
625
|
+
user: Payment.User | null;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
export namespace Payment {
|
|
629
|
+
/**
|
|
630
|
+
* The member attached to this payment.
|
|
631
|
+
*/
|
|
632
|
+
export interface Member {
|
|
633
|
+
/**
|
|
634
|
+
* The ID of the member
|
|
635
|
+
*/
|
|
636
|
+
id: string;
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* The phone number for the member, if available.
|
|
640
|
+
*/
|
|
641
|
+
phone: string | null;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* The membership attached to this payment.
|
|
646
|
+
*/
|
|
647
|
+
export interface Membership {
|
|
648
|
+
/**
|
|
649
|
+
* The internal ID of the membership.
|
|
650
|
+
*/
|
|
651
|
+
id: string;
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* The state of the membership.
|
|
655
|
+
*/
|
|
656
|
+
status: Shared.MembershipStatus;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* The user that made this payment.
|
|
661
|
+
*/
|
|
662
|
+
export interface User {
|
|
663
|
+
/**
|
|
664
|
+
* The internal ID of the user.
|
|
665
|
+
*/
|
|
666
|
+
id: string;
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* The email of the user
|
|
670
|
+
*/
|
|
671
|
+
email: string | null;
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* The name of the user from their Whop account.
|
|
675
|
+
*/
|
|
676
|
+
name: string | null;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* The username of the user from their Whop account.
|
|
680
|
+
*/
|
|
681
|
+
username: string;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
export interface RefundUpdatedWebhookEvent {
|
|
688
|
+
/**
|
|
689
|
+
* A unique ID for every single webhook request
|
|
690
|
+
*/
|
|
691
|
+
id: string;
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* The API version for this webhook
|
|
695
|
+
*/
|
|
696
|
+
api_version: 'v1';
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* An object representing a refund made on a payment.
|
|
700
|
+
*/
|
|
701
|
+
data: RefundUpdatedWebhookEvent.Data;
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
705
|
+
*/
|
|
706
|
+
timestamp: string;
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* The webhook event type
|
|
710
|
+
*/
|
|
711
|
+
type: 'refund.updated';
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
export namespace RefundUpdatedWebhookEvent {
|
|
715
|
+
/**
|
|
716
|
+
* An object representing a refund made on a payment.
|
|
717
|
+
*/
|
|
718
|
+
export interface Data {
|
|
719
|
+
/**
|
|
720
|
+
* The ID of the refund.
|
|
721
|
+
*/
|
|
722
|
+
id: string;
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* The amount of the refund.
|
|
726
|
+
*/
|
|
727
|
+
amount: number;
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* The time the refund was created.
|
|
731
|
+
*/
|
|
732
|
+
created_at: string;
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* The currency of the refund.
|
|
736
|
+
*/
|
|
737
|
+
currency: Shared.Currency;
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* The payment associated with the refund.
|
|
741
|
+
*/
|
|
742
|
+
payment: Data.Payment | null;
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* The provider of the refund.
|
|
746
|
+
*/
|
|
747
|
+
provider: RefundsAPI.PaymentProvider;
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* The time the refund was created by the provider.
|
|
751
|
+
*/
|
|
752
|
+
provider_created_at: string | null;
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* The status of the refund reference.
|
|
756
|
+
*/
|
|
757
|
+
reference_status: RefundsAPI.RefundReferenceStatus | null;
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* The type of refund reference that was made available by the payment provider.
|
|
761
|
+
*/
|
|
762
|
+
reference_type: RefundsAPI.RefundReferenceType | null;
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* The value of the reference.
|
|
766
|
+
*/
|
|
767
|
+
reference_value: string | null;
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* The status of the refund.
|
|
771
|
+
*/
|
|
772
|
+
status: RefundsAPI.RefundStatus;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
export namespace Data {
|
|
776
|
+
/**
|
|
777
|
+
* The payment associated with the refund.
|
|
778
|
+
*/
|
|
779
|
+
export interface Payment {
|
|
780
|
+
/**
|
|
781
|
+
* The payment ID
|
|
782
|
+
*/
|
|
783
|
+
id: string;
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* The reason why a specific payment was billed
|
|
787
|
+
*/
|
|
788
|
+
billing_reason: PaymentsAPI.BillingReasons | null;
|
|
789
|
+
|
|
790
|
+
/**
|
|
791
|
+
* Possible card brands that a payment token can have
|
|
792
|
+
*/
|
|
793
|
+
card_brand: PaymentsAPI.CardBrands | null;
|
|
794
|
+
|
|
795
|
+
/**
|
|
796
|
+
* The last 4 digits of the card used to make the payment.
|
|
797
|
+
*/
|
|
798
|
+
card_last4: string | null;
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* The datetime the payment was created
|
|
802
|
+
*/
|
|
803
|
+
created_at: string;
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* The available currencies on the platform
|
|
807
|
+
*/
|
|
808
|
+
currency: Shared.Currency | null;
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* When an alert came in that this transaction will be disputed
|
|
812
|
+
*/
|
|
813
|
+
dispute_alerted_at: string | null;
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* The member attached to this payment.
|
|
817
|
+
*/
|
|
818
|
+
member: Payment.Member | null;
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* The membership attached to this payment.
|
|
822
|
+
*/
|
|
823
|
+
membership: Payment.Membership | null;
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* The datetime the payment was paid
|
|
827
|
+
*/
|
|
828
|
+
paid_at: string | null;
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* The different types of payment methods that can be used.
|
|
832
|
+
*/
|
|
833
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes | null;
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* The subtotal to show to the creator (excluding buyer fees).
|
|
837
|
+
*/
|
|
838
|
+
subtotal: number | null;
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* The total to show to the creator (excluding buyer fees).
|
|
842
|
+
*/
|
|
843
|
+
total: number | null;
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* The total in USD to show to the creator (excluding buyer fees).
|
|
847
|
+
*/
|
|
848
|
+
usd_total: number | null;
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* The user that made this payment.
|
|
852
|
+
*/
|
|
853
|
+
user: Payment.User | null;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
export namespace Payment {
|
|
857
|
+
/**
|
|
858
|
+
* The member attached to this payment.
|
|
859
|
+
*/
|
|
860
|
+
export interface Member {
|
|
861
|
+
/**
|
|
862
|
+
* The ID of the member
|
|
863
|
+
*/
|
|
864
|
+
id: string;
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* The phone number for the member, if available.
|
|
868
|
+
*/
|
|
869
|
+
phone: string | null;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
/**
|
|
873
|
+
* The membership attached to this payment.
|
|
874
|
+
*/
|
|
875
|
+
export interface Membership {
|
|
876
|
+
/**
|
|
877
|
+
* The internal ID of the membership.
|
|
878
|
+
*/
|
|
879
|
+
id: string;
|
|
880
|
+
|
|
881
|
+
/**
|
|
882
|
+
* The state of the membership.
|
|
883
|
+
*/
|
|
884
|
+
status: Shared.MembershipStatus;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* The user that made this payment.
|
|
889
|
+
*/
|
|
890
|
+
export interface User {
|
|
891
|
+
/**
|
|
892
|
+
* The internal ID of the user.
|
|
893
|
+
*/
|
|
894
|
+
id: string;
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* The email of the user
|
|
898
|
+
*/
|
|
899
|
+
email: string | null;
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* The name of the user from their Whop account.
|
|
903
|
+
*/
|
|
904
|
+
name: string | null;
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* The username of the user from their Whop account.
|
|
908
|
+
*/
|
|
909
|
+
username: string;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
|
|
402
915
|
export type UnwrapWebhookEvent =
|
|
403
916
|
| InvoiceCreatedWebhookEvent
|
|
404
917
|
| InvoicePaidWebhookEvent
|
|
@@ -413,7 +926,11 @@ export type UnwrapWebhookEvent =
|
|
|
413
926
|
| CourseLessonInteractionCompletedWebhookEvent
|
|
414
927
|
| PaymentSucceededWebhookEvent
|
|
415
928
|
| PaymentFailedWebhookEvent
|
|
416
|
-
| PaymentPendingWebhookEvent
|
|
929
|
+
| PaymentPendingWebhookEvent
|
|
930
|
+
| DisputeCreatedWebhookEvent
|
|
931
|
+
| DisputeUpdatedWebhookEvent
|
|
932
|
+
| RefundCreatedWebhookEvent
|
|
933
|
+
| RefundUpdatedWebhookEvent;
|
|
417
934
|
|
|
418
935
|
export declare namespace Webhooks {
|
|
419
936
|
export {
|
|
@@ -431,6 +948,10 @@ export declare namespace Webhooks {
|
|
|
431
948
|
type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent,
|
|
432
949
|
type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent,
|
|
433
950
|
type PaymentPendingWebhookEvent as PaymentPendingWebhookEvent,
|
|
951
|
+
type DisputeCreatedWebhookEvent as DisputeCreatedWebhookEvent,
|
|
952
|
+
type DisputeUpdatedWebhookEvent as DisputeUpdatedWebhookEvent,
|
|
953
|
+
type RefundCreatedWebhookEvent as RefundCreatedWebhookEvent,
|
|
954
|
+
type RefundUpdatedWebhookEvent as RefundUpdatedWebhookEvent,
|
|
434
955
|
type UnwrapWebhookEvent as UnwrapWebhookEvent,
|
|
435
956
|
};
|
|
436
957
|
}
|