tremendous 3.3.0 → 3.5.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/dist/api.js CHANGED
@@ -22,38 +22,28 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.RewardWithoutLinkDeliveryMethodEnum = exports.RewardWithLinkDeliveryStatusEnum = exports.RewardWithLinkDeliveryMethodEnum = exports.RewardValueCurrencyCodeEnum = exports.ProductCurrencyCodesEnum = exports.ProductCategoryEnum = exports.PaymentDetailsChannelEnum = exports.OrganizationStatusEnum = exports.OrderWithoutLinkStatusEnum = exports.OrderWithLinkStatusEnum = exports.OrderStatus = exports.OrderBasePaymentChannelEnum = exports.OrderBaseStatusEnum = exports.OrderStatusEnum = exports.MemberWithoutEventsStatusEnum = 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.InvoiceStatusEnum = exports.GetMember200ResponseMemberEventsInnerTypeEnum = exports.GetMember200ResponseMemberStatusEnum = exports.FundingSourceTypeEnum = exports.FundingSourceMethodEnum = exports.DeliveryStatus = exports.DeliveryMethod = exports.DeliveryDetailsWithLinkStatusEnum = exports.DeliveryDetailsWithLinkMethodEnum = exports.DeliveryDetailsStatusEnum = exports.DeliveryDetailsMethodEnum = exports.CurrencyCodes = exports.CreateOrganization200ResponseOrganizationStatusEnum = exports.CreateOrderRequestRewardDeliveryMethodEnum = exports.CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum = exports.CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum = exports.CreateOrder200ResponseOrderStatusEnum = void 0;
26
- 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 = exports.FundingSourcesApiFactory = exports.FundingSourcesApiFp = exports.FundingSourcesApiAxiosParamCreator = 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.RewardWithoutLinkDeliveryStatusEnum = void 0;
27
- exports.WebhooksApi = exports.WebhooksApiFactory = exports.WebhooksApiFp = exports.WebhooksApiAxiosParamCreator = exports.RolesApi = exports.RolesApiFactory = exports.RolesApiFp = void 0;
25
+ exports.MemberStatusEnum = exports.ListRewards200ResponseRewardsInnerValueCurrencyCodeEnum = exports.ListRewards200ResponseRewardsInnerDeliveryStatusEnum = exports.ListRewards200ResponseRewardsInnerDeliveryMethodEnum = exports.ListProductsResponseProductsInnerImagesInnerTypeEnum = exports.ListProductsResponseProductsInnerCurrencyCodesEnum = exports.ListProductsResponseProductsInnerCategoryEnum = exports.ListOrganizations200ResponseOrganizationsInnerStatusEnum = exports.ListOrders200ResponseOrdersInnerPaymentChannelEnum = exports.ListOrders200ResponseOrdersInnerChannelEnum = 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 = exports.Channel = void 0;
26
+ 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.SingleRewardOrderWithoutLinkOrderChannelEnum = 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.OrderWithoutLinkChannelEnum = exports.OrderWithoutLinkStatusEnum = exports.OrderStatus = exports.OrderBasePaymentChannelEnum = exports.OrderBaseChannelEnum = exports.OrderBaseStatusEnum = exports.OrderChannelEnum = exports.OrderStatusEnum = exports.MemberWithoutEventsStatusEnum = exports.MemberWithEventsStatusEnum = exports.MemberBaseStatusEnum = 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 = exports.FundingSourcesApiFactory = exports.FundingSourcesApiFp = exports.FundingSourcesApiAxiosParamCreator = exports.UpdateFraudRuleListRuleTypeEnum = exports.FraudRuleRuleTypeEnum = exports.DeleteFraudRuleRuleTypeEnum = 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'
34
+ /**
35
+ * Name of the channel in which the order was created
36
+ * @export
37
+ * @enum {string}
38
+ */
39
+ exports.Channel = {
40
+ Ui: 'UI',
41
+ Api: 'API',
42
+ Embed: 'EMBED',
43
+ Decipher: 'DECIPHER',
44
+ Qualtrics: 'QUALTRICS',
45
+ Typeform: 'TYPEFORM',
46
+ SurveyMonkey: 'SURVEY MONKEY'
57
47
  };
