@snagsolutions/sdk 0.1.0-alpha.11 → 0.1.0-alpha.110
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 +970 -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 +22 -8
- 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 +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 +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 +2489 -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 +738 -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 +1717 -280
- 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 +109 -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 +96 -24
- package/src/resource.ts +1 -1
- package/src/resources/assets.ts +29 -8
- 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 +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 +161 -0
- package/src/resources/loyalty/questions.ts +241 -0
- package/src/resources/loyalty/rule-edits.ts +3486 -63
- package/src/resources/loyalty/rule-groups.ts +1145 -0
- package/src/resources/loyalty/rules.ts +2854 -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 +671 -0
- package/src/resources/loyalty/transactions.ts +3 -0
- package/src/resources/loyalty.ts +3 -0
- package/src/resources/minting.ts +168 -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 +161 -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 +180 -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
|
@@ -2,30 +2,74 @@ import { APIResource } from "../../resource.js";
|
|
|
2
2
|
import * as Core from "../../core.js";
|
|
3
3
|
export declare class Badges extends APIResource {
|
|
4
4
|
/**
|
|
5
|
-
* This endpoint allows you to configure a new badge
|
|
5
|
+
* This endpoint allows you to configure a new badge
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const badge = await client.loyalty.badges.create({
|
|
10
|
+
* conditions: [{}],
|
|
11
|
+
* imageUrl: 'https://example.com/image.png',
|
|
12
|
+
* name: 'Example Badge',
|
|
13
|
+
* organizationId: '123e4567-e89b-12d3-a456-426614174222',
|
|
14
|
+
* websiteId: '123e4567-e89b-12d3-a456-426614174111',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
6
17
|
*/
|
|
7
18
|
create(body: BadgeCreateParams, options?: Core.RequestOptions): Core.APIPromise<BadgeCreateResponse>;
|
|
8
19
|
/**
|
|
9
20
|
* This endpoint allows you to update an existing badge.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const badge = await client.loyalty.badges.update(
|
|
25
|
+
* '123e4567-e89b-12d3-a456-426614174333',
|
|
26
|
+
* );
|
|
27
|
+
* ```
|
|
10
28
|
*/
|
|
11
29
|
update(id: string, body?: BadgeUpdateParams, options?: Core.RequestOptions): Core.APIPromise<BadgeUpdateResponse>;
|
|
12
30
|
update(id: string, options?: Core.RequestOptions): Core.APIPromise<BadgeUpdateResponse>;
|
|
13
31
|
/**
|
|
14
32
|
* This endpoint allows you to fetch badge(s) data.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const badges = await client.loyalty.badges.list();
|
|
37
|
+
* ```
|
|
15
38
|
*/
|
|
16
39
|
list(query?: BadgeListParams, options?: Core.RequestOptions): Core.APIPromise<BadgeListResponse>;
|
|
17
40
|
list(options?: Core.RequestOptions): Core.APIPromise<BadgeListResponse>;
|
|
18
41
|
/**
|
|
19
42
|
* This endpoint allows you to delete a badge.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const badge = await client.loyalty.badges.delete(
|
|
47
|
+
* '123e4567-e89b-12d3-a456-426614174333',
|
|
48
|
+
* );
|
|
49
|
+
* ```
|
|
20
50
|
*/
|
|
21
51
|
delete(id: string, options?: Core.RequestOptions): Core.APIPromise<BadgeDeleteResponse>;
|
|
22
52
|
/**
|
|
23
53
|
* This endpoint allows you to revoke a badge from an account
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const response = await client.loyalty.badges.revoke(
|
|
58
|
+
* '123e4567-e89b-12d3-a456-426614174333',
|
|
59
|
+
* );
|
|
60
|
+
* ```
|
|
24
61
|
*/
|
|
25
62
|
revoke(id: string, body?: BadgeRevokeParams, options?: Core.RequestOptions): Core.APIPromise<BadgeRevokeResponse>;
|
|
26
63
|
revoke(id: string, options?: Core.RequestOptions): Core.APIPromise<BadgeRevokeResponse>;
|
|
27
64
|
/**
|
|
28
65
|
* This endpoint allows you to reward a badge for an account
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const response = await client.loyalty.badges.reward(
|
|
70
|
+
* '123e4567-e89b-12d3-a456-426614174333',
|
|
71
|
+
* );
|
|
72
|
+
* ```
|
|
29
73
|
*/
|
|
30
74
|
reward(id: string, body?: BadgeRewardParams, options?: Core.RequestOptions): Core.APIPromise<BadgeRewardResponse>;
|
|
31
75
|
reward(id: string, options?: Core.RequestOptions): Core.APIPromise<BadgeRewardResponse>;
|
|
@@ -34,99 +78,821 @@ export declare class Badges extends APIResource {
|
|
|
34
78
|
* Response returned upon successful creation of the badge.
|
|
35
79
|
*/
|
|
36
80
|
export interface BadgeCreateResponse {
|
|
81
|
+
/**
|
|
82
|
+
* UUID of the badge (converted to lowercase)
|
|
83
|
+
*/
|
|
37
84
|
id: string;
|
|
85
|
+
/**
|
|
86
|
+
* The description of the badge
|
|
87
|
+
*/
|
|
88
|
+
description: string | null;
|
|
89
|
+
/**
|
|
90
|
+
* The URL of the badge image
|
|
91
|
+
*/
|
|
92
|
+
imageUrl: string | null;
|
|
93
|
+
/**
|
|
94
|
+
* Array of conditions of the badge
|
|
95
|
+
*/
|
|
96
|
+
loyaltyConditions: Array<BadgeCreateResponse.LoyaltyCondition>;
|
|
97
|
+
/**
|
|
98
|
+
* The name of the badge
|
|
99
|
+
*/
|
|
100
|
+
name: string;
|
|
101
|
+
/**
|
|
102
|
+
* Array of user badges
|
|
103
|
+
*/
|
|
104
|
+
loyaltyBadgeUsers?: Array<BadgeCreateResponse.LoyaltyBadgeUser>;
|
|
105
|
+
/**
|
|
106
|
+
* Array of loyalty rules associated with the badge
|
|
107
|
+
*/
|
|
108
|
+
loyaltyRules?: Array<BadgeCreateResponse.LoyaltyRule>;
|
|
109
|
+
}
|
|
110
|
+
export declare namespace BadgeCreateResponse {
|
|
111
|
+
/**
|
|
112
|
+
* Schema for a loyalty condition rule.
|
|
113
|
+
*/
|
|
114
|
+
interface LoyaltyCondition {
|
|
115
|
+
/**
|
|
116
|
+
* UUID of the condition (converted to lowercase)
|
|
117
|
+
*/
|
|
118
|
+
id: string;
|
|
119
|
+
/**
|
|
120
|
+
* The amount of the condition
|
|
121
|
+
*/
|
|
122
|
+
amount: number | null;
|
|
123
|
+
association: Array<LoyaltyCondition.Association>;
|
|
124
|
+
/**
|
|
125
|
+
* The URL of the CSV file
|
|
126
|
+
*/
|
|
127
|
+
csvUrl: string | null;
|
|
128
|
+
/**
|
|
129
|
+
* The description of the condition
|
|
130
|
+
*/
|
|
131
|
+
description: string | null;
|
|
132
|
+
/**
|
|
133
|
+
* UUID of the currency (converted to lowercase)
|
|
134
|
+
*/
|
|
135
|
+
loyaltyCurrencyId: string | null;
|
|
136
|
+
/**
|
|
137
|
+
* UUID of the rule group (converted to lowercase)
|
|
138
|
+
*/
|
|
139
|
+
loyaltyRuleGroupId: string | null;
|
|
140
|
+
/**
|
|
141
|
+
* The repeat count of the condition
|
|
142
|
+
*/
|
|
143
|
+
repeatCount: number | null;
|
|
144
|
+
/**
|
|
145
|
+
* The required count of the condition
|
|
146
|
+
*/
|
|
147
|
+
requiredCount: number | null;
|
|
148
|
+
/**
|
|
149
|
+
* The type of the condition
|
|
150
|
+
*/
|
|
151
|
+
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
152
|
+
}
|
|
153
|
+
namespace LoyaltyCondition {
|
|
154
|
+
interface Association {
|
|
155
|
+
loyaltyBadge: Association.LoyaltyBadge | null;
|
|
156
|
+
loyaltyCurrency: Association.LoyaltyCurrency | null;
|
|
157
|
+
loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
|
|
158
|
+
loyaltyRule: Association.LoyaltyRule | null;
|
|
159
|
+
loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
|
|
160
|
+
}
|
|
161
|
+
namespace Association {
|
|
162
|
+
interface LoyaltyBadge {
|
|
163
|
+
/**
|
|
164
|
+
* UUID of the association (converted to lowercase)
|
|
165
|
+
*/
|
|
166
|
+
id: string;
|
|
167
|
+
/**
|
|
168
|
+
* The name of the association
|
|
169
|
+
*/
|
|
170
|
+
name: string;
|
|
171
|
+
}
|
|
172
|
+
interface LoyaltyCurrency {
|
|
173
|
+
/**
|
|
174
|
+
* UUID of the association (converted to lowercase)
|
|
175
|
+
*/
|
|
176
|
+
id: string;
|
|
177
|
+
/**
|
|
178
|
+
* The name of the association
|
|
179
|
+
*/
|
|
180
|
+
name: string;
|
|
181
|
+
}
|
|
182
|
+
interface LoyaltyLeaderboardView {
|
|
183
|
+
/**
|
|
184
|
+
* UUID of the association (converted to lowercase)
|
|
185
|
+
*/
|
|
186
|
+
id: string;
|
|
187
|
+
/**
|
|
188
|
+
* The name of the association
|
|
189
|
+
*/
|
|
190
|
+
name: string;
|
|
191
|
+
}
|
|
192
|
+
interface LoyaltyRule {
|
|
193
|
+
/**
|
|
194
|
+
* UUID of the association (converted to lowercase)
|
|
195
|
+
*/
|
|
196
|
+
id: string;
|
|
197
|
+
/**
|
|
198
|
+
* The name of the association
|
|
199
|
+
*/
|
|
200
|
+
name: string;
|
|
201
|
+
}
|
|
202
|
+
interface LoyaltyRuleGroup {
|
|
203
|
+
/**
|
|
204
|
+
* UUID of the association (converted to lowercase)
|
|
205
|
+
*/
|
|
206
|
+
id: string;
|
|
207
|
+
/**
|
|
208
|
+
* The name of the association
|
|
209
|
+
*/
|
|
210
|
+
name: string;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
interface LoyaltyBadgeUser {
|
|
215
|
+
/**
|
|
216
|
+
* UUID of the user badge (converted to lowercase)
|
|
217
|
+
*/
|
|
218
|
+
id: string;
|
|
219
|
+
/**
|
|
220
|
+
* The date and time the user badge was created
|
|
221
|
+
*/
|
|
222
|
+
createdAt: string;
|
|
223
|
+
/**
|
|
224
|
+
* UUID of the badge (converted to lowercase)
|
|
225
|
+
*/
|
|
226
|
+
loyaltyBadgeId: string;
|
|
227
|
+
/**
|
|
228
|
+
* UUID of the organization (converted to lowercase)
|
|
229
|
+
*/
|
|
230
|
+
organizationId: string;
|
|
231
|
+
/**
|
|
232
|
+
* The status of the badge
|
|
233
|
+
*/
|
|
234
|
+
status: 'active' | 'inactive' | 'revoked';
|
|
235
|
+
/**
|
|
236
|
+
* The date and time the user badge was updated
|
|
237
|
+
*/
|
|
238
|
+
updatedAt: string;
|
|
239
|
+
/**
|
|
240
|
+
* UUID of the user (converted to lowercase)
|
|
241
|
+
*/
|
|
242
|
+
userId: string;
|
|
243
|
+
/**
|
|
244
|
+
* UUID of the website (converted to lowercase)
|
|
245
|
+
*/
|
|
246
|
+
websiteId: string;
|
|
247
|
+
/**
|
|
248
|
+
* Array of progress for the badge
|
|
249
|
+
*/
|
|
250
|
+
progress?: unknown;
|
|
251
|
+
/**
|
|
252
|
+
* User associated with the user badge
|
|
253
|
+
*/
|
|
254
|
+
user?: LoyaltyBadgeUser.User;
|
|
255
|
+
}
|
|
256
|
+
namespace LoyaltyBadgeUser {
|
|
257
|
+
/**
|
|
258
|
+
* User associated with the user badge
|
|
259
|
+
*/
|
|
260
|
+
interface User {
|
|
261
|
+
/**
|
|
262
|
+
* UUID of the user (converted to lowercase)
|
|
263
|
+
*/
|
|
264
|
+
id: string;
|
|
265
|
+
/**
|
|
266
|
+
* Wallet address of the user
|
|
267
|
+
*/
|
|
268
|
+
walletAddress: string;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
interface LoyaltyRule {
|
|
272
|
+
/**
|
|
273
|
+
* UUID of the loyalty rule (converted to lowercase)
|
|
274
|
+
*/
|
|
275
|
+
id: string;
|
|
276
|
+
/**
|
|
277
|
+
* The name of the loyalty rule
|
|
278
|
+
*/
|
|
279
|
+
name: string;
|
|
280
|
+
}
|
|
38
281
|
}
|
|
39
282
|
/**
|
|
40
283
|
* Response returned upon successful update of the badge.
|
|
41
284
|
*/
|
|
42
285
|
export interface BadgeUpdateResponse {
|
|
286
|
+
/**
|
|
287
|
+
* UUID of the badge (converted to lowercase)
|
|
288
|
+
*/
|
|
43
289
|
id: string;
|
|
290
|
+
/**
|
|
291
|
+
* The description of the badge
|
|
292
|
+
*/
|
|
293
|
+
description: string | null;
|
|
294
|
+
/**
|
|
295
|
+
* The URL of the badge image
|
|
296
|
+
*/
|
|
297
|
+
imageUrl: string | null;
|
|
298
|
+
/**
|
|
299
|
+
* Array of conditions of the badge
|
|
300
|
+
*/
|
|
301
|
+
loyaltyConditions: Array<BadgeUpdateResponse.LoyaltyCondition>;
|
|
302
|
+
/**
|
|
303
|
+
* The name of the badge
|
|
304
|
+
*/
|
|
305
|
+
name: string;
|
|
306
|
+
/**
|
|
307
|
+
* Array of user badges
|
|
308
|
+
*/
|
|
309
|
+
loyaltyBadgeUsers?: Array<BadgeUpdateResponse.LoyaltyBadgeUser>;
|
|
310
|
+
/**
|
|
311
|
+
* Array of loyalty rules associated with the badge
|
|
312
|
+
*/
|
|
313
|
+
loyaltyRules?: Array<BadgeUpdateResponse.LoyaltyRule>;
|
|
314
|
+
}
|
|
315
|
+
export declare namespace BadgeUpdateResponse {
|
|
316
|
+
/**
|
|
317
|
+
* Schema for a loyalty condition rule.
|
|
318
|
+
*/
|
|
319
|
+
interface LoyaltyCondition {
|
|
320
|
+
/**
|
|
321
|
+
* UUID of the condition (converted to lowercase)
|
|
322
|
+
*/
|
|
323
|
+
id: string;
|
|
324
|
+
/**
|
|
325
|
+
* The amount of the condition
|
|
326
|
+
*/
|
|
327
|
+
amount: number | null;
|
|
328
|
+
association: Array<LoyaltyCondition.Association>;
|
|
329
|
+
/**
|
|
330
|
+
* The URL of the CSV file
|
|
331
|
+
*/
|
|
332
|
+
csvUrl: string | null;
|
|
333
|
+
/**
|
|
334
|
+
* The description of the condition
|
|
335
|
+
*/
|
|
336
|
+
description: string | null;
|
|
337
|
+
/**
|
|
338
|
+
* UUID of the currency (converted to lowercase)
|
|
339
|
+
*/
|
|
340
|
+
loyaltyCurrencyId: string | null;
|
|
341
|
+
/**
|
|
342
|
+
* UUID of the rule group (converted to lowercase)
|
|
343
|
+
*/
|
|
344
|
+
loyaltyRuleGroupId: string | null;
|
|
345
|
+
/**
|
|
346
|
+
* The repeat count of the condition
|
|
347
|
+
*/
|
|
348
|
+
repeatCount: number | null;
|
|
349
|
+
/**
|
|
350
|
+
* The required count of the condition
|
|
351
|
+
*/
|
|
352
|
+
requiredCount: number | null;
|
|
353
|
+
/**
|
|
354
|
+
* The type of the condition
|
|
355
|
+
*/
|
|
356
|
+
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
357
|
+
}
|
|
358
|
+
namespace LoyaltyCondition {
|
|
359
|
+
interface Association {
|
|
360
|
+
loyaltyBadge: Association.LoyaltyBadge | null;
|
|
361
|
+
loyaltyCurrency: Association.LoyaltyCurrency | null;
|
|
362
|
+
loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
|
|
363
|
+
loyaltyRule: Association.LoyaltyRule | null;
|
|
364
|
+
loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
|
|
365
|
+
}
|
|
366
|
+
namespace Association {
|
|
367
|
+
interface LoyaltyBadge {
|
|
368
|
+
/**
|
|
369
|
+
* UUID of the association (converted to lowercase)
|
|
370
|
+
*/
|
|
371
|
+
id: string;
|
|
372
|
+
/**
|
|
373
|
+
* The name of the association
|
|
374
|
+
*/
|
|
375
|
+
name: string;
|
|
376
|
+
}
|
|
377
|
+
interface LoyaltyCurrency {
|
|
378
|
+
/**
|
|
379
|
+
* UUID of the association (converted to lowercase)
|
|
380
|
+
*/
|
|
381
|
+
id: string;
|
|
382
|
+
/**
|
|
383
|
+
* The name of the association
|
|
384
|
+
*/
|
|
385
|
+
name: string;
|
|
386
|
+
}
|
|
387
|
+
interface LoyaltyLeaderboardView {
|
|
388
|
+
/**
|
|
389
|
+
* UUID of the association (converted to lowercase)
|
|
390
|
+
*/
|
|
391
|
+
id: string;
|
|
392
|
+
/**
|
|
393
|
+
* The name of the association
|
|
394
|
+
*/
|
|
395
|
+
name: string;
|
|
396
|
+
}
|
|
397
|
+
interface LoyaltyRule {
|
|
398
|
+
/**
|
|
399
|
+
* UUID of the association (converted to lowercase)
|
|
400
|
+
*/
|
|
401
|
+
id: string;
|
|
402
|
+
/**
|
|
403
|
+
* The name of the association
|
|
404
|
+
*/
|
|
405
|
+
name: string;
|
|
406
|
+
}
|
|
407
|
+
interface LoyaltyRuleGroup {
|
|
408
|
+
/**
|
|
409
|
+
* UUID of the association (converted to lowercase)
|
|
410
|
+
*/
|
|
411
|
+
id: string;
|
|
412
|
+
/**
|
|
413
|
+
* The name of the association
|
|
414
|
+
*/
|
|
415
|
+
name: string;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
interface LoyaltyBadgeUser {
|
|
420
|
+
/**
|
|
421
|
+
* UUID of the user badge (converted to lowercase)
|
|
422
|
+
*/
|
|
423
|
+
id: string;
|
|
424
|
+
/**
|
|
425
|
+
* The date and time the user badge was created
|
|
426
|
+
*/
|
|
427
|
+
createdAt: string;
|
|
428
|
+
/**
|
|
429
|
+
* UUID of the badge (converted to lowercase)
|
|
430
|
+
*/
|
|
431
|
+
loyaltyBadgeId: string;
|
|
432
|
+
/**
|
|
433
|
+
* UUID of the organization (converted to lowercase)
|
|
434
|
+
*/
|
|
435
|
+
organizationId: string;
|
|
436
|
+
/**
|
|
437
|
+
* The status of the badge
|
|
438
|
+
*/
|
|
439
|
+
status: 'active' | 'inactive' | 'revoked';
|
|
440
|
+
/**
|
|
441
|
+
* The date and time the user badge was updated
|
|
442
|
+
*/
|
|
443
|
+
updatedAt: string;
|
|
444
|
+
/**
|
|
445
|
+
* UUID of the user (converted to lowercase)
|
|
446
|
+
*/
|
|
447
|
+
userId: string;
|
|
448
|
+
/**
|
|
449
|
+
* UUID of the website (converted to lowercase)
|
|
450
|
+
*/
|
|
451
|
+
websiteId: string;
|
|
452
|
+
/**
|
|
453
|
+
* Array of progress for the badge
|
|
454
|
+
*/
|
|
455
|
+
progress?: unknown;
|
|
456
|
+
/**
|
|
457
|
+
* User associated with the user badge
|
|
458
|
+
*/
|
|
459
|
+
user?: LoyaltyBadgeUser.User;
|
|
460
|
+
}
|
|
461
|
+
namespace LoyaltyBadgeUser {
|
|
462
|
+
/**
|
|
463
|
+
* User associated with the user badge
|
|
464
|
+
*/
|
|
465
|
+
interface User {
|
|
466
|
+
/**
|
|
467
|
+
* UUID of the user (converted to lowercase)
|
|
468
|
+
*/
|
|
469
|
+
id: string;
|
|
470
|
+
/**
|
|
471
|
+
* Wallet address of the user
|
|
472
|
+
*/
|
|
473
|
+
walletAddress: string;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
interface LoyaltyRule {
|
|
477
|
+
/**
|
|
478
|
+
* UUID of the loyalty rule (converted to lowercase)
|
|
479
|
+
*/
|
|
480
|
+
id: string;
|
|
481
|
+
/**
|
|
482
|
+
* The name of the loyalty rule
|
|
483
|
+
*/
|
|
484
|
+
name: string;
|
|
485
|
+
}
|
|
44
486
|
}
|
|
45
487
|
/**
|
|
46
488
|
* Response returned upon successful fetching of the badges.
|
|
47
489
|
*/
|
|
48
490
|
export interface BadgeListResponse {
|
|
49
|
-
|
|
491
|
+
/**
|
|
492
|
+
* UUID of the badge (converted to lowercase)
|
|
493
|
+
*/
|
|
494
|
+
id: string;
|
|
495
|
+
/**
|
|
496
|
+
* The description of the badge
|
|
497
|
+
*/
|
|
498
|
+
description: string | null;
|
|
499
|
+
/**
|
|
500
|
+
* The URL of the badge image
|
|
501
|
+
*/
|
|
502
|
+
imageUrl: string | null;
|
|
503
|
+
/**
|
|
504
|
+
* Array of conditions of the badge
|
|
505
|
+
*/
|
|
506
|
+
loyaltyConditions: Array<BadgeListResponse.LoyaltyCondition>;
|
|
507
|
+
/**
|
|
508
|
+
* The name of the badge
|
|
509
|
+
*/
|
|
510
|
+
name: string;
|
|
511
|
+
/**
|
|
512
|
+
* Array of user badges
|
|
513
|
+
*/
|
|
514
|
+
loyaltyBadgeUsers?: Array<BadgeListResponse.LoyaltyBadgeUser>;
|
|
515
|
+
/**
|
|
516
|
+
* Array of loyalty rules associated with the badge
|
|
517
|
+
*/
|
|
518
|
+
loyaltyRules?: Array<BadgeListResponse.LoyaltyRule>;
|
|
50
519
|
}
|
|
51
520
|
export declare namespace BadgeListResponse {
|
|
52
|
-
|
|
521
|
+
/**
|
|
522
|
+
* Schema for a loyalty condition rule.
|
|
523
|
+
*/
|
|
524
|
+
interface LoyaltyCondition {
|
|
53
525
|
/**
|
|
54
|
-
* UUID of the
|
|
526
|
+
* UUID of the condition (converted to lowercase)
|
|
55
527
|
*/
|
|
56
528
|
id: string;
|
|
57
529
|
/**
|
|
58
|
-
*
|
|
530
|
+
* The amount of the condition
|
|
59
531
|
*/
|
|
60
|
-
|
|
532
|
+
amount: number | null;
|
|
533
|
+
association: Array<LoyaltyCondition.Association>;
|
|
61
534
|
/**
|
|
62
|
-
* The URL of the
|
|
535
|
+
* The URL of the CSV file
|
|
63
536
|
*/
|
|
64
|
-
|
|
537
|
+
csvUrl: string | null;
|
|
65
538
|
/**
|
|
66
|
-
*
|
|
539
|
+
* The description of the condition
|
|
67
540
|
*/
|
|
68
|
-
|
|
541
|
+
description: string | null;
|
|
69
542
|
/**
|
|
70
|
-
*
|
|
543
|
+
* UUID of the currency (converted to lowercase)
|
|
71
544
|
*/
|
|
72
|
-
|
|
545
|
+
loyaltyCurrencyId: string | null;
|
|
73
546
|
/**
|
|
74
|
-
*
|
|
547
|
+
* UUID of the rule group (converted to lowercase)
|
|
75
548
|
*/
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
namespace Badge {
|
|
549
|
+
loyaltyRuleGroupId: string | null;
|
|
79
550
|
/**
|
|
80
|
-
*
|
|
551
|
+
* The repeat count of the condition
|
|
81
552
|
*/
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
553
|
+
repeatCount: number | null;
|
|
554
|
+
/**
|
|
555
|
+
* The required count of the condition
|
|
556
|
+
*/
|
|
557
|
+
requiredCount: number | null;
|
|
558
|
+
/**
|
|
559
|
+
* The type of the condition
|
|
560
|
+
*/
|
|
561
|
+
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
562
|
+
}
|
|
563
|
+
namespace LoyaltyCondition {
|
|
564
|
+
interface Association {
|
|
565
|
+
loyaltyBadge: Association.LoyaltyBadge | null;
|
|
566
|
+
loyaltyCurrency: Association.LoyaltyCurrency | null;
|
|
567
|
+
loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
|
|
568
|
+
loyaltyRule: Association.LoyaltyRule | null;
|
|
569
|
+
loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
|
|
91
570
|
}
|
|
92
|
-
|
|
571
|
+
namespace Association {
|
|
572
|
+
interface LoyaltyBadge {
|
|
573
|
+
/**
|
|
574
|
+
* UUID of the association (converted to lowercase)
|
|
575
|
+
*/
|
|
576
|
+
id: string;
|
|
577
|
+
/**
|
|
578
|
+
* The name of the association
|
|
579
|
+
*/
|
|
580
|
+
name: string;
|
|
581
|
+
}
|
|
582
|
+
interface LoyaltyCurrency {
|
|
583
|
+
/**
|
|
584
|
+
* UUID of the association (converted to lowercase)
|
|
585
|
+
*/
|
|
586
|
+
id: string;
|
|
587
|
+
/**
|
|
588
|
+
* The name of the association
|
|
589
|
+
*/
|
|
590
|
+
name: string;
|
|
591
|
+
}
|
|
592
|
+
interface LoyaltyLeaderboardView {
|
|
593
|
+
/**
|
|
594
|
+
* UUID of the association (converted to lowercase)
|
|
595
|
+
*/
|
|
596
|
+
id: string;
|
|
597
|
+
/**
|
|
598
|
+
* The name of the association
|
|
599
|
+
*/
|
|
600
|
+
name: string;
|
|
601
|
+
}
|
|
602
|
+
interface LoyaltyRule {
|
|
603
|
+
/**
|
|
604
|
+
* UUID of the association (converted to lowercase)
|
|
605
|
+
*/
|
|
606
|
+
id: string;
|
|
607
|
+
/**
|
|
608
|
+
* The name of the association
|
|
609
|
+
*/
|
|
610
|
+
name: string;
|
|
611
|
+
}
|
|
612
|
+
interface LoyaltyRuleGroup {
|
|
613
|
+
/**
|
|
614
|
+
* UUID of the association (converted to lowercase)
|
|
615
|
+
*/
|
|
616
|
+
id: string;
|
|
617
|
+
/**
|
|
618
|
+
* The name of the association
|
|
619
|
+
*/
|
|
620
|
+
name: string;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
interface LoyaltyBadgeUser {
|
|
625
|
+
/**
|
|
626
|
+
* UUID of the user badge (converted to lowercase)
|
|
627
|
+
*/
|
|
628
|
+
id: string;
|
|
629
|
+
/**
|
|
630
|
+
* The date and time the user badge was created
|
|
631
|
+
*/
|
|
632
|
+
createdAt: string;
|
|
633
|
+
/**
|
|
634
|
+
* UUID of the badge (converted to lowercase)
|
|
635
|
+
*/
|
|
636
|
+
loyaltyBadgeId: string;
|
|
637
|
+
/**
|
|
638
|
+
* UUID of the organization (converted to lowercase)
|
|
639
|
+
*/
|
|
640
|
+
organizationId: string;
|
|
641
|
+
/**
|
|
642
|
+
* The status of the badge
|
|
643
|
+
*/
|
|
644
|
+
status: 'active' | 'inactive' | 'revoked';
|
|
645
|
+
/**
|
|
646
|
+
* The date and time the user badge was updated
|
|
647
|
+
*/
|
|
648
|
+
updatedAt: string;
|
|
649
|
+
/**
|
|
650
|
+
* UUID of the user (converted to lowercase)
|
|
651
|
+
*/
|
|
652
|
+
userId: string;
|
|
653
|
+
/**
|
|
654
|
+
* UUID of the website (converted to lowercase)
|
|
655
|
+
*/
|
|
656
|
+
websiteId: string;
|
|
657
|
+
/**
|
|
658
|
+
* Array of progress for the badge
|
|
659
|
+
*/
|
|
660
|
+
progress?: unknown;
|
|
661
|
+
/**
|
|
662
|
+
* User associated with the user badge
|
|
663
|
+
*/
|
|
664
|
+
user?: LoyaltyBadgeUser.User;
|
|
665
|
+
}
|
|
666
|
+
namespace LoyaltyBadgeUser {
|
|
667
|
+
/**
|
|
668
|
+
* User associated with the user badge
|
|
669
|
+
*/
|
|
670
|
+
interface User {
|
|
93
671
|
/**
|
|
94
|
-
* UUID of the
|
|
672
|
+
* UUID of the user (converted to lowercase)
|
|
95
673
|
*/
|
|
96
674
|
id: string;
|
|
97
675
|
/**
|
|
98
|
-
*
|
|
99
|
-
*/
|
|
100
|
-
type: 'rule' | 'section' | 'level' | 'points' | 'api' | 'badge';
|
|
101
|
-
/**
|
|
102
|
-
* The amount of the rule
|
|
103
|
-
*/
|
|
104
|
-
amount?: number;
|
|
105
|
-
/**
|
|
106
|
-
* The description of the rule
|
|
107
|
-
*/
|
|
108
|
-
description?: string;
|
|
109
|
-
/**
|
|
110
|
-
* UUID of the currency (optional, converted to lowercase)
|
|
111
|
-
*/
|
|
112
|
-
loyaltyCurrencyId?: string;
|
|
113
|
-
/**
|
|
114
|
-
* UUID of the rule group (optional, converted to lowercase)
|
|
676
|
+
* Wallet address of the user
|
|
115
677
|
*/
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* UUID of the rule (optional, converted to lowercase)
|
|
119
|
-
*/
|
|
120
|
-
loyaltyRuleId?: string;
|
|
678
|
+
walletAddress: string;
|
|
121
679
|
}
|
|
122
680
|
}
|
|
681
|
+
interface LoyaltyRule {
|
|
682
|
+
/**
|
|
683
|
+
* UUID of the loyalty rule (converted to lowercase)
|
|
684
|
+
*/
|
|
685
|
+
id: string;
|
|
686
|
+
/**
|
|
687
|
+
* The name of the loyalty rule
|
|
688
|
+
*/
|
|
689
|
+
name: string;
|
|
690
|
+
}
|
|
123
691
|
}
|
|
124
692
|
/**
|
|
125
693
|
* Response returned upon successful deletion of the badge.
|
|
126
694
|
*/
|
|
127
695
|
export interface BadgeDeleteResponse {
|
|
696
|
+
/**
|
|
697
|
+
* UUID of the badge (converted to lowercase)
|
|
698
|
+
*/
|
|
128
699
|
id: string;
|
|
129
|
-
|
|
700
|
+
/**
|
|
701
|
+
* The description of the badge
|
|
702
|
+
*/
|
|
703
|
+
description: string | null;
|
|
704
|
+
/**
|
|
705
|
+
* The URL of the badge image
|
|
706
|
+
*/
|
|
707
|
+
imageUrl: string | null;
|
|
708
|
+
/**
|
|
709
|
+
* Array of conditions of the badge
|
|
710
|
+
*/
|
|
711
|
+
loyaltyConditions: Array<BadgeDeleteResponse.LoyaltyCondition>;
|
|
712
|
+
/**
|
|
713
|
+
* The name of the badge
|
|
714
|
+
*/
|
|
715
|
+
name: string;
|
|
716
|
+
/**
|
|
717
|
+
* Array of user badges
|
|
718
|
+
*/
|
|
719
|
+
loyaltyBadgeUsers?: Array<BadgeDeleteResponse.LoyaltyBadgeUser>;
|
|
720
|
+
/**
|
|
721
|
+
* Array of loyalty rules associated with the badge
|
|
722
|
+
*/
|
|
723
|
+
loyaltyRules?: Array<BadgeDeleteResponse.LoyaltyRule>;
|
|
724
|
+
}
|
|
725
|
+
export declare namespace BadgeDeleteResponse {
|
|
726
|
+
/**
|
|
727
|
+
* Schema for a loyalty condition rule.
|
|
728
|
+
*/
|
|
729
|
+
interface LoyaltyCondition {
|
|
730
|
+
/**
|
|
731
|
+
* UUID of the condition (converted to lowercase)
|
|
732
|
+
*/
|
|
733
|
+
id: string;
|
|
734
|
+
/**
|
|
735
|
+
* The amount of the condition
|
|
736
|
+
*/
|
|
737
|
+
amount: number | null;
|
|
738
|
+
association: Array<LoyaltyCondition.Association>;
|
|
739
|
+
/**
|
|
740
|
+
* The URL of the CSV file
|
|
741
|
+
*/
|
|
742
|
+
csvUrl: string | null;
|
|
743
|
+
/**
|
|
744
|
+
* The description of the condition
|
|
745
|
+
*/
|
|
746
|
+
description: string | null;
|
|
747
|
+
/**
|
|
748
|
+
* UUID of the currency (converted to lowercase)
|
|
749
|
+
*/
|
|
750
|
+
loyaltyCurrencyId: string | null;
|
|
751
|
+
/**
|
|
752
|
+
* UUID of the rule group (converted to lowercase)
|
|
753
|
+
*/
|
|
754
|
+
loyaltyRuleGroupId: string | null;
|
|
755
|
+
/**
|
|
756
|
+
* The repeat count of the condition
|
|
757
|
+
*/
|
|
758
|
+
repeatCount: number | null;
|
|
759
|
+
/**
|
|
760
|
+
* The required count of the condition
|
|
761
|
+
*/
|
|
762
|
+
requiredCount: number | null;
|
|
763
|
+
/**
|
|
764
|
+
* The type of the condition
|
|
765
|
+
*/
|
|
766
|
+
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
767
|
+
}
|
|
768
|
+
namespace LoyaltyCondition {
|
|
769
|
+
interface Association {
|
|
770
|
+
loyaltyBadge: Association.LoyaltyBadge | null;
|
|
771
|
+
loyaltyCurrency: Association.LoyaltyCurrency | null;
|
|
772
|
+
loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
|
|
773
|
+
loyaltyRule: Association.LoyaltyRule | null;
|
|
774
|
+
loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
|
|
775
|
+
}
|
|
776
|
+
namespace Association {
|
|
777
|
+
interface LoyaltyBadge {
|
|
778
|
+
/**
|
|
779
|
+
* UUID of the association (converted to lowercase)
|
|
780
|
+
*/
|
|
781
|
+
id: string;
|
|
782
|
+
/**
|
|
783
|
+
* The name of the association
|
|
784
|
+
*/
|
|
785
|
+
name: string;
|
|
786
|
+
}
|
|
787
|
+
interface LoyaltyCurrency {
|
|
788
|
+
/**
|
|
789
|
+
* UUID of the association (converted to lowercase)
|
|
790
|
+
*/
|
|
791
|
+
id: string;
|
|
792
|
+
/**
|
|
793
|
+
* The name of the association
|
|
794
|
+
*/
|
|
795
|
+
name: string;
|
|
796
|
+
}
|
|
797
|
+
interface LoyaltyLeaderboardView {
|
|
798
|
+
/**
|
|
799
|
+
* UUID of the association (converted to lowercase)
|
|
800
|
+
*/
|
|
801
|
+
id: string;
|
|
802
|
+
/**
|
|
803
|
+
* The name of the association
|
|
804
|
+
*/
|
|
805
|
+
name: string;
|
|
806
|
+
}
|
|
807
|
+
interface LoyaltyRule {
|
|
808
|
+
/**
|
|
809
|
+
* UUID of the association (converted to lowercase)
|
|
810
|
+
*/
|
|
811
|
+
id: string;
|
|
812
|
+
/**
|
|
813
|
+
* The name of the association
|
|
814
|
+
*/
|
|
815
|
+
name: string;
|
|
816
|
+
}
|
|
817
|
+
interface LoyaltyRuleGroup {
|
|
818
|
+
/**
|
|
819
|
+
* UUID of the association (converted to lowercase)
|
|
820
|
+
*/
|
|
821
|
+
id: string;
|
|
822
|
+
/**
|
|
823
|
+
* The name of the association
|
|
824
|
+
*/
|
|
825
|
+
name: string;
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
interface LoyaltyBadgeUser {
|
|
830
|
+
/**
|
|
831
|
+
* UUID of the user badge (converted to lowercase)
|
|
832
|
+
*/
|
|
833
|
+
id: string;
|
|
834
|
+
/**
|
|
835
|
+
* The date and time the user badge was created
|
|
836
|
+
*/
|
|
837
|
+
createdAt: string;
|
|
838
|
+
/**
|
|
839
|
+
* UUID of the badge (converted to lowercase)
|
|
840
|
+
*/
|
|
841
|
+
loyaltyBadgeId: string;
|
|
842
|
+
/**
|
|
843
|
+
* UUID of the organization (converted to lowercase)
|
|
844
|
+
*/
|
|
845
|
+
organizationId: string;
|
|
846
|
+
/**
|
|
847
|
+
* The status of the badge
|
|
848
|
+
*/
|
|
849
|
+
status: 'active' | 'inactive' | 'revoked';
|
|
850
|
+
/**
|
|
851
|
+
* The date and time the user badge was updated
|
|
852
|
+
*/
|
|
853
|
+
updatedAt: string;
|
|
854
|
+
/**
|
|
855
|
+
* UUID of the user (converted to lowercase)
|
|
856
|
+
*/
|
|
857
|
+
userId: string;
|
|
858
|
+
/**
|
|
859
|
+
* UUID of the website (converted to lowercase)
|
|
860
|
+
*/
|
|
861
|
+
websiteId: string;
|
|
862
|
+
/**
|
|
863
|
+
* Array of progress for the badge
|
|
864
|
+
*/
|
|
865
|
+
progress?: unknown;
|
|
866
|
+
/**
|
|
867
|
+
* User associated with the user badge
|
|
868
|
+
*/
|
|
869
|
+
user?: LoyaltyBadgeUser.User;
|
|
870
|
+
}
|
|
871
|
+
namespace LoyaltyBadgeUser {
|
|
872
|
+
/**
|
|
873
|
+
* User associated with the user badge
|
|
874
|
+
*/
|
|
875
|
+
interface User {
|
|
876
|
+
/**
|
|
877
|
+
* UUID of the user (converted to lowercase)
|
|
878
|
+
*/
|
|
879
|
+
id: string;
|
|
880
|
+
/**
|
|
881
|
+
* Wallet address of the user
|
|
882
|
+
*/
|
|
883
|
+
walletAddress: string;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
interface LoyaltyRule {
|
|
887
|
+
/**
|
|
888
|
+
* UUID of the loyalty rule (converted to lowercase)
|
|
889
|
+
*/
|
|
890
|
+
id: string;
|
|
891
|
+
/**
|
|
892
|
+
* The name of the loyalty rule
|
|
893
|
+
*/
|
|
894
|
+
name: string;
|
|
895
|
+
}
|
|
130
896
|
}
|
|
131
897
|
/**
|
|
132
898
|
* Response returned upon successful update of the user badge
|
|
@@ -165,6 +931,10 @@ export declare namespace BadgeRewardResponse {
|
|
|
165
931
|
}
|
|
166
932
|
}
|
|
167
933
|
export interface BadgeCreateParams {
|
|
934
|
+
/**
|
|
935
|
+
* Array of conditions for the badge
|
|
936
|
+
*/
|
|
937
|
+
conditions: Array<BadgeCreateParams.Condition>;
|
|
168
938
|
/**
|
|
169
939
|
* The URL of the badge image
|
|
170
940
|
*/
|
|
@@ -177,10 +947,6 @@ export interface BadgeCreateParams {
|
|
|
177
947
|
* UUID of the organization (optional, converted to lowercase)
|
|
178
948
|
*/
|
|
179
949
|
organizationId: string;
|
|
180
|
-
/**
|
|
181
|
-
* Array of rules for the badge
|
|
182
|
-
*/
|
|
183
|
-
rules: Array<BadgeCreateParams.Rule>;
|
|
184
950
|
/**
|
|
185
951
|
* UUID of the website (optional, converted to lowercase)
|
|
186
952
|
*/
|
|
@@ -191,42 +957,55 @@ export interface BadgeCreateParams {
|
|
|
191
957
|
description?: string;
|
|
192
958
|
}
|
|
193
959
|
export declare namespace BadgeCreateParams {
|
|
194
|
-
|
|
195
|
-
* Schema for a loyalty condition rule.
|
|
196
|
-
*/
|
|
197
|
-
interface Rule {
|
|
198
|
-
/**
|
|
199
|
-
* The type of rule
|
|
200
|
-
*/
|
|
201
|
-
type: 'rule' | 'section' | 'level' | 'points' | 'api' | 'badge';
|
|
960
|
+
interface Condition {
|
|
202
961
|
/**
|
|
203
962
|
* The amount of the rule
|
|
204
963
|
*/
|
|
205
964
|
amount?: number | null;
|
|
965
|
+
/**
|
|
966
|
+
* URL of the CSV file (optional)
|
|
967
|
+
*/
|
|
968
|
+
csvUrl?: string | null;
|
|
206
969
|
/**
|
|
207
970
|
* The description of the rule
|
|
208
971
|
*/
|
|
209
|
-
description?: string;
|
|
972
|
+
description?: string | null;
|
|
973
|
+
/**
|
|
974
|
+
* Array of UUIDs of the badge (optional, converted to lowercase)
|
|
975
|
+
*/
|
|
976
|
+
loyaltyBadgeIds?: Array<string>;
|
|
977
|
+
/**
|
|
978
|
+
* Array of UUIDs of the currency (optional, converted to lowercase)
|
|
979
|
+
*/
|
|
980
|
+
loyaltyCurrencyIds?: Array<string>;
|
|
981
|
+
/**
|
|
982
|
+
* Array of UUIDs of the Loyalty Leaderboard (optional, converted to lowercase)
|
|
983
|
+
*/
|
|
984
|
+
loyaltyLeaderboardViewIds?: Array<string>;
|
|
210
985
|
/**
|
|
211
|
-
* UUID of the
|
|
986
|
+
* UUID of the loyalty rule chain (optional, converted to lowercase)
|
|
212
987
|
*/
|
|
213
|
-
|
|
988
|
+
loyaltyRuleChainId?: string;
|
|
214
989
|
/**
|
|
215
|
-
*
|
|
990
|
+
* Array of UUIDs of the rule group (optional, converted to lowercase)
|
|
216
991
|
*/
|
|
217
|
-
|
|
992
|
+
loyaltyRuleGroupIds?: Array<string>;
|
|
218
993
|
/**
|
|
219
|
-
*
|
|
994
|
+
* Array of UUIDs of the rules (optional, converted to lowercase)
|
|
220
995
|
*/
|
|
221
|
-
|
|
996
|
+
loyaltyRuleIds?: Array<string>;
|
|
222
997
|
/**
|
|
223
|
-
*
|
|
998
|
+
* The number of times the rule should be repeated to fulfill the condition
|
|
224
999
|
*/
|
|
225
|
-
|
|
1000
|
+
repeatCount?: number | null;
|
|
226
1001
|
/**
|
|
227
|
-
*
|
|
1002
|
+
* The number of rules that need to be fulfilled to satisfy the condition
|
|
1003
|
+
*/
|
|
1004
|
+
requiredCount?: number | null;
|
|
1005
|
+
/**
|
|
1006
|
+
* The type of rule
|
|
228
1007
|
*/
|
|
229
|
-
|
|
1008
|
+
type?: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
230
1009
|
}
|
|
231
1010
|
}
|
|
232
1011
|
export interface BadgeUpdateParams {
|
|
@@ -255,7 +1034,7 @@ export interface BadgeListParams {
|
|
|
255
1034
|
/**
|
|
256
1035
|
* Number of badges to fetch
|
|
257
1036
|
*/
|
|
258
|
-
limit?: number
|
|
1037
|
+
limit?: number;
|
|
259
1038
|
/**
|
|
260
1039
|
* UUID of the organization (optional, converted to lowercase)
|
|
261
1040
|
*/
|
|
@@ -265,15 +1044,31 @@ export interface BadgeListParams {
|
|
|
265
1044
|
*/
|
|
266
1045
|
startingAfter?: string;
|
|
267
1046
|
/**
|
|
268
|
-
*
|
|
1047
|
+
* External identifier of the user group
|
|
269
1048
|
*/
|
|
270
|
-
|
|
1049
|
+
userGroupExternalIdentifier?: string;
|
|
1050
|
+
/**
|
|
1051
|
+
* UUID of the user group
|
|
1052
|
+
*/
|
|
1053
|
+
userGroupId?: string;
|
|
1054
|
+
/**
|
|
1055
|
+
* UUID of the user, or array of UUID.
|
|
1056
|
+
*/
|
|
1057
|
+
userId?: string | Array<string>;
|
|
1058
|
+
/**
|
|
1059
|
+
* Wallet Address of the user, or array of wallet addresses.
|
|
1060
|
+
*/
|
|
1061
|
+
walletAddress?: string | Array<string>;
|
|
271
1062
|
/**
|
|
272
1063
|
* UUID of the website (optional, converted to lowercase)
|
|
273
1064
|
*/
|
|
274
1065
|
websiteId?: string;
|
|
275
1066
|
}
|
|
276
1067
|
export interface BadgeRevokeParams {
|
|
1068
|
+
/**
|
|
1069
|
+
* Status of the badge
|
|
1070
|
+
*/
|
|
1071
|
+
status?: 'active' | 'inactive' | 'revoked';
|
|
277
1072
|
/**
|
|
278
1073
|
* UUID of the user (converted to lowercase)
|
|
279
1074
|
*/
|
|
@@ -284,6 +1079,10 @@ export interface BadgeRevokeParams {
|
|
|
284
1079
|
walletAddress?: string;
|
|
285
1080
|
}
|
|
286
1081
|
export interface BadgeRewardParams {
|
|
1082
|
+
/**
|
|
1083
|
+
* Status of the badge
|
|
1084
|
+
*/
|
|
1085
|
+
status?: 'active' | 'inactive' | 'revoked';
|
|
287
1086
|
/**
|
|
288
1087
|
* UUID of the user (converted to lowercase)
|
|
289
1088
|
*/
|