@whop/sdk 0.0.6 → 0.0.7

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.
Files changed (78) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/client.d.mts +5 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +5 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/access-tokens.d.mts +48 -26
  12. package/resources/access-tokens.d.mts.map +1 -1
  13. package/resources/access-tokens.d.ts +48 -26
  14. package/resources/access-tokens.d.ts.map +1 -1
  15. package/resources/access-tokens.js +5 -5
  16. package/resources/access-tokens.mjs +5 -5
  17. package/resources/checkout-configurations.d.mts +4 -4
  18. package/resources/checkout-configurations.d.mts.map +1 -1
  19. package/resources/checkout-configurations.d.ts +4 -4
  20. package/resources/checkout-configurations.d.ts.map +1 -1
  21. package/resources/disputes.d.mts +704 -0
  22. package/resources/disputes.d.mts.map +1 -0
  23. package/resources/disputes.d.ts +704 -0
  24. package/resources/disputes.d.ts.map +1 -0
  25. package/resources/disputes.js +77 -0
  26. package/resources/disputes.js.map +1 -0
  27. package/resources/disputes.mjs +73 -0
  28. package/resources/disputes.mjs.map +1 -0
  29. package/resources/forum-posts.d.mts +8 -0
  30. package/resources/forum-posts.d.mts.map +1 -1
  31. package/resources/forum-posts.d.ts +8 -0
  32. package/resources/forum-posts.d.ts.map +1 -1
  33. package/resources/index.d.mts +2 -1
  34. package/resources/index.d.mts.map +1 -1
  35. package/resources/index.d.ts +2 -1
  36. package/resources/index.d.ts.map +1 -1
  37. package/resources/index.js +3 -1
  38. package/resources/index.js.map +1 -1
  39. package/resources/index.mjs +1 -0
  40. package/resources/index.mjs.map +1 -1
  41. package/resources/ledger-accounts.d.mts +1 -1
  42. package/resources/ledger-accounts.d.mts.map +1 -1
  43. package/resources/ledger-accounts.d.ts +1 -1
  44. package/resources/ledger-accounts.d.ts.map +1 -1
  45. package/resources/payments.d.mts +1 -1
  46. package/resources/payments.d.mts.map +1 -1
  47. package/resources/payments.d.ts +1 -1
  48. package/resources/payments.d.ts.map +1 -1
  49. package/resources/shared.d.mts +3 -3
  50. package/resources/shared.d.mts.map +1 -1
  51. package/resources/shared.d.ts +3 -3
  52. package/resources/shared.d.ts.map +1 -1
  53. package/resources/shipments.d.mts +1 -1
  54. package/resources/shipments.d.mts.map +1 -1
  55. package/resources/shipments.d.ts +1 -1
  56. package/resources/shipments.d.ts.map +1 -1
  57. package/resources/webhooks.d.mts +47 -2
  58. package/resources/webhooks.d.mts.map +1 -1
  59. package/resources/webhooks.d.ts +47 -2
  60. package/resources/webhooks.d.ts.map +1 -1
  61. package/resources/webhooks.js.map +1 -1
  62. package/resources/webhooks.mjs.map +1 -1
  63. package/src/client.ts +25 -0
  64. package/src/resources/access-tokens.ts +53 -26
  65. package/src/resources/checkout-configurations.ts +4 -4
  66. package/src/resources/disputes.ts +873 -0
  67. package/src/resources/forum-posts.ts +10 -0
  68. package/src/resources/index.ts +11 -0
  69. package/src/resources/ledger-accounts.ts +1 -0
  70. package/src/resources/payments.ts +1 -0
  71. package/src/resources/shared.ts +13 -3
  72. package/src/resources/shipments.ts +1 -1
  73. package/src/resources/webhooks.ts +60 -1
  74. package/src/version.ts +1 -1
  75. package/version.d.mts +1 -1
  76. package/version.d.ts +1 -1
  77. package/version.js +1 -1
  78. package/version.mjs +1 -1
@@ -234,6 +234,11 @@ export interface ForumPostCreateParams {
234
234
  * The title of the post. Only visible if paywalled.
235
235
  */
236
236
  title?: string | null;
237
+
238
+ /**
239
+ * The visibility types for forum posts
240
+ */
241
+ visibility?: 'members_only' | 'globally_visible' | null;
237
242
  }
238
243
 
