@whop/sdk 0.0.25 → 0.0.27
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 +58 -0
- package/client.d.mts +29 -25
- package/client.d.mts.map +1 -1
- package/client.d.ts +29 -25
- package/client.d.ts.map +1 -1
- package/client.js +14 -3
- package/client.js.map +1 -1
- package/client.mjs +16 -5
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/package.json +3 -3
- package/resources/access-tokens.d.mts +32 -51
- package/resources/access-tokens.d.mts.map +1 -1
- package/resources/access-tokens.d.ts +32 -51
- package/resources/access-tokens.d.ts.map +1 -1
- package/resources/access-tokens.js +6 -8
- package/resources/access-tokens.js.map +1 -1
- package/resources/access-tokens.mjs +6 -8
- package/resources/access-tokens.mjs.map +1 -1
- package/resources/ai-chats.d.mts +36 -104
- package/resources/ai-chats.d.mts.map +1 -1
- package/resources/ai-chats.d.ts +36 -104
- package/resources/ai-chats.d.ts.map +1 -1
- package/resources/ai-chats.js +1 -1
- package/resources/ai-chats.js.map +1 -1
- package/resources/ai-chats.mjs +1 -1
- package/resources/ai-chats.mjs.map +1 -1
- package/resources/app-builds.d.mts +2 -2
- package/resources/app-builds.d.ts +2 -2
- package/resources/apps.d.mts +5 -4
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +5 -4
- package/resources/apps.d.ts.map +1 -1
- package/resources/authorized-users.d.mts +43 -9
- package/resources/authorized-users.d.mts.map +1 -1
- package/resources/authorized-users.d.ts +43 -9
- package/resources/authorized-users.d.ts.map +1 -1
- package/resources/authorized-users.js +1 -1
- package/resources/authorized-users.js.map +1 -1
- package/resources/authorized-users.mjs +1 -1
- package/resources/authorized-users.mjs.map +1 -1
- package/resources/chat-channels.d.mts +1 -1
- package/resources/chat-channels.d.ts +1 -1
- package/resources/checkout-configurations.d.mts +24 -16
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +24 -16
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/companies.d.mts +38 -25
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +38 -25
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.js +7 -4
- package/resources/companies.js.map +1 -1
- package/resources/companies.mjs +7 -4
- package/resources/companies.mjs.map +1 -1
- package/resources/company-token-transactions.d.mts +23 -109
- package/resources/company-token-transactions.d.mts.map +1 -1
- package/resources/company-token-transactions.d.ts +23 -109
- package/resources/company-token-transactions.d.ts.map +1 -1
- package/resources/course-chapters.d.mts +3 -3
- package/resources/course-chapters.d.ts +3 -3
- package/resources/course-lessons.d.mts +15 -15
- package/resources/course-lessons.d.ts +15 -15
- package/resources/course-students.d.mts +6 -6
- package/resources/course-students.d.ts +6 -6
- package/resources/courses.d.mts +8 -8
- package/resources/courses.d.ts +8 -8
- package/resources/disputes.d.mts +20 -18
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +20 -18
- package/resources/disputes.d.ts.map +1 -1
- package/resources/dm-channels.d.mts +161 -0
- package/resources/dm-channels.d.mts.map +1 -0
- package/resources/dm-channels.d.ts +161 -0
- package/resources/dm-channels.d.ts.map +1 -0
- package/resources/dm-channels.js +87 -0
- package/resources/dm-channels.js.map +1 -0
- package/resources/dm-channels.mjs +83 -0
- package/resources/dm-channels.mjs.map +1 -0
- package/resources/dm-members.d.mts +14 -66
- package/resources/dm-members.d.mts.map +1 -1
- package/resources/dm-members.d.ts +14 -66
- package/resources/dm-members.d.ts.map +1 -1
- package/resources/entries.d.mts +6 -6
- package/resources/entries.d.ts +6 -6
- package/resources/experiences.d.mts +6 -5
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +6 -5
- package/resources/experiences.d.ts.map +1 -1
- package/resources/fee-markups.d.mts +6 -6
- package/resources/fee-markups.d.ts +6 -6
- package/resources/files.d.mts +9 -5
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +9 -5
- package/resources/files.d.ts.map +1 -1
- package/resources/forum-posts.d.mts +8 -4
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +8 -4
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/forums.d.mts +1 -1
- package/resources/forums.d.ts +1 -1
- package/resources/index.d.mts +12 -11
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +12 -11
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -2
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +28 -20
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +28 -20
- package/resources/invoices.d.ts.map +1 -1
- package/resources/leads.d.mts +21 -189
- package/resources/leads.d.mts.map +1 -1
- package/resources/leads.d.ts +21 -189
- package/resources/leads.d.ts.map +1 -1
- package/resources/ledger-accounts.d.mts +12 -9
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +12 -9
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js.map +1 -1
- package/resources/ledger-accounts.mjs.map +1 -1
- package/resources/members.d.mts +14 -14
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +14 -14
- package/resources/members.d.ts.map +1 -1
- package/resources/members.js +1 -1
- package/resources/members.js.map +1 -1
- package/resources/members.mjs +1 -1
- package/resources/members.mjs.map +1 -1
- package/resources/memberships.d.mts +25 -15
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +25 -15
- package/resources/memberships.d.ts.map +1 -1
- package/resources/messages.d.mts +7 -3
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +7 -3
- package/resources/messages.d.ts.map +1 -1
- package/resources/payments.d.mts +59 -19
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +59 -19
- package/resources/payments.d.ts.map +1 -1
- package/resources/payout-methods.d.mts +14 -9
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +14 -9
- package/resources/payout-methods.d.ts.map +1 -1
- package/resources/payout-methods.js.map +1 -1
- package/resources/payout-methods.mjs.map +1 -1
- package/resources/plans.d.mts +34 -24
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +34 -24
- package/resources/plans.d.ts.map +1 -1
- package/resources/products.d.mts +4 -2
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +4 -2
- package/resources/products.d.ts.map +1 -1
- package/resources/promo-codes.d.mts +22 -12
- package/resources/promo-codes.d.mts.map +1 -1
- package/resources/promo-codes.d.ts +22 -12
- package/resources/promo-codes.d.ts.map +1 -1
- package/resources/reactions.d.mts +1 -1
- package/resources/reactions.d.ts +1 -1
- package/resources/refunds.d.mts +19 -15
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +19 -15
- package/resources/refunds.d.ts.map +1 -1
- package/resources/reviews.d.mts +10 -10
- package/resources/reviews.d.ts +10 -10
- package/resources/setup-intents.d.mts +18 -20
- package/resources/setup-intents.d.mts.map +1 -1
- package/resources/setup-intents.d.ts +18 -20
- package/resources/setup-intents.d.ts.map +1 -1
- package/resources/shared.d.mts +209 -137
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +209 -137
- package/resources/shared.d.ts.map +1 -1
- package/resources/shipments.d.mts +4 -4
- package/resources/shipments.d.ts +4 -4
- package/resources/support-channels.d.mts +1 -1
- package/resources/support-channels.d.ts +1 -1
- package/resources/topups.d.mts +6 -4
- package/resources/topups.d.mts.map +1 -1
- package/resources/topups.d.ts +6 -4
- package/resources/topups.d.ts.map +1 -1
- package/resources/transfers.d.mts +8 -5
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +8 -5
- package/resources/transfers.d.ts.map +1 -1
- package/resources/users.d.mts +46 -8
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +46 -8
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +10 -0
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +10 -0
- package/resources/users.mjs.map +1 -1
- package/resources/verifications.d.mts +12 -4
- package/resources/verifications.d.mts.map +1 -1
- package/resources/verifications.d.ts +12 -4
- package/resources/verifications.d.ts.map +1 -1
- package/resources/webhooks.d.mts +105 -350
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +105 -350
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +2 -2
- package/resources/webhooks.mjs.map +1 -1
- package/resources/withdrawals.d.mts +32 -139
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +32 -139
- package/resources/withdrawals.d.ts.map +1 -1
- package/src/client.ts +87 -41
- package/src/internal/parse.ts +6 -0
- package/src/resources/access-tokens.ts +35 -56
- package/src/resources/ai-chats.ts +36 -122
- package/src/resources/app-builds.ts +2 -2
- package/src/resources/apps.ts +5 -4
- package/src/resources/authorized-users.ts +49 -9
- package/src/resources/chat-channels.ts +1 -1
- package/src/resources/checkout-configurations.ts +24 -16
- package/src/resources/companies.ts +41 -26
- package/src/resources/company-token-transactions.ts +24 -126
- package/src/resources/course-chapters.ts +3 -3
- package/src/resources/course-lessons.ts +15 -15
- package/src/resources/course-students.ts +6 -6
- package/src/resources/courses.ts +8 -8
- package/src/resources/disputes.ts +20 -18
- package/src/resources/dm-channels.ts +212 -0
- package/src/resources/dm-members.ts +16 -78
- package/src/resources/entries.ts +6 -6
- package/src/resources/experiences.ts +6 -5
- package/src/resources/fee-markups.ts +6 -6
- package/src/resources/files.ts +10 -4
- package/src/resources/forum-posts.ts +8 -4
- package/src/resources/forums.ts +1 -1
- package/src/resources/index.ts +38 -18
- package/src/resources/invoices.ts +28 -20
- package/src/resources/leads.ts +21 -217
- package/src/resources/ledger-accounts.ts +12 -42
- package/src/resources/members.ts +15 -15
- package/src/resources/memberships.ts +34 -30
- package/src/resources/messages.ts +7 -3
- package/src/resources/payments.ts +67 -17
- package/src/resources/payout-methods.ts +21 -8
- package/src/resources/plans.ts +34 -24
- package/src/resources/products.ts +4 -2
- package/src/resources/promo-codes.ts +22 -12
- package/src/resources/reactions.ts +1 -1
- package/src/resources/refunds.ts +20 -15
- package/src/resources/reviews.ts +10 -10
- package/src/resources/setup-intents.ts +18 -20
- package/src/resources/shared.ts +217 -145
- package/src/resources/shipments.ts +4 -4
- package/src/resources/support-channels.ts +1 -1
- package/src/resources/topups.ts +6 -4
- package/src/resources/transfers.ts +8 -5
- package/src/resources/users.ts +58 -8
- package/src/resources/verifications.ts +50 -37
- package/src/resources/webhooks.ts +138 -785
- package/src/resources/withdrawals.ts +39 -216
- 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
|
@@ -178,7 +178,7 @@ export type EmbedType = 'youtube' | 'loom';
|
|
|
178
178
|
*/
|
|
179
179
|
export interface Lesson {
|
|
180
180
|
/**
|
|
181
|
-
* The
|
|
181
|
+
* The unique identifier for the lesson.
|
|
182
182
|
*/
|
|
183
183
|
id: string;
|
|
184
184
|
|
|
@@ -198,7 +198,7 @@ export interface Lesson {
|
|
|
198
198
|
content: string | null;
|
|
199
199
|
|
|
200
200
|
/**
|
|
201
|
-
* The
|
|
201
|
+
* The datetime the lesson was created.
|
|
202
202
|
*/
|
|
203
203
|
created_at: string;
|
|
204
204
|
|
|
@@ -260,7 +260,7 @@ export namespace Lesson {
|
|
|
260
260
|
*/
|
|
261
261
|
export interface AssessmentQuestion {
|
|
262
262
|
/**
|
|
263
|
-
* The
|
|
263
|
+
* The unique identifier for the assessment question.
|
|
264
264
|
*/
|
|
265
265
|
id: string;
|
|
266
266
|
|
|
@@ -271,7 +271,7 @@ export namespace Lesson {
|
|
|
271
271
|
correct_answer: string | null;
|
|
272
272
|
|
|
273
273
|
/**
|
|
274
|
-
*
|
|
274
|
+
* The datetime the assessment question was created.
|
|
275
275
|
*/
|
|
276
276
|
created_at: string;
|
|
277
277
|
|
|
@@ -333,7 +333,7 @@ export namespace Lesson {
|
|
|
333
333
|
*/
|
|
334
334
|
export interface Option {
|
|
335
335
|
/**
|
|
336
|
-
* The
|
|
336
|
+
* The unique identifier for the assessment question option.
|
|
337
337
|
*/
|
|
338
338
|
id: string;
|
|
339
339
|
|
|
@@ -423,7 +423,7 @@ export namespace Lesson {
|
|
|
423
423
|
*/
|
|
424
424
|
export interface VideoAsset {
|
|
425
425
|
/**
|
|
426
|
-
* The
|
|
426
|
+
* The unique identifier for the mux asset.
|
|
427
427
|
*/
|
|
428
428
|
id: string;
|
|
429
429
|
|
|
@@ -438,7 +438,7 @@ export namespace Lesson {
|
|
|
438
438
|
audio_only: boolean;
|
|
439
439
|
|
|
440
440
|
/**
|
|
441
|
-
* The
|
|
441
|
+
* The datetime the mux asset was created.
|
|
442
442
|
*/
|
|
443
443
|
created_at: string;
|
|
444
444
|
|
|
@@ -483,7 +483,7 @@ export namespace Lesson {
|
|
|
483
483
|
status: 'uploading' | 'created' | 'ready';
|
|
484
484
|
|
|
485
485
|
/**
|
|
486
|
-
* The
|
|
486
|
+
* The datetime the mux asset was last updated.
|
|
487
487
|
*/
|
|
488
488
|
updated_at: string;
|
|
489
489
|
}
|
|
@@ -505,7 +505,7 @@ export type LessonVisibilities = 'visible' | 'hidden';
|
|
|
505
505
|
*/
|
|
506
506
|
export interface CourseLessonListResponse {
|
|
507
507
|
/**
|
|
508
|
-
* The
|
|
508
|
+
* The unique identifier for the lesson.
|
|
509
509
|
*/
|
|
510
510
|
id: string;
|
|
511
511
|
|
|
@@ -515,7 +515,7 @@ export interface CourseLessonListResponse {
|
|
|
515
515
|
content: string | null;
|
|
516
516
|
|
|
517
517
|
/**
|
|
518
|
-
* The
|
|
518
|
+
* The datetime the lesson was created.
|
|
519
519
|
*/
|
|
520
520
|
created_at: string;
|
|
521
521
|
|
|
@@ -594,12 +594,12 @@ export type CourseLessonStartResponse = boolean;
|
|
|
594
594
|
*/
|
|
595
595
|
export interface CourseLessonSubmitAssessmentResponse {
|
|
596
596
|
/**
|
|
597
|
-
* The
|
|
597
|
+
* The unique identifier for the assessment result.
|
|
598
598
|
*/
|
|
599
599
|
id: string;
|
|
600
600
|
|
|
601
601
|
/**
|
|
602
|
-
*
|
|
602
|
+
* The datetime the assessment result was created.
|
|
603
603
|
*/
|
|
604
604
|
created_at: string;
|
|
605
605
|
|
|
@@ -639,7 +639,7 @@ export interface CourseLessonSubmitAssessmentResponse {
|
|
|
639
639
|
score_percent: number;
|
|
640
640
|
|
|
641
641
|
/**
|
|
642
|
-
*
|
|
642
|
+
* The datetime the assessment result was last updated.
|
|
643
643
|
*/
|
|
644
644
|
updated_at: string;
|
|
645
645
|
|
|
@@ -655,7 +655,7 @@ export namespace CourseLessonSubmitAssessmentResponse {
|
|
|
655
655
|
*/
|
|
656
656
|
export interface Lesson {
|
|
657
657
|
/**
|
|
658
|
-
* The
|
|
658
|
+
* The unique identifier for the lesson.
|
|
659
659
|
*/
|
|
660
660
|
id: string;
|
|
661
661
|
|
|
@@ -670,7 +670,7 @@ export namespace CourseLessonSubmitAssessmentResponse {
|
|
|
670
670
|
*/
|
|
671
671
|
export interface User {
|
|
672
672
|
/**
|
|
673
|
-
* The
|
|
673
|
+
* The unique identifier for the user.
|
|
674
674
|
*/
|
|
675
675
|
id: string;
|
|
676
676
|
|
|
@@ -45,7 +45,7 @@ export type CourseStudentListResponsesCursorPage = CursorPage<CourseStudentListR
|
|
|
45
45
|
*/
|
|
46
46
|
export interface CourseStudentRetrieveResponse {
|
|
47
47
|
/**
|
|
48
|
-
* The
|
|
48
|
+
* The unique identifier for the course student type.
|
|
49
49
|
*/
|
|
50
50
|
id: string;
|
|
51
51
|
|
|
@@ -91,7 +91,7 @@ export namespace CourseStudentRetrieveResponse {
|
|
|
91
91
|
*/
|
|
92
92
|
export interface Course {
|
|
93
93
|
/**
|
|
94
|
-
* The
|
|
94
|
+
* The unique identifier for the course.
|
|
95
95
|
*/
|
|
96
96
|
id: string;
|
|
97
97
|
|
|
@@ -112,7 +112,7 @@ export namespace CourseStudentRetrieveResponse {
|
|
|
112
112
|
*/
|
|
113
113
|
export interface Experience {
|
|
114
114
|
/**
|
|
115
|
-
* The unique
|
|
115
|
+
* The unique identifier for the experience.
|
|
116
116
|
*/
|
|
117
117
|
id: string;
|
|
118
118
|
}
|
|
@@ -123,7 +123,7 @@ export namespace CourseStudentRetrieveResponse {
|
|
|
123
123
|
*/
|
|
124
124
|
export interface User {
|
|
125
125
|
/**
|
|
126
|
-
* The
|
|
126
|
+
* The unique identifier for the user.
|
|
127
127
|
*/
|
|
128
128
|
id: string;
|
|
129
129
|
|
|
@@ -144,7 +144,7 @@ export namespace CourseStudentRetrieveResponse {
|
|
|
144
144
|
*/
|
|
145
145
|
export interface CourseStudentListResponse {
|
|
146
146
|
/**
|
|
147
|
-
* The
|
|
147
|
+
* The unique identifier for the course student type.
|
|
148
148
|
*/
|
|
149
149
|
id: string;
|
|
150
150
|
|
|
@@ -185,7 +185,7 @@ export namespace CourseStudentListResponse {
|
|
|
185
185
|
*/
|
|
186
186
|
export interface User {
|
|
187
187
|
/**
|
|
188
|
-
* The
|
|
188
|
+
* The unique identifier for the user.
|
|
189
189
|
*/
|
|
190
190
|
id: string;
|
|
191
191
|
|
package/src/resources/courses.ts
CHANGED
|
@@ -115,7 +115,7 @@ export type CourseListResponsesCursorPage = CursorPage<CourseListResponse>;
|
|
|
115
115
|
*/
|
|
116
116
|
export interface Course {
|
|
117
117
|
/**
|
|
118
|
-
* The
|
|
118
|
+
* The unique identifier for the course.
|
|
119
119
|
*/
|
|
120
120
|
id: string;
|
|
121
121
|
|
|
@@ -136,7 +136,7 @@ export interface Course {
|
|
|
136
136
|
cover_image: string | null;
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
|
-
* The
|
|
139
|
+
* The datetime the course was created.
|
|
140
140
|
*/
|
|
141
141
|
created_at: string;
|
|
142
142
|
|
|
@@ -178,7 +178,7 @@ export interface Course {
|
|
|
178
178
|
title: string | null;
|
|
179
179
|
|
|
180
180
|
/**
|
|
181
|
-
* The
|
|
181
|
+
* The datetime the course was last updated.
|
|
182
182
|
*/
|
|
183
183
|
updated_at: string;
|
|
184
184
|
|
|
@@ -195,7 +195,7 @@ export namespace Course {
|
|
|
195
195
|
*/
|
|
196
196
|
export interface Chapter {
|
|
197
197
|
/**
|
|
198
|
-
* The
|
|
198
|
+
* The unique identifier for the chapter.
|
|
199
199
|
*/
|
|
200
200
|
id: string;
|
|
201
201
|
|
|
@@ -221,7 +221,7 @@ export namespace Course {
|
|
|
221
221
|
*/
|
|
222
222
|
export interface Lesson {
|
|
223
223
|
/**
|
|
224
|
-
* The
|
|
224
|
+
* The unique identifier for the lesson.
|
|
225
225
|
*/
|
|
226
226
|
id: string;
|
|
227
227
|
|
|
@@ -356,7 +356,7 @@ export type Languages =
|
|
|
356
356
|
*/
|
|
357
357
|
export interface CourseListResponse {
|
|
358
358
|
/**
|
|
359
|
-
* The
|
|
359
|
+
* The unique identifier for the course.
|
|
360
360
|
*/
|
|
361
361
|
id: string;
|
|
362
362
|
|
|
@@ -372,7 +372,7 @@ export interface CourseListResponse {
|
|
|
372
372
|
cover_image: string | null;
|
|
373
373
|
|
|
374
374
|
/**
|
|
375
|
-
* The
|
|
375
|
+
* The datetime the course was created.
|
|
376
376
|
*/
|
|
377
377
|
created_at: string;
|
|
378
378
|
|
|
@@ -414,7 +414,7 @@ export interface CourseListResponse {
|
|
|
414
414
|
title: string | null;
|
|
415
415
|
|
|
416
416
|
/**
|
|
417
|
-
* The
|
|
417
|
+
* The datetime the course was last updated.
|
|
418
418
|
*/
|
|
419
419
|
updated_at: string;
|
|
420
420
|
|
|
@@ -90,11 +90,12 @@ export class Disputes extends APIResource {
|
|
|
90
90
|
export type DisputeListResponsesCursorPage = CursorPage<DisputeListResponse>;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
|
-
*
|
|
93
|
+
* A dispute is a chargeback or payment challenge filed against a company,
|
|
94
|
+
* including evidence and response status.
|
|
94
95
|
*/
|
|
95
96
|
export interface Dispute {
|
|
96
97
|
/**
|
|
97
|
-
* The
|
|
98
|
+
* The unique identifier for the dispute.
|
|
98
99
|
*/
|
|
99
100
|
id: string;
|
|
100
101
|
|
|
@@ -129,7 +130,7 @@ export interface Dispute {
|
|
|
129
130
|
company: Dispute.Company | null;
|
|
130
131
|
|
|
131
132
|
/**
|
|
132
|
-
*
|
|
133
|
+
* The datetime the dispute was created.
|
|
133
134
|
*/
|
|
134
135
|
created_at: string | null;
|
|
135
136
|
|
|
@@ -265,7 +266,7 @@ export namespace Dispute {
|
|
|
265
266
|
*/
|
|
266
267
|
export interface Company {
|
|
267
268
|
/**
|
|
268
|
-
* The
|
|
269
|
+
* The unique identifier for the company.
|
|
269
270
|
*/
|
|
270
271
|
id: string;
|
|
271
272
|
|
|
@@ -306,7 +307,7 @@ export namespace Dispute {
|
|
|
306
307
|
*/
|
|
307
308
|
export interface Payment {
|
|
308
309
|
/**
|
|
309
|
-
* The payment
|
|
310
|
+
* The unique identifier for the payment.
|
|
310
311
|
*/
|
|
311
312
|
id: string;
|
|
312
313
|
|
|
@@ -326,7 +327,7 @@ export namespace Dispute {
|
|
|
326
327
|
card_last4: string | null;
|
|
327
328
|
|
|
328
329
|
/**
|
|
329
|
-
* The datetime the payment was created
|
|
330
|
+
* The datetime the payment was created.
|
|
330
331
|
*/
|
|
331
332
|
created_at: string;
|
|
332
333
|
|
|
@@ -387,7 +388,7 @@ export namespace Dispute {
|
|
|
387
388
|
*/
|
|
388
389
|
export interface Member {
|
|
389
390
|
/**
|
|
390
|
-
* The
|
|
391
|
+
* The unique identifier for the company member.
|
|
391
392
|
*/
|
|
392
393
|
id: string;
|
|
393
394
|
|
|
@@ -402,7 +403,7 @@ export namespace Dispute {
|
|
|
402
403
|
*/
|
|
403
404
|
export interface Membership {
|
|
404
405
|
/**
|
|
405
|
-
* The
|
|
406
|
+
* The unique identifier for the membership.
|
|
406
407
|
*/
|
|
407
408
|
id: string;
|
|
408
409
|
|
|
@@ -417,7 +418,7 @@ export namespace Dispute {
|
|
|
417
418
|
*/
|
|
418
419
|
export interface User {
|
|
419
420
|
/**
|
|
420
|
-
* The
|
|
421
|
+
* The unique identifier for the user.
|
|
421
422
|
*/
|
|
422
423
|
id: string;
|
|
423
424
|
|
|
@@ -443,7 +444,7 @@ export namespace Dispute {
|
|
|
443
444
|
*/
|
|
444
445
|
export interface Plan {
|
|
445
446
|
/**
|
|
446
|
-
* The
|
|
447
|
+
* The unique identifier for the plan.
|
|
447
448
|
*/
|
|
448
449
|
id: string;
|
|
449
450
|
}
|
|
@@ -453,7 +454,7 @@ export namespace Dispute {
|
|
|
453
454
|
*/
|
|
454
455
|
export interface Product {
|
|
455
456
|
/**
|
|
456
|
-
* The
|
|
457
|
+
* The unique identifier for the product.
|
|
457
458
|
*/
|
|
458
459
|
id: string;
|
|
459
460
|
|
|
@@ -531,11 +532,12 @@ export type DisputeStatuses =
|
|
|
531
532
|
| 'other';
|
|
532
533
|
|
|
533
534
|
/**
|
|
534
|
-
*
|
|
535
|
+
* A dispute is a chargeback or payment challenge filed against a company,
|
|
536
|
+
* including evidence and response status.
|
|
535
537
|
*/
|
|
536
538
|
export interface DisputeListResponse {
|
|
537
539
|
/**
|
|
538
|
-
* The
|
|
540
|
+
* The unique identifier for the dispute.
|
|
539
541
|
*/
|
|
540
542
|
id: string;
|
|
541
543
|
|
|
@@ -550,7 +552,7 @@ export interface DisputeListResponse {
|
|
|
550
552
|
company: DisputeListResponse.Company | null;
|
|
551
553
|
|
|
552
554
|
/**
|
|
553
|
-
*
|
|
555
|
+
* The datetime the dispute was created.
|
|
554
556
|
*/
|
|
555
557
|
created_at: string | null;
|
|
556
558
|
|
|
@@ -606,7 +608,7 @@ export namespace DisputeListResponse {
|
|
|
606
608
|
*/
|
|
607
609
|
export interface Company {
|
|
608
610
|
/**
|
|
609
|
-
* The
|
|
611
|
+
* The unique identifier for the company.
|
|
610
612
|
*/
|
|
611
613
|
id: string;
|
|
612
614
|
|
|
@@ -621,7 +623,7 @@ export namespace DisputeListResponse {
|
|
|
621
623
|
*/
|
|
622
624
|
export interface Payment {
|
|
623
625
|
/**
|
|
624
|
-
* The payment
|
|
626
|
+
* The unique identifier for the payment.
|
|
625
627
|
*/
|
|
626
628
|
id: string;
|
|
627
629
|
}
|
|
@@ -631,7 +633,7 @@ export namespace DisputeListResponse {
|
|
|
631
633
|
*/
|
|
632
634
|
export interface Plan {
|
|
633
635
|
/**
|
|
634
|
-
* The
|
|
636
|
+
* The unique identifier for the plan.
|
|
635
637
|
*/
|
|
636
638
|
id: string;
|
|
637
639
|
}
|
|
@@ -641,7 +643,7 @@ export namespace DisputeListResponse {
|
|
|
641
643
|
*/
|
|
642
644
|
export interface Product {
|
|
643
645
|
/**
|
|
644
|
-
* The
|
|
646
|
+
* The unique identifier for the product.
|
|
645
647
|
*/
|
|
646
648
|
id: string;
|
|
647
649
|
|
|
@@ -0,0 +1,212 @@
|
|
|
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 DmChannels extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Creates a DM channel
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const dmChannel = await client.dmChannels.create({
|
|
16
|
+
* with_user_ids: ['string'],
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
create(body: DmChannelCreateParams, options?: RequestOptions): APIPromise<DmChannel> {
|
|
21
|
+
return this._client.post('/dm_channels', { body, ...options });
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves a DM channel
|
|
26
|
+
*
|
|
27
|
+
* Required permissions:
|
|
28
|
+
*
|
|
29
|
+
* - `dms:read`
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const dmChannel = await client.dmChannels.retrieve('id');
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<DmChannel> {
|
|
37
|
+
return this._client.get(path`/dm_channels/${id}`, options);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Updates a DM channel
|
|
42
|
+
*
|
|
43
|
+
* Required permissions:
|
|
44
|
+
*
|
|
45
|
+
* - `dms:channel:manage`
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const dmChannel = await client.dmChannels.update('id');
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
update(
|
|
53
|
+
id: string,
|
|
54
|
+
body: DmChannelUpdateParams | null | undefined = {},
|
|
55
|
+
options?: RequestOptions,
|
|
56
|
+
): APIPromise<DmChannel> {
|
|
57
|
+
return this._client.patch(path`/dm_channels/${id}`, { body, ...options });
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Lists DM channels for the current user
|
|
62
|
+
*
|
|
63
|
+
* Required permissions:
|
|
64
|
+
*
|
|
65
|
+
* - `dms:read`
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* // Automatically fetches more pages as needed.
|
|
70
|
+
* for await (const dmChannelListResponse of client.dmChannels.list()) {
|
|
71
|
+
* // ...
|
|
72
|
+
* }
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
list(
|
|
76
|
+
query: DmChannelListParams | null | undefined = {},
|
|
77
|
+
options?: RequestOptions,
|
|
78
|
+
): PagePromise<DmChannelListResponsesCursorPage, DmChannelListResponse> {
|
|
79
|
+
return this._client.getAPIList('/dm_channels', CursorPage<DmChannelListResponse>, { query, ...options });
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Deletes a DM channel
|
|
84
|
+
*
|
|
85
|
+
* Required permissions:
|
|
86
|
+
*
|
|
87
|
+
* - `dms:channel:manage`
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* const dmChannel = await client.dmChannels.delete('id');
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
delete(id: string, options?: RequestOptions): APIPromise<DmChannelDeleteResponse> {
|
|
95
|
+
return this._client.delete(path`/dm_channels/${id}`, options);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export type DmChannelListResponsesCursorPage = CursorPage<DmChannelListResponse>;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Represents a DM channel
|
|
103
|
+
*/
|
|
104
|
+
export interface DmChannel {
|
|
105
|
+
/**
|
|
106
|
+
* The unique identifier for the entity
|
|
107
|
+
*/
|
|
108
|
+
id: string;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The time the entity was created (in milliseconds since Unix epoch)
|
|
112
|
+
*/
|
|
113
|
+
created_at: string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* When the last message was sent
|
|
117
|
+
*/
|
|
118
|
+
last_message_at: string | null;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The custom name of the DM channel, if any
|
|
122
|
+
*/
|
|
123
|
+
name: string | null;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Represents a DM channel
|
|
128
|
+
*/
|
|
129
|
+
export interface DmChannelListResponse {
|
|
130
|
+
/**
|
|
131
|
+
* The unique identifier for the entity
|
|
132
|
+
*/
|
|
133
|
+
id: string;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The time the entity was created (in milliseconds since Unix epoch)
|
|
137
|
+
*/
|
|
138
|
+
created_at: string;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* When the last message was sent
|
|
142
|
+
*/
|
|
143
|
+
last_message_at: string | null;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* The custom name of the DM channel, if any
|
|
147
|
+
*/
|
|
148
|
+
name: string | null;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Represents `true` or `false` values.
|
|
153
|
+
*/
|
|
154
|
+
export type DmChannelDeleteResponse = boolean;
|
|
155
|
+
|
|
156
|
+
export interface DmChannelCreateParams {
|
|
157
|
+
/**
|
|
158
|
+
* The user ids to create a DM with. Can be email, username or user_id (tag)
|
|
159
|
+
*/
|
|
160
|
+
with_user_ids: Array<string>;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* The ID of the company to scope this DM channel to.
|
|
164
|
+
*/
|
|
165
|
+
company_id?: string | null;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* The custom name for the DM channel
|
|
169
|
+
*/
|
|
170
|
+
custom_name?: string | null;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface DmChannelUpdateParams {
|
|
174
|
+
/**
|
|
175
|
+
* The custom name for the DM channel
|
|
176
|
+
*/
|
|
177
|
+
custom_name?: string | null;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface DmChannelListParams extends CursorPageParams {
|
|
181
|
+
/**
|
|
182
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
183
|
+
*/
|
|
184
|
+
before?: string | null;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Filter DM channels scoped to a specific company
|
|
188
|
+
*/
|
|
189
|
+
company_id?: string | null;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Returns the first _n_ elements from the list.
|
|
193
|
+
*/
|
|
194
|
+
first?: number | null;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Returns the last _n_ elements from the list.
|
|
198
|
+
*/
|
|
199
|
+
last?: number | null;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export declare namespace DmChannels {
|
|
203
|
+
export {
|
|
204
|
+
type DmChannel as DmChannel,
|
|
205
|
+
type DmChannelListResponse as DmChannelListResponse,
|
|
206
|
+
type DmChannelDeleteResponse as DmChannelDeleteResponse,
|
|
207
|
+
type DmChannelListResponsesCursorPage as DmChannelListResponsesCursorPage,
|
|
208
|
+
type DmChannelCreateParams as DmChannelCreateParams,
|
|
209
|
+
type DmChannelUpdateParams as DmChannelUpdateParams,
|
|
210
|
+
type DmChannelListParams as DmChannelListParams,
|
|
211
|
+
};
|
|
212
|
+
}
|