@whop/sdk 0.0.1-canary.0 → 0.0.2
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 +21 -0
- package/client.d.mts +16 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +16 -3
- package/client.d.ts.map +1 -1
- package/client.js +7 -1
- package/client.js.map +1 -1
- package/client.mjs +7 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/apps.d.mts +16 -0
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +16 -0
- package/resources/apps.d.ts.map +1 -1
- package/resources/checkout-configurations.d.mts +21 -18
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +21 -18
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/checkout-configurations.js +1 -1
- package/resources/checkout-configurations.mjs +1 -1
- package/resources/experiences.d.mts +32 -0
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +32 -0
- package/resources/experiences.d.ts.map +1 -1
- package/resources/forums.d.mts +112 -0
- package/resources/forums.d.mts.map +1 -0
- package/resources/forums.d.ts +112 -0
- package/resources/forums.d.ts.map +1 -0
- package/resources/forums.js +41 -0
- package/resources/forums.js.map +1 -0
- package/resources/forums.mjs +37 -0
- package/resources/forums.mjs.map +1 -0
- package/resources/index.d.mts +3 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +5 -2
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +5 -2
- package/resources/invoices.d.ts.map +1 -1
- package/resources/members.d.mts +270 -0
- package/resources/members.d.mts.map +1 -0
- package/resources/members.d.ts +270 -0
- package/resources/members.d.ts.map +1 -0
- package/resources/members.js +35 -0
- package/resources/members.js.map +1 -0
- package/resources/members.mjs +31 -0
- package/resources/members.mjs.map +1 -0
- package/resources/plans.d.mts +5 -2
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +5 -2
- package/resources/plans.d.ts.map +1 -1
- package/resources/shared.d.mts +176 -11
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +176 -11
- package/resources/shared.d.ts.map +1 -1
- package/resources/users.d.mts +18 -1
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +18 -1
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js.map +1 -1
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +224 -2
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +224 -2
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +63 -2
- package/src/resources/apps.ts +18 -0
- package/src/resources/checkout-configurations.ts +21 -18
- package/src/resources/experiences.ts +36 -0
- package/src/resources/forums.ts +152 -0
- package/src/resources/index.ts +24 -0
- package/src/resources/invoices.ts +5 -2
- package/src/resources/members.ts +337 -0
- package/src/resources/plans.ts +5 -2
- package/src/resources/shared.ts +217 -11
- package/src/resources/users.ts +20 -1
- package/src/resources/webhooks.ts +293 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/src/resources/shared.ts
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
import * as Shared from './shared';
|
|
4
4
|
import { CursorPage } from '../core/pagination';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* The access level a given user (or company) has to an access pass or company.
|
|
8
|
+
*/
|
|
9
|
+
export type AccessLevel = 'no_access' | 'admin' | 'customer';
|
|
10
|
+
|
|
6
11
|
/**
|
|
7
12
|
* The different types an access pass can be.
|
|
8
13
|
*/
|
|
@@ -67,6 +72,12 @@ export interface App {
|
|
|
67
72
|
*/
|
|
68
73
|
experience_path: string | null;
|
|
69
74
|
|
|
75
|
+
/**
|
|
76
|
+
* The icon for the app. This icon is shown on discovery, on the product page, on
|
|
77
|
+
* checkout, and as a default icon for the experiences.
|
|
78
|
+
*/
|
|
79
|
+
icon: App.Icon | null;
|
|
80
|
+
|
|
70
81
|
/**
|
|
71
82
|
* The name of the app
|
|
72
83
|
*/
|
|
@@ -155,6 +166,18 @@ export namespace App {
|
|
|
155
166
|
username: string;
|
|
156
167
|
}
|
|
157
168
|
|
|
169
|
+
/**
|
|
170
|
+
* The icon for the app. This icon is shown on discovery, on the product page, on
|
|
171
|
+
* checkout, and as a default icon for the experiences.
|
|
172
|
+
*/
|
|
173
|
+
export interface Icon {
|
|
174
|
+
/**
|
|
175
|
+
* This is the URL you use to render optimized attachments on the client. This
|
|
176
|
+
* should be used for apps.
|
|
177
|
+
*/
|
|
178
|
+
url: string | null;
|
|
179
|
+
}
|
|
180
|
+
|
|
158
181
|
/**
|
|
159
182
|
* A permission that the app requests from the admin of a company during the oauth
|
|
160
183
|
* flow.
|
|
@@ -389,48 +412,51 @@ export namespace ChatChannel {
|
|
|
389
412
|
}
|
|
390
413
|
|
|
391
414
|
/**
|
|
392
|
-
* A checkout
|
|
415
|
+
* A checkout configuration object.
|
|
416
|
+
* Can be used to create a reusable custom configuration for a checkout, including attaching plans, affiliates and custom metadata to the checkout.
|
|
417
|
+
* This configuration can be re-used by multiple users.
|
|
418
|
+
* All successful payments and memberships resulting from a checkout will contain the passed metadata.
|
|
393
419
|
*/
|
|
394
420
|
export interface CheckoutConfiguration {
|
|
395
421
|
/**
|
|
396
|
-
* The ID of the checkout
|
|
422
|
+
* The ID of the checkout configuration
|
|
397
423
|
*/
|
|
398
424
|
id: string;
|
|
399
425
|
|
|
400
426
|
/**
|
|
401
|
-
* The affiliate code to use for the checkout
|
|
427
|
+
* The affiliate code to use for the checkout configuration
|
|
402
428
|
*/
|
|
403
|
-
affiliate_code: string;
|
|
429
|
+
affiliate_code: string | null;
|
|
404
430
|
|
|
405
431
|
/**
|
|
406
|
-
* The ID of the company to use for the checkout
|
|
432
|
+
* The ID of the company to use for the checkout configuration
|
|
407
433
|
*/
|
|
408
434
|
company_id: string;
|
|
409
435
|
|
|
410
436
|
/**
|
|
411
|
-
* The metadata to use for the checkout
|
|
437
|
+
* The metadata to use for the checkout configuration
|
|
412
438
|
*/
|
|
413
439
|
metadata: { [key: string]: unknown };
|
|
414
440
|
|
|
415
441
|
/**
|
|
416
|
-
* The plan to use for the checkout
|
|
442
|
+
* The plan to use for the checkout configuration
|
|
417
443
|
*/
|
|
418
444
|
plan: CheckoutConfiguration.Plan;
|
|
419
445
|
|
|
420
446
|
/**
|
|
421
|
-
* The URL to redirect the user to after the checkout
|
|
447
|
+
* The URL to redirect the user to after the checkout configuration is created
|
|
422
448
|
*/
|
|
423
449
|
purchase_url: string;
|
|
424
450
|
|
|
425
451
|
/**
|
|
426
|
-
* The URL to redirect the user to after the checkout
|
|
452
|
+
* The URL to redirect the user to after the checkout configuration is created
|
|
427
453
|
*/
|
|
428
|
-
redirect_url: string;
|
|
454
|
+
redirect_url: string | null;
|
|
429
455
|
}
|
|
430
456
|
|
|
431
457
|
export namespace CheckoutConfiguration {
|
|
432
458
|
/**
|
|
433
|
-
* The plan to use for the checkout
|
|
459
|
+
* The plan to use for the checkout configuration
|
|
434
460
|
*/
|
|
435
461
|
export interface Plan {
|
|
436
462
|
/**
|
|
@@ -509,11 +535,21 @@ export interface Company {
|
|
|
509
535
|
*/
|
|
510
536
|
created_at: string;
|
|
511
537
|
|
|
538
|
+
/**
|
|
539
|
+
* The creator pitch for the company.
|
|
540
|
+
*/
|
|
541
|
+
description: string | null;
|
|
542
|
+
|
|
512
543
|
/**
|
|
513
544
|
* The different industry types a company can be in.
|
|
514
545
|
*/
|
|
515
546
|
industry_type: IndustryTypes | null;
|
|
516
547
|
|
|
548
|
+
/**
|
|
549
|
+
* The company's logo.
|
|
550
|
+
*/
|
|
551
|
+
logo: Company.Logo | null;
|
|
552
|
+
|
|
517
553
|
/**
|
|
518
554
|
* The number of members in the company.
|
|
519
555
|
*/
|
|
@@ -556,6 +592,17 @@ export interface Company {
|
|
|
556
592
|
}
|
|
557
593
|
|
|
558
594
|
export namespace Company {
|
|
595
|
+
/**
|
|
596
|
+
* The company's logo.
|
|
597
|
+
*/
|
|
598
|
+
export interface Logo {
|
|
599
|
+
/**
|
|
600
|
+
* This is the URL you use to render optimized attachments on the client. This
|
|
601
|
+
* should be used for apps.
|
|
602
|
+
*/
|
|
603
|
+
url: string | null;
|
|
604
|
+
}
|
|
605
|
+
|
|
559
606
|
/**
|
|
560
607
|
* The user who owns this company
|
|
561
608
|
*/
|
|
@@ -611,6 +658,11 @@ export interface CourseLessonInteraction {
|
|
|
611
658
|
*/
|
|
612
659
|
completed: boolean;
|
|
613
660
|
|
|
661
|
+
/**
|
|
662
|
+
* The course for this lesson interaction
|
|
663
|
+
*/
|
|
664
|
+
course: CourseLessonInteraction.Course;
|
|
665
|
+
|
|
614
666
|
/**
|
|
615
667
|
* When the interaction was created
|
|
616
668
|
*/
|
|
@@ -628,6 +680,38 @@ export interface CourseLessonInteraction {
|
|
|
628
680
|
}
|
|
629
681
|
|
|
630
682
|
export namespace CourseLessonInteraction {
|
|
683
|
+
/**
|
|
684
|
+
* The course for this lesson interaction
|
|
685
|
+
*/
|
|
686
|
+
export interface Course {
|
|
687
|
+
/**
|
|
688
|
+
* The ID of the course. Looks like cors_XXX
|
|
689
|
+
*/
|
|
690
|
+
id: string;
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* The experience that the course belongs to
|
|
694
|
+
*/
|
|
695
|
+
experience: Course.Experience;
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* The title of the course
|
|
699
|
+
*/
|
|
700
|
+
title: string | null;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
export namespace Course {
|
|
704
|
+
/**
|
|
705
|
+
* The experience that the course belongs to
|
|
706
|
+
*/
|
|
707
|
+
export interface Experience {
|
|
708
|
+
/**
|
|
709
|
+
* The unique ID representing this experience
|
|
710
|
+
*/
|
|
711
|
+
id: string;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
|
|
631
715
|
/**
|
|
632
716
|
* The lesson this interaction is for
|
|
633
717
|
*/
|
|
@@ -848,6 +932,11 @@ export type Direction = 'asc' | 'desc';
|
|
|
848
932
|
*/
|
|
849
933
|
export type DmsPostTypes = 'regular' | 'system' | 'automated';
|
|
850
934
|
|
|
935
|
+
/**
|
|
936
|
+
* Email notification preference option for a forum feed
|
|
937
|
+
*/
|
|
938
|
+
export type EmailNotificationPreferences = 'all_admin_posts' | 'only_weekly_summary' | 'none';
|
|
939
|
+
|
|
851
940
|
/**
|
|
852
941
|
* An object representing an entry in a waitlist.
|
|
853
942
|
*/
|
|
@@ -989,6 +1078,11 @@ export interface Experience {
|
|
|
989
1078
|
*/
|
|
990
1079
|
created_at: string;
|
|
991
1080
|
|
|
1081
|
+
/**
|
|
1082
|
+
* The logo for the experience.
|
|
1083
|
+
*/
|
|
1084
|
+
image: Experience.Image | null;
|
|
1085
|
+
|
|
992
1086
|
/**
|
|
993
1087
|
* The written name of the description.
|
|
994
1088
|
*/
|
|
@@ -1018,12 +1112,32 @@ export namespace Experience {
|
|
|
1018
1112
|
*/
|
|
1019
1113
|
id: string;
|
|
1020
1114
|
|
|
1115
|
+
/**
|
|
1116
|
+
* The icon for the app. This icon is shown on discovery, on the product page, on
|
|
1117
|
+
* checkout, and as a default icon for the experiences.
|
|
1118
|
+
*/
|
|
1119
|
+
icon: App.Icon | null;
|
|
1120
|
+
|
|
1021
1121
|
/**
|
|
1022
1122
|
* The name of the app
|
|
1023
1123
|
*/
|
|
1024
1124
|
name: string;
|
|
1025
1125
|
}
|
|
1026
1126
|
|
|
1127
|
+
export namespace App {
|
|
1128
|
+
/**
|
|
1129
|
+
* The icon for the app. This icon is shown on discovery, on the product page, on
|
|
1130
|
+
* checkout, and as a default icon for the experiences.
|
|
1131
|
+
*/
|
|
1132
|
+
export interface Icon {
|
|
1133
|
+
/**
|
|
1134
|
+
* This is the URL you use to render optimized attachments on the client. This
|
|
1135
|
+
* should be used for apps.
|
|
1136
|
+
*/
|
|
1137
|
+
url: string | null;
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1027
1141
|
/**
|
|
1028
1142
|
* The company that owns this experience.
|
|
1029
1143
|
*/
|
|
@@ -1044,6 +1158,17 @@ export namespace Experience {
|
|
|
1044
1158
|
title: string;
|
|
1045
1159
|
}
|
|
1046
1160
|
|
|
1161
|
+
/**
|
|
1162
|
+
* The logo for the experience.
|
|
1163
|
+
*/
|
|
1164
|
+
export interface Image {
|
|
1165
|
+
/**
|
|
1166
|
+
* This is the URL you use to render optimized attachments on the client. This
|
|
1167
|
+
* should be used for apps.
|
|
1168
|
+
*/
|
|
1169
|
+
url: string | null;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1047
1172
|
/**
|
|
1048
1173
|
* An object representing a (sanitized) access pass.
|
|
1049
1174
|
*/
|
|
@@ -1065,6 +1190,53 @@ export namespace Experience {
|
|
|
1065
1190
|
}
|
|
1066
1191
|
}
|
|
1067
1192
|
|
|
1193
|
+
/**
|
|
1194
|
+
* Represents a forum feed
|
|
1195
|
+
*/
|
|
1196
|
+
export interface Forum {
|
|
1197
|
+
/**
|
|
1198
|
+
* The unique identifier for the entity
|
|
1199
|
+
*/
|
|
1200
|
+
id: string;
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* The email notification preference for this forum
|
|
1204
|
+
*/
|
|
1205
|
+
email_notification_preference: EmailNotificationPreferences;
|
|
1206
|
+
|
|
1207
|
+
/**
|
|
1208
|
+
* The experience for this forum
|
|
1209
|
+
*/
|
|
1210
|
+
experience: Forum.Experience;
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* Who can comment on this forum
|
|
1214
|
+
*/
|
|
1215
|
+
who_can_comment: WhoCanCommentTypes;
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* Who can post on this forum
|
|
1219
|
+
*/
|
|
1220
|
+
who_can_post: WhoCanPostTypes;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
export namespace Forum {
|
|
1224
|
+
/**
|
|
1225
|
+
* The experience for this forum
|
|
1226
|
+
*/
|
|
1227
|
+
export interface Experience {
|
|
1228
|
+
/**
|
|
1229
|
+
* The unique ID representing this experience
|
|
1230
|
+
*/
|
|
1231
|
+
id: string;
|
|
1232
|
+
|
|
1233
|
+
/**
|
|
1234
|
+
* The written name of the description.
|
|
1235
|
+
*/
|
|
1236
|
+
name: string;
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1068
1240
|
/**
|
|
1069
1241
|
* Represents a post in forum
|
|
1070
1242
|
*/
|
|
@@ -1426,6 +1598,30 @@ export namespace InvoiceListItem {
|
|
|
1426
1598
|
*/
|
|
1427
1599
|
export type InvoiceStatus = 'open' | 'paid' | 'past_due' | 'void';
|
|
1428
1600
|
|
|
1601
|
+
/**
|
|
1602
|
+
* The different most recent actions a member can have.
|
|
1603
|
+
*/
|
|
1604
|
+
export type MemberMostRecentActions =
|
|
1605
|
+
| 'canceling'
|
|
1606
|
+
| 'churned'
|
|
1607
|
+
| 'finished_split_pay'
|
|
1608
|
+
| 'paused'
|
|
1609
|
+
| 'paid_subscriber'
|
|
1610
|
+
| 'paid_once'
|
|
1611
|
+
| 'expiring'
|
|
1612
|
+
| 'joined'
|
|
1613
|
+
| 'drafted'
|
|
1614
|
+
| 'left'
|
|
1615
|
+
| 'trialing'
|
|
1616
|
+
| 'pending_entry'
|
|
1617
|
+
| 'renewing'
|
|
1618
|
+
| 'past_due';
|
|
1619
|
+
|
|
1620
|
+
/**
|
|
1621
|
+
* The different statuses a Member can have.
|
|
1622
|
+
*/
|
|
1623
|
+
export type MemberStatuses = 'drafted' | 'joined' | 'left';
|
|
1624
|
+
|
|
1429
1625
|
/**
|
|
1430
1626
|
* A membership represents a purchase between a User and a Company for a specific
|
|
1431
1627
|
* Product.
|
|
@@ -3069,11 +3265,21 @@ export type VisibilityFilter =
|
|
|
3069
3265
|
| 'not_quick_link'
|
|
3070
3266
|
| 'not_archived';
|
|
3071
3267
|
|
|
3268
|
+
/**
|
|
3269
|
+
* Who can comment on a forum feed
|
|
3270
|
+
*/
|
|
3271
|
+
export type WhoCanCommentTypes = 'everyone' | 'admins';
|
|
3272
|
+
|
|
3072
3273
|
/**
|
|
3073
3274
|
* Who can post on a chat feed
|
|
3074
3275
|
*/
|
|
3075
3276
|
export type WhoCanPost = 'everyone' | 'admins';
|
|
3076
3277
|
|
|
3278
|
+
/**
|
|
3279
|
+
* Who can post on a forum feed
|
|
3280
|
+
*/
|
|
3281
|
+
export type WhoCanPostTypes = 'everyone' | 'admins';
|
|
3282
|
+
|
|
3077
3283
|
/**
|
|
3078
3284
|
* Who can react on a chat feed
|
|
3079
3285
|
*/
|
package/src/resources/users.ts
CHANGED
|
@@ -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 Shared from './shared';
|
|
4
5
|
import { APIPromise } from '../core/api-promise';
|
|
5
6
|
import { RequestOptions } from '../internal/request-options';
|
|
6
7
|
import { path } from '../internal/utils/path';
|
|
@@ -50,12 +51,30 @@ export interface UserRetrieveResponse {
|
|
|
50
51
|
*/
|
|
51
52
|
name: string | null;
|
|
52
53
|
|
|
54
|
+
/**
|
|
55
|
+
* The user's profile picture
|
|
56
|
+
*/
|
|
57
|
+
profile_picture: UserRetrieveResponse.ProfilePicture | null;
|
|
58
|
+
|
|
53
59
|
/**
|
|
54
60
|
* The username of the user from their Whop account.
|
|
55
61
|
*/
|
|
56
62
|
username: string;
|
|
57
63
|
}
|
|
58
64
|
|
|
65
|
+
export namespace UserRetrieveResponse {
|
|
66
|
+
/**
|
|
67
|
+
* The user's profile picture
|
|
68
|
+
*/
|
|
69
|
+
export interface ProfilePicture {
|
|
70
|
+
/**
|
|
71
|
+
* This is the URL you use to render optimized attachments on the client. This
|
|
72
|
+
* should be used for apps.
|
|
73
|
+
*/
|
|
74
|
+
url: string | null;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
59
78
|
/**
|
|
60
79
|
* The result of a has access check for the developer API
|
|
61
80
|
*/
|
|
@@ -63,7 +82,7 @@ export interface UserCheckAccessResponse {
|
|
|
63
82
|
/**
|
|
64
83
|
* The permission level of the user
|
|
65
84
|
*/
|
|
66
|
-
access_level:
|
|
85
|
+
access_level: Shared.AccessLevel;
|
|
67
86
|
|
|
68
87
|
/**
|
|
69
88
|
* Whether the user has access to the resource
|