58
48
  exports.CreateOrganization200ResponseOrganizationStatusEnum = {
59
49
  Pending: 'PENDING',
@@ -194,17 +184,6 @@ exports.DeliveryDetailsStatusEnum = {
194
184
  Succeeded: 'SUCCEEDED',
195
185
  Pending: 'PENDING'
196
186
  };
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
187
  /**
209
188
  * 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
189
  * @export
@@ -226,6 +205,181 @@ exports.DeliveryStatus = {
226
205
  Succeeded: 'SUCCEEDED',
227
206
  Pending: 'PENDING'
228
207
  };
208
+ exports.FraudConfigCountryTypeEnum = {
209
+ Whitelist: 'whitelist',
210
+ Blacklist: 'blacklist'
211
+ };
212
+ exports.FraudConfigRedeemedRewardsAmountPeriodEnum = {
213
+ _7: '7',
214
+ _30: '30',
215
+ _90: '90',
216
+ _120: '120',
217
+ _365: '365',
218
+ AllTime: 'all_time'
219
+ };
220
+ exports.FraudConfigRedeemedRewardsCountPeriodEnum = {
221
+ _7: '7',
222
+ _30: '30',
223
+ _90: '90',
224
+ _120: '120',
225
+ _365: '365',
226
+ AllTime: 'all_time'
227
+ };
228
+ exports.FraudReviewStatusEnum = {
229
+ Flagged: 'flagged',
230
+ Blocked: 'blocked',
231
+ Released: 'released'
232
+ };
233
+ exports.FraudReviewReasonsEnum = {
234
+ DisallowedIp: 'Disallowed IP',
235
+ DisallowedEmail: 'Disallowed email',
236
+ DisallowedCountry: 'Disallowed country',
237
+ OverRewardDollarLimit: 'Over reward dollar limit',
238
+ OverRewardCountLimit: 'Over reward count limit',
239
+ VpnDetected: 'VPN detected',
240
+ DeviceRelatedToMultipleEmails: 'Device related to multiple emails',
241
+ DeviceOrAccountRelatedToMultipleEmails: 'Device or account related to multiple emails',
242
+ IpOnATremendousFraudList: 'IP on a Tremendous fraud list',
243
+ BankAccountOnATremendousFraudList: 'Bank account on a Tremendous fraud list',
244
+ FingerprintOnATremendousFraudList: 'Fingerprint on a Tremendous fraud list',
245
+ EmailOnATremendousFraudList: 'Email on a Tremendous fraud list',
246
+ PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list',
247
+ IpRelatedToABlockedReward: 'IP related to a blocked reward',
248
+ BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward',
249
+ FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward',
250
+ EmailRelatedToABlockedReward: 'Email related to a blocked reward',
251
+ PhoneRelatedToABlockedReward: 'Phone related to a blocked reward',
252
+ AllowedIp: 'Allowed IP',
253
+ AllowedEmail: 'Allowed email'
254
+ };
255
+ exports.FraudReviewRedemptionMethodEnum = {
256
+ Paypal: 'paypal',
257
+ Bank: 'bank',
258
+ MerchantCard: 'merchant card',
259
+ VisaCard: 'visa card',
260
+ Charity: 'charity',
261
+ Venmo: 'venmo'
262
+ };
263
+ exports.FraudReviewListItemStatusEnum = {
264
+ Flagged: 'flagged',
265
+ Blocked: 'blocked',
266
+ Released: 'released'
267
+ };
268
+ exports.FraudReviewListItemReasonsEnum = {
269
+ DisallowedIp: 'Disallowed IP',
270
+ DisallowedEmail: 'Disallowed email',
271
+ DisallowedCountry: 'Disallowed country',
272
+ OverRewardDollarLimit: 'Over reward dollar limit',
273
+ OverRewardCountLimit: 'Over reward count limit',
274
+ VpnDetected: 'VPN detected',
275
+ DeviceRelatedToMultipleEmails: 'Device related to multiple emails',
276
+ DeviceOrAccountRelatedToMultipleEmails: 'Device or account related to multiple emails',
277
+ IpOnATremendousFraudList: 'IP on a Tremendous fraud list',
278
+ BankAccountOnATremendousFraudList: 'Bank account on a Tremendous fraud list',
279
+ FingerprintOnATremendousFraudList: 'Fingerprint on a Tremendous fraud list',
280
+ EmailOnATremendousFraudList: 'Email on a Tremendous fraud list',
281
+ PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list',
282
+ IpRelatedToABlockedReward: 'IP related to a blocked reward',
283
+ BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward',
284
+ FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward',
285
+ EmailRelatedToABlockedReward: 'Email related to a blocked reward',
286
+ PhoneRelatedToABlockedReward: 'Phone related to a blocked reward',
287
+ AllowedIp: 'Allowed IP',
288
+ AllowedEmail: 'Allowed email'
289
+ };
290
+ /**
291
+ *
292
+ * @export
293
+ * @enum {string}
294
+ */
295
+ exports.FraudReviewReason = {
296
+ DisallowedIp: 'Disallowed IP',
297
+ DisallowedEmail: 'Disallowed email',
298
+ DisallowedCountry: 'Disallowed country',
299
+ OverRewardDollarLimit: 'Over reward dollar limit',
300
+ OverRewardCountLimit: 'Over reward count limit',
301
+ VpnDetected: 'VPN detected',
302
+ DeviceRelatedToMultipleEmails: 'Device related to multiple emails',
303
+ DeviceOrAccountRelatedToMultipleEmails: 'Device or account related to multiple emails',
304
+ IpOnATremendousFraudList: 'IP on a Tremendous fraud list',
305
+ BankAccountOnATremendousFraudList: 'Bank account on a Tremendous fraud list',
306
+ FingerprintOnATremendousFraudList: 'Fingerprint on a Tremendous fraud list',
307
+ EmailOnATremendousFraudList: 'Email on a Tremendous fraud list',
308
+ PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list',
309
+ IpRelatedToABlockedReward: 'IP related to a blocked reward',
310
+ BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward',
311
+ FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward',
312
+ EmailRelatedToABlockedReward: 'Email related to a blocked reward',
313
+ PhoneRelatedToABlockedReward: 'Phone related to a blocked reward',
314
+ AllowedIp: 'Allowed IP',
315
+ AllowedEmail: 'Allowed email'
316
+ };
317
+ /**
318
+ *
319
+ * @export
320
+ * @enum {string}
321
+ */
322
+ exports.FraudReviewRedemptionMethod = {
323
+ Paypal: 'paypal',
324
+ Bank: 'bank',
325
+ MerchantCard: 'merchant card',
326
+ VisaCard: 'visa card',
327
+ Charity: 'charity',
328
+ Venmo: 'venmo'
329
+ };
330
+ /**
331
+ * 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.
332
+ * @export
333
+ * @enum {string}
334
+ */
335
+ exports.FraudReviewStatus = {
336
+ Flagged: 'flagged',
337
+ Blocked: 'blocked',
338
+ Released: 'released'
339
+ };
340
+ exports.FraudRuleRequestConfigTypeEnum = {
341
+ Whitelist: 'whitelist',
342
+ Blacklist: 'blacklist'
343
+ };
344
+ exports.FraudRuleRequestConfigPeriodEnum = {
345
+ _7: '7',
346
+ _30: '30',
347
+ _90: '90',
348
+ _120: '120',
349
+ _365: '365',
350
+ AllTime: 'all_time'
351
+ };
352
+ /**
353
+ * * `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
354
+ * @export
355
+ * @enum {string}
356
+ */
357
+ exports.FraudRuleType = {
358
+ ReviewCountry: 'review_country',
359
+ ReviewIp: 'review_ip',
360
+ ReviewEmail: 'review_email',
361
+ ReviewRedeemedRewardsCount: 'review_redeemed_rewards_count',
362
+ ReviewRedeemedRewardsAmount: 'review_redeemed_rewards_amount',
363
+ ReviewMultipleEmails: 'review_multiple_emails',
364
+ ReviewVpn: 'review_vpn',
365
+ ReviewTremendousFlagList: 'review_tremendous_flag_list',
366
+ ReviewPreviouslyBlockedRecipients: 'review_previously_blocked_recipients',
367
+ AllowIp: 'allow_ip',
368
+ AllowEmail: 'allow_email'
369
+ };
370
+ exports.FraudRulesListItemRuleTypeEnum = {
371
+ ReviewCountry: 'review_country',
372
+ ReviewIp: 'review_ip',
373
+ ReviewEmail: 'review_email',
374
+ ReviewRedeemedRewardsCount: 'review_redeemed_rewards_count',
375
+ ReviewRedeemedRewardsAmount: 'review_redeemed_rewards_amount',
376
+ ReviewMultipleEmails: 'review_multiple_emails',
377
+ ReviewVpn: 'review_vpn',
378
+ ReviewTremendousFlagList: 'review_tremendous_flag_list',
379
+ ReviewPreviouslyBlockedRecipients: 'review_previously_blocked_recipients',
380
+ AllowIp: 'allow_ip',
381
+ AllowEmail: 'allow_email'
382
+ };
229
383
  exports.FundingSourceMethodEnum = {
230
384
  Balance: 'balance',
231
385
  BankAccount: 'bank_account',
@@ -237,6 +391,41 @@ exports.FundingSourceTypeEnum = {
237
391
  ProForma: 'PRO_FORMA',
238
392
  PrefundingOnly: 'PREFUNDING_ONLY'
239
393
  };
394
+ exports.GetFraudReview200ResponseFraudReviewStatusEnum = {
395
+ Flagged: 'flagged',
396
+ Blocked: 'blocked',
397
+ Released: 'released'
398
+ };
399
+ exports.GetFraudReview200ResponseFraudReviewReasonsEnum = {
400
+ DisallowedIp: 'Disallowed IP',
401
+ DisallowedEmail: 'Disallowed email',
402
+ DisallowedCountry: 'Disallowed country',
403
+ OverRewardDollarLimit: 'Over reward dollar limit',
404
+ OverRewardCountLimit: 'Over reward count limit',
405
+ VpnDetected: 'VPN detected',
406
+ DeviceRelatedToMultipleEmails: 'Device related to multiple emails',
407
+ DeviceOrAccountRelatedToMultipleEmails: 'Device or account related to multiple emails',
408
+ IpOnATremendousFraudList: 'IP on a Tremendous fraud list',
409
+ BankAccountOnATremendousFraudList: 'Bank account on a Tremendous fraud list',
410
+ FingerprintOnATremendousFraudList: 'Fingerprint on a Tremendous fraud list',
411
+ EmailOnATremendousFraudList: 'Email on a Tremendous fraud list',
412
+ PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list',
413
+ IpRelatedToABlockedReward: 'IP related to a blocked reward',
414
+ BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward',
415
+ FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward',
416
+ EmailRelatedToABlockedReward: 'Email related to a blocked reward',
417
+ PhoneRelatedToABlockedReward: 'Phone related to a blocked reward',
418
+ AllowedIp: 'Allowed IP',
419
+ AllowedEmail: 'Allowed email'
420
+ };
421
+ exports.GetFraudReview200ResponseFraudReviewRedemptionMethodEnum = {
422
+ Paypal: 'paypal',
423
+ Bank: 'bank',
424
+ MerchantCard: 'merchant card',
425
+ VisaCard: 'visa card',
426
+ Charity: 'charity',
427
+ Venmo: 'venmo'
428
+ };
240
429
  exports.GetMember200ResponseMemberStatusEnum = {
241
430
  Registered: 'REGISTERED',
242
431
  Invited: 'INVITED'
@@ -251,6 +440,46 @@ exports.InvoiceStatusEnum = {
251
440
  Open: 'OPEN',
252
441
  MarkedAsPaid: 'MARKED_AS_PAID'
253
442
  };
443
+ exports.ListFraudReviews200ResponseFraudReviewsInnerStatusEnum = {
444
+ Flagged: 'flagged',
445
+ Blocked: 'blocked',
446
+ Released: 'released'
447
+ };
448
+ exports.ListFraudReviews200ResponseFraudReviewsInnerReasonsEnum = {
449
+ DisallowedIp: 'Disallowed IP',
450
+ DisallowedEmail: 'Disallowed email',
451
+ DisallowedCountry: 'Disallowed country',
452
+ OverRewardDollarLimit: 'Over reward dollar limit',
453
+ OverRewardCountLimit: 'Over reward count limit',
454
+ VpnDetected: 'VPN detected',
455
+ DeviceRelatedToMultipleEmails: 'Device related to multiple emails',
456
+ DeviceOrAccountRelatedToMultipleEmails: 'Device or account related to multiple emails',
457
+ IpOnATremendousFraudList: 'IP on a Tremendous fraud list',
458
+ BankAccountOnATremendousFraudList: 'Bank account on a Tremendous fraud list',
459
+ FingerprintOnATremendousFraudList: 'Fingerprint on a Tremendous fraud list',
460
+ EmailOnATremendousFraudList: 'Email on a Tremendous fraud list',
461
+ PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list',
462
+ IpRelatedToABlockedReward: 'IP related to a blocked reward',
463
+ BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward',
464
+ FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward',
465
+ EmailRelatedToABlockedReward: 'Email related to a blocked reward',
466
+ PhoneRelatedToABlockedReward: 'Phone related to a blocked reward',
467
+ AllowedIp: 'Allowed IP',
468
+ AllowedEmail: 'Allowed email'
469
+ };
470
+ exports.ListFraudRules200ResponseFraudRulesInnerRuleTypeEnum = {
471
+ ReviewCountry: 'review_country',
472
+ ReviewIp: 'review_ip',
473
+ ReviewEmail: 'review_email',
474
+ ReviewRedeemedRewardsCount: 'review_redeemed_rewards_count',
475
+ ReviewRedeemedRewardsAmount: 'review_redeemed_rewards_amount',
476
+ ReviewMultipleEmails: 'review_multiple_emails',
477
+ ReviewVpn: 'review_vpn',
478
+ ReviewTremendousFlagList: 'review_tremendous_flag_list',
479
+ ReviewPreviouslyBlockedRecipients: 'review_previously_blocked_recipients',
480
+ AllowIp: 'allow_ip',
481
+ AllowEmail: 'allow_email'
482
+ };
254
483
  exports.ListFundingSources200ResponseFundingSourcesInnerMethodEnum = {
255
484
  Balance: 'balance',
256
485
  BankAccount: 'bank_account',
@@ -296,6 +525,15 @@ exports.ListOrders200ResponseOrdersInnerStatusEnum = {
296
525
  PendingApproval: 'PENDING APPROVAL',
297
526
  PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL'
298
527
  };
528
+ exports.ListOrders200ResponseOrdersInnerChannelEnum = {
529
+ Ui: 'UI',
530
+ Api: 'API',
531
+ Embed: 'EMBED',
532
+ Decipher: 'DECIPHER',
533
+ Qualtrics: 'QUALTRICS',
534
+ Typeform: 'TYPEFORM',
535
+ SurveyMonkey: 'SURVEY MONKEY'
536
+ };
299
537
  exports.ListOrders200ResponseOrdersInnerPaymentChannelEnum = {
300
538
  Ui: 'UI',
301
539
  Api: 'API',
@@ -593,6 +831,15 @@ exports.OrderStatusEnum = {
593
831
  PendingApproval: 'PENDING APPROVAL',
594
832
  PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL'
595
833
  };
834
+ exports.OrderChannelEnum = {
835
+ Ui: 'UI',
836
+ Api: 'API',
837
+ Embed: 'EMBED',
838
+ Decipher: 'DECIPHER',
839
+ Qualtrics: 'QUALTRICS',
840
+ Typeform: 'TYPEFORM',
841
+ SurveyMonkey: 'SURVEY MONKEY'
842
+ };
596
843
  exports.OrderBaseStatusEnum = {
597
844
  Canceled: 'CANCELED',
598
845
  Cart: 'CART',
@@ -601,6 +848,15 @@ exports.OrderBaseStatusEnum = {
601
848
  PendingApproval: 'PENDING APPROVAL',
602
849
  PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL'
603
850
  };
851
+ exports.OrderBaseChannelEnum = {
852
+ Ui: 'UI',
853
+ Api: 'API',
854
+ Embed: 'EMBED',
855
+ Decipher: 'DECIPHER',
856
+ Qualtrics: 'QUALTRICS',
857
+ Typeform: 'TYPEFORM',
858
+ SurveyMonkey: 'SURVEY MONKEY'
859
+ };
604
860
  exports.OrderBasePaymentChannelEnum = {
605
861
  Ui: 'UI',
606
862
  Api: 'API',
@@ -623,14 +879,6 @@ exports.OrderStatus = {
623
879
  PendingApproval: 'PENDING APPROVAL',
624
880
  PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL'
625
881
  };
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
882
  exports.OrderWithoutLinkStatusEnum = {
635
883
  Canceled: 'CANCELED',
636
884
  Cart: 'CART',
@@ -639,6 +887,15 @@ exports.OrderWithoutLinkStatusEnum = {
639
887
  PendingApproval: 'PENDING APPROVAL',
640
888
  PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL'
641
889
  };
890
+ exports.OrderWithoutLinkChannelEnum = {
891
+ Ui: 'UI',
892
+ Api: 'API',
893
+ Embed: 'EMBED',
894
+ Decipher: 'DECIPHER',
895
+ Qualtrics: 'QUALTRICS',
896
+ Typeform: 'TYPEFORM',
897
+ SurveyMonkey: 'SURVEY MONKEY'
898
+ };
642
899
  exports.OrganizationStatusEnum = {
643
900
  Pending: 'PENDING',
644
901
  Approved: 'APPROVED',
@@ -779,6 +1036,26 @@ exports.ProductCurrencyCodesEnum = {
779
1036
  Zar: 'ZAR',
780
1037
  Zmk: 'ZMK'
781
1038
  };
1039
+ exports.ReviewCountryTypeEnum = {
1040
+ Whitelist: 'whitelist',
1041
+ Blacklist: 'blacklist'
1042
+ };
1043
+ exports.ReviewRedeemedRewardsAmountPeriodEnum = {
1044
+ _7: '7',
1045
+ _30: '30',
1046
+ _90: '90',
1047
+ _120: '120',
1048
+ _365: '365',
1049
+ AllTime: 'all_time'
1050
+ };
1051
+ exports.ReviewRedeemedRewardsCountPeriodEnum = {
1052
+ _7: '7',
1053
+ _30: '30',
1054
+ _90: '90',
1055
+ _120: '120',
1056
+ _365: '365',
1057
+ AllTime: 'all_time'
1058
+ };
782
1059
  exports.RewardValueCurrencyCodeEnum = {
783
1060
  Usd: 'USD',
784
1061
  Cad: 'CAD',
@@ -897,27 +1174,42 @@ exports.RewardValueCurrencyCodeEnum = {
897
1174
  Zar: 'ZAR',
898
1175
  Zmk: 'ZMK'
899
1176
  };
900
- exports.RewardWithLinkDeliveryMethodEnum = {
1177
+ exports.RewardWithoutLinkDeliveryMethodEnum = {
901
1178
  Email: 'EMAIL',
902
1179
  Link: 'LINK',
903
1180
  Phone: 'PHONE'
904
1181
  };
905
- exports.RewardWithLinkDeliveryStatusEnum = {
1182
+ exports.RewardWithoutLinkDeliveryStatusEnum = {
906
1183
  Scheduled: 'SCHEDULED',
907
1184
  Failed: 'FAILED',
908
1185
  Succeeded: 'SUCCEEDED',
909
1186
  Pending: 'PENDING'
910
1187
  };
911
- exports.RewardWithoutLinkDeliveryMethodEnum = {
1188
+ exports.SingleRewardOrder1RewardDeliveryMethodEnum = {
912
1189
  Email: 'EMAIL',
913
1190
  Link: 'LINK',
914
1191
  Phone: 'PHONE'
915
1192
  };
916
- exports.RewardWithoutLinkDeliveryStatusEnum = {
917
- Scheduled: 'SCHEDULED',
1193
+ exports.SingleRewardOrderWithoutLinkOrderStatusEnum = {
1194
+ Canceled: 'CANCELED',
1195
+ Cart: 'CART',
1196
+ Executed: 'EXECUTED',
918
1197
  Failed: 'FAILED',
919
- Succeeded: 'SUCCEEDED',
920
- Pending: 'PENDING'
1198
+ PendingApproval: 'PENDING APPROVAL',
1199
+ PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL'
1200
+ };
1201
+ exports.SingleRewardOrderWithoutLinkOrderChannelEnum = {
1202
+ Ui: 'UI',
1203
+ Api: 'API',
1204
+ Embed: 'EMBED',
1205
+ Decipher: 'DECIPHER',
1206
+ Qualtrics: 'QUALTRICS',
1207
+ Typeform: 'TYPEFORM',
1208
+ SurveyMonkey: 'SURVEY MONKEY'
1209
+ };
1210
+ exports.UpdateFraudRuleListRequestOperationEnum = {
1211
+ Add: 'add',
1212
+ Remove: 'remove'
921
1213
  };
922
1214
  /**
923
1215
  * BalanceTransactionsApi - axios parameter creator
@@ -1570,6 +1862,733 @@ class ForexApi extends base_1.BaseAPI {
1570
1862
  }
1571
1863
  }
1572
1864
  exports.ForexApi = ForexApi;
1865
+ /**
1866
+ * FraudReviewsApi - axios parameter creator
1867
+ * @export
1868
+ */
1869
+ const FraudReviewsApiAxiosParamCreator = function (configuration) {
1870
+ return {
1871
+ /**
1872
+ * Completes the fraud review identified by the given `id` in the URL, and blocks the reward. The reward is canceled and the amount refunded.
1873
+ * @summary Block fraud review
1874
+ * @param {string} id The ID of the reward that should be blocked.
1875
+ * @param {*} [options] Override http request option.
1876
+ * @throws {RequiredError}
1877
+ */
1878
+ blockFraudReview: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
1879
+ // verify required parameter 'id' is not null or undefined
1880
+ (0, common_1.assertParamExists)('blockFraudReview', 'id', id);
1881
+ const localVarPath = `/fraud_reviews/{id}/block`
1882
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1883
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1884
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1885
+ let baseOptions;
1886
+ if (configuration) {
1887
+ baseOptions = configuration.baseOptions;
1888
+ }
1889
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
1890
+ const localVarHeaderParameter = {};
1891
+ const localVarQueryParameter = {};
1892
+ // authentication BearerApiKey required
1893
+ // http bearer authentication required
1894
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1895
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1896
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1897
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1898
+ return {
1899
+ url: (0, common_1.toPathString)(localVarUrlObj),
1900
+ options: localVarRequestOptions,
1901
+ };
1902
+ }),
1903
+ /**
1904
+ * 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.
1905
+ * @summary Retrieve single fraud review
1906
+ * @param {string} id The ID of the reward that should be retrieved.
1907
+ * @param {*} [options] Override http request option.
1908
+ * @throws {RequiredError}
1909
+ */
1910
+ getFraudReview: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
1911
+ // verify required parameter 'id' is not null or undefined
1912
+ (0, common_1.assertParamExists)('getFraudReview', 'id', id);
1913
+ const localVarPath = `/fraud_reviews/{id}`
1914
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1915
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1916
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1917
+ let baseOptions;
1918
+ if (configuration) {
1919
+ baseOptions = configuration.baseOptions;
1920
+ }
1921
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1922
+ const localVarHeaderParameter = {};
1923
+ const localVarQueryParameter = {};
1924
+ // authentication BearerApiKey required
1925
+ // http bearer authentication required
1926
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1927
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1928
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1929
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1930
+ return {
1931
+ url: (0, common_1.toPathString)(localVarUrlObj),
1932
+ options: localVarRequestOptions,
1933
+ };
1934
+ }),
1935
+ /**
1936
+ * Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates.
1937
+ * @summary List fraud reviews
1938
+ * @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).
1939
+ * @param {number} [limit] Limits the number of fraud reviews listed. The default value is 10.
1940
+ * @param {ListFraudReviewsStatusEnum} [status] Filters fraud reviews by status. Can be &#x60;flagged&#x60;, &#x60;blocked&#x60; or &#x60;released&#x60;.
1941
+ * @param {string} [createdAtGte] Return results where the created_at field is &gt;&#x3D; to the supplied value. Expects an ISO 8601 datetime.
1942
+ * @param {string} [createdAtLte] Return results where the created_at field is &lt;&#x3D; to the supplied value. Expects an ISO 8601 datetime.
1943
+ * @param {string} [redeemedAtGte] Return results where the redeemed_at field is &gt;&#x3D; the supplied value. Expects an ISO 8601 datetime.
1944
+ * @param {string} [redeemedAtLte] Return results where the redeemed_at field is &lt;&#x3D; the supplied value. Expects an ISO 8601 datetime.
1945
+ * @param {*} [options] Override http request option.
1946
+ * @throws {RequiredError}
1947
+ */
1948
+ 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 = {}) {
1949
+ const localVarPath = `/fraud_reviews`;
1950
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1951
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1952
+ let baseOptions;
1953
+ if (configuration) {
1954
+ baseOptions = configuration.baseOptions;
1955
+ }
1956
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1957
+ const localVarHeaderParameter = {};
1958
+ const localVarQueryParameter = {};
1959
+ // authentication BearerApiKey required
1960
+ // http bearer authentication required
1961
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1962
+ if (offset !== undefined) {
1963
+ localVarQueryParameter['offset'] = offset;
1964
+ }
1965
+ if (limit !== undefined) {
1966
+ localVarQueryParameter['limit'] = limit;
1967
+ }
1968
+ if (status !== undefined) {
1969
+ localVarQueryParameter['status'] = status;
1970
+ }
1971
+ if (createdAtGte !== undefined) {
1972
+ localVarQueryParameter['created_at[gte]'] = createdAtGte;
1973
+ }
1974
+ if (createdAtLte !== undefined) {
1975
+ localVarQueryParameter['created_at[lte]'] = createdAtLte;
1976
+ }
1977
+ if (redeemedAtGte !== undefined) {
1978
+ localVarQueryParameter['redeemed_at[gte]'] = redeemedAtGte;
1979
+ }
1980
+ if (redeemedAtLte !== undefined) {
1981
+ localVarQueryParameter['redeemed_at[lte]'] = redeemedAtLte;
1982
+ }
1983
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1984
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1985
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1986
+ return {
1987
+ url: (0, common_1.toPathString)(localVarUrlObj),
1988
+ options: localVarRequestOptions,
1989
+ };
1990
+ }),
1991
+ /**
1992
+ * Completes the fraud review identified by the given `id` in the URL, and releases the associated reward to the recipient.
1993
+ * @summary Release fraud review
1994
+ * @param {string} id The ID of the reward that should be released.
1995
+ * @param {*} [options] Override http request option.
1996
+ * @throws {RequiredError}
1997
+ */
1998
+ releaseFraudReview: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
1999
+ // verify required parameter 'id' is not null or undefined
2000
+ (0, common_1.assertParamExists)('releaseFraudReview', 'id', id);
2001
+ const localVarPath = `/fraud_reviews/{id}/release`
2002
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2003
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2004
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2005
+ let baseOptions;
2006
+ if (configuration) {
2007
+ baseOptions = configuration.baseOptions;
2008
+ }
2009
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2010
+ const localVarHeaderParameter = {};
2011
+ const localVarQueryParameter = {};
2012
+ // authentication BearerApiKey required
2013
+ // http bearer authentication required
2014
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2015
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2016
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2017
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2018
+ return {
2019
+ url: (0, common_1.toPathString)(localVarUrlObj),
2020
+ options: localVarRequestOptions,
2021
+ };
2022
+ }),
2023
+ };
2024
+ };
2025
+ exports.FraudReviewsApiAxiosParamCreator = FraudReviewsApiAxiosParamCreator;
2026
+ /**
2027
+ * FraudReviewsApi - functional programming interface
2028
+ * @export
2029
+ */
2030
+ const FraudReviewsApiFp = function (configuration) {
2031
+ const localVarAxiosParamCreator = (0, exports.FraudReviewsApiAxiosParamCreator)(configuration);
2032
+ return {
2033
+ /**
2034
+ * Completes the fraud review identified by the given `id` in the URL, and blocks the reward. The reward is canceled and the amount refunded.
2035
+ * @summary Block fraud review
2036
+ * @param {string} id The ID of the reward that should be blocked.
2037
+ * @param {*} [options] Override http request option.
2038
+ * @throws {RequiredError}
2039
+ */
2040
+ blockFraudReview(id, options) {
2041
+ return __awaiter(this, void 0, void 0, function* () {
2042
+ var _a, _b, _c;
2043
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.blockFraudReview(id, options);
2044
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2045
+ 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;
2046
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2047
+ });
2048
+ },
2049
+ /**
2050
+ * 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.
2051
+ * @summary Retrieve single fraud review
2052
+ * @param {string} id The ID of the reward that should be retrieved.
2053
+ * @param {*} [options] Override http request option.
2054
+ * @throws {RequiredError}
2055
+ */
2056
+ getFraudReview(id, options) {
2057
+ return __awaiter(this, void 0, void 0, function* () {
2058
+ var _a, _b, _c;
2059
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getFraudReview(id, options);
2060
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2061
+ 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;
2062
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2063
+ });
2064
+ },
2065
+ /**
2066
+ * Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates.
2067
+ * @summary List fraud reviews
2068
+ * @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).
2069
+ * @param {number} [limit] Limits the number of fraud reviews listed. The default value is 10.
2070
+ * @param {ListFraudReviewsStatusEnum} [status] Filters fraud reviews by status. Can be &#x60;flagged&#x60;, &#x60;blocked&#x60; or &#x60;released&#x60;.
2071
+ * @param {string} [createdAtGte] Return results where the created_at field is &gt;&#x3D; to the supplied value. Expects an ISO 8601 datetime.
2072
+ * @param {string} [createdAtLte] Return results where the created_at field is &lt;&#x3D; to the supplied value. Expects an ISO 8601 datetime.
2073
+ * @param {string} [redeemedAtGte] Return results where the redeemed_at field is &gt;&#x3D; the supplied value. Expects an ISO 8601 datetime.
2074
+ * @param {string} [redeemedAtLte] Return results where the redeemed_at field is &lt;&#x3D; the supplied value. Expects an ISO 8601 datetime.
2075
+ * @param {*} [options] Override http request option.
2076
+ * @throws {RequiredError}
2077
+ */
2078
+ listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options) {
2079
+ return __awaiter(this, void 0, void 0, function* () {
2080
+ var _a, _b, _c;
2081
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options);
2082
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2083
+ 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;
2084
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2085
+ });
2086
+ },
2087
+ /**
2088
+ * Completes the fraud review identified by the given `id` in the URL, and releases the associated reward to the recipient.
2089
+ * @summary Release fraud review
2090
+ * @param {string} id The ID of the reward that should be released.
2091
+ * @param {*} [options] Override http request option.
2092
+ * @throws {RequiredError}
2093
+ */
2094
+ releaseFraudReview(id, options) {
2095
+ return __awaiter(this, void 0, void 0, function* () {
2096
+ var _a, _b, _c;
2097
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.releaseFraudReview(id, options);
2098
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2099
+ 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;
2100
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2101
+ });
2102
+ },
2103
+ };
2104
+ };
2105
+ exports.FraudReviewsApiFp = FraudReviewsApiFp;
2106
+ /**
2107
+ * FraudReviewsApi - factory interface
2108
+ * @export
2109
+ */
2110
+ const FraudReviewsApiFactory = function (configuration, basePath, axios) {
2111
+ const localVarFp = (0, exports.FraudReviewsApiFp)(configuration);
2112
+ return {
2113
+ /**
2114
+ * Completes the fraud review identified by the given `id` in the URL, and blocks the reward. The reward is canceled and the amount refunded.
2115
+ * @summary Block fraud review
2116
+ * @param {string} id The ID of the reward that should be blocked.
2117
+ * @param {*} [options] Override http request option.
2118
+ * @throws {RequiredError}
2119
+ */
2120
+ blockFraudReview(id, options) {
2121
+ return localVarFp.blockFraudReview(id, options).then((request) => request(axios, basePath));
2122
+ },
2123
+ /**
2124
+ * 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.
2125
+ * @summary Retrieve single fraud review
2126
+ * @param {string} id The ID of the reward that should be retrieved.
2127
+ * @param {*} [options] Override http request option.
2128
+ * @throws {RequiredError}
2129
+ */
2130
+ getFraudReview(id, options) {
2131
+ return localVarFp.getFraudReview(id, options).then((request) => request(axios, basePath));
2132
+ },
2133
+ /**
2134
+ * Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates.
2135
+ * @summary List fraud reviews
2136
+ * @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).
2137
+ * @param {number} [limit] Limits the number of fraud reviews listed. The default value is 10.
2138
+ * @param {ListFraudReviewsStatusEnum} [status] Filters fraud reviews by status. Can be &#x60;flagged&#x60;, &#x60;blocked&#x60; or &#x60;released&#x60;.
2139
+ * @param {string} [createdAtGte] Return results where the created_at field is &gt;&#x3D; to the supplied value. Expects an ISO 8601 datetime.
2140
+ * @param {string} [createdAtLte] Return results where the created_at field is &lt;&#x3D; to the supplied value. Expects an ISO 8601 datetime.
2141
+ * @param {string} [redeemedAtGte] Return results where the redeemed_at field is &gt;&#x3D; the supplied value. Expects an ISO 8601 datetime.
2142
+ * @param {string} [redeemedAtLte] Return results where the redeemed_at field is &lt;&#x3D; the supplied value. Expects an ISO 8601 datetime.
2143
+ * @param {*} [options] Override http request option.
2144
+ * @throws {RequiredError}
2145
+ */
2146
+ listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options) {
2147
+ return localVarFp.listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options).then((request) => request(axios, 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
+ */
2156
+ releaseFraudReview(id, options) {
2157
+ return localVarFp.releaseFraudReview(id, options).then((request) => request(axios, basePath));
2158
+ },
2159
+ };
2160
+ };
2161
+ exports.FraudReviewsApiFactory = FraudReviewsApiFactory;
2162
+ /**
2163
+ * FraudReviewsApi - object-oriented interface
2164
+ * @export
2165
+ * @class FraudReviewsApi
2166
+ * @extends {BaseAPI}
2167
+ */
2168
+ class FraudReviewsApi extends base_1.BaseAPI {
2169
+ /**
2170
+ * Completes the fraud review identified by the given `id` in the URL, and blocks the reward. The reward is canceled and the amount refunded.
2171
+ * @summary Block fraud review
2172
+ * @param {string} id The ID of the reward that should be blocked.
2173
+ * @param {*} [options] Override http request option.
2174
+ * @throws {RequiredError}
2175
+ * @memberof FraudReviewsApi
2176
+ */
2177
+ blockFraudReview(id, options) {
2178
+ return (0, exports.FraudReviewsApiFp)(this.configuration).blockFraudReview(id, options).then((request) => request(this.axios, this.basePath));
2179
+ }
2180
+ /**
2181
+ * 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.
2182
+ * @summary Retrieve single fraud review
2183
+ * @param {string} id The ID of the reward that should be retrieved.
2184
+ * @param {*} [options] Override http request option.
2185
+ * @throws {RequiredError}
2186
+ * @memberof FraudReviewsApi
2187
+ */
2188
+ getFraudReview(id, options) {
2189
+ return (0, exports.FraudReviewsApiFp)(this.configuration).getFraudReview(id, options).then((request) => request(this.axios, this.basePath));
2190
+ }
2191
+ /**
2192
+ * Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates.
2193
+ * @summary List fraud reviews
2194
+ * @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).
2195
+ * @param {number} [limit] Limits the number of fraud reviews listed. The default value is 10.
2196
+ * @param {ListFraudReviewsStatusEnum} [status] Filters fraud reviews by status. Can be &#x60;flagged&#x60;, &#x60;blocked&#x60; or &#x60;released&#x60;.
2197
+ * @param {string} [createdAtGte] Return results where the created_at field is &gt;&#x3D; to the supplied value. Expects an ISO 8601 datetime.
2198
+ * @param {string} [createdAtLte] Return results where the created_at field is &lt;&#x3D; to the supplied value. Expects an ISO 8601 datetime.
2199
+ * @param {string} [redeemedAtGte] Return results where the redeemed_at field is &gt;&#x3D; the supplied value. Expects an ISO 8601 datetime.
2200
+ * @param {string} [redeemedAtLte] Return results where the redeemed_at field is &lt;&#x3D; the supplied value. Expects an ISO 8601 datetime.
2201
+ * @param {*} [options] Override http request option.
2202
+ * @throws {RequiredError}
2203
+ * @memberof FraudReviewsApi
2204
+ */
2205
+ listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options) {
2206
+ return (0, exports.FraudReviewsApiFp)(this.configuration).listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options).then((request) => request(this.axios, this.basePath));
2207
+ }
2208
+ /**
2209
+ * Completes the fraud review identified by the given `id` in the URL, and releases the associated reward to the recipient.
2210
+ * @summary Release fraud review
2211
+ * @param {string} id The ID of the reward that should be released.
2212
+ * @param {*} [options] Override http request option.
2213
+ * @throws {RequiredError}
2214
+ * @memberof FraudReviewsApi
2215
+ */
2216
+ releaseFraudReview(id, options) {
2217
+ return (0, exports.FraudReviewsApiFp)(this.configuration).releaseFraudReview(id, options).then((request) => request(this.axios, this.basePath));
2218
+ }
2219
+ }
2220
+ exports.FraudReviewsApi = FraudReviewsApi;
2221
+ /**
2222
+ * @export
2223
+ */
2224
+ exports.ListFraudReviewsStatusEnum = {
2225
+ Flagged: 'flagged',
2226
+ Blocked: 'blocked',
2227
+ Released: 'released'
2228
+ };
2229
+ /**
2230
+ * FraudRulesApi - axios parameter creator
2231
+ * @export
2232
+ */
2233
+ const FraudRulesApiAxiosParamCreator = function (configuration) {
2234
+ return {
2235
+ /**
2236
+ * Deletes the rule of the type passed in the URL.
2237
+ * @summary Delete fraud rule
2238
+ * @param {DeleteFraudRuleRuleTypeEnum} ruleType The rule type to create or update.
2239
+ * @param {*} [options] Override http request option.
2240
+ * @throws {RequiredError}
2241
+ */
2242
+ deleteFraudRule: (ruleType_1, ...args_1) => __awaiter(this, [ruleType_1, ...args_1], void 0, function* (ruleType, options = {}) {
2243
+ // verify required parameter 'ruleType' is not null or undefined
2244
+ (0, common_1.assertParamExists)('deleteFraudRule', 'ruleType', ruleType);
2245
+ const localVarPath = `/fraud_rules/{rule_type}`
2246
+ .replace(`{${"rule_type"}}`, encodeURIComponent(String(ruleType)));
2247
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2248
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2249
+ let baseOptions;
2250
+ if (configuration) {
2251
+ baseOptions = configuration.baseOptions;
2252
+ }
2253
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
2254
+ const localVarHeaderParameter = {};
2255
+ const localVarQueryParameter = {};
2256
+ // authentication BearerApiKey required
2257
+ // http bearer authentication required
2258
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2259
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2260
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2261
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2262
+ return {
2263
+ url: (0, common_1.toPathString)(localVarUrlObj),
2264
+ options: localVarRequestOptions,
2265
+ };
2266
+ }),
2267
+ /**
2268
+ * Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten.
2269
+ * @summary Configure fraud rule
2270
+ * @param {FraudRuleRuleTypeEnum} ruleType The rule type to create or update.
2271
+ * @param {FraudRuleRequest} [fraudRuleRequest] Rules &#x60;review_multiple_emails&#x60;, &#x60;review_vpn&#x60;, &#x60;review_tremendous_flaglist&#x60;, and &#x60;review_previously_blocked_recipients&#x60; require no body.
2272
+ * @param {*} [options] Override http request option.
2273
+ * @throws {RequiredError}
2274
+ */
2275
+ fraudRule: (ruleType_1, fraudRuleRequest_1, ...args_1) => __awaiter(this, [ruleType_1, fraudRuleRequest_1, ...args_1], void 0, function* (ruleType, fraudRuleRequest, options = {}) {
2276
+ // verify required parameter 'ruleType' is not null or undefined
2277
+ (0, common_1.assertParamExists)('fraudRule', 'ruleType', ruleType);
2278
+ const localVarPath = `/fraud_rules/{rule_type}`
2279
+ .replace(`{${"rule_type"}}`, encodeURIComponent(String(ruleType)));
2280
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2281
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2282
+ let baseOptions;
2283
+ if (configuration) {
2284
+ baseOptions = configuration.baseOptions;
2285
+ }
2286
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2287
+ const localVarHeaderParameter = {};
2288
+ const localVarQueryParameter = {};
2289
+ // authentication BearerApiKey required
2290
+ // http bearer authentication required
2291
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2292
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2293
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2294
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2295
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2296
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(fraudRuleRequest, localVarRequestOptions, configuration);
2297
+ return {
2298
+ url: (0, common_1.toPathString)(localVarUrlObj),
2299
+ options: localVarRequestOptions,
2300
+ };
2301
+ }),
2302
+ /**
2303
+ * List active fraud rules associated with the organization tied to your API key.
2304
+ * @summary List fraud rules
2305
+ * @param {*} [options] Override http request option.
2306
+ * @throws {RequiredError}
2307
+ */
2308
+ listFraudRules: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
2309
+ const localVarPath = `/fraud_rules`;
2310
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2311
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2312
+ let baseOptions;
2313
+ if (configuration) {
2314
+ baseOptions = configuration.baseOptions;
2315
+ }
2316
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2317
+ const localVarHeaderParameter = {};
2318
+ const localVarQueryParameter = {};
2319
+ // authentication BearerApiKey required
2320
+ // http bearer authentication required
2321
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2322
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2323
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2324
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2325
+ return {
2326
+ url: (0, common_1.toPathString)(localVarUrlObj),
2327
+ options: localVarRequestOptions,
2328
+ };
2329
+ }),
2330
+ /**
2331
+ * 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\"] } } ```
2332
+ * @summary Update fraud rule list
2333
+ * @param {UpdateFraudRuleListRuleTypeEnum} ruleType The rule type to create or update.
2334
+ * @param {UpdateFraudRuleListRequest} updateFraudRuleListRequest The lists to add or remove from the current configuration
2335
+ * @param {*} [options] Override http request option.
2336
+ * @throws {RequiredError}
2337
+ */
2338
+ updateFraudRuleList: (ruleType_1, updateFraudRuleListRequest_1, ...args_1) => __awaiter(this, [ruleType_1, updateFraudRuleListRequest_1, ...args_1], void 0, function* (ruleType, updateFraudRuleListRequest, options = {}) {
2339
+ // verify required parameter 'ruleType' is not null or undefined
2340
+ (0, common_1.assertParamExists)('updateFraudRuleList', 'ruleType', ruleType);
2341
+ // verify required parameter 'updateFraudRuleListRequest' is not null or undefined
2342
+ (0, common_1.assertParamExists)('updateFraudRuleList', 'updateFraudRuleListRequest', updateFraudRuleListRequest);
2343
+ const localVarPath = `/fraud_rules/{rule_type}/update_list`
2344
+ .replace(`{${"rule_type"}}`, encodeURIComponent(String(ruleType)));
2345
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2346
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2347
+ let baseOptions;
2348
+ if (configuration) {
2349
+ baseOptions = configuration.baseOptions;
2350
+ }
2351
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2352
+ const localVarHeaderParameter = {};
2353
+ const localVarQueryParameter = {};
2354
+ // authentication BearerApiKey required
2355
+ // http bearer authentication required
2356
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2357
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2358
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2359
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2360
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2361
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateFraudRuleListRequest, localVarRequestOptions, configuration);
2362
+ return {
2363
+ url: (0, common_1.toPathString)(localVarUrlObj),
2364
+ options: localVarRequestOptions,
2365
+ };
2366
+ }),
2367
+ };
2368
+ };
2369
+ exports.FraudRulesApiAxiosParamCreator = FraudRulesApiAxiosParamCreator;
2370
+ /**
2371
+ * FraudRulesApi - functional programming interface
2372
+ * @export
2373
+ */
2374
+ const FraudRulesApiFp = function (configuration) {
2375
+ const localVarAxiosParamCreator = (0, exports.FraudRulesApiAxiosParamCreator)(configuration);
2376
+ return {
2377
+ /**
2378
+ * Deletes the rule of the type passed in the URL.
2379
+ * @summary Delete fraud rule
2380
+ * @param {DeleteFraudRuleRuleTypeEnum} ruleType The rule type to create or update.
2381
+ * @param {*} [options] Override http request option.
2382
+ * @throws {RequiredError}
2383
+ */
2384
+ deleteFraudRule(ruleType, options) {
2385
+ return __awaiter(this, void 0, void 0, function* () {
2386
+ var _a, _b, _c;
2387
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteFraudRule(ruleType, options);
2388
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2389
+ 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;
2390
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2391
+ });
2392
+ },
2393
+ /**
2394
+ * Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten.
2395
+ * @summary Configure fraud rule
2396
+ * @param {FraudRuleRuleTypeEnum} ruleType The rule type to create or update.
2397
+ * @param {FraudRuleRequest} [fraudRuleRequest] Rules &#x60;review_multiple_emails&#x60;, &#x60;review_vpn&#x60;, &#x60;review_tremendous_flaglist&#x60;, and &#x60;review_previously_blocked_recipients&#x60; require no body.
2398
+ * @param {*} [options] Override http request option.
2399
+ * @throws {RequiredError}
2400
+ */
2401
+ fraudRule(ruleType, fraudRuleRequest, options) {
2402
+ return __awaiter(this, void 0, void 0, function* () {
2403
+ var _a, _b, _c;
2404
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.fraudRule(ruleType, fraudRuleRequest, options);
2405
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2406
+ 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;
2407
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2408
+ });
2409
+ },
2410
+ /**
2411
+ * List active fraud rules associated with the organization tied to your API key.
2412
+ * @summary List fraud rules
2413
+ * @param {*} [options] Override http request option.
2414
+ * @throws {RequiredError}
2415
+ */
2416
+ listFraudRules(options) {
2417
+ return __awaiter(this, void 0, void 0, function* () {
2418
+ var _a, _b, _c;
2419
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listFraudRules(options);
2420
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2421
+ 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;
2422
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2423
+ });
2424
+ },
2425
+ /**
2426
+ * 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\"] } } ```
2427
+ * @summary Update fraud rule list
2428
+ * @param {UpdateFraudRuleListRuleTypeEnum} ruleType The rule type to create or update.
2429
+ * @param {UpdateFraudRuleListRequest} updateFraudRuleListRequest The lists to add or remove from the current configuration
2430
+ * @param {*} [options] Override http request option.
2431
+ * @throws {RequiredError}
2432
+ */
2433
+ updateFraudRuleList(ruleType, updateFraudRuleListRequest, options) {
2434
+ return __awaiter(this, void 0, void 0, function* () {
2435
+ var _a, _b, _c;
2436
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateFraudRuleList(ruleType, updateFraudRuleListRequest, options);
2437
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2438
+ 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;
2439
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2440
+ });
2441
+ },
2442
+ };
2443
+ };
2444
+ exports.FraudRulesApiFp = FraudRulesApiFp;
2445
+ /**
2446
+ * FraudRulesApi - factory interface
2447
+ * @export
2448
+ */
2449
+ const FraudRulesApiFactory = function (configuration, basePath, axios) {
2450
+ const localVarFp = (0, exports.FraudRulesApiFp)(configuration);
2451
+ return {
2452
+ /**
2453
+ * Deletes the rule of the type passed in the URL.
2454
+ * @summary Delete fraud rule
2455
+ * @param {DeleteFraudRuleRuleTypeEnum} ruleType The rule type to create or update.
2456
+ * @param {*} [options] Override http request option.
2457
+ * @throws {RequiredError}
2458
+ */
2459
+ deleteFraudRule(ruleType, options) {
2460
+ return localVarFp.deleteFraudRule(ruleType, options).then((request) => request(axios, basePath));
2461
+ },
2462
+ /**
2463
+ * Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten.
2464
+ * @summary Configure fraud rule
2465
+ * @param {FraudRuleRuleTypeEnum} ruleType The rule type to create or update.
2466
+ * @param {FraudRuleRequest} [fraudRuleRequest] Rules &#x60;review_multiple_emails&#x60;, &#x60;review_vpn&#x60;, &#x60;review_tremendous_flaglist&#x60;, and &#x60;review_previously_blocked_recipients&#x60; require no body.
2467
+ * @param {*} [options] Override http request option.
2468
+ * @throws {RequiredError}
2469
+ */
2470
+ fraudRule(ruleType, fraudRuleRequest, options) {
2471
+ return localVarFp.fraudRule(ruleType, fraudRuleRequest, options).then((request) => request(axios, basePath));
2472
+ },
2473
+ /**
2474
+ * List active fraud rules associated with the organization tied to your API key.
2475
+ * @summary List fraud rules
2476
+ * @param {*} [options] Override http request option.
2477
+ * @throws {RequiredError}
2478
+ */
2479
+ listFraudRules(options) {
2480
+ return localVarFp.listFraudRules(options).then((request) => request(axios, basePath));
2481
+ },
2482
+ /**
2483
+ * 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\"] } } ```
2484
+ * @summary Update fraud rule list
2485
+ * @param {UpdateFraudRuleListRuleTypeEnum} ruleType The rule type to create or update.
2486
+ * @param {UpdateFraudRuleListRequest} updateFraudRuleListRequest The lists to add or remove from the current configuration
2487
+ * @param {*} [options] Override http request option.
2488
+ * @throws {RequiredError}
2489
+ */
2490
+ updateFraudRuleList(ruleType, updateFraudRuleListRequest, options) {
2491
+ return localVarFp.updateFraudRuleList(ruleType, updateFraudRuleListRequest, options).then((request) => request(axios, basePath));
2492
+ },
2493
+ };
2494
+ };
2495
+ exports.FraudRulesApiFactory = FraudRulesApiFactory;
2496
+ /**
2497
+ * FraudRulesApi - object-oriented interface
2498
+ * @export
2499
+ * @class FraudRulesApi
2500
+ * @extends {BaseAPI}
2501
+ */
2502
+ class FraudRulesApi extends base_1.BaseAPI {
2503
+ /**
2504
+ * Deletes the rule of the type passed in the URL.
2505
+ * @summary Delete fraud rule
2506
+ * @param {DeleteFraudRuleRuleTypeEnum} ruleType The rule type to create or update.
2507
+ * @param {*} [options] Override http request option.
2508
+ * @throws {RequiredError}
2509
+ * @memberof FraudRulesApi
2510
+ */
2511
+ deleteFraudRule(ruleType, options) {
2512
+ return (0, exports.FraudRulesApiFp)(this.configuration).deleteFraudRule(ruleType, options).then((request) => request(this.axios, this.basePath));
2513
+ }
2514
+ /**
2515
+ * Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten.
2516
+ * @summary Configure fraud rule
2517
+ * @param {FraudRuleRuleTypeEnum} ruleType The rule type to create or update.
2518
+ * @param {FraudRuleRequest} [fraudRuleRequest] Rules &#x60;review_multiple_emails&#x60;, &#x60;review_vpn&#x60;, &#x60;review_tremendous_flaglist&#x60;, and &#x60;review_previously_blocked_recipients&#x60; require no body.
2519
+ * @param {*} [options] Override http request option.
2520
+ * @throws {RequiredError}
2521
+ * @memberof FraudRulesApi
2522
+ */
2523
+ fraudRule(ruleType, fraudRuleRequest, options) {
2524
+ return (0, exports.FraudRulesApiFp)(this.configuration).fraudRule(ruleType, fraudRuleRequest, options).then((request) => request(this.axios, this.basePath));
2525
+ }
2526
+ /**
2527
+ * List active fraud rules associated with the organization tied to your API key.
2528
+ * @summary List fraud rules
2529
+ * @param {*} [options] Override http request option.
2530
+ * @throws {RequiredError}
2531
+ * @memberof FraudRulesApi
2532
+ */
2533
+ listFraudRules(options) {
2534
+ return (0, exports.FraudRulesApiFp)(this.configuration).listFraudRules(options).then((request) => request(this.axios, this.basePath));
2535
+ }
2536
+ /**
2537
+ * 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\"] } } ```
2538
+ * @summary Update fraud rule list
2539
+ * @param {UpdateFraudRuleListRuleTypeEnum} ruleType The rule type to create or update.
2540
+ * @param {UpdateFraudRuleListRequest} updateFraudRuleListRequest The lists to add or remove from the current configuration
2541
+ * @param {*} [options] Override http request option.
2542
+ * @throws {RequiredError}
2543
+ * @memberof FraudRulesApi
2544
+ */
2545
+ updateFraudRuleList(ruleType, updateFraudRuleListRequest, options) {
2546
+ return (0, exports.FraudRulesApiFp)(this.configuration).updateFraudRuleList(ruleType, updateFraudRuleListRequest, options).then((request) => request(this.axios, this.basePath));
2547
+ }
2548
+ }
2549
+ exports.FraudRulesApi = FraudRulesApi;
2550
+ /**
2551
+ * @export
2552
+ */
2553
+ exports.DeleteFraudRuleRuleTypeEnum = {
2554
+ ReviewCountry: 'review_country',
2555
+ ReviewIp: 'review_ip',
2556
+ ReviewEmail: 'review_email',
2557
+ ReviewRedeemedRewardsCount: 'review_redeemed_rewards_count',
2558
+ ReviewRedeemedRewardsAmount: 'review_redeemed_rewards_amount',
2559
+ ReviewMultipleEmails: 'review_multiple_emails',
2560
+ ReviewVpn: 'review_vpn',
2561
+ ReviewTremendousFlagList: 'review_tremendous_flag_list',
2562
+ ReviewPreviouslyBlockedRecipients: 'review_previously_blocked_recipients',
2563
+ AllowIp: 'allow_ip',
2564
+ AllowEmail: 'allow_email'
2565
+ };
2566
+ /**
2567
+ * @export
2568
+ */
2569
+ exports.FraudRuleRuleTypeEnum = {
2570
+ ReviewCountry: 'review_country',
2571
+ ReviewIp: 'review_ip',
2572
+ ReviewEmail: 'review_email',
2573
+ ReviewRedeemedRewardsCount: 'review_redeemed_rewards_count',
2574
+ ReviewRedeemedRewardsAmount: 'review_redeemed_rewards_amount',
2575
+ ReviewMultipleEmails: 'review_multiple_emails',
2576
+ ReviewVpn: 'review_vpn',
2577
+ ReviewTremendousFlagList: 'review_tremendous_flag_list',
2578
+ ReviewPreviouslyBlockedRecipients: 'review_previously_blocked_recipients',
2579
+ AllowIp: 'allow_ip',
2580
+ AllowEmail: 'allow_email'
2581
+ };
2582
+ /**
2583
+ * @export
2584
+ */
2585
+ exports.UpdateFraudRuleListRuleTypeEnum = {
2586
+ ReviewCountry: 'review_country',
2587
+ ReviewIp: 'review_ip',
2588
+ ReviewEmail: 'review_email',
2589
+ AllowIp: 'allow_ip',
2590
+ AllowEmail: 'allow_email'
2591
+ };
1573
2592
  /**
1574
2593
  * FundingSourcesApi - axios parameter creator
1575
2594
  * @export