@whop/sdk 0.0.33 → 0.0.34
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 +16 -0
- 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/refunds.d.mts +15 -7
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +15 -7
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.js +3 -3
- package/resources/refunds.js.map +1 -1
- package/resources/refunds.mjs +3 -3
- package/resources/refunds.mjs.map +1 -1
- package/resources/users.d.mts +70 -1
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +70 -1
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +8 -0
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +8 -0
- package/resources/users.mjs.map +1 -1
- package/src/client.ts +6 -0
- package/src/resources/index.ts +3 -0
- package/src/resources/refunds.ts +17 -7
- package/src/resources/users.ts +90 -0
- 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
package/src/client.ts
CHANGED
|
@@ -412,6 +412,9 @@ import {
|
|
|
412
412
|
User,
|
|
413
413
|
UserCheckAccessParams,
|
|
414
414
|
UserCheckAccessResponse,
|
|
415
|
+
UserListParams,
|
|
416
|
+
UserListResponse,
|
|
417
|
+
UserListResponsesCursorPage,
|
|
415
418
|
UserUpdateProfileParams,
|
|
416
419
|
Users,
|
|
417
420
|
} from './resources/users';
|
|
@@ -1687,7 +1690,10 @@ export declare namespace Whop {
|
|
|
1687
1690
|
export {
|
|
1688
1691
|
Users as Users,
|
|
1689
1692
|
type User as User,
|
|
1693
|
+
type UserListResponse as UserListResponse,
|
|
1690
1694
|
type UserCheckAccessResponse as UserCheckAccessResponse,
|
|
1695
|
+
type UserListResponsesCursorPage as UserListResponsesCursorPage,
|
|
1696
|
+
type UserListParams as UserListParams,
|
|
1691
1697
|
type UserCheckAccessParams as UserCheckAccessParams,
|
|
1692
1698
|
type UserUpdateProfileParams as UserUpdateProfileParams,
|
|
1693
1699
|
};
|
package/src/resources/index.ts
CHANGED
|
@@ -398,9 +398,12 @@ export {
|
|
|
398
398
|
export {
|
|
399
399
|
Users,
|
|
400
400
|
type User,
|
|
401
|
+
type UserListResponse,
|
|
401
402
|
type UserCheckAccessResponse,
|
|
403
|
+
type UserListParams,
|
|
402
404
|
type UserCheckAccessParams,
|
|
403
405
|
type UserUpdateProfileParams,
|
|
406
|
+
type UserListResponsesCursorPage,
|
|
404
407
|
} from './users';
|
|
405
408
|
export {
|
|
406
409
|
Verifications,
|
package/src/resources/refunds.ts
CHANGED
|
@@ -27,15 +27,15 @@ export class Refunds extends APIResource {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* Returns a paginated list of refunds
|
|
31
|
-
*
|
|
30
|
+
* Returns a paginated list of refunds, with optional filtering by payment,
|
|
31
|
+
* company, user, and creation date.
|
|
32
32
|
*
|
|
33
33
|
* Required permissions:
|
|
34
34
|
*
|
|
35
35
|
* - `payment:basic:read`
|
|
36
36
|
*/
|
|
37
37
|
list(
|
|
38
|
-
query: RefundListParams,
|
|
38
|
+
query: RefundListParams | null | undefined = {},
|
|
39
39
|
options?: RequestOptions,
|
|
40
40
|
): PagePromise<RefundListResponsesCursorPage, RefundListResponse> {
|
|
41
41
|
return this._client.getAPIList('/refunds', CursorPage<RefundListResponse>, { query, ...options });
|
|
@@ -386,14 +386,14 @@ export namespace RefundListResponse {
|
|
|
386
386
|
|
|
387
387
|
export interface RefundListParams extends CursorPageParams {
|
|
388
388
|
/**
|
|
389
|
-
*
|
|
389
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
390
390
|
*/
|
|
391
|
-
|
|
391
|
+
before?: string | null;
|
|
392
392
|
|
|
393
393
|
/**
|
|
394
|
-
*
|
|
394
|
+
* Filter refunds to only those belonging to this company.
|
|
395
395
|
*/
|
|
396
|
-
|
|
396
|
+
company_id?: string | null;
|
|
397
397
|
|
|
398
398
|
/**
|
|
399
399
|
* Only return refunds created after this timestamp.
|
|
@@ -419,6 +419,16 @@ export interface RefundListParams extends CursorPageParams {
|
|
|
419
419
|
* Returns the last _n_ elements from the list.
|
|
420
420
|
*/
|
|
421
421
|
last?: number | null;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Filter refunds to only those associated with this specific payment.
|
|
425
|
+
*/
|
|
426
|
+
payment_id?: string | null;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Filter refunds to only those associated with this specific user.
|
|
430
|
+
*/
|
|
431
|
+
user_id?: string | null;
|
|
422
432
|
}
|
|
423
433
|
|
|
424
434
|
export declare namespace Refunds {
|
package/src/resources/users.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import * as Shared from './shared';
|
|
5
5
|
import { APIPromise } from '../core/api-promise';
|
|
6
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
6
7
|
import { RequestOptions } from '../internal/request-options';
|
|
7
8
|
import { path } from '../internal/utils/path';
|
|
8
9
|
|
|
@@ -17,6 +18,17 @@ export class Users extends APIResource {
|
|
|
17
18
|
return this._client.get(path`/users/${id}`, options);
|
|
18
19
|
}
|
|
19
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Search for users by name or username, ranked by social proximity to the
|
|
23
|
+
* authenticated user.
|
|
24
|
+
*/
|
|
25
|
+
list(
|
|
26
|
+
query: UserListParams | null | undefined = {},
|
|
27
|
+
options?: RequestOptions,
|
|
28
|
+
): PagePromise<UserListResponsesCursorPage, UserListResponse> {
|
|
29
|
+
return this._client.getAPIList('/users', CursorPage<UserListResponse>, { query, ...options });
|
|
30
|
+
}
|
|
31
|
+
|
|
20
32
|
/**
|
|
21
33
|
* Check whether a user has access to a specific resource, and return their access
|
|
22
34
|
* level.
|
|
@@ -45,6 +57,8 @@ export class Users extends APIResource {
|
|
|
45
57
|
}
|
|
46
58
|
}
|
|
47
59
|
|
|
60
|
+
export type UserListResponsesCursorPage = CursorPage<UserListResponse>;
|
|
61
|
+
|
|
48
62
|
/**
|
|
49
63
|
* A user account on Whop. Contains profile information, identity details, and
|
|
50
64
|
* social connections.
|
|
@@ -96,6 +110,57 @@ export namespace User {
|
|
|
96
110
|
}
|
|
97
111
|
}
|
|
98
112
|
|
|
113
|
+
/**
|
|
114
|
+
* A user account on Whop. Contains profile information, identity details, and
|
|
115
|
+
* social connections.
|
|
116
|
+
*/
|
|
117
|
+
export interface UserListResponse {
|
|
118
|
+
/**
|
|
119
|
+
* The unique identifier for the user.
|
|
120
|
+
*/
|
|
121
|
+
id: string;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* A short biography written by the user, displayed on their public profile.
|
|
125
|
+
*/
|
|
126
|
+
bio: string | null;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* The datetime the user was created.
|
|
130
|
+
*/
|
|
131
|
+
created_at: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* The user's display name shown on their public profile.
|
|
135
|
+
*/
|
|
136
|
+
name: string | null;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The user's profile picture attachment with URL, content type, and file metadata.
|
|
140
|
+
* Null if using a legacy profile picture.
|
|
141
|
+
*/
|
|
142
|
+
profile_picture: UserListResponse.ProfilePicture | null;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* The user's unique username shown on their public profile.
|
|
146
|
+
*/
|
|
147
|
+
username: string;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export namespace UserListResponse {
|
|
151
|
+
/**
|
|
152
|
+
* The user's profile picture attachment with URL, content type, and file metadata.
|
|
153
|
+
* Null if using a legacy profile picture.
|
|
154
|
+
*/
|
|
155
|
+
export interface ProfilePicture {
|
|
156
|
+
/**
|
|
157
|
+
* A pre-optimized URL for rendering this attachment on the client. This should be
|
|
158
|
+
* used for displaying attachments in apps.
|
|
159
|
+
*/
|
|
160
|
+
url: string | null;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
99
164
|
/**
|
|
100
165
|
* The result of a has access check for the developer API
|
|
101
166
|
*/
|
|
@@ -111,6 +176,28 @@ export interface UserCheckAccessResponse {
|
|
|
111
176
|
has_access: boolean;
|
|
112
177
|
}
|
|
113
178
|
|
|
179
|
+
export interface UserListParams extends CursorPageParams {
|
|
180
|
+
/**
|
|
181
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
182
|
+
*/
|
|
183
|
+
before?: string | null;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Returns the first _n_ elements from the list.
|
|
187
|
+
*/
|
|
188
|
+
first?: number | null;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Returns the last _n_ elements from the list.
|
|
192
|
+
*/
|
|
193
|
+
last?: number | null;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Search term to filter by name or username.
|
|
197
|
+
*/
|
|
198
|
+
query?: string | null;
|
|
199
|
+
}
|
|
200
|
+
|
|
114
201
|
export interface UserCheckAccessParams {
|
|
115
202
|
/**
|
|
116
203
|
* The unique identifier or username of the user.
|
|
@@ -156,7 +243,10 @@ export namespace UserUpdateProfileParams {
|
|
|
156
243
|
export declare namespace Users {
|
|
157
244
|
export {
|
|
158
245
|
type User as User,
|
|
246
|
+
type UserListResponse as UserListResponse,
|
|
159
247
|
type UserCheckAccessResponse as UserCheckAccessResponse,
|
|
248
|
+
type UserListResponsesCursorPage as UserListResponsesCursorPage,
|
|
249
|
+
type UserListParams as UserListParams,
|
|
160
250
|
type UserCheckAccessParams as UserCheckAccessParams,
|
|
161
251
|
type UserUpdateProfileParams as UserUpdateProfileParams,
|
|
162
252
|
};
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.0.
|
|
1
|
+
export const VERSION = '0.0.34'; // 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.34";
|
|
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.34";
|
|
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.34'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|