@whop/sdk 0.0.20 → 0.0.21
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 +43 -0
- package/LICENSE +1 -1
- package/README.md +12 -1
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/payment-methods.d.mts +17 -9
- package/resources/payment-methods.d.mts.map +1 -1
- package/resources/payment-methods.d.ts +17 -9
- package/resources/payment-methods.d.ts.map +1 -1
- package/resources/payment-methods.js +3 -3
- package/resources/payment-methods.js.map +1 -1
- package/resources/payment-methods.mjs +3 -3
- package/resources/payment-methods.mjs.map +1 -1
- package/resources/payments.d.mts +15 -3
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +15 -3
- package/resources/payments.d.ts.map +1 -1
- package/resources/payout-methods.d.mts +17 -0
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +17 -0
- package/resources/payout-methods.d.ts.map +1 -1
- package/resources/shared.d.mts +3 -3
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +3 -3
- package/resources/shared.d.ts.map +1 -1
- package/resources/support-channels.d.mts +1 -1
- package/resources/support-channels.d.ts +1 -1
- package/resources/webhooks.d.mts +153 -2
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +153 -2
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +6 -0
- package/src/resources/index.ts +3 -0
- package/src/resources/payment-methods.ts +19 -9
- package/src/resources/payments.ts +14 -3
- package/src/resources/payout-methods.ts +20 -0
- package/src/resources/shared.ts +4 -3
- package/src/resources/support-channels.ts +1 -1
- package/src/resources/webhooks.ts +220 -1
- 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
|
@@ -833,6 +833,191 @@ export interface CourseLessonInteractionCompletedWebhookEvent {
|
|
|
833
833
|
type: 'course_lesson_interaction.completed';
|
|
834
834
|
}
|
|
835
835
|
|
|
836
|
+
export interface PayoutMethodCreatedWebhookEvent {
|
|
837
|
+
/**
|
|
838
|
+
* A unique ID for every single webhook request
|
|
839
|
+
*/
|
|
840
|
+
id: string;
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* The API version for this webhook
|
|
844
|
+
*/
|
|
845
|
+
api_version: 'v1';
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
* An object representing an user's setup payout destination.
|
|
849
|
+
*/
|
|
850
|
+
data: PayoutMethodCreatedWebhookEvent.Data;
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
854
|
+
*/
|
|
855
|
+
timestamp: string;
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* The webhook event type
|
|
859
|
+
*/
|
|
860
|
+
type: 'payout_method.created';
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
export namespace PayoutMethodCreatedWebhookEvent {
|
|
864
|
+
/**
|
|
865
|
+
* An object representing an user's setup payout destination.
|
|
866
|
+
*/
|
|
867
|
+
export interface Data {
|
|
868
|
+
/**
|
|
869
|
+
* The ID of the payout token
|
|
870
|
+
*/
|
|
871
|
+
id: string;
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* The company associated with the payout token
|
|
875
|
+
*/
|
|
876
|
+
company: Data.Company | null;
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* The currency code of the payout destination. This is the currency that payouts
|
|
880
|
+
* will be made in for this token.
|
|
881
|
+
*/
|
|
882
|
+
currency: string;
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* The payout destination associated with the payout token
|
|
886
|
+
*/
|
|
887
|
+
destination: Data.Destination | null;
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
* Whether this payout token is the default for the payout account
|
|
891
|
+
*/
|
|
892
|
+
is_default: boolean;
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* An optional nickname for the payout token to help the user identify it. This is
|
|
896
|
+
* not used by the provider and is only for the user's reference.
|
|
897
|
+
*/
|
|
898
|
+
nickname: string | null;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
export namespace Data {
|
|
902
|
+
/**
|
|
903
|
+
* The company associated with the payout token
|
|
904
|
+
*/
|
|
905
|
+
export interface Company {
|
|
906
|
+
/**
|
|
907
|
+
* The ID (tag) of the company.
|
|
908
|
+
*/
|
|
909
|
+
id: string;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* The payout destination associated with the payout token
|
|
914
|
+
*/
|
|
915
|
+
export interface Destination {
|
|
916
|
+
/**
|
|
917
|
+
* The category of the payout destination
|
|
918
|
+
*/
|
|
919
|
+
category: 'crypto' | 'rtp' | 'next_day_bank' | 'bank_wire' | 'digital_wallet' | 'unknown';
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* The country code of the payout destination
|
|
923
|
+
*/
|
|
924
|
+
country_code: string;
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
* The name of the payer associated with the payout destination
|
|
928
|
+
*/
|
|
929
|
+
name: string;
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
export interface VerificationSucceededWebhookEvent {
|
|
935
|
+
/**
|
|
936
|
+
* A unique ID for every single webhook request
|
|
937
|
+
*/
|
|
938
|
+
id: string;
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* The API version for this webhook
|
|
942
|
+
*/
|
|
943
|
+
api_version: 'v1';
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* An object representing an identity verification session
|
|
947
|
+
*/
|
|
948
|
+
data: VerificationSucceededWebhookEvent.Data;
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
952
|
+
*/
|
|
953
|
+
timestamp: string;
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* The webhook event type
|
|
957
|
+
*/
|
|
958
|
+
type: 'verification.succeeded';
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
export namespace VerificationSucceededWebhookEvent {
|
|
962
|
+
/**
|
|
963
|
+
* An object representing an identity verification session
|
|
964
|
+
*/
|
|
965
|
+
export interface Data {
|
|
966
|
+
/**
|
|
967
|
+
* A unique identifier for the verification.
|
|
968
|
+
*/
|
|
969
|
+
id: string;
|
|
970
|
+
|
|
971
|
+
/**
|
|
972
|
+
* An error code for a verification attempt.
|
|
973
|
+
*/
|
|
974
|
+
last_error_code:
|
|
975
|
+
| 'abandoned'
|
|
976
|
+
| 'consent_declined'
|
|
977
|
+
| 'country_not_supported'
|
|
978
|
+
| 'device_not_supported'
|
|
979
|
+
| 'document_expired'
|
|
980
|
+
| 'document_type_not_supported'
|
|
981
|
+
| 'document_unverified_other'
|
|
982
|
+
| 'email_unverified_other'
|
|
983
|
+
| 'email_verification_declined'
|
|
984
|
+
| 'id_number_insufficient_document_data'
|
|
985
|
+
| 'id_number_mismatch'
|
|
986
|
+
| 'id_number_unverified_other'
|
|
987
|
+
| 'phone_unverified_other'
|
|
988
|
+
| 'phone_verification_declined'
|
|
989
|
+
| 'selfie_document_missing_photo'
|
|
990
|
+
| 'selfie_face_mismatch'
|
|
991
|
+
| 'selfie_manipulated'
|
|
992
|
+
| 'selfie_unverified_other'
|
|
993
|
+
| 'under_supported_age'
|
|
994
|
+
| null;
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* The last error reason that occurred during the verification.
|
|
998
|
+
*/
|
|
999
|
+
last_error_reason: string | null;
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* The status of the verification.
|
|
1003
|
+
*/
|
|
1004
|
+
status:
|
|
1005
|
+
| 'requires_input'
|
|
1006
|
+
| 'processing'
|
|
1007
|
+
| 'verified'
|
|
1008
|
+
| 'canceled'
|
|
1009
|
+
| 'created'
|
|
1010
|
+
| 'started'
|
|
1011
|
+
| 'submitted'
|
|
1012
|
+
| 'approved'
|
|
1013
|
+
| 'declined'
|
|
1014
|
+
| 'resubmission_requested'
|
|
1015
|
+
| 'expired'
|
|
1016
|
+
| 'abandoned'
|
|
1017
|
+
| 'review';
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
|
|
836
1021
|
export interface PaymentCreatedWebhookEvent {
|
|
837
1022
|
/**
|
|
838
1023
|
* A unique ID for every single webhook request
|
|
@@ -1451,6 +1636,34 @@ export namespace RefundUpdatedWebhookEvent {
|
|
|
1451
1636
|
}
|
|
1452
1637
|
}
|
|
1453
1638
|
|
|
1639
|
+
export interface MembershipCancelAtPeriodEndChangedWebhookEvent {
|
|
1640
|
+
/**
|
|
1641
|
+
* A unique ID for every single webhook request
|
|
1642
|
+
*/
|
|
1643
|
+
id: string;
|
|
1644
|
+
|
|
1645
|
+
/**
|
|
1646
|
+
* The API version for this webhook
|
|
1647
|
+
*/
|
|
1648
|
+
api_version: 'v1';
|
|
1649
|
+
|
|
1650
|
+
/**
|
|
1651
|
+
* A membership represents a purchase between a User and a Company for a specific
|
|
1652
|
+
* Product.
|
|
1653
|
+
*/
|
|
1654
|
+
data: Shared.Membership;
|
|
1655
|
+
|
|
1656
|
+
/**
|
|
1657
|
+
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
1658
|
+
*/
|
|
1659
|
+
timestamp: string;
|
|
1660
|
+
|
|
1661
|
+
/**
|
|
1662
|
+
* The webhook event type
|
|
1663
|
+
*/
|
|
1664
|
+
type: 'membership.cancel_at_period_end_changed';
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1454
1667
|
export type UnwrapWebhookEvent =
|
|
1455
1668
|
| InvoiceCreatedWebhookEvent
|
|
1456
1669
|
| InvoicePaidWebhookEvent
|
|
@@ -1468,6 +1681,8 @@ export type UnwrapWebhookEvent =
|
|
|
1468
1681
|
| WithdrawalCreatedWebhookEvent
|
|
1469
1682
|
| WithdrawalUpdatedWebhookEvent
|
|
1470
1683
|
| CourseLessonInteractionCompletedWebhookEvent
|
|
1684
|
+
| PayoutMethodCreatedWebhookEvent
|
|
1685
|
+
| VerificationSucceededWebhookEvent
|
|
1471
1686
|
| PaymentCreatedWebhookEvent
|
|
1472
1687
|
| PaymentSucceededWebhookEvent
|
|
1473
1688
|
| PaymentFailedWebhookEvent
|
|
@@ -1475,7 +1690,8 @@ export type UnwrapWebhookEvent =
|
|
|
1475
1690
|
| DisputeCreatedWebhookEvent
|
|
1476
1691
|
| DisputeUpdatedWebhookEvent
|
|
1477
1692
|
| RefundCreatedWebhookEvent
|
|
1478
|
-
| RefundUpdatedWebhookEvent
|
|
1693
|
+
| RefundUpdatedWebhookEvent
|
|
1694
|
+
| MembershipCancelAtPeriodEndChangedWebhookEvent;
|
|
1479
1695
|
|
|
1480
1696
|
export declare namespace Webhooks {
|
|
1481
1697
|
export {
|
|
@@ -1495,6 +1711,8 @@ export declare namespace Webhooks {
|
|
|
1495
1711
|
type WithdrawalCreatedWebhookEvent as WithdrawalCreatedWebhookEvent,
|
|
1496
1712
|
type WithdrawalUpdatedWebhookEvent as WithdrawalUpdatedWebhookEvent,
|
|
1497
1713
|
type CourseLessonInteractionCompletedWebhookEvent as CourseLessonInteractionCompletedWebhookEvent,
|
|
1714
|
+
type PayoutMethodCreatedWebhookEvent as PayoutMethodCreatedWebhookEvent,
|
|
1715
|
+
type VerificationSucceededWebhookEvent as VerificationSucceededWebhookEvent,
|
|
1498
1716
|
type PaymentCreatedWebhookEvent as PaymentCreatedWebhookEvent,
|
|
1499
1717
|
type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent,
|
|
1500
1718
|
type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent,
|
|
@@ -1503,6 +1721,7 @@ export declare namespace Webhooks {
|
|
|
1503
1721
|
type DisputeUpdatedWebhookEvent as DisputeUpdatedWebhookEvent,
|
|
1504
1722
|
type RefundCreatedWebhookEvent as RefundCreatedWebhookEvent,
|
|
1505
1723
|
type RefundUpdatedWebhookEvent as RefundUpdatedWebhookEvent,
|
|
1724
|
+
type MembershipCancelAtPeriodEndChangedWebhookEvent as MembershipCancelAtPeriodEndChangedWebhookEvent,
|
|
1506
1725
|
type UnwrapWebhookEvent as UnwrapWebhookEvent,
|
|
1507
1726
|
};
|
|
1508
1727
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.0.
|
|
1
|
+
export const VERSION = '0.0.21'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.
|
|
1
|
+
export declare const VERSION = "0.0.21";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.
|
|
1
|
+
export declare const VERSION = "0.0.21";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.0.
|
|
1
|
+
export const VERSION = '0.0.21'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|