@proxyrequest/sdk 1.0.0 → 2.1.0
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 +33 -0
- package/README.md +58 -8
- package/SECURITY.md +1 -1
- package/dist/index.cjs +665 -266
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +249 -74
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +249 -74
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +666 -265
- package/dist/index.js.map +1 -1
- package/dist/{models-VMmyyuf_.d.cts → models-Ci7ojtEW.d.cts} +13 -9
- package/dist/models-Ci7ojtEW.d.cts.map +1 -0
- package/dist/{models-ECy_bhdn.d.ts → models-rpFTQLRE.d.ts} +13 -9
- package/dist/models-rpFTQLRE.d.ts.map +1 -0
- package/dist/models.d.cts +2 -2
- package/dist/models.d.ts +2 -2
- package/dist/openapi.d.cts +1 -1
- package/dist/openapi.d.ts +1 -1
- package/dist/{schema-CvCxeox5.d.cts → schema-B2orTIrr.d.cts} +970 -453
- package/dist/schema-B2orTIrr.d.cts.map +1 -0
- package/dist/{schema-CvCxeox5.d.ts → schema-B2orTIrr.d.ts} +970 -453
- package/dist/schema-B2orTIrr.d.ts.map +1 -0
- package/docs/SDK-AUDIT.md +273 -0
- package/docs/backend-compatibility.md +66 -0
- package/docs/errors-and-pagination.md +1 -1
- package/docs/getting-started.md +1 -2
- package/docs/releasing.md +13 -3
- package/docs/reseller-workflow.md +1 -1
- package/docs/webhooks.md +4 -7
- package/package.json +3 -2
- package/dist/models-ECy_bhdn.d.ts.map +0 -1
- package/dist/models-VMmyyuf_.d.cts.map +0 -1
- package/dist/schema-CvCxeox5.d.cts.map +0 -1
- package/dist/schema-CvCxeox5.d.ts.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as operations } from "./schema-
|
|
2
|
-
import { $ as
|
|
1
|
+
import { n as operations } from "./schema-B2orTIrr.js";
|
|
2
|
+
import { $ as LogsResponse, $t as SettingsGateway, A as GenerateProxyRequest, At as PatchedCouponUpdateRequest, B as InvoiceRead, Bt as ProxyGenerationConnectionRequest, C as CouponTypeEnum, Cn as WebhookScopeEnum, Ct as PaginatedPackageCommissionList, D as EnabledResponse, Dt as PaginatedUserList, E as DomainsResponse, Et as PaginatedRewardList, F as Invoice, Ft as PaymentGateway, G as LevelEnum, Gt as RecoverPasswordRequest, H as InvoiceStatusEnum, Ht as ProxyGenerationTargetingRequest, I as InvoiceCreateRequestGatewayEnum, It as PaymentLinkResponse, J as LocationCodeName, Jt as ResetPasswordRequest, K as LocationASNGeoItem, Kt as Region, L as InvoiceCreateRequestRequest, Lt as PricingEnum, M as GeneratedProxy, Mt as PatchedProfileUpdateRequest, N as GoogleAuthRequest, Nt as PatchedTelegramConnectionUpdateRequest, O as FeedRecord, Ot as PaginatedWebhookListList, P as ISP, Pt as PatchedUserUpdateRequest, Q as LoginRequestRequest, Qt as SettingsCrypto, R as InvoiceCreateRequestStatusEnum, Rt as PricingUnitEnum, S as CouponShort, Sn as WebhookList, St as PaginatedOrderList, T as DomainRecord, Tt as PaginatedRegionList, U as InvoiceTypeEnum, Ut as ProxyPasswordResetResponse, V as InvoiceShort, Vt as ProxyGenerationSessionRequest, W as LanguageEnum, Wt as ProxyTypeEnum, X as LocationRegionSummary, Xt as RewardClaimRequestRequest, Y as LocationCountrySummary, Yt as Reward, Z as LogRecord, Zt as RewardStatusEnum, _ as Coupon, _n as UserCreateRequest, _t as PaginatedCouponShortList, a as Affiliate, an as TelegramConnectionResponse, at as OverallPoint, b as CouponPriceResponse, bn as WebhookCreateRequest, bt as PaginatedLocationASNRecordList, c as AffiliateStatsResponse, cn as TokenRefreshRequestRequest, ct as PackageCommission, d as City, dn as TransactionsResponse, dt as PaginatedAffiliateList, en as SettingsReferral, et as MessageResponse, f as CommissionTypeEnum, fn as TwoFactorConfirmRequest, ft as PaginatedAffiliateRewardList, g as Country, gn as User, gt as PaginatedCouponRedeemList, h as Continent, hn as TwoFactorSetupResponse, ht as PaginatedCountryList, i as AddDataRequest, in as TargetingOptions, it as OrderDetailed, j as GenerateProxyResponse, jt as PatchedOrderAutoRenewalRequest, k as FeedResponse, kt as PasswordRecoveryResponse, l as ChangePasswordRequest, ln as TokenRefreshResponse, lt as PackageShort, m as ConnectionsResponse, mn as TwoFactorSetupRequestRequest, mt as PaginatedContinentList, n as APIKeyCreateRequest, nn as SignUpRequest, nt as OTPChallenge, o as AffiliateReward, on as TelegramLinkResponse, ot as OverallResponse, p as ConnectionRecord, pn as TwoFactorDisableRequest, pt as PaginatedCityList, q as LocationASNRecord, qt as ResetDataRequest, r as APIKeyList, rn as SubtractDataRequest, rt as Order, s as AffiliateStatsPoint, sn as TokenPairResponse, st as Package, t as APIKeyCreate, tn as SettingsResponse, tt as News, u as CheckoutStatusEnum, un as TransactionRecord, ut as PaginatedAPIKeyListList, v as CouponCalculatePriceRequest, vn as UserPasswordResetRequestRequest, vt as PaginatedISPList, w as CouponUpdateRequest, wt as PaginatedPackageList, x as CouponRedeem, xn as WebhookCreated, xt as PaginatedNewsList, y as CouponCreateRequest, yn as VerifyOTPRequest, yt as PaginatedInvoiceReadList, z as InvoiceGatewayEnum, zt as ProtocolEnum } from "./models-rpFTQLRE.js";
|
|
3
3
|
//#region src/files.d.ts
|
|
4
4
|
declare class FileDownload {
|
|
5
5
|
readonly content: Uint8Array;
|
|
@@ -27,6 +27,7 @@ interface OperationCallSpec {
|
|
|
27
27
|
method: HttpMethod;
|
|
28
28
|
path: string;
|
|
29
29
|
binary?: boolean;
|
|
30
|
+
idempotent?: boolean;
|
|
30
31
|
}
|
|
31
32
|
interface OperationCallData {
|
|
32
33
|
path?: Record<string, unknown>;
|
|
@@ -37,6 +38,14 @@ interface OperationCallData {
|
|
|
37
38
|
}
|
|
38
39
|
interface ResourceClient {
|
|
39
40
|
_call<Result>(spec: OperationCallSpec, data?: OperationCallData): Promise<Result>;
|
|
41
|
+
_callWithResponse<Result>(spec: OperationCallSpec, data?: OperationCallData): Promise<ApiResponse<Result>>;
|
|
42
|
+
}
|
|
43
|
+
interface ApiResponse<Result> {
|
|
44
|
+
data: Result;
|
|
45
|
+
statusCode: number;
|
|
46
|
+
headers: Readonly<Record<string, string>>;
|
|
47
|
+
etag?: string;
|
|
48
|
+
idempotencyReplayed: boolean;
|
|
40
49
|
}
|
|
41
50
|
type OperationParameter<Operation, Location extends "path" | "query" | "header" | "cookie", Name extends PropertyKey> = Operation extends {
|
|
42
51
|
parameters: infer Parameters;
|
|
@@ -73,6 +82,7 @@ interface APIKeysCreateOptions {
|
|
|
73
82
|
type APIKeysCreateResponse = OperationResult<operations["api_keys_create"]>;
|
|
74
83
|
interface APIKeysDeleteOptions {
|
|
75
84
|
id: OperationParameter<operations["api_keys_destroy"], "path", "id">;
|
|
85
|
+
idempotencyKey?: OperationParameter<operations["api_keys_destroy"], "header", "Idempotency-Key">;
|
|
76
86
|
acceptLanguage?: OperationParameter<operations["api_keys_destroy"], "header", "Accept-Language">;
|
|
77
87
|
request?: RequestControls;
|
|
78
88
|
}
|
|
@@ -82,10 +92,16 @@ declare class APIKeysResource {
|
|
|
82
92
|
constructor(client: ResourceClient);
|
|
83
93
|
/** List API keys */
|
|
84
94
|
list(options?: APIKeysListOptions): Promise<APIKeysListResponse>;
|
|
95
|
+
/** List API keys; include response metadata. */
|
|
96
|
+
listWithResponse(options?: APIKeysListOptions): Promise<ApiResponse<APIKeysListResponse>>;
|
|
85
97
|
/** Create an API key */
|
|
86
98
|
create(options?: APIKeysCreateOptions): Promise<APIKeysCreateResponse>;
|
|
99
|
+
/** Create an API key; include response metadata. */
|
|
100
|
+
createWithResponse(options?: APIKeysCreateOptions): Promise<ApiResponse<APIKeysCreateResponse>>;
|
|
87
101
|
/** Revoke an API key */
|
|
88
102
|
delete(options: APIKeysDeleteOptions): Promise<APIKeysDeleteResponse>;
|
|
103
|
+
/** Revoke an API key; include response metadata. */
|
|
104
|
+
deleteWithResponse(options: APIKeysDeleteOptions): Promise<ApiResponse<APIKeysDeleteResponse>>;
|
|
89
105
|
}
|
|
90
106
|
interface AffiliatesListOptions {
|
|
91
107
|
limit?: OperationParameter<operations["affiliates_list"], "query", "limit">;
|
|
@@ -111,10 +127,16 @@ declare class AffiliatesResource {
|
|
|
111
127
|
constructor(client: ResourceClient);
|
|
112
128
|
/** List referred customers */
|
|
113
129
|
list(options?: AffiliatesListOptions): Promise<AffiliatesListResponse>;
|
|
130
|
+
/** List referred customers; include response metadata. */
|
|
131
|
+
listWithResponse(options?: AffiliatesListOptions): Promise<ApiResponse<AffiliatesListResponse>>;
|
|
114
132
|
/** List affiliate reward entries */
|
|
115
133
|
listRewards(options?: AffiliatesListRewardsOptions): Promise<AffiliatesListRewardsResponse>;
|
|
134
|
+
/** List affiliate reward entries; include response metadata. */
|
|
135
|
+
listRewardsWithResponse(options?: AffiliatesListRewardsOptions): Promise<ApiResponse<AffiliatesListRewardsResponse>>;
|
|
116
136
|
/** Get affiliate earnings over time */
|
|
117
137
|
getRewardsOverall(options?: AffiliatesGetRewardsOverallOptions): Promise<AffiliatesGetRewardsOverallResponse>;
|
|
138
|
+
/** Get affiliate earnings over time; include response metadata. */
|
|
139
|
+
getRewardsOverallWithResponse(options?: AffiliatesGetRewardsOverallOptions): Promise<ApiResponse<AffiliatesGetRewardsOverallResponse>>;
|
|
118
140
|
}
|
|
119
141
|
interface AnalyticsGetTransactionsOptions {
|
|
120
142
|
end?: OperationParameter<operations["analytics_transactions_retrieve"], "query", "end">;
|
|
@@ -212,16 +234,28 @@ declare class AnalyticsResource {
|
|
|
212
234
|
constructor(client: ResourceClient);
|
|
213
235
|
/** List data transactions */
|
|
214
236
|
getTransactions(options: AnalyticsGetTransactionsOptions): Promise<AnalyticsGetTransactionsResponse>;
|
|
237
|
+
/** List data transactions; include response metadata. */
|
|
238
|
+
getTransactionsWithResponse(options: AnalyticsGetTransactionsOptions): Promise<ApiResponse<AnalyticsGetTransactionsResponse>>;
|
|
215
239
|
/** List active proxy connections */
|
|
216
240
|
getConnections(options?: AnalyticsGetConnectionsOptions): Promise<AnalyticsGetConnectionsResponse>;
|
|
241
|
+
/** List active proxy connections; include response metadata. */
|
|
242
|
+
getConnectionsWithResponse(options?: AnalyticsGetConnectionsOptions): Promise<ApiResponse<AnalyticsGetConnectionsResponse>>;
|
|
217
243
|
/** List top destination domains */
|
|
218
244
|
listDomains(options?: AnalyticsListDomainsOptions): Promise<AnalyticsListDomainsResponse>;
|
|
245
|
+
/** List top destination domains; include response metadata. */
|
|
246
|
+
listDomainsWithResponse(options?: AnalyticsListDomainsOptions): Promise<ApiResponse<AnalyticsListDomainsResponse>>;
|
|
219
247
|
/** List proxy request activity */
|
|
220
248
|
listFeed(options?: AnalyticsListFeedOptions): Promise<AnalyticsListFeedResponse>;
|
|
249
|
+
/** List proxy request activity; include response metadata. */
|
|
250
|
+
listFeedWithResponse(options?: AnalyticsListFeedOptions): Promise<ApiResponse<AnalyticsListFeedResponse>>;
|
|
221
251
|
/** List proxy error logs */
|
|
222
252
|
listLogs(options?: AnalyticsListLogsOptions): Promise<AnalyticsListLogsResponse>;
|
|
253
|
+
/** List proxy error logs; include response metadata. */
|
|
254
|
+
listLogsWithResponse(options?: AnalyticsListLogsOptions): Promise<ApiResponse<AnalyticsListLogsResponse>>;
|
|
223
255
|
/** Get traffic totals over time */
|
|
224
256
|
getOverall(options?: AnalyticsGetOverallOptions): Promise<AnalyticsGetOverallResponse>;
|
|
257
|
+
/** Get traffic totals over time; include response metadata. */
|
|
258
|
+
getOverallWithResponse(options?: AnalyticsGetOverallOptions): Promise<ApiResponse<AnalyticsGetOverallResponse>>;
|
|
225
259
|
}
|
|
226
260
|
interface AuthorizationLoginOptions {
|
|
227
261
|
acceptLanguage?: OperationParameter<operations["login_create"], "header", "Accept-Language">;
|
|
@@ -235,6 +269,12 @@ interface AuthorizationLoginWithGoogleOptions {
|
|
|
235
269
|
request?: RequestControls;
|
|
236
270
|
}
|
|
237
271
|
type AuthorizationLoginWithGoogleResponse = OperationResult<operations["login_google_create"]>;
|
|
272
|
+
interface AuthorizationVerifyOtpOptions {
|
|
273
|
+
acceptLanguage?: OperationParameter<operations["login_otp_create"], "header", "Accept-Language">;
|
|
274
|
+
body: OperationBody<operations["login_otp_create"]>;
|
|
275
|
+
request?: RequestControls;
|
|
276
|
+
}
|
|
277
|
+
type AuthorizationVerifyOtpResponse = OperationResult<operations["login_otp_create"]>;
|
|
238
278
|
interface AuthorizationRecoverPasswordOptions {
|
|
239
279
|
acceptLanguage?: OperationParameter<operations["recover_password_create"], "header", "Accept-Language">;
|
|
240
280
|
body: OperationBody<operations["recover_password_create"]>;
|
|
@@ -258,14 +298,28 @@ declare class AuthorizationResource {
|
|
|
258
298
|
constructor(client: ResourceClient);
|
|
259
299
|
/** Sign in with email or username */
|
|
260
300
|
login(options: AuthorizationLoginOptions): Promise<AuthorizationLoginResponse>;
|
|
301
|
+
/** Sign in with email or username; include response metadata. */
|
|
302
|
+
loginWithResponse(options: AuthorizationLoginOptions): Promise<ApiResponse<AuthorizationLoginResponse>>;
|
|
261
303
|
/** Sign in with Google */
|
|
262
304
|
loginWithGoogle(options: AuthorizationLoginWithGoogleOptions): Promise<AuthorizationLoginWithGoogleResponse>;
|
|
305
|
+
/** Sign in with Google; include response metadata. */
|
|
306
|
+
loginWithGoogleWithResponse(options: AuthorizationLoginWithGoogleOptions): Promise<ApiResponse<AuthorizationLoginWithGoogleResponse>>;
|
|
307
|
+
/** Complete two-factor sign-in */
|
|
308
|
+
verifyOtp(options: AuthorizationVerifyOtpOptions): Promise<AuthorizationVerifyOtpResponse>;
|
|
309
|
+
/** Complete two-factor sign-in; include response metadata. */
|
|
310
|
+
verifyOtpWithResponse(options: AuthorizationVerifyOtpOptions): Promise<ApiResponse<AuthorizationVerifyOtpResponse>>;
|
|
263
311
|
/** Send a password recovery email */
|
|
264
312
|
recoverPassword(options: AuthorizationRecoverPasswordOptions): Promise<AuthorizationRecoverPasswordResponse>;
|
|
313
|
+
/** Send a password recovery email; include response metadata. */
|
|
314
|
+
recoverPasswordWithResponse(options: AuthorizationRecoverPasswordOptions): Promise<ApiResponse<AuthorizationRecoverPasswordResponse>>;
|
|
265
315
|
/** Refresh an access token */
|
|
266
316
|
refresh(options: AuthorizationRefreshOptions): Promise<AuthorizationRefreshResponse>;
|
|
317
|
+
/** Refresh an access token; include response metadata. */
|
|
318
|
+
refreshWithResponse(options: AuthorizationRefreshOptions): Promise<ApiResponse<AuthorizationRefreshResponse>>;
|
|
267
319
|
/** Create a customer account */
|
|
268
320
|
signup(options: AuthorizationSignupOptions): Promise<AuthorizationSignupResponse>;
|
|
321
|
+
/** Create a customer account; include response metadata. */
|
|
322
|
+
signupWithResponse(options: AuthorizationSignupOptions): Promise<ApiResponse<AuthorizationSignupResponse>>;
|
|
269
323
|
}
|
|
270
324
|
interface CouponsListOptions {
|
|
271
325
|
code?: OperationParameter<operations["coupons_list"], "query", "code">;
|
|
@@ -279,6 +333,7 @@ interface CouponsListOptions {
|
|
|
279
333
|
}
|
|
280
334
|
type CouponsListResponse = OperationResult<operations["coupons_list"]>;
|
|
281
335
|
interface CouponsCreateOptions {
|
|
336
|
+
idempotencyKey?: OperationParameter<operations["coupons_create"], "header", "Idempotency-Key">;
|
|
282
337
|
acceptLanguage?: OperationParameter<operations["coupons_create"], "header", "Accept-Language">;
|
|
283
338
|
body: OperationBody<operations["coupons_create"]>;
|
|
284
339
|
request?: RequestControls;
|
|
@@ -292,6 +347,7 @@ interface CouponsGetOptions {
|
|
|
292
347
|
type CouponsGetResponse = OperationResult<operations["coupons_retrieve"]>;
|
|
293
348
|
interface CouponsReplaceOptions {
|
|
294
349
|
id: OperationParameter<operations["coupons_update"], "path", "id">;
|
|
350
|
+
ifMatch?: OperationParameter<operations["coupons_update"], "header", "If-Match">;
|
|
295
351
|
acceptLanguage?: OperationParameter<operations["coupons_update"], "header", "Accept-Language">;
|
|
296
352
|
body: OperationBody<operations["coupons_update"]>;
|
|
297
353
|
request?: RequestControls;
|
|
@@ -299,6 +355,7 @@ interface CouponsReplaceOptions {
|
|
|
299
355
|
type CouponsReplaceResponse = OperationResult<operations["coupons_update"]>;
|
|
300
356
|
interface CouponsUpdateOptions {
|
|
301
357
|
id: OperationParameter<operations["coupons_partial_update"], "path", "id">;
|
|
358
|
+
ifMatch?: OperationParameter<operations["coupons_partial_update"], "header", "If-Match">;
|
|
302
359
|
acceptLanguage?: OperationParameter<operations["coupons_partial_update"], "header", "Accept-Language">;
|
|
303
360
|
body?: OperationBody<operations["coupons_partial_update"]>;
|
|
304
361
|
request?: RequestControls;
|
|
@@ -306,6 +363,8 @@ interface CouponsUpdateOptions {
|
|
|
306
363
|
type CouponsUpdateResponse = OperationResult<operations["coupons_partial_update"]>;
|
|
307
364
|
interface CouponsDeleteOptions {
|
|
308
365
|
id: OperationParameter<operations["coupons_destroy"], "path", "id">;
|
|
366
|
+
idempotencyKey?: OperationParameter<operations["coupons_destroy"], "header", "Idempotency-Key">;
|
|
367
|
+
ifMatch?: OperationParameter<operations["coupons_destroy"], "header", "If-Match">;
|
|
309
368
|
acceptLanguage?: OperationParameter<operations["coupons_destroy"], "header", "Accept-Language">;
|
|
310
369
|
request?: RequestControls;
|
|
311
370
|
}
|
|
@@ -332,20 +391,36 @@ declare class CouponsResource {
|
|
|
332
391
|
constructor(client: ResourceClient);
|
|
333
392
|
/** List available coupons */
|
|
334
393
|
list(options?: CouponsListOptions): Promise<CouponsListResponse>;
|
|
394
|
+
/** List available coupons; include response metadata. */
|
|
395
|
+
listWithResponse(options?: CouponsListOptions): Promise<ApiResponse<CouponsListResponse>>;
|
|
335
396
|
/** Create a coupon */
|
|
336
397
|
create(options: CouponsCreateOptions): Promise<CouponsCreateResponse>;
|
|
398
|
+
/** Create a coupon; include response metadata. */
|
|
399
|
+
createWithResponse(options: CouponsCreateOptions): Promise<ApiResponse<CouponsCreateResponse>>;
|
|
337
400
|
/** Get a coupon */
|
|
338
401
|
get(options: CouponsGetOptions): Promise<CouponsGetResponse>;
|
|
402
|
+
/** Get a coupon; include response metadata. */
|
|
403
|
+
getWithResponse(options: CouponsGetOptions): Promise<ApiResponse<CouponsGetResponse>>;
|
|
339
404
|
/** Replace a coupon */
|
|
340
405
|
replace(options: CouponsReplaceOptions): Promise<CouponsReplaceResponse>;
|
|
406
|
+
/** Replace a coupon; include response metadata. */
|
|
407
|
+
replaceWithResponse(options: CouponsReplaceOptions): Promise<ApiResponse<CouponsReplaceResponse>>;
|
|
341
408
|
/** Update a coupon */
|
|
342
409
|
update(options: CouponsUpdateOptions): Promise<CouponsUpdateResponse>;
|
|
410
|
+
/** Update a coupon; include response metadata. */
|
|
411
|
+
updateWithResponse(options: CouponsUpdateOptions): Promise<ApiResponse<CouponsUpdateResponse>>;
|
|
343
412
|
/** Delete a coupon */
|
|
344
413
|
delete(options: CouponsDeleteOptions): Promise<CouponsDeleteResponse>;
|
|
414
|
+
/** Delete a coupon; include response metadata. */
|
|
415
|
+
deleteWithResponse(options: CouponsDeleteOptions): Promise<ApiResponse<CouponsDeleteResponse>>;
|
|
345
416
|
/** List coupon redemptions */
|
|
346
417
|
listRedeems(options: CouponsListRedeemsOptions): Promise<CouponsListRedeemsResponse>;
|
|
418
|
+
/** List coupon redemptions; include response metadata. */
|
|
419
|
+
listRedeemsWithResponse(options: CouponsListRedeemsOptions): Promise<ApiResponse<CouponsListRedeemsResponse>>;
|
|
347
420
|
/** Calculate a discounted price */
|
|
348
421
|
calculatePrice(options: CouponsCalculatePriceOptions): Promise<CouponsCalculatePriceResponse>;
|
|
422
|
+
/** Calculate a discounted price; include response metadata. */
|
|
423
|
+
calculatePriceWithResponse(options: CouponsCalculatePriceOptions): Promise<ApiResponse<CouponsCalculatePriceResponse>>;
|
|
349
424
|
}
|
|
350
425
|
interface InvoicesListOptions {
|
|
351
426
|
gateway?: OperationParameter<operations["invoices_list"], "query", "gateway">;
|
|
@@ -364,6 +439,7 @@ interface InvoicesListOptions {
|
|
|
364
439
|
}
|
|
365
440
|
type InvoicesListResponse = OperationResult<operations["invoices_list"]>;
|
|
366
441
|
interface InvoicesCreateOptions {
|
|
442
|
+
idempotencyKey?: OperationParameter<operations["invoices_create"], "header", "Idempotency-Key">;
|
|
367
443
|
acceptLanguage?: OperationParameter<operations["invoices_create"], "header", "Accept-Language">;
|
|
368
444
|
body: OperationBody<operations["invoices_create"]>;
|
|
369
445
|
request?: RequestControls;
|
|
@@ -377,6 +453,8 @@ interface InvoicesGetOptions {
|
|
|
377
453
|
type InvoicesGetResponse = OperationResult<operations["invoices_retrieve"]>;
|
|
378
454
|
interface InvoicesDeleteOptions {
|
|
379
455
|
id: OperationParameter<operations["invoices_destroy"], "path", "id">;
|
|
456
|
+
idempotencyKey?: OperationParameter<operations["invoices_destroy"], "header", "Idempotency-Key">;
|
|
457
|
+
ifMatch?: OperationParameter<operations["invoices_destroy"], "header", "If-Match">;
|
|
380
458
|
acceptLanguage?: OperationParameter<operations["invoices_destroy"], "header", "Accept-Language">;
|
|
381
459
|
request?: RequestControls;
|
|
382
460
|
}
|
|
@@ -398,16 +476,28 @@ declare class InvoicesResource {
|
|
|
398
476
|
constructor(client: ResourceClient);
|
|
399
477
|
/** List invoices */
|
|
400
478
|
list(options?: InvoicesListOptions): Promise<InvoicesListResponse>;
|
|
479
|
+
/** List invoices; include response metadata. */
|
|
480
|
+
listWithResponse(options?: InvoicesListOptions): Promise<ApiResponse<InvoicesListResponse>>;
|
|
401
481
|
/** Create an invoice */
|
|
402
482
|
create(options: InvoicesCreateOptions): Promise<InvoicesCreateResponse>;
|
|
483
|
+
/** Create an invoice; include response metadata. */
|
|
484
|
+
createWithResponse(options: InvoicesCreateOptions): Promise<ApiResponse<InvoicesCreateResponse>>;
|
|
403
485
|
/** Get an invoice */
|
|
404
486
|
get(options: InvoicesGetOptions): Promise<InvoicesGetResponse>;
|
|
487
|
+
/** Get an invoice; include response metadata. */
|
|
488
|
+
getWithResponse(options: InvoicesGetOptions): Promise<ApiResponse<InvoicesGetResponse>>;
|
|
405
489
|
/** Delete an invoice */
|
|
406
490
|
delete(options: InvoicesDeleteOptions): Promise<InvoicesDeleteResponse>;
|
|
491
|
+
/** Delete an invoice; include response metadata. */
|
|
492
|
+
deleteWithResponse(options: InvoicesDeleteOptions): Promise<ApiResponse<InvoicesDeleteResponse>>;
|
|
407
493
|
/** Download an invoice PDF */
|
|
408
494
|
downloadPdf(options: InvoicesDownloadPdfOptions): Promise<InvoicesDownloadPdfResponse>;
|
|
495
|
+
/** Download an invoice PDF; include response metadata. */
|
|
496
|
+
downloadPdfWithResponse(options: InvoicesDownloadPdfOptions): Promise<ApiResponse<InvoicesDownloadPdfResponse>>;
|
|
409
497
|
/** Get an invoice payment link */
|
|
410
498
|
getPaymentLink(options: InvoicesGetPaymentLinkOptions): Promise<InvoicesGetPaymentLinkResponse>;
|
|
499
|
+
/** Get an invoice payment link; include response metadata. */
|
|
500
|
+
getPaymentLinkWithResponse(options: InvoicesGetPaymentLinkOptions): Promise<ApiResponse<InvoicesGetPaymentLinkResponse>>;
|
|
411
501
|
}
|
|
412
502
|
interface LocationsListAsnsOptions {
|
|
413
503
|
code?: OperationParameter<operations["locations_asn_list"], "query", "code">;
|
|
@@ -417,7 +507,7 @@ interface LocationsListAsnsOptions {
|
|
|
417
507
|
name?: OperationParameter<operations["locations_asn_list"], "query", "name">;
|
|
418
508
|
offset?: OperationParameter<operations["locations_asn_list"], "query", "offset">;
|
|
419
509
|
ordering?: OperationParameter<operations["locations_asn_list"], "query", "ordering">;
|
|
420
|
-
packageId
|
|
510
|
+
packageId: OperationParameter<operations["locations_asn_list"], "query", "package_id">;
|
|
421
511
|
search?: OperationParameter<operations["locations_asn_list"], "query", "search">;
|
|
422
512
|
acceptLanguage?: OperationParameter<operations["locations_asn_list"], "header", "Accept-Language">;
|
|
423
513
|
request?: RequestControls;
|
|
@@ -430,7 +520,7 @@ interface LocationsListCitiesOptions {
|
|
|
430
520
|
name?: OperationParameter<operations["locations_cities_list"], "query", "name">;
|
|
431
521
|
offset?: OperationParameter<operations["locations_cities_list"], "query", "offset">;
|
|
432
522
|
ordering?: OperationParameter<operations["locations_cities_list"], "query", "ordering">;
|
|
433
|
-
packageId
|
|
523
|
+
packageId: OperationParameter<operations["locations_cities_list"], "query", "package_id">;
|
|
434
524
|
regionCode?: OperationParameter<operations["locations_cities_list"], "query", "region__code">;
|
|
435
525
|
search?: OperationParameter<operations["locations_cities_list"], "query", "search">;
|
|
436
526
|
acceptLanguage?: OperationParameter<operations["locations_cities_list"], "header", "Accept-Language">;
|
|
@@ -439,6 +529,7 @@ interface LocationsListCitiesOptions {
|
|
|
439
529
|
type LocationsListCitiesResponse = OperationResult<operations["locations_cities_list"]>;
|
|
440
530
|
interface LocationsGetCityOptions {
|
|
441
531
|
id: OperationParameter<operations["locations_cities_retrieve"], "path", "id">;
|
|
532
|
+
packageId: OperationParameter<operations["locations_cities_retrieve"], "query", "package_id">;
|
|
442
533
|
acceptLanguage?: OperationParameter<operations["locations_cities_retrieve"], "header", "Accept-Language">;
|
|
443
534
|
request?: RequestControls;
|
|
444
535
|
}
|
|
@@ -449,7 +540,7 @@ interface LocationsListContinentsOptions {
|
|
|
449
540
|
name?: OperationParameter<operations["locations_continents_list"], "query", "name">;
|
|
450
541
|
offset?: OperationParameter<operations["locations_continents_list"], "query", "offset">;
|
|
451
542
|
ordering?: OperationParameter<operations["locations_continents_list"], "query", "ordering">;
|
|
452
|
-
packageId
|
|
543
|
+
packageId: OperationParameter<operations["locations_continents_list"], "query", "package_id">;
|
|
453
544
|
search?: OperationParameter<operations["locations_continents_list"], "query", "search">;
|
|
454
545
|
acceptLanguage?: OperationParameter<operations["locations_continents_list"], "header", "Accept-Language">;
|
|
455
546
|
request?: RequestControls;
|
|
@@ -457,6 +548,7 @@ interface LocationsListContinentsOptions {
|
|
|
457
548
|
type LocationsListContinentsResponse = OperationResult<operations["locations_continents_list"]>;
|
|
458
549
|
interface LocationsGetContinentOptions {
|
|
459
550
|
id: OperationParameter<operations["locations_continents_retrieve"], "path", "id">;
|
|
551
|
+
packageId: OperationParameter<operations["locations_continents_retrieve"], "query", "package_id">;
|
|
460
552
|
acceptLanguage?: OperationParameter<operations["locations_continents_retrieve"], "header", "Accept-Language">;
|
|
461
553
|
request?: RequestControls;
|
|
462
554
|
}
|
|
@@ -467,7 +559,7 @@ interface LocationsListCountriesOptions {
|
|
|
467
559
|
name?: OperationParameter<operations["locations_countries_list"], "query", "name">;
|
|
468
560
|
offset?: OperationParameter<operations["locations_countries_list"], "query", "offset">;
|
|
469
561
|
ordering?: OperationParameter<operations["locations_countries_list"], "query", "ordering">;
|
|
470
|
-
packageId
|
|
562
|
+
packageId: OperationParameter<operations["locations_countries_list"], "query", "package_id">;
|
|
471
563
|
search?: OperationParameter<operations["locations_countries_list"], "query", "search">;
|
|
472
564
|
acceptLanguage?: OperationParameter<operations["locations_countries_list"], "header", "Accept-Language">;
|
|
473
565
|
request?: RequestControls;
|
|
@@ -475,6 +567,7 @@ interface LocationsListCountriesOptions {
|
|
|
475
567
|
type LocationsListCountriesResponse = OperationResult<operations["locations_countries_list"]>;
|
|
476
568
|
interface LocationsGetCountryOptions {
|
|
477
569
|
id: OperationParameter<operations["locations_countries_retrieve"], "path", "id">;
|
|
570
|
+
packageId: OperationParameter<operations["locations_countries_retrieve"], "query", "package_id">;
|
|
478
571
|
acceptLanguage?: OperationParameter<operations["locations_countries_retrieve"], "header", "Accept-Language">;
|
|
479
572
|
request?: RequestControls;
|
|
480
573
|
}
|
|
@@ -486,7 +579,7 @@ interface LocationsListIspsOptions {
|
|
|
486
579
|
name?: OperationParameter<operations["locations_isps_list"], "query", "name">;
|
|
487
580
|
offset?: OperationParameter<operations["locations_isps_list"], "query", "offset">;
|
|
488
581
|
ordering?: OperationParameter<operations["locations_isps_list"], "query", "ordering">;
|
|
489
|
-
packageId
|
|
582
|
+
packageId: OperationParameter<operations["locations_isps_list"], "query", "package_id">;
|
|
490
583
|
search?: OperationParameter<operations["locations_isps_list"], "query", "search">;
|
|
491
584
|
acceptLanguage?: OperationParameter<operations["locations_isps_list"], "header", "Accept-Language">;
|
|
492
585
|
request?: RequestControls;
|
|
@@ -499,7 +592,7 @@ interface LocationsListRegionsOptions {
|
|
|
499
592
|
name?: OperationParameter<operations["locations_regions_list"], "query", "name">;
|
|
500
593
|
offset?: OperationParameter<operations["locations_regions_list"], "query", "offset">;
|
|
501
594
|
ordering?: OperationParameter<operations["locations_regions_list"], "query", "ordering">;
|
|
502
|
-
packageId
|
|
595
|
+
packageId: OperationParameter<operations["locations_regions_list"], "query", "package_id">;
|
|
503
596
|
search?: OperationParameter<operations["locations_regions_list"], "query", "search">;
|
|
504
597
|
acceptLanguage?: OperationParameter<operations["locations_regions_list"], "header", "Accept-Language">;
|
|
505
598
|
request?: RequestControls;
|
|
@@ -507,6 +600,7 @@ interface LocationsListRegionsOptions {
|
|
|
507
600
|
type LocationsListRegionsResponse = OperationResult<operations["locations_regions_list"]>;
|
|
508
601
|
interface LocationsGetRegionOptions {
|
|
509
602
|
id: OperationParameter<operations["locations_regions_retrieve"], "path", "id">;
|
|
603
|
+
packageId: OperationParameter<operations["locations_regions_retrieve"], "query", "package_id">;
|
|
510
604
|
acceptLanguage?: OperationParameter<operations["locations_regions_retrieve"], "header", "Accept-Language">;
|
|
511
605
|
request?: RequestControls;
|
|
512
606
|
}
|
|
@@ -515,25 +609,45 @@ declare class LocationsResource {
|
|
|
515
609
|
#private;
|
|
516
610
|
constructor(client: ResourceClient);
|
|
517
611
|
/** List available autonomous systems */
|
|
518
|
-
listAsns(options
|
|
612
|
+
listAsns(options: LocationsListAsnsOptions): Promise<LocationsListAsnsResponse>;
|
|
613
|
+
/** List available autonomous systems; include response metadata. */
|
|
614
|
+
listAsnsWithResponse(options: LocationsListAsnsOptions): Promise<ApiResponse<LocationsListAsnsResponse>>;
|
|
519
615
|
/** List available cities */
|
|
520
|
-
listCities(options
|
|
616
|
+
listCities(options: LocationsListCitiesOptions): Promise<LocationsListCitiesResponse>;
|
|
617
|
+
/** List available cities; include response metadata. */
|
|
618
|
+
listCitiesWithResponse(options: LocationsListCitiesOptions): Promise<ApiResponse<LocationsListCitiesResponse>>;
|
|
521
619
|
/** Get a city */
|
|
522
620
|
getCity(options: LocationsGetCityOptions): Promise<LocationsGetCityResponse>;
|
|
621
|
+
/** Get a city; include response metadata. */
|
|
622
|
+
getCityWithResponse(options: LocationsGetCityOptions): Promise<ApiResponse<LocationsGetCityResponse>>;
|
|
523
623
|
/** List available continents */
|
|
524
|
-
listContinents(options
|
|
624
|
+
listContinents(options: LocationsListContinentsOptions): Promise<LocationsListContinentsResponse>;
|
|
625
|
+
/** List available continents; include response metadata. */
|
|
626
|
+
listContinentsWithResponse(options: LocationsListContinentsOptions): Promise<ApiResponse<LocationsListContinentsResponse>>;
|
|
525
627
|
/** Get a continent */
|
|
526
628
|
getContinent(options: LocationsGetContinentOptions): Promise<LocationsGetContinentResponse>;
|
|
629
|
+
/** Get a continent; include response metadata. */
|
|
630
|
+
getContinentWithResponse(options: LocationsGetContinentOptions): Promise<ApiResponse<LocationsGetContinentResponse>>;
|
|
527
631
|
/** List available countries */
|
|
528
|
-
listCountries(options
|
|
632
|
+
listCountries(options: LocationsListCountriesOptions): Promise<LocationsListCountriesResponse>;
|
|
633
|
+
/** List available countries; include response metadata. */
|
|
634
|
+
listCountriesWithResponse(options: LocationsListCountriesOptions): Promise<ApiResponse<LocationsListCountriesResponse>>;
|
|
529
635
|
/** Get a country */
|
|
530
636
|
getCountry(options: LocationsGetCountryOptions): Promise<LocationsGetCountryResponse>;
|
|
637
|
+
/** Get a country; include response metadata. */
|
|
638
|
+
getCountryWithResponse(options: LocationsGetCountryOptions): Promise<ApiResponse<LocationsGetCountryResponse>>;
|
|
531
639
|
/** List available internet service providers */
|
|
532
|
-
listIsps(options
|
|
640
|
+
listIsps(options: LocationsListIspsOptions): Promise<LocationsListIspsResponse>;
|
|
641
|
+
/** List available internet service providers; include response metadata. */
|
|
642
|
+
listIspsWithResponse(options: LocationsListIspsOptions): Promise<ApiResponse<LocationsListIspsResponse>>;
|
|
533
643
|
/** List available regions */
|
|
534
|
-
listRegions(options
|
|
644
|
+
listRegions(options: LocationsListRegionsOptions): Promise<LocationsListRegionsResponse>;
|
|
645
|
+
/** List available regions; include response metadata. */
|
|
646
|
+
listRegionsWithResponse(options: LocationsListRegionsOptions): Promise<ApiResponse<LocationsListRegionsResponse>>;
|
|
535
647
|
/** Get a region */
|
|
536
648
|
getRegion(options: LocationsGetRegionOptions): Promise<LocationsGetRegionResponse>;
|
|
649
|
+
/** Get a region; include response metadata. */
|
|
650
|
+
getRegionWithResponse(options: LocationsGetRegionOptions): Promise<ApiResponse<LocationsGetRegionResponse>>;
|
|
537
651
|
}
|
|
538
652
|
interface NewsListOptions {
|
|
539
653
|
limit?: OperationParameter<operations["news_list"], "query", "limit">;
|
|
@@ -549,6 +663,8 @@ declare class NewsResource {
|
|
|
549
663
|
constructor(client: ResourceClient);
|
|
550
664
|
/** List product announcements */
|
|
551
665
|
list(options?: NewsListOptions): Promise<NewsListResponse>;
|
|
666
|
+
/** List product announcements; include response metadata. */
|
|
667
|
+
listWithResponse(options?: NewsListOptions): Promise<ApiResponse<NewsListResponse>>;
|
|
552
668
|
}
|
|
553
669
|
interface OrdersListOptions {
|
|
554
670
|
limit?: OperationParameter<operations["orders_list"], "query", "limit">;
|
|
@@ -572,6 +688,7 @@ interface OrdersGetOptions {
|
|
|
572
688
|
type OrdersGetResponse = OperationResult<operations["orders_retrieve"]>;
|
|
573
689
|
interface OrdersUpdateAutoRenewalOptions {
|
|
574
690
|
id: OperationParameter<operations["orders_partial_update"], "path", "id">;
|
|
691
|
+
ifMatch?: OperationParameter<operations["orders_partial_update"], "header", "If-Match">;
|
|
575
692
|
acceptLanguage?: OperationParameter<operations["orders_partial_update"], "header", "Accept-Language">;
|
|
576
693
|
body?: OperationBody<operations["orders_partial_update"]>;
|
|
577
694
|
request?: RequestControls;
|
|
@@ -579,6 +696,8 @@ interface OrdersUpdateAutoRenewalOptions {
|
|
|
579
696
|
type OrdersUpdateAutoRenewalResponse = OperationResult<operations["orders_partial_update"]>;
|
|
580
697
|
interface OrdersDeleteOptions {
|
|
581
698
|
id: OperationParameter<operations["orders_destroy"], "path", "id">;
|
|
699
|
+
idempotencyKey?: OperationParameter<operations["orders_destroy"], "header", "Idempotency-Key">;
|
|
700
|
+
ifMatch?: OperationParameter<operations["orders_destroy"], "header", "If-Match">;
|
|
582
701
|
acceptLanguage?: OperationParameter<operations["orders_destroy"], "header", "Accept-Language">;
|
|
583
702
|
request?: RequestControls;
|
|
584
703
|
}
|
|
@@ -594,14 +713,24 @@ declare class OrdersResource {
|
|
|
594
713
|
constructor(client: ResourceClient);
|
|
595
714
|
/** List active orders */
|
|
596
715
|
list(options?: OrdersListOptions): Promise<OrdersListResponse>;
|
|
716
|
+
/** List active orders; include response metadata. */
|
|
717
|
+
listWithResponse(options?: OrdersListOptions): Promise<ApiResponse<OrdersListResponse>>;
|
|
597
718
|
/** Get an order */
|
|
598
719
|
get(options: OrdersGetOptions): Promise<OrdersGetResponse>;
|
|
720
|
+
/** Get an order; include response metadata. */
|
|
721
|
+
getWithResponse(options: OrdersGetOptions): Promise<ApiResponse<OrdersGetResponse>>;
|
|
599
722
|
/** Update order auto-renewal */
|
|
600
723
|
updateAutoRenewal(options: OrdersUpdateAutoRenewalOptions): Promise<OrdersUpdateAutoRenewalResponse>;
|
|
724
|
+
/** Update order auto-renewal; include response metadata. */
|
|
725
|
+
updateAutoRenewalWithResponse(options: OrdersUpdateAutoRenewalOptions): Promise<ApiResponse<OrdersUpdateAutoRenewalResponse>>;
|
|
601
726
|
/** Delete a sub-user order */
|
|
602
727
|
delete(options: OrdersDeleteOptions): Promise<OrdersDeleteResponse>;
|
|
728
|
+
/** Delete a sub-user order; include response metadata. */
|
|
729
|
+
deleteWithResponse(options: OrdersDeleteOptions): Promise<ApiResponse<OrdersDeleteResponse>>;
|
|
603
730
|
/** Reset an order's proxy password */
|
|
604
731
|
resetPassword(options: OrdersResetPasswordOptions): Promise<OrdersResetPasswordResponse>;
|
|
732
|
+
/** Reset an order's proxy password; include response metadata. */
|
|
733
|
+
resetPasswordWithResponse(options: OrdersResetPasswordOptions): Promise<ApiResponse<OrdersResetPasswordResponse>>;
|
|
605
734
|
}
|
|
606
735
|
interface PackagesListOptions {
|
|
607
736
|
alias?: OperationParameter<operations["packages_list"], "query", "alias">;
|
|
@@ -631,8 +760,12 @@ declare class PackagesResource {
|
|
|
631
760
|
constructor(client: ResourceClient);
|
|
632
761
|
/** List available proxy packages */
|
|
633
762
|
list(options?: PackagesListOptions): Promise<PackagesListResponse>;
|
|
763
|
+
/** List available proxy packages; include response metadata. */
|
|
764
|
+
listWithResponse(options?: PackagesListOptions): Promise<ApiResponse<PackagesListResponse>>;
|
|
634
765
|
/** List affiliate package commissions */
|
|
635
766
|
listCommissions(options?: PackagesListCommissionsOptions): Promise<PackagesListCommissionsResponse>;
|
|
767
|
+
/** List affiliate package commissions; include response metadata. */
|
|
768
|
+
listCommissionsWithResponse(options?: PackagesListCommissionsOptions): Promise<ApiResponse<PackagesListCommissionsResponse>>;
|
|
636
769
|
}
|
|
637
770
|
interface ProfileGetOptions {
|
|
638
771
|
acceptLanguage?: OperationParameter<operations["profile_retrieve"], "header", "Accept-Language">;
|
|
@@ -640,12 +773,14 @@ interface ProfileGetOptions {
|
|
|
640
773
|
}
|
|
641
774
|
type ProfileGetResponse = OperationResult<operations["profile_retrieve"]>;
|
|
642
775
|
interface ProfileUpdateOptions {
|
|
776
|
+
ifMatch?: OperationParameter<operations["profile_partial_update"], "header", "If-Match">;
|
|
643
777
|
acceptLanguage?: OperationParameter<operations["profile_partial_update"], "header", "Accept-Language">;
|
|
644
778
|
body?: OperationBody<operations["profile_partial_update"]>;
|
|
645
779
|
request?: RequestControls;
|
|
646
780
|
}
|
|
647
781
|
type ProfileUpdateResponse = OperationResult<operations["profile_partial_update"]>;
|
|
648
782
|
interface ProfileDeleteOptions {
|
|
783
|
+
ifMatch?: OperationParameter<operations["profile_destroy"], "header", "If-Match">;
|
|
649
784
|
acceptLanguage?: OperationParameter<operations["profile_destroy"], "header", "Accept-Language">;
|
|
650
785
|
request?: RequestControls;
|
|
651
786
|
}
|
|
@@ -664,6 +799,7 @@ interface ProfileDisableTwoFactorOptions {
|
|
|
664
799
|
type ProfileDisableTwoFactorResponse = OperationResult<operations["profile_2fa_disable_create"]>;
|
|
665
800
|
interface ProfileSetupTwoFactorOptions {
|
|
666
801
|
acceptLanguage?: OperationParameter<operations["profile_2fa_setup_create"], "header", "Accept-Language">;
|
|
802
|
+
body?: OperationBody<operations["profile_2fa_setup_create"]>;
|
|
667
803
|
request?: RequestControls;
|
|
668
804
|
}
|
|
669
805
|
type ProfileSetupTwoFactorResponse = OperationResult<operations["profile_2fa_setup_create"]>;
|
|
@@ -683,20 +819,36 @@ declare class ProfileResource {
|
|
|
683
819
|
constructor(client: ResourceClient);
|
|
684
820
|
/** Get the current profile */
|
|
685
821
|
get(options?: ProfileGetOptions): Promise<ProfileGetResponse>;
|
|
822
|
+
/** Get the current profile; include response metadata. */
|
|
823
|
+
getWithResponse(options?: ProfileGetOptions): Promise<ApiResponse<ProfileGetResponse>>;
|
|
686
824
|
/** Update the current profile */
|
|
687
825
|
update(options?: ProfileUpdateOptions): Promise<ProfileUpdateResponse>;
|
|
826
|
+
/** Update the current profile; include response metadata. */
|
|
827
|
+
updateWithResponse(options?: ProfileUpdateOptions): Promise<ApiResponse<ProfileUpdateResponse>>;
|
|
688
828
|
/** Delete the current account */
|
|
689
829
|
delete(options?: ProfileDeleteOptions): Promise<ProfileDeleteResponse>;
|
|
690
|
-
/**
|
|
830
|
+
/** Delete the current account; include response metadata. */
|
|
831
|
+
deleteWithResponse(options?: ProfileDeleteOptions): Promise<ApiResponse<ProfileDeleteResponse>>;
|
|
832
|
+
/** Confirm two-factor authentication */
|
|
691
833
|
confirmTwoFactor(options: ProfileConfirmTwoFactorOptions): Promise<ProfileConfirmTwoFactorResponse>;
|
|
834
|
+
/** Confirm two-factor authentication; include response metadata. */
|
|
835
|
+
confirmTwoFactorWithResponse(options: ProfileConfirmTwoFactorOptions): Promise<ApiResponse<ProfileConfirmTwoFactorResponse>>;
|
|
692
836
|
/** Disable two-factor authentication */
|
|
693
837
|
disableTwoFactor(options: ProfileDisableTwoFactorOptions): Promise<ProfileDisableTwoFactorResponse>;
|
|
694
|
-
/**
|
|
838
|
+
/** Disable two-factor authentication; include response metadata. */
|
|
839
|
+
disableTwoFactorWithResponse(options: ProfileDisableTwoFactorOptions): Promise<ApiResponse<ProfileDisableTwoFactorResponse>>;
|
|
840
|
+
/** Prepare two-factor authentication */
|
|
695
841
|
setupTwoFactor(options?: ProfileSetupTwoFactorOptions): Promise<ProfileSetupTwoFactorResponse>;
|
|
842
|
+
/** Prepare two-factor authentication; include response metadata. */
|
|
843
|
+
setupTwoFactorWithResponse(options?: ProfileSetupTwoFactorOptions): Promise<ApiResponse<ProfileSetupTwoFactorResponse>>;
|
|
696
844
|
/** Get two-factor status */
|
|
697
845
|
getTwoFactorStatus(options?: ProfileGetTwoFactorStatusOptions): Promise<ProfileGetTwoFactorStatusResponse>;
|
|
846
|
+
/** Get two-factor status; include response metadata. */
|
|
847
|
+
getTwoFactorStatusWithResponse(options?: ProfileGetTwoFactorStatusOptions): Promise<ApiResponse<ProfileGetTwoFactorStatusResponse>>;
|
|
698
848
|
/** Change the account password */
|
|
699
849
|
changePassword(options: ProfileChangePasswordOptions): Promise<ProfileChangePasswordResponse>;
|
|
850
|
+
/** Change the account password; include response metadata. */
|
|
851
|
+
changePasswordWithResponse(options: ProfileChangePasswordOptions): Promise<ApiResponse<ProfileChangePasswordResponse>>;
|
|
700
852
|
}
|
|
701
853
|
interface ProxiesGenerateOptions {
|
|
702
854
|
acceptLanguage?: OperationParameter<operations["proxies_generate_create"], "header", "Accept-Language">;
|
|
@@ -709,6 +861,8 @@ declare class ProxiesResource {
|
|
|
709
861
|
constructor(client: ResourceClient);
|
|
710
862
|
/** Generate proxy credentials */
|
|
711
863
|
generate(options: ProxiesGenerateOptions): Promise<ProxiesGenerateResponse>;
|
|
864
|
+
/** Generate proxy credentials; include response metadata. */
|
|
865
|
+
generateWithResponse(options: ProxiesGenerateOptions): Promise<ApiResponse<ProxiesGenerateResponse>>;
|
|
712
866
|
}
|
|
713
867
|
interface RewardsListOptions {
|
|
714
868
|
level?: OperationParameter<operations["rewards_list"], "query", "level">;
|
|
@@ -732,27 +886,12 @@ declare class RewardsResource {
|
|
|
732
886
|
constructor(client: ResourceClient);
|
|
733
887
|
/** List account rewards */
|
|
734
888
|
list(options?: RewardsListOptions): Promise<RewardsListResponse>;
|
|
889
|
+
/** List account rewards; include response metadata. */
|
|
890
|
+
listWithResponse(options?: RewardsListOptions): Promise<ApiResponse<RewardsListResponse>>;
|
|
735
891
|
/** Claim available rewards */
|
|
736
892
|
claim(options: RewardsClaimOptions): Promise<RewardsClaimResponse>;
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
acceptLanguage?: OperationParameter<operations["sessions_list"], "header", "Accept-Language">;
|
|
740
|
-
request?: RequestControls;
|
|
741
|
-
}
|
|
742
|
-
type SessionsListResponse = OperationResult<operations["sessions_list"]>;
|
|
743
|
-
interface SessionsDeleteOptions {
|
|
744
|
-
id: OperationParameter<operations["sessions_destroy"], "path", "id">;
|
|
745
|
-
acceptLanguage?: OperationParameter<operations["sessions_destroy"], "header", "Accept-Language">;
|
|
746
|
-
request?: RequestControls;
|
|
747
|
-
}
|
|
748
|
-
type SessionsDeleteResponse = OperationResult<operations["sessions_destroy"]>;
|
|
749
|
-
declare class SessionsResource {
|
|
750
|
-
#private;
|
|
751
|
-
constructor(client: ResourceClient);
|
|
752
|
-
/** List active proxy sessions */
|
|
753
|
-
list(options?: SessionsListOptions): Promise<SessionsListResponse>;
|
|
754
|
-
/** Revoke a proxy session */
|
|
755
|
-
delete(options: SessionsDeleteOptions): Promise<SessionsDeleteResponse>;
|
|
893
|
+
/** Claim available rewards; include response metadata. */
|
|
894
|
+
claimWithResponse(options: RewardsClaimOptions): Promise<ApiResponse<RewardsClaimResponse>>;
|
|
756
895
|
}
|
|
757
896
|
interface SettingsGetOptions {
|
|
758
897
|
acceptLanguage?: OperationParameter<operations["settings_retrieve"], "header", "Accept-Language">;
|
|
@@ -764,6 +903,8 @@ declare class SettingsResource {
|
|
|
764
903
|
constructor(client: ResourceClient);
|
|
765
904
|
/** Get account settings */
|
|
766
905
|
get(options?: SettingsGetOptions): Promise<SettingsGetResponse>;
|
|
906
|
+
/** Get account settings; include response metadata. */
|
|
907
|
+
getWithResponse(options?: SettingsGetOptions): Promise<ApiResponse<SettingsGetResponse>>;
|
|
767
908
|
}
|
|
768
909
|
interface TelegramDashboardGetConnectionOptions {
|
|
769
910
|
acceptLanguage?: OperationParameter<operations["integrations_telegram_connection_retrieve"], "header", "Accept-Language">;
|
|
@@ -791,34 +932,20 @@ declare class TelegramDashboardResource {
|
|
|
791
932
|
constructor(client: ResourceClient);
|
|
792
933
|
/** Get the Telegram dashboard connection */
|
|
793
934
|
getConnection(options?: TelegramDashboardGetConnectionOptions): Promise<TelegramDashboardGetConnectionResponse>;
|
|
935
|
+
/** Get the Telegram dashboard connection; include response metadata. */
|
|
936
|
+
getConnectionWithResponse(options?: TelegramDashboardGetConnectionOptions): Promise<ApiResponse<TelegramDashboardGetConnectionResponse>>;
|
|
794
937
|
/** Update Telegram dashboard preferences */
|
|
795
938
|
updateConnection(options?: TelegramDashboardUpdateConnectionOptions): Promise<TelegramDashboardUpdateConnectionResponse>;
|
|
939
|
+
/** Update Telegram dashboard preferences; include response metadata. */
|
|
940
|
+
updateConnectionWithResponse(options?: TelegramDashboardUpdateConnectionOptions): Promise<ApiResponse<TelegramDashboardUpdateConnectionResponse>>;
|
|
796
941
|
/** Disconnect the Telegram dashboard */
|
|
797
942
|
deleteConnection(options?: TelegramDashboardDeleteConnectionOptions): Promise<TelegramDashboardDeleteConnectionResponse>;
|
|
943
|
+
/** Disconnect the Telegram dashboard; include response metadata. */
|
|
944
|
+
deleteConnectionWithResponse(options?: TelegramDashboardDeleteConnectionOptions): Promise<ApiResponse<TelegramDashboardDeleteConnectionResponse>>;
|
|
798
945
|
/** Create a Telegram account link */
|
|
799
946
|
createLink(options?: TelegramDashboardCreateLinkOptions): Promise<TelegramDashboardCreateLinkResponse>;
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
serviceSecret: OperationParameter<operations["integrations_telegram_link_consume_create"], "header", "X-ProxyRequest-Telegram-Secret">;
|
|
803
|
-
acceptLanguage?: OperationParameter<operations["integrations_telegram_link_consume_create"], "header", "Accept-Language">;
|
|
804
|
-
body: OperationBody<operations["integrations_telegram_link_consume_create"]>;
|
|
805
|
-
request?: RequestControls;
|
|
806
|
-
}
|
|
807
|
-
type TelegramServiceConsumeLinkResponse = OperationResult<operations["integrations_telegram_link_consume_create"]>;
|
|
808
|
-
interface TelegramServiceCreateSessionOptions {
|
|
809
|
-
serviceSecret: OperationParameter<operations["integrations_telegram_session_create"], "header", "X-ProxyRequest-Telegram-Secret">;
|
|
810
|
-
acceptLanguage?: OperationParameter<operations["integrations_telegram_session_create"], "header", "Accept-Language">;
|
|
811
|
-
body: OperationBody<operations["integrations_telegram_session_create"]>;
|
|
812
|
-
request?: RequestControls;
|
|
813
|
-
}
|
|
814
|
-
type TelegramServiceCreateSessionResponse = OperationResult<operations["integrations_telegram_session_create"]>;
|
|
815
|
-
declare class TelegramServiceResource {
|
|
816
|
-
#private;
|
|
817
|
-
constructor(client: ResourceClient);
|
|
818
|
-
/** Consume a Telegram account link */
|
|
819
|
-
consumeLink(options: TelegramServiceConsumeLinkOptions): Promise<TelegramServiceConsumeLinkResponse>;
|
|
820
|
-
/** Create a Telegram API session */
|
|
821
|
-
createSession(options: TelegramServiceCreateSessionOptions): Promise<TelegramServiceCreateSessionResponse>;
|
|
947
|
+
/** Create a Telegram account link; include response metadata. */
|
|
948
|
+
createLinkWithResponse(options?: TelegramDashboardCreateLinkOptions): Promise<ApiResponse<TelegramDashboardCreateLinkResponse>>;
|
|
822
949
|
}
|
|
823
950
|
interface UsersListOptions {
|
|
824
951
|
email?: OperationParameter<operations["users_list"], "query", "email">;
|
|
@@ -834,6 +961,7 @@ interface UsersListOptions {
|
|
|
834
961
|
}
|
|
835
962
|
type UsersListResponse = OperationResult<operations["users_list"]>;
|
|
836
963
|
interface UsersCreateOptions {
|
|
964
|
+
idempotencyKey?: OperationParameter<operations["users_create"], "header", "Idempotency-Key">;
|
|
837
965
|
acceptLanguage?: OperationParameter<operations["users_create"], "header", "Accept-Language">;
|
|
838
966
|
body: OperationBody<operations["users_create"]>;
|
|
839
967
|
request?: RequestControls;
|
|
@@ -847,6 +975,7 @@ interface UsersGetOptions {
|
|
|
847
975
|
type UsersGetResponse = OperationResult<operations["users_retrieve"]>;
|
|
848
976
|
interface UsersUpdateOptions {
|
|
849
977
|
id: OperationParameter<operations["users_partial_update"], "path", "id">;
|
|
978
|
+
ifMatch?: OperationParameter<operations["users_partial_update"], "header", "If-Match">;
|
|
850
979
|
acceptLanguage?: OperationParameter<operations["users_partial_update"], "header", "Accept-Language">;
|
|
851
980
|
body?: OperationBody<operations["users_partial_update"]>;
|
|
852
981
|
request?: RequestControls;
|
|
@@ -854,12 +983,15 @@ interface UsersUpdateOptions {
|
|
|
854
983
|
type UsersUpdateResponse = OperationResult<operations["users_partial_update"]>;
|
|
855
984
|
interface UsersDeleteOptions {
|
|
856
985
|
id: OperationParameter<operations["users_destroy"], "path", "id">;
|
|
986
|
+
idempotencyKey?: OperationParameter<operations["users_destroy"], "header", "Idempotency-Key">;
|
|
987
|
+
ifMatch?: OperationParameter<operations["users_destroy"], "header", "If-Match">;
|
|
857
988
|
acceptLanguage?: OperationParameter<operations["users_destroy"], "header", "Accept-Language">;
|
|
858
989
|
request?: RequestControls;
|
|
859
990
|
}
|
|
860
991
|
type UsersDeleteResponse = OperationResult<operations["users_destroy"]>;
|
|
861
992
|
interface UsersAddDataOptions {
|
|
862
993
|
id: OperationParameter<operations["users_data_add_create"], "path", "id">;
|
|
994
|
+
idempotencyKey?: OperationParameter<operations["users_data_add_create"], "header", "Idempotency-Key">;
|
|
863
995
|
acceptLanguage?: OperationParameter<operations["users_data_add_create"], "header", "Accept-Language">;
|
|
864
996
|
body: OperationBody<operations["users_data_add_create"]>;
|
|
865
997
|
request?: RequestControls;
|
|
@@ -867,11 +999,20 @@ interface UsersAddDataOptions {
|
|
|
867
999
|
type UsersAddDataResponse = OperationResult<operations["users_data_add_create"]>;
|
|
868
1000
|
interface UsersSubtractDataOptions {
|
|
869
1001
|
id: OperationParameter<operations["users_data_subtract_create"], "path", "id">;
|
|
1002
|
+
idempotencyKey?: OperationParameter<operations["users_data_subtract_create"], "header", "Idempotency-Key">;
|
|
870
1003
|
acceptLanguage?: OperationParameter<operations["users_data_subtract_create"], "header", "Accept-Language">;
|
|
871
1004
|
body: OperationBody<operations["users_data_subtract_create"]>;
|
|
872
1005
|
request?: RequestControls;
|
|
873
1006
|
}
|
|
874
1007
|
type UsersSubtractDataResponse = OperationResult<operations["users_data_subtract_create"]>;
|
|
1008
|
+
interface UsersResetDataOptions {
|
|
1009
|
+
id: OperationParameter<operations["users_data_reset_create"], "path", "id">;
|
|
1010
|
+
idempotencyKey?: OperationParameter<operations["users_data_reset_create"], "header", "Idempotency-Key">;
|
|
1011
|
+
acceptLanguage?: OperationParameter<operations["users_data_reset_create"], "header", "Accept-Language">;
|
|
1012
|
+
body: OperationBody<operations["users_data_reset_create"]>;
|
|
1013
|
+
request?: RequestControls;
|
|
1014
|
+
}
|
|
1015
|
+
type UsersResetDataResponse = OperationResult<operations["users_data_reset_create"]>;
|
|
875
1016
|
interface UsersListOrdersOptions {
|
|
876
1017
|
email?: OperationParameter<operations["users_orders_list"], "query", "email">;
|
|
877
1018
|
idPath: OperationParameter<operations["users_orders_list"], "path", "id">;
|
|
@@ -887,7 +1028,7 @@ type UsersListOrdersResponse = OperationResult<operations["users_orders_list"]>;
|
|
|
887
1028
|
interface UsersResetPasswordOptions {
|
|
888
1029
|
id: OperationParameter<operations["users_password_create"], "path", "id">;
|
|
889
1030
|
acceptLanguage?: OperationParameter<operations["users_password_create"], "header", "Accept-Language">;
|
|
890
|
-
body
|
|
1031
|
+
body: OperationBody<operations["users_password_create"]>;
|
|
891
1032
|
request?: RequestControls;
|
|
892
1033
|
}
|
|
893
1034
|
type UsersResetPasswordResponse = OperationResult<operations["users_password_create"]>;
|
|
@@ -896,22 +1037,44 @@ declare class UsersResource {
|
|
|
896
1037
|
constructor(client: ResourceClient);
|
|
897
1038
|
/** List users in the current account */
|
|
898
1039
|
list(options?: UsersListOptions): Promise<UsersListResponse>;
|
|
899
|
-
/**
|
|
1040
|
+
/** List users in the current account; include response metadata. */
|
|
1041
|
+
listWithResponse(options?: UsersListOptions): Promise<ApiResponse<UsersListResponse>>;
|
|
1042
|
+
/** Create a customer account */
|
|
900
1043
|
create(options: UsersCreateOptions): Promise<UsersCreateResponse>;
|
|
1044
|
+
/** Create a customer account; include response metadata. */
|
|
1045
|
+
createWithResponse(options: UsersCreateOptions): Promise<ApiResponse<UsersCreateResponse>>;
|
|
901
1046
|
/** Get a user */
|
|
902
1047
|
get(options: UsersGetOptions): Promise<UsersGetResponse>;
|
|
1048
|
+
/** Get a user; include response metadata. */
|
|
1049
|
+
getWithResponse(options: UsersGetOptions): Promise<ApiResponse<UsersGetResponse>>;
|
|
903
1050
|
/** Update a user */
|
|
904
1051
|
update(options: UsersUpdateOptions): Promise<UsersUpdateResponse>;
|
|
1052
|
+
/** Update a user; include response metadata. */
|
|
1053
|
+
updateWithResponse(options: UsersUpdateOptions): Promise<ApiResponse<UsersUpdateResponse>>;
|
|
905
1054
|
/** Delete a user */
|
|
906
1055
|
delete(options: UsersDeleteOptions): Promise<UsersDeleteResponse>;
|
|
1056
|
+
/** Delete a user; include response metadata. */
|
|
1057
|
+
deleteWithResponse(options: UsersDeleteOptions): Promise<ApiResponse<UsersDeleteResponse>>;
|
|
907
1058
|
/** Add data to a sub-user order */
|
|
908
1059
|
addData(options: UsersAddDataOptions): Promise<UsersAddDataResponse>;
|
|
1060
|
+
/** Add data to a sub-user order; include response metadata. */
|
|
1061
|
+
addDataWithResponse(options: UsersAddDataOptions): Promise<ApiResponse<UsersAddDataResponse>>;
|
|
909
1062
|
/** Subtract data from a sub-user order */
|
|
910
1063
|
subtractData(options: UsersSubtractDataOptions): Promise<UsersSubtractDataResponse>;
|
|
1064
|
+
/** Subtract data from a sub-user order; include response metadata. */
|
|
1065
|
+
subtractDataWithResponse(options: UsersSubtractDataOptions): Promise<ApiResponse<UsersSubtractDataResponse>>;
|
|
1066
|
+
/** Reset a user's remaining data */
|
|
1067
|
+
resetData(options: UsersResetDataOptions): Promise<UsersResetDataResponse>;
|
|
1068
|
+
/** Reset a user's remaining data; include response metadata. */
|
|
1069
|
+
resetDataWithResponse(options: UsersResetDataOptions): Promise<ApiResponse<UsersResetDataResponse>>;
|
|
911
1070
|
/** List a sub-user's orders */
|
|
912
1071
|
listOrders(options: UsersListOrdersOptions): Promise<UsersListOrdersResponse>;
|
|
1072
|
+
/** List a sub-user's orders; include response metadata. */
|
|
1073
|
+
listOrdersWithResponse(options: UsersListOrdersOptions): Promise<ApiResponse<UsersListOrdersResponse>>;
|
|
913
1074
|
/** Rotate a sub-user proxy password */
|
|
914
1075
|
resetPassword(options: UsersResetPasswordOptions): Promise<UsersResetPasswordResponse>;
|
|
1076
|
+
/** Rotate a sub-user proxy password; include response metadata. */
|
|
1077
|
+
resetPasswordWithResponse(options: UsersResetPasswordOptions): Promise<ApiResponse<UsersResetPasswordResponse>>;
|
|
915
1078
|
}
|
|
916
1079
|
interface WebhooksListOptions {
|
|
917
1080
|
limit?: OperationParameter<operations["webhooks_list"], "query", "limit">;
|
|
@@ -921,6 +1084,7 @@ interface WebhooksListOptions {
|
|
|
921
1084
|
}
|
|
922
1085
|
type WebhooksListResponse = OperationResult<operations["webhooks_list"]>;
|
|
923
1086
|
interface WebhooksCreateOptions {
|
|
1087
|
+
idempotencyKey?: OperationParameter<operations["webhooks_create"], "header", "Idempotency-Key">;
|
|
924
1088
|
acceptLanguage?: OperationParameter<operations["webhooks_create"], "header", "Accept-Language">;
|
|
925
1089
|
body: OperationBody<operations["webhooks_create"]>;
|
|
926
1090
|
request?: RequestControls;
|
|
@@ -934,6 +1098,8 @@ interface WebhooksGetOptions {
|
|
|
934
1098
|
type WebhooksGetResponse = OperationResult<operations["webhooks_retrieve"]>;
|
|
935
1099
|
interface WebhooksDeleteOptions {
|
|
936
1100
|
id: OperationParameter<operations["webhooks_destroy"], "path", "id">;
|
|
1101
|
+
idempotencyKey?: OperationParameter<operations["webhooks_destroy"], "header", "Idempotency-Key">;
|
|
1102
|
+
ifMatch?: OperationParameter<operations["webhooks_destroy"], "header", "If-Match">;
|
|
937
1103
|
acceptLanguage?: OperationParameter<operations["webhooks_destroy"], "header", "Accept-Language">;
|
|
938
1104
|
request?: RequestControls;
|
|
939
1105
|
}
|
|
@@ -943,12 +1109,20 @@ declare class WebhooksResource {
|
|
|
943
1109
|
constructor(client: ResourceClient);
|
|
944
1110
|
/** List customer webhooks */
|
|
945
1111
|
list(options?: WebhooksListOptions): Promise<WebhooksListResponse>;
|
|
1112
|
+
/** List customer webhooks; include response metadata. */
|
|
1113
|
+
listWithResponse(options?: WebhooksListOptions): Promise<ApiResponse<WebhooksListResponse>>;
|
|
946
1114
|
/** Create a customer webhook */
|
|
947
1115
|
create(options: WebhooksCreateOptions): Promise<WebhooksCreateResponse>;
|
|
1116
|
+
/** Create a customer webhook; include response metadata. */
|
|
1117
|
+
createWithResponse(options: WebhooksCreateOptions): Promise<ApiResponse<WebhooksCreateResponse>>;
|
|
948
1118
|
/** Get a customer webhook */
|
|
949
1119
|
get(options: WebhooksGetOptions): Promise<WebhooksGetResponse>;
|
|
1120
|
+
/** Get a customer webhook; include response metadata. */
|
|
1121
|
+
getWithResponse(options: WebhooksGetOptions): Promise<ApiResponse<WebhooksGetResponse>>;
|
|
950
1122
|
/** Delete a customer webhook */
|
|
951
1123
|
delete(options: WebhooksDeleteOptions): Promise<WebhooksDeleteResponse>;
|
|
1124
|
+
/** Delete a customer webhook; include response metadata. */
|
|
1125
|
+
deleteWithResponse(options: WebhooksDeleteOptions): Promise<ApiResponse<WebhooksDeleteResponse>>;
|
|
952
1126
|
}
|
|
953
1127
|
interface ResourceCollection {
|
|
954
1128
|
readonly apiKeys: APIKeysResource;
|
|
@@ -964,10 +1138,8 @@ interface ResourceCollection {
|
|
|
964
1138
|
readonly profile: ProfileResource;
|
|
965
1139
|
readonly proxies: ProxiesResource;
|
|
966
1140
|
readonly rewards: RewardsResource;
|
|
967
|
-
readonly sessions: SessionsResource;
|
|
968
1141
|
readonly settings: SettingsResource;
|
|
969
1142
|
readonly telegram: TelegramDashboardResource;
|
|
970
|
-
readonly telegramService: TelegramServiceResource;
|
|
971
1143
|
readonly users: UsersResource;
|
|
972
1144
|
readonly webhooks: WebhooksResource;
|
|
973
1145
|
}
|
|
@@ -993,13 +1165,15 @@ declare function paginate<Item>(pageFetcher: (parameters: PageParameters) => Pro
|
|
|
993
1165
|
//#endregion
|
|
994
1166
|
//#region src/client.d.ts
|
|
995
1167
|
declare const DEFAULT_BASE_URL = "https://api.proxyrequest.com/api/v1";
|
|
996
|
-
declare const SDK_VERSION = "1.0
|
|
1168
|
+
declare const SDK_VERSION = "2.1.0";
|
|
997
1169
|
interface ClientCommonOptions {
|
|
998
1170
|
baseUrl?: string;
|
|
999
1171
|
language?: string;
|
|
1000
1172
|
timeoutMs?: number;
|
|
1001
1173
|
fetch?: typeof globalThis.fetch;
|
|
1002
1174
|
headers?: HeadersInit;
|
|
1175
|
+
/** Automatically protect supported mutations with an Idempotency-Key. */
|
|
1176
|
+
idempotency?: boolean;
|
|
1003
1177
|
}
|
|
1004
1178
|
type ClientOptions = ClientCommonOptions & ({
|
|
1005
1179
|
apiKey: string;
|
|
@@ -1030,27 +1204,27 @@ declare class ProxyRequestClient implements ResourceClient, ResourceCollection {
|
|
|
1030
1204
|
readonly profile: ResourceCollection["profile"];
|
|
1031
1205
|
readonly proxies: ResourceCollection["proxies"];
|
|
1032
1206
|
readonly rewards: ResourceCollection["rewards"];
|
|
1033
|
-
readonly sessions: ResourceCollection["sessions"];
|
|
1034
1207
|
readonly settings: ResourceCollection["settings"];
|
|
1035
1208
|
readonly telegram: ResourceCollection["telegram"];
|
|
1036
|
-
readonly telegramService: ResourceCollection["telegramService"];
|
|
1037
1209
|
readonly users: ResourceCollection["users"];
|
|
1038
1210
|
readonly webhooks: ResourceCollection["webhooks"];
|
|
1039
1211
|
readonly baseUrl: string;
|
|
1040
1212
|
readonly language: string;
|
|
1041
1213
|
readonly timeoutMs: number;
|
|
1214
|
+
readonly idempotency: boolean;
|
|
1042
1215
|
constructor(options?: ClientOptions);
|
|
1043
1216
|
static withApiKey(apiKey: string, options?: ClientCommonOptions): ProxyRequestClient;
|
|
1044
1217
|
static withBearerToken(bearerToken: string, options?: ClientCommonOptions): ProxyRequestClient;
|
|
1045
1218
|
static anonymous(options?: ClientCommonOptions): ProxyRequestClient;
|
|
1046
1219
|
_call<Result>(spec: OperationCallSpec, data?: OperationCallData): Promise<Result>;
|
|
1220
|
+
_callWithResponse<Result>(spec: OperationCallSpec, data?: OperationCallData): Promise<ApiResponse<Result>>;
|
|
1047
1221
|
request(method: string, path: string, options?: RawRequestOptions): Promise<Response>;
|
|
1048
1222
|
paginate<Item>(pageFetcher: (parameters: PageParameters) => Promise<PaginatedPage<Item>>, options?: PaginationOptions): AsyncGenerator<Item, void, undefined>;
|
|
1049
1223
|
downloadInvoicePdf(id: string, request?: RequestControls): Promise<FileDownload>;
|
|
1050
1224
|
}
|
|
1051
1225
|
//#endregion
|
|
1052
1226
|
//#region src/errors.d.ts
|
|
1053
|
-
type ErrorKind = "validation" | "authentication" | "permission" | "not_found" | "conflict" | "rate_limit" | "server" | "network" | "unexpected";
|
|
1227
|
+
type ErrorKind = "validation" | "authentication" | "permission" | "not_found" | "conflict" | "precondition" | "rate_limit" | "server" | "network" | "unexpected";
|
|
1054
1228
|
declare class ProxyRequestError extends Error {
|
|
1055
1229
|
readonly name: string;
|
|
1056
1230
|
}
|
|
@@ -1062,6 +1236,8 @@ interface ApiErrorOptions {
|
|
|
1062
1236
|
requestId?: string;
|
|
1063
1237
|
retryAfter?: number;
|
|
1064
1238
|
contentLanguage?: string;
|
|
1239
|
+
currentEtag?: string;
|
|
1240
|
+
idempotencyKey?: string;
|
|
1065
1241
|
headers?: Record<string, string>;
|
|
1066
1242
|
rawBody?: Uint8Array;
|
|
1067
1243
|
cause?: unknown;
|
|
@@ -1075,6 +1251,8 @@ declare class ApiError extends ProxyRequestError {
|
|
|
1075
1251
|
readonly requestId: string | undefined;
|
|
1076
1252
|
readonly retryAfter: number | undefined;
|
|
1077
1253
|
readonly contentLanguage: string | undefined;
|
|
1254
|
+
readonly currentEtag: string | undefined;
|
|
1255
|
+
readonly idempotencyKey: string | undefined;
|
|
1078
1256
|
readonly headers: Readonly<Record<string, string>>;
|
|
1079
1257
|
readonly rawBody: Uint8Array;
|
|
1080
1258
|
readonly cause: unknown;
|
|
@@ -1083,6 +1261,7 @@ declare class ApiError extends ProxyRequestError {
|
|
|
1083
1261
|
static fromPayload(statusCode: number, rawBody: Uint8Array, headers?: Record<string, string>): ApiError;
|
|
1084
1262
|
static network(cause: unknown): ApiError;
|
|
1085
1263
|
static unexpected(message: string, cause?: unknown): ApiError;
|
|
1264
|
+
withIdempotencyKey(idempotencyKey: string | undefined): ApiError;
|
|
1086
1265
|
}
|
|
1087
1266
|
declare class PaginationError extends ProxyRequestError {
|
|
1088
1267
|
readonly name = "PaginationError";
|
|
@@ -1092,16 +1271,12 @@ declare class InvalidSignatureError extends ProxyRequestError {
|
|
|
1092
1271
|
}
|
|
1093
1272
|
//#endregion
|
|
1094
1273
|
//#region src/webhooks.d.ts
|
|
1095
|
-
interface WebhookVerificationOptions {
|
|
1096
|
-
timestampHeader?: string;
|
|
1097
|
-
tolerance?: number | null;
|
|
1098
|
-
now?: number;
|
|
1099
|
-
}
|
|
1100
1274
|
declare class WebhookVerifier {
|
|
1101
|
-
|
|
1102
|
-
static
|
|
1103
|
-
static
|
|
1275
|
+
/** Verify X-Signature against the exact raw request body. */
|
|
1276
|
+
static verify(rawBody: string | Uint8Array | ArrayBuffer, signature: string, secret: string): Promise<boolean>;
|
|
1277
|
+
static verifyOrThrow(rawBody: string | Uint8Array | ArrayBuffer, signature: string, secret: string): Promise<void>;
|
|
1278
|
+
static decodeVerifiedJson<Payload = Record<string, unknown>>(rawBody: string | Uint8Array | ArrayBuffer, signature: string, secret: string): Promise<Payload>;
|
|
1104
1279
|
}
|
|
1105
1280
|
//#endregion
|
|
1106
|
-
export { type APIKeyCreate, type APIKeyCreateRequest, type APIKeyList, APIKeysCreateOptions, APIKeysCreateResponse, APIKeysDeleteOptions, APIKeysDeleteResponse, APIKeysListOptions, APIKeysListResponse, APIKeysResource, type AddDataRequest, type Affiliate, type AffiliateReward, type AffiliateStatsPoint, type AffiliateStatsResponse, AffiliatesGetRewardsOverallOptions, AffiliatesGetRewardsOverallResponse, AffiliatesListOptions, AffiliatesListResponse, AffiliatesListRewardsOptions, AffiliatesListRewardsResponse, AffiliatesResource, AnalyticsGetConnectionsOptions, AnalyticsGetConnectionsResponse, AnalyticsGetOverallOptions, AnalyticsGetOverallResponse, AnalyticsGetTransactionsOptions, AnalyticsGetTransactionsResponse, AnalyticsListDomainsOptions, AnalyticsListDomainsResponse, AnalyticsListFeedOptions, AnalyticsListFeedResponse, AnalyticsListLogsOptions, AnalyticsListLogsResponse, AnalyticsResource, ApiError, type ApiErrorOptions, AuthorizationLoginOptions, AuthorizationLoginResponse, AuthorizationLoginWithGoogleOptions, AuthorizationLoginWithGoogleResponse, AuthorizationRecoverPasswordOptions, AuthorizationRecoverPasswordResponse, AuthorizationRefreshOptions, AuthorizationRefreshResponse, AuthorizationResource, AuthorizationSignupOptions, AuthorizationSignupResponse, type ChangePasswordRequest, type City, ProxyRequestClient as Client, ProxyRequestClient, type ClientCommonOptions, type ClientOptions, type CommissionTypeEnum, type ConnectionRecord, type ConnectionsResponse, type Continent, type Country, type Coupon, type CouponCalculatePriceRequest, type CouponCreateRequest, type CouponPriceResponse, type CouponRedeem, type CouponShort, type CouponTypeEnum, type CouponUpdateRequest, CouponsCalculatePriceOptions, CouponsCalculatePriceResponse, CouponsCreateOptions, CouponsCreateResponse, CouponsDeleteOptions, CouponsDeleteResponse, CouponsGetOptions, CouponsGetResponse, CouponsListOptions, CouponsListRedeemsOptions, CouponsListRedeemsResponse, CouponsListResponse, CouponsReplaceOptions, CouponsReplaceResponse, CouponsResource, CouponsUpdateOptions, CouponsUpdateResponse, DEFAULT_BASE_URL, type DomainRecord, type DomainsResponse, type EnabledResponse, type ErrorKind, type FeedRecord, type FeedResponse, FileDownload, type GenerateProxyRequest, type GenerateProxyResponse, type GeneratedProxy, type GoogleAuthRequest, type ISP, InvalidSignatureError, type Invoice, type InvoiceCreateRequestGatewayEnum, type InvoiceCreateRequestRequest, type InvoiceGatewayEnum, type InvoiceStatusEnum, type InvoiceTypeEnum, InvoicesCreateOptions, InvoicesCreateResponse, InvoicesDeleteOptions, InvoicesDeleteResponse, InvoicesDownloadPdfOptions, InvoicesDownloadPdfResponse, InvoicesGetOptions, InvoicesGetPaymentLinkOptions, InvoicesGetPaymentLinkResponse, InvoicesGetResponse, InvoicesListOptions, InvoicesListResponse, InvoicesResource, type LanguageEnum, type LevelEnum, type LocationASNGeoItem, type LocationASNRecord, type LocationCodeName, type LocationCountrySummary, type LocationRegionSummary, LocationsGetCityOptions, LocationsGetCityResponse, LocationsGetContinentOptions, LocationsGetContinentResponse, LocationsGetCountryOptions, LocationsGetCountryResponse, LocationsGetRegionOptions, LocationsGetRegionResponse, LocationsListAsnsOptions, LocationsListAsnsResponse, LocationsListCitiesOptions, LocationsListCitiesResponse, LocationsListContinentsOptions, LocationsListContinentsResponse, LocationsListCountriesOptions, LocationsListCountriesResponse, LocationsListIspsOptions, LocationsListIspsResponse, LocationsListRegionsOptions, LocationsListRegionsResponse, LocationsResource, type LogRecord, type LoginRequestRequest, type LogsResponse, type MessageResponse, type News, NewsListOptions, NewsListResponse, NewsResource, type Order, type OrderDetailed, OrdersDeleteOptions, OrdersDeleteResponse, OrdersGetOptions, OrdersGetResponse, OrdersListOptions, OrdersListResponse, OrdersResetPasswordOptions, OrdersResetPasswordResponse, OrdersResource, OrdersUpdateAutoRenewalOptions, OrdersUpdateAutoRenewalResponse, type OverallPoint, type OverallResponse, type Package, type PackageCommission, type PackageShort, PackagesListCommissionsOptions, PackagesListCommissionsResponse, PackagesListOptions, PackagesListResponse, PackagesResource, type PageParameters, type PaginatedAPIKeyListList, type PaginatedAffiliateList, type PaginatedAffiliateRewardList, type PaginatedCityList, type PaginatedContinentList, type PaginatedCountryList, type PaginatedCouponRedeemList, type PaginatedCouponShortList, type PaginatedISPList, type
|
|
1281
|
+
export { type APIKeyCreate, type APIKeyCreateRequest, type APIKeyList, APIKeysCreateOptions, APIKeysCreateResponse, APIKeysDeleteOptions, APIKeysDeleteResponse, APIKeysListOptions, APIKeysListResponse, APIKeysResource, type AddDataRequest, type Affiliate, type AffiliateReward, type AffiliateStatsPoint, type AffiliateStatsResponse, AffiliatesGetRewardsOverallOptions, AffiliatesGetRewardsOverallResponse, AffiliatesListOptions, AffiliatesListResponse, AffiliatesListRewardsOptions, AffiliatesListRewardsResponse, AffiliatesResource, AnalyticsGetConnectionsOptions, AnalyticsGetConnectionsResponse, AnalyticsGetOverallOptions, AnalyticsGetOverallResponse, AnalyticsGetTransactionsOptions, AnalyticsGetTransactionsResponse, AnalyticsListDomainsOptions, AnalyticsListDomainsResponse, AnalyticsListFeedOptions, AnalyticsListFeedResponse, AnalyticsListLogsOptions, AnalyticsListLogsResponse, AnalyticsResource, ApiError, type ApiErrorOptions, type ApiResponse, AuthorizationLoginOptions, AuthorizationLoginResponse, AuthorizationLoginWithGoogleOptions, AuthorizationLoginWithGoogleResponse, AuthorizationRecoverPasswordOptions, AuthorizationRecoverPasswordResponse, AuthorizationRefreshOptions, AuthorizationRefreshResponse, AuthorizationResource, AuthorizationSignupOptions, AuthorizationSignupResponse, AuthorizationVerifyOtpOptions, AuthorizationVerifyOtpResponse, type ChangePasswordRequest, type CheckoutStatusEnum, type City, ProxyRequestClient as Client, ProxyRequestClient, type ClientCommonOptions, type ClientOptions, type CommissionTypeEnum, type ConnectionRecord, type ConnectionsResponse, type Continent, type Country, type Coupon, type CouponCalculatePriceRequest, type CouponCreateRequest, type CouponPriceResponse, type CouponRedeem, type CouponShort, type CouponTypeEnum, type CouponUpdateRequest, CouponsCalculatePriceOptions, CouponsCalculatePriceResponse, CouponsCreateOptions, CouponsCreateResponse, CouponsDeleteOptions, CouponsDeleteResponse, CouponsGetOptions, CouponsGetResponse, CouponsListOptions, CouponsListRedeemsOptions, CouponsListRedeemsResponse, CouponsListResponse, CouponsReplaceOptions, CouponsReplaceResponse, CouponsResource, CouponsUpdateOptions, CouponsUpdateResponse, DEFAULT_BASE_URL, type DomainRecord, type DomainsResponse, type EnabledResponse, type ErrorKind, type FeedRecord, type FeedResponse, FileDownload, type GenerateProxyRequest, type GenerateProxyResponse, type GeneratedProxy, type GoogleAuthRequest, type ISP, InvalidSignatureError, type Invoice, type InvoiceCreateRequestGatewayEnum, type InvoiceCreateRequestRequest, type InvoiceCreateRequestStatusEnum, type InvoiceGatewayEnum, type InvoiceRead, type InvoiceShort, type InvoiceStatusEnum, type InvoiceTypeEnum, InvoicesCreateOptions, InvoicesCreateResponse, InvoicesDeleteOptions, InvoicesDeleteResponse, InvoicesDownloadPdfOptions, InvoicesDownloadPdfResponse, InvoicesGetOptions, InvoicesGetPaymentLinkOptions, InvoicesGetPaymentLinkResponse, InvoicesGetResponse, InvoicesListOptions, InvoicesListResponse, InvoicesResource, type LanguageEnum, type LevelEnum, type LocationASNGeoItem, type LocationASNRecord, type LocationCodeName, type LocationCountrySummary, type LocationRegionSummary, LocationsGetCityOptions, LocationsGetCityResponse, LocationsGetContinentOptions, LocationsGetContinentResponse, LocationsGetCountryOptions, LocationsGetCountryResponse, LocationsGetRegionOptions, LocationsGetRegionResponse, LocationsListAsnsOptions, LocationsListAsnsResponse, LocationsListCitiesOptions, LocationsListCitiesResponse, LocationsListContinentsOptions, LocationsListContinentsResponse, LocationsListCountriesOptions, LocationsListCountriesResponse, LocationsListIspsOptions, LocationsListIspsResponse, LocationsListRegionsOptions, LocationsListRegionsResponse, LocationsResource, type LogRecord, type LoginRequestRequest, type LogsResponse, type MessageResponse, type News, NewsListOptions, NewsListResponse, NewsResource, type OTPChallenge, type Order, type OrderDetailed, OrdersDeleteOptions, OrdersDeleteResponse, OrdersGetOptions, OrdersGetResponse, OrdersListOptions, OrdersListResponse, OrdersResetPasswordOptions, OrdersResetPasswordResponse, OrdersResource, OrdersUpdateAutoRenewalOptions, OrdersUpdateAutoRenewalResponse, type OverallPoint, type OverallResponse, type Package, type PackageCommission, type PackageShort, PackagesListCommissionsOptions, PackagesListCommissionsResponse, PackagesListOptions, PackagesListResponse, PackagesResource, type PageParameters, type PaginatedAPIKeyListList, type PaginatedAffiliateList, type PaginatedAffiliateRewardList, type PaginatedCityList, type PaginatedContinentList, type PaginatedCountryList, type PaginatedCouponRedeemList, type PaginatedCouponShortList, type PaginatedISPList, type PaginatedInvoiceReadList, type PaginatedLocationASNRecordList, type PaginatedNewsList, type PaginatedOrderList, type PaginatedPackageCommissionList, type PaginatedPackageList, type PaginatedPage, type PaginatedRegionList, type PaginatedRewardList, type PaginatedUserList, type PaginatedWebhookListList, PaginationError, type PaginationOptions, type PasswordRecoveryResponse, type PatchedCouponUpdateRequest, type PatchedOrderAutoRenewalRequest, type PatchedProfileUpdateRequest, type PatchedTelegramConnectionUpdateRequest, type PatchedUserUpdateRequest, type PaymentGateway, type PaymentLinkResponse, type PricingEnum, type PricingUnitEnum, ProfileChangePasswordOptions, ProfileChangePasswordResponse, ProfileConfirmTwoFactorOptions, ProfileConfirmTwoFactorResponse, ProfileDeleteOptions, ProfileDeleteResponse, ProfileDisableTwoFactorOptions, ProfileDisableTwoFactorResponse, ProfileGetOptions, ProfileGetResponse, ProfileGetTwoFactorStatusOptions, ProfileGetTwoFactorStatusResponse, ProfileResource, ProfileSetupTwoFactorOptions, ProfileSetupTwoFactorResponse, ProfileUpdateOptions, ProfileUpdateResponse, type ProtocolEnum, ProxiesGenerateOptions, ProxiesGenerateResponse, ProxiesResource, type ProxyGenerationConnectionRequest, type ProxyGenerationSessionRequest, type ProxyGenerationTargetingRequest, type ProxyPasswordResetResponse, ProxyRequestError, type ProxyTypeEnum, type RawRequestOptions, type RecoverPasswordRequest, type Region, type RequestControls, type ResetDataRequest, type ResetPasswordRequest, ResourceCollection, type Reward, type RewardClaimRequestRequest, type RewardStatusEnum, RewardsClaimOptions, RewardsClaimResponse, RewardsListOptions, RewardsListResponse, RewardsResource, SDK_VERSION, type SettingsCrypto, type SettingsGateway, SettingsGetOptions, SettingsGetResponse, type SettingsReferral, SettingsResource, type SettingsResponse, type SignUpRequest, type SubtractDataRequest, type TargetingOptions, type TelegramConnectionResponse, TelegramDashboardCreateLinkOptions, TelegramDashboardCreateLinkResponse, TelegramDashboardDeleteConnectionOptions, TelegramDashboardDeleteConnectionResponse, TelegramDashboardGetConnectionOptions, TelegramDashboardGetConnectionResponse, TelegramDashboardResource, TelegramDashboardUpdateConnectionOptions, TelegramDashboardUpdateConnectionResponse, type TelegramLinkResponse, type TokenPairResponse, type TokenRefreshRequestRequest, type TokenRefreshResponse, type TransactionRecord, type TransactionsResponse, type TwoFactorConfirmRequest, type TwoFactorDisableRequest, type TwoFactorSetupRequestRequest, type TwoFactorSetupResponse, type User, type UserCreateRequest, type UserPasswordResetRequestRequest, UsersAddDataOptions, UsersAddDataResponse, UsersCreateOptions, UsersCreateResponse, UsersDeleteOptions, UsersDeleteResponse, UsersGetOptions, UsersGetResponse, UsersListOptions, UsersListOrdersOptions, UsersListOrdersResponse, UsersListResponse, UsersResetDataOptions, UsersResetDataResponse, UsersResetPasswordOptions, UsersResetPasswordResponse, UsersResource, UsersSubtractDataOptions, UsersSubtractDataResponse, UsersUpdateOptions, UsersUpdateResponse, type VerifyOTPRequest, type WebhookCreateRequest, type WebhookCreated, type WebhookList, type WebhookScopeEnum, WebhookVerifier, WebhooksCreateOptions, WebhooksCreateResponse, WebhooksDeleteOptions, WebhooksDeleteResponse, WebhooksGetOptions, WebhooksGetResponse, WebhooksListOptions, WebhooksListResponse, WebhooksResource, createResourceCollection, paginate };
|
|
1107
1282
|
//# sourceMappingURL=index.d.ts.map
|