@whop/sdk 0.0.23 → 0.0.25

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 (181) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +2 -2
  3. package/client.d.mts +15 -6
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +15 -6
  6. package/client.d.ts.map +1 -1
  7. package/client.js +9 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +9 -0
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/ai-chats.d.mts +265 -0
  13. package/resources/ai-chats.d.mts.map +1 -0
  14. package/resources/ai-chats.d.ts +265 -0
  15. package/resources/ai-chats.d.ts.map +1 -0
  16. package/resources/ai-chats.js +53 -0
  17. package/resources/ai-chats.js.map +1 -0
  18. package/resources/ai-chats.mjs +49 -0
  19. package/resources/ai-chats.mjs.map +1 -0
  20. package/resources/app-builds.d.mts +7 -18
  21. package/resources/app-builds.d.mts.map +1 -1
  22. package/resources/app-builds.d.ts +7 -18
  23. package/resources/app-builds.d.ts.map +1 -1
  24. package/resources/app-builds.js +1 -1
  25. package/resources/app-builds.mjs +1 -1
  26. package/resources/apps.d.mts +20 -18
  27. package/resources/apps.d.mts.map +1 -1
  28. package/resources/apps.d.ts +20 -18
  29. package/resources/apps.d.ts.map +1 -1
  30. package/resources/checkout-configurations.d.mts +20 -17
  31. package/resources/checkout-configurations.d.mts.map +1 -1
  32. package/resources/checkout-configurations.d.ts +20 -17
  33. package/resources/checkout-configurations.d.ts.map +1 -1
  34. package/resources/companies.d.mts +23 -34
  35. package/resources/companies.d.mts.map +1 -1
  36. package/resources/companies.d.ts +23 -34
  37. package/resources/companies.d.ts.map +1 -1
  38. package/resources/company-token-transactions.d.mts +425 -0
  39. package/resources/company-token-transactions.d.mts.map +1 -0
  40. package/resources/company-token-transactions.d.ts +425 -0
  41. package/resources/company-token-transactions.d.ts.map +1 -0
  42. package/resources/company-token-transactions.js +59 -0
  43. package/resources/company-token-transactions.js.map +1 -0
  44. package/resources/company-token-transactions.mjs +55 -0
  45. package/resources/company-token-transactions.mjs.map +1 -0
  46. package/resources/course-lessons.d.mts +19 -84
  47. package/resources/course-lessons.d.mts.map +1 -1
  48. package/resources/course-lessons.d.ts +19 -84
  49. package/resources/course-lessons.d.ts.map +1 -1
  50. package/resources/courses.d.mts +8 -42
  51. package/resources/courses.d.mts.map +1 -1
  52. package/resources/courses.d.ts +8 -42
  53. package/resources/courses.d.ts.map +1 -1
  54. package/resources/disputes.d.mts +16 -68
  55. package/resources/disputes.d.mts.map +1 -1
  56. package/resources/disputes.d.ts +16 -68
  57. package/resources/disputes.d.ts.map +1 -1
  58. package/resources/dm-members.d.mts +242 -0
  59. package/resources/dm-members.d.mts.map +1 -0
  60. package/resources/dm-members.d.ts +242 -0
  61. package/resources/dm-members.d.ts.map +1 -0
  62. package/resources/dm-members.js +94 -0
  63. package/resources/dm-members.js.map +1 -0
  64. package/resources/dm-members.mjs +90 -0
  65. package/resources/dm-members.mjs.map +1 -0
  66. package/resources/experiences.d.mts +19 -17
  67. package/resources/experiences.d.mts.map +1 -1
  68. package/resources/experiences.d.ts +19 -17
  69. package/resources/experiences.d.ts.map +1 -1
  70. package/resources/forum-posts.d.mts +6 -32
  71. package/resources/forum-posts.d.mts.map +1 -1
  72. package/resources/forum-posts.d.ts +6 -32
  73. package/resources/forum-posts.d.ts.map +1 -1
  74. package/resources/index.d.mts +6 -3
  75. package/resources/index.d.mts.map +1 -1
  76. package/resources/index.d.ts +6 -3
  77. package/resources/index.d.ts.map +1 -1
  78. package/resources/index.js +7 -1
  79. package/resources/index.js.map +1 -1
  80. package/resources/index.mjs +3 -0
  81. package/resources/index.mjs.map +1 -1
  82. package/resources/ledger-accounts.d.mts +0 -4
  83. package/resources/ledger-accounts.d.mts.map +1 -1
  84. package/resources/ledger-accounts.d.ts +0 -4
  85. package/resources/ledger-accounts.d.ts.map +1 -1
  86. package/resources/members.d.mts +8 -0
  87. package/resources/members.d.mts.map +1 -1
  88. package/resources/members.d.ts +8 -0
  89. package/resources/members.d.ts.map +1 -1
  90. package/resources/memberships.d.mts +25 -0
  91. package/resources/memberships.d.mts.map +1 -1
  92. package/resources/memberships.d.ts +25 -0
  93. package/resources/memberships.d.ts.map +1 -1
  94. package/resources/memberships.js +18 -0
  95. package/resources/memberships.js.map +1 -1
  96. package/resources/memberships.mjs +18 -0
  97. package/resources/memberships.mjs.map +1 -1
  98. package/resources/messages.d.mts +23 -33
  99. package/resources/messages.d.mts.map +1 -1
  100. package/resources/messages.d.ts +23 -33
  101. package/resources/messages.d.ts.map +1 -1
  102. package/resources/messages.js +10 -0
  103. package/resources/messages.js.map +1 -1
  104. package/resources/messages.mjs +10 -0
  105. package/resources/messages.mjs.map +1 -1
  106. package/resources/notifications.d.mts +4 -0
  107. package/resources/notifications.d.mts.map +1 -1
  108. package/resources/notifications.d.ts +4 -0
  109. package/resources/notifications.d.ts.map +1 -1
  110. package/resources/notifications.js +4 -0
  111. package/resources/notifications.js.map +1 -1
  112. package/resources/notifications.mjs +4 -0
  113. package/resources/notifications.mjs.map +1 -1
  114. package/resources/payments.d.mts +10 -2
  115. package/resources/payments.d.mts.map +1 -1
  116. package/resources/payments.d.ts +10 -2
  117. package/resources/payments.d.ts.map +1 -1
  118. package/resources/payout-methods.d.mts +26 -0
  119. package/resources/payout-methods.d.mts.map +1 -1
  120. package/resources/payout-methods.d.ts +26 -0
  121. package/resources/payout-methods.d.ts.map +1 -1
  122. package/resources/plans.d.mts +8 -34
  123. package/resources/plans.d.mts.map +1 -1
  124. package/resources/plans.d.ts +8 -34
  125. package/resources/plans.d.ts.map +1 -1
  126. package/resources/reactions.d.mts +24 -1
  127. package/resources/reactions.d.mts.map +1 -1
  128. package/resources/reactions.d.ts +24 -1
  129. package/resources/reactions.d.ts.map +1 -1
  130. package/resources/reactions.js +11 -0
  131. package/resources/reactions.js.map +1 -1
  132. package/resources/reactions.mjs +11 -0
  133. package/resources/reactions.mjs.map +1 -1
  134. package/resources/refunds.d.mts +1 -1
  135. package/resources/refunds.d.mts.map +1 -1
  136. package/resources/refunds.d.ts +1 -1
  137. package/resources/refunds.d.ts.map +1 -1
  138. package/resources/shared.d.mts +39 -1
  139. package/resources/shared.d.mts.map +1 -1
  140. package/resources/shared.d.ts +39 -1
  141. package/resources/shared.d.ts.map +1 -1
  142. package/resources/webhooks.d.mts +15 -10
  143. package/resources/webhooks.d.mts.map +1 -1
  144. package/resources/webhooks.d.ts +15 -10
  145. package/resources/webhooks.d.ts.map +1 -1
  146. package/resources/withdrawals.d.mts +12 -19
  147. package/resources/withdrawals.d.mts.map +1 -1
  148. package/resources/withdrawals.d.ts +12 -19
  149. package/resources/withdrawals.d.ts.map +1 -1
  150. package/src/client.ts +81 -2
  151. package/src/resources/ai-chats.ts +346 -0
  152. package/src/resources/app-builds.ts +7 -21
  153. package/src/resources/apps.ts +27 -18
  154. package/src/resources/checkout-configurations.ts +24 -18
  155. package/src/resources/companies.ts +25 -42
  156. package/src/resources/company-token-transactions.ts +535 -0
  157. package/src/resources/course-lessons.ts +19 -104
  158. package/src/resources/courses.ts +8 -52
  159. package/src/resources/disputes.ts +16 -84
  160. package/src/resources/dm-members.ts +310 -0
  161. package/src/resources/experiences.ts +21 -21
  162. package/src/resources/forum-posts.ts +6 -38
  163. package/src/resources/index.ts +36 -1
  164. package/src/resources/ledger-accounts.ts +0 -18
  165. package/src/resources/members.ts +10 -0
  166. package/src/resources/memberships.ts +38 -0
  167. package/src/resources/messages.ts +27 -37
  168. package/src/resources/notifications.ts +4 -0
  169. package/src/resources/payments.ts +85 -57
  170. package/src/resources/payout-methods.ts +32 -0
  171. package/src/resources/plans.ts +8 -36
  172. package/src/resources/reactions.ts +36 -0
  173. package/src/resources/refunds.ts +2 -1
  174. package/src/resources/shared.ts +77 -11
  175. package/src/resources/webhooks.ts +18 -10
  176. package/src/resources/withdrawals.ts +13 -21
  177. package/src/version.ts +1 -1
  178. package/version.d.mts +1 -1
  179. package/version.d.ts +1 -1
  180. package/version.js +1 -1
  181. package/version.mjs +1 -1
