@whop/sdk 0.0.21 → 0.0.22
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 +9 -0
- package/client.d.mts +11 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +11 -2
- package/client.d.ts.map +1 -1
- package/client.js +9 -0
- package/client.js.map +1 -1
- package/client.mjs +9 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +4 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/leads.d.mts +489 -0
- package/resources/leads.d.mts.map +1 -0
- package/resources/leads.d.ts +489 -0
- package/resources/leads.d.ts.map +1 -0
- package/resources/leads.js +94 -0
- package/resources/leads.js.map +1 -0
- package/resources/leads.mjs +90 -0
- package/resources/leads.mjs.map +1 -0
- package/resources/ledger-accounts.d.mts +25 -0
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +25 -0
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/payout-methods.d.mts +69 -1
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +69 -1
- package/resources/payout-methods.d.ts.map +1 -1
- package/resources/payout-methods.js +11 -0
- package/resources/payout-methods.js.map +1 -1
- package/resources/payout-methods.mjs +11 -0
- package/resources/payout-methods.mjs.map +1 -1
- package/resources/topups.d.mts +79 -0
- package/resources/topups.d.mts.map +1 -0
- package/resources/topups.d.ts +79 -0
- package/resources/topups.d.ts.map +1 -0
- package/resources/topups.js +29 -0
- package/resources/topups.js.map +1 -0
- package/resources/topups.mjs +25 -0
- package/resources/topups.mjs.map +1 -0
- package/resources/verifications.d.mts +38 -0
- package/resources/verifications.d.mts.map +1 -0
- package/resources/verifications.d.ts +38 -0
- package/resources/verifications.d.ts.map +1 -0
- package/resources/verifications.js +20 -0
- package/resources/verifications.js.map +1 -0
- package/resources/verifications.mjs +16 -0
- package/resources/verifications.mjs.map +1 -0
- package/src/client.ts +44 -0
- package/src/resources/index.ts +14 -0
- package/src/resources/leads.ts +583 -0
- package/src/resources/ledger-accounts.ts +63 -0
- package/src/resources/payout-methods.ts +83 -0
- package/src/resources/topups.ts +95 -0
- package/src/resources/verifications.ts +81 -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
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
export declare class Verifications extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Retrieves a verification by ID
|
|
7
|
+
*
|
|
8
|
+
* Required permissions:
|
|
9
|
+
*
|
|
10
|
+
* - `payout:account:read`
|
|
11
|
+
*/
|
|
12
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<VerificationRetrieveResponse>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* An object representing an identity verification session
|
|
16
|
+
*/
|
|
17
|
+
export interface VerificationRetrieveResponse {
|
|
18
|
+
/**
|
|
19
|
+
* A unique identifier for the verification.
|
|
20
|
+
*/
|
|
21
|
+
id: string;
|
|
22
|
+
/**
|
|
23
|
+
* An error code for a verification attempt.
|
|
24
|
+
*/
|
|
25
|
+
last_error_code: 'abandoned' | 'consent_declined' | 'country_not_supported' | 'device_not_supported' | 'document_expired' | 'document_type_not_supported' | 'document_unverified_other' | 'email_unverified_other' | 'email_verification_declined' | 'id_number_insufficient_document_data' | 'id_number_mismatch' | 'id_number_unverified_other' | 'phone_unverified_other' | 'phone_verification_declined' | 'selfie_document_missing_photo' | 'selfie_face_mismatch' | 'selfie_manipulated' | 'selfie_unverified_other' | 'under_supported_age' | null;
|
|
26
|
+
/**
|
|
27
|
+
* The last error reason that occurred during the verification.
|
|
28
|
+
*/
|
|
29
|
+
last_error_reason: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* The status of the verification.
|
|
32
|
+
*/
|
|
33
|
+
status: 'requires_input' | 'processing' | 'verified' | 'canceled' | 'created' | 'started' | 'submitted' | 'approved' | 'declined' | 'resubmission_requested' | 'expired' | 'abandoned' | 'review';
|
|
34
|
+
}
|
|
35
|
+
export declare namespace Verifications {
|
|
36
|
+
export { type VerificationRetrieveResponse as VerificationRetrieveResponse };
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=verifications.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifications.d.ts","sourceRoot":"","sources":["../src/resources/verifications.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;CAGzF;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,eAAe,EACX,WAAW,GACX,kBAAkB,GAClB,uBAAuB,GACvB,sBAAsB,GACtB,kBAAkB,GAClB,6BAA6B,GAC7B,2BAA2B,GAC3B,wBAAwB,GACxB,6BAA6B,GAC7B,sCAAsC,GACtC,oBAAoB,GACpB,4BAA4B,GAC5B,wBAAwB,GACxB,6BAA6B,GAC7B,+BAA+B,GAC/B,sBAAsB,GACtB,oBAAoB,GACpB,yBAAyB,GACzB,qBAAqB,GACrB,IAAI,CAAC;IAET;;OAEG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,MAAM,EACF,gBAAgB,GAChB,YAAY,GACZ,UAAU,GACV,UAAU,GACV,SAAS,GACT,SAAS,GACT,WAAW,GACX,UAAU,GACV,UAAU,GACV,wBAAwB,GACxB,SAAS,GACT,WAAW,GACX,QAAQ,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EAAE,KAAK,4BAA4B,IAAI,4BAA4B,EAAE,CAAC;CAC9E"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Verifications = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const path_1 = require("../internal/utils/path.js");
|
|
7
|
+
class Verifications extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Retrieves a verification by ID
|
|
10
|
+
*
|
|
11
|
+
* Required permissions:
|
|
12
|
+
*
|
|
13
|
+
* - `payout:account:read`
|
|
14
|
+
*/
|
|
15
|
+
retrieve(id, options) {
|
|
16
|
+
return this._client.get((0, path_1.path) `/verifications/${id}`, options);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.Verifications = Verifications;
|
|
20
|
+
//# sourceMappingURL=verifications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifications.js","sourceRoot":"","sources":["../src/resources/verifications.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF;AAXD,sCAWC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { path } from "../internal/utils/path.mjs";
|
|
4
|
+
export class Verifications extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Retrieves a verification by ID
|
|
7
|
+
*
|
|
8
|
+
* Required permissions:
|
|
9
|
+
*
|
|
10
|
+
* - `payout:account:read`
|
|
11
|
+
*/
|
|
12
|
+
retrieve(id, options) {
|
|
13
|
+
return this._client.get(path `/verifications/${id}`, options);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=verifications.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifications.mjs","sourceRoot":"","sources":["../src/resources/verifications.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -173,6 +173,17 @@ import {
|
|
|
173
173
|
Forums,
|
|
174
174
|
} from './resources/forums';
|
|
175
175
|
import { InvoiceCreateParams, InvoiceListParams, InvoiceVoidResponse, Invoices } from './resources/invoices';
|
|
176
|
+
import {
|
|
177
|
+
LeadCreateParams,
|
|
178
|
+
LeadCreateResponse,
|
|
179
|
+
LeadListParams,
|
|
180
|
+
LeadListResponse,
|
|
181
|
+
LeadListResponsesCursorPage,
|
|
182
|
+
LeadRetrieveResponse,
|
|
183
|
+
LeadUpdateParams,
|
|
184
|
+
LeadUpdateResponse,
|
|
185
|
+
Leads,
|
|
186
|
+
} from './resources/leads';
|
|
176
187
|
import { LedgerAccountRetrieveResponse, LedgerAccounts } from './resources/ledger-accounts';
|
|
177
188
|
import {
|
|
178
189
|
MemberListParams,
|
|
@@ -229,6 +240,7 @@ import {
|
|
|
229
240
|
PayoutMethodListParams,
|
|
230
241
|
PayoutMethodListResponse,
|
|
231
242
|
PayoutMethodListResponsesCursorPage,
|
|
243
|
+
PayoutMethodRetrieveResponse,
|
|
232
244
|
PayoutMethods,
|
|
233
245
|
} from './resources/payout-methods';
|
|
234
246
|
import {
|
|
@@ -306,6 +318,7 @@ import {
|
|
|
306
318
|
SupportChannelListResponsesCursorPage,
|
|
307
319
|
SupportChannels,
|
|
308
320
|
} from './resources/support-channels';
|
|
321
|
+
import { TopupCreateParams, TopupCreateResponse, Topups } from './resources/topups';
|
|
309
322
|
import {
|
|
310
323
|
TransferCreateParams,
|
|
311
324
|
TransferListParams,
|
|
@@ -319,6 +332,7 @@ import {
|
|
|
319
332
|
UserRetrieveResponse,
|
|
320
333
|
Users,
|
|
321
334
|
} from './resources/users';
|
|
335
|
+
import { VerificationRetrieveResponse, Verifications } from './resources/verifications';
|
|
322
336
|
import {
|
|
323
337
|
CourseLessonInteractionCompletedWebhookEvent,
|
|
324
338
|
DisputeCreatedWebhookEvent,
|
|
@@ -1130,6 +1144,9 @@ export class Whop {
|
|
|
1130
1144
|
paymentMethods: API.PaymentMethods = new API.PaymentMethods(this);
|
|
1131
1145
|
feeMarkups: API.FeeMarkups = new API.FeeMarkups(this);
|
|
1132
1146
|
payoutMethods: API.PayoutMethods = new API.PayoutMethods(this);
|
|
1147
|
+
verifications: API.Verifications = new API.Verifications(this);
|
|
1148
|
+
leads: API.Leads = new API.Leads(this);
|
|
1149
|
+
topups: API.Topups = new API.Topups(this);
|
|
1133
1150
|
}
|
|
1134
1151
|
|
|
1135
1152
|
Whop.Apps = Apps;
|
|
@@ -1173,6 +1190,9 @@ Whop.SetupIntents = SetupIntents;
|
|
|
1173
1190
|
Whop.PaymentMethods = PaymentMethods;
|
|
1174
1191
|
Whop.FeeMarkups = FeeMarkups;
|
|
1175
1192
|
Whop.PayoutMethods = PayoutMethods;
|
|
1193
|
+
Whop.Verifications = Verifications;
|
|
1194
|
+
Whop.Leads = Leads;
|
|
1195
|
+
Whop.Topups = Topups;
|
|
1176
1196
|
|
|
1177
1197
|
export declare namespace Whop {
|
|
1178
1198
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -1576,11 +1596,35 @@ export declare namespace Whop {
|
|
|
1576
1596
|
|
|
1577
1597
|
export {
|
|
1578
1598
|
PayoutMethods as PayoutMethods,
|
|
1599
|
+
type PayoutMethodRetrieveResponse as PayoutMethodRetrieveResponse,
|
|
1579
1600
|
type PayoutMethodListResponse as PayoutMethodListResponse,
|
|
1580
1601
|
type PayoutMethodListResponsesCursorPage as PayoutMethodListResponsesCursorPage,
|
|
1581
1602
|
type PayoutMethodListParams as PayoutMethodListParams,
|
|
1582
1603
|
};
|
|
1583
1604
|
|
|
1605
|
+
export {
|
|
1606
|
+
Verifications as Verifications,
|
|
1607
|
+
type VerificationRetrieveResponse as VerificationRetrieveResponse,
|
|
1608
|
+
};
|
|
1609
|
+
|
|
1610
|
+
export {
|
|
1611
|
+
Leads as Leads,
|
|
1612
|
+
type LeadCreateResponse as LeadCreateResponse,
|
|
1613
|
+
type LeadRetrieveResponse as LeadRetrieveResponse,
|
|
1614
|
+
type LeadUpdateResponse as LeadUpdateResponse,
|
|
1615
|
+
type LeadListResponse as LeadListResponse,
|
|
1616
|
+
type LeadListResponsesCursorPage as LeadListResponsesCursorPage,
|
|
1617
|
+
type LeadCreateParams as LeadCreateParams,
|
|
1618
|
+
type LeadUpdateParams as LeadUpdateParams,
|
|
1619
|
+
type LeadListParams as LeadListParams,
|
|
1620
|
+
};
|
|
1621
|
+
|
|
1622
|
+
export {
|
|
1623
|
+
Topups as Topups,
|
|
1624
|
+
type TopupCreateResponse as TopupCreateResponse,
|
|
1625
|
+
type TopupCreateParams as TopupCreateParams,
|
|
1626
|
+
};
|
|
1627
|
+
|
|
1584
1628
|
export type AccessLevel = API.AccessLevel;
|
|
1585
1629
|
export type AccessPassType = API.AccessPassType;
|
|
1586
1630
|
export type App = API.App;
|
package/src/resources/index.ts
CHANGED
|
@@ -160,6 +160,17 @@ export {
|
|
|
160
160
|
type InvoiceCreateParams,
|
|
161
161
|
type InvoiceListParams,
|
|
162
162
|
} from './invoices';
|
|
163
|
+
export {
|
|
164
|
+
Leads,
|
|
165
|
+
type LeadCreateResponse,
|
|
166
|
+
type LeadRetrieveResponse,
|
|
167
|
+
type LeadUpdateResponse,
|
|
168
|
+
type LeadListResponse,
|
|
169
|
+
type LeadCreateParams,
|
|
170
|
+
type LeadUpdateParams,
|
|
171
|
+
type LeadListParams,
|
|
172
|
+
type LeadListResponsesCursorPage,
|
|
173
|
+
} from './leads';
|
|
163
174
|
export { LedgerAccounts, type LedgerAccountRetrieveResponse } from './ledger-accounts';
|
|
164
175
|
export {
|
|
165
176
|
Members,
|
|
@@ -214,6 +225,7 @@ export {
|
|
|
214
225
|
} from './payments';
|
|
215
226
|
export {
|
|
216
227
|
PayoutMethods,
|
|
228
|
+
type PayoutMethodRetrieveResponse,
|
|
217
229
|
type PayoutMethodListResponse,
|
|
218
230
|
type PayoutMethodListParams,
|
|
219
231
|
type PayoutMethodListResponsesCursorPage,
|
|
@@ -293,6 +305,7 @@ export {
|
|
|
293
305
|
type SupportChannelListParams,
|
|
294
306
|
type SupportChannelListResponsesCursorPage,
|
|
295
307
|
} from './support-channels';
|
|
308
|
+
export { Topups, type TopupCreateResponse, type TopupCreateParams } from './topups';
|
|
296
309
|
export {
|
|
297
310
|
Transfers,
|
|
298
311
|
type TransferListResponse,
|
|
@@ -306,6 +319,7 @@ export {
|
|
|
306
319
|
type UserCheckAccessResponse,
|
|
307
320
|
type UserCheckAccessParams,
|
|
308
321
|
} from './users';
|
|
322
|
+
export { Verifications, type VerificationRetrieveResponse } from './verifications';
|
|
309
323
|
export {
|
|
310
324
|
Webhooks,
|
|
311
325
|
type InvoiceCreatedWebhookEvent,
|