@snagsolutions/sdk 0.1.0-alpha.43 → 0.1.0-alpha.45

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.
@@ -30,7 +30,8 @@ export declare class Rules extends APIResource {
30
30
  /**
31
31
  * This will return the processing status of quests for a specific user
32
32
  */
33
- getStatus(query: RuleGetStatusParams, options?: Core.RequestOptions): Core.APIPromise<RuleGetStatusResponse>;
33
+ getStatus(query?: RuleGetStatusParams, options?: Core.RequestOptions): Core.APIPromise<RuleGetStatusResponse>;
34
+ getStatus(options?: Core.RequestOptions): Core.APIPromise<RuleGetStatusResponse>;
34
35
  }
35
36
  export interface RuleCreateResponse {
36
37
  id: string;
@@ -364,6 +365,11 @@ export declare namespace RuleCreateResponse {
364
365
  * Flag indicating if all contracts are tracked.
365
366
  */
366
367
  trackAllContracts?: boolean | null;
368
+ /**
369
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
370
+ * completed once the progress is 100%.
371
+ */
372
+ trackProgress?: boolean | null;
367
373
  /**
368
374
  * URL of the associated Twitter account.
369
375
  */
@@ -977,6 +983,11 @@ export declare namespace RuleUpdateResponse {
977
983
  * Flag indicating if all contracts are tracked.
978
984
  */
979
985
  trackAllContracts?: boolean | null;
986
+ /**
987
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
988
+ * completed once the progress is 100%.
989
+ */
990
+ trackProgress?: boolean | null;
980
991
  /**
981
992
  * URL of the associated Twitter account.
982
993
  */
@@ -1327,10 +1338,518 @@ export declare namespace RuleListResponse {
1327
1338
  * Optional address of the collection
1328
1339
  */
1329
1340
  collectionAddress?: string;
1341
+ /**
1342
+ * URL of the media associated with the loyalty rule
1343
+ */
1344
+ mediaUrl?: string | null;
1330
1345
  /**
1331
1346
  * Optional metadata for the loyalty rule
1332
1347
  */
1333
- metadata?: Record<string, unknown>;
1348
+ metadata?: Record<string, Data.Metadata>;
1349
+ }
1350
+ namespace Data {
1351
+ interface Metadata {
1352
+ /**
1353
+ * Text displayed on the action button.
1354
+ */
1355
+ buttonText?: string | null;
1356
+ /**
1357
+ * Flag indicating if commenting is required.
1358
+ */
1359
+ checkComment?: boolean | null;
1360
+ /**
1361
+ * Flag indicating if liking the post is required.
1362
+ */
1363
+ checkLike?: boolean | null;
1364
+ /**
1365
+ * Flag indicating if reposting is required.
1366
+ */
1367
+ checkRepost?: boolean | null;
1368
+ /**
1369
+ * Text to check in the Twitter post, username, or bio.
1370
+ */
1371
+ checkText?: string | null;
1372
+ /**
1373
+ * Array of collections associated with the rule.
1374
+ */
1375
+ collection?: Array<Metadata.Collection>;
1376
+ /**
1377
+ * Conditions for completing the profile.
1378
+ */
1379
+ completeProfileConditions?: Record<string, boolean> | null;
1380
+ /**
1381
+ * Object containing details for the call-to-action.
1382
+ */
1383
+ cta?: Metadata.Cta | null;
1384
+ /**
1385
+ * API key for custom rewards integration.
1386
+ */
1387
+ customRewardsApiKey?: string;
1388
+ /**
1389
+ * Array of Discord servers, channels, and roles to join.
1390
+ */
1391
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
1392
+ /**
1393
+ * Array of drip quests required to complete the rule.
1394
+ */
1395
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
1396
+ /**
1397
+ * Flag indicating whether joining Discord servers is required.
1398
+ */
1399
+ enableJoinDiscordServers?: boolean | null;
1400
+ /**
1401
+ * Flag indicating whether streaks are enabled.
1402
+ */
1403
+ enableStreaks?: boolean | null;
1404
+ /**
1405
+ * Flag indicating whether the verified multiplier is enabled.
1406
+ */
1407
+ enableVerifiedMultiplier?: boolean;
1408
+ /**
1409
+ * Fill source of the order for the token sale
1410
+ */
1411
+ fillSource?: string;
1412
+ /**
1413
+ * Percentage reward given to a user for their first referral.
1414
+ */
1415
+ firstReferralReward?: number | null;
1416
+ /**
1417
+ * Flag indicating whether the fill source is included.
1418
+ */
1419
+ hasFillSource?: boolean;
1420
+ /**
1421
+ * Indicates if the item has never been sold.
1422
+ */
1423
+ hasNeverSold?: boolean;
1424
+ /**
1425
+ * Flag indicating whether the order source is included.
1426
+ */
1427
+ hasOrderSource?: boolean;
1428
+ /**
1429
+ * Indicates if the full royalty has been paid for items.
1430
+ */
1431
+ hasPaidFullRoyalty?: boolean;
1432
+ /**
1433
+ * Flag indicating if the sale currency is included.
1434
+ */
1435
+ hasSaleCurrency?: boolean;
1436
+ /**
1437
+ * Indicates if the user has a verified Twitter account.
1438
+ */
1439
+ hasVerifiedTwitter?: boolean;
1440
+ /**
1441
+ * URL of the image associated with the rule.
1442
+ */
1443
+ imageUrl?: string | null;
1444
+ /**
1445
+ * Indicates if the multiplier has been applied to rewards.
1446
+ */
1447
+ isMultiplierApplied?: boolean;
1448
+ /**
1449
+ * Flag indicating if rewards are applied retroactively.
1450
+ */
1451
+ isRetroactive?: boolean | null;
1452
+ /**
1453
+ * Flag indicating if the token hold multiplier is applied.
1454
+ */
1455
+ isTokenHoldMultiplier?: boolean;
1456
+ /**
1457
+ * Optional link associated with the metadata.
1458
+ */
1459
+ link?: string | null;
1460
+ /**
1461
+ * Maximum quantity constraint for token holding.
1462
+ */
1463
+ maxQty?: number | null;
1464
+ /**
1465
+ * Minimum quantity constraint for token holding.
1466
+ */
1467
+ minQty?: number | null;
1468
+ /**
1469
+ * Array of loyalty currency IDs used for multipliers.
1470
+ */
1471
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
1472
+ /**
1473
+ * Flag indicating whether to include only known users.
1474
+ */
1475
+ onlyKnownUsers?: boolean;
1476
+ /**
1477
+ * Flag indicating whether to include only native tokens.
1478
+ */
1479
+ onlyNative?: boolean;
1480
+ /**
1481
+ * Flag indicating whether to include only non-listed items.
1482
+ */
1483
+ onlyNonListed?: boolean;
1484
+ /**
1485
+ * Indicates if only existing users are rewarded.
1486
+ */
1487
+ onlyRewardExistingUser?: boolean;
1488
+ /**
1489
+ * give points for only one token ownership per contract
1490
+ */
1491
+ onlyRewardSingleTokenOwnership?: boolean | null;
1492
+ /**
1493
+ * Order source of the order for the token sale
1494
+ */
1495
+ orderSource?: string;
1496
+ /**
1497
+ * Promotional code associated with the rule.
1498
+ */
1499
+ promoCode?: string;
1500
+ /**
1501
+ * Array defining ranges and corresponding rewards.
1502
+ */
1503
+ range?: Array<Metadata.Range>;
1504
+ /**
1505
+ * Object defining referral requirements.
1506
+ */
1507
+ referralRequirements?: Metadata.ReferralRequirements | null;
1508
+ /**
1509
+ * Lump sum reward given to a referrer.
1510
+ */
1511
+ referrerReward?: number | null;
1512
+ /**
1513
+ * Flag indicating if rewards are given per impression.
1514
+ */
1515
+ rewardPerImpression?: boolean | null;
1516
+ /**
1517
+ * Currency associated with sales.
1518
+ */
1519
+ saleCurrency?: string;
1520
+ /**
1521
+ * Percentage reward given for a second-level referral.
1522
+ */
1523
+ secondReferralReward?: number | null;
1524
+ /**
1525
+ * Flag indicating if the multiplier is skipped.
1526
+ */
1527
+ skipMultiplier?: boolean | null;
1528
+ /**
1529
+ * Object containing details of the associated smart contract.
1530
+ */
1531
+ smartContract?: Metadata.SmartContract;
1532
+ /**
1533
+ * Array of snapshot proposals for the rule.
1534
+ */
1535
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
1536
+ /**
1537
+ * Social media platform associated with the rule.
1538
+ */
1539
+ socialPlatform?: 'Custom' | 'Discord' | 'EpicGames' | 'Instagram' | 'Steam' | 'Telegram' | 'TikTok' | 'Twitch' | 'X(Twitter)' | 'YouTube' | null;
1540
+ /**
1541
+ * URL of the social platform's logo.
1542
+ */
1543
+ socialPlatformLogo?: string | null;
1544
+ /**
1545
+ * Name of the social platform.
1546
+ */
1547
+ socialPlatformName?: string | null;
1548
+ /**
1549
+ * ID of the Steam app.
1550
+ */
1551
+ steamAppId?: string | null;
1552
+ /**
1553
+ * Array of streak milestones and corresponding rewards.
1554
+ */
1555
+ streakArray?: Array<Metadata.StreakArray> | null;
1556
+ /**
1557
+ * ID of the Telegram channel.
1558
+ */
1559
+ telegramChannelId?: string | null;
1560
+ /**
1561
+ * Time delay in seconds to verify actions.
1562
+ */
1563
+ timeDelayToVerifySeconds?: string | number | null;
1564
+ /**
1565
+ * Flag indicating if all contracts are tracked.
1566
+ */
1567
+ trackAllContracts?: boolean | null;
1568
+ /**
1569
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
1570
+ * completed once the progress is 100%.
1571
+ */
1572
+ trackProgress?: boolean | null;
1573
+ /**
1574
+ * URL of the associated Twitter account.
1575
+ */
1576
+ twitterAccountUrl?: string;
1577
+ /**
1578
+ * Hashtag associated with the Twitter post.
1579
+ */
1580
+ twitterHashtag?: string;
1581
+ /**
1582
+ * URL of the associated Twitter post.
1583
+ */
1584
+ twitterPostUrl?: string;
1585
+ /**
1586
+ * Unique identifier of the Twitter user.
1587
+ */
1588
+ twitterUserId?: string;
1589
+ /**
1590
+ * Twitter username of the user.
1591
+ */
1592
+ twitterUsername?: string;
1593
+ /**
1594
+ * Minimum length of the verification text.
1595
+ */
1596
+ verificationTextMinimumLength?: number | null;
1597
+ /**
1598
+ * Multiplier applied to rewards for verified users.
1599
+ */
1600
+ verifiedMultiplier?: number | null;
1601
+ /**
1602
+ * Placeholder text for verification input fields.
1603
+ */
1604
+ verifyPlaceHolderText?: string | null;
1605
+ /**
1606
+ * Type of wallet associated with the rule.
1607
+ */
1608
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
1609
+ }
1610
+ namespace Metadata {
1611
+ interface Collection {
1612
+ /**
1613
+ * Blockchain address of the collection.
1614
+ */
1615
+ address?: string;
1616
+ /**
1617
+ * Multiplier applied to the rewards for this collection.
1618
+ */
1619
+ multiplier?: number;
1620
+ /**
1621
+ * Blockchain network of the collection.
1622
+ */
1623
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachainArtio' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
1624
+ }
1625
+ /**
1626
+ * Object containing details for the call-to-action.
1627
+ */
1628
+ interface Cta {
1629
+ /**
1630
+ * Link for the call-to-action.
1631
+ */
1632
+ href?: string | null;
1633
+ /**
1634
+ * Label for the call-to-action.
1635
+ */
1636
+ label?: string | null;
1637
+ }
1638
+ interface DiscordServersToJoin {
1639
+ /**
1640
+ * ID of the Discord server to join.
1641
+ */
1642
+ id?: string;
1643
+ /**
1644
+ * Array of Discord channels to join.
1645
+ */
1646
+ channels?: Array<DiscordServersToJoin.Channel>;
1647
+ /**
1648
+ * Array of roles to assign in the Discord server.
1649
+ */
1650
+ roles?: Array<DiscordServersToJoin.Role>;
1651
+ }
1652
+ namespace DiscordServersToJoin {
1653
+ interface Channel {
1654
+ /**
1655
+ * ID of the Discord channel.
1656
+ */
1657
+ id?: string;
1658
+ /**
1659
+ * Array of emojis used in the channel.
1660
+ */
1661
+ emojis?: Array<Channel.Emoji>;
1662
+ /**
1663
+ * Phrase of text to be present in the discord message
1664
+ */
1665
+ text?: string;
1666
+ }
1667
+ namespace Channel {
1668
+ interface Emoji {
1669
+ /**
1670
+ * ID of the emoji used in the channel.
1671
+ */
1672
+ id?: string;
1673
+ }
1674
+ }
1675
+ interface Role {
1676
+ /**
1677
+ * ID of the role in the Discord server.
1678
+ */
1679
+ id: string;
1680
+ }
1681
+ }
1682
+ interface DripQuestsToComplete {
1683
+ /**
1684
+ * ID of the drip quest to complete.
1685
+ */
1686
+ id: string;
1687
+ }
1688
+ interface Range {
1689
+ /**
1690
+ * Reward amount for this range.
1691
+ */
1692
+ amount: number;
1693
+ /**
1694
+ * End value of the range.
1695
+ */
1696
+ endRange: number;
1697
+ /**
1698
+ * Start value of the range.
1699
+ */
1700
+ startRange: number;
1701
+ }
1702
+ /**
1703
+ * Object defining referral requirements.
1704
+ */
1705
+ interface ReferralRequirements {
1706
+ /**
1707
+ * Flag indicating if achieving points is required.
1708
+ */
1709
+ achievePoints?: boolean | null;
1710
+ /**
1711
+ * Flag indicating if completing the profile is required.
1712
+ */
1713
+ completeProfile?: boolean | null;
1714
+ /**
1715
+ * Flag indicating if connecting Discord is required.
1716
+ */
1717
+ connectDiscord?: boolean | null;
1718
+ /**
1719
+ * Flag indicating if connecting email is required.
1720
+ */
1721
+ connectEmail?: boolean | null;
1722
+ /**
1723
+ * Flag indicating if connecting Twitter is required.
1724
+ */
1725
+ connectTwitter?: boolean | null;
1726
+ points?: ReferralRequirements.Points | null;
1727
+ }
1728
+ namespace ReferralRequirements {
1729
+ interface Points {
1730
+ /**
1731
+ * Points required for referral.
1732
+ */
1733
+ amount?: number | null;
1734
+ /**
1735
+ * ID of the loyalty currency for referral.
1736
+ */
1737
+ loyaltyCurrecyId?: string | null;
1738
+ }
1739
+ }
1740
+ /**
1741
+ * Object containing details of the associated smart contract.
1742
+ */
1743
+ interface SmartContract {
1744
+ /**
1745
+ * ABI of the smart contract.
1746
+ */
1747
+ abi?: string | null;
1748
+ /**
1749
+ * Mapping of addresses for the smart contract.
1750
+ */
1751
+ addressMapping?: string | null;
1752
+ /**
1753
+ * Array of bonus details applied to the rule.
1754
+ */
1755
+ bonus?: Array<SmartContract.Bonus> | null;
1756
+ /**
1757
+ * ID of the smart contract.
1758
+ */
1759
+ contractId?: string | null;
1760
+ /**
1761
+ * Criteria to evaluate the smart contract event.
1762
+ */
1763
+ criteria?: 'everyEvent' | 'byParameter' | null;
1764
+ /**
1765
+ * Time range applied to the rule.
1766
+ */
1767
+ customRange?: SmartContract.CustomRange | null;
1768
+ /**
1769
+ * Event emitted by the smart contract.
1770
+ */
1771
+ event?: string | null;
1772
+ /**
1773
+ * Maximum value allowed for the parameter.
1774
+ */
1775
+ max?: number | null;
1776
+ /**
1777
+ * Array of parameters for the smart contract.
1778
+ */
1779
+ params?: Array<SmartContract.Param> | null;
1780
+ /**
1781
+ * Flag indicating if a bonus is applied.
1782
+ */
1783
+ withBonus?: boolean | null;
1784
+ /**
1785
+ * Flag indicating if a custom range is applied.
1786
+ */
1787
+ withCustomRange?: boolean | null;
1788
+ /**
1789
+ * Flag indicating if a maximum limit is applied.
1790
+ */
1791
+ withMax?: boolean | null;
1792
+ }
1793
+ namespace SmartContract {
1794
+ interface Bonus {
1795
+ /**
1796
+ * Amount of the bonus.
1797
+ */
1798
+ amount?: number | null;
1799
+ /**
1800
+ * Number of times the bonus is applied.
1801
+ */
1802
+ count?: number | null;
1803
+ }
1804
+ /**
1805
+ * Time range applied to the rule.
1806
+ */
1807
+ interface CustomRange {
1808
+ /**
1809
+ * End time of the custom range.
1810
+ */
1811
+ endsAt?: string | null;
1812
+ /**
1813
+ * Start time of the custom range.
1814
+ */
1815
+ startsAt?: string | null;
1816
+ }
1817
+ interface Param {
1818
+ /**
1819
+ * Condition to check for the parameter.
1820
+ */
1821
+ condition?: string | null;
1822
+ /**
1823
+ * Name of the smart contract parameter.
1824
+ */
1825
+ name?: string | null;
1826
+ /**
1827
+ * Value of the parameter.
1828
+ */
1829
+ value?: string | null;
1830
+ }
1831
+ }
1832
+ interface SnapshotProposal {
1833
+ /**
1834
+ * ID of the snapshot proposal.
1835
+ */
1836
+ id: string;
1837
+ /**
1838
+ * Space associated with the snapshot proposal.
1839
+ */
1840
+ space: string;
1841
+ }
1842
+ interface StreakArray {
1843
+ /**
1844
+ * Reward amount for achieving the streak milestone.
1845
+ */
1846
+ streakAmount: number;
1847
+ /**
1848
+ * Milestone required to achieve the streak.
1849
+ */
1850
+ streakMilestone: number;
1851
+ }
1852
+ }
1334
1853
  }
1335
1854
  }
1336
1855
  export interface RuleDeleteResponse {
@@ -1682,6 +2201,11 @@ export declare namespace RuleCreateParams {
1682
2201
  * Flag indicating if all contracts are tracked.
1683
2202
  */
1684
2203
  trackAllContracts?: boolean | null;
2204
+ /**
2205
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
2206
+ * completed once the progress is 100%.
2207
+ */
2208
+ trackProgress?: boolean | null;
1685
2209
  /**
1686
2210
  * URL of the associated Twitter account.
1687
2211
  */
@@ -2294,6 +2818,11 @@ export declare namespace RuleUpdateParams {
2294
2818
  * Flag indicating if all contracts are tracked.
2295
2819
  */
2296
2820
  trackAllContracts?: boolean | null;
2821
+ /**
2822
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
2823
+ * completed once the progress is 100%.
2824
+ */
2825
+ trackProgress?: boolean | null;
2297
2826
  /**
2298
2827
  * URL of the associated Twitter account.
2299
2828
  */
@@ -2580,6 +3109,11 @@ export interface RuleListParams {
2580
3109
  * Address of the collection to filter by
2581
3110
  */
2582
3111
  collectionAddress?: string;
3112
+ /**
3113
+ * If true this will only return active rules, the rules for which the startTime is
3114
+ * in the past and the endTime is in the future
3115
+ */
3116
+ isActive?: 'true' | 'false';
2583
3117
  /**
2584
3118
  * Maximum number of records to return (max 1000)
2585
3119
  */
@@ -2642,9 +3176,10 @@ export interface RuleCompleteParams {
2642
3176
  walletAddress?: string;
2643
3177
  }
2644
3178
  export interface RuleGetStatusParams {
2645
- organizationId: string;
2646
- websiteId: string;
3179
+ organizationId?: string;
2647
3180
  userId?: string;
3181
+ walletAddress?: string;
3182
+ websiteId?: string;
2648
3183
  }
2649
3184
  export declare namespace Rules {
2650
3185
  export { type RuleCreateResponse as RuleCreateResponse, type RuleUpdateResponse as RuleUpdateResponse, type RuleListResponse as RuleListResponse, type RuleDeleteResponse as RuleDeleteResponse, type RuleCompleteResponse as RuleCompleteResponse, type RuleGetStatusResponse as RuleGetStatusResponse, type RuleCreateParams as RuleCreateParams, type RuleUpdateParams as RuleUpdateParams, type RuleListParams as RuleListParams, type RuleCompleteParams as RuleCompleteParams, type RuleGetStatusParams as RuleGetStatusParams, };