tremendous 3.3.0 → 3.4.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/README.md +2 -2
- package/dist/api.d.ts +1933 -715
- package/dist/api.js +1013 -53
- package/package.json +1 -1
package/dist/api.js
CHANGED
|
@@ -22,39 +22,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.WebhooksApi = exports.WebhooksApiFactory = exports.WebhooksApiFp = exports.WebhooksApiAxiosParamCreator = exports.RolesApi = exports.RolesApiFactory = exports.RolesApiFp = void 0;
|
|
25
|
+
exports.MemberWithEventsStatusEnum = exports.MemberBaseStatusEnum = exports.MemberStatusEnum = exports.ListRewards200ResponseRewardsInnerValueCurrencyCodeEnum = exports.ListRewards200ResponseRewardsInnerDeliveryStatusEnum = exports.ListRewards200ResponseRewardsInnerDeliveryMethodEnum = exports.ListProductsResponseProductsInnerImagesInnerTypeEnum = exports.ListProductsResponseProductsInnerCurrencyCodesEnum = exports.ListProductsResponseProductsInnerCategoryEnum = exports.ListOrganizations200ResponseOrganizationsInnerStatusEnum = exports.ListOrders200ResponseOrdersInnerPaymentChannelEnum = exports.ListOrders200ResponseOrdersInnerStatusEnum = exports.ListMembers200ResponseMembersInnerStatusEnum = exports.ListInvoices200ResponseInvoicesInnerStatusEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum = exports.ListFundingSources200ResponseFundingSourcesInnerTypeEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMethodEnum = exports.ListFraudRules200ResponseFraudRulesInnerRuleTypeEnum = exports.ListFraudReviews200ResponseFraudReviewsInnerReasonsEnum = exports.ListFraudReviews200ResponseFraudReviewsInnerStatusEnum = exports.InvoiceStatusEnum = exports.GetMember200ResponseMemberEventsInnerTypeEnum = exports.GetMember200ResponseMemberStatusEnum = exports.GetFraudReview200ResponseFraudReviewRedemptionMethodEnum = exports.GetFraudReview200ResponseFraudReviewReasonsEnum = exports.GetFraudReview200ResponseFraudReviewStatusEnum = exports.FundingSourceTypeEnum = exports.FundingSourceMethodEnum = exports.FraudRulesListItemRuleTypeEnum = exports.FraudRuleType = exports.FraudRuleRequestConfigPeriodEnum = exports.FraudRuleRequestConfigTypeEnum = exports.FraudReviewStatus = exports.FraudReviewRedemptionMethod = exports.FraudReviewReason = exports.FraudReviewListItemReasonsEnum = exports.FraudReviewListItemStatusEnum = exports.FraudReviewRedemptionMethodEnum = exports.FraudReviewReasonsEnum = exports.FraudReviewStatusEnum = exports.FraudConfigRedeemedRewardsCountPeriodEnum = exports.FraudConfigRedeemedRewardsAmountPeriodEnum = exports.FraudConfigCountryTypeEnum = exports.DeliveryStatus = exports.DeliveryMethod = exports.DeliveryDetailsStatusEnum = exports.DeliveryDetailsMethodEnum = exports.CurrencyCodes = exports.CreateOrganization200ResponseOrganizationStatusEnum = void 0;
|
|
26
|
+
exports.FundingSourcesApiFactory = exports.FundingSourcesApiFp = exports.FundingSourcesApiAxiosParamCreator = exports.UpdateFraudRuleListRuleTypeEnum = exports.FraudRuleRuleTypeEnum = exports.DeleteFraudRuleRuleTypeEnum = exports.FraudRulesApi = exports.FraudRulesApiFactory = exports.FraudRulesApiFp = exports.FraudRulesApiAxiosParamCreator = exports.ListFraudReviewsStatusEnum = exports.FraudReviewsApi = exports.FraudReviewsApiFactory = exports.FraudReviewsApiFp = exports.FraudReviewsApiAxiosParamCreator = exports.ForexApi = exports.ForexApiFactory = exports.ForexApiFp = exports.ForexApiAxiosParamCreator = exports.FieldsApi = exports.FieldsApiFactory = exports.FieldsApiFp = exports.FieldsApiAxiosParamCreator = exports.CampaignsApi = exports.CampaignsApiFactory = exports.CampaignsApiFp = exports.CampaignsApiAxiosParamCreator = exports.BalanceTransactionsApi = exports.BalanceTransactionsApiFactory = exports.BalanceTransactionsApiFp = exports.BalanceTransactionsApiAxiosParamCreator = exports.UpdateFraudRuleListRequestOperationEnum = exports.SingleRewardOrderWithoutLinkOrderStatusEnum = exports.SingleRewardOrder1RewardDeliveryMethodEnum = exports.RewardWithoutLinkDeliveryStatusEnum = exports.RewardWithoutLinkDeliveryMethodEnum = exports.RewardValueCurrencyCodeEnum = exports.ReviewRedeemedRewardsCountPeriodEnum = exports.ReviewRedeemedRewardsAmountPeriodEnum = exports.ReviewCountryTypeEnum = exports.ProductCurrencyCodesEnum = exports.ProductCategoryEnum = exports.PaymentDetailsChannelEnum = exports.OrganizationStatusEnum = exports.OrderWithoutLinkStatusEnum = exports.OrderStatus = exports.OrderBasePaymentChannelEnum = exports.OrderBaseStatusEnum = exports.OrderStatusEnum = exports.MemberWithoutEventsStatusEnum = void 0;
|
|
27
|
+
exports.WebhooksApi = exports.WebhooksApiFactory = exports.WebhooksApiFp = exports.WebhooksApiAxiosParamCreator = exports.RolesApi = exports.RolesApiFactory = exports.RolesApiFp = exports.RolesApiAxiosParamCreator = exports.RewardsApi = exports.RewardsApiFactory = exports.RewardsApiFp = exports.RewardsApiAxiosParamCreator = exports.PublicKeysApi = exports.PublicKeysApiFactory = exports.PublicKeysApiFp = exports.PublicKeysApiAxiosParamCreator = exports.ProductsApi = exports.ProductsApiFactory = exports.ProductsApiFp = exports.ProductsApiAxiosParamCreator = exports.OrganizationsApi = exports.OrganizationsApiFactory = exports.OrganizationsApiFp = exports.OrganizationsApiAxiosParamCreator = exports.OrdersApi = exports.OrdersApiFactory = exports.OrdersApiFp = exports.OrdersApiAxiosParamCreator = exports.MembersApi = exports.MembersApiFactory = exports.MembersApiFp = exports.MembersApiAxiosParamCreator = exports.InvoicesApi = exports.InvoicesApiFactory = exports.InvoicesApiFp = exports.InvoicesApiAxiosParamCreator = exports.FundingSourcesApi = void 0;
|
|
28
28
|
const axios_1 = require("axios");
|
|
29
29
|
// Some imports not used depending on template conditions
|
|
30
30
|
// @ts-ignore
|
|
31
31
|
const common_1 = require("./common");
|
|
32
32
|
// @ts-ignore
|
|
33
33
|
const base_1 = require("./base");
|
|
34
|
-
exports.CreateOrder200ResponseOrderStatusEnum = {
|
|
35
|
-
Canceled: 'CANCELED',
|
|
36
|
-
Cart: 'CART',
|
|
37
|
-
Executed: 'EXECUTED',
|
|
38
|
-
Failed: 'FAILED',
|
|
39
|
-
PendingApproval: 'PENDING APPROVAL',
|
|
40
|
-
PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL'
|
|
41
|
-
};
|
|
42
|
-
exports.CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum = {
|
|
43
|
-
Email: 'EMAIL',
|
|
44
|
-
Link: 'LINK',
|
|
45
|
-
Phone: 'PHONE'
|
|
46
|
-
};
|
|
47
|
-
exports.CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum = {
|
|
48
|
-
Scheduled: 'SCHEDULED',
|
|
49
|
-
Failed: 'FAILED',
|
|
50
|
-
Succeeded: 'SUCCEEDED',
|
|
51
|
-
Pending: 'PENDING'
|
|
52
|
-
};
|
|
53
|
-
exports.CreateOrderRequestRewardDeliveryMethodEnum = {
|
|
54
|
-
Email: 'EMAIL',
|
|
55
|
-
Link: 'LINK',
|
|
56
|
-
Phone: 'PHONE'
|
|
57
|
-
};
|
|
58
34
|
exports.CreateOrganization200ResponseOrganizationStatusEnum = {
|
|
59
35
|
Pending: 'PENDING',
|
|
60
36
|
Approved: 'APPROVED',
|
|
@@ -194,17 +170,6 @@ exports.DeliveryDetailsStatusEnum = {
|
|
|
194
170
|
Succeeded: 'SUCCEEDED',
|
|
195
171
|
Pending: 'PENDING'
|
|
196
172
|
};
|
|
197
|
-
exports.DeliveryDetailsWithLinkMethodEnum = {
|
|
198
|
-
Email: 'EMAIL',
|
|
199
|
-
Link: 'LINK',
|
|
200
|
-
Phone: 'PHONE'
|
|
201
|
-
};
|
|
202
|
-
exports.DeliveryDetailsWithLinkStatusEnum = {
|
|
203
|
-
Scheduled: 'SCHEDULED',
|
|
204
|
-
Failed: 'FAILED',
|
|
205
|
-
Succeeded: 'SUCCEEDED',
|
|
206
|
-
Pending: 'PENDING'
|
|
207
|
-
};
|
|
208
173
|
/**
|
|
209
174
|
* How to deliver the reward to the recipient. <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be delivered to the recipient out-of-band.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table>
|
|
210
175
|
* @export
|
|
@@ -226,6 +191,181 @@ exports.DeliveryStatus = {
|
|
|
226
191
|
Succeeded: 'SUCCEEDED',
|
|
227
192
|
Pending: 'PENDING'
|
|
228
193
|
};
|
|
194
|
+
exports.FraudConfigCountryTypeEnum = {
|
|
195
|
+
Whitelist: 'whitelist',
|
|
196
|
+
Blacklist: 'blacklist'
|
|
197
|
+
};
|
|
198
|
+
exports.FraudConfigRedeemedRewardsAmountPeriodEnum = {
|
|
199
|
+
_7: '7',
|
|
200
|
+
_30: '30',
|
|
201
|
+
_90: '90',
|
|
202
|
+
_120: '120',
|
|
203
|
+
_365: '365',
|
|
204
|
+
AllTime: 'all_time'
|
|
205
|
+
};
|
|
206
|
+
exports.FraudConfigRedeemedRewardsCountPeriodEnum = {
|
|
207
|
+
_7: '7',
|
|
208
|
+
_30: '30',
|
|
209
|
+
_90: '90',
|
|
210
|
+
_120: '120',
|
|
211
|
+
_365: '365',
|
|
212
|
+
AllTime: 'all_time'
|
|
213
|
+
};
|
|
214
|
+
exports.FraudReviewStatusEnum = {
|
|
215
|
+
Flagged: 'flagged',
|
|
216
|
+
Blocked: 'blocked',
|
|
217
|
+
Released: 'released'
|
|
218
|
+
};
|
|
219
|
+
exports.FraudReviewReasonsEnum = {
|
|
220
|
+
DisallowedIp: 'Disallowed IP',
|
|
221
|
+
DisallowedEmail: 'Disallowed email',
|
|
222
|
+
DisallowedCountry: 'Disallowed country',
|
|
223
|
+
OverRewardDollarLimit: 'Over reward dollar limit',
|
|
224
|
+
OverRewardCountLimit: 'Over reward count limit',
|
|
225
|
+
VpnDetected: 'VPN detected',
|
|
226
|
+
DeviceRelatedToMultipleEmails: 'Device related to multiple emails',
|
|
227
|
+
DeviceOrAccountRelatedToMultipleEmails: 'Device or account related to multiple emails',
|
|
228
|
+
IpOnATremendousFraudList: 'IP on a Tremendous fraud list',
|
|
229
|
+
BankAccountOnATremendousFraudList: 'Bank account on a Tremendous fraud list',
|
|
230
|
+
FingerprintOnATremendousFraudList: 'Fingerprint on a Tremendous fraud list',
|
|
231
|
+
EmailOnATremendousFraudList: 'Email on a Tremendous fraud list',
|
|
232
|
+
PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list',
|
|
233
|
+
IpRelatedToABlockedReward: 'IP related to a blocked reward',
|
|
234
|
+
BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward',
|
|
235
|
+
FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward',
|
|
236
|
+
EmailRelatedToABlockedReward: 'Email related to a blocked reward',
|
|
237
|
+
PhoneRelatedToABlockedReward: 'Phone related to a blocked reward',
|
|
238
|
+
AllowedIp: 'Allowed IP',
|
|
239
|
+
AllowedEmail: 'Allowed email'
|
|
240
|
+
};
|
|
241
|
+
exports.FraudReviewRedemptionMethodEnum = {
|
|
242
|
+
Paypal: 'paypal',
|
|
243
|
+
Bank: 'bank',
|
|
244
|
+
MerchantCard: 'merchant card',
|
|
245
|
+
VisaCard: 'visa card',
|
|
246
|
+
Charity: 'charity',
|
|
247
|
+
Venmo: 'venmo'
|
|
248
|
+
};
|
|
249
|
+
exports.FraudReviewListItemStatusEnum = {
|
|
250
|
+
Flagged: 'flagged',
|
|
251
|
+
Blocked: 'blocked',
|
|
252
|
+
Released: 'released'
|
|
253
|
+
};
|
|
254
|
+
exports.FraudReviewListItemReasonsEnum = {
|
|
255
|
+
DisallowedIp: 'Disallowed IP',
|
|
256
|
+
DisallowedEmail: 'Disallowed email',
|
|
257
|
+
DisallowedCountry: 'Disallowed country',
|
|
258
|
+
OverRewardDollarLimit: 'Over reward dollar limit',
|
|
259
|
+
OverRewardCountLimit: 'Over reward count limit',
|
|
260
|
+
VpnDetected: 'VPN detected',
|
|
261
|
+
DeviceRelatedToMultipleEmails: 'Device related to multiple emails',
|
|
262
|
+
DeviceOrAccountRelatedToMultipleEmails: 'Device or account related to multiple emails',
|
|
263
|
+
IpOnATremendousFraudList: 'IP on a Tremendous fraud list',
|
|
264
|
+
BankAccountOnATremendousFraudList: 'Bank account on a Tremendous fraud list',
|
|
265
|
+
FingerprintOnATremendousFraudList: 'Fingerprint on a Tremendous fraud list',
|
|
266
|
+
EmailOnATremendousFraudList: 'Email on a Tremendous fraud list',
|
|
267
|
+
PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list',
|
|
268
|
+
IpRelatedToABlockedReward: 'IP related to a blocked reward',
|
|
269
|
+
BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward',
|
|
270
|
+
FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward',
|
|
271
|
+
EmailRelatedToABlockedReward: 'Email related to a blocked reward',
|
|
272
|
+
PhoneRelatedToABlockedReward: 'Phone related to a blocked reward',
|
|
273
|
+
AllowedIp: 'Allowed IP',
|
|
274
|
+
AllowedEmail: 'Allowed email'
|
|
275
|
+
};
|
|
276
|
+
/**
|
|
277
|
+
*
|
|
278
|
+
* @export
|
|
279
|
+
* @enum {string}
|
|
280
|
+
*/
|
|
281
|
+
exports.FraudReviewReason = {
|
|
282
|
+
DisallowedIp: 'Disallowed IP',
|
|
283
|
+
DisallowedEmail: 'Disallowed email',
|
|
284
|
+
DisallowedCountry: 'Disallowed country',
|
|
285
|
+
OverRewardDollarLimit: 'Over reward dollar limit',
|
|
286
|
+
OverRewardCountLimit: 'Over reward count limit',
|
|
287
|
+
VpnDetected: 'VPN detected',
|
|
288
|
+
DeviceRelatedToMultipleEmails: 'Device related to multiple emails',
|
|
289
|
+
DeviceOrAccountRelatedToMultipleEmails: 'Device or account related to multiple emails',
|
|
290
|
+
IpOnATremendousFraudList: 'IP on a Tremendous fraud list',
|
|
291
|
+
BankAccountOnATremendousFraudList: 'Bank account on a Tremendous fraud list',
|
|
292
|
+
FingerprintOnATremendousFraudList: 'Fingerprint on a Tremendous fraud list',
|
|
293
|
+
EmailOnATremendousFraudList: 'Email on a Tremendous fraud list',
|
|
294
|
+
PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list',
|
|
295
|
+
IpRelatedToABlockedReward: 'IP related to a blocked reward',
|
|
296
|
+
BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward',
|
|
297
|
+
FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward',
|
|
298
|
+
EmailRelatedToABlockedReward: 'Email related to a blocked reward',
|
|
299
|
+
PhoneRelatedToABlockedReward: 'Phone related to a blocked reward',
|
|
300
|
+
AllowedIp: 'Allowed IP',
|
|
301
|
+
AllowedEmail: 'Allowed email'
|
|
302
|
+
};
|
|
303
|
+
/**
|
|
304
|
+
*
|
|
305
|
+
* @export
|
|
306
|
+
* @enum {string}
|
|
307
|
+
*/
|
|
308
|
+
exports.FraudReviewRedemptionMethod = {
|
|
309
|
+
Paypal: 'paypal',
|
|
310
|
+
Bank: 'bank',
|
|
311
|
+
MerchantCard: 'merchant card',
|
|
312
|
+
VisaCard: 'visa card',
|
|
313
|
+
Charity: 'charity',
|
|
314
|
+
Venmo: 'venmo'
|
|
315
|
+
};
|
|
316
|
+
/**
|
|
317
|
+
* The current status of the fraud review: * `flagged` - The reward has been flagged for and waiting manual review. * `blocked` - The reward was reviewed and blocked. * `released` - The reward was reviewed and released.
|
|
318
|
+
* @export
|
|
319
|
+
* @enum {string}
|
|
320
|
+
*/
|
|
321
|
+
exports.FraudReviewStatus = {
|
|
322
|
+
Flagged: 'flagged',
|
|
323
|
+
Blocked: 'blocked',
|
|
324
|
+
Released: 'released'
|
|
325
|
+
};
|
|
326
|
+
exports.FraudRuleRequestConfigTypeEnum = {
|
|
327
|
+
Whitelist: 'whitelist',
|
|
328
|
+
Blacklist: 'blacklist'
|
|
329
|
+
};
|
|
330
|
+
exports.FraudRuleRequestConfigPeriodEnum = {
|
|
331
|
+
_7: '7',
|
|
332
|
+
_30: '30',
|
|
333
|
+
_90: '90',
|
|
334
|
+
_120: '120',
|
|
335
|
+
_365: '365',
|
|
336
|
+
AllTime: 'all_time'
|
|
337
|
+
};
|
|
338
|
+
/**
|
|
339
|
+
* * `review_country` - Flags when the recipient\'s IP country matches the criteria in the rule * `review_ip` - Flags when recipient\'s IP matches one in the list * `review_email` - Flags when the recipient\'s email matches one in the list * `review_redeemed_rewards_count` - Flags when the recipient redeemed more than the number of rewards specified in the config * `review_redeemed_rewards_amount` - Flags when the recipient redeemed more than the total amount specified in the config * `review_multiple_emails` - Flags when recipient\'s device or account has multiple emails associated * `review_vpn` - Flags when VPN is suspected * `review_tremendous_flag_list` - Flags rewards when redemption attributes match at least one criteria defined by the Tremendous flag list * `review_previously_blocked_recipients` - Flags rewards when the recipient has been blocked before * `allow_ip` - Releases a reward when a recipient\'s IP matches one in the list * `allow_email` - Releases a reward when the recipient\'s email matches one in the list
|
|
340
|
+
* @export
|
|
341
|
+
* @enum {string}
|
|
342
|
+
*/
|
|
343
|
+
exports.FraudRuleType = {
|
|
344
|
+
ReviewCountry: 'review_country',
|
|
345
|
+
ReviewIp: 'review_ip',
|
|
346
|
+
ReviewEmail: 'review_email',
|
|
347
|
+
ReviewRedeemedRewardsCount: 'review_redeemed_rewards_count',
|
|
348
|
+
ReviewRedeemedRewardsAmount: 'review_redeemed_rewards_amount',
|
|
349
|
+
ReviewMultipleEmails: 'review_multiple_emails',
|
|
350
|
+
ReviewVpn: 'review_vpn',
|
|
351
|
+
ReviewTremendousFlagList: 'review_tremendous_flag_list',
|
|
352
|
+
ReviewPreviouslyBlockedRecipients: 'review_previously_blocked_recipients',
|
|
353
|
+
AllowIp: 'allow_ip',
|
|
354
|
+
AllowEmail: 'allow_email'
|
|
355
|
+
};
|
|
356
|
+
exports.FraudRulesListItemRuleTypeEnum = {
|
|
357
|
+
ReviewCountry: 'review_country',
|
|
358
|
+
ReviewIp: 'review_ip',
|
|
359
|
+
ReviewEmail: 'review_email',
|
|
360
|
+
ReviewRedeemedRewardsCount: 'review_redeemed_rewards_count',
|
|
361
|
+
ReviewRedeemedRewardsAmount: 'review_redeemed_rewards_amount',
|
|
362
|
+
ReviewMultipleEmails: 'review_multiple_emails',
|
|
363
|
+
ReviewVpn: 'review_vpn',
|
|
364
|
+
ReviewTremendousFlagList: 'review_tremendous_flag_list',
|
|
365
|
+
ReviewPreviouslyBlockedRecipients: 'review_previously_blocked_recipients',
|
|
366
|
+
AllowIp: 'allow_ip',
|
|
367
|
+
AllowEmail: 'allow_email'
|
|
368
|
+
};
|
|
229
369
|
exports.FundingSourceMethodEnum = {
|
|
230
370
|
Balance: 'balance',
|
|
231
371
|
BankAccount: 'bank_account',
|
|
@@ -237,6 +377,41 @@ exports.FundingSourceTypeEnum = {
|
|
|
237
377
|
ProForma: 'PRO_FORMA',
|
|
238
378
|
PrefundingOnly: 'PREFUNDING_ONLY'
|
|
239
379
|
};
|
|
380
|
+
exports.GetFraudReview200ResponseFraudReviewStatusEnum = {
|
|
381
|
+
Flagged: 'flagged',
|
|
382
|
+
Blocked: 'blocked',
|
|
383
|
+
Released: 'released'
|
|
384
|
+
};
|
|
385
|
+
exports.GetFraudReview200ResponseFraudReviewReasonsEnum = {
|
|
386
|
+
DisallowedIp: 'Disallowed IP',
|
|
387
|
+
DisallowedEmail: 'Disallowed email',
|
|
388
|
+
DisallowedCountry: 'Disallowed country',
|
|
389
|
+
OverRewardDollarLimit: 'Over reward dollar limit',
|
|
390
|
+
OverRewardCountLimit: 'Over reward count limit',
|
|
391
|
+
VpnDetected: 'VPN detected',
|
|
392
|
+
DeviceRelatedToMultipleEmails: 'Device related to multiple emails',
|
|
393
|
+
DeviceOrAccountRelatedToMultipleEmails: 'Device or account related to multiple emails',
|
|
394
|
+
IpOnATremendousFraudList: 'IP on a Tremendous fraud list',
|
|
395
|
+
BankAccountOnATremendousFraudList: 'Bank account on a Tremendous fraud list',
|
|
396
|
+
FingerprintOnATremendousFraudList: 'Fingerprint on a Tremendous fraud list',
|
|
397
|
+
EmailOnATremendousFraudList: 'Email on a Tremendous fraud list',
|
|
398
|
+
PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list',
|
|
399
|
+
IpRelatedToABlockedReward: 'IP related to a blocked reward',
|
|
400
|
+
BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward',
|
|
401
|
+
FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward',
|
|
402
|
+
EmailRelatedToABlockedReward: 'Email related to a blocked reward',
|
|
403
|
+
PhoneRelatedToABlockedReward: 'Phone related to a blocked reward',
|
|
404
|
+
AllowedIp: 'Allowed IP',
|
|
405
|
+
AllowedEmail: 'Allowed email'
|
|
406
|
+
};
|
|
407
|
+
exports.GetFraudReview200ResponseFraudReviewRedemptionMethodEnum = {
|
|
408
|
+
Paypal: 'paypal',
|
|
409
|
+
Bank: 'bank',
|
|
410
|
+
MerchantCard: 'merchant card',
|
|
411
|
+
VisaCard: 'visa card',
|
|
412
|
+
Charity: 'charity',
|
|
413
|
+
Venmo: 'venmo'
|
|
414
|
+
};
|
|
240
415
|
exports.GetMember200ResponseMemberStatusEnum = {
|
|
241
416
|
Registered: 'REGISTERED',
|
|
242
417
|
Invited: 'INVITED'
|
|
@@ -251,6 +426,46 @@ exports.InvoiceStatusEnum = {
|
|
|
251
426
|
Open: 'OPEN',
|
|
252
427
|
MarkedAsPaid: 'MARKED_AS_PAID'
|
|
253
428
|
};
|
|
429
|
+
exports.ListFraudReviews200ResponseFraudReviewsInnerStatusEnum = {
|
|
430
|
+
Flagged: 'flagged',
|
|
431
|
+
Blocked: 'blocked',
|
|
432
|
+
Released: 'released'
|
|
433
|
+
};
|
|
434
|
+
exports.ListFraudReviews200ResponseFraudReviewsInnerReasonsEnum = {
|
|
435
|
+
DisallowedIp: 'Disallowed IP',
|
|
436
|
+
DisallowedEmail: 'Disallowed email',
|
|
437
|
+
DisallowedCountry: 'Disallowed country',
|
|
438
|
+
OverRewardDollarLimit: 'Over reward dollar limit',
|
|
439
|
+
OverRewardCountLimit: 'Over reward count limit',
|
|
440
|
+
VpnDetected: 'VPN detected',
|
|
441
|
+
DeviceRelatedToMultipleEmails: 'Device related to multiple emails',
|
|
442
|
+
DeviceOrAccountRelatedToMultipleEmails: 'Device or account related to multiple emails',
|
|
443
|
+
IpOnATremendousFraudList: 'IP on a Tremendous fraud list',
|
|
444
|
+
BankAccountOnATremendousFraudList: 'Bank account on a Tremendous fraud list',
|
|
445
|
+
FingerprintOnATremendousFraudList: 'Fingerprint on a Tremendous fraud list',
|
|
446
|
+
EmailOnATremendousFraudList: 'Email on a Tremendous fraud list',
|
|
447
|
+
PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list',
|
|
448
|
+
IpRelatedToABlockedReward: 'IP related to a blocked reward',
|
|
449
|
+
BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward',
|
|
450
|
+
FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward',
|
|
451
|
+
EmailRelatedToABlockedReward: 'Email related to a blocked reward',
|
|
452
|
+
PhoneRelatedToABlockedReward: 'Phone related to a blocked reward',
|
|
453
|
+
AllowedIp: 'Allowed IP',
|
|
454
|
+
AllowedEmail: 'Allowed email'
|
|
455
|
+
};
|
|
456
|
+
exports.ListFraudRules200ResponseFraudRulesInnerRuleTypeEnum = {
|
|
457
|
+
ReviewCountry: 'review_country',
|
|
458
|
+
ReviewIp: 'review_ip',
|
|
459
|
+
ReviewEmail: 'review_email',
|
|
460
|
+
ReviewRedeemedRewardsCount: 'review_redeemed_rewards_count',
|
|
461
|
+
ReviewRedeemedRewardsAmount: 'review_redeemed_rewards_amount',
|
|
462
|
+
ReviewMultipleEmails: 'review_multiple_emails',
|
|
463
|
+
ReviewVpn: 'review_vpn',
|
|
464
|
+
ReviewTremendousFlagList: 'review_tremendous_flag_list',
|
|
465
|
+
ReviewPreviouslyBlockedRecipients: 'review_previously_blocked_recipients',
|
|
466
|
+
AllowIp: 'allow_ip',
|
|
467
|
+
AllowEmail: 'allow_email'
|
|
468
|
+
};
|
|
254
469
|
exports.ListFundingSources200ResponseFundingSourcesInnerMethodEnum = {
|
|
255
470
|
Balance: 'balance',
|
|
256
471
|
BankAccount: 'bank_account',
|
|
@@ -623,14 +838,6 @@ exports.OrderStatus = {
|
|
|
623
838
|
PendingApproval: 'PENDING APPROVAL',
|
|
624
839
|
PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL'
|
|
625
840
|
};
|
|
626
|
-
exports.OrderWithLinkStatusEnum = {
|
|
627
|
-
Canceled: 'CANCELED',
|
|
628
|
-
Cart: 'CART',
|
|
629
|
-
Executed: 'EXECUTED',
|
|
630
|
-
Failed: 'FAILED',
|
|
631
|
-
PendingApproval: 'PENDING APPROVAL',
|
|
632
|
-
PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL'
|
|
633
|
-
};
|
|
634
841
|
exports.OrderWithoutLinkStatusEnum = {
|
|
635
842
|
Canceled: 'CANCELED',
|
|
636
843
|
Cart: 'CART',
|
|
@@ -779,6 +986,26 @@ exports.ProductCurrencyCodesEnum = {
|
|
|
779
986
|
Zar: 'ZAR',
|
|
780
987
|
Zmk: 'ZMK'
|
|
781
988
|
};
|
|
989
|
+
exports.ReviewCountryTypeEnum = {
|
|
990
|
+
Whitelist: 'whitelist',
|
|
991
|
+
Blacklist: 'blacklist'
|
|
992
|
+
};
|
|
993
|
+
exports.ReviewRedeemedRewardsAmountPeriodEnum = {
|
|
994
|
+
_7: '7',
|
|
995
|
+
_30: '30',
|
|
996
|
+
_90: '90',
|
|
997
|
+
_120: '120',
|
|
998
|
+
_365: '365',
|
|
999
|
+
AllTime: 'all_time'
|
|
1000
|
+
};
|
|
1001
|
+
exports.ReviewRedeemedRewardsCountPeriodEnum = {
|
|
1002
|
+
_7: '7',
|
|
1003
|
+
_30: '30',
|
|
1004
|
+
_90: '90',
|
|
1005
|
+
_120: '120',
|
|
1006
|
+
_365: '365',
|
|
1007
|
+
AllTime: 'all_time'
|
|
1008
|
+
};
|
|
782
1009
|
exports.RewardValueCurrencyCodeEnum = {
|
|
783
1010
|
Usd: 'USD',
|
|
784
1011
|
Cad: 'CAD',
|
|
@@ -897,27 +1124,33 @@ exports.RewardValueCurrencyCodeEnum = {
|
|
|
897
1124
|
Zar: 'ZAR',
|
|
898
1125
|
Zmk: 'ZMK'
|
|
899
1126
|
};
|
|
900
|
-
exports.
|
|
1127
|
+
exports.RewardWithoutLinkDeliveryMethodEnum = {
|
|
901
1128
|
Email: 'EMAIL',
|
|
902
1129
|
Link: 'LINK',
|
|
903
1130
|
Phone: 'PHONE'
|
|
904
1131
|
};
|
|
905
|
-
exports.
|
|
1132
|
+
exports.RewardWithoutLinkDeliveryStatusEnum = {
|
|
906
1133
|
Scheduled: 'SCHEDULED',
|
|
907
1134
|
Failed: 'FAILED',
|
|
908
1135
|
Succeeded: 'SUCCEEDED',
|
|
909
1136
|
Pending: 'PENDING'
|
|
910
1137
|
};
|
|
911
|
-
exports.
|
|
1138
|
+
exports.SingleRewardOrder1RewardDeliveryMethodEnum = {
|
|
912
1139
|
Email: 'EMAIL',
|
|
913
1140
|
Link: 'LINK',
|
|
914
1141
|
Phone: 'PHONE'
|
|
915
1142
|
};
|
|
916
|
-
exports.
|
|
917
|
-
|
|
1143
|
+
exports.SingleRewardOrderWithoutLinkOrderStatusEnum = {
|
|
1144
|
+
Canceled: 'CANCELED',
|
|
1145
|
+
Cart: 'CART',
|
|
1146
|
+
Executed: 'EXECUTED',
|
|
918
1147
|
Failed: 'FAILED',
|
|
919
|
-
|
|
920
|
-
|
|
1148
|
+
PendingApproval: 'PENDING APPROVAL',
|
|
1149
|
+
PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL'
|
|
1150
|
+
};
|
|
1151
|
+
exports.UpdateFraudRuleListRequestOperationEnum = {
|
|
1152
|
+
Add: 'add',
|
|
1153
|
+
Remove: 'remove'
|
|
921
1154
|
};
|
|
922
1155
|
/**
|
|
923
1156
|
* BalanceTransactionsApi - axios parameter creator
|
|
@@ -1570,6 +1803,733 @@ class ForexApi extends base_1.BaseAPI {
|
|
|
1570
1803
|
}
|
|
1571
1804
|
}
|
|
1572
1805
|
exports.ForexApi = ForexApi;
|
|
1806
|
+
/**
|
|
1807
|
+
* FraudReviewsApi - axios parameter creator
|
|
1808
|
+
* @export
|
|
1809
|
+
*/
|
|
1810
|
+
const FraudReviewsApiAxiosParamCreator = function (configuration) {
|
|
1811
|
+
return {
|
|
1812
|
+
/**
|
|
1813
|
+
* Completes the fraud review identified by the given `id` in the URL, and blocks the reward. The reward is canceled and the amount refunded.
|
|
1814
|
+
* @summary Block fraud review
|
|
1815
|
+
* @param {string} id The ID of the reward that should be blocked.
|
|
1816
|
+
* @param {*} [options] Override http request option.
|
|
1817
|
+
* @throws {RequiredError}
|
|
1818
|
+
*/
|
|
1819
|
+
blockFraudReview: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
1820
|
+
// verify required parameter 'id' is not null or undefined
|
|
1821
|
+
(0, common_1.assertParamExists)('blockFraudReview', 'id', id);
|
|
1822
|
+
const localVarPath = `/fraud_reviews/{id}/block`
|
|
1823
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1824
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1825
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1826
|
+
let baseOptions;
|
|
1827
|
+
if (configuration) {
|
|
1828
|
+
baseOptions = configuration.baseOptions;
|
|
1829
|
+
}
|
|
1830
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
1831
|
+
const localVarHeaderParameter = {};
|
|
1832
|
+
const localVarQueryParameter = {};
|
|
1833
|
+
// authentication BearerApiKey required
|
|
1834
|
+
// http bearer authentication required
|
|
1835
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1836
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1837
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1838
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1839
|
+
return {
|
|
1840
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1841
|
+
options: localVarRequestOptions,
|
|
1842
|
+
};
|
|
1843
|
+
}),
|
|
1844
|
+
/**
|
|
1845
|
+
* Retrieve the details of a fraud review, identified by the given `id` in the URL. Returns additional details regarding the fraud review beyond what\'s provided in the List fraud reviews endpoint, including reward details, recipient geolocation, etc.
|
|
1846
|
+
* @summary Retrieve single fraud review
|
|
1847
|
+
* @param {string} id The ID of the reward that should be retrieved.
|
|
1848
|
+
* @param {*} [options] Override http request option.
|
|
1849
|
+
* @throws {RequiredError}
|
|
1850
|
+
*/
|
|
1851
|
+
getFraudReview: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
1852
|
+
// verify required parameter 'id' is not null or undefined
|
|
1853
|
+
(0, common_1.assertParamExists)('getFraudReview', 'id', id);
|
|
1854
|
+
const localVarPath = `/fraud_reviews/{id}`
|
|
1855
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1856
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1857
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1858
|
+
let baseOptions;
|
|
1859
|
+
if (configuration) {
|
|
1860
|
+
baseOptions = configuration.baseOptions;
|
|
1861
|
+
}
|
|
1862
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1863
|
+
const localVarHeaderParameter = {};
|
|
1864
|
+
const localVarQueryParameter = {};
|
|
1865
|
+
// authentication BearerApiKey required
|
|
1866
|
+
// http bearer authentication required
|
|
1867
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1868
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1869
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1870
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1871
|
+
return {
|
|
1872
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1873
|
+
options: localVarRequestOptions,
|
|
1874
|
+
};
|
|
1875
|
+
}),
|
|
1876
|
+
/**
|
|
1877
|
+
* Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates.
|
|
1878
|
+
* @summary List fraud reviews
|
|
1879
|
+
* @param {number} [offset] Offsets the returned list by the given number of records. The returned fraud reviews are ordered (and offsetted) by their redemption date (DESC).
|
|
1880
|
+
* @param {number} [limit] Limits the number of fraud reviews listed. The default value is 10.
|
|
1881
|
+
* @param {ListFraudReviewsStatusEnum} [status] Filters fraud reviews by status. Can be `flagged`, `blocked` or `released`.
|
|
1882
|
+
* @param {string} [createdAtGte] Return results where the created_at field is >= to the supplied value. Expects an ISO 8601 datetime.
|
|
1883
|
+
* @param {string} [createdAtLte] Return results where the created_at field is <= to the supplied value. Expects an ISO 8601 datetime.
|
|
1884
|
+
* @param {string} [redeemedAtGte] Return results where the redeemed_at field is >= the supplied value. Expects an ISO 8601 datetime.
|
|
1885
|
+
* @param {string} [redeemedAtLte] Return results where the redeemed_at field is <= the supplied value. Expects an ISO 8601 datetime.
|
|
1886
|
+
* @param {*} [options] Override http request option.
|
|
1887
|
+
* @throws {RequiredError}
|
|
1888
|
+
*/
|
|
1889
|
+
listFraudReviews: (offset_1, limit_1, status_1, createdAtGte_1, createdAtLte_1, redeemedAtGte_1, redeemedAtLte_1, ...args_1) => __awaiter(this, [offset_1, limit_1, status_1, createdAtGte_1, createdAtLte_1, redeemedAtGte_1, redeemedAtLte_1, ...args_1], void 0, function* (offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options = {}) {
|
|
1890
|
+
const localVarPath = `/fraud_reviews`;
|
|
1891
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1892
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1893
|
+
let baseOptions;
|
|
1894
|
+
if (configuration) {
|
|
1895
|
+
baseOptions = configuration.baseOptions;
|
|
1896
|
+
}
|
|
1897
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1898
|
+
const localVarHeaderParameter = {};
|
|
1899
|
+
const localVarQueryParameter = {};
|
|
1900
|
+
// authentication BearerApiKey required
|
|
1901
|
+
// http bearer authentication required
|
|
1902
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1903
|
+
if (offset !== undefined) {
|
|
1904
|
+
localVarQueryParameter['offset'] = offset;
|
|
1905
|
+
}
|
|
1906
|
+
if (limit !== undefined) {
|
|
1907
|
+
localVarQueryParameter['limit'] = limit;
|
|
1908
|
+
}
|
|
1909
|
+
if (status !== undefined) {
|
|
1910
|
+
localVarQueryParameter['status'] = status;
|
|
1911
|
+
}
|
|
1912
|
+
if (createdAtGte !== undefined) {
|
|
1913
|
+
localVarQueryParameter['created_at[gte]'] = createdAtGte;
|
|
1914
|
+
}
|
|
1915
|
+
if (createdAtLte !== undefined) {
|
|
1916
|
+
localVarQueryParameter['created_at[lte]'] = createdAtLte;
|
|
1917
|
+
}
|
|
1918
|
+
if (redeemedAtGte !== undefined) {
|
|
1919
|
+
localVarQueryParameter['redeemed_at[gte]'] = redeemedAtGte;
|
|
1920
|
+
}
|
|
1921
|
+
if (redeemedAtLte !== undefined) {
|
|
1922
|
+
localVarQueryParameter['redeemed_at[lte]'] = redeemedAtLte;
|
|
1923
|
+
}
|
|
1924
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1925
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1926
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1927
|
+
return {
|
|
1928
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1929
|
+
options: localVarRequestOptions,
|
|
1930
|
+
};
|
|
1931
|
+
}),
|
|
1932
|
+
/**
|
|
1933
|
+
* Completes the fraud review identified by the given `id` in the URL, and releases the associated reward to the recipient.
|
|
1934
|
+
* @summary Release fraud review
|
|
1935
|
+
* @param {string} id The ID of the reward that should be released.
|
|
1936
|
+
* @param {*} [options] Override http request option.
|
|
1937
|
+
* @throws {RequiredError}
|
|
1938
|
+
*/
|
|
1939
|
+
releaseFraudReview: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
1940
|
+
// verify required parameter 'id' is not null or undefined
|
|
1941
|
+
(0, common_1.assertParamExists)('releaseFraudReview', 'id', id);
|
|
1942
|
+
const localVarPath = `/fraud_reviews/{id}/release`
|
|
1943
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1944
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1945
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1946
|
+
let baseOptions;
|
|
1947
|
+
if (configuration) {
|
|
1948
|
+
baseOptions = configuration.baseOptions;
|
|
1949
|
+
}
|
|
1950
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
1951
|
+
const localVarHeaderParameter = {};
|
|
1952
|
+
const localVarQueryParameter = {};
|
|
1953
|
+
// authentication BearerApiKey required
|
|
1954
|
+
// http bearer authentication required
|
|
1955
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1956
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1957
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1958
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1959
|
+
return {
|
|
1960
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1961
|
+
options: localVarRequestOptions,
|
|
1962
|
+
};
|
|
1963
|
+
}),
|
|
1964
|
+
};
|
|
1965
|
+
};
|
|
1966
|
+
exports.FraudReviewsApiAxiosParamCreator = FraudReviewsApiAxiosParamCreator;
|
|
1967
|
+
/**
|
|
1968
|
+
* FraudReviewsApi - functional programming interface
|
|
1969
|
+
* @export
|
|
1970
|
+
*/
|
|
1971
|
+
const FraudReviewsApiFp = function (configuration) {
|
|
1972
|
+
const localVarAxiosParamCreator = (0, exports.FraudReviewsApiAxiosParamCreator)(configuration);
|
|
1973
|
+
return {
|
|
1974
|
+
/**
|
|
1975
|
+
* Completes the fraud review identified by the given `id` in the URL, and blocks the reward. The reward is canceled and the amount refunded.
|
|
1976
|
+
* @summary Block fraud review
|
|
1977
|
+
* @param {string} id The ID of the reward that should be blocked.
|
|
1978
|
+
* @param {*} [options] Override http request option.
|
|
1979
|
+
* @throws {RequiredError}
|
|
1980
|
+
*/
|
|
1981
|
+
blockFraudReview(id, options) {
|
|
1982
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1983
|
+
var _a, _b, _c;
|
|
1984
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.blockFraudReview(id, options);
|
|
1985
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1986
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FraudReviewsApi.blockFraudReview']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1987
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1988
|
+
});
|
|
1989
|
+
},
|
|
1990
|
+
/**
|
|
1991
|
+
* Retrieve the details of a fraud review, identified by the given `id` in the URL. Returns additional details regarding the fraud review beyond what\'s provided in the List fraud reviews endpoint, including reward details, recipient geolocation, etc.
|
|
1992
|
+
* @summary Retrieve single fraud review
|
|
1993
|
+
* @param {string} id The ID of the reward that should be retrieved.
|
|
1994
|
+
* @param {*} [options] Override http request option.
|
|
1995
|
+
* @throws {RequiredError}
|
|
1996
|
+
*/
|
|
1997
|
+
getFraudReview(id, options) {
|
|
1998
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1999
|
+
var _a, _b, _c;
|
|
2000
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getFraudReview(id, options);
|
|
2001
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2002
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FraudReviewsApi.getFraudReview']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2003
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2004
|
+
});
|
|
2005
|
+
},
|
|
2006
|
+
/**
|
|
2007
|
+
* Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates.
|
|
2008
|
+
* @summary List fraud reviews
|
|
2009
|
+
* @param {number} [offset] Offsets the returned list by the given number of records. The returned fraud reviews are ordered (and offsetted) by their redemption date (DESC).
|
|
2010
|
+
* @param {number} [limit] Limits the number of fraud reviews listed. The default value is 10.
|
|
2011
|
+
* @param {ListFraudReviewsStatusEnum} [status] Filters fraud reviews by status. Can be `flagged`, `blocked` or `released`.
|
|
2012
|
+
* @param {string} [createdAtGte] Return results where the created_at field is >= to the supplied value. Expects an ISO 8601 datetime.
|
|
2013
|
+
* @param {string} [createdAtLte] Return results where the created_at field is <= to the supplied value. Expects an ISO 8601 datetime.
|
|
2014
|
+
* @param {string} [redeemedAtGte] Return results where the redeemed_at field is >= the supplied value. Expects an ISO 8601 datetime.
|
|
2015
|
+
* @param {string} [redeemedAtLte] Return results where the redeemed_at field is <= the supplied value. Expects an ISO 8601 datetime.
|
|
2016
|
+
* @param {*} [options] Override http request option.
|
|
2017
|
+
* @throws {RequiredError}
|
|
2018
|
+
*/
|
|
2019
|
+
listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options) {
|
|
2020
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2021
|
+
var _a, _b, _c;
|
|
2022
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options);
|
|
2023
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2024
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FraudReviewsApi.listFraudReviews']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2025
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2026
|
+
});
|
|
2027
|
+
},
|
|
2028
|
+
/**
|
|
2029
|
+
* Completes the fraud review identified by the given `id` in the URL, and releases the associated reward to the recipient.
|
|
2030
|
+
* @summary Release fraud review
|
|
2031
|
+
* @param {string} id The ID of the reward that should be released.
|
|
2032
|
+
* @param {*} [options] Override http request option.
|
|
2033
|
+
* @throws {RequiredError}
|
|
2034
|
+
*/
|
|
2035
|
+
releaseFraudReview(id, options) {
|
|
2036
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2037
|
+
var _a, _b, _c;
|
|
2038
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.releaseFraudReview(id, options);
|
|
2039
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2040
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FraudReviewsApi.releaseFraudReview']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2041
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2042
|
+
});
|
|
2043
|
+
},
|
|
2044
|
+
};
|
|
2045
|
+
};
|
|
2046
|
+
exports.FraudReviewsApiFp = FraudReviewsApiFp;
|
|
2047
|
+
/**
|
|
2048
|
+
* FraudReviewsApi - factory interface
|
|
2049
|
+
* @export
|
|
2050
|
+
*/
|
|
2051
|
+
const FraudReviewsApiFactory = function (configuration, basePath, axios) {
|
|
2052
|
+
const localVarFp = (0, exports.FraudReviewsApiFp)(configuration);
|
|
2053
|
+
return {
|
|
2054
|
+
/**
|
|
2055
|
+
* Completes the fraud review identified by the given `id` in the URL, and blocks the reward. The reward is canceled and the amount refunded.
|
|
2056
|
+
* @summary Block fraud review
|
|
2057
|
+
* @param {string} id The ID of the reward that should be blocked.
|
|
2058
|
+
* @param {*} [options] Override http request option.
|
|
2059
|
+
* @throws {RequiredError}
|
|
2060
|
+
*/
|
|
2061
|
+
blockFraudReview(id, options) {
|
|
2062
|
+
return localVarFp.blockFraudReview(id, options).then((request) => request(axios, basePath));
|
|
2063
|
+
},
|
|
2064
|
+
/**
|
|
2065
|
+
* Retrieve the details of a fraud review, identified by the given `id` in the URL. Returns additional details regarding the fraud review beyond what\'s provided in the List fraud reviews endpoint, including reward details, recipient geolocation, etc.
|
|
2066
|
+
* @summary Retrieve single fraud review
|
|
2067
|
+
* @param {string} id The ID of the reward that should be retrieved.
|
|
2068
|
+
* @param {*} [options] Override http request option.
|
|
2069
|
+
* @throws {RequiredError}
|
|
2070
|
+
*/
|
|
2071
|
+
getFraudReview(id, options) {
|
|
2072
|
+
return localVarFp.getFraudReview(id, options).then((request) => request(axios, basePath));
|
|
2073
|
+
},
|
|
2074
|
+
/**
|
|
2075
|
+
* Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates.
|
|
2076
|
+
* @summary List fraud reviews
|
|
2077
|
+
* @param {number} [offset] Offsets the returned list by the given number of records. The returned fraud reviews are ordered (and offsetted) by their redemption date (DESC).
|
|
2078
|
+
* @param {number} [limit] Limits the number of fraud reviews listed. The default value is 10.
|
|
2079
|
+
* @param {ListFraudReviewsStatusEnum} [status] Filters fraud reviews by status. Can be `flagged`, `blocked` or `released`.
|
|
2080
|
+
* @param {string} [createdAtGte] Return results where the created_at field is >= to the supplied value. Expects an ISO 8601 datetime.
|
|
2081
|
+
* @param {string} [createdAtLte] Return results where the created_at field is <= to the supplied value. Expects an ISO 8601 datetime.
|
|
2082
|
+
* @param {string} [redeemedAtGte] Return results where the redeemed_at field is >= the supplied value. Expects an ISO 8601 datetime.
|
|
2083
|
+
* @param {string} [redeemedAtLte] Return results where the redeemed_at field is <= the supplied value. Expects an ISO 8601 datetime.
|
|
2084
|
+
* @param {*} [options] Override http request option.
|
|
2085
|
+
* @throws {RequiredError}
|
|
2086
|
+
*/
|
|
2087
|
+
listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options) {
|
|
2088
|
+
return localVarFp.listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options).then((request) => request(axios, basePath));
|
|
2089
|
+
},
|
|
2090
|
+
/**
|
|
2091
|
+
* Completes the fraud review identified by the given `id` in the URL, and releases the associated reward to the recipient.
|
|
2092
|
+
* @summary Release fraud review
|
|
2093
|
+
* @param {string} id The ID of the reward that should be released.
|
|
2094
|
+
* @param {*} [options] Override http request option.
|
|
2095
|
+
* @throws {RequiredError}
|
|
2096
|
+
*/
|
|
2097
|
+
releaseFraudReview(id, options) {
|
|
2098
|
+
return localVarFp.releaseFraudReview(id, options).then((request) => request(axios, basePath));
|
|
2099
|
+
},
|
|
2100
|
+
};
|
|
2101
|
+
};
|
|
2102
|
+
exports.FraudReviewsApiFactory = FraudReviewsApiFactory;
|
|
2103
|
+
/**
|
|
2104
|
+
* FraudReviewsApi - object-oriented interface
|
|
2105
|
+
* @export
|
|
2106
|
+
* @class FraudReviewsApi
|
|
2107
|
+
* @extends {BaseAPI}
|
|
2108
|
+
*/
|
|
2109
|
+
class FraudReviewsApi extends base_1.BaseAPI {
|
|
2110
|
+
/**
|
|
2111
|
+
* Completes the fraud review identified by the given `id` in the URL, and blocks the reward. The reward is canceled and the amount refunded.
|
|
2112
|
+
* @summary Block fraud review
|
|
2113
|
+
* @param {string} id The ID of the reward that should be blocked.
|
|
2114
|
+
* @param {*} [options] Override http request option.
|
|
2115
|
+
* @throws {RequiredError}
|
|
2116
|
+
* @memberof FraudReviewsApi
|
|
2117
|
+
*/
|
|
2118
|
+
blockFraudReview(id, options) {
|
|
2119
|
+
return (0, exports.FraudReviewsApiFp)(this.configuration).blockFraudReview(id, options).then((request) => request(this.axios, this.basePath));
|
|
2120
|
+
}
|
|
2121
|
+
/**
|
|
2122
|
+
* Retrieve the details of a fraud review, identified by the given `id` in the URL. Returns additional details regarding the fraud review beyond what\'s provided in the List fraud reviews endpoint, including reward details, recipient geolocation, etc.
|
|
2123
|
+
* @summary Retrieve single fraud review
|
|
2124
|
+
* @param {string} id The ID of the reward that should be retrieved.
|
|
2125
|
+
* @param {*} [options] Override http request option.
|
|
2126
|
+
* @throws {RequiredError}
|
|
2127
|
+
* @memberof FraudReviewsApi
|
|
2128
|
+
*/
|
|
2129
|
+
getFraudReview(id, options) {
|
|
2130
|
+
return (0, exports.FraudReviewsApiFp)(this.configuration).getFraudReview(id, options).then((request) => request(this.axios, this.basePath));
|
|
2131
|
+
}
|
|
2132
|
+
/**
|
|
2133
|
+
* Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates.
|
|
2134
|
+
* @summary List fraud reviews
|
|
2135
|
+
* @param {number} [offset] Offsets the returned list by the given number of records. The returned fraud reviews are ordered (and offsetted) by their redemption date (DESC).
|
|
2136
|
+
* @param {number} [limit] Limits the number of fraud reviews listed. The default value is 10.
|
|
2137
|
+
* @param {ListFraudReviewsStatusEnum} [status] Filters fraud reviews by status. Can be `flagged`, `blocked` or `released`.
|
|
2138
|
+
* @param {string} [createdAtGte] Return results where the created_at field is >= to the supplied value. Expects an ISO 8601 datetime.
|
|
2139
|
+
* @param {string} [createdAtLte] Return results where the created_at field is <= to the supplied value. Expects an ISO 8601 datetime.
|
|
2140
|
+
* @param {string} [redeemedAtGte] Return results where the redeemed_at field is >= the supplied value. Expects an ISO 8601 datetime.
|
|
2141
|
+
* @param {string} [redeemedAtLte] Return results where the redeemed_at field is <= the supplied value. Expects an ISO 8601 datetime.
|
|
2142
|
+
* @param {*} [options] Override http request option.
|
|
2143
|
+
* @throws {RequiredError}
|
|
2144
|
+
* @memberof FraudReviewsApi
|
|
2145
|
+
*/
|
|
2146
|
+
listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options) {
|
|
2147
|
+
return (0, exports.FraudReviewsApiFp)(this.configuration).listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options).then((request) => request(this.axios, this.basePath));
|
|
2148
|
+
}
|
|
2149
|
+
/**
|
|
2150
|
+
* Completes the fraud review identified by the given `id` in the URL, and releases the associated reward to the recipient.
|
|
2151
|
+
* @summary Release fraud review
|
|
2152
|
+
* @param {string} id The ID of the reward that should be released.
|
|
2153
|
+
* @param {*} [options] Override http request option.
|
|
2154
|
+
* @throws {RequiredError}
|
|
2155
|
+
* @memberof FraudReviewsApi
|
|
2156
|
+
*/
|
|
2157
|
+
releaseFraudReview(id, options) {
|
|
2158
|
+
return (0, exports.FraudReviewsApiFp)(this.configuration).releaseFraudReview(id, options).then((request) => request(this.axios, this.basePath));
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
exports.FraudReviewsApi = FraudReviewsApi;
|
|
2162
|
+
/**
|
|
2163
|
+
* @export
|
|
2164
|
+
*/
|
|
2165
|
+
exports.ListFraudReviewsStatusEnum = {
|
|
2166
|
+
Flagged: 'flagged',
|
|
2167
|
+
Blocked: 'blocked',
|
|
2168
|
+
Released: 'released'
|
|
2169
|
+
};
|
|
2170
|
+
/**
|
|
2171
|
+
* FraudRulesApi - axios parameter creator
|
|
2172
|
+
* @export
|
|
2173
|
+
*/
|
|
2174
|
+
const FraudRulesApiAxiosParamCreator = function (configuration) {
|
|
2175
|
+
return {
|
|
2176
|
+
/**
|
|
2177
|
+
* Deletes the rule of the type passed in the URL.
|
|
2178
|
+
* @summary Delete fraud rule
|
|
2179
|
+
* @param {DeleteFraudRuleRuleTypeEnum} ruleType The rule type to create or update.
|
|
2180
|
+
* @param {*} [options] Override http request option.
|
|
2181
|
+
* @throws {RequiredError}
|
|
2182
|
+
*/
|
|
2183
|
+
deleteFraudRule: (ruleType_1, ...args_1) => __awaiter(this, [ruleType_1, ...args_1], void 0, function* (ruleType, options = {}) {
|
|
2184
|
+
// verify required parameter 'ruleType' is not null or undefined
|
|
2185
|
+
(0, common_1.assertParamExists)('deleteFraudRule', 'ruleType', ruleType);
|
|
2186
|
+
const localVarPath = `/fraud_rules/{rule_type}`
|
|
2187
|
+
.replace(`{${"rule_type"}}`, encodeURIComponent(String(ruleType)));
|
|
2188
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2189
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2190
|
+
let baseOptions;
|
|
2191
|
+
if (configuration) {
|
|
2192
|
+
baseOptions = configuration.baseOptions;
|
|
2193
|
+
}
|
|
2194
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
2195
|
+
const localVarHeaderParameter = {};
|
|
2196
|
+
const localVarQueryParameter = {};
|
|
2197
|
+
// authentication BearerApiKey required
|
|
2198
|
+
// http bearer authentication required
|
|
2199
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2200
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2201
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2202
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2203
|
+
return {
|
|
2204
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2205
|
+
options: localVarRequestOptions,
|
|
2206
|
+
};
|
|
2207
|
+
}),
|
|
2208
|
+
/**
|
|
2209
|
+
* Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten.
|
|
2210
|
+
* @summary Configure fraud rule
|
|
2211
|
+
* @param {FraudRuleRuleTypeEnum} ruleType The rule type to create or update.
|
|
2212
|
+
* @param {FraudRuleRequest} [fraudRuleRequest] Rules `review_multiple_emails`, `review_vpn`, `review_tremendous_flaglist`, and `review_previously_blocked_recipients` require no body.
|
|
2213
|
+
* @param {*} [options] Override http request option.
|
|
2214
|
+
* @throws {RequiredError}
|
|
2215
|
+
*/
|
|
2216
|
+
fraudRule: (ruleType_1, fraudRuleRequest_1, ...args_1) => __awaiter(this, [ruleType_1, fraudRuleRequest_1, ...args_1], void 0, function* (ruleType, fraudRuleRequest, options = {}) {
|
|
2217
|
+
// verify required parameter 'ruleType' is not null or undefined
|
|
2218
|
+
(0, common_1.assertParamExists)('fraudRule', 'ruleType', ruleType);
|
|
2219
|
+
const localVarPath = `/fraud_rules/{rule_type}`
|
|
2220
|
+
.replace(`{${"rule_type"}}`, encodeURIComponent(String(ruleType)));
|
|
2221
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2222
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2223
|
+
let baseOptions;
|
|
2224
|
+
if (configuration) {
|
|
2225
|
+
baseOptions = configuration.baseOptions;
|
|
2226
|
+
}
|
|
2227
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2228
|
+
const localVarHeaderParameter = {};
|
|
2229
|
+
const localVarQueryParameter = {};
|
|
2230
|
+
// authentication BearerApiKey required
|
|
2231
|
+
// http bearer authentication required
|
|
2232
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2233
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2234
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2235
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2236
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2237
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(fraudRuleRequest, localVarRequestOptions, configuration);
|
|
2238
|
+
return {
|
|
2239
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2240
|
+
options: localVarRequestOptions,
|
|
2241
|
+
};
|
|
2242
|
+
}),
|
|
2243
|
+
/**
|
|
2244
|
+
* List active fraud rules associated with the organization tied to your API key.
|
|
2245
|
+
* @summary List fraud rules
|
|
2246
|
+
* @param {*} [options] Override http request option.
|
|
2247
|
+
* @throws {RequiredError}
|
|
2248
|
+
*/
|
|
2249
|
+
listFraudRules: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
2250
|
+
const localVarPath = `/fraud_rules`;
|
|
2251
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2252
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2253
|
+
let baseOptions;
|
|
2254
|
+
if (configuration) {
|
|
2255
|
+
baseOptions = configuration.baseOptions;
|
|
2256
|
+
}
|
|
2257
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2258
|
+
const localVarHeaderParameter = {};
|
|
2259
|
+
const localVarQueryParameter = {};
|
|
2260
|
+
// authentication BearerApiKey required
|
|
2261
|
+
// http bearer authentication required
|
|
2262
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2263
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2264
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2265
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2266
|
+
return {
|
|
2267
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2268
|
+
options: localVarRequestOptions,
|
|
2269
|
+
};
|
|
2270
|
+
}),
|
|
2271
|
+
/**
|
|
2272
|
+
* Use this endpoint to modify a list associated with an already-configured rule. Add and remove operations supported. For example, to append new IPs to the `review_ip` rule, a valid JSON body would be: ```json { \"operation\": \"add\", \"config\": { \"ips\": [\"123.123.123.123\"] } } ```
|
|
2273
|
+
* @summary Update fraud rule list
|
|
2274
|
+
* @param {UpdateFraudRuleListRuleTypeEnum} ruleType The rule type to create or update.
|
|
2275
|
+
* @param {UpdateFraudRuleListRequest} updateFraudRuleListRequest The lists to add or remove from the current configuration
|
|
2276
|
+
* @param {*} [options] Override http request option.
|
|
2277
|
+
* @throws {RequiredError}
|
|
2278
|
+
*/
|
|
2279
|
+
updateFraudRuleList: (ruleType_1, updateFraudRuleListRequest_1, ...args_1) => __awaiter(this, [ruleType_1, updateFraudRuleListRequest_1, ...args_1], void 0, function* (ruleType, updateFraudRuleListRequest, options = {}) {
|
|
2280
|
+
// verify required parameter 'ruleType' is not null or undefined
|
|
2281
|
+
(0, common_1.assertParamExists)('updateFraudRuleList', 'ruleType', ruleType);
|
|
2282
|
+
// verify required parameter 'updateFraudRuleListRequest' is not null or undefined
|
|
2283
|
+
(0, common_1.assertParamExists)('updateFraudRuleList', 'updateFraudRuleListRequest', updateFraudRuleListRequest);
|
|
2284
|
+
const localVarPath = `/fraud_rules/{rule_type}/update_list`
|
|
2285
|
+
.replace(`{${"rule_type"}}`, encodeURIComponent(String(ruleType)));
|
|
2286
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2287
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2288
|
+
let baseOptions;
|
|
2289
|
+
if (configuration) {
|
|
2290
|
+
baseOptions = configuration.baseOptions;
|
|
2291
|
+
}
|
|
2292
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2293
|
+
const localVarHeaderParameter = {};
|
|
2294
|
+
const localVarQueryParameter = {};
|
|
2295
|
+
// authentication BearerApiKey required
|
|
2296
|
+
// http bearer authentication required
|
|
2297
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2298
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2299
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2300
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2301
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2302
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateFraudRuleListRequest, localVarRequestOptions, configuration);
|
|
2303
|
+
return {
|
|
2304
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2305
|
+
options: localVarRequestOptions,
|
|
2306
|
+
};
|
|
2307
|
+
}),
|
|
2308
|
+
};
|
|
2309
|
+
};
|
|
2310
|
+
exports.FraudRulesApiAxiosParamCreator = FraudRulesApiAxiosParamCreator;
|
|
2311
|
+
/**
|
|
2312
|
+
* FraudRulesApi - functional programming interface
|
|
2313
|
+
* @export
|
|
2314
|
+
*/
|
|
2315
|
+
const FraudRulesApiFp = function (configuration) {
|
|
2316
|
+
const localVarAxiosParamCreator = (0, exports.FraudRulesApiAxiosParamCreator)(configuration);
|
|
2317
|
+
return {
|
|
2318
|
+
/**
|
|
2319
|
+
* Deletes the rule of the type passed in the URL.
|
|
2320
|
+
* @summary Delete fraud rule
|
|
2321
|
+
* @param {DeleteFraudRuleRuleTypeEnum} ruleType The rule type to create or update.
|
|
2322
|
+
* @param {*} [options] Override http request option.
|
|
2323
|
+
* @throws {RequiredError}
|
|
2324
|
+
*/
|
|
2325
|
+
deleteFraudRule(ruleType, options) {
|
|
2326
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2327
|
+
var _a, _b, _c;
|
|
2328
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteFraudRule(ruleType, options);
|
|
2329
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2330
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FraudRulesApi.deleteFraudRule']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2331
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2332
|
+
});
|
|
2333
|
+
},
|
|
2334
|
+
/**
|
|
2335
|
+
* Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten.
|
|
2336
|
+
* @summary Configure fraud rule
|
|
2337
|
+
* @param {FraudRuleRuleTypeEnum} ruleType The rule type to create or update.
|
|
2338
|
+
* @param {FraudRuleRequest} [fraudRuleRequest] Rules `review_multiple_emails`, `review_vpn`, `review_tremendous_flaglist`, and `review_previously_blocked_recipients` require no body.
|
|
2339
|
+
* @param {*} [options] Override http request option.
|
|
2340
|
+
* @throws {RequiredError}
|
|
2341
|
+
*/
|
|
2342
|
+
fraudRule(ruleType, fraudRuleRequest, options) {
|
|
2343
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2344
|
+
var _a, _b, _c;
|
|
2345
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.fraudRule(ruleType, fraudRuleRequest, options);
|
|
2346
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2347
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FraudRulesApi.fraudRule']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2348
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2349
|
+
});
|
|
2350
|
+
},
|
|
2351
|
+
/**
|
|
2352
|
+
* List active fraud rules associated with the organization tied to your API key.
|
|
2353
|
+
* @summary List fraud rules
|
|
2354
|
+
* @param {*} [options] Override http request option.
|
|
2355
|
+
* @throws {RequiredError}
|
|
2356
|
+
*/
|
|
2357
|
+
listFraudRules(options) {
|
|
2358
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2359
|
+
var _a, _b, _c;
|
|
2360
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listFraudRules(options);
|
|
2361
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2362
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FraudRulesApi.listFraudRules']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2363
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2364
|
+
});
|
|
2365
|
+
},
|
|
2366
|
+
/**
|
|
2367
|
+
* Use this endpoint to modify a list associated with an already-configured rule. Add and remove operations supported. For example, to append new IPs to the `review_ip` rule, a valid JSON body would be: ```json { \"operation\": \"add\", \"config\": { \"ips\": [\"123.123.123.123\"] } } ```
|
|
2368
|
+
* @summary Update fraud rule list
|
|
2369
|
+
* @param {UpdateFraudRuleListRuleTypeEnum} ruleType The rule type to create or update.
|
|
2370
|
+
* @param {UpdateFraudRuleListRequest} updateFraudRuleListRequest The lists to add or remove from the current configuration
|
|
2371
|
+
* @param {*} [options] Override http request option.
|
|
2372
|
+
* @throws {RequiredError}
|
|
2373
|
+
*/
|
|
2374
|
+
updateFraudRuleList(ruleType, updateFraudRuleListRequest, options) {
|
|
2375
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2376
|
+
var _a, _b, _c;
|
|
2377
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateFraudRuleList(ruleType, updateFraudRuleListRequest, options);
|
|
2378
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2379
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FraudRulesApi.updateFraudRuleList']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2380
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2381
|
+
});
|
|
2382
|
+
},
|
|
2383
|
+
};
|
|
2384
|
+
};
|
|
2385
|
+
exports.FraudRulesApiFp = FraudRulesApiFp;
|
|
2386
|
+
/**
|
|
2387
|
+
* FraudRulesApi - factory interface
|
|
2388
|
+
* @export
|
|
2389
|
+
*/
|
|
2390
|
+
const FraudRulesApiFactory = function (configuration, basePath, axios) {
|
|
2391
|
+
const localVarFp = (0, exports.FraudRulesApiFp)(configuration);
|
|
2392
|
+
return {
|
|
2393
|
+
/**
|
|
2394
|
+
* Deletes the rule of the type passed in the URL.
|
|
2395
|
+
* @summary Delete fraud rule
|
|
2396
|
+
* @param {DeleteFraudRuleRuleTypeEnum} ruleType The rule type to create or update.
|
|
2397
|
+
* @param {*} [options] Override http request option.
|
|
2398
|
+
* @throws {RequiredError}
|
|
2399
|
+
*/
|
|
2400
|
+
deleteFraudRule(ruleType, options) {
|
|
2401
|
+
return localVarFp.deleteFraudRule(ruleType, options).then((request) => request(axios, basePath));
|
|
2402
|
+
},
|
|
2403
|
+
/**
|
|
2404
|
+
* Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten.
|
|
2405
|
+
* @summary Configure fraud rule
|
|
2406
|
+
* @param {FraudRuleRuleTypeEnum} ruleType The rule type to create or update.
|
|
2407
|
+
* @param {FraudRuleRequest} [fraudRuleRequest] Rules `review_multiple_emails`, `review_vpn`, `review_tremendous_flaglist`, and `review_previously_blocked_recipients` require no body.
|
|
2408
|
+
* @param {*} [options] Override http request option.
|
|
2409
|
+
* @throws {RequiredError}
|
|
2410
|
+
*/
|
|
2411
|
+
fraudRule(ruleType, fraudRuleRequest, options) {
|
|
2412
|
+
return localVarFp.fraudRule(ruleType, fraudRuleRequest, options).then((request) => request(axios, basePath));
|
|
2413
|
+
},
|
|
2414
|
+
/**
|
|
2415
|
+
* List active fraud rules associated with the organization tied to your API key.
|
|
2416
|
+
* @summary List fraud rules
|
|
2417
|
+
* @param {*} [options] Override http request option.
|
|
2418
|
+
* @throws {RequiredError}
|
|
2419
|
+
*/
|
|
2420
|
+
listFraudRules(options) {
|
|
2421
|
+
return localVarFp.listFraudRules(options).then((request) => request(axios, basePath));
|
|
2422
|
+
},
|
|
2423
|
+
/**
|
|
2424
|
+
* Use this endpoint to modify a list associated with an already-configured rule. Add and remove operations supported. For example, to append new IPs to the `review_ip` rule, a valid JSON body would be: ```json { \"operation\": \"add\", \"config\": { \"ips\": [\"123.123.123.123\"] } } ```
|
|
2425
|
+
* @summary Update fraud rule list
|
|
2426
|
+
* @param {UpdateFraudRuleListRuleTypeEnum} ruleType The rule type to create or update.
|
|
2427
|
+
* @param {UpdateFraudRuleListRequest} updateFraudRuleListRequest The lists to add or remove from the current configuration
|
|
2428
|
+
* @param {*} [options] Override http request option.
|
|
2429
|
+
* @throws {RequiredError}
|
|
2430
|
+
*/
|
|
2431
|
+
updateFraudRuleList(ruleType, updateFraudRuleListRequest, options) {
|
|
2432
|
+
return localVarFp.updateFraudRuleList(ruleType, updateFraudRuleListRequest, options).then((request) => request(axios, basePath));
|
|
2433
|
+
},
|
|
2434
|
+
};
|
|
2435
|
+
};
|
|
2436
|
+
exports.FraudRulesApiFactory = FraudRulesApiFactory;
|
|
2437
|
+
/**
|
|
2438
|
+
* FraudRulesApi - object-oriented interface
|
|
2439
|
+
* @export
|
|
2440
|
+
* @class FraudRulesApi
|
|
2441
|
+
* @extends {BaseAPI}
|
|
2442
|
+
*/
|
|
2443
|
+
class FraudRulesApi extends base_1.BaseAPI {
|
|
2444
|
+
/**
|
|
2445
|
+
* Deletes the rule of the type passed in the URL.
|
|
2446
|
+
* @summary Delete fraud rule
|
|
2447
|
+
* @param {DeleteFraudRuleRuleTypeEnum} ruleType The rule type to create or update.
|
|
2448
|
+
* @param {*} [options] Override http request option.
|
|
2449
|
+
* @throws {RequiredError}
|
|
2450
|
+
* @memberof FraudRulesApi
|
|
2451
|
+
*/
|
|
2452
|
+
deleteFraudRule(ruleType, options) {
|
|
2453
|
+
return (0, exports.FraudRulesApiFp)(this.configuration).deleteFraudRule(ruleType, options).then((request) => request(this.axios, this.basePath));
|
|
2454
|
+
}
|
|
2455
|
+
/**
|
|
2456
|
+
* Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten.
|
|
2457
|
+
* @summary Configure fraud rule
|
|
2458
|
+
* @param {FraudRuleRuleTypeEnum} ruleType The rule type to create or update.
|
|
2459
|
+
* @param {FraudRuleRequest} [fraudRuleRequest] Rules `review_multiple_emails`, `review_vpn`, `review_tremendous_flaglist`, and `review_previously_blocked_recipients` require no body.
|
|
2460
|
+
* @param {*} [options] Override http request option.
|
|
2461
|
+
* @throws {RequiredError}
|
|
2462
|
+
* @memberof FraudRulesApi
|
|
2463
|
+
*/
|
|
2464
|
+
fraudRule(ruleType, fraudRuleRequest, options) {
|
|
2465
|
+
return (0, exports.FraudRulesApiFp)(this.configuration).fraudRule(ruleType, fraudRuleRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2466
|
+
}
|
|
2467
|
+
/**
|
|
2468
|
+
* List active fraud rules associated with the organization tied to your API key.
|
|
2469
|
+
* @summary List fraud rules
|
|
2470
|
+
* @param {*} [options] Override http request option.
|
|
2471
|
+
* @throws {RequiredError}
|
|
2472
|
+
* @memberof FraudRulesApi
|
|
2473
|
+
*/
|
|
2474
|
+
listFraudRules(options) {
|
|
2475
|
+
return (0, exports.FraudRulesApiFp)(this.configuration).listFraudRules(options).then((request) => request(this.axios, this.basePath));
|
|
2476
|
+
}
|
|
2477
|
+
/**
|
|
2478
|
+
* Use this endpoint to modify a list associated with an already-configured rule. Add and remove operations supported. For example, to append new IPs to the `review_ip` rule, a valid JSON body would be: ```json { \"operation\": \"add\", \"config\": { \"ips\": [\"123.123.123.123\"] } } ```
|
|
2479
|
+
* @summary Update fraud rule list
|
|
2480
|
+
* @param {UpdateFraudRuleListRuleTypeEnum} ruleType The rule type to create or update.
|
|
2481
|
+
* @param {UpdateFraudRuleListRequest} updateFraudRuleListRequest The lists to add or remove from the current configuration
|
|
2482
|
+
* @param {*} [options] Override http request option.
|
|
2483
|
+
* @throws {RequiredError}
|
|
2484
|
+
* @memberof FraudRulesApi
|
|
2485
|
+
*/
|
|
2486
|
+
updateFraudRuleList(ruleType, updateFraudRuleListRequest, options) {
|
|
2487
|
+
return (0, exports.FraudRulesApiFp)(this.configuration).updateFraudRuleList(ruleType, updateFraudRuleListRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
exports.FraudRulesApi = FraudRulesApi;
|
|
2491
|
+
/**
|
|
2492
|
+
* @export
|
|
2493
|
+
*/
|
|
2494
|
+
exports.DeleteFraudRuleRuleTypeEnum = {
|
|
2495
|
+
ReviewCountry: 'review_country',
|
|
2496
|
+
ReviewIp: 'review_ip',
|
|
2497
|
+
ReviewEmail: 'review_email',
|
|
2498
|
+
ReviewRedeemedRewardsCount: 'review_redeemed_rewards_count',
|
|
2499
|
+
ReviewRedeemedRewardsAmount: 'review_redeemed_rewards_amount',
|
|
2500
|
+
ReviewMultipleEmails: 'review_multiple_emails',
|
|
2501
|
+
ReviewVpn: 'review_vpn',
|
|
2502
|
+
ReviewTremendousFlagList: 'review_tremendous_flag_list',
|
|
2503
|
+
ReviewPreviouslyBlockedRecipients: 'review_previously_blocked_recipients',
|
|
2504
|
+
AllowIp: 'allow_ip',
|
|
2505
|
+
AllowEmail: 'allow_email'
|
|
2506
|
+
};
|
|
2507
|
+
/**
|
|
2508
|
+
* @export
|
|
2509
|
+
*/
|
|
2510
|
+
exports.FraudRuleRuleTypeEnum = {
|
|
2511
|
+
ReviewCountry: 'review_country',
|
|
2512
|
+
ReviewIp: 'review_ip',
|
|
2513
|
+
ReviewEmail: 'review_email',
|
|
2514
|
+
ReviewRedeemedRewardsCount: 'review_redeemed_rewards_count',
|
|
2515
|
+
ReviewRedeemedRewardsAmount: 'review_redeemed_rewards_amount',
|
|
2516
|
+
ReviewMultipleEmails: 'review_multiple_emails',
|
|
2517
|
+
ReviewVpn: 'review_vpn',
|
|
2518
|
+
ReviewTremendousFlagList: 'review_tremendous_flag_list',
|
|
2519
|
+
ReviewPreviouslyBlockedRecipients: 'review_previously_blocked_recipients',
|
|
2520
|
+
AllowIp: 'allow_ip',
|
|
2521
|
+
AllowEmail: 'allow_email'
|
|
2522
|
+
};
|
|
2523
|
+
/**
|
|
2524
|
+
* @export
|
|
2525
|
+
*/
|
|
2526
|
+
exports.UpdateFraudRuleListRuleTypeEnum = {
|
|
2527
|
+
ReviewCountry: 'review_country',
|
|
2528
|
+
ReviewIp: 'review_ip',
|
|
2529
|
+
ReviewEmail: 'review_email',
|
|
2530
|
+
AllowIp: 'allow_ip',
|
|
2531
|
+
AllowEmail: 'allow_email'
|
|
2532
|
+
};
|
|
1573
2533
|
/**
|
|
1574
2534
|
* FundingSourcesApi - axios parameter creator
|
|
1575
2535
|
* @export
|