@snagsolutions/sdk 0.1.0-alpha.12 → 0.1.0-alpha.121
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 +1056 -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 +876 -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 +26 -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 +112 -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 +183 -0
- package/resources/loyalty/questions.d.ts.map +1 -0
- package/resources/loyalty/questions.js +60 -0
- package/resources/loyalty/questions.js.map +1 -0
- package/resources/loyalty/questions.mjs +56 -0
- package/resources/loyalty/questions.mjs.map +1 -0
- package/resources/loyalty/rule-edits.d.ts +2521 -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 +747 -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 +1775 -282
- 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 +111 -8
- 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 +1055 -83
- package/src/resources/loyalty/currencies.ts +26 -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 +161 -0
- package/src/resources/loyalty/questions.ts +241 -0
- package/src/resources/loyalty/rule-edits.ts +3542 -63
- package/src/resources/loyalty/rule-groups.ts +1162 -0
- package/src/resources/loyalty/rules.ts +2957 -574
- 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 +673 -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 +163 -7
- 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
|
@@ -0,0 +1,1162 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import { isRequestOptions } from '../../core';
|
|
5
|
+
import * as Core from '../../core';
|
|
6
|
+
|
|
7
|
+
export class RuleGroups extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create a new loyalty rule groups
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response =
|
|
14
|
+
* await client.loyalty.ruleGroups.createRuleGroup({
|
|
15
|
+
* name: 'name',
|
|
16
|
+
* organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
17
|
+
* websiteId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
createRuleGroup(
|
|
22
|
+
body: RuleGroupCreateRuleGroupParams,
|
|
23
|
+
options?: Core.RequestOptions,
|
|
24
|
+
): Core.APIPromise<RuleGroupCreateRuleGroupResponse> {
|
|
25
|
+
return this._client.post('/api/loyalty/rule_groups/create', { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Delete loyalty rule group by ID
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const response =
|
|
34
|
+
* await client.loyalty.ruleGroups.deleteRuleGroup(
|
|
35
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
36
|
+
* );
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
deleteRuleGroup(id: string, options?: Core.RequestOptions): Core.APIPromise<unknown> {
|
|
40
|
+
return this._client.delete(`/api/loyalty/rule_groups/${id}`, options);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Retrieve configured loyalty rule groups
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const response =
|
|
49
|
+
* await client.loyalty.ruleGroups.getRuleGroups();
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
getRuleGroups(
|
|
53
|
+
query?: RuleGroupGetRuleGroupsParams,
|
|
54
|
+
options?: Core.RequestOptions,
|
|
55
|
+
): Core.APIPromise<RuleGroupGetRuleGroupsResponse>;
|
|
56
|
+
getRuleGroups(options?: Core.RequestOptions): Core.APIPromise<RuleGroupGetRuleGroupsResponse>;
|
|
57
|
+
getRuleGroups(
|
|
58
|
+
query: RuleGroupGetRuleGroupsParams | Core.RequestOptions = {},
|
|
59
|
+
options?: Core.RequestOptions,
|
|
60
|
+
): Core.APIPromise<RuleGroupGetRuleGroupsResponse> {
|
|
61
|
+
if (isRequestOptions(query)) {
|
|
62
|
+
return this.getRuleGroups({}, query);
|
|
63
|
+
}
|
|
64
|
+
return this._client.get('/api/loyalty/rule_groups', { query, ...options });
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Update loyalty rule group by ID
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const response =
|
|
73
|
+
* await client.loyalty.ruleGroups.updateRuleGroup(
|
|
74
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
75
|
+
* );
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
updateRuleGroup(
|
|
79
|
+
id: string,
|
|
80
|
+
body?: RuleGroupUpdateRuleGroupParams,
|
|
81
|
+
options?: Core.RequestOptions,
|
|
82
|
+
): Core.APIPromise<RuleGroupUpdateRuleGroupResponse>;
|
|
83
|
+
updateRuleGroup(
|
|
84
|
+
id: string,
|
|
85
|
+
options?: Core.RequestOptions,
|
|
86
|
+
): Core.APIPromise<RuleGroupUpdateRuleGroupResponse>;
|
|
87
|
+
updateRuleGroup(
|
|
88
|
+
id: string,
|
|
89
|
+
body: RuleGroupUpdateRuleGroupParams | Core.RequestOptions = {},
|
|
90
|
+
options?: Core.RequestOptions,
|
|
91
|
+
): Core.APIPromise<RuleGroupUpdateRuleGroupResponse> {
|
|
92
|
+
if (isRequestOptions(body)) {
|
|
93
|
+
return this.updateRuleGroup(id, {}, body);
|
|
94
|
+
}
|
|
95
|
+
return this._client.post(`/api/loyalty/rule_groups/${id}`, { body, ...options });
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface RuleGroupCreateRuleGroupResponse {
|
|
100
|
+
id: string;
|
|
101
|
+
|
|
102
|
+
createdAt: string;
|
|
103
|
+
|
|
104
|
+
isCollapsible: boolean;
|
|
105
|
+
|
|
106
|
+
isRequired: boolean;
|
|
107
|
+
|
|
108
|
+
name: string;
|
|
109
|
+
|
|
110
|
+
organizationId: string;
|
|
111
|
+
|
|
112
|
+
sortId: number;
|
|
113
|
+
|
|
114
|
+
subTitle: string | null;
|
|
115
|
+
|
|
116
|
+
updatedAt: string;
|
|
117
|
+
|
|
118
|
+
websiteId: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export type RuleGroupDeleteRuleGroupResponse = unknown;
|
|
122
|
+
|
|
123
|
+
export interface RuleGroupGetRuleGroupsResponse {
|
|
124
|
+
data: Array<RuleGroupGetRuleGroupsResponse.Data>;
|
|
125
|
+
|
|
126
|
+
hasNextPage: boolean;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export namespace RuleGroupGetRuleGroupsResponse {
|
|
130
|
+
/**
|
|
131
|
+
* Schema for a get loyalty rule groups response
|
|
132
|
+
*/
|
|
133
|
+
export interface Data {
|
|
134
|
+
id: string;
|
|
135
|
+
|
|
136
|
+
isCollapsible: boolean;
|
|
137
|
+
|
|
138
|
+
isRequired: boolean;
|
|
139
|
+
|
|
140
|
+
loyaltyGroupItems: Array<Data.LoyaltyGroupItem>;
|
|
141
|
+
|
|
142
|
+
name: string;
|
|
143
|
+
|
|
144
|
+
sortId: number;
|
|
145
|
+
|
|
146
|
+
subTitle: string | null;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export namespace Data {
|
|
150
|
+
export interface LoyaltyGroupItem {
|
|
151
|
+
id: string;
|
|
152
|
+
|
|
153
|
+
loyaltyRule: LoyaltyGroupItem.LoyaltyRule;
|
|
154
|
+
|
|
155
|
+
sortId: number;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export namespace LoyaltyGroupItem {
|
|
159
|
+
export interface LoyaltyRule {
|
|
160
|
+
id: string;
|
|
161
|
+
|
|
162
|
+
amount: number | null;
|
|
163
|
+
|
|
164
|
+
deletedAt: string | null;
|
|
165
|
+
|
|
166
|
+
description: string | null;
|
|
167
|
+
|
|
168
|
+
endTime: string | null;
|
|
169
|
+
|
|
170
|
+
frequency: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately' | null;
|
|
171
|
+
|
|
172
|
+
hideInUi: boolean;
|
|
173
|
+
|
|
174
|
+
isRequired: boolean;
|
|
175
|
+
|
|
176
|
+
loyaltyBadge: LoyaltyRule.LoyaltyBadge;
|
|
177
|
+
|
|
178
|
+
loyaltyCurrencyId: string;
|
|
179
|
+
|
|
180
|
+
mediaUrl: string | null;
|
|
181
|
+
|
|
182
|
+
metadata: LoyaltyRule.Metadata;
|
|
183
|
+
|
|
184
|
+
name: string;
|
|
185
|
+
|
|
186
|
+
rewardType: 'points' | 'multiplier' | 'badge';
|
|
187
|
+
|
|
188
|
+
startTime: string | null;
|
|
189
|
+
|
|
190
|
+
type:
|
|
191
|
+
| 'Bonus'
|
|
192
|
+
| 'BoughtOn'
|
|
193
|
+
| 'BoughtWithRoyalties'
|
|
194
|
+
| 'DiscordMessages'
|
|
195
|
+
| 'Listing'
|
|
196
|
+
| 'Lodging'
|
|
197
|
+
| 'MintOn'
|
|
198
|
+
| 'PoapClaim'
|
|
199
|
+
| 'SnagSocialsConnected'
|
|
200
|
+
| 'SnapshotFullset'
|
|
201
|
+
| 'SnapshotHold'
|
|
202
|
+
| 'SoldOn'
|
|
203
|
+
| 'SoldWithRoyalties'
|
|
204
|
+
| 'TokenHold'
|
|
205
|
+
| 'TwitterBio'
|
|
206
|
+
| 'TwitterHashTagPost'
|
|
207
|
+
| 'Retweet'
|
|
208
|
+
| 'check_in'
|
|
209
|
+
| 'code_entry'
|
|
210
|
+
| 'connect_wallet'
|
|
211
|
+
| 'connected_discord'
|
|
212
|
+
| 'connected_email'
|
|
213
|
+
| 'connected_epic'
|
|
214
|
+
| 'connected_steam'
|
|
215
|
+
| 'connected_telegram'
|
|
216
|
+
| 'connected_twitter'
|
|
217
|
+
| 'create_partner_account'
|
|
218
|
+
| 'discord_member'
|
|
219
|
+
| 'drip_x_follow'
|
|
220
|
+
| 'drip_x_new_tweet'
|
|
221
|
+
| 'drip_x_text_in_bio'
|
|
222
|
+
| 'drip_x_text_in_comment'
|
|
223
|
+
| 'drip_x_text_in_name'
|
|
224
|
+
| 'drip_x_tweet'
|
|
225
|
+
| 'external_rule'
|
|
226
|
+
| 'link_click'
|
|
227
|
+
| 'manual_upload'
|
|
228
|
+
| 'profile_completed'
|
|
229
|
+
| 'referred_user'
|
|
230
|
+
| 'smart_contract_event'
|
|
231
|
+
| 'snapshot_governance'
|
|
232
|
+
| 'telegram_join'
|
|
233
|
+
| 'telegram_messages'
|
|
234
|
+
| 'text_input'
|
|
235
|
+
| 'token_hold_erc20'
|
|
236
|
+
| 'tweet_liked_by_project'
|
|
237
|
+
| 'twitter_comment'
|
|
238
|
+
| 'twitter_follow'
|
|
239
|
+
| 'twitter_followers'
|
|
240
|
+
| 'twitter_like'
|
|
241
|
+
| 'twitter_post_hashtag'
|
|
242
|
+
| 'quiz'
|
|
243
|
+
| 'poll'
|
|
244
|
+
| 'steam_wishlist'
|
|
245
|
+
| 'liquidity_uniswap_v2'
|
|
246
|
+
| 'liquidity_uniswap_v3'
|
|
247
|
+
| 'points_airdrop'
|
|
248
|
+
| 'youtube_subscribers'
|
|
249
|
+
| 'youtube_comment'
|
|
250
|
+
| 'shopify_spend'
|
|
251
|
+
| 'swap'
|
|
252
|
+
| 'tiktok_post'
|
|
253
|
+
| 'post_impressions';
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export namespace LoyaltyRule {
|
|
257
|
+
export interface LoyaltyBadge {
|
|
258
|
+
id: string;
|
|
259
|
+
|
|
260
|
+
description: string | null;
|
|
261
|
+
|
|
262
|
+
imageUrl: string | null;
|
|
263
|
+
|
|
264
|
+
name: string;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export interface Metadata {
|
|
268
|
+
/**
|
|
269
|
+
* Number of tokens per batch.
|
|
270
|
+
*/
|
|
271
|
+
batchSize?: number | null;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Text displayed on the action button.
|
|
275
|
+
*/
|
|
276
|
+
buttonText?: string | null;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Flag indicating if commenting is required.
|
|
280
|
+
*/
|
|
281
|
+
checkComment?: boolean | null;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Flag indicating if liking the post is required.
|
|
285
|
+
*/
|
|
286
|
+
checkLike?: boolean | null;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Flag indicating if reposting is required.
|
|
290
|
+
*/
|
|
291
|
+
checkRepost?: boolean | null;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Text to check in the Twitter post, username, or bio.
|
|
295
|
+
*/
|
|
296
|
+
checkText?: string | null;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Array of collections associated with the rule.
|
|
300
|
+
*/
|
|
301
|
+
collection?: Array<Metadata.Collection>;
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Conditions for completing the profile.
|
|
305
|
+
*/
|
|
306
|
+
completeProfileConditions?: { [key: string]: boolean } | null;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Object containing details for the call-to-action.
|
|
310
|
+
*/
|
|
311
|
+
cta?: Metadata.Cta | null;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* API key for custom rewards integration.
|
|
315
|
+
*/
|
|
316
|
+
customRewardsApiKey?: string;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Flag indicating if the rule should use direct RPC to get the balance of tokens.
|
|
320
|
+
*/
|
|
321
|
+
directRpc?: boolean;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Array of Discord servers, channels, and roles to join.
|
|
325
|
+
*/
|
|
326
|
+
discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Array of drip quests required to complete the rule.
|
|
330
|
+
*/
|
|
331
|
+
dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Flag indicating whether joining Discord servers is required.
|
|
335
|
+
*/
|
|
336
|
+
enableJoinDiscordServers?: boolean | null;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Flag indicating whether streaks are enabled.
|
|
340
|
+
*/
|
|
341
|
+
enableStreaks?: boolean | null;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Flag indicating whether the verified multiplier is enabled.
|
|
345
|
+
*/
|
|
346
|
+
enableVerifiedMultiplier?: boolean;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Fill source of the order for the token sale
|
|
350
|
+
*/
|
|
351
|
+
fillSource?: string;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Percentage reward given to a user for their first referral.
|
|
355
|
+
*/
|
|
356
|
+
firstReferralReward?: number | null;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Flag indicating whether the fill source is included.
|
|
360
|
+
*/
|
|
361
|
+
hasFillSource?: boolean;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Indicates if the item has never been sold.
|
|
365
|
+
*/
|
|
366
|
+
hasNeverSold?: boolean;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Indicates if the full royalty has been paid for items.
|
|
370
|
+
*/
|
|
371
|
+
hasPaidFullRoyalty?: boolean;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Flag indicating if the sale currency is included.
|
|
375
|
+
*/
|
|
376
|
+
hasSaleCurrency?: boolean;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Indicates if the user has a verified Twitter account.
|
|
380
|
+
*/
|
|
381
|
+
hasVerifiedTwitter?: boolean;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* URL of the image associated with the rule.
|
|
385
|
+
*/
|
|
386
|
+
imageUrl?: string | null;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* If enabled, the first transaction done on the platform will complete this rule
|
|
390
|
+
*/
|
|
391
|
+
isCheckInOnEveryTxn?: boolean;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Indicates if the multiplier has been applied to rewards.
|
|
395
|
+
*/
|
|
396
|
+
isMultiplierApplied?: boolean;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Flag indicating if the rule is restricted to new users.
|
|
400
|
+
*/
|
|
401
|
+
isRestrictedToNewUsers?: boolean;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Flag indicating if rewards are applied retroactively.
|
|
405
|
+
*/
|
|
406
|
+
isRetroactive?: boolean | null;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Flag indicating if the token hold multiplier is applied.
|
|
410
|
+
*/
|
|
411
|
+
isTokenHoldMultiplier?: boolean;
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Optional link associated with the metadata.
|
|
415
|
+
*/
|
|
416
|
+
link?: string | null;
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Liquidity pool details.
|
|
420
|
+
*/
|
|
421
|
+
liquidity?: Metadata.Liquidity;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Maximum quantity constraint for token holding.
|
|
425
|
+
*/
|
|
426
|
+
maxQty?: number | null;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Minimum quantity constraint for token holding.
|
|
430
|
+
*/
|
|
431
|
+
minQty?: number | null;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Array of loyalty currency IDs used for multipliers.
|
|
435
|
+
*/
|
|
436
|
+
multiplierLoyaltyCurrencyIds?: Array<string> | null;
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Flag indicating whether to include only known users.
|
|
440
|
+
*/
|
|
441
|
+
onlyKnownUsers?: boolean;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Flag indicating whether to include only native tokens.
|
|
445
|
+
*/
|
|
446
|
+
onlyNative?: boolean;
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Flag indicating whether to include only non-listed items.
|
|
450
|
+
*/
|
|
451
|
+
onlyNonListed?: boolean;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Indicates if only existing users are rewarded.
|
|
455
|
+
*/
|
|
456
|
+
onlyRewardExistingUser?: boolean;
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* give points for only one token ownership per contract
|
|
460
|
+
*/
|
|
461
|
+
onlyRewardSingleTokenOwnership?: boolean | null;
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Promotional code associated with the rule.
|
|
465
|
+
*/
|
|
466
|
+
promoCode?: string;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* URL of the CSV file containing promo codes.
|
|
470
|
+
*/
|
|
471
|
+
promoCodeCsvUrl?: string;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Numbers of the promotional code to be generated.
|
|
475
|
+
*/
|
|
476
|
+
promoCodeLength?: number | null;
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Type of the promotional code.
|
|
480
|
+
*/
|
|
481
|
+
promoCodeType?: 'code' | 'csv' | 'generate';
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Array defining ranges and corresponding rewards.
|
|
485
|
+
*/
|
|
486
|
+
range?: Array<Metadata.Range>;
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Object defining referral requirements.
|
|
490
|
+
*/
|
|
491
|
+
referralRequirements?: Metadata.ReferralRequirements | null;
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Lump sum reward given to a referrer.
|
|
495
|
+
*/
|
|
496
|
+
referrerReward?: number | null;
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* Loyalty currency ID of the referrer reward.
|
|
500
|
+
*/
|
|
501
|
+
referrerRewardLoyaltyCurrencyId?: string | null;
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Flag indicating if the post link is required.
|
|
505
|
+
*/
|
|
506
|
+
requirePostLink?: boolean | null;
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Flag indicating if the rule can also reward badges per range.
|
|
510
|
+
*/
|
|
511
|
+
rewardBadgePerRange?: boolean;
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Flag indicating if the reward is rewarded by batch.
|
|
515
|
+
*/
|
|
516
|
+
rewardByBatch?: boolean | null;
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* Flag indicating if rewards are given per impression.
|
|
520
|
+
*/
|
|
521
|
+
rewardPerImpression?: boolean | null;
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Flag indicating if the rule should reward based on value of traded tokens
|
|
525
|
+
* instead of count.
|
|
526
|
+
*/
|
|
527
|
+
rewardPerValue?: boolean;
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Currency associated with sales.
|
|
531
|
+
*/
|
|
532
|
+
saleCurrency?: string;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Percentage reward given for a second-level referral.
|
|
536
|
+
*/
|
|
537
|
+
secondReferralReward?: number | null;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Flag indicating if the multiplier is skipped.
|
|
541
|
+
*/
|
|
542
|
+
skipMultiplier?: boolean | null;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Object containing details of the associated smart contract.
|
|
546
|
+
*/
|
|
547
|
+
smartContract?: Metadata.SmartContract;
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Array of snapshot proposals for the rule.
|
|
551
|
+
*/
|
|
552
|
+
snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Social media platform associated with the rule.
|
|
556
|
+
*/
|
|
557
|
+
socialPlatform?:
|
|
558
|
+
| 'Custom'
|
|
559
|
+
| 'Discord'
|
|
560
|
+
| 'EpicGames'
|
|
561
|
+
| 'Instagram'
|
|
562
|
+
| 'Steam'
|
|
563
|
+
| 'Telegram'
|
|
564
|
+
| 'TikTok'
|
|
565
|
+
| 'Twitch'
|
|
566
|
+
| 'X(Twitter)'
|
|
567
|
+
| 'YouTube'
|
|
568
|
+
| 'Google'
|
|
569
|
+
| null;
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* URL of the social platform's logo.
|
|
573
|
+
*/
|
|
574
|
+
socialPlatformLogo?: string | null;
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Name of the social platform.
|
|
578
|
+
*/
|
|
579
|
+
socialPlatformName?: string | null;
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* ID of the Steam app.
|
|
583
|
+
*/
|
|
584
|
+
steamAppId?: string | null;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Array of streak milestones and corresponding rewards.
|
|
588
|
+
*/
|
|
589
|
+
streakArray?: Array<Metadata.StreakArray> | null;
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Metadata for swap loyalty rules
|
|
593
|
+
*/
|
|
594
|
+
swap?: Metadata.Swap;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* ID of the Telegram channel.
|
|
598
|
+
*/
|
|
599
|
+
telegramChannelId?: string | null;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Time delay in seconds to verify actions.
|
|
603
|
+
*/
|
|
604
|
+
timeDelayToVerifySeconds?: string | number | null;
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Flag indicating if all contracts are tracked.
|
|
608
|
+
*/
|
|
609
|
+
trackAllContracts?: boolean | null;
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Flag indicating if the progress is tracked. If enabled, the rule can only be
|
|
613
|
+
* completed once the progress is 100%.
|
|
614
|
+
*/
|
|
615
|
+
trackProgress?: boolean | null;
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* URL of the associated Twitter account.
|
|
619
|
+
*/
|
|
620
|
+
twitterAccountUrl?: string;
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Hashtag associated with the Twitter post.
|
|
624
|
+
*/
|
|
625
|
+
twitterHashtag?: string;
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* URL of the associated Twitter post.
|
|
629
|
+
*/
|
|
630
|
+
twitterPostUrl?: string;
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* Unique identifier of the Twitter user.
|
|
634
|
+
*/
|
|
635
|
+
twitterUserId?: string;
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Twitter username of the user.
|
|
639
|
+
*/
|
|
640
|
+
twitterUsername?: string;
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* Minimum length of the verification text.
|
|
644
|
+
*/
|
|
645
|
+
verificationTextMinimumLength?: number | null;
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* Multiplier applied to rewards for verified users.
|
|
649
|
+
*/
|
|
650
|
+
verifiedMultiplier?: number | null;
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* Placeholder text for verification input fields.
|
|
654
|
+
*/
|
|
655
|
+
verifyPlaceHolderText?: string | null;
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Type of wallet associated with the rule.
|
|
659
|
+
*/
|
|
660
|
+
walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* ID of the Youtube channel.
|
|
664
|
+
*/
|
|
665
|
+
youtubeChannelId?: string | null;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* ID of the Youtube video.
|
|
669
|
+
*/
|
|
670
|
+
youtubeVideoId?: string | null;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
export namespace Metadata {
|
|
674
|
+
export interface Collection {
|
|
675
|
+
/**
|
|
676
|
+
* Blockchain address of the collection.
|
|
677
|
+
*/
|
|
678
|
+
address?: string;
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Multiplier applied to the rewards for this collection.
|
|
682
|
+
*/
|
|
683
|
+
multiplier?: number;
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Blockchain network of the collection.
|
|
687
|
+
*/
|
|
688
|
+
network?:
|
|
689
|
+
| 'abstract'
|
|
690
|
+
| 'abstractTestnet'
|
|
691
|
+
| 'apechain'
|
|
692
|
+
| 'arbitrum'
|
|
693
|
+
| 'avalanche'
|
|
694
|
+
| 'avalancheFuji'
|
|
695
|
+
| 'base'
|
|
696
|
+
| 'baseSepolia'
|
|
697
|
+
| 'berachain'
|
|
698
|
+
| 'berachainArtio'
|
|
699
|
+
| 'berachainBepolia'
|
|
700
|
+
| 'binance'
|
|
701
|
+
| 'bscTestnet'
|
|
702
|
+
| 'campTestnet'
|
|
703
|
+
| 'fantom'
|
|
704
|
+
| 'fantomTestnet'
|
|
705
|
+
| 'flowMainnet'
|
|
706
|
+
| 'mainnet'
|
|
707
|
+
| 'optimism'
|
|
708
|
+
| 'polygon'
|
|
709
|
+
| 'polygon_mumbai'
|
|
710
|
+
| 'skaleNebula'
|
|
711
|
+
| 'solana'
|
|
712
|
+
| 'sophon'
|
|
713
|
+
| 'sophonTestnet'
|
|
714
|
+
| 'sui'
|
|
715
|
+
| 'superseed'
|
|
716
|
+
| 'superseedSepolia'
|
|
717
|
+
| 'vanar'
|
|
718
|
+
| 'xai'
|
|
719
|
+
| 'zksync'
|
|
720
|
+
| 'coti'
|
|
721
|
+
| 'cotiTestnet'
|
|
722
|
+
| 'morph'
|
|
723
|
+
| 'morphTestnet'
|
|
724
|
+
| 'morphHolesky'
|
|
725
|
+
| 'ultra'
|
|
726
|
+
| 'ultraTestnet'
|
|
727
|
+
| 'nitrograph'
|
|
728
|
+
| 'sepolia'
|
|
729
|
+
| 'optimism_sepolia'
|
|
730
|
+
| 'arbitrumSepolia'
|
|
731
|
+
| 'goerli'
|
|
732
|
+
| 'optimism_goerli'
|
|
733
|
+
| 'arbitrumGoerli'
|
|
734
|
+
| 'basecamp';
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Object containing details for the call-to-action.
|
|
739
|
+
*/
|
|
740
|
+
export interface Cta {
|
|
741
|
+
/**
|
|
742
|
+
* Link for the call-to-action.
|
|
743
|
+
*/
|
|
744
|
+
href?: string | null;
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* Label for the call-to-action.
|
|
748
|
+
*/
|
|
749
|
+
label?: string | null;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
export interface DiscordServersToJoin {
|
|
753
|
+
/**
|
|
754
|
+
* ID of the Discord server to join.
|
|
755
|
+
*/
|
|
756
|
+
id?: string;
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* Array of Discord channels to join.
|
|
760
|
+
*/
|
|
761
|
+
channels?: Array<DiscordServersToJoin.Channel>;
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* Array of roles to assign in the Discord server.
|
|
765
|
+
*/
|
|
766
|
+
roles?: Array<DiscordServersToJoin.Role>;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
export namespace DiscordServersToJoin {
|
|
770
|
+
export interface Channel {
|
|
771
|
+
/**
|
|
772
|
+
* ID of the Discord channel.
|
|
773
|
+
*/
|
|
774
|
+
id?: string;
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* Array of emojis used in the channel.
|
|
778
|
+
*/
|
|
779
|
+
emojis?: Array<Channel.Emoji>;
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* Phrase of text to be present in the discord message
|
|
783
|
+
*/
|
|
784
|
+
text?: string;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
export namespace Channel {
|
|
788
|
+
export interface Emoji {
|
|
789
|
+
/**
|
|
790
|
+
* ID of the emoji used in the channel.
|
|
791
|
+
*/
|
|
792
|
+
id?: string;
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
export interface Role {
|
|
797
|
+
/**
|
|
798
|
+
* ID of the role in the Discord server.
|
|
799
|
+
*/
|
|
800
|
+
id: string;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
export interface DripQuestsToComplete {
|
|
805
|
+
/**
|
|
806
|
+
* ID of the drip quest to complete.
|
|
807
|
+
*/
|
|
808
|
+
id: string;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* Liquidity pool details.
|
|
813
|
+
*/
|
|
814
|
+
export interface Liquidity {
|
|
815
|
+
/**
|
|
816
|
+
* Calculation type of the liquidity pool.
|
|
817
|
+
*/
|
|
818
|
+
calculationType?: 'fixed' | 'custom';
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* Custom function to calculate the the reward amount based on the liquidity
|
|
822
|
+
* provided per day. X is the reward amount, Y is the liquidity provided per day in
|
|
823
|
+
* USD.
|
|
824
|
+
*/
|
|
825
|
+
customFunction?: string;
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* Liquidity provided per day in USD
|
|
829
|
+
*/
|
|
830
|
+
liquidityPerDay?: number;
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* Blockchain network of the liquidity pool.
|
|
834
|
+
*/
|
|
835
|
+
network?:
|
|
836
|
+
| 'abstract'
|
|
837
|
+
| 'abstractTestnet'
|
|
838
|
+
| 'apechain'
|
|
839
|
+
| 'arbitrum'
|
|
840
|
+
| 'avalanche'
|
|
841
|
+
| 'avalancheFuji'
|
|
842
|
+
| 'base'
|
|
843
|
+
| 'baseSepolia'
|
|
844
|
+
| 'berachain'
|
|
845
|
+
| 'berachainArtio'
|
|
846
|
+
| 'berachainBepolia'
|
|
847
|
+
| 'binance'
|
|
848
|
+
| 'bscTestnet'
|
|
849
|
+
| 'campTestnet'
|
|
850
|
+
| 'fantom'
|
|
851
|
+
| 'fantomTestnet'
|
|
852
|
+
| 'flowMainnet'
|
|
853
|
+
| 'mainnet'
|
|
854
|
+
| 'optimism'
|
|
855
|
+
| 'polygon'
|
|
856
|
+
| 'polygon_mumbai'
|
|
857
|
+
| 'skaleNebula'
|
|
858
|
+
| 'solana'
|
|
859
|
+
| 'sophon'
|
|
860
|
+
| 'sophonTestnet'
|
|
861
|
+
| 'sui'
|
|
862
|
+
| 'superseed'
|
|
863
|
+
| 'superseedSepolia'
|
|
864
|
+
| 'vanar'
|
|
865
|
+
| 'xai'
|
|
866
|
+
| 'zksync'
|
|
867
|
+
| 'coti'
|
|
868
|
+
| 'cotiTestnet'
|
|
869
|
+
| 'morph'
|
|
870
|
+
| 'morphTestnet'
|
|
871
|
+
| 'morphHolesky'
|
|
872
|
+
| 'ultra'
|
|
873
|
+
| 'ultraTestnet'
|
|
874
|
+
| 'nitrograph'
|
|
875
|
+
| 'sepolia'
|
|
876
|
+
| 'optimism_sepolia'
|
|
877
|
+
| 'arbitrumSepolia'
|
|
878
|
+
| 'goerli'
|
|
879
|
+
| 'optimism_goerli'
|
|
880
|
+
| 'arbitrumGoerli'
|
|
881
|
+
| 'basecamp';
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* Indicates if only in-range liquidity is rewarded.
|
|
885
|
+
*/
|
|
886
|
+
onlyRewardInRangeLiquidity?: boolean;
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* Array of liquidity pools associated with the rule.
|
|
890
|
+
*/
|
|
891
|
+
pools?: Array<Liquidity.Pool>;
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* Protocol of the liquidity pool.
|
|
895
|
+
*/
|
|
896
|
+
protocol?: string;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
export namespace Liquidity {
|
|
900
|
+
export interface Pool {
|
|
901
|
+
/**
|
|
902
|
+
* Unique identifier of the liquidity pool.
|
|
903
|
+
*/
|
|
904
|
+
id: string;
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
export interface Range {
|
|
909
|
+
/**
|
|
910
|
+
* Reward amount for this range.
|
|
911
|
+
*/
|
|
912
|
+
amount: number;
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* End value of the range.
|
|
916
|
+
*/
|
|
917
|
+
endRange: number;
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* Start value of the range.
|
|
921
|
+
*/
|
|
922
|
+
startRange: number;
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* ID of the loyalty badge for this range.
|
|
926
|
+
*/
|
|
927
|
+
loyaltyBadgeId?: string;
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* Amount of the loyalty multiplier for this range.
|
|
931
|
+
*/
|
|
932
|
+
loyaltyMultiplierAmount?: number;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* Object defining referral requirements.
|
|
937
|
+
*/
|
|
938
|
+
export interface ReferralRequirements {
|
|
939
|
+
/**
|
|
940
|
+
* Flag indicating if achieving points is required.
|
|
941
|
+
*/
|
|
942
|
+
achievePoints?: boolean | null;
|
|
943
|
+
|
|
944
|
+
/**
|
|
945
|
+
* Flag indicating if completing the profile is required.
|
|
946
|
+
*/
|
|
947
|
+
completeProfile?: boolean | null;
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* Flag indicating if connecting Discord is required.
|
|
951
|
+
*/
|
|
952
|
+
connectDiscord?: boolean | null;
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Flag indicating if connecting email is required.
|
|
956
|
+
*/
|
|
957
|
+
connectEmail?: boolean | null;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Flag indicating if connecting Twitter is required.
|
|
961
|
+
*/
|
|
962
|
+
connectTwitter?: boolean | null;
|
|
963
|
+
|
|
964
|
+
points?: ReferralRequirements.Points | null;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
export namespace ReferralRequirements {
|
|
968
|
+
export interface Points {
|
|
969
|
+
/**
|
|
970
|
+
* Points required for referral.
|
|
971
|
+
*/
|
|
972
|
+
amount?: number | null;
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* ID of the loyalty currency for referral.
|
|
976
|
+
*/
|
|
977
|
+
loyaltyCurrecyId?: string | null;
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* Object containing details of the associated smart contract.
|
|
983
|
+
*/
|
|
984
|
+
export interface SmartContract {
|
|
985
|
+
/**
|
|
986
|
+
* Mapping of addresses for the smart contract.
|
|
987
|
+
*/
|
|
988
|
+
addressMapping?: string | null;
|
|
989
|
+
|
|
990
|
+
/**
|
|
991
|
+
* Object containing details of the amount multiplier from the event.
|
|
992
|
+
*/
|
|
993
|
+
amountMultiplier?: SmartContract.AmountMultiplier | null;
|
|
994
|
+
|
|
995
|
+
/**
|
|
996
|
+
* ID of the smart contract.
|
|
997
|
+
*/
|
|
998
|
+
contractId?: string | null;
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* Criteria to evaluate the smart contract event.
|
|
1002
|
+
*/
|
|
1003
|
+
criteria?: 'everyEvent' | 'byParameter' | null;
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* Event emitted by the smart contract.
|
|
1007
|
+
*/
|
|
1008
|
+
event?: string | null;
|
|
1009
|
+
|
|
1010
|
+
/**
|
|
1011
|
+
* Array of parameters for the smart contract.
|
|
1012
|
+
*/
|
|
1013
|
+
params?: Array<SmartContract.Param> | null;
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* Type of the smart contract interaction.
|
|
1017
|
+
*/
|
|
1018
|
+
type?: 'function' | 'event' | null;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
export namespace SmartContract {
|
|
1022
|
+
/**
|
|
1023
|
+
* Object containing details of the amount multiplier from the event.
|
|
1024
|
+
*/
|
|
1025
|
+
export interface AmountMultiplier {
|
|
1026
|
+
/**
|
|
1027
|
+
* Mapping of the value for the smart contract.
|
|
1028
|
+
*/
|
|
1029
|
+
valueMapping?: string | null;
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
export interface Param {
|
|
1033
|
+
/**
|
|
1034
|
+
* Condition to check for the parameter.
|
|
1035
|
+
*/
|
|
1036
|
+
condition?: string | null;
|
|
1037
|
+
|
|
1038
|
+
/**
|
|
1039
|
+
* Name of the smart contract parameter.
|
|
1040
|
+
*/
|
|
1041
|
+
name?: string | null;
|
|
1042
|
+
|
|
1043
|
+
/**
|
|
1044
|
+
* Value of the parameter.
|
|
1045
|
+
*/
|
|
1046
|
+
value?: string | null;
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
export interface SnapshotProposal {
|
|
1051
|
+
/**
|
|
1052
|
+
* ID of the snapshot proposal.
|
|
1053
|
+
*/
|
|
1054
|
+
id: string;
|
|
1055
|
+
|
|
1056
|
+
/**
|
|
1057
|
+
* Space associated with the snapshot proposal.
|
|
1058
|
+
*/
|
|
1059
|
+
space: string;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
export interface StreakArray {
|
|
1063
|
+
/**
|
|
1064
|
+
* Reward amount for achieving the streak milestone.
|
|
1065
|
+
*/
|
|
1066
|
+
streakAmount: number;
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* Milestone required to achieve the streak.
|
|
1070
|
+
*/
|
|
1071
|
+
streakMilestone: number;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
/**
|
|
1075
|
+
* Metadata for swap loyalty rules
|
|
1076
|
+
*/
|
|
1077
|
+
export interface Swap {
|
|
1078
|
+
provider?: 'any' | 'relay' | 'lifi';
|
|
1079
|
+
|
|
1080
|
+
relayReferrerId?: string;
|
|
1081
|
+
|
|
1082
|
+
requireCrossChainSwap?: boolean;
|
|
1083
|
+
|
|
1084
|
+
swappedToChain?: 'any' | number | string;
|
|
1085
|
+
|
|
1086
|
+
swappedToTokens?: Array<Swap.SwappedToToken>;
|
|
1087
|
+
|
|
1088
|
+
tokenMode?: 'any' | 'specific';
|
|
1089
|
+
|
|
1090
|
+
trackTokenAmount?: boolean;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
export namespace Swap {
|
|
1094
|
+
export interface SwappedToToken {
|
|
1095
|
+
address: string;
|
|
1096
|
+
|
|
1097
|
+
chainId: string;
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
export interface RuleGroupUpdateRuleGroupResponse {
|
|
1107
|
+
isCollapsible?: boolean;
|
|
1108
|
+
|
|
1109
|
+
name?: string;
|
|
1110
|
+
|
|
1111
|
+
subTitle?: string;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
export interface RuleGroupCreateRuleGroupParams {
|
|
1115
|
+
name: string;
|
|
1116
|
+
|
|
1117
|
+
organizationId: string;
|
|
1118
|
+
|
|
1119
|
+
websiteId: string;
|
|
1120
|
+
|
|
1121
|
+
isCollapsible?: boolean;
|
|
1122
|
+
|
|
1123
|
+
isRequired?: boolean;
|
|
1124
|
+
|
|
1125
|
+
sortId?: number;
|
|
1126
|
+
|
|
1127
|
+
subTitle?: string;
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
export interface RuleGroupGetRuleGroupsParams {
|
|
1131
|
+
excludeHidden?: string;
|
|
1132
|
+
|
|
1133
|
+
isActive?: string;
|
|
1134
|
+
|
|
1135
|
+
limit?: number;
|
|
1136
|
+
|
|
1137
|
+
organizationId?: string;
|
|
1138
|
+
|
|
1139
|
+
startingAfter?: string;
|
|
1140
|
+
|
|
1141
|
+
websiteId?: string;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
export interface RuleGroupUpdateRuleGroupParams {
|
|
1145
|
+
isCollapsible?: boolean;
|
|
1146
|
+
|
|
1147
|
+
name?: string | null;
|
|
1148
|
+
|
|
1149
|
+
subtitle?: string | null;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
export declare namespace RuleGroups {
|
|
1153
|
+
export {
|
|
1154
|
+
type RuleGroupCreateRuleGroupResponse as RuleGroupCreateRuleGroupResponse,
|
|
1155
|
+
type RuleGroupDeleteRuleGroupResponse as RuleGroupDeleteRuleGroupResponse,
|
|
1156
|
+
type RuleGroupGetRuleGroupsResponse as RuleGroupGetRuleGroupsResponse,
|
|
1157
|
+
type RuleGroupUpdateRuleGroupResponse as RuleGroupUpdateRuleGroupResponse,
|
|
1158
|
+
type RuleGroupCreateRuleGroupParams as RuleGroupCreateRuleGroupParams,
|
|
1159
|
+
type RuleGroupGetRuleGroupsParams as RuleGroupGetRuleGroupsParams,
|
|
1160
|
+
type RuleGroupUpdateRuleGroupParams as RuleGroupUpdateRuleGroupParams,
|
|
1161
|
+
};
|
|
1162
|
+
}
|