239
244
  export namespace ForumPostCreateParams {
@@ -312,6 +317,11 @@ export interface ForumPostUpdateParams {
312
317
  * The title of the post. Only visible if paywalled.
313
318
  */
314
319
  title?: string | null;
320
+
321
+ /**
322
+ * The visibility types for forum posts
323
+ */
324
+ visibility?: 'members_only' | 'globally_visible' | null;
315
325
  }
316
326
 
317
327
  export namespace ForumPostUpdateParams {
@@ -92,6 +92,15 @@ export {
92
92
  type CourseListParams,
93
93
  type CourseListResponsesCursorPage,
94
94
  } from './courses';
95
+ export {
96
+ Disputes,
97
+ type Dispute,
98
+ type DisputeStatuses,
99
+ type DisputeListResponse,
100
+ type DisputeListParams,
101
+ type DisputeUpdateEvidenceParams,
102
+ type DisputeListResponsesCursorPage,
103
+ } from './disputes';
95
104
  export {
96
105
  Entries,
97
106
  type EntryListResponse,
@@ -257,5 +266,7 @@ export {
257
266
  type PaymentSucceededWebhookEvent,
258
267
  type PaymentFailedWebhookEvent,
259
268
  type PaymentPendingWebhookEvent,
269
+ type DisputeCreatedWebhookEvent,
270
+ type DisputeUpdatedWebhookEvent,
260
271
  type UnwrapWebhookEvent,
261
272
  } from './webhooks';
@@ -38,6 +38,7 @@ export interface LedgerAccountRetrieveResponse {
38
38
  */
39
39
  ledger_account_audit_status:
40
40
  | 'pending'
41
+ | 'pending_ai_review'
41
42
  | 'approved'
42
43
  | 'reserves_imposed'
43
44
  | 'suspended'
@@ -171,6 +171,7 @@ export type CardBrands =
171
171
  | 'rupay'
172
172
  | 'jcbrupay'
173
173
  | 'elo'
174
+ | 'maestro'
174
175
  | 'unknown';
175
176
 
176
177
  /**
@@ -649,7 +649,16 @@ export namespace Company {
649
649
  /**
650
650
  * The website
651
651
  */
652
- website: 'x' | 'instagram' | 'facebook' | 'tiktok' | 'youtube' | 'linkedin' | 'twitch' | 'website';
652
+ website:
653
+ | 'x'
654
+ | 'instagram'
655
+ | 'facebook'
656
+ | 'tiktok'
657
+ | 'youtube'
658
+ | 'linkedin'
659
+ | 'twitch'
660
+ | 'website'
661
+ | 'custom';
653
662
  }
654
663
  }
655
664
 
@@ -911,7 +920,8 @@ export type Currency =
911
920
  | 'ttd'
912
921
  | 'uzs'
913
922
  | 'rub'
914
- | 'btc';
923
+ | 'btc'
924
+ | 'cny';
915
925
 
916
926
  /**
917
927
  * The different types of custom CTAs that can be selected.
@@ -2970,7 +2980,7 @@ export interface Shipment {
2970
2980
  /**
2971
2981
  * The payment of the shipment
2972
2982
  */
2973
- payment: Shipment.Payment;
2983
+ payment: Shipment.Payment | null;
2974
2984
 
2975
2985
  /**
2976
2986
  * The service of the shipment
@@ -101,7 +101,7 @@ export interface ShipmentListResponse {
101
101
  /**
102
102
  * The payment of the shipment
103
103
  */
104
- payment: ShipmentListResponse.Payment;
104
+ payment: ShipmentListResponse.Payment | null;
105
105
 
106
106
  /**
107
107
  * The service of the shipment
@@ -1,6 +1,7 @@
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';
4
5
  import * as Shared from './shared';
5
6
  import { Webhook } from 'standardwebhooks';
6
7
 
@@ -399,6 +400,60 @@ export interface PaymentPendingWebhookEvent {
399
400
  type: 'payment.pending';
400
401
  }
401
402
 
403
+ export interface DisputeCreatedWebhookEvent {
404
+ /**
405
+ * A unique ID for every single webhook request
406
+ */
407
+ id: string;
408
+
409
+ /**
410
+ * The API version for this webhook
411
+ */
412
+ api_version: 'v1';
413
+
414
+ /**
415
+ * An object representing a dispute against a company.
416
+ */
417
+ data: DisputesAPI.Dispute;
418
+
419
+ /**
420
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
421
+ */
422
+ timestamp: string;
423
+
424
+ /**
425
+ * The webhook event type
426
+ */
427
+ type: 'dispute.created';
428
+ }
429
+
430
+ export interface DisputeUpdatedWebhookEvent {
431
+ /**
432
+ * A unique ID for every single webhook request
433
+ */
434
+ id: string;
435
+
436
+ /**
437
+ * The API version for this webhook
438
+ */
439
+ api_version: 'v1';
440
+
441
+ /**
442
+ * An object representing a dispute against a company.
443
+ */
444
+ data: DisputesAPI.Dispute;
445
+
446
+ /**
447
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
448
+ */
449
+ timestamp: string;
450
+
451
+ /**
452
+ * The webhook event type
453
+ */
454
+ type: 'dispute.updated';
455
+ }
456
+
402
457
  export type UnwrapWebhookEvent =
403
458
  | InvoiceCreatedWebhookEvent
404
459
  | InvoicePaidWebhookEvent
@@ -413,7 +468,9 @@ export type UnwrapWebhookEvent =
413
468
  | CourseLessonInteractionCompletedWebhookEvent
414
469
  | PaymentSucceededWebhookEvent
415
470
  | PaymentFailedWebhookEvent
416
- | PaymentPendingWebhookEvent;
471
+ | PaymentPendingWebhookEvent
472
+ | DisputeCreatedWebhookEvent
473
+ | DisputeUpdatedWebhookEvent;
417
474
 
418
475
  export declare namespace Webhooks {
419
476
  export {
@@ -431,6 +488,8 @@ export declare namespace Webhooks {
431
488
  type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent,
432
489
  type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent,
433
490
  type PaymentPendingWebhookEvent as PaymentPendingWebhookEvent,
491
+ type DisputeCreatedWebhookEvent as DisputeCreatedWebhookEvent,
492
+ type DisputeUpdatedWebhookEvent as DisputeUpdatedWebhookEvent,
434
493
  type UnwrapWebhookEvent as UnwrapWebhookEvent,
435
494
  };
436
495
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.0.6'; // x-release-please-version
1
+ export const VERSION = '0.0.7'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.0.6";
1
+ export declare const VERSION = "0.0.7";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.0.6";
1
+ export declare const VERSION = "0.0.7";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.0.6'; // x-release-please-version
4
+ exports.VERSION = '0.0.7'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.0.6'; // x-release-please-version
1
+ export const VERSION = '0.0.7'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map