@@ -481,11 +481,6 @@ export interface CourseCreateParams {
481
481
  */
482
482
  certificate_after_completion_enabled?: boolean | null;
483
483
 
484
- /**
485
- * The cover image URL of the course
486
- */
487
- cover_image?: string | null;
488
-
489
484
  /**
490
485
  * The decimal order position of the course within its experience. If not provided,
491
486
  * it will be set to the next sequential order. Use fractional values (e.g., 1.5)
@@ -507,10 +502,7 @@ export interface CourseCreateParams {
507
502
  /**
508
503
  * The thumbnail for the course in png, jpeg, or gif format
509
504
  */
510
- thumbnail?:
511
- | CourseCreateParams.AttachmentInputWithDirectUploadID
512
- | CourseCreateParams.AttachmentInputWithID
513
- | null;
505
+ thumbnail?: CourseCreateParams.Thumbnail | null;
514
506
 
515
507
  /**
516
508
  * The available visibilities for a course. Determines how / whether a course is
@@ -521,25 +513,11 @@ export interface CourseCreateParams {
521
513
 
522
514
  export namespace CourseCreateParams {
523
515
  /**
524
- * Input for an attachment
525
- */
526
- export interface AttachmentInputWithDirectUploadID {
527
- /**
528
- * This ID should be used the first time you upload an attachment. It is the ID of
529
- * the direct upload that was created when uploading the file to S3 via the
530
- * mediaDirectUpload mutation.
531
- */
532
- direct_upload_id: string;
533
- }
534
-
535
- /**
536
- * Input for an attachment
516
+ * The thumbnail for the course in png, jpeg, or gif format
537
517
  */
538
- export interface AttachmentInputWithID {
518
+ export interface Thumbnail {
539
519
  /**
540
- * The ID of an existing attachment object. Use this when updating a resource and
541
- * keeping a subset of the attachments. Don't use this unless you know what you're
542
- * doing.
520
+ * The ID of an existing file object.
543
521
  */
544
522
  id: string;
545
523
  }
@@ -557,11 +535,6 @@ export interface CourseUpdateParams {
557
535
  */
558
536
  chapters?: Array<CourseUpdateParams.Chapter> | null;
559
537
 
560
- /**
561
- * The cover image URL of the course
562
- */
563
- cover_image?: string | null;
564
-
565
538
  /**
566
539
  * A short description of the course
567
540
  */
@@ -592,10 +565,7 @@ export interface CourseUpdateParams {
592
565
  /**
593
566
  * The thumbnail for the course in png, jpeg, or gif format
594
567
  */
595
- thumbnail?:
596
- | CourseUpdateParams.AttachmentInputWithDirectUploadID
597
- | CourseUpdateParams.AttachmentInputWithID
598
- | null;
568
+ thumbnail?: CourseUpdateParams.Thumbnail | null;
599
569
 
600
570
  /**
601
571
  * The title of the course
@@ -663,25 +633,11 @@ export namespace CourseUpdateParams {
663
633
  }
664
634
 
665
635
  /**
666
- * Input for an attachment
667
- */
668
- export interface AttachmentInputWithDirectUploadID {
669
- /**
670
- * This ID should be used the first time you upload an attachment. It is the ID of
671
- * the direct upload that was created when uploading the file to S3 via the
672
- * mediaDirectUpload mutation.
673
- */
674
- direct_upload_id: string;
675
- }
676
-
677
- /**
678
- * Input for an attachment
636
+ * The thumbnail for the course in png, jpeg, or gif format
679
637
  */
680
- export interface AttachmentInputWithID {
638
+ export interface Thumbnail {
681
639
  /**
682
- * The ID of an existing attachment object. Use this when updating a resource and
683
- * keeping a subset of the attachments. Don't use this unless you know what you're
684
- * doing.
640
+ * The ID of an existing file object.
685
641
  */
686
642
  id: string;
687
643
  }
@@ -703,10 +703,7 @@ export interface DisputeUpdateEvidenceParams {
703
703
  /**
704
704
  * A file containing the cancellation policy from the company.
705
705
  */
706
- cancellation_policy_attachment?:
707
- | DisputeUpdateEvidenceParams.AttachmentInputWithDirectUploadID
708
- | DisputeUpdateEvidenceParams.AttachmentInputWithID
709
- | null;
706
+ cancellation_policy_attachment?: DisputeUpdateEvidenceParams.CancellationPolicyAttachment | null;
710
707
 
711
708
  /**
712
709
  * A cancellation policy disclosure from the company.
@@ -716,10 +713,7 @@ export interface DisputeUpdateEvidenceParams {
716
713
  /**
717
714
  * A file containing the customer communication from the company (An image).
718
715
  */
719
- customer_communication_attachment?:
720
- | DisputeUpdateEvidenceParams.AttachmentInputWithDirectUploadID
721
- | DisputeUpdateEvidenceParams.AttachmentInputWithID
722
- | null;
716
+ customer_communication_attachment?: DisputeUpdateEvidenceParams.CustomerCommunicationAttachment | null;
723
717
 
724
718
  /**
725
719
  * The email of the customer from their payment details.
@@ -744,10 +738,7 @@ export interface DisputeUpdateEvidenceParams {
744
738
  /**
745
739
  * A file containing the refund policy from the company.
746
740
  */
747
- refund_policy_attachment?:
748
- | DisputeUpdateEvidenceParams.AttachmentInputWithDirectUploadID
749
- | DisputeUpdateEvidenceParams.AttachmentInputWithID
750
- | null;
741
+ refund_policy_attachment?: DisputeUpdateEvidenceParams.RefundPolicyAttachment | null;
751
742
 
752
743
  /**
753
744
  * A refund policy disclosure from the company.
@@ -767,105 +758,46 @@ export interface DisputeUpdateEvidenceParams {
767
758
  /**
768
759
  * A file that does not fit in the other categories.
769
760
  */
770
- uncategorized_attachment?:
771
- | DisputeUpdateEvidenceParams.AttachmentInputWithDirectUploadID
772
- | DisputeUpdateEvidenceParams.AttachmentInputWithID
773
- | null;
761
+ uncategorized_attachment?: DisputeUpdateEvidenceParams.UncategorizedAttachment | null;
774
762
  }
775
763
 
776
764
  export namespace DisputeUpdateEvidenceParams {
777
765
  /**
778
- * Input for an attachment
779
- */
780
- export interface AttachmentInputWithDirectUploadID {
781
- /**
782
- * This ID should be used the first time you upload an attachment. It is the ID of
783
- * the direct upload that was created when uploading the file to S3 via the
784
- * mediaDirectUpload mutation.
785
- */
786
- direct_upload_id: string;
787
- }
788
-
789
- /**
790
- * Input for an attachment
766
+ * A file containing the cancellation policy from the company.
791
767
  */
792
- export interface AttachmentInputWithID {
768
+ export interface CancellationPolicyAttachment {
793
769
  /**
794
- * The ID of an existing attachment object. Use this when updating a resource and
795
- * keeping a subset of the attachments. Don't use this unless you know what you're
796
- * doing.
770
+ * The ID of an existing file object.
797
771
  */
798
772
  id: string;
799
773
  }
800
774
 
801
775
  /**
802
- * Input for an attachment
803
- */
804
- export interface AttachmentInputWithDirectUploadID {
805
- /**
806
- * This ID should be used the first time you upload an attachment. It is the ID of
807
- * the direct upload that was created when uploading the file to S3 via the
808
- * mediaDirectUpload mutation.
809
- */
810
- direct_upload_id: string;
811
- }
812
-
813
- /**
814
- * Input for an attachment
776
+ * A file containing the customer communication from the company (An image).
815
777
  */
816
- export interface AttachmentInputWithID {
778
+ export interface CustomerCommunicationAttachment {
817
779
  /**
818
- * The ID of an existing attachment object. Use this when updating a resource and
819
- * keeping a subset of the attachments. Don't use this unless you know what you're
820
- * doing.
780
+ * The ID of an existing file object.
821
781
  */
822
782
  id: string;
823
783
  }
824
784
 
825
785
  /**
826
- * Input for an attachment
827
- */
828
- export interface AttachmentInputWithDirectUploadID {
829
- /**
830
- * This ID should be used the first time you upload an attachment. It is the ID of
831
- * the direct upload that was created when uploading the file to S3 via the
832
- * mediaDirectUpload mutation.
833
- */
834
- direct_upload_id: string;
835
- }
836
-
837
- /**
838
- * Input for an attachment
786
+ * A file containing the refund policy from the company.
839
787
  */
840
- export interface AttachmentInputWithID {
788
+ export interface RefundPolicyAttachment {
841
789
  /**
842
- * The ID of an existing attachment object. Use this when updating a resource and
843
- * keeping a subset of the attachments. Don't use this unless you know what you're
844
- * doing.
790
+ * The ID of an existing file object.
845
791
  */
846
792
  id: string;
847
793
  }
848
794
 
849
795
  /**
850
- * Input for an attachment
851
- */
852
- export interface AttachmentInputWithDirectUploadID {
853
- /**
854
- * This ID should be used the first time you upload an attachment. It is the ID of
855
- * the direct upload that was created when uploading the file to S3 via the
856
- * mediaDirectUpload mutation.
857
- */
858
- direct_upload_id: string;
859
- }
860
-
861
- /**
862
- * Input for an attachment
796
+ * A file that does not fit in the other categories.
863
797
  */
864
- export interface AttachmentInputWithID {
798
+ export interface UncategorizedAttachment {
865
799
  /**
866
- * The ID of an existing attachment object. Use this when updating a resource and
867
- * keeping a subset of the attachments. Don't use this unless you know what you're
868
- * doing.
800
+ * The ID of an existing file object.
869
801
  */
870
802
  id: string;
871
803
  }
@@ -0,0 +1,310 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ export class DmMembers extends APIResource {
10
+ /**
11
+ * Adds a user to a DM channel
12
+ *
13
+ * Required permissions:
14
+ *
15
+ * - `dms:channel:manage`
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const dmMember = await client.dmMembers.create({
20
+ * channel_id: 'channel_id',
21
+ * user_id: 'user_xxxxxxxxxxxxx',
22
+ * });
23
+ * ```
24
+ */
25
+ create(body: DmMemberCreateParams, options?: RequestOptions): APIPromise<DmMemberCreateResponse> {
26
+ return this._client.post('/dm_members', { body, ...options });
27
+ }
28
+
29
+ /**
30
+ * Retrieves a DM channel member
31
+ *
32
+ * Required permissions:
33
+ *
34
+ * - `dms:read`
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const dmMember = await client.dmMembers.retrieve('id');
39
+ * ```
40
+ */
41
+ retrieve(id: string, options?: RequestOptions): APIPromise<DmMemberRetrieveResponse> {
42
+ return this._client.get(path`/dm_members/${id}`, options);
43
+ }
44
+
45
+ /**
46
+ * Updates a DM channel member's settings
47
+ *
48
+ * Required permissions:
49
+ *
50
+ * - `dms:channel:manage`
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const dmMember = await client.dmMembers.update('id');
55
+ * ```
56
+ */
57
+ update(
58
+ id: string,
59
+ body: DmMemberUpdateParams | null | undefined = {},
60
+ options?: RequestOptions,
61
+ ): APIPromise<DmMemberUpdateResponse> {
62
+ return this._client.patch(path`/dm_members/${id}`, { body, ...options });
63
+ }
64
+
65
+ /**
66
+ * Lists members of a DM channel
67
+ *
68
+ * Required permissions:
69
+ *
70
+ * - `dms:read`
71
+ *
72
+ * @example
73
+ * ```ts
74
+ * // Automatically fetches more pages as needed.
75
+ * for await (const dmMemberListResponse of client.dmMembers.list(
76
+ * { channel_id: 'channel_id' },
77
+ * )) {
78
+ * // ...
79
+ * }
80
+ * ```
81
+ */
82
+ list(
83
+ query: DmMemberListParams,
84
+ options?: RequestOptions,
85
+ ): PagePromise<DmMemberListResponsesCursorPage, DmMemberListResponse> {
86
+ return this._client.getAPIList('/dm_members', CursorPage<DmMemberListResponse>, { query, ...options });
87
+ }
88
+
89
+ /**
90
+ * Removes a user from a DM channel
91
+ *
92
+ * Required permissions:
93
+ *
94
+ * - `dms:channel:manage`
95
+ *
96
+ * @example
97
+ * ```ts
98
+ * const dmMember = await client.dmMembers.delete('id');
99
+ * ```
100
+ */
101
+ delete(id: string, options?: RequestOptions): APIPromise<DmMemberDeleteResponse> {
102
+ return this._client.delete(path`/dm_members/${id}`, options);
103
+ }
104
+ }
105
+
106
+ export type DmMemberListResponsesCursorPage = CursorPage<DmMemberListResponse>;
107
+
108
+ /**
109
+ * Represents a member of a DM channel
110
+ */
111
+ export interface DmMemberCreateResponse {
112
+ /**
113
+ * The unique identifier for the entity
114
+ */
115
+ id: string;
116
+
117
+ /**
118
+ * The ID of the DM channel
119
+ */
120
+ channel_id: string;
121
+
122
+ /**
123
+ * Timestamp when the member last viewed the channel (in milliseconds since Unix
124
+ * epoch)
125
+ */
126
+ last_viewed_at: string | null;
127
+
128
+ /**
129
+ * The notification preference for this member (all, mentions, none)
130
+ */
131
+ notification_preference: 'all' | 'mentions' | 'none';
132
+
133
+ /**
134
+ * The status of the membership (requested, accepted, rejected)
135
+ */
136
+ status: 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived';
137
+
138
+ /**
139
+ * The ID of the user who is a member of the channel
140
+ */
141
+ user_id: string;
142
+ }
143
+
144
+ /**
145
+ * Represents a member of a DM channel
146
+ */
147
+ export interface DmMemberRetrieveResponse {
148
+ /**
149
+ * The unique identifier for the entity
150
+ */
151
+ id: string;
152
+
153
+ /**
154
+ * The ID of the DM channel
155
+ */
156
+ channel_id: string;
157
+
158
+ /**
159
+ * Timestamp when the member last viewed the channel (in milliseconds since Unix
160
+ * epoch)
161
+ */
162
+ last_viewed_at: string | null;
163
+
164
+ /**
165
+ * The notification preference for this member (all, mentions, none)
166
+ */
167
+ notification_preference: 'all' | 'mentions' | 'none';
168
+
169
+ /**
170
+ * The status of the membership (requested, accepted, rejected)
171
+ */
172
+ status: 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived';
173
+
174
+ /**
175
+ * The ID of the user who is a member of the channel
176
+ */
177
+ user_id: string;
178
+ }
179
+
180
+ /**
181
+ * Represents a member of a DM channel
182
+ */
183
+ export interface DmMemberUpdateResponse {
184
+ /**
185
+ * The unique identifier for the entity
186
+ */
187
+ id: string;
188
+
189
+ /**
190
+ * The ID of the DM channel
191
+ */
192
+ channel_id: string;
193
+
194
+ /**
195
+ * Timestamp when the member last viewed the channel (in milliseconds since Unix
196
+ * epoch)
197
+ */
198
+ last_viewed_at: string | null;
199
+
200
+ /**
201
+ * The notification preference for this member (all, mentions, none)
202
+ */
203
+ notification_preference: 'all' | 'mentions' | 'none';
204
+
205
+ /**
206
+ * The status of the membership (requested, accepted, rejected)
207
+ */
208
+ status: 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived';
209
+
210
+ /**
211
+ * The ID of the user who is a member of the channel
212
+ */
213
+ user_id: string;
214
+ }
215
+
216
+ /**
217
+ * Represents a member of a DM channel
218
+ */
219
+ export interface DmMemberListResponse {
220
+ /**
221
+ * The unique identifier for the entity
222
+ */
223
+ id: string;
224
+
225
+ /**
226
+ * The ID of the DM channel
227
+ */
228
+ channel_id: string;
229
+
230
+ /**
231
+ * Timestamp when the member last viewed the channel (in milliseconds since Unix
232
+ * epoch)
233
+ */
234
+ last_viewed_at: string | null;
235
+
236
+ /**
237
+ * The status of the membership (requested, accepted, rejected)
238
+ */
239
+ status: 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived';
240
+
241
+ /**
242
+ * The ID of the user who is a member of the channel
243
+ */
244
+ user_id: string;
245
+ }
246
+
247
+ /**
248
+ * Represents `true` or `false` values.
249
+ */
250
+ export type DmMemberDeleteResponse = boolean;
251
+
252
+ export interface DmMemberCreateParams {
253
+ /**
254
+ * The ID of the DM channel to add the member to
255
+ */
256
+ channel_id: string;
257
+
258
+ /**
259
+ * The ID of the user to add to the channel
260
+ */
261
+ user_id: string;
262
+ }
263
+
264
+ export interface DmMemberUpdateParams {
265
+ /**
266
+ * The notification preferences for a DMs feed member
267
+ */
268
+ notification_preference?: 'all' | 'mentions' | 'none' | null;
269
+
270
+ /**
271
+ * The statuses of a DMs feed member
272
+ */
273
+ status?: 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived' | null;
274
+ }
275
+
276
+ export interface DmMemberListParams extends CursorPageParams {
277
+ /**
278
+ * The ID of the DM channel to list members for
279
+ */
280
+ channel_id: string;
281
+
282
+ /**
283
+ * Returns the elements in the list that come before the specified cursor.
284
+ */
285
+ before?: string | null;
286
+
287
+ /**
288
+ * Returns the first _n_ elements from the list.
289
+ */
290
+ first?: number | null;
291
+
292
+ /**
293
+ * Returns the last _n_ elements from the list.
294
+ */
295
+ last?: number | null;
296
+ }
297
+
298
+ export declare namespace DmMembers {
299
+ export {
300
+ type DmMemberCreateResponse as DmMemberCreateResponse,
301
+ type DmMemberRetrieveResponse as DmMemberRetrieveResponse,
302
+ type DmMemberUpdateResponse as DmMemberUpdateResponse,
303
+ type DmMemberListResponse as DmMemberListResponse,
304
+ type DmMemberDeleteResponse as DmMemberDeleteResponse,
305
+ type DmMemberListResponsesCursorPage as DmMemberListResponsesCursorPage,
306
+ type DmMemberCreateParams as DmMemberCreateParams,
307
+ type DmMemberUpdateParams as DmMemberUpdateParams,
308
+ type DmMemberListParams as DmMemberListParams,
309
+ };
310
+ }
@@ -303,6 +303,11 @@ export interface ExperienceCreateParams {
303
303
  */
304
304
  is_public?: boolean | null;
305
305
 
306
+ /**
307
+ * The logo for the experience
308
+ */
309
+ logo?: ExperienceCreateParams.Logo | null;
310
+
306
311
  /**
307
312
  * The name of the experience
308
313
  */
@@ -314,6 +319,18 @@ export interface ExperienceCreateParams {
314
319
  section_id?: string | null;
315
320
  }
316
321
 
322
+ export namespace ExperienceCreateParams {
323
+ /**
324
+ * The logo for the experience
325
+ */
326
+ export interface Logo {
327
+ /**
328
+ * The ID of an existing file object.
329
+ */
330
+ id: string;
331
+ }
332
+ }
333
+
317
334
  export interface ExperienceUpdateParams {
318
335
  /**
319
336
  * The different access levels for experiences (PUBLIC IS NEVER USED ANYMORE).
@@ -328,10 +345,7 @@ export interface ExperienceUpdateParams {
328
345
  /**
329
346
  * The logo for the experience
330
347
  */
331
- logo?:
332
- | ExperienceUpdateParams.AttachmentInputWithDirectUploadID
333
- | ExperienceUpdateParams.AttachmentInputWithID
334
- | null;
348
+ logo?: ExperienceUpdateParams.Logo | null;
335
349
 
336
350
  /**
337
351
  * The name of the experience.
@@ -351,25 +365,11 @@ export interface ExperienceUpdateParams {
351
365
 
352
366
  export namespace ExperienceUpdateParams {
353
367
  /**
354
- * Input for an attachment
355
- */
356
- export interface AttachmentInputWithDirectUploadID {
357
- /**
358
- * This ID should be used the first time you upload an attachment. It is the ID of
359
- * the direct upload that was created when uploading the file to S3 via the
360
- * mediaDirectUpload mutation.
361
- */
362
- direct_upload_id: string;
363
- }
364
-
365
- /**
366
- * Input for an attachment
368
+ * The logo for the experience
367
369
  */
368
- export interface AttachmentInputWithID {
370
+ export interface Logo {
369
371
  /**
370
- * The ID of an existing attachment object. Use this when updating a resource and
371
- * keeping a subset of the attachments. Don't use this unless you know what you're
372
- * doing.
372
+ * The ID of an existing file object.
373
373
  */
374
374
  id: string;
375
375
  }
@@ -191,9 +191,7 @@ export interface ForumPostCreateParams {
191
191
  /**
192
192
  * The attachments for this post
193
193
  */
194
- attachments?: Array<
195
- ForumPostCreateParams.AttachmentInputWithDirectUploadID | ForumPostCreateParams.AttachmentInputWithID
196
- > | null;
194
+ attachments?: Array<ForumPostCreateParams.Attachment> | null;
197
195
 
198
196
  /**
199
197
  * This is the main body of the post in Markdown format. Hidden if paywalled and
@@ -250,23 +248,9 @@ export namespace ForumPostCreateParams {
250
248
  /**
251
249
  * Input for an attachment
252
250
  */
253
- export interface AttachmentInputWithDirectUploadID {
251
+ export interface Attachment {
254
252
  /**
255
- * This ID should be used the first time you upload an attachment. It is the ID of
256
- * the direct upload that was created when uploading the file to S3 via the
257
- * mediaDirectUpload mutation.
258
- */
259
- direct_upload_id: string;
260
- }
261
-
262
- /**
263
- * Input for an attachment
264
- */
265
- export interface AttachmentInputWithID {
266
- /**
267
- * The ID of an existing attachment object. Use this when updating a resource and
268
- * keeping a subset of the attachments. Don't use this unless you know what you're
269
- * doing.
253
+ * The ID of an existing file object.
270
254
  */
271
255
  id: string;
272
256
  }
@@ -303,9 +287,7 @@ export interface ForumPostUpdateParams {
303
287
  /**
304
288
  * The attachments for this post
305
289
  */
306
- attachments?: Array<
307
- ForumPostUpdateParams.AttachmentInputWithDirectUploadID | ForumPostUpdateParams.AttachmentInputWithID
308
- > | null;
290
+ attachments?: Array<ForumPostUpdateParams.Attachment> | null;
309
291
 
310
292
  /**
311
293
  * This is the main body of the post in Markdown format. Hidden if paywalled and
@@ -333,23 +315,9 @@ export namespace ForumPostUpdateParams {
333
315
  /**
334
316
  * Input for an attachment
335
317
  */
336
- export interface AttachmentInputWithDirectUploadID {
337
- /**
338
- * This ID should be used the first time you upload an attachment. It is the ID of
339
- * the direct upload that was created when uploading the file to S3 via the
340
- * mediaDirectUpload mutation.
341
- */
342
- direct_upload_id: string;
343
- }
344
-
345
- /**
346
- * Input for an attachment
347
- */
348
- export interface AttachmentInputWithID {
318
+ export interface Attachment {
349
319
  /**
350
- * The ID of an existing attachment object. Use this when updating a resource and
351
- * keeping a subset of the attachments. Don't use this unless you know what you're
352
- * doing.
320
+ * The ID of an existing file object.
353
321
  */
354
322
  id: string;
355
323
  }