@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.
- package/CHANGELOG.md +20 -0
- package/package.json +1 -1
- package/resources/loyalty/rule-edits.d.ts +2036 -4
- package/resources/loyalty/rule-edits.d.ts.map +1 -1
- package/resources/loyalty/rule-groups.d.ts +5 -0
- package/resources/loyalty/rule-groups.d.ts.map +1 -1
- package/resources/loyalty/rules.d.ts +539 -4
- package/resources/loyalty/rules.d.ts.map +1 -1
- package/resources/loyalty/rules.js +4 -4
- package/resources/loyalty/rules.js.map +1 -1
- package/resources/loyalty/rules.mjs +4 -4
- package/resources/loyalty/rules.mjs.map +1 -1
- package/resources/loyalty/transactions.d.ts +4 -0
- package/resources/loyalty/transactions.d.ts.map +1 -1
- package/src/resources/loyalty/rule-edits.ts +2672 -4
- package/src/resources/loyalty/rule-groups.ts +6 -0
- package/src/resources/loyalty/rules.ts +712 -5
- package/src/resources/loyalty/transactions.ts +5 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -73,9 +73,17 @@ export class Rules extends APIResource {
|
|
|
73
73
|
* This will return the processing status of quests for a specific user
|
|
74
74
|
*/
|
|
75
75
|
getStatus(
|
|
76
|
-
query
|
|
76
|
+
query?: RuleGetStatusParams,
|
|
77
|
+
options?: Core.RequestOptions,
|
|
78
|
+
): Core.APIPromise<RuleGetStatusResponse>;
|
|
79
|
+
getStatus(options?: Core.RequestOptions): Core.APIPromise<RuleGetStatusResponse>;
|
|
80
|
+
getStatus(
|
|
81
|
+
query: RuleGetStatusParams | Core.RequestOptions = {},
|
|
77
82
|
options?: Core.RequestOptions,
|
|
78
83
|
): Core.APIPromise<RuleGetStatusResponse> {
|
|
84
|
+
if (isRequestOptions(query)) {
|
|
85
|
+
return this.getStatus({}, query);
|
|
86
|
+
}
|
|
79
87
|
return this._client.get('/api/loyalty/rules/status', { query, ...options });
|
|
80
88
|
}
|
|
81
89
|
}
|
|
@@ -594,6 +602,12 @@ export namespace RuleCreateResponse {
|
|
|
594
602
|
*/
|
|
595
603
|
trackAllContracts?: boolean | null;
|
|
596
604
|
|
|
605
|
+
/**
|
|
606
|
+
* Flag indicating if the progress is tracked. If enabled, the rule can only be
|
|
607
|
+
* completed once the progress is 100%.
|
|
608
|
+
*/
|
|
609
|
+
trackProgress?: boolean | null;
|
|
610
|
+
|
|
597
611
|
/**
|
|
598
612
|
* URL of the associated Twitter account.
|
|
599
613
|
*/
|
|
@@ -1496,6 +1510,12 @@ export namespace RuleUpdateResponse {
|
|
|
1496
1510
|
*/
|
|
1497
1511
|
trackAllContracts?: boolean | null;
|
|
1498
1512
|
|
|
1513
|
+
/**
|
|
1514
|
+
* Flag indicating if the progress is tracked. If enabled, the rule can only be
|
|
1515
|
+
* completed once the progress is 100%.
|
|
1516
|
+
*/
|
|
1517
|
+
trackProgress?: boolean | null;
|
|
1518
|
+
|
|
1499
1519
|
/**
|
|
1500
1520
|
* URL of the associated Twitter account.
|
|
1501
1521
|
*/
|
|
@@ -1955,10 +1975,677 @@ export namespace RuleListResponse {
|
|
|
1955
1975
|
*/
|
|
1956
1976
|
collectionAddress?: string;
|
|
1957
1977
|
|
|
1978
|
+
/**
|
|
1979
|
+
* URL of the media associated with the loyalty rule
|
|
1980
|
+
*/
|
|
1981
|
+
mediaUrl?: string | null;
|
|
1982
|
+
|
|
1958
1983
|
/**
|
|
1959
1984
|
* Optional metadata for the loyalty rule
|
|
1960
1985
|
*/
|
|
1961
|
-
metadata?: Record<string,
|
|
1986
|
+
metadata?: Record<string, Data.Metadata>;
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
export namespace Data {
|
|
1990
|
+
export interface Metadata {
|
|
1991
|
+
/**
|
|
1992
|
+
* Text displayed on the action button.
|
|
1993
|
+
*/
|
|
1994
|
+
buttonText?: string | null;
|
|
1995
|
+
|
|
1996
|
+
/**
|
|
1997
|
+
* Flag indicating if commenting is required.
|
|
1998
|
+
*/
|
|
1999
|
+
checkComment?: boolean | null;
|
|
2000
|
+
|
|
2001
|
+
/**
|
|
2002
|
+
* Flag indicating if liking the post is required.
|
|
2003
|
+
*/
|
|
2004
|
+
checkLike?: boolean | null;
|
|
2005
|
+
|
|
2006
|
+
/**
|
|
2007
|
+
* Flag indicating if reposting is required.
|
|
2008
|
+
*/
|
|
2009
|
+
checkRepost?: boolean | null;
|
|
2010
|
+
|
|
2011
|
+
/**
|
|
2012
|
+
* Text to check in the Twitter post, username, or bio.
|
|
2013
|
+
*/
|
|
2014
|
+
checkText?: string | null;
|
|
2015
|
+
|
|
2016
|
+
/**
|
|
2017
|
+
* Array of collections associated with the rule.
|
|
2018
|
+
*/
|
|
2019
|
+
collection?: Array<Metadata.Collection>;
|
|
2020
|
+
|
|
2021
|
+
/**
|
|
2022
|
+
* Conditions for completing the profile.
|
|
2023
|
+
*/
|
|
2024
|
+
completeProfileConditions?: Record<string, boolean> | null;
|
|
2025
|
+
|
|
2026
|
+
/**
|
|
2027
|
+
* Object containing details for the call-to-action.
|
|
2028
|
+
*/
|
|
2029
|
+
cta?: Metadata.Cta | null;
|
|
2030
|
+
|
|
2031
|
+
/**
|
|
2032
|
+
* API key for custom rewards integration.
|
|
2033
|
+
*/
|
|
2034
|
+
customRewardsApiKey?: string;
|
|
2035
|
+
|
|
2036
|
+
/**
|
|
2037
|
+
* Array of Discord servers, channels, and roles to join.
|
|
2038
|
+
*/
|
|
2039
|
+
discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
|
|
2040
|
+
|
|
2041
|
+
/**
|
|
2042
|
+
* Array of drip quests required to complete the rule.
|
|
2043
|
+
*/
|
|
2044
|
+
dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
|
|
2045
|
+
|
|
2046
|
+
/**
|
|
2047
|
+
* Flag indicating whether joining Discord servers is required.
|
|
2048
|
+
*/
|
|
2049
|
+
enableJoinDiscordServers?: boolean | null;
|
|
2050
|
+
|
|
2051
|
+
/**
|
|
2052
|
+
* Flag indicating whether streaks are enabled.
|
|
2053
|
+
*/
|
|
2054
|
+
enableStreaks?: boolean | null;
|
|
2055
|
+
|
|
2056
|
+
/**
|
|
2057
|
+
* Flag indicating whether the verified multiplier is enabled.
|
|
2058
|
+
*/
|
|
2059
|
+
enableVerifiedMultiplier?: boolean;
|
|
2060
|
+
|
|
2061
|
+
/**
|
|
2062
|
+
* Fill source of the order for the token sale
|
|
2063
|
+
*/
|
|
2064
|
+
fillSource?: string;
|
|
2065
|
+
|
|
2066
|
+
/**
|
|
2067
|
+
* Percentage reward given to a user for their first referral.
|
|
2068
|
+
*/
|
|
2069
|
+
firstReferralReward?: number | null;
|
|
2070
|
+
|
|
2071
|
+
/**
|
|
2072
|
+
* Flag indicating whether the fill source is included.
|
|
2073
|
+
*/
|
|
2074
|
+
hasFillSource?: boolean;
|
|
2075
|
+
|
|
2076
|
+
/**
|
|
2077
|
+
* Indicates if the item has never been sold.
|
|
2078
|
+
*/
|
|
2079
|
+
hasNeverSold?: boolean;
|
|
2080
|
+
|
|
2081
|
+
/**
|
|
2082
|
+
* Flag indicating whether the order source is included.
|
|
2083
|
+
*/
|
|
2084
|
+
hasOrderSource?: boolean;
|
|
2085
|
+
|
|
2086
|
+
/**
|
|
2087
|
+
* Indicates if the full royalty has been paid for items.
|
|
2088
|
+
*/
|
|
2089
|
+
hasPaidFullRoyalty?: boolean;
|
|
2090
|
+
|
|
2091
|
+
/**
|
|
2092
|
+
* Flag indicating if the sale currency is included.
|
|
2093
|
+
*/
|
|
2094
|
+
hasSaleCurrency?: boolean;
|
|
2095
|
+
|
|
2096
|
+
/**
|
|
2097
|
+
* Indicates if the user has a verified Twitter account.
|
|
2098
|
+
*/
|
|
2099
|
+
hasVerifiedTwitter?: boolean;
|
|
2100
|
+
|
|
2101
|
+
/**
|
|
2102
|
+
* URL of the image associated with the rule.
|
|
2103
|
+
*/
|
|
2104
|
+
imageUrl?: string | null;
|
|
2105
|
+
|
|
2106
|
+
/**
|
|
2107
|
+
* Indicates if the multiplier has been applied to rewards.
|
|
2108
|
+
*/
|
|
2109
|
+
isMultiplierApplied?: boolean;
|
|
2110
|
+
|
|
2111
|
+
/**
|
|
2112
|
+
* Flag indicating if rewards are applied retroactively.
|
|
2113
|
+
*/
|
|
2114
|
+
isRetroactive?: boolean | null;
|
|
2115
|
+
|
|
2116
|
+
/**
|
|
2117
|
+
* Flag indicating if the token hold multiplier is applied.
|
|
2118
|
+
*/
|
|
2119
|
+
isTokenHoldMultiplier?: boolean;
|
|
2120
|
+
|
|
2121
|
+
/**
|
|
2122
|
+
* Optional link associated with the metadata.
|
|
2123
|
+
*/
|
|
2124
|
+
link?: string | null;
|
|
2125
|
+
|
|
2126
|
+
/**
|
|
2127
|
+
* Maximum quantity constraint for token holding.
|
|
2128
|
+
*/
|
|
2129
|
+
maxQty?: number | null;
|
|
2130
|
+
|
|
2131
|
+
/**
|
|
2132
|
+
* Minimum quantity constraint for token holding.
|
|
2133
|
+
*/
|
|
2134
|
+
minQty?: number | null;
|
|
2135
|
+
|
|
2136
|
+
/**
|
|
2137
|
+
* Array of loyalty currency IDs used for multipliers.
|
|
2138
|
+
*/
|
|
2139
|
+
multiplierLoyaltyCurrencyIds?: Array<string> | null;
|
|
2140
|
+
|
|
2141
|
+
/**
|
|
2142
|
+
* Flag indicating whether to include only known users.
|
|
2143
|
+
*/
|
|
2144
|
+
onlyKnownUsers?: boolean;
|
|
2145
|
+
|
|
2146
|
+
/**
|
|
2147
|
+
* Flag indicating whether to include only native tokens.
|
|
2148
|
+
*/
|
|
2149
|
+
onlyNative?: boolean;
|
|
2150
|
+
|
|
2151
|
+
/**
|
|
2152
|
+
* Flag indicating whether to include only non-listed items.
|
|
2153
|
+
*/
|
|
2154
|
+
onlyNonListed?: boolean;
|
|
2155
|
+
|
|
2156
|
+
/**
|
|
2157
|
+
* Indicates if only existing users are rewarded.
|
|
2158
|
+
*/
|
|
2159
|
+
onlyRewardExistingUser?: boolean;
|
|
2160
|
+
|
|
2161
|
+
/**
|
|
2162
|
+
* give points for only one token ownership per contract
|
|
2163
|
+
*/
|
|
2164
|
+
onlyRewardSingleTokenOwnership?: boolean | null;
|
|
2165
|
+
|
|
2166
|
+
/**
|
|
2167
|
+
* Order source of the order for the token sale
|
|
2168
|
+
*/
|
|
2169
|
+
orderSource?: string;
|
|
2170
|
+
|
|
2171
|
+
/**
|
|
2172
|
+
* Promotional code associated with the rule.
|
|
2173
|
+
*/
|
|
2174
|
+
promoCode?: string;
|
|
2175
|
+
|
|
2176
|
+
/**
|
|
2177
|
+
* Array defining ranges and corresponding rewards.
|
|
2178
|
+
*/
|
|
2179
|
+
range?: Array<Metadata.Range>;
|
|
2180
|
+
|
|
2181
|
+
/**
|
|
2182
|
+
* Object defining referral requirements.
|
|
2183
|
+
*/
|
|
2184
|
+
referralRequirements?: Metadata.ReferralRequirements | null;
|
|
2185
|
+
|
|
2186
|
+
/**
|
|
2187
|
+
* Lump sum reward given to a referrer.
|
|
2188
|
+
*/
|
|
2189
|
+
referrerReward?: number | null;
|
|
2190
|
+
|
|
2191
|
+
/**
|
|
2192
|
+
* Flag indicating if rewards are given per impression.
|
|
2193
|
+
*/
|
|
2194
|
+
rewardPerImpression?: boolean | null;
|
|
2195
|
+
|
|
2196
|
+
/**
|
|
2197
|
+
* Currency associated with sales.
|
|
2198
|
+
*/
|
|
2199
|
+
saleCurrency?: string;
|
|
2200
|
+
|
|
2201
|
+
/**
|
|
2202
|
+
* Percentage reward given for a second-level referral.
|
|
2203
|
+
*/
|
|
2204
|
+
secondReferralReward?: number | null;
|
|
2205
|
+
|
|
2206
|
+
/**
|
|
2207
|
+
* Flag indicating if the multiplier is skipped.
|
|
2208
|
+
*/
|
|
2209
|
+
skipMultiplier?: boolean | null;
|
|
2210
|
+
|
|
2211
|
+
/**
|
|
2212
|
+
* Object containing details of the associated smart contract.
|
|
2213
|
+
*/
|
|
2214
|
+
smartContract?: Metadata.SmartContract;
|
|
2215
|
+
|
|
2216
|
+
/**
|
|
2217
|
+
* Array of snapshot proposals for the rule.
|
|
2218
|
+
*/
|
|
2219
|
+
snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
|
|
2220
|
+
|
|
2221
|
+
/**
|
|
2222
|
+
* Social media platform associated with the rule.
|
|
2223
|
+
*/
|
|
2224
|
+
socialPlatform?:
|
|
2225
|
+
| 'Custom'
|
|
2226
|
+
| 'Discord'
|
|
2227
|
+
| 'EpicGames'
|
|
2228
|
+
| 'Instagram'
|
|
2229
|
+
| 'Steam'
|
|
2230
|
+
| 'Telegram'
|
|
2231
|
+
| 'TikTok'
|
|
2232
|
+
| 'Twitch'
|
|
2233
|
+
| 'X(Twitter)'
|
|
2234
|
+
| 'YouTube'
|
|
2235
|
+
| null;
|
|
2236
|
+
|
|
2237
|
+
/**
|
|
2238
|
+
* URL of the social platform's logo.
|
|
2239
|
+
*/
|
|
2240
|
+
socialPlatformLogo?: string | null;
|
|
2241
|
+
|
|
2242
|
+
/**
|
|
2243
|
+
* Name of the social platform.
|
|
2244
|
+
*/
|
|
2245
|
+
socialPlatformName?: string | null;
|
|
2246
|
+
|
|
2247
|
+
/**
|
|
2248
|
+
* ID of the Steam app.
|
|
2249
|
+
*/
|
|
2250
|
+
steamAppId?: string | null;
|
|
2251
|
+
|
|
2252
|
+
/**
|
|
2253
|
+
* Array of streak milestones and corresponding rewards.
|
|
2254
|
+
*/
|
|
2255
|
+
streakArray?: Array<Metadata.StreakArray> | null;
|
|
2256
|
+
|
|
2257
|
+
/**
|
|
2258
|
+
* ID of the Telegram channel.
|
|
2259
|
+
*/
|
|
2260
|
+
telegramChannelId?: string | null;
|
|
2261
|
+
|
|
2262
|
+
/**
|
|
2263
|
+
* Time delay in seconds to verify actions.
|
|
2264
|
+
*/
|
|
2265
|
+
timeDelayToVerifySeconds?: string | number | null;
|
|
2266
|
+
|
|
2267
|
+
/**
|
|
2268
|
+
* Flag indicating if all contracts are tracked.
|
|
2269
|
+
*/
|
|
2270
|
+
trackAllContracts?: boolean | null;
|
|
2271
|
+
|
|
2272
|
+
/**
|
|
2273
|
+
* Flag indicating if the progress is tracked. If enabled, the rule can only be
|
|
2274
|
+
* completed once the progress is 100%.
|
|
2275
|
+
*/
|
|
2276
|
+
trackProgress?: boolean | null;
|
|
2277
|
+
|
|
2278
|
+
/**
|
|
2279
|
+
* URL of the associated Twitter account.
|
|
2280
|
+
*/
|
|
2281
|
+
twitterAccountUrl?: string;
|
|
2282
|
+
|
|
2283
|
+
/**
|
|
2284
|
+
* Hashtag associated with the Twitter post.
|
|
2285
|
+
*/
|
|
2286
|
+
twitterHashtag?: string;
|
|
2287
|
+
|
|
2288
|
+
/**
|
|
2289
|
+
* URL of the associated Twitter post.
|
|
2290
|
+
*/
|
|
2291
|
+
twitterPostUrl?: string;
|
|
2292
|
+
|
|
2293
|
+
/**
|
|
2294
|
+
* Unique identifier of the Twitter user.
|
|
2295
|
+
*/
|
|
2296
|
+
twitterUserId?: string;
|
|
2297
|
+
|
|
2298
|
+
/**
|
|
2299
|
+
* Twitter username of the user.
|
|
2300
|
+
*/
|
|
2301
|
+
twitterUsername?: string;
|
|
2302
|
+
|
|
2303
|
+
/**
|
|
2304
|
+
* Minimum length of the verification text.
|
|
2305
|
+
*/
|
|
2306
|
+
verificationTextMinimumLength?: number | null;
|
|
2307
|
+
|
|
2308
|
+
/**
|
|
2309
|
+
* Multiplier applied to rewards for verified users.
|
|
2310
|
+
*/
|
|
2311
|
+
verifiedMultiplier?: number | null;
|
|
2312
|
+
|
|
2313
|
+
/**
|
|
2314
|
+
* Placeholder text for verification input fields.
|
|
2315
|
+
*/
|
|
2316
|
+
verifyPlaceHolderText?: string | null;
|
|
2317
|
+
|
|
2318
|
+
/**
|
|
2319
|
+
* Type of wallet associated with the rule.
|
|
2320
|
+
*/
|
|
2321
|
+
walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
export namespace Metadata {
|
|
2325
|
+
export interface Collection {
|
|
2326
|
+
/**
|
|
2327
|
+
* Blockchain address of the collection.
|
|
2328
|
+
*/
|
|
2329
|
+
address?: string;
|
|
2330
|
+
|
|
2331
|
+
/**
|
|
2332
|
+
* Multiplier applied to the rewards for this collection.
|
|
2333
|
+
*/
|
|
2334
|
+
multiplier?: number;
|
|
2335
|
+
|
|
2336
|
+
/**
|
|
2337
|
+
* Blockchain network of the collection.
|
|
2338
|
+
*/
|
|
2339
|
+
network?:
|
|
2340
|
+
| 'abstract'
|
|
2341
|
+
| 'abstractTestnet'
|
|
2342
|
+
| 'apechain'
|
|
2343
|
+
| 'arbitrum'
|
|
2344
|
+
| 'avalanche'
|
|
2345
|
+
| 'avalancheFuji'
|
|
2346
|
+
| 'base'
|
|
2347
|
+
| 'baseSepolia'
|
|
2348
|
+
| 'berachainArtio'
|
|
2349
|
+
| 'binance'
|
|
2350
|
+
| 'bscTestnet'
|
|
2351
|
+
| 'campTestnet'
|
|
2352
|
+
| 'fantom'
|
|
2353
|
+
| 'fantomTestnet'
|
|
2354
|
+
| 'flowMainnet'
|
|
2355
|
+
| 'mainnet'
|
|
2356
|
+
| 'optimism'
|
|
2357
|
+
| 'polygon'
|
|
2358
|
+
| 'polygon_mumbai'
|
|
2359
|
+
| 'skaleNebula'
|
|
2360
|
+
| 'solana'
|
|
2361
|
+
| 'sophon'
|
|
2362
|
+
| 'sui'
|
|
2363
|
+
| 'superseed'
|
|
2364
|
+
| 'superseedSepolia'
|
|
2365
|
+
| 'vanar'
|
|
2366
|
+
| 'xai'
|
|
2367
|
+
| 'zksync'
|
|
2368
|
+
| 'sepolia'
|
|
2369
|
+
| 'optimism_sepolia'
|
|
2370
|
+
| 'arbitrumSepolia'
|
|
2371
|
+
| 'goerli'
|
|
2372
|
+
| 'optimism_goerli'
|
|
2373
|
+
| 'arbitrumGoerli'
|
|
2374
|
+
| 'basecamp';
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
/**
|
|
2378
|
+
* Object containing details for the call-to-action.
|
|
2379
|
+
*/
|
|
2380
|
+
export interface Cta {
|
|
2381
|
+
/**
|
|
2382
|
+
* Link for the call-to-action.
|
|
2383
|
+
*/
|
|
2384
|
+
href?: string | null;
|
|
2385
|
+
|
|
2386
|
+
/**
|
|
2387
|
+
* Label for the call-to-action.
|
|
2388
|
+
*/
|
|
2389
|
+
label?: string | null;
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
export interface DiscordServersToJoin {
|
|
2393
|
+
/**
|
|
2394
|
+
* ID of the Discord server to join.
|
|
2395
|
+
*/
|
|
2396
|
+
id?: string;
|
|
2397
|
+
|
|
2398
|
+
/**
|
|
2399
|
+
* Array of Discord channels to join.
|
|
2400
|
+
*/
|
|
2401
|
+
channels?: Array<DiscordServersToJoin.Channel>;
|
|
2402
|
+
|
|
2403
|
+
/**
|
|
2404
|
+
* Array of roles to assign in the Discord server.
|
|
2405
|
+
*/
|
|
2406
|
+
roles?: Array<DiscordServersToJoin.Role>;
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2409
|
+
export namespace DiscordServersToJoin {
|
|
2410
|
+
export interface Channel {
|
|
2411
|
+
/**
|
|
2412
|
+
* ID of the Discord channel.
|
|
2413
|
+
*/
|
|
2414
|
+
id?: string;
|
|
2415
|
+
|
|
2416
|
+
/**
|
|
2417
|
+
* Array of emojis used in the channel.
|
|
2418
|
+
*/
|
|
2419
|
+
emojis?: Array<Channel.Emoji>;
|
|
2420
|
+
|
|
2421
|
+
/**
|
|
2422
|
+
* Phrase of text to be present in the discord message
|
|
2423
|
+
*/
|
|
2424
|
+
text?: string;
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
export namespace Channel {
|
|
2428
|
+
export interface Emoji {
|
|
2429
|
+
/**
|
|
2430
|
+
* ID of the emoji used in the channel.
|
|
2431
|
+
*/
|
|
2432
|
+
id?: string;
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
|
|
2436
|
+
export interface Role {
|
|
2437
|
+
/**
|
|
2438
|
+
* ID of the role in the Discord server.
|
|
2439
|
+
*/
|
|
2440
|
+
id: string;
|
|
2441
|
+
}
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
export interface DripQuestsToComplete {
|
|
2445
|
+
/**
|
|
2446
|
+
* ID of the drip quest to complete.
|
|
2447
|
+
*/
|
|
2448
|
+
id: string;
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
export interface Range {
|
|
2452
|
+
/**
|
|
2453
|
+
* Reward amount for this range.
|
|
2454
|
+
*/
|
|
2455
|
+
amount: number;
|
|
2456
|
+
|
|
2457
|
+
/**
|
|
2458
|
+
* End value of the range.
|
|
2459
|
+
*/
|
|
2460
|
+
endRange: number;
|
|
2461
|
+
|
|
2462
|
+
/**
|
|
2463
|
+
* Start value of the range.
|
|
2464
|
+
*/
|
|
2465
|
+
startRange: number;
|
|
2466
|
+
}
|
|
2467
|
+
|
|
2468
|
+
/**
|
|
2469
|
+
* Object defining referral requirements.
|
|
2470
|
+
*/
|
|
2471
|
+
export interface ReferralRequirements {
|
|
2472
|
+
/**
|
|
2473
|
+
* Flag indicating if achieving points is required.
|
|
2474
|
+
*/
|
|
2475
|
+
achievePoints?: boolean | null;
|
|
2476
|
+
|
|
2477
|
+
/**
|
|
2478
|
+
* Flag indicating if completing the profile is required.
|
|
2479
|
+
*/
|
|
2480
|
+
completeProfile?: boolean | null;
|
|
2481
|
+
|
|
2482
|
+
/**
|
|
2483
|
+
* Flag indicating if connecting Discord is required.
|
|
2484
|
+
*/
|
|
2485
|
+
connectDiscord?: boolean | null;
|
|
2486
|
+
|
|
2487
|
+
/**
|
|
2488
|
+
* Flag indicating if connecting email is required.
|
|
2489
|
+
*/
|
|
2490
|
+
connectEmail?: boolean | null;
|
|
2491
|
+
|
|
2492
|
+
/**
|
|
2493
|
+
* Flag indicating if connecting Twitter is required.
|
|
2494
|
+
*/
|
|
2495
|
+
connectTwitter?: boolean | null;
|
|
2496
|
+
|
|
2497
|
+
points?: ReferralRequirements.Points | null;
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
export namespace ReferralRequirements {
|
|
2501
|
+
export interface Points {
|
|
2502
|
+
/**
|
|
2503
|
+
* Points required for referral.
|
|
2504
|
+
*/
|
|
2505
|
+
amount?: number | null;
|
|
2506
|
+
|
|
2507
|
+
/**
|
|
2508
|
+
* ID of the loyalty currency for referral.
|
|
2509
|
+
*/
|
|
2510
|
+
loyaltyCurrecyId?: string | null;
|
|
2511
|
+
}
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
/**
|
|
2515
|
+
* Object containing details of the associated smart contract.
|
|
2516
|
+
*/
|
|
2517
|
+
export interface SmartContract {
|
|
2518
|
+
/**
|
|
2519
|
+
* ABI of the smart contract.
|
|
2520
|
+
*/
|
|
2521
|
+
abi?: string | null;
|
|
2522
|
+
|
|
2523
|
+
/**
|
|
2524
|
+
* Mapping of addresses for the smart contract.
|
|
2525
|
+
*/
|
|
2526
|
+
addressMapping?: string | null;
|
|
2527
|
+
|
|
2528
|
+
/**
|
|
2529
|
+
* Array of bonus details applied to the rule.
|
|
2530
|
+
*/
|
|
2531
|
+
bonus?: Array<SmartContract.Bonus> | null;
|
|
2532
|
+
|
|
2533
|
+
/**
|
|
2534
|
+
* ID of the smart contract.
|
|
2535
|
+
*/
|
|
2536
|
+
contractId?: string | null;
|
|
2537
|
+
|
|
2538
|
+
/**
|
|
2539
|
+
* Criteria to evaluate the smart contract event.
|
|
2540
|
+
*/
|
|
2541
|
+
criteria?: 'everyEvent' | 'byParameter' | null;
|
|
2542
|
+
|
|
2543
|
+
/**
|
|
2544
|
+
* Time range applied to the rule.
|
|
2545
|
+
*/
|
|
2546
|
+
customRange?: SmartContract.CustomRange | null;
|
|
2547
|
+
|
|
2548
|
+
/**
|
|
2549
|
+
* Event emitted by the smart contract.
|
|
2550
|
+
*/
|
|
2551
|
+
event?: string | null;
|
|
2552
|
+
|
|
2553
|
+
/**
|
|
2554
|
+
* Maximum value allowed for the parameter.
|
|
2555
|
+
*/
|
|
2556
|
+
max?: number | null;
|
|
2557
|
+
|
|
2558
|
+
/**
|
|
2559
|
+
* Array of parameters for the smart contract.
|
|
2560
|
+
*/
|
|
2561
|
+
params?: Array<SmartContract.Param> | null;
|
|
2562
|
+
|
|
2563
|
+
/**
|
|
2564
|
+
* Flag indicating if a bonus is applied.
|
|
2565
|
+
*/
|
|
2566
|
+
withBonus?: boolean | null;
|
|
2567
|
+
|
|
2568
|
+
/**
|
|
2569
|
+
* Flag indicating if a custom range is applied.
|
|
2570
|
+
*/
|
|
2571
|
+
withCustomRange?: boolean | null;
|
|
2572
|
+
|
|
2573
|
+
/**
|
|
2574
|
+
* Flag indicating if a maximum limit is applied.
|
|
2575
|
+
*/
|
|
2576
|
+
withMax?: boolean | null;
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2579
|
+
export namespace SmartContract {
|
|
2580
|
+
export interface Bonus {
|
|
2581
|
+
/**
|
|
2582
|
+
* Amount of the bonus.
|
|
2583
|
+
*/
|
|
2584
|
+
amount?: number | null;
|
|
2585
|
+
|
|
2586
|
+
/**
|
|
2587
|
+
* Number of times the bonus is applied.
|
|
2588
|
+
*/
|
|
2589
|
+
count?: number | null;
|
|
2590
|
+
}
|
|
2591
|
+
|
|
2592
|
+
/**
|
|
2593
|
+
* Time range applied to the rule.
|
|
2594
|
+
*/
|
|
2595
|
+
export interface CustomRange {
|
|
2596
|
+
/**
|
|
2597
|
+
* End time of the custom range.
|
|
2598
|
+
*/
|
|
2599
|
+
endsAt?: string | null;
|
|
2600
|
+
|
|
2601
|
+
/**
|
|
2602
|
+
* Start time of the custom range.
|
|
2603
|
+
*/
|
|
2604
|
+
startsAt?: string | null;
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
export interface Param {
|
|
2608
|
+
/**
|
|
2609
|
+
* Condition to check for the parameter.
|
|
2610
|
+
*/
|
|
2611
|
+
condition?: string | null;
|
|
2612
|
+
|
|
2613
|
+
/**
|
|
2614
|
+
* Name of the smart contract parameter.
|
|
2615
|
+
*/
|
|
2616
|
+
name?: string | null;
|
|
2617
|
+
|
|
2618
|
+
/**
|
|
2619
|
+
* Value of the parameter.
|
|
2620
|
+
*/
|
|
2621
|
+
value?: string | null;
|
|
2622
|
+
}
|
|
2623
|
+
}
|
|
2624
|
+
|
|
2625
|
+
export interface SnapshotProposal {
|
|
2626
|
+
/**
|
|
2627
|
+
* ID of the snapshot proposal.
|
|
2628
|
+
*/
|
|
2629
|
+
id: string;
|
|
2630
|
+
|
|
2631
|
+
/**
|
|
2632
|
+
* Space associated with the snapshot proposal.
|
|
2633
|
+
*/
|
|
2634
|
+
space: string;
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
export interface StreakArray {
|
|
2638
|
+
/**
|
|
2639
|
+
* Reward amount for achieving the streak milestone.
|
|
2640
|
+
*/
|
|
2641
|
+
streakAmount: number;
|
|
2642
|
+
|
|
2643
|
+
/**
|
|
2644
|
+
* Milestone required to achieve the streak.
|
|
2645
|
+
*/
|
|
2646
|
+
streakMilestone: number;
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
1962
2649
|
}
|
|
1963
2650
|
}
|
|
1964
2651
|
|
|
@@ -2500,6 +3187,12 @@ export namespace RuleCreateParams {
|
|
|
2500
3187
|
*/
|
|
2501
3188
|
trackAllContracts?: boolean | null;
|
|
2502
3189
|
|
|
3190
|
+
/**
|
|
3191
|
+
* Flag indicating if the progress is tracked. If enabled, the rule can only be
|
|
3192
|
+
* completed once the progress is 100%.
|
|
3193
|
+
*/
|
|
3194
|
+
trackProgress?: boolean | null;
|
|
3195
|
+
|
|
2503
3196
|
/**
|
|
2504
3197
|
* URL of the associated Twitter account.
|
|
2505
3198
|
*/
|
|
@@ -3400,6 +4093,12 @@ export namespace RuleUpdateParams {
|
|
|
3400
4093
|
*/
|
|
3401
4094
|
trackAllContracts?: boolean | null;
|
|
3402
4095
|
|
|
4096
|
+
/**
|
|
4097
|
+
* Flag indicating if the progress is tracked. If enabled, the rule can only be
|
|
4098
|
+
* completed once the progress is 100%.
|
|
4099
|
+
*/
|
|
4100
|
+
trackProgress?: boolean | null;
|
|
4101
|
+
|
|
3403
4102
|
/**
|
|
3404
4103
|
* URL of the associated Twitter account.
|
|
3405
4104
|
*/
|
|
@@ -3779,6 +4478,12 @@ export interface RuleListParams {
|
|
|
3779
4478
|
*/
|
|
3780
4479
|
collectionAddress?: string;
|
|
3781
4480
|
|
|
4481
|
+
/**
|
|
4482
|
+
* If true this will only return active rules, the rules for which the startTime is
|
|
4483
|
+
* in the past and the endTime is in the future
|
|
4484
|
+
*/
|
|
4485
|
+
isActive?: 'true' | 'false';
|
|
4486
|
+
|
|
3782
4487
|
/**
|
|
3783
4488
|
* Maximum number of records to return (max 1000)
|
|
3784
4489
|
*/
|
|
@@ -3855,11 +4560,13 @@ export interface RuleCompleteParams {
|
|
|
3855
4560
|
}
|
|
3856
4561
|
|
|
3857
4562
|
export interface RuleGetStatusParams {
|
|
3858
|
-
organizationId
|
|
3859
|
-
|
|
3860
|
-
websiteId: string;
|
|
4563
|
+
organizationId?: string;
|
|
3861
4564
|
|
|
3862
4565
|
userId?: string;
|
|
4566
|
+
|
|
4567
|
+
walletAddress?: string;
|
|
4568
|
+
|
|
4569
|
+
websiteId?: string;
|
|
3863
4570
|
}
|
|
3864
4571
|
|
|
3865
4572
|
export declare namespace Rules {
|