@snagsolutions/sdk 0.1.0-alpha.13 → 0.1.0-alpha.131
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 +1133 -0
- package/README.md +24 -28
- package/_shims/index.d.ts +2 -0
- package/_shims/index.js +5 -1
- package/_shims/index.mjs +5 -1
- package/core.d.ts +19 -5
- package/core.d.ts.map +1 -1
- package/core.js +35 -19
- package/core.js.map +1 -1
- package/core.mjs +36 -20
- package/core.mjs.map +1 -1
- package/index.d.mts +25 -16
- package/index.d.ts +25 -16
- package/index.d.ts.map +1 -1
- package/index.js +20 -10
- package/index.js.map +1 -1
- package/index.mjs +21 -11
- package/index.mjs.map +1 -1
- package/package.json +4 -5
- package/resource.d.ts +1 -1
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/assets.d.ts +23 -9
- package/resources/assets.d.ts.map +1 -1
- package/resources/assets.js +12 -4
- package/resources/assets.js.map +1 -1
- package/resources/assets.mjs +12 -4
- package/resources/assets.mjs.map +1 -1
- package/resources/auctions/auctions.d.ts +285 -0
- package/resources/auctions/auctions.d.ts.map +1 -0
- package/resources/auctions/auctions.js +76 -0
- package/resources/auctions/auctions.js.map +1 -0
- package/resources/auctions/auctions.mjs +49 -0
- package/resources/auctions/auctions.mjs.map +1 -0
- package/resources/auctions/index.d.ts +3 -0
- package/resources/auctions/index.d.ts.map +1 -0
- package/resources/auctions/index.js +9 -0
- package/resources/auctions/index.js.map +1 -0
- package/resources/auctions/index.mjs +4 -0
- package/resources/auctions/index.mjs.map +1 -0
- package/resources/auctions/website-user-attributes/index.d.ts +3 -0
- package/resources/auctions/website-user-attributes/index.d.ts.map +1 -0
- package/resources/auctions/website-user-attributes/index.js +9 -0
- package/resources/auctions/website-user-attributes/index.js.map +1 -0
- package/resources/auctions/website-user-attributes/index.mjs +4 -0
- package/resources/auctions/website-user-attributes/index.mjs.map +1 -0
- package/resources/auctions/website-user-attributes/values.d.ts +122 -0
- package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
- package/resources/auctions/website-user-attributes/values.js +49 -0
- package/resources/auctions/website-user-attributes/values.js.map +1 -0
- package/resources/auctions/website-user-attributes/values.mjs +45 -0
- package/resources/auctions/website-user-attributes/values.mjs.map +1 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +132 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.js +76 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.mjs +49 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -0
- package/resources/auctions/website-user-attributes.d.ts +2 -0
- package/resources/auctions/website-user-attributes.d.ts.map +1 -0
- package/resources/auctions/website-user-attributes.js +19 -0
- package/resources/auctions/website-user-attributes.js.map +1 -0
- package/resources/auctions/website-user-attributes.mjs +3 -0
- package/resources/auctions/website-user-attributes.mjs.map +1 -0
- package/resources/auctions.d.ts +2 -0
- package/resources/auctions.d.ts.map +1 -0
- package/resources/auctions.js +19 -0
- package/resources/auctions.js.map +1 -0
- package/resources/auctions.mjs +3 -0
- package/resources/auctions.mjs.map +1 -0
- package/resources/auth.d.ts +44 -0
- package/resources/auth.d.ts.map +1 -0
- package/resources/auth.js +16 -0
- package/resources/auth.js.map +1 -0
- package/resources/auth.mjs +12 -0
- package/resources/auth.mjs.map +1 -0
- package/resources/index.d.ts +7 -5
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +10 -6
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +6 -4
- package/resources/index.mjs.map +1 -1
- package/resources/loyalty/account-streaks.d.ts +81 -0
- package/resources/loyalty/account-streaks.d.ts.map +1 -0
- package/resources/loyalty/account-streaks.js +24 -0
- package/resources/loyalty/account-streaks.js.map +1 -0
- package/resources/loyalty/account-streaks.mjs +20 -0
- package/resources/loyalty/account-streaks.mjs.map +1 -0
- package/resources/loyalty/accounts.d.ts +62 -15
- package/resources/loyalty/accounts.d.ts.map +1 -1
- package/resources/loyalty/accounts.js +22 -1
- package/resources/loyalty/accounts.js.map +1 -1
- package/resources/loyalty/accounts.mjs +22 -1
- package/resources/loyalty/accounts.mjs.map +1 -1
- package/resources/loyalty/badges.d.ts +980 -77
- package/resources/loyalty/badges.d.ts.map +1 -1
- package/resources/loyalty/badges.js +19 -1
- package/resources/loyalty/badges.js.map +1 -1
- package/resources/loyalty/badges.mjs +19 -1
- package/resources/loyalty/badges.mjs.map +1 -1
- package/resources/loyalty/currencies.d.ts +20 -1
- package/resources/loyalty/currencies.d.ts.map +1 -1
- package/resources/loyalty/currencies.js +19 -0
- package/resources/loyalty/currencies.js.map +1 -1
- package/resources/loyalty/currencies.mjs +19 -0
- package/resources/loyalty/currencies.mjs.map +1 -1
- package/resources/loyalty/index.d.ts +9 -5
- package/resources/loyalty/index.d.ts.map +1 -1
- package/resources/loyalty/index.js +11 -3
- package/resources/loyalty/index.js.map +1 -1
- package/resources/loyalty/index.mjs +6 -2
- package/resources/loyalty/index.mjs.map +1 -1
- package/resources/loyalty/loyalty.d.ts +33 -17
- package/resources/loyalty/loyalty.d.ts.map +1 -1
- package/resources/loyalty/loyalty.js +28 -12
- package/resources/loyalty/loyalty.js.map +1 -1
- package/resources/loyalty/loyalty.mjs +29 -13
- package/resources/loyalty/loyalty.mjs.map +1 -1
- package/resources/loyalty/multipliers.d.ts +97 -4
- package/resources/loyalty/multipliers.d.ts.map +1 -1
- package/resources/loyalty/multipliers.js +29 -0
- package/resources/loyalty/multipliers.js.map +1 -1
- package/resources/loyalty/multipliers.mjs +29 -0
- package/resources/loyalty/multipliers.mjs.map +1 -1
- package/resources/loyalty/questions-responses.d.ts +136 -0
- package/resources/loyalty/questions-responses.d.ts.map +1 -0
- package/resources/loyalty/questions-responses.js +31 -0
- package/resources/loyalty/questions-responses.js.map +1 -0
- package/resources/loyalty/questions-responses.mjs +27 -0
- package/resources/loyalty/questions-responses.mjs.map +1 -0
- package/resources/loyalty/questions.d.ts +185 -0
- package/resources/loyalty/questions.d.ts.map +1 -0
- package/resources/loyalty/questions.js +58 -0
- package/resources/loyalty/questions.js.map +1 -0
- package/resources/loyalty/questions.mjs +54 -0
- package/resources/loyalty/questions.mjs.map +1 -0
- package/resources/loyalty/rule-edits.d.ts +2585 -11
- package/resources/loyalty/rule-edits.d.ts.map +1 -1
- package/resources/loyalty/rule-edits.js +16 -2
- package/resources/loyalty/rule-edits.js.map +1 -1
- package/resources/loyalty/rule-edits.mjs +16 -2
- package/resources/loyalty/rule-edits.mjs.map +1 -1
- package/resources/loyalty/rule-groups.d.ts +762 -0
- package/resources/loyalty/rule-groups.d.ts.map +1 -0
- package/resources/loyalty/rule-groups.js +52 -0
- package/resources/loyalty/rule-groups.js.map +1 -0
- package/resources/loyalty/rule-groups.mjs +48 -0
- package/resources/loyalty/rule-groups.mjs.map +1 -0
- package/resources/loyalty/rules.d.ts +1871 -296
- package/resources/loyalty/rules.d.ts.map +1 -1
- package/resources/loyalty/rules.js +40 -9
- package/resources/loyalty/rules.js.map +1 -1
- package/resources/loyalty/rules.mjs +40 -9
- package/resources/loyalty/rules.mjs.map +1 -1
- package/resources/loyalty/transactions/index.d.ts +3 -0
- package/resources/loyalty/transactions/index.d.ts.map +1 -0
- package/resources/loyalty/transactions/index.js +9 -0
- package/resources/loyalty/transactions/index.js.map +1 -0
- package/resources/loyalty/transactions/index.mjs +4 -0
- package/resources/loyalty/transactions/index.mjs.map +1 -0
- package/resources/loyalty/transactions/rule-statuses.d.ts +120 -0
- package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
- package/resources/loyalty/transactions/rule-statuses.js +30 -0
- package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
- package/resources/loyalty/transactions/rule-statuses.mjs +26 -0
- package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
- package/resources/loyalty/transactions/transactions.d.ts +410 -0
- package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
- package/resources/loyalty/transactions/transactions.js +76 -0
- package/resources/loyalty/transactions/transactions.js.map +1 -0
- package/resources/loyalty/transactions/transactions.mjs +49 -0
- package/resources/loyalty/transactions/transactions.mjs.map +1 -0
- package/resources/loyalty/transactions.d.ts +2 -0
- package/resources/loyalty/transactions.d.ts.map +1 -0
- package/resources/loyalty/transactions.js +19 -0
- package/resources/loyalty/transactions.js.map +1 -0
- package/resources/loyalty/transactions.mjs +3 -0
- package/resources/loyalty/transactions.mjs.map +1 -0
- package/resources/loyalty.d.ts +2 -0
- package/resources/loyalty.d.ts.map +1 -0
- package/resources/loyalty.js +19 -0
- package/resources/loyalty.js.map +1 -0
- package/resources/loyalty.mjs +3 -0
- package/resources/loyalty.mjs.map +1 -0
- package/resources/minting.d.ts +95 -0
- package/resources/minting.d.ts.map +1 -0
- package/resources/minting.js +15 -0
- package/resources/minting.js.map +1 -0
- package/resources/minting.mjs +11 -0
- package/resources/minting.mjs.map +1 -0
- package/resources/referral/index.d.ts +3 -0
- package/resources/referral/index.d.ts.map +1 -0
- package/resources/referral/index.js +9 -0
- package/resources/referral/index.js.map +1 -0
- package/resources/referral/index.mjs +4 -0
- package/resources/referral/index.mjs.map +1 -0
- package/resources/referral/referral.d.ts +39 -0
- package/resources/referral/referral.d.ts.map +1 -0
- package/resources/{drip/drip.js → referral/referral.js} +21 -12
- package/resources/referral/referral.js.map +1 -0
- package/resources/referral/referral.mjs +25 -0
- package/resources/referral/referral.mjs.map +1 -0
- package/resources/referral/users.d.ts +83 -0
- package/resources/referral/users.d.ts.map +1 -0
- package/resources/referral/users.js +35 -0
- package/resources/referral/users.js.map +1 -0
- package/resources/referral/users.mjs +31 -0
- package/resources/referral/users.mjs.map +1 -0
- package/resources/referral.d.ts +2 -0
- package/resources/referral.d.ts.map +1 -0
- package/resources/referral.js +19 -0
- package/resources/referral.js.map +1 -0
- package/resources/referral.mjs +3 -0
- package/resources/referral.mjs.map +1 -0
- package/resources/users/index.d.ts +2 -3
- package/resources/users/index.d.ts.map +1 -1
- package/resources/users/index.js +1 -3
- package/resources/users/index.js.map +1 -1
- package/resources/users/index.mjs +2 -3
- package/resources/users/index.mjs.map +1 -1
- package/resources/users/metadatas.d.ts +112 -9
- package/resources/users/metadatas.d.ts.map +1 -1
- package/resources/users/metadatas.js +6 -0
- package/resources/users/metadatas.js.map +1 -1
- package/resources/users/metadatas.mjs +6 -0
- package/resources/users/metadatas.mjs.map +1 -1
- package/resources/users/users.d.ts +414 -6
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.js +77 -4
- package/resources/users/users.js.map +1 -1
- package/resources/users/users.mjs +78 -5
- package/resources/users/users.mjs.map +1 -1
- package/resources/users.d.ts +2 -0
- package/resources/users.d.ts.map +1 -0
- package/resources/users.js +19 -0
- package/resources/users.js.map +1 -0
- package/resources/users.mjs +3 -0
- package/resources/users.mjs.map +1 -0
- package/resources/websites/index.d.ts +4 -0
- package/resources/websites/index.d.ts.map +1 -0
- package/resources/websites/index.js +11 -0
- package/resources/websites/index.js.map +1 -0
- package/resources/websites/index.mjs +5 -0
- package/resources/websites/index.mjs.map +1 -0
- package/resources/websites/website-collections.d.ts +94 -0
- package/resources/websites/website-collections.d.ts.map +1 -0
- package/resources/websites/website-collections.js +46 -0
- package/resources/websites/website-collections.js.map +1 -0
- package/resources/websites/website-collections.mjs +42 -0
- package/resources/websites/website-collections.mjs.map +1 -0
- package/resources/websites/website-user-roles.d.ts +96 -0
- package/resources/websites/website-user-roles.d.ts.map +1 -0
- package/resources/websites/website-user-roles.js +45 -0
- package/resources/websites/website-user-roles.js.map +1 -0
- package/resources/websites/website-user-roles.mjs +41 -0
- package/resources/websites/website-user-roles.mjs.map +1 -0
- package/resources/websites/websites.d.ts +223 -0
- package/resources/websites/websites.d.ts.map +1 -0
- package/resources/websites/websites.js +63 -0
- package/resources/websites/websites.js.map +1 -0
- package/resources/websites/websites.mjs +36 -0
- package/resources/websites/websites.mjs.map +1 -0
- package/resources/websites.d.ts +1 -202
- package/resources/websites.d.ts.map +1 -1
- package/resources/websites.js +15 -18
- package/resources/websites.js.map +1 -1
- package/resources/websites.mjs +1 -16
- package/resources/websites.mjs.map +1 -1
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +18 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/_shims/index.d.ts +2 -0
- package/src/_shims/index.js +5 -1
- package/src/_shims/index.mjs +5 -1
- package/src/core.ts +56 -20
- package/src/index.ts +97 -24
- package/src/resource.ts +1 -1
- package/src/resources/assets.ts +31 -9
- package/src/resources/auctions/auctions.ts +436 -0
- package/src/resources/auctions/index.ts +18 -0
- package/src/resources/auctions/website-user-attributes/index.ts +18 -0
- package/src/resources/auctions/website-user-attributes/values.ts +165 -0
- package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +207 -0
- package/src/resources/auctions/website-user-attributes.ts +3 -0
- package/src/resources/auctions.ts +3 -0
- package/src/resources/auth.ts +74 -0
- package/src/resources/index.ts +31 -5
- package/src/resources/loyalty/account-streaks.ts +110 -0
- package/src/resources/loyalty/accounts.ts +79 -16
- package/src/resources/loyalty/badges.ts +1192 -92
- package/src/resources/loyalty/currencies.ts +20 -1
- package/src/resources/loyalty/index.ts +53 -9
- package/src/resources/loyalty/loyalty.ts +160 -60
- package/src/resources/loyalty/multipliers.ts +124 -4
- package/src/resources/loyalty/questions-responses.ts +191 -0
- package/src/resources/loyalty/questions.ts +244 -0
- package/src/resources/loyalty/rule-edits.ts +3622 -63
- package/src/resources/loyalty/rule-groups.ts +1181 -0
- package/src/resources/loyalty/rules.ts +3068 -579
- package/src/resources/loyalty/transactions/index.ts +18 -0
- package/src/resources/loyalty/transactions/rule-statuses.ts +178 -0
- package/src/resources/loyalty/transactions/transactions.ts +675 -0
- package/src/resources/loyalty/transactions.ts +3 -0
- package/src/resources/loyalty.ts +3 -0
- package/src/resources/minting.ts +170 -0
- package/src/resources/referral/index.ts +10 -0
- package/src/resources/referral/referral.ts +72 -0
- package/src/resources/referral/users.ts +122 -0
- package/src/resources/referral.ts +3 -0
- package/src/resources/users/index.ts +21 -9
- package/src/resources/users/metadatas.ts +167 -8
- package/src/resources/users/users.ts +581 -17
- package/src/resources/users.ts +3 -0
- package/src/resources/websites/index.ts +22 -0
- package/src/resources/websites/website-collections.ts +182 -0
- package/src/resources/websites/website-user-roles.ts +130 -0
- package/src/resources/websites/websites.ts +311 -0
- package/src/resources/websites.ts +1 -257
- package/src/resources.ts +1 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/auction-bids.d.ts +0 -81
- package/resources/auction-bids.d.ts.map +0 -1
- package/resources/auction-bids.js +0 -30
- package/resources/auction-bids.js.map +0 -1
- package/resources/auction-bids.mjs +0 -26
- package/resources/auction-bids.mjs.map +0 -1
- package/resources/drip/drip.d.ts +0 -14
- package/resources/drip/drip.d.ts.map +0 -1
- package/resources/drip/drip.js.map +0 -1
- package/resources/drip/drip.mjs +0 -16
- package/resources/drip/drip.mjs.map +0 -1
- package/resources/drip/index.d.ts +0 -4
- package/resources/drip/index.d.ts.map +0 -1
- package/resources/drip/index.js +0 -11
- package/resources/drip/index.js.map +0 -1
- package/resources/drip/index.mjs +0 -5
- package/resources/drip/index.mjs.map +0 -1
- package/resources/drip/quests.d.ts +0 -168
- package/resources/drip/quests.d.ts.map +0 -1
- package/resources/drip/quests.js +0 -17
- package/resources/drip/quests.js.map +0 -1
- package/resources/drip/quests.mjs +0 -13
- package/resources/drip/quests.mjs.map +0 -1
- package/resources/drip/status.d.ts +0 -26
- package/resources/drip/status.d.ts.map +0 -1
- package/resources/drip/status.js +0 -16
- package/resources/drip/status.js.map +0 -1
- package/resources/drip/status.mjs +0 -12
- package/resources/drip/status.mjs.map +0 -1
- package/resources/loyalty/transaction-entries.d.ts +0 -175
- package/resources/loyalty/transaction-entries.d.ts.map +0 -1
- package/resources/loyalty/transaction-entries.js +0 -16
- package/resources/loyalty/transaction-entries.js.map +0 -1
- package/resources/loyalty/transaction-entries.mjs +0 -12
- package/resources/loyalty/transaction-entries.mjs.map +0 -1
- package/resources/users/wallets.d.ts +0 -193
- package/resources/users/wallets.d.ts.map +0 -1
- package/resources/users/wallets.js +0 -28
- package/resources/users/wallets.js.map +0 -1
- package/resources/users/wallets.mjs +0 -24
- package/resources/users/wallets.mjs.map +0 -1
- package/src/resources/auction-bids.ts +0 -123
- package/src/resources/drip/drip.ts +0 -25
- package/src/resources/drip/index.ts +0 -5
- package/src/resources/drip/quests.ts +0 -210
- package/src/resources/drip/status.ts +0 -33
- package/src/resources/loyalty/transaction-entries.ts +0 -229
- package/src/resources/users/wallets.ts +0 -271
|
@@ -3,34 +3,91 @@ import * as Core from "../../core.js";
|
|
|
3
3
|
export declare class Rules extends APIResource {
|
|
4
4
|
/**
|
|
5
5
|
* Create a new Loyalty Rule
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const rule = await client.loyalty.rules.create({
|
|
10
|
+
* amount: '10.5',
|
|
11
|
+
* effectiveEndTime: '2024-12-31T23:59:00Z',
|
|
12
|
+
* effectiveStartTime: '2024-01-01T00:00:00Z',
|
|
13
|
+
* endTime: '2024-12-31T23:59:00Z',
|
|
14
|
+
* frequency: 'daily',
|
|
15
|
+
* loyaltyCurrencyId: '456e1234-e89b-12d3-a456-426614174003',
|
|
16
|
+
* metadata: {},
|
|
17
|
+
* name: 'Referral Bonus Rule',
|
|
18
|
+
* organizationId: '123e4567-e89b-12d3-a456-426614174001',
|
|
19
|
+
* startTime: '2024-01-01T00:00:00Z',
|
|
20
|
+
* type: 'Bonus',
|
|
21
|
+
* websiteId: '123e4567-e89b-12d3-a456-426614174002',
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
6
24
|
*/
|
|
7
25
|
create(body: RuleCreateParams, options?: Core.RequestOptions): Core.APIPromise<RuleCreateResponse>;
|
|
8
26
|
/**
|
|
9
27
|
* Update an existing Loyalty Rule
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const rule = await client.loyalty.rules.update(
|
|
32
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
33
|
+
* {
|
|
34
|
+
* amount: '10.5',
|
|
35
|
+
* endTime: '2024-12-31T23:59:00Z',
|
|
36
|
+
* name: 'Daily Rewards Program',
|
|
37
|
+
* },
|
|
38
|
+
* );
|
|
39
|
+
* ```
|
|
10
40
|
*/
|
|
11
41
|
update(id: string, body: RuleUpdateParams, options?: Core.RequestOptions): Core.APIPromise<RuleUpdateResponse>;
|
|
12
42
|
/**
|
|
13
43
|
* Retrieve configured loyalty rules with optional pagination and filters
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const rules = await client.loyalty.rules.list();
|
|
48
|
+
* ```
|
|
14
49
|
*/
|
|
15
50
|
list(query?: RuleListParams, options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
|
|
16
51
|
list(options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
|
|
17
52
|
/**
|
|
18
53
|
* Delete an existing Loyalty Rule
|
|
19
|
-
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const rule = await client.loyalty.rules.delete(
|
|
58
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
59
|
+
* );
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
delete(id: string, params?: RuleDeleteParams, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse>;
|
|
20
63
|
delete(id: string, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse>;
|
|
21
64
|
/**
|
|
22
65
|
* Verify a loyalty rule based on user action and reward them if applicable. This
|
|
23
|
-
* endpoint
|
|
66
|
+
* endpoint currently only supports following rule types code_entry, text_input,
|
|
24
67
|
* link_click, discord_member, connect_wallet, check_in, external_rule,
|
|
25
68
|
* drip_x_follow, drip_x_new_tweet, drip_x_text_in_bio, drip_x_text_in_name,
|
|
26
|
-
* drip_x_text_in_comment, drip_x_tweet, telegram_join
|
|
69
|
+
* drip_x_text_in_comment, drip_x_tweet, telegram_join, DiscordMessages,
|
|
70
|
+
* youtube_subscribers, youtube_comment, steam_wishlist
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* const response = await client.loyalty.rules.complete(
|
|
75
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
76
|
+
* );
|
|
77
|
+
* ```
|
|
27
78
|
*/
|
|
28
79
|
complete(id: string, body?: RuleCompleteParams, options?: Core.RequestOptions): Core.APIPromise<RuleCompleteResponse>;
|
|
29
80
|
complete(id: string, options?: Core.RequestOptions): Core.APIPromise<RuleCompleteResponse>;
|
|
30
81
|
/**
|
|
31
82
|
* This will return the processing status of quests for a specific user
|
|
32
|
-
|
|
33
|
-
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* const response = await client.loyalty.rules.getStatus();
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
getStatus(query?: RuleGetStatusParams, options?: Core.RequestOptions): Core.APIPromise<RuleGetStatusResponse>;
|
|
90
|
+
getStatus(options?: Core.RequestOptions): Core.APIPromise<RuleGetStatusResponse>;
|
|
34
91
|
}
|
|
35
92
|
export interface RuleCreateResponse {
|
|
36
93
|
id: string;
|
|
@@ -77,7 +134,7 @@ export interface RuleCreateResponse {
|
|
|
77
134
|
/**
|
|
78
135
|
* Type of loyalty rule being created
|
|
79
136
|
*/
|
|
80
|
-
type: 'Bonus' | 'BoughtOn' | 'BoughtWithRoyalties' | 'DiscordMessages' | 'Listing' | 'Lodging' | 'MintOn' | 'PoapClaim' | 'SnagSocialsConnected' | 'SnapshotFullset' | 'SnapshotHold' | 'SoldOn' | 'SoldWithRoyalties' | 'TokenHold' | 'TwitterBio' | 'TwitterHashTagPost' | 'Retweet' | 'check_in' | 'code_entry' | 'connect_wallet' | 'connected_discord' | 'connected_email' | 'connected_epic' | 'connected_steam' | 'connected_telegram' | 'connected_twitter' | 'create_partner_account' | 'discord_member' | 'drip_x_follow' | 'drip_x_new_tweet' | 'drip_x_text_in_bio' | 'drip_x_text_in_comment' | 'drip_x_text_in_name' | 'drip_x_tweet' | 'external_rule' | 'link_click' | 'manual_upload' | 'profile_completed' | 'referred_user' | 'smart_contract_event' | 'snapshot_governance' | 'telegram_join' | 'telegram_messages' | 'text_input' | 'token_hold_erc20' | 'tweet_liked_by_project' | 'twitter_comment' | 'twitter_follow' | 'twitter_followers' | 'twitter_like' | 'twitter_post_hashtag';
|
|
137
|
+
type: 'Bonus' | 'BoughtOn' | 'BoughtWithRoyalties' | 'DiscordMessages' | 'Listing' | 'Lodging' | 'MintOn' | 'PoapClaim' | 'SnagSocialsConnected' | 'SnapshotFullset' | 'SnapshotHold' | 'SoldOn' | 'SoldWithRoyalties' | 'TokenHold' | 'TwitterBio' | 'TwitterHashTagPost' | 'Retweet' | 'check_in' | 'code_entry' | 'connect_wallet' | 'connected_discord' | 'connected_email' | 'connected_epic' | 'connected_steam' | 'connected_telegram' | 'connected_twitter' | 'create_partner_account' | 'discord_member' | 'drip_x_follow' | 'drip_x_new_tweet' | 'drip_x_text_in_bio' | 'drip_x_text_in_comment' | 'drip_x_text_in_name' | 'drip_x_tweet' | 'external_rule' | 'link_click' | 'manual_upload' | 'profile_completed' | 'referred_user' | 'smart_contract_event' | 'snapshot_governance' | 'telegram_join' | 'telegram_messages' | 'text_input' | 'token_hold_erc20' | 'tweet_liked_by_project' | 'twitter_comment' | 'twitter_follow' | 'twitter_followers' | 'twitter_like' | 'twitter_post_hashtag' | 'quiz' | 'poll' | 'steam_wishlist' | 'liquidity_uniswap_v2' | 'liquidity_uniswap_v3' | 'points_airdrop' | 'youtube_subscribers' | 'youtube_comment' | 'shopify_spend' | 'swap' | 'tiktok_post' | 'post_impressions' | 'discord_join';
|
|
81
138
|
/**
|
|
82
139
|
* Unique identifier for the associated website
|
|
83
140
|
*/
|
|
@@ -106,6 +163,11 @@ export interface RuleCreateResponse {
|
|
|
106
163
|
* Optional detailed description of the rule
|
|
107
164
|
*/
|
|
108
165
|
description?: string;
|
|
166
|
+
duplicatedFromId?: string | null;
|
|
167
|
+
/**
|
|
168
|
+
* ID of the external integration
|
|
169
|
+
*/
|
|
170
|
+
externalIntegrationId?: string | null;
|
|
109
171
|
/**
|
|
110
172
|
* Whether to hide this rule in the user interface
|
|
111
173
|
*/
|
|
@@ -113,19 +175,41 @@ export interface RuleCreateResponse {
|
|
|
113
175
|
/**
|
|
114
176
|
* Interval between rule executions
|
|
115
177
|
*/
|
|
116
|
-
interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
|
|
178
|
+
interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
|
|
117
179
|
/**
|
|
118
180
|
* Whether this rule is mandatory
|
|
119
181
|
*/
|
|
120
182
|
isRequired?: boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Unique identifier for the loyalty badge
|
|
185
|
+
*/
|
|
186
|
+
loyaltyBadgeId?: string | null;
|
|
121
187
|
/**
|
|
122
188
|
* Unique identifier for the loyalty rule group
|
|
123
189
|
*/
|
|
124
190
|
loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
|
|
191
|
+
/**
|
|
192
|
+
* URL for uploading loyalty user allotment via CSV
|
|
193
|
+
*/
|
|
194
|
+
loyaltyUserAllotmentCsvUrl?: string;
|
|
195
|
+
/**
|
|
196
|
+
* The interval for the max amount. Available for the smart contract and external
|
|
197
|
+
* rules.
|
|
198
|
+
*/
|
|
199
|
+
maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
|
|
200
|
+
/**
|
|
201
|
+
* The maximum amount of points a user can earn per interval. Available for the
|
|
202
|
+
* smart contract and external rules.
|
|
203
|
+
*/
|
|
204
|
+
maxAmountPerInterval?: number | null;
|
|
205
|
+
/**
|
|
206
|
+
* URL of the media to be displayed
|
|
207
|
+
*/
|
|
208
|
+
mediaUrl?: string | null;
|
|
125
209
|
/**
|
|
126
210
|
* Blockchain network where the rule will apply
|
|
127
211
|
*/
|
|
128
|
-
network?: '
|
|
212
|
+
network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
129
213
|
/**
|
|
130
214
|
* OAuth credentials associated with the rule
|
|
131
215
|
*/
|
|
@@ -133,17 +217,25 @@ export interface RuleCreateResponse {
|
|
|
133
217
|
/**
|
|
134
218
|
* Type of reward issued by the rule
|
|
135
219
|
*/
|
|
136
|
-
rewardType?: 'points' | 'multiplier';
|
|
220
|
+
rewardType?: 'points' | 'multiplier' | 'badge';
|
|
221
|
+
/**
|
|
222
|
+
* URL of the Shopify store
|
|
223
|
+
*/
|
|
224
|
+
shopifyStoreUrl?: string | null;
|
|
137
225
|
/**
|
|
138
|
-
*
|
|
226
|
+
* Optional subscription id for the rule
|
|
139
227
|
*/
|
|
140
|
-
|
|
228
|
+
subscriptionId?: string | null;
|
|
141
229
|
}
|
|
142
230
|
export declare namespace RuleCreateResponse {
|
|
143
231
|
/**
|
|
144
232
|
* Additional metadata for the loyalty rule
|
|
145
233
|
*/
|
|
146
234
|
interface Metadata {
|
|
235
|
+
/**
|
|
236
|
+
* Number of tokens per batch.
|
|
237
|
+
*/
|
|
238
|
+
batchSize?: number | null;
|
|
147
239
|
/**
|
|
148
240
|
* Text displayed on the action button.
|
|
149
241
|
*/
|
|
@@ -168,6 +260,16 @@ export declare namespace RuleCreateResponse {
|
|
|
168
260
|
* Array of collections associated with the rule.
|
|
169
261
|
*/
|
|
170
262
|
collection?: Array<Metadata.Collection>;
|
|
263
|
+
/**
|
|
264
|
+
* Conditions for completing the profile.
|
|
265
|
+
*/
|
|
266
|
+
completeProfileConditions?: {
|
|
267
|
+
[key: string]: boolean;
|
|
268
|
+
} | null;
|
|
269
|
+
/**
|
|
270
|
+
* Description of the external rule condition (only for external rules)
|
|
271
|
+
*/
|
|
272
|
+
conditionDescription?: string;
|
|
171
273
|
/**
|
|
172
274
|
* Object containing details for the call-to-action.
|
|
173
275
|
*/
|
|
@@ -176,6 +278,10 @@ export declare namespace RuleCreateResponse {
|
|
|
176
278
|
* API key for custom rewards integration.
|
|
177
279
|
*/
|
|
178
280
|
customRewardsApiKey?: string;
|
|
281
|
+
/**
|
|
282
|
+
* Flag indicating if the rule should use direct RPC to get the balance of tokens.
|
|
283
|
+
*/
|
|
284
|
+
directRpc?: boolean;
|
|
179
285
|
/**
|
|
180
286
|
* Array of Discord servers, channels, and roles to join.
|
|
181
287
|
*/
|
|
@@ -196,10 +302,18 @@ export declare namespace RuleCreateResponse {
|
|
|
196
302
|
* Flag indicating whether the verified multiplier is enabled.
|
|
197
303
|
*/
|
|
198
304
|
enableVerifiedMultiplier?: boolean;
|
|
305
|
+
/**
|
|
306
|
+
* Fill source of the order for the token sale
|
|
307
|
+
*/
|
|
308
|
+
fillSource?: string;
|
|
199
309
|
/**
|
|
200
310
|
* Percentage reward given to a user for their first referral.
|
|
201
311
|
*/
|
|
202
312
|
firstReferralReward?: number | null;
|
|
313
|
+
/**
|
|
314
|
+
* Flag indicating whether the fill source is included.
|
|
315
|
+
*/
|
|
316
|
+
hasFillSource?: boolean;
|
|
203
317
|
/**
|
|
204
318
|
* Indicates if the item has never been sold.
|
|
205
319
|
*/
|
|
@@ -220,10 +334,18 @@ export declare namespace RuleCreateResponse {
|
|
|
220
334
|
* URL of the image associated with the rule.
|
|
221
335
|
*/
|
|
222
336
|
imageUrl?: string | null;
|
|
337
|
+
/**
|
|
338
|
+
* If enabled, the first transaction done on the platform will complete this rule
|
|
339
|
+
*/
|
|
340
|
+
isCheckInOnEveryTxn?: boolean;
|
|
223
341
|
/**
|
|
224
342
|
* Indicates if the multiplier has been applied to rewards.
|
|
225
343
|
*/
|
|
226
344
|
isMultiplierApplied?: boolean;
|
|
345
|
+
/**
|
|
346
|
+
* Flag indicating if the rule is restricted to new users.
|
|
347
|
+
*/
|
|
348
|
+
isRestrictedToNewUsers?: boolean;
|
|
227
349
|
/**
|
|
228
350
|
* Flag indicating if rewards are applied retroactively.
|
|
229
351
|
*/
|
|
@@ -236,6 +358,10 @@ export declare namespace RuleCreateResponse {
|
|
|
236
358
|
* Optional link associated with the metadata.
|
|
237
359
|
*/
|
|
238
360
|
link?: string | null;
|
|
361
|
+
/**
|
|
362
|
+
* Liquidity pool details.
|
|
363
|
+
*/
|
|
364
|
+
liquidity?: Metadata.Liquidity;
|
|
239
365
|
/**
|
|
240
366
|
* Maximum quantity constraint for token holding.
|
|
241
367
|
*/
|
|
@@ -260,10 +386,30 @@ export declare namespace RuleCreateResponse {
|
|
|
260
386
|
* Flag indicating whether to include only non-listed items.
|
|
261
387
|
*/
|
|
262
388
|
onlyNonListed?: boolean;
|
|
389
|
+
/**
|
|
390
|
+
* Indicates if only existing users are rewarded.
|
|
391
|
+
*/
|
|
392
|
+
onlyRewardExistingUser?: boolean;
|
|
393
|
+
/**
|
|
394
|
+
* give points for only one token ownership per contract
|
|
395
|
+
*/
|
|
396
|
+
onlyRewardSingleTokenOwnership?: boolean | null;
|
|
263
397
|
/**
|
|
264
398
|
* Promotional code associated with the rule.
|
|
265
399
|
*/
|
|
266
400
|
promoCode?: string;
|
|
401
|
+
/**
|
|
402
|
+
* URL of the CSV file containing promo codes.
|
|
403
|
+
*/
|
|
404
|
+
promoCodeCsvUrl?: string;
|
|
405
|
+
/**
|
|
406
|
+
* Numbers of the promotional code to be generated.
|
|
407
|
+
*/
|
|
408
|
+
promoCodeLength?: number | null;
|
|
409
|
+
/**
|
|
410
|
+
* Type of the promotional code.
|
|
411
|
+
*/
|
|
412
|
+
promoCodeType?: 'code' | 'csv' | 'generate';
|
|
267
413
|
/**
|
|
268
414
|
* Array defining ranges and corresponding rewards.
|
|
269
415
|
*/
|
|
@@ -276,10 +422,43 @@ export declare namespace RuleCreateResponse {
|
|
|
276
422
|
* Lump sum reward given to a referrer.
|
|
277
423
|
*/
|
|
278
424
|
referrerReward?: number | null;
|
|
425
|
+
/**
|
|
426
|
+
* Loyalty currency ID of the referrer reward.
|
|
427
|
+
*/
|
|
428
|
+
referrerRewardLoyaltyCurrencyId?: string | null;
|
|
429
|
+
/**
|
|
430
|
+
* Flag indicating if the post link is required.
|
|
431
|
+
*/
|
|
432
|
+
requirePostLink?: boolean | null;
|
|
433
|
+
/**
|
|
434
|
+
* Flag indicating if the rule can also reward badges per range.
|
|
435
|
+
*/
|
|
436
|
+
rewardBadgePerRange?: boolean;
|
|
437
|
+
/**
|
|
438
|
+
* Flag indicating if the reward is rewarded by batch.
|
|
439
|
+
*/
|
|
440
|
+
rewardByBatch?: boolean | null;
|
|
441
|
+
/**
|
|
442
|
+
* Flag indicating if the reward is rewarded per action.
|
|
443
|
+
*/
|
|
444
|
+
rewardPerAction?: boolean | null;
|
|
279
445
|
/**
|
|
280
446
|
* Flag indicating if rewards are given per impression.
|
|
281
447
|
*/
|
|
282
448
|
rewardPerImpression?: boolean | null;
|
|
449
|
+
/**
|
|
450
|
+
* Flag indicating if the rule should reward based on value of traded tokens
|
|
451
|
+
* instead of count.
|
|
452
|
+
*/
|
|
453
|
+
rewardPerValue?: boolean;
|
|
454
|
+
/**
|
|
455
|
+
* Wallet address of the user can only be used if userId is not provided
|
|
456
|
+
*/
|
|
457
|
+
royaltyAddress?: string;
|
|
458
|
+
/**
|
|
459
|
+
* Royalty percentage of the item.
|
|
460
|
+
*/
|
|
461
|
+
royaltyPercentage?: number;
|
|
283
462
|
/**
|
|
284
463
|
* Currency associated with sales.
|
|
285
464
|
*/
|
|
@@ -288,6 +467,10 @@ export declare namespace RuleCreateResponse {
|
|
|
288
467
|
* Percentage reward given for a second-level referral.
|
|
289
468
|
*/
|
|
290
469
|
secondReferralReward?: number | null;
|
|
470
|
+
/**
|
|
471
|
+
* Flag indicating if the multiplier is skipped.
|
|
472
|
+
*/
|
|
473
|
+
skipMultiplier?: boolean | null;
|
|
291
474
|
/**
|
|
292
475
|
* Object containing details of the associated smart contract.
|
|
293
476
|
*/
|
|
@@ -299,7 +482,7 @@ export declare namespace RuleCreateResponse {
|
|
|
299
482
|
/**
|
|
300
483
|
* Social media platform associated with the rule.
|
|
301
484
|
*/
|
|
302
|
-
socialPlatform?: '
|
|
485
|
+
socialPlatform?: 'Custom' | 'Discord' | 'EpicGames' | 'Instagram' | 'Steam' | 'Telegram' | 'TikTok' | 'Twitch' | 'X(Twitter)' | 'YouTube' | 'Google' | null;
|
|
303
486
|
/**
|
|
304
487
|
* URL of the social platform's logo.
|
|
305
488
|
*/
|
|
@@ -308,10 +491,18 @@ export declare namespace RuleCreateResponse {
|
|
|
308
491
|
* Name of the social platform.
|
|
309
492
|
*/
|
|
310
493
|
socialPlatformName?: string | null;
|
|
494
|
+
/**
|
|
495
|
+
* ID of the Steam app.
|
|
496
|
+
*/
|
|
497
|
+
steamAppId?: string | null;
|
|
311
498
|
/**
|
|
312
499
|
* Array of streak milestones and corresponding rewards.
|
|
313
500
|
*/
|
|
314
501
|
streakArray?: Array<Metadata.StreakArray> | null;
|
|
502
|
+
/**
|
|
503
|
+
* Metadata for swap loyalty rules
|
|
504
|
+
*/
|
|
505
|
+
swap?: Metadata.Swap;
|
|
315
506
|
/**
|
|
316
507
|
* ID of the Telegram channel.
|
|
317
508
|
*/
|
|
@@ -324,6 +515,11 @@ export declare namespace RuleCreateResponse {
|
|
|
324
515
|
* Flag indicating if all contracts are tracked.
|
|
325
516
|
*/
|
|
326
517
|
trackAllContracts?: boolean | null;
|
|
518
|
+
/**
|
|
519
|
+
* Flag indicating if the progress is tracked. If enabled, the rule can only be
|
|
520
|
+
* completed once the progress is 100%.
|
|
521
|
+
*/
|
|
522
|
+
trackProgress?: boolean | null;
|
|
327
523
|
/**
|
|
328
524
|
* URL of the associated Twitter account.
|
|
329
525
|
*/
|
|
@@ -359,7 +555,15 @@ export declare namespace RuleCreateResponse {
|
|
|
359
555
|
/**
|
|
360
556
|
* Type of wallet associated with the rule.
|
|
361
557
|
*/
|
|
362
|
-
walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
|
|
558
|
+
walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | 'agw' | null;
|
|
559
|
+
/**
|
|
560
|
+
* ID of the Youtube channel.
|
|
561
|
+
*/
|
|
562
|
+
youtubeChannelId?: string | null;
|
|
563
|
+
/**
|
|
564
|
+
* ID of the Youtube video.
|
|
565
|
+
*/
|
|
566
|
+
youtubeVideoId?: string | null;
|
|
363
567
|
}
|
|
364
568
|
namespace Metadata {
|
|
365
569
|
interface Collection {
|
|
@@ -374,7 +578,7 @@ export declare namespace RuleCreateResponse {
|
|
|
374
578
|
/**
|
|
375
579
|
* Blockchain network of the collection.
|
|
376
580
|
*/
|
|
377
|
-
network?: '
|
|
581
|
+
network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
378
582
|
}
|
|
379
583
|
/**
|
|
380
584
|
* Object containing details for the call-to-action.
|
|
@@ -413,6 +617,10 @@ export declare namespace RuleCreateResponse {
|
|
|
413
617
|
* Array of emojis used in the channel.
|
|
414
618
|
*/
|
|
415
619
|
emojis?: Array<Channel.Emoji>;
|
|
620
|
+
/**
|
|
621
|
+
* Phrase of text to be present in the discord message
|
|
622
|
+
*/
|
|
623
|
+
text?: string;
|
|
416
624
|
}
|
|
417
625
|
namespace Channel {
|
|
418
626
|
interface Emoji {
|
|
@@ -435,6 +643,49 @@ export declare namespace RuleCreateResponse {
|
|
|
435
643
|
*/
|
|
436
644
|
id: string;
|
|
437
645
|
}
|
|
646
|
+
/**
|
|
647
|
+
* Liquidity pool details.
|
|
648
|
+
*/
|
|
649
|
+
interface Liquidity {
|
|
650
|
+
/**
|
|
651
|
+
* Calculation type of the liquidity pool.
|
|
652
|
+
*/
|
|
653
|
+
calculationType?: 'fixed' | 'custom';
|
|
654
|
+
/**
|
|
655
|
+
* Custom function to calculate the the reward amount based on the liquidity
|
|
656
|
+
* provided per day. X is the reward amount, Y is the liquidity provided per day in
|
|
657
|
+
* USD.
|
|
658
|
+
*/
|
|
659
|
+
customFunction?: string;
|
|
660
|
+
/**
|
|
661
|
+
* Liquidity provided per day in USD
|
|
662
|
+
*/
|
|
663
|
+
liquidityPerDay?: number;
|
|
664
|
+
/**
|
|
665
|
+
* Blockchain network of the liquidity pool.
|
|
666
|
+
*/
|
|
667
|
+
network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
668
|
+
/**
|
|
669
|
+
* Indicates if only in-range liquidity is rewarded.
|
|
670
|
+
*/
|
|
671
|
+
onlyRewardInRangeLiquidity?: boolean;
|
|
672
|
+
/**
|
|
673
|
+
* Array of liquidity pools associated with the rule.
|
|
674
|
+
*/
|
|
675
|
+
pools?: Array<Liquidity.Pool>;
|
|
676
|
+
/**
|
|
677
|
+
* Protocol of the liquidity pool.
|
|
678
|
+
*/
|
|
679
|
+
protocol?: string;
|
|
680
|
+
}
|
|
681
|
+
namespace Liquidity {
|
|
682
|
+
interface Pool {
|
|
683
|
+
/**
|
|
684
|
+
* Unique identifier of the liquidity pool.
|
|
685
|
+
*/
|
|
686
|
+
id: string;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
438
689
|
interface Range {
|
|
439
690
|
/**
|
|
440
691
|
* Reward amount for this range.
|
|
@@ -448,6 +699,14 @@ export declare namespace RuleCreateResponse {
|
|
|
448
699
|
* Start value of the range.
|
|
449
700
|
*/
|
|
450
701
|
startRange: number;
|
|
702
|
+
/**
|
|
703
|
+
* ID of the loyalty badge for this range.
|
|
704
|
+
*/
|
|
705
|
+
loyaltyBadgeId?: string;
|
|
706
|
+
/**
|
|
707
|
+
* Amount of the loyalty multiplier for this range.
|
|
708
|
+
*/
|
|
709
|
+
loyaltyMultiplierAmount?: number;
|
|
451
710
|
}
|
|
452
711
|
/**
|
|
453
712
|
* Object defining referral requirements.
|
|
@@ -491,18 +750,14 @@ export declare namespace RuleCreateResponse {
|
|
|
491
750
|
* Object containing details of the associated smart contract.
|
|
492
751
|
*/
|
|
493
752
|
interface SmartContract {
|
|
494
|
-
/**
|
|
495
|
-
* ABI of the smart contract.
|
|
496
|
-
*/
|
|
497
|
-
abi?: string | null;
|
|
498
753
|
/**
|
|
499
754
|
* Mapping of addresses for the smart contract.
|
|
500
755
|
*/
|
|
501
756
|
addressMapping?: string | null;
|
|
502
757
|
/**
|
|
503
|
-
*
|
|
758
|
+
* Object containing details of the amount multiplier from the event.
|
|
504
759
|
*/
|
|
505
|
-
|
|
760
|
+
amountMultiplier?: SmartContract.AmountMultiplier | null;
|
|
506
761
|
/**
|
|
507
762
|
* ID of the smart contract.
|
|
508
763
|
*/
|
|
@@ -511,58 +766,28 @@ export declare namespace RuleCreateResponse {
|
|
|
511
766
|
* Criteria to evaluate the smart contract event.
|
|
512
767
|
*/
|
|
513
768
|
criteria?: 'everyEvent' | 'byParameter' | null;
|
|
514
|
-
/**
|
|
515
|
-
* Time range applied to the rule.
|
|
516
|
-
*/
|
|
517
|
-
customRange?: SmartContract.CustomRange | null;
|
|
518
769
|
/**
|
|
519
770
|
* Event emitted by the smart contract.
|
|
520
771
|
*/
|
|
521
772
|
event?: string | null;
|
|
522
|
-
/**
|
|
523
|
-
* Maximum value allowed for the parameter.
|
|
524
|
-
*/
|
|
525
|
-
max?: number | null;
|
|
526
773
|
/**
|
|
527
774
|
* Array of parameters for the smart contract.
|
|
528
775
|
*/
|
|
529
776
|
params?: Array<SmartContract.Param> | null;
|
|
530
777
|
/**
|
|
531
|
-
*
|
|
532
|
-
*/
|
|
533
|
-
withBonus?: boolean | null;
|
|
534
|
-
/**
|
|
535
|
-
* Flag indicating if a custom range is applied.
|
|
778
|
+
* Type of the smart contract interaction.
|
|
536
779
|
*/
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* Flag indicating if a maximum limit is applied.
|
|
540
|
-
*/
|
|
541
|
-
withMax?: boolean | null;
|
|
780
|
+
type?: 'function' | 'event' | null;
|
|
542
781
|
}
|
|
543
782
|
namespace SmartContract {
|
|
544
|
-
interface Bonus {
|
|
545
|
-
/**
|
|
546
|
-
* Amount of the bonus.
|
|
547
|
-
*/
|
|
548
|
-
amount?: number | null;
|
|
549
|
-
/**
|
|
550
|
-
* Number of times the bonus is applied.
|
|
551
|
-
*/
|
|
552
|
-
count?: number | null;
|
|
553
|
-
}
|
|
554
783
|
/**
|
|
555
|
-
*
|
|
784
|
+
* Object containing details of the amount multiplier from the event.
|
|
556
785
|
*/
|
|
557
|
-
interface
|
|
786
|
+
interface AmountMultiplier {
|
|
558
787
|
/**
|
|
559
|
-
*
|
|
788
|
+
* Mapping of the value for the smart contract.
|
|
560
789
|
*/
|
|
561
|
-
|
|
562
|
-
/**
|
|
563
|
-
* Start time of the custom range.
|
|
564
|
-
*/
|
|
565
|
-
startsAt?: string | null;
|
|
790
|
+
valueMapping?: string | null;
|
|
566
791
|
}
|
|
567
792
|
interface Param {
|
|
568
793
|
/**
|
|
@@ -599,6 +824,24 @@ export declare namespace RuleCreateResponse {
|
|
|
599
824
|
*/
|
|
600
825
|
streakMilestone: number;
|
|
601
826
|
}
|
|
827
|
+
/**
|
|
828
|
+
* Metadata for swap loyalty rules
|
|
829
|
+
*/
|
|
830
|
+
interface Swap {
|
|
831
|
+
provider?: 'any' | 'relay' | 'lifi';
|
|
832
|
+
relayReferrerId?: string;
|
|
833
|
+
requireCrossChainSwap?: boolean;
|
|
834
|
+
swappedToChain?: 'any' | number | string;
|
|
835
|
+
swappedToTokens?: Array<Swap.SwappedToToken>;
|
|
836
|
+
tokenMode?: 'any' | 'specific';
|
|
837
|
+
trackTokenAmount?: boolean;
|
|
838
|
+
}
|
|
839
|
+
namespace Swap {
|
|
840
|
+
interface SwappedToToken {
|
|
841
|
+
address: string;
|
|
842
|
+
chainId: string;
|
|
843
|
+
}
|
|
844
|
+
}
|
|
602
845
|
}
|
|
603
846
|
interface Collection {
|
|
604
847
|
/**
|
|
@@ -608,7 +851,11 @@ export declare namespace RuleCreateResponse {
|
|
|
608
851
|
/**
|
|
609
852
|
* Blockchain network for the collection
|
|
610
853
|
*/
|
|
611
|
-
network: '
|
|
854
|
+
network: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
855
|
+
/**
|
|
856
|
+
* Symbol of the collection.
|
|
857
|
+
*/
|
|
858
|
+
symbol?: string;
|
|
612
859
|
}
|
|
613
860
|
}
|
|
614
861
|
export interface RuleUpdateResponse {
|
|
@@ -617,34 +864,14 @@ export interface RuleUpdateResponse {
|
|
|
617
864
|
* Reward amount for the loyalty rule
|
|
618
865
|
*/
|
|
619
866
|
amount: unknown;
|
|
620
|
-
/**
|
|
621
|
-
* Effective end time of the rule
|
|
622
|
-
*/
|
|
623
|
-
effectiveEndTime: string | null;
|
|
624
|
-
/**
|
|
625
|
-
* Effective start time of the rule
|
|
626
|
-
*/
|
|
627
|
-
effectiveStartTime: string | null;
|
|
628
867
|
/**
|
|
629
868
|
* End time for the loyalty rule
|
|
630
869
|
*/
|
|
631
870
|
endTime: string | null;
|
|
632
|
-
/**
|
|
633
|
-
* Frequency of the rule execution
|
|
634
|
-
*/
|
|
635
|
-
frequency: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
|
|
636
|
-
/**
|
|
637
|
-
* Additional metadata for the loyalty rule
|
|
638
|
-
*/
|
|
639
|
-
metadata: RuleUpdateResponse.Metadata;
|
|
640
871
|
/**
|
|
641
872
|
* Name of the loyalty rule
|
|
642
873
|
*/
|
|
643
874
|
name: string;
|
|
644
|
-
/**
|
|
645
|
-
* Start time for the loyalty rule
|
|
646
|
-
*/
|
|
647
|
-
startTime: string | null;
|
|
648
875
|
/**
|
|
649
876
|
* Blockchain address of the associated collection
|
|
650
877
|
*/
|
|
@@ -665,6 +892,22 @@ export interface RuleUpdateResponse {
|
|
|
665
892
|
* Optional description of the loyalty rule
|
|
666
893
|
*/
|
|
667
894
|
description?: string;
|
|
895
|
+
/**
|
|
896
|
+
* Effective end time of the rule
|
|
897
|
+
*/
|
|
898
|
+
effectiveEndTime?: string | null;
|
|
899
|
+
/**
|
|
900
|
+
* Effective start time of the rule
|
|
901
|
+
*/
|
|
902
|
+
effectiveStartTime?: string | null;
|
|
903
|
+
/**
|
|
904
|
+
* ID of the external integration
|
|
905
|
+
*/
|
|
906
|
+
externalIntegrationId?: string | null;
|
|
907
|
+
/**
|
|
908
|
+
* Frequency of the rule execution
|
|
909
|
+
*/
|
|
910
|
+
frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
|
|
668
911
|
/**
|
|
669
912
|
* Whether to hide this rule in the user interface
|
|
670
913
|
*/
|
|
@@ -672,7 +915,7 @@ export interface RuleUpdateResponse {
|
|
|
672
915
|
/**
|
|
673
916
|
* Time interval for recurring rule execution
|
|
674
917
|
*/
|
|
675
|
-
interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
|
|
918
|
+
interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
|
|
676
919
|
/**
|
|
677
920
|
* Whether this rule is required for participation
|
|
678
921
|
*/
|
|
@@ -681,10 +924,28 @@ export interface RuleUpdateResponse {
|
|
|
681
924
|
* ID of the rule group section to associate with the rule
|
|
682
925
|
*/
|
|
683
926
|
loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
|
|
927
|
+
/**
|
|
928
|
+
* The interval for the max amount. Available for the smart contract and external
|
|
929
|
+
* rules.
|
|
930
|
+
*/
|
|
931
|
+
maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
|
|
932
|
+
/**
|
|
933
|
+
* The maximum amount of points a user can earn per interval. Available for the
|
|
934
|
+
* smart contract and external rules.
|
|
935
|
+
*/
|
|
936
|
+
maxAmountPerInterval?: number | null;
|
|
937
|
+
/**
|
|
938
|
+
* URL of the media to be displayed
|
|
939
|
+
*/
|
|
940
|
+
mediaUrl?: string | null;
|
|
941
|
+
/**
|
|
942
|
+
* Additional metadata for the loyalty rule
|
|
943
|
+
*/
|
|
944
|
+
metadata?: RuleUpdateResponse.Metadata;
|
|
684
945
|
/**
|
|
685
946
|
* Blockchain network where the rule will apply
|
|
686
947
|
*/
|
|
687
|
-
network?: '
|
|
948
|
+
network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
688
949
|
/**
|
|
689
950
|
* ID for associated OAuth credentials
|
|
690
951
|
*/
|
|
@@ -692,17 +953,43 @@ export interface RuleUpdateResponse {
|
|
|
692
953
|
/**
|
|
693
954
|
* Type of reward issued by this rule
|
|
694
955
|
*/
|
|
695
|
-
rewardType?: 'points' | 'multiplier';
|
|
956
|
+
rewardType?: 'points' | 'multiplier' | 'badge';
|
|
957
|
+
/**
|
|
958
|
+
* URL of the Shopify store
|
|
959
|
+
*/
|
|
960
|
+
shopifyStoreUrl?: string | null;
|
|
961
|
+
/**
|
|
962
|
+
* Start time for the loyalty rule
|
|
963
|
+
*/
|
|
964
|
+
startTime?: string | null;
|
|
696
965
|
/**
|
|
697
|
-
* Optional subscription
|
|
966
|
+
* Optional subscription id for the rule
|
|
698
967
|
*/
|
|
699
|
-
|
|
968
|
+
subscriptionId?: string | null;
|
|
700
969
|
}
|
|
701
970
|
export declare namespace RuleUpdateResponse {
|
|
971
|
+
interface Collection {
|
|
972
|
+
/**
|
|
973
|
+
* Blockchain address of the collection
|
|
974
|
+
*/
|
|
975
|
+
address: string;
|
|
976
|
+
/**
|
|
977
|
+
* Blockchain network for the collection
|
|
978
|
+
*/
|
|
979
|
+
network: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
980
|
+
/**
|
|
981
|
+
* Symbol of the collection.
|
|
982
|
+
*/
|
|
983
|
+
symbol?: string;
|
|
984
|
+
}
|
|
702
985
|
/**
|
|
703
986
|
* Additional metadata for the loyalty rule
|
|
704
987
|
*/
|
|
705
988
|
interface Metadata {
|
|
989
|
+
/**
|
|
990
|
+
* Number of tokens per batch.
|
|
991
|
+
*/
|
|
992
|
+
batchSize?: number | null;
|
|
706
993
|
/**
|
|
707
994
|
* Text displayed on the action button.
|
|
708
995
|
*/
|
|
@@ -727,6 +1014,16 @@ export declare namespace RuleUpdateResponse {
|
|
|
727
1014
|
* Array of collections associated with the rule.
|
|
728
1015
|
*/
|
|
729
1016
|
collection?: Array<Metadata.Collection>;
|
|
1017
|
+
/**
|
|
1018
|
+
* Conditions for completing the profile.
|
|
1019
|
+
*/
|
|
1020
|
+
completeProfileConditions?: {
|
|
1021
|
+
[key: string]: boolean;
|
|
1022
|
+
} | null;
|
|
1023
|
+
/**
|
|
1024
|
+
* Description of the external rule condition (only for external rules)
|
|
1025
|
+
*/
|
|
1026
|
+
conditionDescription?: string;
|
|
730
1027
|
/**
|
|
731
1028
|
* Object containing details for the call-to-action.
|
|
732
1029
|
*/
|
|
@@ -735,6 +1032,10 @@ export declare namespace RuleUpdateResponse {
|
|
|
735
1032
|
* API key for custom rewards integration.
|
|
736
1033
|
*/
|
|
737
1034
|
customRewardsApiKey?: string;
|
|
1035
|
+
/**
|
|
1036
|
+
* Flag indicating if the rule should use direct RPC to get the balance of tokens.
|
|
1037
|
+
*/
|
|
1038
|
+
directRpc?: boolean;
|
|
738
1039
|
/**
|
|
739
1040
|
* Array of Discord servers, channels, and roles to join.
|
|
740
1041
|
*/
|
|
@@ -755,10 +1056,18 @@ export declare namespace RuleUpdateResponse {
|
|
|
755
1056
|
* Flag indicating whether the verified multiplier is enabled.
|
|
756
1057
|
*/
|
|
757
1058
|
enableVerifiedMultiplier?: boolean;
|
|
1059
|
+
/**
|
|
1060
|
+
* Fill source of the order for the token sale
|
|
1061
|
+
*/
|
|
1062
|
+
fillSource?: string;
|
|
758
1063
|
/**
|
|
759
1064
|
* Percentage reward given to a user for their first referral.
|
|
760
1065
|
*/
|
|
761
1066
|
firstReferralReward?: number | null;
|
|
1067
|
+
/**
|
|
1068
|
+
* Flag indicating whether the fill source is included.
|
|
1069
|
+
*/
|
|
1070
|
+
hasFillSource?: boolean;
|
|
762
1071
|
/**
|
|
763
1072
|
* Indicates if the item has never been sold.
|
|
764
1073
|
*/
|
|
@@ -779,10 +1088,18 @@ export declare namespace RuleUpdateResponse {
|
|
|
779
1088
|
* URL of the image associated with the rule.
|
|
780
1089
|
*/
|
|
781
1090
|
imageUrl?: string | null;
|
|
1091
|
+
/**
|
|
1092
|
+
* If enabled, the first transaction done on the platform will complete this rule
|
|
1093
|
+
*/
|
|
1094
|
+
isCheckInOnEveryTxn?: boolean;
|
|
782
1095
|
/**
|
|
783
1096
|
* Indicates if the multiplier has been applied to rewards.
|
|
784
1097
|
*/
|
|
785
1098
|
isMultiplierApplied?: boolean;
|
|
1099
|
+
/**
|
|
1100
|
+
* Flag indicating if the rule is restricted to new users.
|
|
1101
|
+
*/
|
|
1102
|
+
isRestrictedToNewUsers?: boolean;
|
|
786
1103
|
/**
|
|
787
1104
|
* Flag indicating if rewards are applied retroactively.
|
|
788
1105
|
*/
|
|
@@ -795,6 +1112,10 @@ export declare namespace RuleUpdateResponse {
|
|
|
795
1112
|
* Optional link associated with the metadata.
|
|
796
1113
|
*/
|
|
797
1114
|
link?: string | null;
|
|
1115
|
+
/**
|
|
1116
|
+
* Liquidity pool details.
|
|
1117
|
+
*/
|
|
1118
|
+
liquidity?: Metadata.Liquidity;
|
|
798
1119
|
/**
|
|
799
1120
|
* Maximum quantity constraint for token holding.
|
|
800
1121
|
*/
|
|
@@ -819,10 +1140,30 @@ export declare namespace RuleUpdateResponse {
|
|
|
819
1140
|
* Flag indicating whether to include only non-listed items.
|
|
820
1141
|
*/
|
|
821
1142
|
onlyNonListed?: boolean;
|
|
1143
|
+
/**
|
|
1144
|
+
* Indicates if only existing users are rewarded.
|
|
1145
|
+
*/
|
|
1146
|
+
onlyRewardExistingUser?: boolean;
|
|
1147
|
+
/**
|
|
1148
|
+
* give points for only one token ownership per contract
|
|
1149
|
+
*/
|
|
1150
|
+
onlyRewardSingleTokenOwnership?: boolean | null;
|
|
822
1151
|
/**
|
|
823
1152
|
* Promotional code associated with the rule.
|
|
824
1153
|
*/
|
|
825
1154
|
promoCode?: string;
|
|
1155
|
+
/**
|
|
1156
|
+
* URL of the CSV file containing promo codes.
|
|
1157
|
+
*/
|
|
1158
|
+
promoCodeCsvUrl?: string;
|
|
1159
|
+
/**
|
|
1160
|
+
* Numbers of the promotional code to be generated.
|
|
1161
|
+
*/
|
|
1162
|
+
promoCodeLength?: number | null;
|
|
1163
|
+
/**
|
|
1164
|
+
* Type of the promotional code.
|
|
1165
|
+
*/
|
|
1166
|
+
promoCodeType?: 'code' | 'csv' | 'generate';
|
|
826
1167
|
/**
|
|
827
1168
|
* Array defining ranges and corresponding rewards.
|
|
828
1169
|
*/
|
|
@@ -835,10 +1176,43 @@ export declare namespace RuleUpdateResponse {
|
|
|
835
1176
|
* Lump sum reward given to a referrer.
|
|
836
1177
|
*/
|
|
837
1178
|
referrerReward?: number | null;
|
|
1179
|
+
/**
|
|
1180
|
+
* Loyalty currency ID of the referrer reward.
|
|
1181
|
+
*/
|
|
1182
|
+
referrerRewardLoyaltyCurrencyId?: string | null;
|
|
1183
|
+
/**
|
|
1184
|
+
* Flag indicating if the post link is required.
|
|
1185
|
+
*/
|
|
1186
|
+
requirePostLink?: boolean | null;
|
|
1187
|
+
/**
|
|
1188
|
+
* Flag indicating if the rule can also reward badges per range.
|
|
1189
|
+
*/
|
|
1190
|
+
rewardBadgePerRange?: boolean;
|
|
1191
|
+
/**
|
|
1192
|
+
* Flag indicating if the reward is rewarded by batch.
|
|
1193
|
+
*/
|
|
1194
|
+
rewardByBatch?: boolean | null;
|
|
1195
|
+
/**
|
|
1196
|
+
* Flag indicating if the reward is rewarded per action.
|
|
1197
|
+
*/
|
|
1198
|
+
rewardPerAction?: boolean | null;
|
|
838
1199
|
/**
|
|
839
1200
|
* Flag indicating if rewards are given per impression.
|
|
840
1201
|
*/
|
|
841
1202
|
rewardPerImpression?: boolean | null;
|
|
1203
|
+
/**
|
|
1204
|
+
* Flag indicating if the rule should reward based on value of traded tokens
|
|
1205
|
+
* instead of count.
|
|
1206
|
+
*/
|
|
1207
|
+
rewardPerValue?: boolean;
|
|
1208
|
+
/**
|
|
1209
|
+
* Wallet address of the user can only be used if userId is not provided
|
|
1210
|
+
*/
|
|
1211
|
+
royaltyAddress?: string;
|
|
1212
|
+
/**
|
|
1213
|
+
* Royalty percentage of the item.
|
|
1214
|
+
*/
|
|
1215
|
+
royaltyPercentage?: number;
|
|
842
1216
|
/**
|
|
843
1217
|
* Currency associated with sales.
|
|
844
1218
|
*/
|
|
@@ -847,6 +1221,10 @@ export declare namespace RuleUpdateResponse {
|
|
|
847
1221
|
* Percentage reward given for a second-level referral.
|
|
848
1222
|
*/
|
|
849
1223
|
secondReferralReward?: number | null;
|
|
1224
|
+
/**
|
|
1225
|
+
* Flag indicating if the multiplier is skipped.
|
|
1226
|
+
*/
|
|
1227
|
+
skipMultiplier?: boolean | null;
|
|
850
1228
|
/**
|
|
851
1229
|
* Object containing details of the associated smart contract.
|
|
852
1230
|
*/
|
|
@@ -858,7 +1236,7 @@ export declare namespace RuleUpdateResponse {
|
|
|
858
1236
|
/**
|
|
859
1237
|
* Social media platform associated with the rule.
|
|
860
1238
|
*/
|
|
861
|
-
socialPlatform?: '
|
|
1239
|
+
socialPlatform?: 'Custom' | 'Discord' | 'EpicGames' | 'Instagram' | 'Steam' | 'Telegram' | 'TikTok' | 'Twitch' | 'X(Twitter)' | 'YouTube' | 'Google' | null;
|
|
862
1240
|
/**
|
|
863
1241
|
* URL of the social platform's logo.
|
|
864
1242
|
*/
|
|
@@ -867,10 +1245,18 @@ export declare namespace RuleUpdateResponse {
|
|
|
867
1245
|
* Name of the social platform.
|
|
868
1246
|
*/
|
|
869
1247
|
socialPlatformName?: string | null;
|
|
1248
|
+
/**
|
|
1249
|
+
* ID of the Steam app.
|
|
1250
|
+
*/
|
|
1251
|
+
steamAppId?: string | null;
|
|
870
1252
|
/**
|
|
871
1253
|
* Array of streak milestones and corresponding rewards.
|
|
872
1254
|
*/
|
|
873
1255
|
streakArray?: Array<Metadata.StreakArray> | null;
|
|
1256
|
+
/**
|
|
1257
|
+
* Metadata for swap loyalty rules
|
|
1258
|
+
*/
|
|
1259
|
+
swap?: Metadata.Swap;
|
|
874
1260
|
/**
|
|
875
1261
|
* ID of the Telegram channel.
|
|
876
1262
|
*/
|
|
@@ -883,6 +1269,11 @@ export declare namespace RuleUpdateResponse {
|
|
|
883
1269
|
* Flag indicating if all contracts are tracked.
|
|
884
1270
|
*/
|
|
885
1271
|
trackAllContracts?: boolean | null;
|
|
1272
|
+
/**
|
|
1273
|
+
* Flag indicating if the progress is tracked. If enabled, the rule can only be
|
|
1274
|
+
* completed once the progress is 100%.
|
|
1275
|
+
*/
|
|
1276
|
+
trackProgress?: boolean | null;
|
|
886
1277
|
/**
|
|
887
1278
|
* URL of the associated Twitter account.
|
|
888
1279
|
*/
|
|
@@ -918,7 +1309,15 @@ export declare namespace RuleUpdateResponse {
|
|
|
918
1309
|
/**
|
|
919
1310
|
* Type of wallet associated with the rule.
|
|
920
1311
|
*/
|
|
921
|
-
walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
|
|
1312
|
+
walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | 'agw' | null;
|
|
1313
|
+
/**
|
|
1314
|
+
* ID of the Youtube channel.
|
|
1315
|
+
*/
|
|
1316
|
+
youtubeChannelId?: string | null;
|
|
1317
|
+
/**
|
|
1318
|
+
* ID of the Youtube video.
|
|
1319
|
+
*/
|
|
1320
|
+
youtubeVideoId?: string | null;
|
|
922
1321
|
}
|
|
923
1322
|
namespace Metadata {
|
|
924
1323
|
interface Collection {
|
|
@@ -933,7 +1332,7 @@ export declare namespace RuleUpdateResponse {
|
|
|
933
1332
|
/**
|
|
934
1333
|
* Blockchain network of the collection.
|
|
935
1334
|
*/
|
|
936
|
-
network?: '
|
|
1335
|
+
network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
937
1336
|
}
|
|
938
1337
|
/**
|
|
939
1338
|
* Object containing details for the call-to-action.
|
|
@@ -972,6 +1371,10 @@ export declare namespace RuleUpdateResponse {
|
|
|
972
1371
|
* Array of emojis used in the channel.
|
|
973
1372
|
*/
|
|
974
1373
|
emojis?: Array<Channel.Emoji>;
|
|
1374
|
+
/**
|
|
1375
|
+
* Phrase of text to be present in the discord message
|
|
1376
|
+
*/
|
|
1377
|
+
text?: string;
|
|
975
1378
|
}
|
|
976
1379
|
namespace Channel {
|
|
977
1380
|
interface Emoji {
|
|
@@ -994,32 +1397,83 @@ export declare namespace RuleUpdateResponse {
|
|
|
994
1397
|
*/
|
|
995
1398
|
id: string;
|
|
996
1399
|
}
|
|
997
|
-
|
|
1400
|
+
/**
|
|
1401
|
+
* Liquidity pool details.
|
|
1402
|
+
*/
|
|
1403
|
+
interface Liquidity {
|
|
998
1404
|
/**
|
|
999
|
-
*
|
|
1405
|
+
* Calculation type of the liquidity pool.
|
|
1000
1406
|
*/
|
|
1001
|
-
|
|
1407
|
+
calculationType?: 'fixed' | 'custom';
|
|
1002
1408
|
/**
|
|
1003
|
-
*
|
|
1409
|
+
* Custom function to calculate the the reward amount based on the liquidity
|
|
1410
|
+
* provided per day. X is the reward amount, Y is the liquidity provided per day in
|
|
1411
|
+
* USD.
|
|
1004
1412
|
*/
|
|
1005
|
-
|
|
1413
|
+
customFunction?: string;
|
|
1006
1414
|
/**
|
|
1007
|
-
*
|
|
1415
|
+
* Liquidity provided per day in USD
|
|
1008
1416
|
*/
|
|
1009
|
-
|
|
1010
|
-
}
|
|
1011
|
-
/**
|
|
1012
|
-
* Object defining referral requirements.
|
|
1013
|
-
*/
|
|
1014
|
-
interface ReferralRequirements {
|
|
1417
|
+
liquidityPerDay?: number;
|
|
1015
1418
|
/**
|
|
1016
|
-
*
|
|
1419
|
+
* Blockchain network of the liquidity pool.
|
|
1017
1420
|
*/
|
|
1018
|
-
|
|
1421
|
+
network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
1019
1422
|
/**
|
|
1020
|
-
*
|
|
1423
|
+
* Indicates if only in-range liquidity is rewarded.
|
|
1021
1424
|
*/
|
|
1022
|
-
|
|
1425
|
+
onlyRewardInRangeLiquidity?: boolean;
|
|
1426
|
+
/**
|
|
1427
|
+
* Array of liquidity pools associated with the rule.
|
|
1428
|
+
*/
|
|
1429
|
+
pools?: Array<Liquidity.Pool>;
|
|
1430
|
+
/**
|
|
1431
|
+
* Protocol of the liquidity pool.
|
|
1432
|
+
*/
|
|
1433
|
+
protocol?: string;
|
|
1434
|
+
}
|
|
1435
|
+
namespace Liquidity {
|
|
1436
|
+
interface Pool {
|
|
1437
|
+
/**
|
|
1438
|
+
* Unique identifier of the liquidity pool.
|
|
1439
|
+
*/
|
|
1440
|
+
id: string;
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
interface Range {
|
|
1444
|
+
/**
|
|
1445
|
+
* Reward amount for this range.
|
|
1446
|
+
*/
|
|
1447
|
+
amount: number;
|
|
1448
|
+
/**
|
|
1449
|
+
* End value of the range.
|
|
1450
|
+
*/
|
|
1451
|
+
endRange: number;
|
|
1452
|
+
/**
|
|
1453
|
+
* Start value of the range.
|
|
1454
|
+
*/
|
|
1455
|
+
startRange: number;
|
|
1456
|
+
/**
|
|
1457
|
+
* ID of the loyalty badge for this range.
|
|
1458
|
+
*/
|
|
1459
|
+
loyaltyBadgeId?: string;
|
|
1460
|
+
/**
|
|
1461
|
+
* Amount of the loyalty multiplier for this range.
|
|
1462
|
+
*/
|
|
1463
|
+
loyaltyMultiplierAmount?: number;
|
|
1464
|
+
}
|
|
1465
|
+
/**
|
|
1466
|
+
* Object defining referral requirements.
|
|
1467
|
+
*/
|
|
1468
|
+
interface ReferralRequirements {
|
|
1469
|
+
/**
|
|
1470
|
+
* Flag indicating if achieving points is required.
|
|
1471
|
+
*/
|
|
1472
|
+
achievePoints?: boolean | null;
|
|
1473
|
+
/**
|
|
1474
|
+
* Flag indicating if completing the profile is required.
|
|
1475
|
+
*/
|
|
1476
|
+
completeProfile?: boolean | null;
|
|
1023
1477
|
/**
|
|
1024
1478
|
* Flag indicating if connecting Discord is required.
|
|
1025
1479
|
*/
|
|
@@ -1050,18 +1504,14 @@ export declare namespace RuleUpdateResponse {
|
|
|
1050
1504
|
* Object containing details of the associated smart contract.
|
|
1051
1505
|
*/
|
|
1052
1506
|
interface SmartContract {
|
|
1053
|
-
/**
|
|
1054
|
-
* ABI of the smart contract.
|
|
1055
|
-
*/
|
|
1056
|
-
abi?: string | null;
|
|
1057
1507
|
/**
|
|
1058
1508
|
* Mapping of addresses for the smart contract.
|
|
1059
1509
|
*/
|
|
1060
1510
|
addressMapping?: string | null;
|
|
1061
1511
|
/**
|
|
1062
|
-
*
|
|
1512
|
+
* Object containing details of the amount multiplier from the event.
|
|
1063
1513
|
*/
|
|
1064
|
-
|
|
1514
|
+
amountMultiplier?: SmartContract.AmountMultiplier | null;
|
|
1065
1515
|
/**
|
|
1066
1516
|
* ID of the smart contract.
|
|
1067
1517
|
*/
|
|
@@ -1070,58 +1520,28 @@ export declare namespace RuleUpdateResponse {
|
|
|
1070
1520
|
* Criteria to evaluate the smart contract event.
|
|
1071
1521
|
*/
|
|
1072
1522
|
criteria?: 'everyEvent' | 'byParameter' | null;
|
|
1073
|
-
/**
|
|
1074
|
-
* Time range applied to the rule.
|
|
1075
|
-
*/
|
|
1076
|
-
customRange?: SmartContract.CustomRange | null;
|
|
1077
1523
|
/**
|
|
1078
1524
|
* Event emitted by the smart contract.
|
|
1079
1525
|
*/
|
|
1080
1526
|
event?: string | null;
|
|
1081
|
-
/**
|
|
1082
|
-
* Maximum value allowed for the parameter.
|
|
1083
|
-
*/
|
|
1084
|
-
max?: number | null;
|
|
1085
1527
|
/**
|
|
1086
1528
|
* Array of parameters for the smart contract.
|
|
1087
1529
|
*/
|
|
1088
1530
|
params?: Array<SmartContract.Param> | null;
|
|
1089
1531
|
/**
|
|
1090
|
-
*
|
|
1532
|
+
* Type of the smart contract interaction.
|
|
1091
1533
|
*/
|
|
1092
|
-
|
|
1093
|
-
/**
|
|
1094
|
-
* Flag indicating if a custom range is applied.
|
|
1095
|
-
*/
|
|
1096
|
-
withCustomRange?: boolean | null;
|
|
1097
|
-
/**
|
|
1098
|
-
* Flag indicating if a maximum limit is applied.
|
|
1099
|
-
*/
|
|
1100
|
-
withMax?: boolean | null;
|
|
1534
|
+
type?: 'function' | 'event' | null;
|
|
1101
1535
|
}
|
|
1102
1536
|
namespace SmartContract {
|
|
1103
|
-
interface Bonus {
|
|
1104
|
-
/**
|
|
1105
|
-
* Amount of the bonus.
|
|
1106
|
-
*/
|
|
1107
|
-
amount?: number | null;
|
|
1108
|
-
/**
|
|
1109
|
-
* Number of times the bonus is applied.
|
|
1110
|
-
*/
|
|
1111
|
-
count?: number | null;
|
|
1112
|
-
}
|
|
1113
1537
|
/**
|
|
1114
|
-
*
|
|
1538
|
+
* Object containing details of the amount multiplier from the event.
|
|
1115
1539
|
*/
|
|
1116
|
-
interface
|
|
1117
|
-
/**
|
|
1118
|
-
* End time of the custom range.
|
|
1119
|
-
*/
|
|
1120
|
-
endsAt?: string | null;
|
|
1540
|
+
interface AmountMultiplier {
|
|
1121
1541
|
/**
|
|
1122
|
-
*
|
|
1542
|
+
* Mapping of the value for the smart contract.
|
|
1123
1543
|
*/
|
|
1124
|
-
|
|
1544
|
+
valueMapping?: string | null;
|
|
1125
1545
|
}
|
|
1126
1546
|
interface Param {
|
|
1127
1547
|
/**
|
|
@@ -1158,16 +1578,24 @@ export declare namespace RuleUpdateResponse {
|
|
|
1158
1578
|
*/
|
|
1159
1579
|
streakMilestone: number;
|
|
1160
1580
|
}
|
|
1161
|
-
}
|
|
1162
|
-
interface Collection {
|
|
1163
1581
|
/**
|
|
1164
|
-
*
|
|
1582
|
+
* Metadata for swap loyalty rules
|
|
1165
1583
|
*/
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1584
|
+
interface Swap {
|
|
1585
|
+
provider?: 'any' | 'relay' | 'lifi';
|
|
1586
|
+
relayReferrerId?: string;
|
|
1587
|
+
requireCrossChainSwap?: boolean;
|
|
1588
|
+
swappedToChain?: 'any' | number | string;
|
|
1589
|
+
swappedToTokens?: Array<Swap.SwappedToToken>;
|
|
1590
|
+
tokenMode?: 'any' | 'specific';
|
|
1591
|
+
trackTokenAmount?: boolean;
|
|
1592
|
+
}
|
|
1593
|
+
namespace Swap {
|
|
1594
|
+
interface SwappedToToken {
|
|
1595
|
+
address: string;
|
|
1596
|
+
chainId: string;
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1171
1599
|
}
|
|
1172
1600
|
}
|
|
1173
1601
|
export interface RuleListResponse {
|
|
@@ -1175,9 +1603,6 @@ export interface RuleListResponse {
|
|
|
1175
1603
|
hasNextPage: boolean;
|
|
1176
1604
|
}
|
|
1177
1605
|
export declare namespace RuleListResponse {
|
|
1178
|
-
/**
|
|
1179
|
-
* Schema for a loyalty rule
|
|
1180
|
-
*/
|
|
1181
1606
|
interface Data {
|
|
1182
1607
|
/**
|
|
1183
1608
|
* Unique identifier for the loyalty rule
|
|
@@ -1195,14 +1620,38 @@ export declare namespace RuleListResponse {
|
|
|
1195
1620
|
* Timestamp when the loyalty rule was deleted (if applicable)
|
|
1196
1621
|
*/
|
|
1197
1622
|
deletedAt: string | null;
|
|
1623
|
+
/**
|
|
1624
|
+
* Description of the loyalty rule
|
|
1625
|
+
*/
|
|
1626
|
+
description: string;
|
|
1627
|
+
/**
|
|
1628
|
+
* End time of the loyalty rule
|
|
1629
|
+
*/
|
|
1630
|
+
endTime: string;
|
|
1198
1631
|
/**
|
|
1199
1632
|
* Frequency of the loyalty rule
|
|
1200
1633
|
*/
|
|
1201
1634
|
frequency: string;
|
|
1635
|
+
/**
|
|
1636
|
+
* Chains attached to the loyalty rule
|
|
1637
|
+
*/
|
|
1638
|
+
loyaltyRuleChain: Array<Data.LoyaltyRuleChain>;
|
|
1639
|
+
/**
|
|
1640
|
+
* Name of the loyalty rule
|
|
1641
|
+
*/
|
|
1642
|
+
name: string;
|
|
1202
1643
|
/**
|
|
1203
1644
|
* Unique identifier for the organization
|
|
1204
1645
|
*/
|
|
1205
1646
|
organizationId: string;
|
|
1647
|
+
/**
|
|
1648
|
+
* Type of the reward
|
|
1649
|
+
*/
|
|
1650
|
+
rewardType: 'points' | 'multiplier' | 'badge';
|
|
1651
|
+
/**
|
|
1652
|
+
* Start time of the loyalty rule
|
|
1653
|
+
*/
|
|
1654
|
+
startTime: string;
|
|
1206
1655
|
/**
|
|
1207
1656
|
* Type of the loyalty rule
|
|
1208
1657
|
*/
|
|
@@ -1219,10 +1668,711 @@ export declare namespace RuleListResponse {
|
|
|
1219
1668
|
* Optional address of the collection
|
|
1220
1669
|
*/
|
|
1221
1670
|
collectionAddress?: string;
|
|
1671
|
+
/**
|
|
1672
|
+
* URL of the media associated with the loyalty rule
|
|
1673
|
+
*/
|
|
1674
|
+
mediaUrl?: string | null;
|
|
1222
1675
|
/**
|
|
1223
1676
|
* Optional metadata for the loyalty rule
|
|
1224
1677
|
*/
|
|
1225
|
-
metadata?:
|
|
1678
|
+
metadata?: {
|
|
1679
|
+
[key: string]: Data.Metadata;
|
|
1680
|
+
};
|
|
1681
|
+
}
|
|
1682
|
+
namespace Data {
|
|
1683
|
+
interface LoyaltyRuleChain {
|
|
1684
|
+
/**
|
|
1685
|
+
* Unique identifier for the rule chain
|
|
1686
|
+
*/
|
|
1687
|
+
id: string;
|
|
1688
|
+
loyaltyConditions: Array<LoyaltyRuleChain.LoyaltyCondition>;
|
|
1689
|
+
/**
|
|
1690
|
+
* Unique identifier for the loyalty rule
|
|
1691
|
+
*/
|
|
1692
|
+
loyaltyRuleId: string;
|
|
1693
|
+
/**
|
|
1694
|
+
* Name of the rule chain
|
|
1695
|
+
*/
|
|
1696
|
+
name: string;
|
|
1697
|
+
}
|
|
1698
|
+
namespace LoyaltyRuleChain {
|
|
1699
|
+
interface LoyaltyCondition {
|
|
1700
|
+
/**
|
|
1701
|
+
* Unique identifier for the condition
|
|
1702
|
+
*/
|
|
1703
|
+
id: string;
|
|
1704
|
+
/**
|
|
1705
|
+
* Amount of the condition
|
|
1706
|
+
*/
|
|
1707
|
+
amount: number | null;
|
|
1708
|
+
association: Array<LoyaltyCondition.Association>;
|
|
1709
|
+
/**
|
|
1710
|
+
* URL of the CSV file
|
|
1711
|
+
*/
|
|
1712
|
+
csvUrl: string | null;
|
|
1713
|
+
/**
|
|
1714
|
+
* Description of the condition
|
|
1715
|
+
*/
|
|
1716
|
+
description: string | null;
|
|
1717
|
+
/**
|
|
1718
|
+
* Number of times the condition must be met
|
|
1719
|
+
*/
|
|
1720
|
+
repeatCount: number | null;
|
|
1721
|
+
/**
|
|
1722
|
+
* Number of times the condition must be met
|
|
1723
|
+
*/
|
|
1724
|
+
requiredCount: number | null;
|
|
1725
|
+
/**
|
|
1726
|
+
* Type of the condition
|
|
1727
|
+
*/
|
|
1728
|
+
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
1729
|
+
}
|
|
1730
|
+
namespace LoyaltyCondition {
|
|
1731
|
+
interface Association {
|
|
1732
|
+
/**
|
|
1733
|
+
* Unique identifier for the association
|
|
1734
|
+
*/
|
|
1735
|
+
id: string;
|
|
1736
|
+
/**
|
|
1737
|
+
* Unique identifier for the loyalty badge
|
|
1738
|
+
*/
|
|
1739
|
+
loyaltyBadgeId: string | null;
|
|
1740
|
+
/**
|
|
1741
|
+
* Unique identifier for the loyalty currency
|
|
1742
|
+
*/
|
|
1743
|
+
loyaltyCurrencyId: string | null;
|
|
1744
|
+
loyaltyRule: Association.LoyaltyRule | null;
|
|
1745
|
+
/**
|
|
1746
|
+
* Unique identifier for the loyalty rule group
|
|
1747
|
+
*/
|
|
1748
|
+
loyaltyRuleGroupId: string | null;
|
|
1749
|
+
/**
|
|
1750
|
+
* Unique identifier for the loyalty rule
|
|
1751
|
+
*/
|
|
1752
|
+
loyaltyRuleId: string | null;
|
|
1753
|
+
}
|
|
1754
|
+
namespace Association {
|
|
1755
|
+
interface LoyaltyRule {
|
|
1756
|
+
/**
|
|
1757
|
+
* Name of the loyalty rule
|
|
1758
|
+
*/
|
|
1759
|
+
name: string;
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
}
|
|
1764
|
+
interface Metadata {
|
|
1765
|
+
/**
|
|
1766
|
+
* Number of tokens per batch.
|
|
1767
|
+
*/
|
|
1768
|
+
batchSize?: number | null;
|
|
1769
|
+
/**
|
|
1770
|
+
* Text displayed on the action button.
|
|
1771
|
+
*/
|
|
1772
|
+
buttonText?: string | null;
|
|
1773
|
+
/**
|
|
1774
|
+
* Flag indicating if commenting is required.
|
|
1775
|
+
*/
|
|
1776
|
+
checkComment?: boolean | null;
|
|
1777
|
+
/**
|
|
1778
|
+
* Flag indicating if liking the post is required.
|
|
1779
|
+
*/
|
|
1780
|
+
checkLike?: boolean | null;
|
|
1781
|
+
/**
|
|
1782
|
+
* Flag indicating if reposting is required.
|
|
1783
|
+
*/
|
|
1784
|
+
checkRepost?: boolean | null;
|
|
1785
|
+
/**
|
|
1786
|
+
* Text to check in the Twitter post, username, or bio.
|
|
1787
|
+
*/
|
|
1788
|
+
checkText?: string | null;
|
|
1789
|
+
/**
|
|
1790
|
+
* Array of collections associated with the rule.
|
|
1791
|
+
*/
|
|
1792
|
+
collection?: Array<Metadata.Collection>;
|
|
1793
|
+
/**
|
|
1794
|
+
* Conditions for completing the profile.
|
|
1795
|
+
*/
|
|
1796
|
+
completeProfileConditions?: {
|
|
1797
|
+
[key: string]: boolean;
|
|
1798
|
+
} | null;
|
|
1799
|
+
/**
|
|
1800
|
+
* Description of the external rule condition (only for external rules)
|
|
1801
|
+
*/
|
|
1802
|
+
conditionDescription?: string;
|
|
1803
|
+
/**
|
|
1804
|
+
* Object containing details for the call-to-action.
|
|
1805
|
+
*/
|
|
1806
|
+
cta?: Metadata.Cta | null;
|
|
1807
|
+
/**
|
|
1808
|
+
* API key for custom rewards integration.
|
|
1809
|
+
*/
|
|
1810
|
+
customRewardsApiKey?: string;
|
|
1811
|
+
/**
|
|
1812
|
+
* Flag indicating if the rule should use direct RPC to get the balance of tokens.
|
|
1813
|
+
*/
|
|
1814
|
+
directRpc?: boolean;
|
|
1815
|
+
/**
|
|
1816
|
+
* Array of Discord servers, channels, and roles to join.
|
|
1817
|
+
*/
|
|
1818
|
+
discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
|
|
1819
|
+
/**
|
|
1820
|
+
* Array of drip quests required to complete the rule.
|
|
1821
|
+
*/
|
|
1822
|
+
dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
|
|
1823
|
+
/**
|
|
1824
|
+
* Flag indicating whether joining Discord servers is required.
|
|
1825
|
+
*/
|
|
1826
|
+
enableJoinDiscordServers?: boolean | null;
|
|
1827
|
+
/**
|
|
1828
|
+
* Flag indicating whether streaks are enabled.
|
|
1829
|
+
*/
|
|
1830
|
+
enableStreaks?: boolean | null;
|
|
1831
|
+
/**
|
|
1832
|
+
* Flag indicating whether the verified multiplier is enabled.
|
|
1833
|
+
*/
|
|
1834
|
+
enableVerifiedMultiplier?: boolean;
|
|
1835
|
+
/**
|
|
1836
|
+
* Fill source of the order for the token sale
|
|
1837
|
+
*/
|
|
1838
|
+
fillSource?: string;
|
|
1839
|
+
/**
|
|
1840
|
+
* Percentage reward given to a user for their first referral.
|
|
1841
|
+
*/
|
|
1842
|
+
firstReferralReward?: number | null;
|
|
1843
|
+
/**
|
|
1844
|
+
* Flag indicating whether the fill source is included.
|
|
1845
|
+
*/
|
|
1846
|
+
hasFillSource?: boolean;
|
|
1847
|
+
/**
|
|
1848
|
+
* Indicates if the item has never been sold.
|
|
1849
|
+
*/
|
|
1850
|
+
hasNeverSold?: boolean;
|
|
1851
|
+
/**
|
|
1852
|
+
* Indicates if the full royalty has been paid for items.
|
|
1853
|
+
*/
|
|
1854
|
+
hasPaidFullRoyalty?: boolean;
|
|
1855
|
+
/**
|
|
1856
|
+
* Flag indicating if the sale currency is included.
|
|
1857
|
+
*/
|
|
1858
|
+
hasSaleCurrency?: boolean;
|
|
1859
|
+
/**
|
|
1860
|
+
* Indicates if the user has a verified Twitter account.
|
|
1861
|
+
*/
|
|
1862
|
+
hasVerifiedTwitter?: boolean;
|
|
1863
|
+
/**
|
|
1864
|
+
* URL of the image associated with the rule.
|
|
1865
|
+
*/
|
|
1866
|
+
imageUrl?: string | null;
|
|
1867
|
+
/**
|
|
1868
|
+
* If enabled, the first transaction done on the platform will complete this rule
|
|
1869
|
+
*/
|
|
1870
|
+
isCheckInOnEveryTxn?: boolean;
|
|
1871
|
+
/**
|
|
1872
|
+
* Indicates if the multiplier has been applied to rewards.
|
|
1873
|
+
*/
|
|
1874
|
+
isMultiplierApplied?: boolean;
|
|
1875
|
+
/**
|
|
1876
|
+
* Flag indicating if the rule is restricted to new users.
|
|
1877
|
+
*/
|
|
1878
|
+
isRestrictedToNewUsers?: boolean;
|
|
1879
|
+
/**
|
|
1880
|
+
* Flag indicating if rewards are applied retroactively.
|
|
1881
|
+
*/
|
|
1882
|
+
isRetroactive?: boolean | null;
|
|
1883
|
+
/**
|
|
1884
|
+
* Flag indicating if the token hold multiplier is applied.
|
|
1885
|
+
*/
|
|
1886
|
+
isTokenHoldMultiplier?: boolean;
|
|
1887
|
+
/**
|
|
1888
|
+
* Optional link associated with the metadata.
|
|
1889
|
+
*/
|
|
1890
|
+
link?: string | null;
|
|
1891
|
+
/**
|
|
1892
|
+
* Liquidity pool details.
|
|
1893
|
+
*/
|
|
1894
|
+
liquidity?: Metadata.Liquidity;
|
|
1895
|
+
/**
|
|
1896
|
+
* Maximum quantity constraint for token holding.
|
|
1897
|
+
*/
|
|
1898
|
+
maxQty?: number | null;
|
|
1899
|
+
/**
|
|
1900
|
+
* Minimum quantity constraint for token holding.
|
|
1901
|
+
*/
|
|
1902
|
+
minQty?: number | null;
|
|
1903
|
+
/**
|
|
1904
|
+
* Array of loyalty currency IDs used for multipliers.
|
|
1905
|
+
*/
|
|
1906
|
+
multiplierLoyaltyCurrencyIds?: Array<string> | null;
|
|
1907
|
+
/**
|
|
1908
|
+
* Flag indicating whether to include only known users.
|
|
1909
|
+
*/
|
|
1910
|
+
onlyKnownUsers?: boolean;
|
|
1911
|
+
/**
|
|
1912
|
+
* Flag indicating whether to include only native tokens.
|
|
1913
|
+
*/
|
|
1914
|
+
onlyNative?: boolean;
|
|
1915
|
+
/**
|
|
1916
|
+
* Flag indicating whether to include only non-listed items.
|
|
1917
|
+
*/
|
|
1918
|
+
onlyNonListed?: boolean;
|
|
1919
|
+
/**
|
|
1920
|
+
* Indicates if only existing users are rewarded.
|
|
1921
|
+
*/
|
|
1922
|
+
onlyRewardExistingUser?: boolean;
|
|
1923
|
+
/**
|
|
1924
|
+
* give points for only one token ownership per contract
|
|
1925
|
+
*/
|
|
1926
|
+
onlyRewardSingleTokenOwnership?: boolean | null;
|
|
1927
|
+
/**
|
|
1928
|
+
* Promotional code associated with the rule.
|
|
1929
|
+
*/
|
|
1930
|
+
promoCode?: string;
|
|
1931
|
+
/**
|
|
1932
|
+
* URL of the CSV file containing promo codes.
|
|
1933
|
+
*/
|
|
1934
|
+
promoCodeCsvUrl?: string;
|
|
1935
|
+
/**
|
|
1936
|
+
* Numbers of the promotional code to be generated.
|
|
1937
|
+
*/
|
|
1938
|
+
promoCodeLength?: number | null;
|
|
1939
|
+
/**
|
|
1940
|
+
* Type of the promotional code.
|
|
1941
|
+
*/
|
|
1942
|
+
promoCodeType?: 'code' | 'csv' | 'generate';
|
|
1943
|
+
/**
|
|
1944
|
+
* Array defining ranges and corresponding rewards.
|
|
1945
|
+
*/
|
|
1946
|
+
range?: Array<Metadata.Range>;
|
|
1947
|
+
/**
|
|
1948
|
+
* Object defining referral requirements.
|
|
1949
|
+
*/
|
|
1950
|
+
referralRequirements?: Metadata.ReferralRequirements | null;
|
|
1951
|
+
/**
|
|
1952
|
+
* Lump sum reward given to a referrer.
|
|
1953
|
+
*/
|
|
1954
|
+
referrerReward?: number | null;
|
|
1955
|
+
/**
|
|
1956
|
+
* Loyalty currency ID of the referrer reward.
|
|
1957
|
+
*/
|
|
1958
|
+
referrerRewardLoyaltyCurrencyId?: string | null;
|
|
1959
|
+
/**
|
|
1960
|
+
* Flag indicating if the post link is required.
|
|
1961
|
+
*/
|
|
1962
|
+
requirePostLink?: boolean | null;
|
|
1963
|
+
/**
|
|
1964
|
+
* Flag indicating if the rule can also reward badges per range.
|
|
1965
|
+
*/
|
|
1966
|
+
rewardBadgePerRange?: boolean;
|
|
1967
|
+
/**
|
|
1968
|
+
* Flag indicating if the reward is rewarded by batch.
|
|
1969
|
+
*/
|
|
1970
|
+
rewardByBatch?: boolean | null;
|
|
1971
|
+
/**
|
|
1972
|
+
* Flag indicating if the reward is rewarded per action.
|
|
1973
|
+
*/
|
|
1974
|
+
rewardPerAction?: boolean | null;
|
|
1975
|
+
/**
|
|
1976
|
+
* Flag indicating if rewards are given per impression.
|
|
1977
|
+
*/
|
|
1978
|
+
rewardPerImpression?: boolean | null;
|
|
1979
|
+
/**
|
|
1980
|
+
* Flag indicating if the rule should reward based on value of traded tokens
|
|
1981
|
+
* instead of count.
|
|
1982
|
+
*/
|
|
1983
|
+
rewardPerValue?: boolean;
|
|
1984
|
+
/**
|
|
1985
|
+
* Wallet address of the user can only be used if userId is not provided
|
|
1986
|
+
*/
|
|
1987
|
+
royaltyAddress?: string;
|
|
1988
|
+
/**
|
|
1989
|
+
* Royalty percentage of the item.
|
|
1990
|
+
*/
|
|
1991
|
+
royaltyPercentage?: number;
|
|
1992
|
+
/**
|
|
1993
|
+
* Currency associated with sales.
|
|
1994
|
+
*/
|
|
1995
|
+
saleCurrency?: string;
|
|
1996
|
+
/**
|
|
1997
|
+
* Percentage reward given for a second-level referral.
|
|
1998
|
+
*/
|
|
1999
|
+
secondReferralReward?: number | null;
|
|
2000
|
+
/**
|
|
2001
|
+
* Flag indicating if the multiplier is skipped.
|
|
2002
|
+
*/
|
|
2003
|
+
skipMultiplier?: boolean | null;
|
|
2004
|
+
/**
|
|
2005
|
+
* Object containing details of the associated smart contract.
|
|
2006
|
+
*/
|
|
2007
|
+
smartContract?: Metadata.SmartContract;
|
|
2008
|
+
/**
|
|
2009
|
+
* Array of snapshot proposals for the rule.
|
|
2010
|
+
*/
|
|
2011
|
+
snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
|
|
2012
|
+
/**
|
|
2013
|
+
* Social media platform associated with the rule.
|
|
2014
|
+
*/
|
|
2015
|
+
socialPlatform?: 'Custom' | 'Discord' | 'EpicGames' | 'Instagram' | 'Steam' | 'Telegram' | 'TikTok' | 'Twitch' | 'X(Twitter)' | 'YouTube' | 'Google' | null;
|
|
2016
|
+
/**
|
|
2017
|
+
* URL of the social platform's logo.
|
|
2018
|
+
*/
|
|
2019
|
+
socialPlatformLogo?: string | null;
|
|
2020
|
+
/**
|
|
2021
|
+
* Name of the social platform.
|
|
2022
|
+
*/
|
|
2023
|
+
socialPlatformName?: string | null;
|
|
2024
|
+
/**
|
|
2025
|
+
* ID of the Steam app.
|
|
2026
|
+
*/
|
|
2027
|
+
steamAppId?: string | null;
|
|
2028
|
+
/**
|
|
2029
|
+
* Array of streak milestones and corresponding rewards.
|
|
2030
|
+
*/
|
|
2031
|
+
streakArray?: Array<Metadata.StreakArray> | null;
|
|
2032
|
+
/**
|
|
2033
|
+
* Metadata for swap loyalty rules
|
|
2034
|
+
*/
|
|
2035
|
+
swap?: Metadata.Swap;
|
|
2036
|
+
/**
|
|
2037
|
+
* ID of the Telegram channel.
|
|
2038
|
+
*/
|
|
2039
|
+
telegramChannelId?: string | null;
|
|
2040
|
+
/**
|
|
2041
|
+
* Time delay in seconds to verify actions.
|
|
2042
|
+
*/
|
|
2043
|
+
timeDelayToVerifySeconds?: string | number | null;
|
|
2044
|
+
/**
|
|
2045
|
+
* Flag indicating if all contracts are tracked.
|
|
2046
|
+
*/
|
|
2047
|
+
trackAllContracts?: boolean | null;
|
|
2048
|
+
/**
|
|
2049
|
+
* Flag indicating if the progress is tracked. If enabled, the rule can only be
|
|
2050
|
+
* completed once the progress is 100%.
|
|
2051
|
+
*/
|
|
2052
|
+
trackProgress?: boolean | null;
|
|
2053
|
+
/**
|
|
2054
|
+
* URL of the associated Twitter account.
|
|
2055
|
+
*/
|
|
2056
|
+
twitterAccountUrl?: string;
|
|
2057
|
+
/**
|
|
2058
|
+
* Hashtag associated with the Twitter post.
|
|
2059
|
+
*/
|
|
2060
|
+
twitterHashtag?: string;
|
|
2061
|
+
/**
|
|
2062
|
+
* URL of the associated Twitter post.
|
|
2063
|
+
*/
|
|
2064
|
+
twitterPostUrl?: string;
|
|
2065
|
+
/**
|
|
2066
|
+
* Unique identifier of the Twitter user.
|
|
2067
|
+
*/
|
|
2068
|
+
twitterUserId?: string;
|
|
2069
|
+
/**
|
|
2070
|
+
* Twitter username of the user.
|
|
2071
|
+
*/
|
|
2072
|
+
twitterUsername?: string;
|
|
2073
|
+
/**
|
|
2074
|
+
* Minimum length of the verification text.
|
|
2075
|
+
*/
|
|
2076
|
+
verificationTextMinimumLength?: number | null;
|
|
2077
|
+
/**
|
|
2078
|
+
* Multiplier applied to rewards for verified users.
|
|
2079
|
+
*/
|
|
2080
|
+
verifiedMultiplier?: number | null;
|
|
2081
|
+
/**
|
|
2082
|
+
* Placeholder text for verification input fields.
|
|
2083
|
+
*/
|
|
2084
|
+
verifyPlaceHolderText?: string | null;
|
|
2085
|
+
/**
|
|
2086
|
+
* Type of wallet associated with the rule.
|
|
2087
|
+
*/
|
|
2088
|
+
walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | 'agw' | null;
|
|
2089
|
+
/**
|
|
2090
|
+
* ID of the Youtube channel.
|
|
2091
|
+
*/
|
|
2092
|
+
youtubeChannelId?: string | null;
|
|
2093
|
+
/**
|
|
2094
|
+
* ID of the Youtube video.
|
|
2095
|
+
*/
|
|
2096
|
+
youtubeVideoId?: string | null;
|
|
2097
|
+
}
|
|
2098
|
+
namespace Metadata {
|
|
2099
|
+
interface Collection {
|
|
2100
|
+
/**
|
|
2101
|
+
* Blockchain address of the collection.
|
|
2102
|
+
*/
|
|
2103
|
+
address?: string;
|
|
2104
|
+
/**
|
|
2105
|
+
* Multiplier applied to the rewards for this collection.
|
|
2106
|
+
*/
|
|
2107
|
+
multiplier?: number;
|
|
2108
|
+
/**
|
|
2109
|
+
* Blockchain network of the collection.
|
|
2110
|
+
*/
|
|
2111
|
+
network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
2112
|
+
}
|
|
2113
|
+
/**
|
|
2114
|
+
* Object containing details for the call-to-action.
|
|
2115
|
+
*/
|
|
2116
|
+
interface Cta {
|
|
2117
|
+
/**
|
|
2118
|
+
* Link for the call-to-action.
|
|
2119
|
+
*/
|
|
2120
|
+
href?: string | null;
|
|
2121
|
+
/**
|
|
2122
|
+
* Label for the call-to-action.
|
|
2123
|
+
*/
|
|
2124
|
+
label?: string | null;
|
|
2125
|
+
}
|
|
2126
|
+
interface DiscordServersToJoin {
|
|
2127
|
+
/**
|
|
2128
|
+
* ID of the Discord server to join.
|
|
2129
|
+
*/
|
|
2130
|
+
id?: string;
|
|
2131
|
+
/**
|
|
2132
|
+
* Array of Discord channels to join.
|
|
2133
|
+
*/
|
|
2134
|
+
channels?: Array<DiscordServersToJoin.Channel>;
|
|
2135
|
+
/**
|
|
2136
|
+
* Array of roles to assign in the Discord server.
|
|
2137
|
+
*/
|
|
2138
|
+
roles?: Array<DiscordServersToJoin.Role>;
|
|
2139
|
+
}
|
|
2140
|
+
namespace DiscordServersToJoin {
|
|
2141
|
+
interface Channel {
|
|
2142
|
+
/**
|
|
2143
|
+
* ID of the Discord channel.
|
|
2144
|
+
*/
|
|
2145
|
+
id?: string;
|
|
2146
|
+
/**
|
|
2147
|
+
* Array of emojis used in the channel.
|
|
2148
|
+
*/
|
|
2149
|
+
emojis?: Array<Channel.Emoji>;
|
|
2150
|
+
/**
|
|
2151
|
+
* Phrase of text to be present in the discord message
|
|
2152
|
+
*/
|
|
2153
|
+
text?: string;
|
|
2154
|
+
}
|
|
2155
|
+
namespace Channel {
|
|
2156
|
+
interface Emoji {
|
|
2157
|
+
/**
|
|
2158
|
+
* ID of the emoji used in the channel.
|
|
2159
|
+
*/
|
|
2160
|
+
id?: string;
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
interface Role {
|
|
2164
|
+
/**
|
|
2165
|
+
* ID of the role in the Discord server.
|
|
2166
|
+
*/
|
|
2167
|
+
id: string;
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
interface DripQuestsToComplete {
|
|
2171
|
+
/**
|
|
2172
|
+
* ID of the drip quest to complete.
|
|
2173
|
+
*/
|
|
2174
|
+
id: string;
|
|
2175
|
+
}
|
|
2176
|
+
/**
|
|
2177
|
+
* Liquidity pool details.
|
|
2178
|
+
*/
|
|
2179
|
+
interface Liquidity {
|
|
2180
|
+
/**
|
|
2181
|
+
* Calculation type of the liquidity pool.
|
|
2182
|
+
*/
|
|
2183
|
+
calculationType?: 'fixed' | 'custom';
|
|
2184
|
+
/**
|
|
2185
|
+
* Custom function to calculate the the reward amount based on the liquidity
|
|
2186
|
+
* provided per day. X is the reward amount, Y is the liquidity provided per day in
|
|
2187
|
+
* USD.
|
|
2188
|
+
*/
|
|
2189
|
+
customFunction?: string;
|
|
2190
|
+
/**
|
|
2191
|
+
* Liquidity provided per day in USD
|
|
2192
|
+
*/
|
|
2193
|
+
liquidityPerDay?: number;
|
|
2194
|
+
/**
|
|
2195
|
+
* Blockchain network of the liquidity pool.
|
|
2196
|
+
*/
|
|
2197
|
+
network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
2198
|
+
/**
|
|
2199
|
+
* Indicates if only in-range liquidity is rewarded.
|
|
2200
|
+
*/
|
|
2201
|
+
onlyRewardInRangeLiquidity?: boolean;
|
|
2202
|
+
/**
|
|
2203
|
+
* Array of liquidity pools associated with the rule.
|
|
2204
|
+
*/
|
|
2205
|
+
pools?: Array<Liquidity.Pool>;
|
|
2206
|
+
/**
|
|
2207
|
+
* Protocol of the liquidity pool.
|
|
2208
|
+
*/
|
|
2209
|
+
protocol?: string;
|
|
2210
|
+
}
|
|
2211
|
+
namespace Liquidity {
|
|
2212
|
+
interface Pool {
|
|
2213
|
+
/**
|
|
2214
|
+
* Unique identifier of the liquidity pool.
|
|
2215
|
+
*/
|
|
2216
|
+
id: string;
|
|
2217
|
+
}
|
|
2218
|
+
}
|
|
2219
|
+
interface Range {
|
|
2220
|
+
/**
|
|
2221
|
+
* Reward amount for this range.
|
|
2222
|
+
*/
|
|
2223
|
+
amount: number;
|
|
2224
|
+
/**
|
|
2225
|
+
* End value of the range.
|
|
2226
|
+
*/
|
|
2227
|
+
endRange: number;
|
|
2228
|
+
/**
|
|
2229
|
+
* Start value of the range.
|
|
2230
|
+
*/
|
|
2231
|
+
startRange: number;
|
|
2232
|
+
/**
|
|
2233
|
+
* ID of the loyalty badge for this range.
|
|
2234
|
+
*/
|
|
2235
|
+
loyaltyBadgeId?: string;
|
|
2236
|
+
/**
|
|
2237
|
+
* Amount of the loyalty multiplier for this range.
|
|
2238
|
+
*/
|
|
2239
|
+
loyaltyMultiplierAmount?: number;
|
|
2240
|
+
}
|
|
2241
|
+
/**
|
|
2242
|
+
* Object defining referral requirements.
|
|
2243
|
+
*/
|
|
2244
|
+
interface ReferralRequirements {
|
|
2245
|
+
/**
|
|
2246
|
+
* Flag indicating if achieving points is required.
|
|
2247
|
+
*/
|
|
2248
|
+
achievePoints?: boolean | null;
|
|
2249
|
+
/**
|
|
2250
|
+
* Flag indicating if completing the profile is required.
|
|
2251
|
+
*/
|
|
2252
|
+
completeProfile?: boolean | null;
|
|
2253
|
+
/**
|
|
2254
|
+
* Flag indicating if connecting Discord is required.
|
|
2255
|
+
*/
|
|
2256
|
+
connectDiscord?: boolean | null;
|
|
2257
|
+
/**
|
|
2258
|
+
* Flag indicating if connecting email is required.
|
|
2259
|
+
*/
|
|
2260
|
+
connectEmail?: boolean | null;
|
|
2261
|
+
/**
|
|
2262
|
+
* Flag indicating if connecting Twitter is required.
|
|
2263
|
+
*/
|
|
2264
|
+
connectTwitter?: boolean | null;
|
|
2265
|
+
points?: ReferralRequirements.Points | null;
|
|
2266
|
+
}
|
|
2267
|
+
namespace ReferralRequirements {
|
|
2268
|
+
interface Points {
|
|
2269
|
+
/**
|
|
2270
|
+
* Points required for referral.
|
|
2271
|
+
*/
|
|
2272
|
+
amount?: number | null;
|
|
2273
|
+
/**
|
|
2274
|
+
* ID of the loyalty currency for referral.
|
|
2275
|
+
*/
|
|
2276
|
+
loyaltyCurrecyId?: string | null;
|
|
2277
|
+
}
|
|
2278
|
+
}
|
|
2279
|
+
/**
|
|
2280
|
+
* Object containing details of the associated smart contract.
|
|
2281
|
+
*/
|
|
2282
|
+
interface SmartContract {
|
|
2283
|
+
/**
|
|
2284
|
+
* Mapping of addresses for the smart contract.
|
|
2285
|
+
*/
|
|
2286
|
+
addressMapping?: string | null;
|
|
2287
|
+
/**
|
|
2288
|
+
* Object containing details of the amount multiplier from the event.
|
|
2289
|
+
*/
|
|
2290
|
+
amountMultiplier?: SmartContract.AmountMultiplier | null;
|
|
2291
|
+
/**
|
|
2292
|
+
* ID of the smart contract.
|
|
2293
|
+
*/
|
|
2294
|
+
contractId?: string | null;
|
|
2295
|
+
/**
|
|
2296
|
+
* Criteria to evaluate the smart contract event.
|
|
2297
|
+
*/
|
|
2298
|
+
criteria?: 'everyEvent' | 'byParameter' | null;
|
|
2299
|
+
/**
|
|
2300
|
+
* Event emitted by the smart contract.
|
|
2301
|
+
*/
|
|
2302
|
+
event?: string | null;
|
|
2303
|
+
/**
|
|
2304
|
+
* Array of parameters for the smart contract.
|
|
2305
|
+
*/
|
|
2306
|
+
params?: Array<SmartContract.Param> | null;
|
|
2307
|
+
/**
|
|
2308
|
+
* Type of the smart contract interaction.
|
|
2309
|
+
*/
|
|
2310
|
+
type?: 'function' | 'event' | null;
|
|
2311
|
+
}
|
|
2312
|
+
namespace SmartContract {
|
|
2313
|
+
/**
|
|
2314
|
+
* Object containing details of the amount multiplier from the event.
|
|
2315
|
+
*/
|
|
2316
|
+
interface AmountMultiplier {
|
|
2317
|
+
/**
|
|
2318
|
+
* Mapping of the value for the smart contract.
|
|
2319
|
+
*/
|
|
2320
|
+
valueMapping?: string | null;
|
|
2321
|
+
}
|
|
2322
|
+
interface Param {
|
|
2323
|
+
/**
|
|
2324
|
+
* Condition to check for the parameter.
|
|
2325
|
+
*/
|
|
2326
|
+
condition?: string | null;
|
|
2327
|
+
/**
|
|
2328
|
+
* Name of the smart contract parameter.
|
|
2329
|
+
*/
|
|
2330
|
+
name?: string | null;
|
|
2331
|
+
/**
|
|
2332
|
+
* Value of the parameter.
|
|
2333
|
+
*/
|
|
2334
|
+
value?: string | null;
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
interface SnapshotProposal {
|
|
2338
|
+
/**
|
|
2339
|
+
* ID of the snapshot proposal.
|
|
2340
|
+
*/
|
|
2341
|
+
id: string;
|
|
2342
|
+
/**
|
|
2343
|
+
* Space associated with the snapshot proposal.
|
|
2344
|
+
*/
|
|
2345
|
+
space: string;
|
|
2346
|
+
}
|
|
2347
|
+
interface StreakArray {
|
|
2348
|
+
/**
|
|
2349
|
+
* Reward amount for achieving the streak milestone.
|
|
2350
|
+
*/
|
|
2351
|
+
streakAmount: number;
|
|
2352
|
+
/**
|
|
2353
|
+
* Milestone required to achieve the streak.
|
|
2354
|
+
*/
|
|
2355
|
+
streakMilestone: number;
|
|
2356
|
+
}
|
|
2357
|
+
/**
|
|
2358
|
+
* Metadata for swap loyalty rules
|
|
2359
|
+
*/
|
|
2360
|
+
interface Swap {
|
|
2361
|
+
provider?: 'any' | 'relay' | 'lifi';
|
|
2362
|
+
relayReferrerId?: string;
|
|
2363
|
+
requireCrossChainSwap?: boolean;
|
|
2364
|
+
swappedToChain?: 'any' | number | string;
|
|
2365
|
+
swappedToTokens?: Array<Swap.SwappedToToken>;
|
|
2366
|
+
tokenMode?: 'any' | 'specific';
|
|
2367
|
+
trackTokenAmount?: boolean;
|
|
2368
|
+
}
|
|
2369
|
+
namespace Swap {
|
|
2370
|
+
interface SwappedToToken {
|
|
2371
|
+
address: string;
|
|
2372
|
+
chainId: string;
|
|
2373
|
+
}
|
|
2374
|
+
}
|
|
2375
|
+
}
|
|
1226
2376
|
}
|
|
1227
2377
|
}
|
|
1228
2378
|
export interface RuleDeleteResponse {
|
|
@@ -1230,12 +2380,12 @@ export interface RuleDeleteResponse {
|
|
|
1230
2380
|
deletedAt: string;
|
|
1231
2381
|
}
|
|
1232
2382
|
export interface RuleCompleteResponse {
|
|
1233
|
-
message:
|
|
2383
|
+
message: 'Completion request added to queue' | 'Link click being verified, come back later to check the status';
|
|
1234
2384
|
}
|
|
1235
|
-
export interface
|
|
1236
|
-
data: Array<
|
|
2385
|
+
export interface RuleGetStatusResponse {
|
|
2386
|
+
data: Array<RuleGetStatusResponse.Data>;
|
|
1237
2387
|
}
|
|
1238
|
-
export declare namespace
|
|
2388
|
+
export declare namespace RuleGetStatusResponse {
|
|
1239
2389
|
interface Data {
|
|
1240
2390
|
loyaltyRuleId: string;
|
|
1241
2391
|
status: 'pending' | 'processing' | 'completed' | 'failed';
|
|
@@ -1287,7 +2437,7 @@ export interface RuleCreateParams {
|
|
|
1287
2437
|
/**
|
|
1288
2438
|
* Type of loyalty rule being created
|
|
1289
2439
|
*/
|
|
1290
|
-
type: 'Bonus' | 'BoughtOn' | 'BoughtWithRoyalties' | 'DiscordMessages' | 'Listing' | 'Lodging' | 'MintOn' | 'PoapClaim' | 'SnagSocialsConnected' | 'SnapshotFullset' | 'SnapshotHold' | 'SoldOn' | 'SoldWithRoyalties' | 'TokenHold' | 'TwitterBio' | 'TwitterHashTagPost' | 'Retweet' | 'check_in' | 'code_entry' | 'connect_wallet' | 'connected_discord' | 'connected_email' | 'connected_epic' | 'connected_steam' | 'connected_telegram' | 'connected_twitter' | 'create_partner_account' | 'discord_member' | 'drip_x_follow' | 'drip_x_new_tweet' | 'drip_x_text_in_bio' | 'drip_x_text_in_comment' | 'drip_x_text_in_name' | 'drip_x_tweet' | 'external_rule' | 'link_click' | 'manual_upload' | 'profile_completed' | 'referred_user' | 'smart_contract_event' | 'snapshot_governance' | 'telegram_join' | 'telegram_messages' | 'text_input' | 'token_hold_erc20' | 'tweet_liked_by_project' | 'twitter_comment' | 'twitter_follow' | 'twitter_followers' | 'twitter_like' | 'twitter_post_hashtag';
|
|
2440
|
+
type: 'Bonus' | 'BoughtOn' | 'BoughtWithRoyalties' | 'DiscordMessages' | 'Listing' | 'Lodging' | 'MintOn' | 'PoapClaim' | 'SnagSocialsConnected' | 'SnapshotFullset' | 'SnapshotHold' | 'SoldOn' | 'SoldWithRoyalties' | 'TokenHold' | 'TwitterBio' | 'TwitterHashTagPost' | 'Retweet' | 'check_in' | 'code_entry' | 'connect_wallet' | 'connected_discord' | 'connected_email' | 'connected_epic' | 'connected_steam' | 'connected_telegram' | 'connected_twitter' | 'create_partner_account' | 'discord_member' | 'drip_x_follow' | 'drip_x_new_tweet' | 'drip_x_text_in_bio' | 'drip_x_text_in_comment' | 'drip_x_text_in_name' | 'drip_x_tweet' | 'external_rule' | 'link_click' | 'manual_upload' | 'profile_completed' | 'referred_user' | 'smart_contract_event' | 'snapshot_governance' | 'telegram_join' | 'telegram_messages' | 'text_input' | 'token_hold_erc20' | 'tweet_liked_by_project' | 'twitter_comment' | 'twitter_follow' | 'twitter_followers' | 'twitter_like' | 'twitter_post_hashtag' | 'quiz' | 'poll' | 'steam_wishlist' | 'liquidity_uniswap_v2' | 'liquidity_uniswap_v3' | 'points_airdrop' | 'youtube_subscribers' | 'youtube_comment' | 'shopify_spend' | 'swap' | 'tiktok_post' | 'post_impressions' | 'discord_join';
|
|
1291
2441
|
/**
|
|
1292
2442
|
* Unique identifier for the associated website
|
|
1293
2443
|
*/
|
|
@@ -1316,6 +2466,11 @@ export interface RuleCreateParams {
|
|
|
1316
2466
|
* Optional detailed description of the rule
|
|
1317
2467
|
*/
|
|
1318
2468
|
description?: string;
|
|
2469
|
+
duplicatedFromId?: string | null;
|
|
2470
|
+
/**
|
|
2471
|
+
* ID of the external integration
|
|
2472
|
+
*/
|
|
2473
|
+
externalIntegrationId?: string | null;
|
|
1319
2474
|
/**
|
|
1320
2475
|
* Whether to hide this rule in the user interface
|
|
1321
2476
|
*/
|
|
@@ -1323,19 +2478,41 @@ export interface RuleCreateParams {
|
|
|
1323
2478
|
/**
|
|
1324
2479
|
* Interval between rule executions
|
|
1325
2480
|
*/
|
|
1326
|
-
interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
|
|
2481
|
+
interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
|
|
1327
2482
|
/**
|
|
1328
2483
|
* Whether this rule is mandatory
|
|
1329
2484
|
*/
|
|
1330
2485
|
isRequired?: boolean;
|
|
2486
|
+
/**
|
|
2487
|
+
* Unique identifier for the loyalty badge
|
|
2488
|
+
*/
|
|
2489
|
+
loyaltyBadgeId?: string | null;
|
|
1331
2490
|
/**
|
|
1332
2491
|
* Unique identifier for the loyalty rule group
|
|
1333
2492
|
*/
|
|
1334
2493
|
loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
|
|
2494
|
+
/**
|
|
2495
|
+
* URL for uploading loyalty user allotment via CSV
|
|
2496
|
+
*/
|
|
2497
|
+
loyaltyUserAllotmentCsvUrl?: string;
|
|
2498
|
+
/**
|
|
2499
|
+
* The interval for the max amount. Available for the smart contract and external
|
|
2500
|
+
* rules.
|
|
2501
|
+
*/
|
|
2502
|
+
maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
|
|
2503
|
+
/**
|
|
2504
|
+
* The maximum amount of points a user can earn per interval. Available for the
|
|
2505
|
+
* smart contract and external rules.
|
|
2506
|
+
*/
|
|
2507
|
+
maxAmountPerInterval?: number | null;
|
|
2508
|
+
/**
|
|
2509
|
+
* URL of the media to be displayed
|
|
2510
|
+
*/
|
|
2511
|
+
mediaUrl?: string | null;
|
|
1335
2512
|
/**
|
|
1336
2513
|
* Blockchain network where the rule will apply
|
|
1337
2514
|
*/
|
|
1338
|
-
network?: '
|
|
2515
|
+
network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
1339
2516
|
/**
|
|
1340
2517
|
* OAuth credentials associated with the rule
|
|
1341
2518
|
*/
|
|
@@ -1343,17 +2520,25 @@ export interface RuleCreateParams {
|
|
|
1343
2520
|
/**
|
|
1344
2521
|
* Type of reward issued by the rule
|
|
1345
2522
|
*/
|
|
1346
|
-
rewardType?: 'points' | 'multiplier';
|
|
2523
|
+
rewardType?: 'points' | 'multiplier' | 'badge';
|
|
2524
|
+
/**
|
|
2525
|
+
* URL of the Shopify store
|
|
2526
|
+
*/
|
|
2527
|
+
shopifyStoreUrl?: string | null;
|
|
1347
2528
|
/**
|
|
1348
|
-
*
|
|
2529
|
+
* Optional subscription id for the rule
|
|
1349
2530
|
*/
|
|
1350
|
-
|
|
2531
|
+
subscriptionId?: string | null;
|
|
1351
2532
|
}
|
|
1352
2533
|
export declare namespace RuleCreateParams {
|
|
1353
2534
|
/**
|
|
1354
2535
|
* Additional metadata for the loyalty rule
|
|
1355
2536
|
*/
|
|
1356
2537
|
interface Metadata {
|
|
2538
|
+
/**
|
|
2539
|
+
* Number of tokens per batch.
|
|
2540
|
+
*/
|
|
2541
|
+
batchSize?: number | null;
|
|
1357
2542
|
/**
|
|
1358
2543
|
* Text displayed on the action button.
|
|
1359
2544
|
*/
|
|
@@ -1378,6 +2563,16 @@ export declare namespace RuleCreateParams {
|
|
|
1378
2563
|
* Array of collections associated with the rule.
|
|
1379
2564
|
*/
|
|
1380
2565
|
collection?: Array<Metadata.Collection>;
|
|
2566
|
+
/**
|
|
2567
|
+
* Conditions for completing the profile.
|
|
2568
|
+
*/
|
|
2569
|
+
completeProfileConditions?: {
|
|
2570
|
+
[key: string]: boolean;
|
|
2571
|
+
} | null;
|
|
2572
|
+
/**
|
|
2573
|
+
* Description of the external rule condition (only for external rules)
|
|
2574
|
+
*/
|
|
2575
|
+
conditionDescription?: string;
|
|
1381
2576
|
/**
|
|
1382
2577
|
* Object containing details for the call-to-action.
|
|
1383
2578
|
*/
|
|
@@ -1386,6 +2581,10 @@ export declare namespace RuleCreateParams {
|
|
|
1386
2581
|
* API key for custom rewards integration.
|
|
1387
2582
|
*/
|
|
1388
2583
|
customRewardsApiKey?: string;
|
|
2584
|
+
/**
|
|
2585
|
+
* Flag indicating if the rule should use direct RPC to get the balance of tokens.
|
|
2586
|
+
*/
|
|
2587
|
+
directRpc?: boolean;
|
|
1389
2588
|
/**
|
|
1390
2589
|
* Array of Discord servers, channels, and roles to join.
|
|
1391
2590
|
*/
|
|
@@ -1406,10 +2605,18 @@ export declare namespace RuleCreateParams {
|
|
|
1406
2605
|
* Flag indicating whether the verified multiplier is enabled.
|
|
1407
2606
|
*/
|
|
1408
2607
|
enableVerifiedMultiplier?: boolean;
|
|
2608
|
+
/**
|
|
2609
|
+
* Fill source of the order for the token sale
|
|
2610
|
+
*/
|
|
2611
|
+
fillSource?: string;
|
|
1409
2612
|
/**
|
|
1410
2613
|
* Percentage reward given to a user for their first referral.
|
|
1411
2614
|
*/
|
|
1412
2615
|
firstReferralReward?: number | null;
|
|
2616
|
+
/**
|
|
2617
|
+
* Flag indicating whether the fill source is included.
|
|
2618
|
+
*/
|
|
2619
|
+
hasFillSource?: boolean;
|
|
1413
2620
|
/**
|
|
1414
2621
|
* Indicates if the item has never been sold.
|
|
1415
2622
|
*/
|
|
@@ -1430,10 +2637,18 @@ export declare namespace RuleCreateParams {
|
|
|
1430
2637
|
* URL of the image associated with the rule.
|
|
1431
2638
|
*/
|
|
1432
2639
|
imageUrl?: string | null;
|
|
2640
|
+
/**
|
|
2641
|
+
* If enabled, the first transaction done on the platform will complete this rule
|
|
2642
|
+
*/
|
|
2643
|
+
isCheckInOnEveryTxn?: boolean;
|
|
1433
2644
|
/**
|
|
1434
2645
|
* Indicates if the multiplier has been applied to rewards.
|
|
1435
2646
|
*/
|
|
1436
2647
|
isMultiplierApplied?: boolean;
|
|
2648
|
+
/**
|
|
2649
|
+
* Flag indicating if the rule is restricted to new users.
|
|
2650
|
+
*/
|
|
2651
|
+
isRestrictedToNewUsers?: boolean;
|
|
1437
2652
|
/**
|
|
1438
2653
|
* Flag indicating if rewards are applied retroactively.
|
|
1439
2654
|
*/
|
|
@@ -1446,6 +2661,10 @@ export declare namespace RuleCreateParams {
|
|
|
1446
2661
|
* Optional link associated with the metadata.
|
|
1447
2662
|
*/
|
|
1448
2663
|
link?: string | null;
|
|
2664
|
+
/**
|
|
2665
|
+
* Liquidity pool details.
|
|
2666
|
+
*/
|
|
2667
|
+
liquidity?: Metadata.Liquidity;
|
|
1449
2668
|
/**
|
|
1450
2669
|
* Maximum quantity constraint for token holding.
|
|
1451
2670
|
*/
|
|
@@ -1470,10 +2689,30 @@ export declare namespace RuleCreateParams {
|
|
|
1470
2689
|
* Flag indicating whether to include only non-listed items.
|
|
1471
2690
|
*/
|
|
1472
2691
|
onlyNonListed?: boolean;
|
|
2692
|
+
/**
|
|
2693
|
+
* Indicates if only existing users are rewarded.
|
|
2694
|
+
*/
|
|
2695
|
+
onlyRewardExistingUser?: boolean;
|
|
2696
|
+
/**
|
|
2697
|
+
* give points for only one token ownership per contract
|
|
2698
|
+
*/
|
|
2699
|
+
onlyRewardSingleTokenOwnership?: boolean | null;
|
|
1473
2700
|
/**
|
|
1474
2701
|
* Promotional code associated with the rule.
|
|
1475
2702
|
*/
|
|
1476
2703
|
promoCode?: string;
|
|
2704
|
+
/**
|
|
2705
|
+
* URL of the CSV file containing promo codes.
|
|
2706
|
+
*/
|
|
2707
|
+
promoCodeCsvUrl?: string;
|
|
2708
|
+
/**
|
|
2709
|
+
* Numbers of the promotional code to be generated.
|
|
2710
|
+
*/
|
|
2711
|
+
promoCodeLength?: number | null;
|
|
2712
|
+
/**
|
|
2713
|
+
* Type of the promotional code.
|
|
2714
|
+
*/
|
|
2715
|
+
promoCodeType?: 'code' | 'csv' | 'generate';
|
|
1477
2716
|
/**
|
|
1478
2717
|
* Array defining ranges and corresponding rewards.
|
|
1479
2718
|
*/
|
|
@@ -1486,10 +2725,43 @@ export declare namespace RuleCreateParams {
|
|
|
1486
2725
|
* Lump sum reward given to a referrer.
|
|
1487
2726
|
*/
|
|
1488
2727
|
referrerReward?: number | null;
|
|
2728
|
+
/**
|
|
2729
|
+
* Loyalty currency ID of the referrer reward.
|
|
2730
|
+
*/
|
|
2731
|
+
referrerRewardLoyaltyCurrencyId?: string | null;
|
|
2732
|
+
/**
|
|
2733
|
+
* Flag indicating if the post link is required.
|
|
2734
|
+
*/
|
|
2735
|
+
requirePostLink?: boolean | null;
|
|
2736
|
+
/**
|
|
2737
|
+
* Flag indicating if the rule can also reward badges per range.
|
|
2738
|
+
*/
|
|
2739
|
+
rewardBadgePerRange?: boolean;
|
|
2740
|
+
/**
|
|
2741
|
+
* Flag indicating if the reward is rewarded by batch.
|
|
2742
|
+
*/
|
|
2743
|
+
rewardByBatch?: boolean | null;
|
|
2744
|
+
/**
|
|
2745
|
+
* Flag indicating if the reward is rewarded per action.
|
|
2746
|
+
*/
|
|
2747
|
+
rewardPerAction?: boolean | null;
|
|
1489
2748
|
/**
|
|
1490
2749
|
* Flag indicating if rewards are given per impression.
|
|
1491
2750
|
*/
|
|
1492
2751
|
rewardPerImpression?: boolean | null;
|
|
2752
|
+
/**
|
|
2753
|
+
* Flag indicating if the rule should reward based on value of traded tokens
|
|
2754
|
+
* instead of count.
|
|
2755
|
+
*/
|
|
2756
|
+
rewardPerValue?: boolean;
|
|
2757
|
+
/**
|
|
2758
|
+
* Wallet address of the user can only be used if userId is not provided
|
|
2759
|
+
*/
|
|
2760
|
+
royaltyAddress?: string;
|
|
2761
|
+
/**
|
|
2762
|
+
* Royalty percentage of the item.
|
|
2763
|
+
*/
|
|
2764
|
+
royaltyPercentage?: number;
|
|
1493
2765
|
/**
|
|
1494
2766
|
* Currency associated with sales.
|
|
1495
2767
|
*/
|
|
@@ -1498,6 +2770,10 @@ export declare namespace RuleCreateParams {
|
|
|
1498
2770
|
* Percentage reward given for a second-level referral.
|
|
1499
2771
|
*/
|
|
1500
2772
|
secondReferralReward?: number | null;
|
|
2773
|
+
/**
|
|
2774
|
+
* Flag indicating if the multiplier is skipped.
|
|
2775
|
+
*/
|
|
2776
|
+
skipMultiplier?: boolean | null;
|
|
1501
2777
|
/**
|
|
1502
2778
|
* Object containing details of the associated smart contract.
|
|
1503
2779
|
*/
|
|
@@ -1509,7 +2785,7 @@ export declare namespace RuleCreateParams {
|
|
|
1509
2785
|
/**
|
|
1510
2786
|
* Social media platform associated with the rule.
|
|
1511
2787
|
*/
|
|
1512
|
-
socialPlatform?: '
|
|
2788
|
+
socialPlatform?: 'Custom' | 'Discord' | 'EpicGames' | 'Instagram' | 'Steam' | 'Telegram' | 'TikTok' | 'Twitch' | 'X(Twitter)' | 'YouTube' | 'Google' | null;
|
|
1513
2789
|
/**
|
|
1514
2790
|
* URL of the social platform's logo.
|
|
1515
2791
|
*/
|
|
@@ -1518,10 +2794,18 @@ export declare namespace RuleCreateParams {
|
|
|
1518
2794
|
* Name of the social platform.
|
|
1519
2795
|
*/
|
|
1520
2796
|
socialPlatformName?: string | null;
|
|
2797
|
+
/**
|
|
2798
|
+
* ID of the Steam app.
|
|
2799
|
+
*/
|
|
2800
|
+
steamAppId?: string | null;
|
|
1521
2801
|
/**
|
|
1522
2802
|
* Array of streak milestones and corresponding rewards.
|
|
1523
2803
|
*/
|
|
1524
2804
|
streakArray?: Array<Metadata.StreakArray> | null;
|
|
2805
|
+
/**
|
|
2806
|
+
* Metadata for swap loyalty rules
|
|
2807
|
+
*/
|
|
2808
|
+
swap?: Metadata.Swap;
|
|
1525
2809
|
/**
|
|
1526
2810
|
* ID of the Telegram channel.
|
|
1527
2811
|
*/
|
|
@@ -1534,6 +2818,11 @@ export declare namespace RuleCreateParams {
|
|
|
1534
2818
|
* Flag indicating if all contracts are tracked.
|
|
1535
2819
|
*/
|
|
1536
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;
|
|
1537
2826
|
/**
|
|
1538
2827
|
* URL of the associated Twitter account.
|
|
1539
2828
|
*/
|
|
@@ -1569,7 +2858,15 @@ export declare namespace RuleCreateParams {
|
|
|
1569
2858
|
/**
|
|
1570
2859
|
* Type of wallet associated with the rule.
|
|
1571
2860
|
*/
|
|
1572
|
-
walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
|
|
2861
|
+
walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | 'agw' | null;
|
|
2862
|
+
/**
|
|
2863
|
+
* ID of the Youtube channel.
|
|
2864
|
+
*/
|
|
2865
|
+
youtubeChannelId?: string | null;
|
|
2866
|
+
/**
|
|
2867
|
+
* ID of the Youtube video.
|
|
2868
|
+
*/
|
|
2869
|
+
youtubeVideoId?: string | null;
|
|
1573
2870
|
}
|
|
1574
2871
|
namespace Metadata {
|
|
1575
2872
|
interface Collection {
|
|
@@ -1584,7 +2881,7 @@ export declare namespace RuleCreateParams {
|
|
|
1584
2881
|
/**
|
|
1585
2882
|
* Blockchain network of the collection.
|
|
1586
2883
|
*/
|
|
1587
|
-
network?: '
|
|
2884
|
+
network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
1588
2885
|
}
|
|
1589
2886
|
/**
|
|
1590
2887
|
* Object containing details for the call-to-action.
|
|
@@ -1623,6 +2920,10 @@ export declare namespace RuleCreateParams {
|
|
|
1623
2920
|
* Array of emojis used in the channel.
|
|
1624
2921
|
*/
|
|
1625
2922
|
emojis?: Array<Channel.Emoji>;
|
|
2923
|
+
/**
|
|
2924
|
+
* Phrase of text to be present in the discord message
|
|
2925
|
+
*/
|
|
2926
|
+
text?: string;
|
|
1626
2927
|
}
|
|
1627
2928
|
namespace Channel {
|
|
1628
2929
|
interface Emoji {
|
|
@@ -1645,6 +2946,49 @@ export declare namespace RuleCreateParams {
|
|
|
1645
2946
|
*/
|
|
1646
2947
|
id: string;
|
|
1647
2948
|
}
|
|
2949
|
+
/**
|
|
2950
|
+
* Liquidity pool details.
|
|
2951
|
+
*/
|
|
2952
|
+
interface Liquidity {
|
|
2953
|
+
/**
|
|
2954
|
+
* Calculation type of the liquidity pool.
|
|
2955
|
+
*/
|
|
2956
|
+
calculationType?: 'fixed' | 'custom';
|
|
2957
|
+
/**
|
|
2958
|
+
* Custom function to calculate the the reward amount based on the liquidity
|
|
2959
|
+
* provided per day. X is the reward amount, Y is the liquidity provided per day in
|
|
2960
|
+
* USD.
|
|
2961
|
+
*/
|
|
2962
|
+
customFunction?: string;
|
|
2963
|
+
/**
|
|
2964
|
+
* Liquidity provided per day in USD
|
|
2965
|
+
*/
|
|
2966
|
+
liquidityPerDay?: number;
|
|
2967
|
+
/**
|
|
2968
|
+
* Blockchain network of the liquidity pool.
|
|
2969
|
+
*/
|
|
2970
|
+
network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
2971
|
+
/**
|
|
2972
|
+
* Indicates if only in-range liquidity is rewarded.
|
|
2973
|
+
*/
|
|
2974
|
+
onlyRewardInRangeLiquidity?: boolean;
|
|
2975
|
+
/**
|
|
2976
|
+
* Array of liquidity pools associated with the rule.
|
|
2977
|
+
*/
|
|
2978
|
+
pools?: Array<Liquidity.Pool>;
|
|
2979
|
+
/**
|
|
2980
|
+
* Protocol of the liquidity pool.
|
|
2981
|
+
*/
|
|
2982
|
+
protocol?: string;
|
|
2983
|
+
}
|
|
2984
|
+
namespace Liquidity {
|
|
2985
|
+
interface Pool {
|
|
2986
|
+
/**
|
|
2987
|
+
* Unique identifier of the liquidity pool.
|
|
2988
|
+
*/
|
|
2989
|
+
id: string;
|
|
2990
|
+
}
|
|
2991
|
+
}
|
|
1648
2992
|
interface Range {
|
|
1649
2993
|
/**
|
|
1650
2994
|
* Reward amount for this range.
|
|
@@ -1658,6 +3002,14 @@ export declare namespace RuleCreateParams {
|
|
|
1658
3002
|
* Start value of the range.
|
|
1659
3003
|
*/
|
|
1660
3004
|
startRange: number;
|
|
3005
|
+
/**
|
|
3006
|
+
* ID of the loyalty badge for this range.
|
|
3007
|
+
*/
|
|
3008
|
+
loyaltyBadgeId?: string;
|
|
3009
|
+
/**
|
|
3010
|
+
* Amount of the loyalty multiplier for this range.
|
|
3011
|
+
*/
|
|
3012
|
+
loyaltyMultiplierAmount?: number;
|
|
1661
3013
|
}
|
|
1662
3014
|
/**
|
|
1663
3015
|
* Object defining referral requirements.
|
|
@@ -1701,18 +3053,14 @@ export declare namespace RuleCreateParams {
|
|
|
1701
3053
|
* Object containing details of the associated smart contract.
|
|
1702
3054
|
*/
|
|
1703
3055
|
interface SmartContract {
|
|
1704
|
-
/**
|
|
1705
|
-
* ABI of the smart contract.
|
|
1706
|
-
*/
|
|
1707
|
-
abi?: string | null;
|
|
1708
3056
|
/**
|
|
1709
3057
|
* Mapping of addresses for the smart contract.
|
|
1710
3058
|
*/
|
|
1711
3059
|
addressMapping?: string | null;
|
|
1712
3060
|
/**
|
|
1713
|
-
*
|
|
3061
|
+
* Object containing details of the amount multiplier from the event.
|
|
1714
3062
|
*/
|
|
1715
|
-
|
|
3063
|
+
amountMultiplier?: SmartContract.AmountMultiplier | null;
|
|
1716
3064
|
/**
|
|
1717
3065
|
* ID of the smart contract.
|
|
1718
3066
|
*/
|
|
@@ -1721,58 +3069,28 @@ export declare namespace RuleCreateParams {
|
|
|
1721
3069
|
* Criteria to evaluate the smart contract event.
|
|
1722
3070
|
*/
|
|
1723
3071
|
criteria?: 'everyEvent' | 'byParameter' | null;
|
|
1724
|
-
/**
|
|
1725
|
-
* Time range applied to the rule.
|
|
1726
|
-
*/
|
|
1727
|
-
customRange?: SmartContract.CustomRange | null;
|
|
1728
3072
|
/**
|
|
1729
3073
|
* Event emitted by the smart contract.
|
|
1730
3074
|
*/
|
|
1731
3075
|
event?: string | null;
|
|
1732
|
-
/**
|
|
1733
|
-
* Maximum value allowed for the parameter.
|
|
1734
|
-
*/
|
|
1735
|
-
max?: number | null;
|
|
1736
3076
|
/**
|
|
1737
3077
|
* Array of parameters for the smart contract.
|
|
1738
3078
|
*/
|
|
1739
3079
|
params?: Array<SmartContract.Param> | null;
|
|
1740
3080
|
/**
|
|
1741
|
-
*
|
|
3081
|
+
* Type of the smart contract interaction.
|
|
1742
3082
|
*/
|
|
1743
|
-
|
|
1744
|
-
/**
|
|
1745
|
-
* Flag indicating if a custom range is applied.
|
|
1746
|
-
*/
|
|
1747
|
-
withCustomRange?: boolean | null;
|
|
1748
|
-
/**
|
|
1749
|
-
* Flag indicating if a maximum limit is applied.
|
|
1750
|
-
*/
|
|
1751
|
-
withMax?: boolean | null;
|
|
3083
|
+
type?: 'function' | 'event' | null;
|
|
1752
3084
|
}
|
|
1753
3085
|
namespace SmartContract {
|
|
1754
|
-
interface Bonus {
|
|
1755
|
-
/**
|
|
1756
|
-
* Amount of the bonus.
|
|
1757
|
-
*/
|
|
1758
|
-
amount?: number | null;
|
|
1759
|
-
/**
|
|
1760
|
-
* Number of times the bonus is applied.
|
|
1761
|
-
*/
|
|
1762
|
-
count?: number | null;
|
|
1763
|
-
}
|
|
1764
3086
|
/**
|
|
1765
|
-
*
|
|
3087
|
+
* Object containing details of the amount multiplier from the event.
|
|
1766
3088
|
*/
|
|
1767
|
-
interface
|
|
1768
|
-
/**
|
|
1769
|
-
* End time of the custom range.
|
|
1770
|
-
*/
|
|
1771
|
-
endsAt?: string | null;
|
|
3089
|
+
interface AmountMultiplier {
|
|
1772
3090
|
/**
|
|
1773
|
-
*
|
|
3091
|
+
* Mapping of the value for the smart contract.
|
|
1774
3092
|
*/
|
|
1775
|
-
|
|
3093
|
+
valueMapping?: string | null;
|
|
1776
3094
|
}
|
|
1777
3095
|
interface Param {
|
|
1778
3096
|
/**
|
|
@@ -1809,6 +3127,24 @@ export declare namespace RuleCreateParams {
|
|
|
1809
3127
|
*/
|
|
1810
3128
|
streakMilestone: number;
|
|
1811
3129
|
}
|
|
3130
|
+
/**
|
|
3131
|
+
* Metadata for swap loyalty rules
|
|
3132
|
+
*/
|
|
3133
|
+
interface Swap {
|
|
3134
|
+
provider?: 'any' | 'relay' | 'lifi';
|
|
3135
|
+
relayReferrerId?: string;
|
|
3136
|
+
requireCrossChainSwap?: boolean;
|
|
3137
|
+
swappedToChain?: 'any' | number | string;
|
|
3138
|
+
swappedToTokens?: Array<Swap.SwappedToToken>;
|
|
3139
|
+
tokenMode?: 'any' | 'specific';
|
|
3140
|
+
trackTokenAmount?: boolean;
|
|
3141
|
+
}
|
|
3142
|
+
namespace Swap {
|
|
3143
|
+
interface SwappedToToken {
|
|
3144
|
+
address: string;
|
|
3145
|
+
chainId: string;
|
|
3146
|
+
}
|
|
3147
|
+
}
|
|
1812
3148
|
}
|
|
1813
3149
|
interface Collection {
|
|
1814
3150
|
/**
|
|
@@ -1818,7 +3154,11 @@ export declare namespace RuleCreateParams {
|
|
|
1818
3154
|
/**
|
|
1819
3155
|
* Blockchain network for the collection
|
|
1820
3156
|
*/
|
|
1821
|
-
network: '
|
|
3157
|
+
network: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
3158
|
+
/**
|
|
3159
|
+
* Symbol of the collection.
|
|
3160
|
+
*/
|
|
3161
|
+
symbol?: string;
|
|
1822
3162
|
}
|
|
1823
3163
|
}
|
|
1824
3164
|
export interface RuleUpdateParams {
|
|
@@ -1826,34 +3166,14 @@ export interface RuleUpdateParams {
|
|
|
1826
3166
|
* Reward amount for the loyalty rule
|
|
1827
3167
|
*/
|
|
1828
3168
|
amount: unknown;
|
|
1829
|
-
/**
|
|
1830
|
-
* Effective end time of the rule
|
|
1831
|
-
*/
|
|
1832
|
-
effectiveEndTime: string | null;
|
|
1833
|
-
/**
|
|
1834
|
-
* Effective start time of the rule
|
|
1835
|
-
*/
|
|
1836
|
-
effectiveStartTime: string | null;
|
|
1837
3169
|
/**
|
|
1838
3170
|
* End time for the loyalty rule
|
|
1839
3171
|
*/
|
|
1840
3172
|
endTime: string | null;
|
|
1841
|
-
/**
|
|
1842
|
-
* Frequency of the rule execution
|
|
1843
|
-
*/
|
|
1844
|
-
frequency: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
|
|
1845
|
-
/**
|
|
1846
|
-
* Additional metadata for the loyalty rule
|
|
1847
|
-
*/
|
|
1848
|
-
metadata: RuleUpdateParams.Metadata;
|
|
1849
3173
|
/**
|
|
1850
3174
|
* Name of the loyalty rule
|
|
1851
3175
|
*/
|
|
1852
3176
|
name: string;
|
|
1853
|
-
/**
|
|
1854
|
-
* Start time for the loyalty rule
|
|
1855
|
-
*/
|
|
1856
|
-
startTime: string | null;
|
|
1857
3177
|
/**
|
|
1858
3178
|
* Blockchain address of the associated collection
|
|
1859
3179
|
*/
|
|
@@ -1874,6 +3194,22 @@ export interface RuleUpdateParams {
|
|
|
1874
3194
|
* Optional description of the loyalty rule
|
|
1875
3195
|
*/
|
|
1876
3196
|
description?: string;
|
|
3197
|
+
/**
|
|
3198
|
+
* Effective end time of the rule
|
|
3199
|
+
*/
|
|
3200
|
+
effectiveEndTime?: string | null;
|
|
3201
|
+
/**
|
|
3202
|
+
* Effective start time of the rule
|
|
3203
|
+
*/
|
|
3204
|
+
effectiveStartTime?: string | null;
|
|
3205
|
+
/**
|
|
3206
|
+
* ID of the external integration
|
|
3207
|
+
*/
|
|
3208
|
+
externalIntegrationId?: string | null;
|
|
3209
|
+
/**
|
|
3210
|
+
* Frequency of the rule execution
|
|
3211
|
+
*/
|
|
3212
|
+
frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
|
|
1877
3213
|
/**
|
|
1878
3214
|
* Whether to hide this rule in the user interface
|
|
1879
3215
|
*/
|
|
@@ -1881,7 +3217,7 @@ export interface RuleUpdateParams {
|
|
|
1881
3217
|
/**
|
|
1882
3218
|
* Time interval for recurring rule execution
|
|
1883
3219
|
*/
|
|
1884
|
-
interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
|
|
3220
|
+
interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
|
|
1885
3221
|
/**
|
|
1886
3222
|
* Whether this rule is required for participation
|
|
1887
3223
|
*/
|
|
@@ -1890,10 +3226,28 @@ export interface RuleUpdateParams {
|
|
|
1890
3226
|
* ID of the rule group section to associate with the rule
|
|
1891
3227
|
*/
|
|
1892
3228
|
loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
|
|
3229
|
+
/**
|
|
3230
|
+
* The interval for the max amount. Available for the smart contract and external
|
|
3231
|
+
* rules.
|
|
3232
|
+
*/
|
|
3233
|
+
maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
|
|
3234
|
+
/**
|
|
3235
|
+
* The maximum amount of points a user can earn per interval. Available for the
|
|
3236
|
+
* smart contract and external rules.
|
|
3237
|
+
*/
|
|
3238
|
+
maxAmountPerInterval?: number | null;
|
|
3239
|
+
/**
|
|
3240
|
+
* URL of the media to be displayed
|
|
3241
|
+
*/
|
|
3242
|
+
mediaUrl?: string | null;
|
|
3243
|
+
/**
|
|
3244
|
+
* Additional metadata for the loyalty rule
|
|
3245
|
+
*/
|
|
3246
|
+
metadata?: RuleUpdateParams.Metadata;
|
|
1893
3247
|
/**
|
|
1894
3248
|
* Blockchain network where the rule will apply
|
|
1895
3249
|
*/
|
|
1896
|
-
network?: '
|
|
3250
|
+
network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
1897
3251
|
/**
|
|
1898
3252
|
* ID for associated OAuth credentials
|
|
1899
3253
|
*/
|
|
@@ -1901,17 +3255,43 @@ export interface RuleUpdateParams {
|
|
|
1901
3255
|
/**
|
|
1902
3256
|
* Type of reward issued by this rule
|
|
1903
3257
|
*/
|
|
1904
|
-
rewardType?: 'points' | 'multiplier';
|
|
3258
|
+
rewardType?: 'points' | 'multiplier' | 'badge';
|
|
3259
|
+
/**
|
|
3260
|
+
* URL of the Shopify store
|
|
3261
|
+
*/
|
|
3262
|
+
shopifyStoreUrl?: string | null;
|
|
1905
3263
|
/**
|
|
1906
|
-
*
|
|
3264
|
+
* Start time for the loyalty rule
|
|
3265
|
+
*/
|
|
3266
|
+
startTime?: string | null;
|
|
3267
|
+
/**
|
|
3268
|
+
* Optional subscription id for the rule
|
|
1907
3269
|
*/
|
|
1908
|
-
|
|
3270
|
+
subscriptionId?: string | null;
|
|
1909
3271
|
}
|
|
1910
3272
|
export declare namespace RuleUpdateParams {
|
|
3273
|
+
interface Collection {
|
|
3274
|
+
/**
|
|
3275
|
+
* Blockchain address of the collection
|
|
3276
|
+
*/
|
|
3277
|
+
address: string;
|
|
3278
|
+
/**
|
|
3279
|
+
* Blockchain network for the collection
|
|
3280
|
+
*/
|
|
3281
|
+
network: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
3282
|
+
/**
|
|
3283
|
+
* Symbol of the collection.
|
|
3284
|
+
*/
|
|
3285
|
+
symbol?: string;
|
|
3286
|
+
}
|
|
1911
3287
|
/**
|
|
1912
3288
|
* Additional metadata for the loyalty rule
|
|
1913
3289
|
*/
|
|
1914
3290
|
interface Metadata {
|
|
3291
|
+
/**
|
|
3292
|
+
* Number of tokens per batch.
|
|
3293
|
+
*/
|
|
3294
|
+
batchSize?: number | null;
|
|
1915
3295
|
/**
|
|
1916
3296
|
* Text displayed on the action button.
|
|
1917
3297
|
*/
|
|
@@ -1936,6 +3316,16 @@ export declare namespace RuleUpdateParams {
|
|
|
1936
3316
|
* Array of collections associated with the rule.
|
|
1937
3317
|
*/
|
|
1938
3318
|
collection?: Array<Metadata.Collection>;
|
|
3319
|
+
/**
|
|
3320
|
+
* Conditions for completing the profile.
|
|
3321
|
+
*/
|
|
3322
|
+
completeProfileConditions?: {
|
|
3323
|
+
[key: string]: boolean;
|
|
3324
|
+
} | null;
|
|
3325
|
+
/**
|
|
3326
|
+
* Description of the external rule condition (only for external rules)
|
|
3327
|
+
*/
|
|
3328
|
+
conditionDescription?: string;
|
|
1939
3329
|
/**
|
|
1940
3330
|
* Object containing details for the call-to-action.
|
|
1941
3331
|
*/
|
|
@@ -1944,6 +3334,10 @@ export declare namespace RuleUpdateParams {
|
|
|
1944
3334
|
* API key for custom rewards integration.
|
|
1945
3335
|
*/
|
|
1946
3336
|
customRewardsApiKey?: string;
|
|
3337
|
+
/**
|
|
3338
|
+
* Flag indicating if the rule should use direct RPC to get the balance of tokens.
|
|
3339
|
+
*/
|
|
3340
|
+
directRpc?: boolean;
|
|
1947
3341
|
/**
|
|
1948
3342
|
* Array of Discord servers, channels, and roles to join.
|
|
1949
3343
|
*/
|
|
@@ -1964,10 +3358,18 @@ export declare namespace RuleUpdateParams {
|
|
|
1964
3358
|
* Flag indicating whether the verified multiplier is enabled.
|
|
1965
3359
|
*/
|
|
1966
3360
|
enableVerifiedMultiplier?: boolean;
|
|
3361
|
+
/**
|
|
3362
|
+
* Fill source of the order for the token sale
|
|
3363
|
+
*/
|
|
3364
|
+
fillSource?: string;
|
|
1967
3365
|
/**
|
|
1968
3366
|
* Percentage reward given to a user for their first referral.
|
|
1969
3367
|
*/
|
|
1970
3368
|
firstReferralReward?: number | null;
|
|
3369
|
+
/**
|
|
3370
|
+
* Flag indicating whether the fill source is included.
|
|
3371
|
+
*/
|
|
3372
|
+
hasFillSource?: boolean;
|
|
1971
3373
|
/**
|
|
1972
3374
|
* Indicates if the item has never been sold.
|
|
1973
3375
|
*/
|
|
@@ -1988,10 +3390,18 @@ export declare namespace RuleUpdateParams {
|
|
|
1988
3390
|
* URL of the image associated with the rule.
|
|
1989
3391
|
*/
|
|
1990
3392
|
imageUrl?: string | null;
|
|
3393
|
+
/**
|
|
3394
|
+
* If enabled, the first transaction done on the platform will complete this rule
|
|
3395
|
+
*/
|
|
3396
|
+
isCheckInOnEveryTxn?: boolean;
|
|
1991
3397
|
/**
|
|
1992
3398
|
* Indicates if the multiplier has been applied to rewards.
|
|
1993
3399
|
*/
|
|
1994
3400
|
isMultiplierApplied?: boolean;
|
|
3401
|
+
/**
|
|
3402
|
+
* Flag indicating if the rule is restricted to new users.
|
|
3403
|
+
*/
|
|
3404
|
+
isRestrictedToNewUsers?: boolean;
|
|
1995
3405
|
/**
|
|
1996
3406
|
* Flag indicating if rewards are applied retroactively.
|
|
1997
3407
|
*/
|
|
@@ -2004,6 +3414,10 @@ export declare namespace RuleUpdateParams {
|
|
|
2004
3414
|
* Optional link associated with the metadata.
|
|
2005
3415
|
*/
|
|
2006
3416
|
link?: string | null;
|
|
3417
|
+
/**
|
|
3418
|
+
* Liquidity pool details.
|
|
3419
|
+
*/
|
|
3420
|
+
liquidity?: Metadata.Liquidity;
|
|
2007
3421
|
/**
|
|
2008
3422
|
* Maximum quantity constraint for token holding.
|
|
2009
3423
|
*/
|
|
@@ -2028,10 +3442,30 @@ export declare namespace RuleUpdateParams {
|
|
|
2028
3442
|
* Flag indicating whether to include only non-listed items.
|
|
2029
3443
|
*/
|
|
2030
3444
|
onlyNonListed?: boolean;
|
|
3445
|
+
/**
|
|
3446
|
+
* Indicates if only existing users are rewarded.
|
|
3447
|
+
*/
|
|
3448
|
+
onlyRewardExistingUser?: boolean;
|
|
3449
|
+
/**
|
|
3450
|
+
* give points for only one token ownership per contract
|
|
3451
|
+
*/
|
|
3452
|
+
onlyRewardSingleTokenOwnership?: boolean | null;
|
|
2031
3453
|
/**
|
|
2032
3454
|
* Promotional code associated with the rule.
|
|
2033
3455
|
*/
|
|
2034
3456
|
promoCode?: string;
|
|
3457
|
+
/**
|
|
3458
|
+
* URL of the CSV file containing promo codes.
|
|
3459
|
+
*/
|
|
3460
|
+
promoCodeCsvUrl?: string;
|
|
3461
|
+
/**
|
|
3462
|
+
* Numbers of the promotional code to be generated.
|
|
3463
|
+
*/
|
|
3464
|
+
promoCodeLength?: number | null;
|
|
3465
|
+
/**
|
|
3466
|
+
* Type of the promotional code.
|
|
3467
|
+
*/
|
|
3468
|
+
promoCodeType?: 'code' | 'csv' | 'generate';
|
|
2035
3469
|
/**
|
|
2036
3470
|
* Array defining ranges and corresponding rewards.
|
|
2037
3471
|
*/
|
|
@@ -2044,10 +3478,43 @@ export declare namespace RuleUpdateParams {
|
|
|
2044
3478
|
* Lump sum reward given to a referrer.
|
|
2045
3479
|
*/
|
|
2046
3480
|
referrerReward?: number | null;
|
|
3481
|
+
/**
|
|
3482
|
+
* Loyalty currency ID of the referrer reward.
|
|
3483
|
+
*/
|
|
3484
|
+
referrerRewardLoyaltyCurrencyId?: string | null;
|
|
3485
|
+
/**
|
|
3486
|
+
* Flag indicating if the post link is required.
|
|
3487
|
+
*/
|
|
3488
|
+
requirePostLink?: boolean | null;
|
|
3489
|
+
/**
|
|
3490
|
+
* Flag indicating if the rule can also reward badges per range.
|
|
3491
|
+
*/
|
|
3492
|
+
rewardBadgePerRange?: boolean;
|
|
3493
|
+
/**
|
|
3494
|
+
* Flag indicating if the reward is rewarded by batch.
|
|
3495
|
+
*/
|
|
3496
|
+
rewardByBatch?: boolean | null;
|
|
3497
|
+
/**
|
|
3498
|
+
* Flag indicating if the reward is rewarded per action.
|
|
3499
|
+
*/
|
|
3500
|
+
rewardPerAction?: boolean | null;
|
|
2047
3501
|
/**
|
|
2048
3502
|
* Flag indicating if rewards are given per impression.
|
|
2049
3503
|
*/
|
|
2050
3504
|
rewardPerImpression?: boolean | null;
|
|
3505
|
+
/**
|
|
3506
|
+
* Flag indicating if the rule should reward based on value of traded tokens
|
|
3507
|
+
* instead of count.
|
|
3508
|
+
*/
|
|
3509
|
+
rewardPerValue?: boolean;
|
|
3510
|
+
/**
|
|
3511
|
+
* Wallet address of the user can only be used if userId is not provided
|
|
3512
|
+
*/
|
|
3513
|
+
royaltyAddress?: string;
|
|
3514
|
+
/**
|
|
3515
|
+
* Royalty percentage of the item.
|
|
3516
|
+
*/
|
|
3517
|
+
royaltyPercentage?: number;
|
|
2051
3518
|
/**
|
|
2052
3519
|
* Currency associated with sales.
|
|
2053
3520
|
*/
|
|
@@ -2056,6 +3523,10 @@ export declare namespace RuleUpdateParams {
|
|
|
2056
3523
|
* Percentage reward given for a second-level referral.
|
|
2057
3524
|
*/
|
|
2058
3525
|
secondReferralReward?: number | null;
|
|
3526
|
+
/**
|
|
3527
|
+
* Flag indicating if the multiplier is skipped.
|
|
3528
|
+
*/
|
|
3529
|
+
skipMultiplier?: boolean | null;
|
|
2059
3530
|
/**
|
|
2060
3531
|
* Object containing details of the associated smart contract.
|
|
2061
3532
|
*/
|
|
@@ -2067,7 +3538,7 @@ export declare namespace RuleUpdateParams {
|
|
|
2067
3538
|
/**
|
|
2068
3539
|
* Social media platform associated with the rule.
|
|
2069
3540
|
*/
|
|
2070
|
-
socialPlatform?: '
|
|
3541
|
+
socialPlatform?: 'Custom' | 'Discord' | 'EpicGames' | 'Instagram' | 'Steam' | 'Telegram' | 'TikTok' | 'Twitch' | 'X(Twitter)' | 'YouTube' | 'Google' | null;
|
|
2071
3542
|
/**
|
|
2072
3543
|
* URL of the social platform's logo.
|
|
2073
3544
|
*/
|
|
@@ -2076,10 +3547,18 @@ export declare namespace RuleUpdateParams {
|
|
|
2076
3547
|
* Name of the social platform.
|
|
2077
3548
|
*/
|
|
2078
3549
|
socialPlatformName?: string | null;
|
|
3550
|
+
/**
|
|
3551
|
+
* ID of the Steam app.
|
|
3552
|
+
*/
|
|
3553
|
+
steamAppId?: string | null;
|
|
2079
3554
|
/**
|
|
2080
3555
|
* Array of streak milestones and corresponding rewards.
|
|
2081
3556
|
*/
|
|
2082
3557
|
streakArray?: Array<Metadata.StreakArray> | null;
|
|
3558
|
+
/**
|
|
3559
|
+
* Metadata for swap loyalty rules
|
|
3560
|
+
*/
|
|
3561
|
+
swap?: Metadata.Swap;
|
|
2083
3562
|
/**
|
|
2084
3563
|
* ID of the Telegram channel.
|
|
2085
3564
|
*/
|
|
@@ -2092,6 +3571,11 @@ export declare namespace RuleUpdateParams {
|
|
|
2092
3571
|
* Flag indicating if all contracts are tracked.
|
|
2093
3572
|
*/
|
|
2094
3573
|
trackAllContracts?: boolean | null;
|
|
3574
|
+
/**
|
|
3575
|
+
* Flag indicating if the progress is tracked. If enabled, the rule can only be
|
|
3576
|
+
* completed once the progress is 100%.
|
|
3577
|
+
*/
|
|
3578
|
+
trackProgress?: boolean | null;
|
|
2095
3579
|
/**
|
|
2096
3580
|
* URL of the associated Twitter account.
|
|
2097
3581
|
*/
|
|
@@ -2127,7 +3611,15 @@ export declare namespace RuleUpdateParams {
|
|
|
2127
3611
|
/**
|
|
2128
3612
|
* Type of wallet associated with the rule.
|
|
2129
3613
|
*/
|
|
2130
|
-
walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
|
|
3614
|
+
walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | 'agw' | null;
|
|
3615
|
+
/**
|
|
3616
|
+
* ID of the Youtube channel.
|
|
3617
|
+
*/
|
|
3618
|
+
youtubeChannelId?: string | null;
|
|
3619
|
+
/**
|
|
3620
|
+
* ID of the Youtube video.
|
|
3621
|
+
*/
|
|
3622
|
+
youtubeVideoId?: string | null;
|
|
2131
3623
|
}
|
|
2132
3624
|
namespace Metadata {
|
|
2133
3625
|
interface Collection {
|
|
@@ -2142,7 +3634,7 @@ export declare namespace RuleUpdateParams {
|
|
|
2142
3634
|
/**
|
|
2143
3635
|
* Blockchain network of the collection.
|
|
2144
3636
|
*/
|
|
2145
|
-
network?: '
|
|
3637
|
+
network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
2146
3638
|
}
|
|
2147
3639
|
/**
|
|
2148
3640
|
* Object containing details for the call-to-action.
|
|
@@ -2181,6 +3673,10 @@ export declare namespace RuleUpdateParams {
|
|
|
2181
3673
|
* Array of emojis used in the channel.
|
|
2182
3674
|
*/
|
|
2183
3675
|
emojis?: Array<Channel.Emoji>;
|
|
3676
|
+
/**
|
|
3677
|
+
* Phrase of text to be present in the discord message
|
|
3678
|
+
*/
|
|
3679
|
+
text?: string;
|
|
2184
3680
|
}
|
|
2185
3681
|
namespace Channel {
|
|
2186
3682
|
interface Emoji {
|
|
@@ -2203,6 +3699,49 @@ export declare namespace RuleUpdateParams {
|
|
|
2203
3699
|
*/
|
|
2204
3700
|
id: string;
|
|
2205
3701
|
}
|
|
3702
|
+
/**
|
|
3703
|
+
* Liquidity pool details.
|
|
3704
|
+
*/
|
|
3705
|
+
interface Liquidity {
|
|
3706
|
+
/**
|
|
3707
|
+
* Calculation type of the liquidity pool.
|
|
3708
|
+
*/
|
|
3709
|
+
calculationType?: 'fixed' | 'custom';
|
|
3710
|
+
/**
|
|
3711
|
+
* Custom function to calculate the the reward amount based on the liquidity
|
|
3712
|
+
* provided per day. X is the reward amount, Y is the liquidity provided per day in
|
|
3713
|
+
* USD.
|
|
3714
|
+
*/
|
|
3715
|
+
customFunction?: string;
|
|
3716
|
+
/**
|
|
3717
|
+
* Liquidity provided per day in USD
|
|
3718
|
+
*/
|
|
3719
|
+
liquidityPerDay?: number;
|
|
3720
|
+
/**
|
|
3721
|
+
* Blockchain network of the liquidity pool.
|
|
3722
|
+
*/
|
|
3723
|
+
network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
3724
|
+
/**
|
|
3725
|
+
* Indicates if only in-range liquidity is rewarded.
|
|
3726
|
+
*/
|
|
3727
|
+
onlyRewardInRangeLiquidity?: boolean;
|
|
3728
|
+
/**
|
|
3729
|
+
* Array of liquidity pools associated with the rule.
|
|
3730
|
+
*/
|
|
3731
|
+
pools?: Array<Liquidity.Pool>;
|
|
3732
|
+
/**
|
|
3733
|
+
* Protocol of the liquidity pool.
|
|
3734
|
+
*/
|
|
3735
|
+
protocol?: string;
|
|
3736
|
+
}
|
|
3737
|
+
namespace Liquidity {
|
|
3738
|
+
interface Pool {
|
|
3739
|
+
/**
|
|
3740
|
+
* Unique identifier of the liquidity pool.
|
|
3741
|
+
*/
|
|
3742
|
+
id: string;
|
|
3743
|
+
}
|
|
3744
|
+
}
|
|
2206
3745
|
interface Range {
|
|
2207
3746
|
/**
|
|
2208
3747
|
* Reward amount for this range.
|
|
@@ -2216,6 +3755,14 @@ export declare namespace RuleUpdateParams {
|
|
|
2216
3755
|
* Start value of the range.
|
|
2217
3756
|
*/
|
|
2218
3757
|
startRange: number;
|
|
3758
|
+
/**
|
|
3759
|
+
* ID of the loyalty badge for this range.
|
|
3760
|
+
*/
|
|
3761
|
+
loyaltyBadgeId?: string;
|
|
3762
|
+
/**
|
|
3763
|
+
* Amount of the loyalty multiplier for this range.
|
|
3764
|
+
*/
|
|
3765
|
+
loyaltyMultiplierAmount?: number;
|
|
2219
3766
|
}
|
|
2220
3767
|
/**
|
|
2221
3768
|
* Object defining referral requirements.
|
|
@@ -2259,18 +3806,14 @@ export declare namespace RuleUpdateParams {
|
|
|
2259
3806
|
* Object containing details of the associated smart contract.
|
|
2260
3807
|
*/
|
|
2261
3808
|
interface SmartContract {
|
|
2262
|
-
/**
|
|
2263
|
-
* ABI of the smart contract.
|
|
2264
|
-
*/
|
|
2265
|
-
abi?: string | null;
|
|
2266
3809
|
/**
|
|
2267
3810
|
* Mapping of addresses for the smart contract.
|
|
2268
3811
|
*/
|
|
2269
3812
|
addressMapping?: string | null;
|
|
2270
3813
|
/**
|
|
2271
|
-
*
|
|
3814
|
+
* Object containing details of the amount multiplier from the event.
|
|
2272
3815
|
*/
|
|
2273
|
-
|
|
3816
|
+
amountMultiplier?: SmartContract.AmountMultiplier | null;
|
|
2274
3817
|
/**
|
|
2275
3818
|
* ID of the smart contract.
|
|
2276
3819
|
*/
|
|
@@ -2279,58 +3822,28 @@ export declare namespace RuleUpdateParams {
|
|
|
2279
3822
|
* Criteria to evaluate the smart contract event.
|
|
2280
3823
|
*/
|
|
2281
3824
|
criteria?: 'everyEvent' | 'byParameter' | null;
|
|
2282
|
-
/**
|
|
2283
|
-
* Time range applied to the rule.
|
|
2284
|
-
*/
|
|
2285
|
-
customRange?: SmartContract.CustomRange | null;
|
|
2286
3825
|
/**
|
|
2287
3826
|
* Event emitted by the smart contract.
|
|
2288
3827
|
*/
|
|
2289
3828
|
event?: string | null;
|
|
2290
|
-
/**
|
|
2291
|
-
* Maximum value allowed for the parameter.
|
|
2292
|
-
*/
|
|
2293
|
-
max?: number | null;
|
|
2294
3829
|
/**
|
|
2295
3830
|
* Array of parameters for the smart contract.
|
|
2296
3831
|
*/
|
|
2297
3832
|
params?: Array<SmartContract.Param> | null;
|
|
2298
3833
|
/**
|
|
2299
|
-
*
|
|
2300
|
-
*/
|
|
2301
|
-
withBonus?: boolean | null;
|
|
2302
|
-
/**
|
|
2303
|
-
* Flag indicating if a custom range is applied.
|
|
2304
|
-
*/
|
|
2305
|
-
withCustomRange?: boolean | null;
|
|
2306
|
-
/**
|
|
2307
|
-
* Flag indicating if a maximum limit is applied.
|
|
3834
|
+
* Type of the smart contract interaction.
|
|
2308
3835
|
*/
|
|
2309
|
-
|
|
3836
|
+
type?: 'function' | 'event' | null;
|
|
2310
3837
|
}
|
|
2311
3838
|
namespace SmartContract {
|
|
2312
|
-
interface Bonus {
|
|
2313
|
-
/**
|
|
2314
|
-
* Amount of the bonus.
|
|
2315
|
-
*/
|
|
2316
|
-
amount?: number | null;
|
|
2317
|
-
/**
|
|
2318
|
-
* Number of times the bonus is applied.
|
|
2319
|
-
*/
|
|
2320
|
-
count?: number | null;
|
|
2321
|
-
}
|
|
2322
3839
|
/**
|
|
2323
|
-
*
|
|
3840
|
+
* Object containing details of the amount multiplier from the event.
|
|
2324
3841
|
*/
|
|
2325
|
-
interface
|
|
2326
|
-
/**
|
|
2327
|
-
* End time of the custom range.
|
|
2328
|
-
*/
|
|
2329
|
-
endsAt?: string | null;
|
|
3842
|
+
interface AmountMultiplier {
|
|
2330
3843
|
/**
|
|
2331
|
-
*
|
|
3844
|
+
* Mapping of the value for the smart contract.
|
|
2332
3845
|
*/
|
|
2333
|
-
|
|
3846
|
+
valueMapping?: string | null;
|
|
2334
3847
|
}
|
|
2335
3848
|
interface Param {
|
|
2336
3849
|
/**
|
|
@@ -2367,27 +3880,60 @@ export declare namespace RuleUpdateParams {
|
|
|
2367
3880
|
*/
|
|
2368
3881
|
streakMilestone: number;
|
|
2369
3882
|
}
|
|
2370
|
-
}
|
|
2371
|
-
interface Collection {
|
|
2372
|
-
/**
|
|
2373
|
-
* Blockchain address of the collection
|
|
2374
|
-
*/
|
|
2375
|
-
address: string;
|
|
2376
3883
|
/**
|
|
2377
|
-
*
|
|
3884
|
+
* Metadata for swap loyalty rules
|
|
2378
3885
|
*/
|
|
2379
|
-
|
|
3886
|
+
interface Swap {
|
|
3887
|
+
provider?: 'any' | 'relay' | 'lifi';
|
|
3888
|
+
relayReferrerId?: string;
|
|
3889
|
+
requireCrossChainSwap?: boolean;
|
|
3890
|
+
swappedToChain?: 'any' | number | string;
|
|
3891
|
+
swappedToTokens?: Array<Swap.SwappedToToken>;
|
|
3892
|
+
tokenMode?: 'any' | 'specific';
|
|
3893
|
+
trackTokenAmount?: boolean;
|
|
3894
|
+
}
|
|
3895
|
+
namespace Swap {
|
|
3896
|
+
interface SwappedToToken {
|
|
3897
|
+
address: string;
|
|
3898
|
+
chainId: string;
|
|
3899
|
+
}
|
|
3900
|
+
}
|
|
2380
3901
|
}
|
|
2381
3902
|
}
|
|
2382
3903
|
export interface RuleListParams {
|
|
3904
|
+
/**
|
|
3905
|
+
* IDs of the users to filter results by
|
|
3906
|
+
*/
|
|
3907
|
+
allotedToUserId?: string | Array<string>;
|
|
3908
|
+
/**
|
|
3909
|
+
* ID of the user group to filter results by
|
|
3910
|
+
*/
|
|
3911
|
+
allotedUserGroupId?: string;
|
|
2383
3912
|
/**
|
|
2384
3913
|
* Address of the collection to filter by
|
|
2385
3914
|
*/
|
|
2386
3915
|
collectionAddress?: string;
|
|
2387
3916
|
/**
|
|
2388
|
-
*
|
|
3917
|
+
* If true this will only return loyalty rule chains
|
|
3918
|
+
*/
|
|
3919
|
+
includeLoyaltyRuleChains?: 'true' | 'false';
|
|
3920
|
+
/**
|
|
3921
|
+
* If true this will only return active rules, the rules for which the startTime is
|
|
3922
|
+
* in the past and the endTime is in the future
|
|
3923
|
+
*/
|
|
3924
|
+
isActive?: 'true' | 'false';
|
|
3925
|
+
/**
|
|
3926
|
+
* Maximum number of records to return (max 100)
|
|
2389
3927
|
*/
|
|
2390
3928
|
limit?: number;
|
|
3929
|
+
/**
|
|
3930
|
+
* ID of the loyalty rule group to filter results
|
|
3931
|
+
*/
|
|
3932
|
+
loyaltyRuleGroupId?: string;
|
|
3933
|
+
/**
|
|
3934
|
+
* The IDs of the loyalty rule
|
|
3935
|
+
*/
|
|
3936
|
+
loyaltyRuleId?: string | Array<string>;
|
|
2391
3937
|
/**
|
|
2392
3938
|
* Unique identifier for the organization to filter by
|
|
2393
3939
|
*/
|
|
@@ -2401,11 +3947,34 @@ export interface RuleListParams {
|
|
|
2401
3947
|
*/
|
|
2402
3948
|
websiteId?: string;
|
|
2403
3949
|
}
|
|
3950
|
+
export interface RuleDeleteParams {
|
|
3951
|
+
/**
|
|
3952
|
+
* Whether to debit loyalty points
|
|
3953
|
+
*/
|
|
3954
|
+
debitLoyaltyPoints?: string;
|
|
3955
|
+
}
|
|
2404
3956
|
export interface RuleCompleteParams {
|
|
2405
3957
|
/**
|
|
2406
|
-
*
|
|
3958
|
+
* Override amount for the reward (rounded to nearest whole number). This will
|
|
3959
|
+
* override the rule amount and reward the integer passed.
|
|
3960
|
+
*/
|
|
3961
|
+
amount?: number | null;
|
|
3962
|
+
/**
|
|
3963
|
+
* Link to the post/comment made by user
|
|
3964
|
+
*/
|
|
3965
|
+
contentUrl?: string;
|
|
3966
|
+
/**
|
|
3967
|
+
* Unique key to ensure idempotent requests.
|
|
3968
|
+
*/
|
|
3969
|
+
idempotencyKey?: string;
|
|
3970
|
+
/**
|
|
3971
|
+
* ID of the choice selected by the user
|
|
3972
|
+
*/
|
|
3973
|
+
loyaltyQuestionChoiceId?: string;
|
|
3974
|
+
/**
|
|
3975
|
+
* Value to compare with the range
|
|
2407
3976
|
*/
|
|
2408
|
-
|
|
3977
|
+
rangeValue?: number | null;
|
|
2409
3978
|
/**
|
|
2410
3979
|
* Unique identifier for the user
|
|
2411
3980
|
*/
|
|
@@ -2414,17 +3983,23 @@ export interface RuleCompleteParams {
|
|
|
2414
3983
|
* Optional verification code for completing the loyalty rule
|
|
2415
3984
|
*/
|
|
2416
3985
|
verificationCode?: string;
|
|
3986
|
+
/**
|
|
3987
|
+
* Flag indicating if only verification is required, this will not create a
|
|
3988
|
+
* transaction and reward the user.
|
|
3989
|
+
*/
|
|
3990
|
+
verifyOnly?: string;
|
|
2417
3991
|
/**
|
|
2418
3992
|
* Wallet address of the user can only be used if userId is not provided
|
|
2419
3993
|
*/
|
|
2420
3994
|
walletAddress?: string;
|
|
2421
3995
|
}
|
|
2422
|
-
export interface
|
|
2423
|
-
organizationId
|
|
2424
|
-
websiteId: string;
|
|
3996
|
+
export interface RuleGetStatusParams {
|
|
3997
|
+
organizationId?: string;
|
|
2425
3998
|
userId?: string;
|
|
3999
|
+
walletAddress?: string;
|
|
4000
|
+
websiteId?: string;
|
|
2426
4001
|
}
|
|
2427
4002
|
export declare namespace Rules {
|
|
2428
|
-
export { type RuleCreateResponse as RuleCreateResponse, type RuleUpdateResponse as RuleUpdateResponse, type RuleListResponse as RuleListResponse, type RuleDeleteResponse as RuleDeleteResponse, type RuleCompleteResponse as RuleCompleteResponse, type
|
|
4003
|
+
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 RuleDeleteParams as RuleDeleteParams, type RuleCompleteParams as RuleCompleteParams, type RuleGetStatusParams as RuleGetStatusParams, };
|
|
2429
4004
|
}
|
|
2430
4005
|
//# sourceMappingURL=rules.d.ts.map
|