@snagsolutions/sdk 0.1.0-alpha.26 → 0.1.0-alpha.260
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 +140 -153
- package/LICENSE +1 -1
- package/README.md +15 -23
- package/core.d.ts +9 -6
- package/core.d.ts.map +1 -1
- package/core.js +36 -33
- package/core.js.map +1 -1
- package/core.mjs +36 -33
- package/core.mjs.map +1 -1
- package/index.d.mts +15 -9
- package/index.d.ts +15 -9
- package/index.d.ts.map +1 -1
- package/index.js +13 -6
- package/index.js.map +1 -1
- package/index.mjs +14 -7
- package/index.mjs.map +1 -1
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +33 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- 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 +16 -2
- package/resources/assets.d.ts.map +1 -1
- package/resources/assets.js +8 -0
- package/resources/assets.js.map +1 -1
- package/resources/assets.mjs +8 -0
- package/resources/assets.mjs.map +1 -1
- package/resources/auctions/auctions.d.ts +341 -0
- package/resources/auctions/auctions.d.ts.map +1 -0
- package/resources/auctions/auctions.js +72 -0
- package/resources/auctions/auctions.js.map +1 -0
- package/resources/auctions/auctions.mjs +45 -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 +126 -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 +136 -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 +1 -133
- package/resources/auctions.d.ts.map +1 -1
- package/resources/auctions.js +15 -22
- package/resources/auctions.js.map +1 -1
- package/resources/auctions.mjs +1 -20
- package/resources/auctions.mjs.map +1 -1
- package/resources/auth.d.ts +66 -6
- package/resources/auth.d.ts.map +1 -1
- package/resources/auth.js +6 -0
- package/resources/auth.js.map +1 -1
- package/resources/auth.mjs +6 -0
- package/resources/auth.mjs.map +1 -1
- package/resources/index.d.ts +5 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -3
- package/resources/index.mjs.map +1 -1
- package/resources/loyalty/account-streaks.d.ts +96 -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 +60 -16
- package/resources/loyalty/accounts.d.ts.map +1 -1
- package/resources/loyalty/accounts.js +14 -0
- package/resources/loyalty/accounts.js.map +1 -1
- package/resources/loyalty/accounts.mjs +14 -0
- package/resources/loyalty/accounts.mjs.map +1 -1
- package/resources/loyalty/badges.d.ts +885 -136
- 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 +19 -0
- 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 +3 -3
- package/resources/loyalty/index.d.ts.map +1 -1
- package/resources/loyalty/index.js +5 -5
- package/resources/loyalty/index.js.map +1 -1
- package/resources/loyalty/index.mjs +2 -2
- package/resources/loyalty/index.mjs.map +1 -1
- package/resources/loyalty/loyalty.d.ts +9 -9
- package/resources/loyalty/loyalty.d.ts.map +1 -1
- package/resources/loyalty/loyalty.js +6 -6
- package/resources/loyalty/loyalty.js.map +1 -1
- package/resources/loyalty/loyalty.mjs +6 -6
- package/resources/loyalty/loyalty.mjs.map +1 -1
- package/resources/loyalty/multipliers.d.ts +39 -2
- package/resources/loyalty/multipliers.d.ts.map +1 -1
- package/resources/loyalty/multipliers.js +23 -0
- package/resources/loyalty/multipliers.js.map +1 -1
- package/resources/loyalty/multipliers.mjs +23 -0
- package/resources/loyalty/multipliers.mjs.map +1 -1
- package/resources/loyalty/questions-responses.d.ts +55 -4
- package/resources/loyalty/questions-responses.d.ts.map +1 -1
- package/resources/loyalty/questions-responses.js +9 -0
- package/resources/loyalty/questions-responses.js.map +1 -1
- package/resources/loyalty/questions-responses.mjs +9 -0
- package/resources/loyalty/questions-responses.mjs.map +1 -1
- package/resources/loyalty/questions.d.ts +60 -6
- package/resources/loyalty/questions.d.ts.map +1 -1
- package/resources/loyalty/questions.js +39 -0
- package/resources/loyalty/questions.js.map +1 -1
- package/resources/loyalty/questions.mjs +39 -0
- package/resources/loyalty/questions.mjs.map +1 -1
- package/resources/loyalty/rule-edits.d.ts +2898 -8
- package/resources/loyalty/rule-edits.d.ts.map +1 -1
- package/resources/loyalty/rule-edits.js +14 -0
- package/resources/loyalty/rule-edits.js.map +1 -1
- package/resources/loyalty/rule-edits.mjs +14 -0
- package/resources/loyalty/rule-edits.mjs.map +1 -1
- package/resources/loyalty/rule-groups.d.ts +284 -56
- package/resources/loyalty/rule-groups.d.ts.map +1 -1
- package/resources/loyalty/rule-groups.js +18 -0
- package/resources/loyalty/rule-groups.js.map +1 -1
- package/resources/loyalty/rule-groups.mjs +18 -0
- package/resources/loyalty/rule-groups.mjs.map +1 -1
- package/resources/loyalty/rules.d.ts +2368 -346
- 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 +4 -0
- package/resources/loyalty/transactions/index.d.ts.map +1 -0
- package/resources/loyalty/transactions/index.js +11 -0
- package/resources/loyalty/transactions/index.js.map +1 -0
- package/resources/loyalty/transactions/index.mjs +5 -0
- package/resources/loyalty/transactions/index.mjs.map +1 -0
- package/resources/loyalty/transactions/posts.d.ts +145 -0
- package/resources/loyalty/transactions/posts.d.ts.map +1 -0
- package/resources/loyalty/transactions/posts.js +32 -0
- package/resources/loyalty/transactions/posts.js.map +1 -0
- package/resources/loyalty/transactions/posts.mjs +28 -0
- package/resources/loyalty/transactions/posts.mjs.map +1 -0
- package/resources/loyalty/transactions/rule-statuses.d.ts +121 -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 +566 -0
- package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
- package/resources/loyalty/transactions/transactions.js +110 -0
- package/resources/loyalty/transactions/transactions.js.map +1 -0
- package/resources/loyalty/transactions/transactions.mjs +83 -0
- package/resources/loyalty/transactions/transactions.mjs.map +1 -0
- package/resources/loyalty/transactions.d.ts +1 -253
- package/resources/loyalty/transactions.d.ts.map +1 -1
- package/resources/loyalty/transactions.js +15 -18
- package/resources/loyalty/transactions.js.map +1 -1
- package/resources/loyalty/transactions.mjs +1 -16
- package/resources/loyalty/transactions.mjs.map +1 -1
- package/resources/minting/allowlist.d.ts +84 -0
- package/resources/minting/allowlist.d.ts.map +1 -0
- package/resources/minting/allowlist.js +42 -0
- package/resources/minting/allowlist.js.map +1 -0
- package/resources/minting/allowlist.mjs +38 -0
- package/resources/minting/allowlist.mjs.map +1 -0
- package/resources/minting/contracts.d.ts +165 -0
- package/resources/minting/contracts.d.ts.map +1 -0
- package/resources/minting/contracts.js +30 -0
- package/resources/minting/contracts.js.map +1 -0
- package/resources/minting/contracts.mjs +26 -0
- package/resources/minting/contracts.mjs.map +1 -0
- package/resources/minting/index.d.ts +5 -0
- package/resources/minting/index.d.ts.map +1 -0
- package/resources/minting/index.js +13 -0
- package/resources/minting/index.js.map +1 -0
- package/resources/minting/index.mjs +6 -0
- package/resources/minting/index.mjs.map +1 -0
- package/resources/minting/minting.d.ts +146 -0
- package/resources/minting/minting.d.ts.map +1 -0
- package/resources/minting/minting.js +79 -0
- package/resources/minting/minting.js.map +1 -0
- package/resources/minting/minting.mjs +52 -0
- package/resources/minting/minting.mjs.map +1 -0
- package/resources/minting/status.d.ts +44 -0
- package/resources/minting/status.d.ts.map +1 -0
- package/resources/minting/status.js +33 -0
- package/resources/minting/status.js.map +1 -0
- package/resources/minting/status.mjs +29 -0
- package/resources/minting/status.mjs.map +1 -0
- package/resources/minting.d.ts +1 -94
- package/resources/minting.d.ts.map +1 -1
- package/resources/minting.js +15 -11
- package/resources/minting.js.map +1 -1
- package/resources/minting.mjs +1 -9
- package/resources/minting.mjs.map +1 -1
- package/resources/referral/referral.d.ts +12 -3
- package/resources/referral/referral.d.ts.map +1 -1
- package/resources/referral/referral.js +11 -5
- package/resources/referral/referral.js.map +1 -1
- package/resources/referral/referral.mjs +11 -5
- package/resources/referral/referral.mjs.map +1 -1
- package/resources/referral/users.d.ts +30 -3
- package/resources/referral/users.d.ts.map +1 -1
- package/resources/referral/users.js +12 -4
- package/resources/referral/users.js.map +1 -1
- package/resources/referral/users.mjs +12 -4
- package/resources/referral/users.mjs.map +1 -1
- package/resources/token-claims.d.ts +162 -0
- package/resources/token-claims.d.ts.map +1 -0
- package/resources/token-claims.js +46 -0
- package/resources/token-claims.js.map +1 -0
- package/resources/token-claims.mjs +42 -0
- package/resources/token-claims.mjs.map +1 -0
- package/resources/users/index.d.ts +1 -1
- package/resources/users/index.d.ts.map +1 -1
- package/resources/users/index.js.map +1 -1
- package/resources/users/index.mjs.map +1 -1
- package/resources/users/metadatas.d.ts +40 -3
- package/resources/users/metadatas.d.ts.map +1 -1
- package/resources/users/metadatas.js.map +1 -1
- package/resources/users/metadatas.mjs.map +1 -1
- package/resources/users/users.d.ts +203 -36
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.js +58 -1
- package/resources/users/users.js.map +1 -1
- package/resources/users/users.mjs +58 -1
- package/resources/users/users.mjs.map +1 -1
- package/resources/websites/index.d.ts +1 -1
- package/resources/websites/index.d.ts.map +1 -1
- package/resources/websites/index.js.map +1 -1
- package/resources/websites/index.mjs +1 -1
- package/resources/websites/index.mjs.map +1 -1
- package/resources/websites/website-collections.d.ts +0 -69
- package/resources/websites/website-collections.d.ts.map +1 -1
- package/resources/websites/website-collections.js +0 -16
- package/resources/websites/website-collections.js.map +1 -1
- package/resources/websites/website-collections.mjs +0 -16
- package/resources/websites/website-collections.mjs.map +1 -1
- package/resources/websites/website-user-roles.d.ts +24 -1
- package/resources/websites/website-user-roles.d.ts.map +1 -1
- package/resources/websites/website-user-roles.js +23 -0
- package/resources/websites/website-user-roles.js.map +1 -1
- package/resources/websites/website-user-roles.mjs +23 -0
- package/resources/websites/website-user-roles.mjs.map +1 -1
- package/resources/websites/websites.d.ts +21 -99
- package/resources/websites/websites.d.ts.map +1 -1
- package/resources/websites/websites.js +9 -1
- package/resources/websites/websites.js.map +1 -1
- package/resources/websites/websites.mjs +10 -2
- package/resources/websites/websites.mjs.map +1 -1
- package/src/core.ts +40 -36
- package/src/index.ts +84 -6
- package/src/internal/utils/query.ts +7 -0
- package/src/resource.ts +1 -1
- package/src/resources/assets.ts +18 -3
- package/src/resources/auctions/auctions.ts +523 -0
- package/src/resources/auctions/index.ts +19 -0
- package/src/resources/auctions/website-user-attributes/index.ts +18 -0
- package/src/resources/auctions/website-user-attributes/values.ts +170 -0
- package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +212 -0
- package/src/resources/auctions/website-user-attributes.ts +3 -0
- package/src/resources/auctions.ts +1 -207
- package/src/resources/auth.ts +124 -6
- package/src/resources/index.ts +41 -3
- package/src/resources/loyalty/account-streaks.ts +128 -0
- package/src/resources/loyalty/accounts.ts +65 -18
- package/src/resources/loyalty/badges.ts +1058 -146
- package/src/resources/loyalty/currencies.ts +19 -0
- package/src/resources/loyalty/index.ts +13 -2
- package/src/resources/loyalty/loyalty.ts +30 -12
- package/src/resources/loyalty/multipliers.ts +43 -4
- package/src/resources/loyalty/questions-responses.ts +64 -4
- package/src/resources/loyalty/questions.ts +64 -6
- package/src/resources/loyalty/rule-edits.ts +4208 -94
- package/src/resources/loyalty/rule-groups.ts +473 -64
- package/src/resources/loyalty/rules.ts +3706 -403
- package/src/resources/loyalty/transactions/index.ts +29 -0
- package/src/resources/loyalty/transactions/posts.ts +221 -0
- package/src/resources/loyalty/transactions/rule-statuses.ts +179 -0
- package/src/resources/loyalty/transactions/transactions.ts +930 -0
- package/src/resources/loyalty/transactions.ts +1 -446
- package/src/resources/minting/allowlist.ts +116 -0
- package/src/resources/minting/contracts.ts +415 -0
- package/src/resources/minting/index.ts +29 -0
- package/src/resources/minting/minting.ts +285 -0
- package/src/resources/minting/status.ts +70 -0
- package/src/resources/minting.ts +1 -157
- package/src/resources/referral/referral.ts +15 -11
- package/src/resources/referral/users.ts +45 -5
- package/src/resources/token-claims.ts +311 -0
- package/src/resources/users/index.ts +4 -0
- package/src/resources/users/metadatas.ts +66 -3
- package/src/resources/users/users.ts +277 -39
- package/src/resources/websites/index.ts +1 -6
- package/src/resources/websites/website-collections.ts +1 -146
- package/src/resources/websites/website-user-roles.ts +26 -1
- package/src/resources/websites/websites.ts +22 -127
- 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/loyalty/rule-chains.d.ts +0 -34
- package/resources/loyalty/rule-chains.d.ts.map +0 -1
- package/resources/loyalty/rule-chains.js +0 -15
- package/resources/loyalty/rule-chains.js.map +0 -1
- package/resources/loyalty/rule-chains.mjs +0 -11
- package/resources/loyalty/rule-chains.mjs.map +0 -1
- package/src/resources/loyalty/rule-chains.ts +0 -45
|
@@ -6,7 +6,18 @@ import * as Core from '../../core';
|
|
|
6
6
|
|
|
7
7
|
export class Badges extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* This endpoint allows you to configure a new badge
|
|
9
|
+
* This endpoint allows you to configure a new badge
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const badge = await client.loyalty.badges.create({
|
|
14
|
+
* conditions: [{}],
|
|
15
|
+
* imageUrl: 'https://example.com/image.png',
|
|
16
|
+
* name: 'Example Badge',
|
|
17
|
+
* organizationId: '123e4567-e89b-12d3-a456-426614174222',
|
|
18
|
+
* websiteId: '123e4567-e89b-12d3-a456-426614174111',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
10
21
|
*/
|
|
11
22
|
create(body: BadgeCreateParams, options?: Core.RequestOptions): Core.APIPromise<BadgeCreateResponse> {
|
|
12
23
|
return this._client.post('/api/loyalty/badges', { body, ...options });
|
|
@@ -14,6 +25,13 @@ export class Badges extends APIResource {
|
|
|
14
25
|
|
|
15
26
|
/**
|
|
16
27
|
* This endpoint allows you to update an existing badge.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const badge = await client.loyalty.badges.update(
|
|
32
|
+
* '123e4567-e89b-12d3-a456-426614174333',
|
|
33
|
+
* );
|
|
34
|
+
* ```
|
|
17
35
|
*/
|
|
18
36
|
update(
|
|
19
37
|
id: string,
|
|
@@ -34,6 +52,11 @@ export class Badges extends APIResource {
|
|
|
34
52
|
|
|
35
53
|
/**
|
|
36
54
|
* This endpoint allows you to fetch badge(s) data.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* const badges = await client.loyalty.badges.list();
|
|
59
|
+
* ```
|
|
37
60
|
*/
|
|
38
61
|
list(query?: BadgeListParams, options?: Core.RequestOptions): Core.APIPromise<BadgeListResponse>;
|
|
39
62
|
list(options?: Core.RequestOptions): Core.APIPromise<BadgeListResponse>;
|
|
@@ -49,6 +72,13 @@ export class Badges extends APIResource {
|
|
|
49
72
|
|
|
50
73
|
/**
|
|
51
74
|
* This endpoint allows you to delete a badge.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const badge = await client.loyalty.badges.delete(
|
|
79
|
+
* '123e4567-e89b-12d3-a456-426614174333',
|
|
80
|
+
* );
|
|
81
|
+
* ```
|
|
52
82
|
*/
|
|
53
83
|
delete(id: string, options?: Core.RequestOptions): Core.APIPromise<BadgeDeleteResponse> {
|
|
54
84
|
return this._client.delete(`/api/loyalty/badges/${id}`, options);
|
|
@@ -56,6 +86,13 @@ export class Badges extends APIResource {
|
|
|
56
86
|
|
|
57
87
|
/**
|
|
58
88
|
* This endpoint allows you to revoke a badge from an account
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* const response = await client.loyalty.badges.revoke(
|
|
93
|
+
* '123e4567-e89b-12d3-a456-426614174333',
|
|
94
|
+
* );
|
|
95
|
+
* ```
|
|
59
96
|
*/
|
|
60
97
|
revoke(
|
|
61
98
|
id: string,
|
|
@@ -76,6 +113,13 @@ export class Badges extends APIResource {
|
|
|
76
113
|
|
|
77
114
|
/**
|
|
78
115
|
* This endpoint allows you to reward a badge for an account
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```ts
|
|
119
|
+
* const response = await client.loyalty.badges.reward(
|
|
120
|
+
* '123e4567-e89b-12d3-a456-426614174333',
|
|
121
|
+
* );
|
|
122
|
+
* ```
|
|
79
123
|
*/
|
|
80
124
|
reward(
|
|
81
125
|
id: string,
|
|
@@ -104,6 +148,11 @@ export interface BadgeCreateResponse {
|
|
|
104
148
|
*/
|
|
105
149
|
id: string;
|
|
106
150
|
|
|
151
|
+
/**
|
|
152
|
+
* The date and time the badge was created
|
|
153
|
+
*/
|
|
154
|
+
createdAt: string;
|
|
155
|
+
|
|
107
156
|
/**
|
|
108
157
|
* The description of the badge
|
|
109
158
|
*/
|
|
@@ -124,10 +173,35 @@ export interface BadgeCreateResponse {
|
|
|
124
173
|
*/
|
|
125
174
|
name: string;
|
|
126
175
|
|
|
176
|
+
/**
|
|
177
|
+
* The date and time the badge was updated
|
|
178
|
+
*/
|
|
179
|
+
updatedAt: string;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Array of data jobs associated with the badge
|
|
183
|
+
*/
|
|
184
|
+
dataJobs?: Array<BadgeCreateResponse.DataJob>;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Whether to hide this badge in the user interface
|
|
188
|
+
*/
|
|
189
|
+
hideInUi?: boolean;
|
|
190
|
+
|
|
127
191
|
/**
|
|
128
192
|
* Array of user badges
|
|
129
193
|
*/
|
|
130
|
-
|
|
194
|
+
loyaltyBadgeUsers?: Array<BadgeCreateResponse.LoyaltyBadgeUser>;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Array of loyalty rules associated with the badge
|
|
198
|
+
*/
|
|
199
|
+
loyaltyRules?: Array<BadgeCreateResponse.LoyaltyRule>;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Array of rewards granted when the badge is achieved
|
|
203
|
+
*/
|
|
204
|
+
rewards?: Array<BadgeCreateResponse.Reward>;
|
|
131
205
|
}
|
|
132
206
|
|
|
133
207
|
export namespace BadgeCreateResponse {
|
|
@@ -148,7 +222,7 @@ export namespace BadgeCreateResponse {
|
|
|
148
222
|
association: Array<LoyaltyCondition.Association>;
|
|
149
223
|
|
|
150
224
|
/**
|
|
151
|
-
*
|
|
225
|
+
* URL of the CSV file
|
|
152
226
|
*/
|
|
153
227
|
csvUrl: string | null;
|
|
154
228
|
|
|
@@ -181,6 +255,11 @@ export namespace BadgeCreateResponse {
|
|
|
181
255
|
* The type of the condition
|
|
182
256
|
*/
|
|
183
257
|
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Array of CSV files associated with the condition
|
|
261
|
+
*/
|
|
262
|
+
csvFiles?: Array<LoyaltyCondition.CsvFile>;
|
|
184
263
|
}
|
|
185
264
|
|
|
186
265
|
export namespace LoyaltyCondition {
|
|
@@ -257,6 +336,55 @@ export namespace BadgeCreateResponse {
|
|
|
257
336
|
name: string;
|
|
258
337
|
}
|
|
259
338
|
}
|
|
339
|
+
|
|
340
|
+
export interface CsvFile {
|
|
341
|
+
/**
|
|
342
|
+
* UUID of the CSV file (converted to lowercase)
|
|
343
|
+
*/
|
|
344
|
+
id: string;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* The description of the CSV file
|
|
348
|
+
*/
|
|
349
|
+
description: string | null;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* The name of the CSV file
|
|
353
|
+
*/
|
|
354
|
+
name: string | null;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* The URL of the CSV file
|
|
358
|
+
*/
|
|
359
|
+
url: string | null;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export interface DataJob {
|
|
364
|
+
/**
|
|
365
|
+
* UUID of the data job (converted to lowercase)
|
|
366
|
+
*/
|
|
367
|
+
id: string;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* The date and time the data job was created
|
|
371
|
+
*/
|
|
372
|
+
createdAt: string;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* The status of the data job
|
|
376
|
+
*/
|
|
377
|
+
status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* The date and time the data job was updated
|
|
381
|
+
*/
|
|
382
|
+
updatedAt: string;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* The message associated with the data job
|
|
386
|
+
*/
|
|
387
|
+
message?: string | null;
|
|
260
388
|
}
|
|
261
389
|
|
|
262
390
|
export interface LoyaltyBadgeUser {
|
|
@@ -265,6 +393,11 @@ export namespace BadgeCreateResponse {
|
|
|
265
393
|
*/
|
|
266
394
|
id: string;
|
|
267
395
|
|
|
396
|
+
/**
|
|
397
|
+
* The date and time the user badge was created
|
|
398
|
+
*/
|
|
399
|
+
createdAt: string;
|
|
400
|
+
|
|
268
401
|
/**
|
|
269
402
|
* UUID of the badge (converted to lowercase)
|
|
270
403
|
*/
|
|
@@ -280,6 +413,11 @@ export namespace BadgeCreateResponse {
|
|
|
280
413
|
*/
|
|
281
414
|
status: 'active' | 'inactive' | 'revoked';
|
|
282
415
|
|
|
416
|
+
/**
|
|
417
|
+
* The date and time the user badge was updated
|
|
418
|
+
*/
|
|
419
|
+
updatedAt: string;
|
|
420
|
+
|
|
283
421
|
/**
|
|
284
422
|
* UUID of the user (converted to lowercase)
|
|
285
423
|
*/
|
|
@@ -290,10 +428,97 @@ export namespace BadgeCreateResponse {
|
|
|
290
428
|
*/
|
|
291
429
|
websiteId: string;
|
|
292
430
|
|
|
431
|
+
/**
|
|
432
|
+
* The date and time the user badge was granted
|
|
433
|
+
*/
|
|
434
|
+
completedAt?: string | null;
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Whether the user has dismissed the badge in the UI
|
|
438
|
+
*/
|
|
439
|
+
dismissedInUi?: boolean;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Whether to hide this badge in the user interface
|
|
443
|
+
*/
|
|
444
|
+
hideInUi?: boolean;
|
|
445
|
+
|
|
293
446
|
/**
|
|
294
447
|
* Array of progress for the badge
|
|
295
448
|
*/
|
|
296
449
|
progress?: unknown;
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* User associated with the user badge
|
|
453
|
+
*/
|
|
454
|
+
user?: LoyaltyBadgeUser.User;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
export namespace LoyaltyBadgeUser {
|
|
458
|
+
/**
|
|
459
|
+
* User associated with the user badge
|
|
460
|
+
*/
|
|
461
|
+
export interface User {
|
|
462
|
+
/**
|
|
463
|
+
* UUID of the user (converted to lowercase)
|
|
464
|
+
*/
|
|
465
|
+
id: string;
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Wallet address of the user
|
|
469
|
+
*/
|
|
470
|
+
walletAddress: string;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
export interface LoyaltyRule {
|
|
475
|
+
/**
|
|
476
|
+
* UUID of the loyalty rule (converted to lowercase)
|
|
477
|
+
*/
|
|
478
|
+
id: string;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* The name of the loyalty rule
|
|
482
|
+
*/
|
|
483
|
+
name: string;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
export interface Reward {
|
|
487
|
+
/**
|
|
488
|
+
* UUID of the badge reward
|
|
489
|
+
*/
|
|
490
|
+
id: string;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Points amount to reward (for points reward type)
|
|
494
|
+
*/
|
|
495
|
+
amount: number | null;
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Whether the multiplier should be applied to the user's existing balance
|
|
499
|
+
*/
|
|
500
|
+
isRetroactive: boolean;
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* UUID of the loyalty currency for this reward
|
|
504
|
+
*/
|
|
505
|
+
loyaltyCurrencyId: string | null;
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Multiplier to reward (for multiplier reward type)
|
|
509
|
+
*/
|
|
510
|
+
multiplier: number | null;
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Type of reward (points or multiplier)
|
|
514
|
+
*/
|
|
515
|
+
rewardType: 'points' | 'multiplier' | 'badge';
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Array of loyalty currency IDs for multiplier rewards (empty means all
|
|
519
|
+
* currencies)
|
|
520
|
+
*/
|
|
521
|
+
loyaltyCurrencyIds?: Array<string>;
|
|
297
522
|
}
|
|
298
523
|
}
|
|
299
524
|
|
|
@@ -306,6 +531,11 @@ export interface BadgeUpdateResponse {
|
|
|
306
531
|
*/
|
|
307
532
|
id: string;
|
|
308
533
|
|
|
534
|
+
/**
|
|
535
|
+
* The date and time the badge was created
|
|
536
|
+
*/
|
|
537
|
+
createdAt: string;
|
|
538
|
+
|
|
309
539
|
/**
|
|
310
540
|
* The description of the badge
|
|
311
541
|
*/
|
|
@@ -326,10 +556,35 @@ export interface BadgeUpdateResponse {
|
|
|
326
556
|
*/
|
|
327
557
|
name: string;
|
|
328
558
|
|
|
559
|
+
/**
|
|
560
|
+
* The date and time the badge was updated
|
|
561
|
+
*/
|
|
562
|
+
updatedAt: string;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Array of data jobs associated with the badge
|
|
566
|
+
*/
|
|
567
|
+
dataJobs?: Array<BadgeUpdateResponse.DataJob>;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Whether to hide this badge in the user interface
|
|
571
|
+
*/
|
|
572
|
+
hideInUi?: boolean;
|
|
573
|
+
|
|
329
574
|
/**
|
|
330
575
|
* Array of user badges
|
|
331
576
|
*/
|
|
332
|
-
|
|
577
|
+
loyaltyBadgeUsers?: Array<BadgeUpdateResponse.LoyaltyBadgeUser>;
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Array of loyalty rules associated with the badge
|
|
581
|
+
*/
|
|
582
|
+
loyaltyRules?: Array<BadgeUpdateResponse.LoyaltyRule>;
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Array of rewards granted when the badge is achieved
|
|
586
|
+
*/
|
|
587
|
+
rewards?: Array<BadgeUpdateResponse.Reward>;
|
|
333
588
|
}
|
|
334
589
|
|
|
335
590
|
export namespace BadgeUpdateResponse {
|
|
@@ -350,7 +605,7 @@ export namespace BadgeUpdateResponse {
|
|
|
350
605
|
association: Array<LoyaltyCondition.Association>;
|
|
351
606
|
|
|
352
607
|
/**
|
|
353
|
-
*
|
|
608
|
+
* URL of the CSV file
|
|
354
609
|
*/
|
|
355
610
|
csvUrl: string | null;
|
|
356
611
|
|
|
@@ -383,6 +638,11 @@ export namespace BadgeUpdateResponse {
|
|
|
383
638
|
* The type of the condition
|
|
384
639
|
*/
|
|
385
640
|
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* Array of CSV files associated with the condition
|
|
644
|
+
*/
|
|
645
|
+
csvFiles?: Array<LoyaltyCondition.CsvFile>;
|
|
386
646
|
}
|
|
387
647
|
|
|
388
648
|
export namespace LoyaltyCondition {
|
|
@@ -459,6 +719,55 @@ export namespace BadgeUpdateResponse {
|
|
|
459
719
|
name: string;
|
|
460
720
|
}
|
|
461
721
|
}
|
|
722
|
+
|
|
723
|
+
export interface CsvFile {
|
|
724
|
+
/**
|
|
725
|
+
* UUID of the CSV file (converted to lowercase)
|
|
726
|
+
*/
|
|
727
|
+
id: string;
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* The description of the CSV file
|
|
731
|
+
*/
|
|
732
|
+
description: string | null;
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* The name of the CSV file
|
|
736
|
+
*/
|
|
737
|
+
name: string | null;
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* The URL of the CSV file
|
|
741
|
+
*/
|
|
742
|
+
url: string | null;
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
export interface DataJob {
|
|
747
|
+
/**
|
|
748
|
+
* UUID of the data job (converted to lowercase)
|
|
749
|
+
*/
|
|
750
|
+
id: string;
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* The date and time the data job was created
|
|
754
|
+
*/
|
|
755
|
+
createdAt: string;
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* The status of the data job
|
|
759
|
+
*/
|
|
760
|
+
status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* The date and time the data job was updated
|
|
764
|
+
*/
|
|
765
|
+
updatedAt: string;
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* The message associated with the data job
|
|
769
|
+
*/
|
|
770
|
+
message?: string | null;
|
|
462
771
|
}
|
|
463
772
|
|
|
464
773
|
export interface LoyaltyBadgeUser {
|
|
@@ -467,6 +776,11 @@ export namespace BadgeUpdateResponse {
|
|
|
467
776
|
*/
|
|
468
777
|
id: string;
|
|
469
778
|
|
|
779
|
+
/**
|
|
780
|
+
* The date and time the user badge was created
|
|
781
|
+
*/
|
|
782
|
+
createdAt: string;
|
|
783
|
+
|
|
470
784
|
/**
|
|
471
785
|
* UUID of the badge (converted to lowercase)
|
|
472
786
|
*/
|
|
@@ -482,6 +796,11 @@ export namespace BadgeUpdateResponse {
|
|
|
482
796
|
*/
|
|
483
797
|
status: 'active' | 'inactive' | 'revoked';
|
|
484
798
|
|
|
799
|
+
/**
|
|
800
|
+
* The date and time the user badge was updated
|
|
801
|
+
*/
|
|
802
|
+
updatedAt: string;
|
|
803
|
+
|
|
485
804
|
/**
|
|
486
805
|
* UUID of the user (converted to lowercase)
|
|
487
806
|
*/
|
|
@@ -492,212 +811,491 @@ export namespace BadgeUpdateResponse {
|
|
|
492
811
|
*/
|
|
493
812
|
websiteId: string;
|
|
494
813
|
|
|
814
|
+
/**
|
|
815
|
+
* The date and time the user badge was granted
|
|
816
|
+
*/
|
|
817
|
+
completedAt?: string | null;
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* Whether the user has dismissed the badge in the UI
|
|
821
|
+
*/
|
|
822
|
+
dismissedInUi?: boolean;
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* Whether to hide this badge in the user interface
|
|
826
|
+
*/
|
|
827
|
+
hideInUi?: boolean;
|
|
828
|
+
|
|
495
829
|
/**
|
|
496
830
|
* Array of progress for the badge
|
|
497
831
|
*/
|
|
498
832
|
progress?: unknown;
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* User associated with the user badge
|
|
836
|
+
*/
|
|
837
|
+
user?: LoyaltyBadgeUser.User;
|
|
499
838
|
}
|
|
500
|
-
}
|
|
501
839
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
840
|
+
export namespace LoyaltyBadgeUser {
|
|
841
|
+
/**
|
|
842
|
+
* User associated with the user badge
|
|
843
|
+
*/
|
|
844
|
+
export interface User {
|
|
845
|
+
/**
|
|
846
|
+
* UUID of the user (converted to lowercase)
|
|
847
|
+
*/
|
|
848
|
+
id: string;
|
|
510
849
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
850
|
+
/**
|
|
851
|
+
* Wallet address of the user
|
|
852
|
+
*/
|
|
853
|
+
walletAddress: string;
|
|
854
|
+
}
|
|
855
|
+
}
|
|
515
856
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
857
|
+
export interface LoyaltyRule {
|
|
858
|
+
/**
|
|
859
|
+
* UUID of the loyalty rule (converted to lowercase)
|
|
860
|
+
*/
|
|
861
|
+
id: string;
|
|
520
862
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
863
|
+
/**
|
|
864
|
+
* The name of the loyalty rule
|
|
865
|
+
*/
|
|
866
|
+
name: string;
|
|
867
|
+
}
|
|
525
868
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
869
|
+
export interface Reward {
|
|
870
|
+
/**
|
|
871
|
+
* UUID of the badge reward
|
|
872
|
+
*/
|
|
873
|
+
id: string;
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* Points amount to reward (for points reward type)
|
|
877
|
+
*/
|
|
878
|
+
amount: number | null;
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* Whether the multiplier should be applied to the user's existing balance
|
|
882
|
+
*/
|
|
883
|
+
isRetroactive: boolean;
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* UUID of the loyalty currency for this reward
|
|
887
|
+
*/
|
|
888
|
+
loyaltyCurrencyId: string | null;
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* Multiplier to reward (for multiplier reward type)
|
|
892
|
+
*/
|
|
893
|
+
multiplier: number | null;
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* Type of reward (points or multiplier)
|
|
897
|
+
*/
|
|
898
|
+
rewardType: 'points' | 'multiplier' | 'badge';
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* Array of loyalty currency IDs for multiplier rewards (empty means all
|
|
902
|
+
* currencies)
|
|
903
|
+
*/
|
|
904
|
+
loyaltyCurrencyIds?: Array<string>;
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
export interface BadgeListResponse {
|
|
909
|
+
data: Array<BadgeListResponse.Data>;
|
|
530
910
|
|
|
531
911
|
/**
|
|
532
|
-
*
|
|
912
|
+
* Indicates if there is a next page of results
|
|
533
913
|
*/
|
|
534
|
-
|
|
914
|
+
hasNextPage: boolean;
|
|
535
915
|
}
|
|
536
916
|
|
|
537
917
|
export namespace BadgeListResponse {
|
|
538
918
|
/**
|
|
539
|
-
*
|
|
919
|
+
* Response returned upon successful fetching of the badges.
|
|
540
920
|
*/
|
|
541
|
-
export interface
|
|
921
|
+
export interface Data {
|
|
542
922
|
/**
|
|
543
|
-
* UUID of the
|
|
923
|
+
* UUID of the badge (converted to lowercase)
|
|
544
924
|
*/
|
|
545
925
|
id: string;
|
|
546
926
|
|
|
547
927
|
/**
|
|
548
|
-
* The
|
|
928
|
+
* The date and time the badge was created
|
|
549
929
|
*/
|
|
550
|
-
|
|
930
|
+
createdAt: string;
|
|
551
931
|
|
|
552
|
-
|
|
932
|
+
/**
|
|
933
|
+
* The description of the badge
|
|
934
|
+
*/
|
|
935
|
+
description: string | null;
|
|
553
936
|
|
|
554
937
|
/**
|
|
555
|
-
* The URL of the
|
|
938
|
+
* The URL of the badge image
|
|
556
939
|
*/
|
|
557
|
-
|
|
940
|
+
imageUrl: string | null;
|
|
558
941
|
|
|
559
942
|
/**
|
|
560
|
-
*
|
|
943
|
+
* Array of conditions of the badge
|
|
561
944
|
*/
|
|
562
|
-
|
|
945
|
+
loyaltyConditions: Array<Data.LoyaltyCondition>;
|
|
563
946
|
|
|
564
947
|
/**
|
|
565
|
-
*
|
|
948
|
+
* The name of the badge
|
|
566
949
|
*/
|
|
567
|
-
|
|
950
|
+
name: string;
|
|
568
951
|
|
|
569
952
|
/**
|
|
570
|
-
*
|
|
953
|
+
* The date and time the badge was updated
|
|
571
954
|
*/
|
|
572
|
-
|
|
955
|
+
updatedAt: string;
|
|
573
956
|
|
|
574
957
|
/**
|
|
575
|
-
*
|
|
958
|
+
* Array of data jobs associated with the badge
|
|
576
959
|
*/
|
|
577
|
-
|
|
960
|
+
dataJobs?: Array<Data.DataJob>;
|
|
578
961
|
|
|
579
962
|
/**
|
|
580
|
-
*
|
|
963
|
+
* Whether to hide this badge in the user interface
|
|
581
964
|
*/
|
|
582
|
-
|
|
965
|
+
hideInUi?: boolean;
|
|
583
966
|
|
|
584
967
|
/**
|
|
585
|
-
*
|
|
968
|
+
* Array of user badges
|
|
586
969
|
*/
|
|
587
|
-
|
|
970
|
+
loyaltyBadgeUsers?: Array<Data.LoyaltyBadgeUser>;
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* Array of loyalty rules associated with the badge
|
|
974
|
+
*/
|
|
975
|
+
loyaltyRules?: Array<Data.LoyaltyRule>;
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* Array of rewards granted when the badge is achieved
|
|
979
|
+
*/
|
|
980
|
+
rewards?: Array<Data.Reward>;
|
|
588
981
|
}
|
|
589
982
|
|
|
590
|
-
export namespace
|
|
591
|
-
|
|
592
|
-
|
|
983
|
+
export namespace Data {
|
|
984
|
+
/**
|
|
985
|
+
* Schema for a loyalty condition rule.
|
|
986
|
+
*/
|
|
987
|
+
export interface LoyaltyCondition {
|
|
988
|
+
/**
|
|
989
|
+
* UUID of the condition (converted to lowercase)
|
|
990
|
+
*/
|
|
991
|
+
id: string;
|
|
992
|
+
|
|
993
|
+
/**
|
|
994
|
+
* The amount of the condition
|
|
995
|
+
*/
|
|
996
|
+
amount: number | null;
|
|
997
|
+
|
|
998
|
+
association: Array<LoyaltyCondition.Association>;
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* URL of the CSV file
|
|
1002
|
+
*/
|
|
1003
|
+
csvUrl: string | null;
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* The description of the condition
|
|
1007
|
+
*/
|
|
1008
|
+
description: string | null;
|
|
1009
|
+
|
|
1010
|
+
/**
|
|
1011
|
+
* UUID of the currency (converted to lowercase)
|
|
1012
|
+
*/
|
|
1013
|
+
loyaltyCurrencyId: string | null;
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* UUID of the rule group (converted to lowercase)
|
|
1017
|
+
*/
|
|
1018
|
+
loyaltyRuleGroupId: string | null;
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* The repeat count of the condition
|
|
1022
|
+
*/
|
|
1023
|
+
repeatCount: number | null;
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* The required count of the condition
|
|
1027
|
+
*/
|
|
1028
|
+
requiredCount: number | null;
|
|
1029
|
+
|
|
1030
|
+
/**
|
|
1031
|
+
* The type of the condition
|
|
1032
|
+
*/
|
|
1033
|
+
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
1034
|
+
|
|
1035
|
+
/**
|
|
1036
|
+
* Array of CSV files associated with the condition
|
|
1037
|
+
*/
|
|
1038
|
+
csvFiles?: Array<LoyaltyCondition.CsvFile>;
|
|
1039
|
+
}
|
|
593
1040
|
|
|
594
|
-
|
|
1041
|
+
export namespace LoyaltyCondition {
|
|
1042
|
+
export interface Association {
|
|
1043
|
+
loyaltyBadge: Association.LoyaltyBadge | null;
|
|
595
1044
|
|
|
596
|
-
|
|
1045
|
+
loyaltyCurrency: Association.LoyaltyCurrency | null;
|
|
597
1046
|
|
|
598
|
-
|
|
1047
|
+
loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
|
|
599
1048
|
|
|
600
|
-
|
|
601
|
-
}
|
|
1049
|
+
loyaltyRule: Association.LoyaltyRule | null;
|
|
602
1050
|
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
/**
|
|
606
|
-
* UUID of the association (converted to lowercase)
|
|
607
|
-
*/
|
|
608
|
-
id: string;
|
|
1051
|
+
loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
|
|
1052
|
+
}
|
|
609
1053
|
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
1054
|
+
export namespace Association {
|
|
1055
|
+
export interface LoyaltyBadge {
|
|
1056
|
+
/**
|
|
1057
|
+
* UUID of the association (converted to lowercase)
|
|
1058
|
+
*/
|
|
1059
|
+
id: string;
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* The name of the association
|
|
1063
|
+
*/
|
|
1064
|
+
name: string;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
export interface LoyaltyCurrency {
|
|
1068
|
+
/**
|
|
1069
|
+
* UUID of the association (converted to lowercase)
|
|
1070
|
+
*/
|
|
1071
|
+
id: string;
|
|
1072
|
+
|
|
1073
|
+
/**
|
|
1074
|
+
* The name of the association
|
|
1075
|
+
*/
|
|
1076
|
+
name: string;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
export interface LoyaltyLeaderboardView {
|
|
1080
|
+
/**
|
|
1081
|
+
* UUID of the association (converted to lowercase)
|
|
1082
|
+
*/
|
|
1083
|
+
id: string;
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* The name of the association
|
|
1087
|
+
*/
|
|
1088
|
+
name: string;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
export interface LoyaltyRule {
|
|
1092
|
+
/**
|
|
1093
|
+
* UUID of the association (converted to lowercase)
|
|
1094
|
+
*/
|
|
1095
|
+
id: string;
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* The name of the association
|
|
1099
|
+
*/
|
|
1100
|
+
name: string;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
export interface LoyaltyRuleGroup {
|
|
1104
|
+
/**
|
|
1105
|
+
* UUID of the association (converted to lowercase)
|
|
1106
|
+
*/
|
|
1107
|
+
id: string;
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* The name of the association
|
|
1111
|
+
*/
|
|
1112
|
+
name: string;
|
|
1113
|
+
}
|
|
614
1114
|
}
|
|
615
1115
|
|
|
616
|
-
export interface
|
|
1116
|
+
export interface CsvFile {
|
|
617
1117
|
/**
|
|
618
|
-
* UUID of the
|
|
1118
|
+
* UUID of the CSV file (converted to lowercase)
|
|
619
1119
|
*/
|
|
620
1120
|
id: string;
|
|
621
1121
|
|
|
622
1122
|
/**
|
|
623
|
-
* The
|
|
1123
|
+
* The description of the CSV file
|
|
624
1124
|
*/
|
|
625
|
-
|
|
626
|
-
}
|
|
1125
|
+
description: string | null;
|
|
627
1126
|
|
|
628
|
-
export interface LoyaltyLeaderboardView {
|
|
629
1127
|
/**
|
|
630
|
-
*
|
|
1128
|
+
* The name of the CSV file
|
|
631
1129
|
*/
|
|
632
|
-
|
|
1130
|
+
name: string | null;
|
|
633
1131
|
|
|
634
1132
|
/**
|
|
635
|
-
* The
|
|
1133
|
+
* The URL of the CSV file
|
|
636
1134
|
*/
|
|
637
|
-
|
|
1135
|
+
url: string | null;
|
|
638
1136
|
}
|
|
1137
|
+
}
|
|
639
1138
|
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
1139
|
+
export interface DataJob {
|
|
1140
|
+
/**
|
|
1141
|
+
* UUID of the data job (converted to lowercase)
|
|
1142
|
+
*/
|
|
1143
|
+
id: string;
|
|
1144
|
+
|
|
1145
|
+
/**
|
|
1146
|
+
* The date and time the data job was created
|
|
1147
|
+
*/
|
|
1148
|
+
createdAt: string;
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* The status of the data job
|
|
1152
|
+
*/
|
|
1153
|
+
status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* The date and time the data job was updated
|
|
1157
|
+
*/
|
|
1158
|
+
updatedAt: string;
|
|
1159
|
+
|
|
1160
|
+
/**
|
|
1161
|
+
* The message associated with the data job
|
|
1162
|
+
*/
|
|
1163
|
+
message?: string | null;
|
|
1164
|
+
}
|
|
645
1165
|
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
1166
|
+
export interface LoyaltyBadgeUser {
|
|
1167
|
+
/**
|
|
1168
|
+
* UUID of the user badge (converted to lowercase)
|
|
1169
|
+
*/
|
|
1170
|
+
id: string;
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* The date and time the user badge was created
|
|
1174
|
+
*/
|
|
1175
|
+
createdAt: string;
|
|
1176
|
+
|
|
1177
|
+
/**
|
|
1178
|
+
* UUID of the badge (converted to lowercase)
|
|
1179
|
+
*/
|
|
1180
|
+
loyaltyBadgeId: string;
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* UUID of the organization (converted to lowercase)
|
|
1184
|
+
*/
|
|
1185
|
+
organizationId: string;
|
|
1186
|
+
|
|
1187
|
+
/**
|
|
1188
|
+
* The status of the badge
|
|
1189
|
+
*/
|
|
1190
|
+
status: 'active' | 'inactive' | 'revoked';
|
|
1191
|
+
|
|
1192
|
+
/**
|
|
1193
|
+
* The date and time the user badge was updated
|
|
1194
|
+
*/
|
|
1195
|
+
updatedAt: string;
|
|
1196
|
+
|
|
1197
|
+
/**
|
|
1198
|
+
* UUID of the user (converted to lowercase)
|
|
1199
|
+
*/
|
|
1200
|
+
userId: string;
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* UUID of the website (converted to lowercase)
|
|
1204
|
+
*/
|
|
1205
|
+
websiteId: string;
|
|
1206
|
+
|
|
1207
|
+
/**
|
|
1208
|
+
* The date and time the user badge was granted
|
|
1209
|
+
*/
|
|
1210
|
+
completedAt?: string | null;
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* Whether the user has dismissed the badge in the UI
|
|
1214
|
+
*/
|
|
1215
|
+
dismissedInUi?: boolean;
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* Whether to hide this badge in the user interface
|
|
1219
|
+
*/
|
|
1220
|
+
hideInUi?: boolean;
|
|
1221
|
+
|
|
1222
|
+
/**
|
|
1223
|
+
* Array of progress for the badge
|
|
1224
|
+
*/
|
|
1225
|
+
progress?: unknown;
|
|
1226
|
+
|
|
1227
|
+
/**
|
|
1228
|
+
* User associated with the user badge
|
|
1229
|
+
*/
|
|
1230
|
+
user?: LoyaltyBadgeUser.User;
|
|
1231
|
+
}
|
|
651
1232
|
|
|
652
|
-
|
|
1233
|
+
export namespace LoyaltyBadgeUser {
|
|
1234
|
+
/**
|
|
1235
|
+
* User associated with the user badge
|
|
1236
|
+
*/
|
|
1237
|
+
export interface User {
|
|
653
1238
|
/**
|
|
654
|
-
* UUID of the
|
|
1239
|
+
* UUID of the user (converted to lowercase)
|
|
655
1240
|
*/
|
|
656
1241
|
id: string;
|
|
657
1242
|
|
|
658
1243
|
/**
|
|
659
|
-
*
|
|
1244
|
+
* Wallet address of the user
|
|
660
1245
|
*/
|
|
661
|
-
|
|
1246
|
+
walletAddress: string;
|
|
662
1247
|
}
|
|
663
1248
|
}
|
|
664
|
-
}
|
|
665
1249
|
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
/**
|
|
673
|
-
* UUID of the badge (converted to lowercase)
|
|
674
|
-
*/
|
|
675
|
-
loyaltyBadgeId: string;
|
|
1250
|
+
export interface LoyaltyRule {
|
|
1251
|
+
/**
|
|
1252
|
+
* UUID of the loyalty rule (converted to lowercase)
|
|
1253
|
+
*/
|
|
1254
|
+
id: string;
|
|
676
1255
|
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
/**
|
|
683
|
-
* The status of the badge
|
|
684
|
-
*/
|
|
685
|
-
status: 'active' | 'inactive' | 'revoked';
|
|
686
|
-
|
|
687
|
-
/**
|
|
688
|
-
* UUID of the user (converted to lowercase)
|
|
689
|
-
*/
|
|
690
|
-
userId: string;
|
|
691
|
-
|
|
692
|
-
/**
|
|
693
|
-
* UUID of the website (converted to lowercase)
|
|
694
|
-
*/
|
|
695
|
-
websiteId: string;
|
|
1256
|
+
/**
|
|
1257
|
+
* The name of the loyalty rule
|
|
1258
|
+
*/
|
|
1259
|
+
name: string;
|
|
1260
|
+
}
|
|
696
1261
|
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
1262
|
+
export interface Reward {
|
|
1263
|
+
/**
|
|
1264
|
+
* UUID of the badge reward
|
|
1265
|
+
*/
|
|
1266
|
+
id: string;
|
|
1267
|
+
|
|
1268
|
+
/**
|
|
1269
|
+
* Points amount to reward (for points reward type)
|
|
1270
|
+
*/
|
|
1271
|
+
amount: number | null;
|
|
1272
|
+
|
|
1273
|
+
/**
|
|
1274
|
+
* Whether the multiplier should be applied to the user's existing balance
|
|
1275
|
+
*/
|
|
1276
|
+
isRetroactive: boolean;
|
|
1277
|
+
|
|
1278
|
+
/**
|
|
1279
|
+
* UUID of the loyalty currency for this reward
|
|
1280
|
+
*/
|
|
1281
|
+
loyaltyCurrencyId: string | null;
|
|
1282
|
+
|
|
1283
|
+
/**
|
|
1284
|
+
* Multiplier to reward (for multiplier reward type)
|
|
1285
|
+
*/
|
|
1286
|
+
multiplier: number | null;
|
|
1287
|
+
|
|
1288
|
+
/**
|
|
1289
|
+
* Type of reward (points or multiplier)
|
|
1290
|
+
*/
|
|
1291
|
+
rewardType: 'points' | 'multiplier' | 'badge';
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* Array of loyalty currency IDs for multiplier rewards (empty means all
|
|
1295
|
+
* currencies)
|
|
1296
|
+
*/
|
|
1297
|
+
loyaltyCurrencyIds?: Array<string>;
|
|
1298
|
+
}
|
|
701
1299
|
}
|
|
702
1300
|
}
|
|
703
1301
|
|
|
@@ -710,6 +1308,11 @@ export interface BadgeDeleteResponse {
|
|
|
710
1308
|
*/
|
|
711
1309
|
id: string;
|
|
712
1310
|
|
|
1311
|
+
/**
|
|
1312
|
+
* The date and time the badge was created
|
|
1313
|
+
*/
|
|
1314
|
+
createdAt: string;
|
|
1315
|
+
|
|
713
1316
|
/**
|
|
714
1317
|
* The description of the badge
|
|
715
1318
|
*/
|
|
@@ -730,10 +1333,35 @@ export interface BadgeDeleteResponse {
|
|
|
730
1333
|
*/
|
|
731
1334
|
name: string;
|
|
732
1335
|
|
|
1336
|
+
/**
|
|
1337
|
+
* The date and time the badge was updated
|
|
1338
|
+
*/
|
|
1339
|
+
updatedAt: string;
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* Array of data jobs associated with the badge
|
|
1343
|
+
*/
|
|
1344
|
+
dataJobs?: Array<BadgeDeleteResponse.DataJob>;
|
|
1345
|
+
|
|
1346
|
+
/**
|
|
1347
|
+
* Whether to hide this badge in the user interface
|
|
1348
|
+
*/
|
|
1349
|
+
hideInUi?: boolean;
|
|
1350
|
+
|
|
733
1351
|
/**
|
|
734
1352
|
* Array of user badges
|
|
735
1353
|
*/
|
|
736
|
-
|
|
1354
|
+
loyaltyBadgeUsers?: Array<BadgeDeleteResponse.LoyaltyBadgeUser>;
|
|
1355
|
+
|
|
1356
|
+
/**
|
|
1357
|
+
* Array of loyalty rules associated with the badge
|
|
1358
|
+
*/
|
|
1359
|
+
loyaltyRules?: Array<BadgeDeleteResponse.LoyaltyRule>;
|
|
1360
|
+
|
|
1361
|
+
/**
|
|
1362
|
+
* Array of rewards granted when the badge is achieved
|
|
1363
|
+
*/
|
|
1364
|
+
rewards?: Array<BadgeDeleteResponse.Reward>;
|
|
737
1365
|
}
|
|
738
1366
|
|
|
739
1367
|
export namespace BadgeDeleteResponse {
|
|
@@ -754,7 +1382,7 @@ export namespace BadgeDeleteResponse {
|
|
|
754
1382
|
association: Array<LoyaltyCondition.Association>;
|
|
755
1383
|
|
|
756
1384
|
/**
|
|
757
|
-
*
|
|
1385
|
+
* URL of the CSV file
|
|
758
1386
|
*/
|
|
759
1387
|
csvUrl: string | null;
|
|
760
1388
|
|
|
@@ -787,6 +1415,11 @@ export namespace BadgeDeleteResponse {
|
|
|
787
1415
|
* The type of the condition
|
|
788
1416
|
*/
|
|
789
1417
|
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
1418
|
+
|
|
1419
|
+
/**
|
|
1420
|
+
* Array of CSV files associated with the condition
|
|
1421
|
+
*/
|
|
1422
|
+
csvFiles?: Array<LoyaltyCondition.CsvFile>;
|
|
790
1423
|
}
|
|
791
1424
|
|
|
792
1425
|
export namespace LoyaltyCondition {
|
|
@@ -863,6 +1496,55 @@ export namespace BadgeDeleteResponse {
|
|
|
863
1496
|
name: string;
|
|
864
1497
|
}
|
|
865
1498
|
}
|
|
1499
|
+
|
|
1500
|
+
export interface CsvFile {
|
|
1501
|
+
/**
|
|
1502
|
+
* UUID of the CSV file (converted to lowercase)
|
|
1503
|
+
*/
|
|
1504
|
+
id: string;
|
|
1505
|
+
|
|
1506
|
+
/**
|
|
1507
|
+
* The description of the CSV file
|
|
1508
|
+
*/
|
|
1509
|
+
description: string | null;
|
|
1510
|
+
|
|
1511
|
+
/**
|
|
1512
|
+
* The name of the CSV file
|
|
1513
|
+
*/
|
|
1514
|
+
name: string | null;
|
|
1515
|
+
|
|
1516
|
+
/**
|
|
1517
|
+
* The URL of the CSV file
|
|
1518
|
+
*/
|
|
1519
|
+
url: string | null;
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
export interface DataJob {
|
|
1524
|
+
/**
|
|
1525
|
+
* UUID of the data job (converted to lowercase)
|
|
1526
|
+
*/
|
|
1527
|
+
id: string;
|
|
1528
|
+
|
|
1529
|
+
/**
|
|
1530
|
+
* The date and time the data job was created
|
|
1531
|
+
*/
|
|
1532
|
+
createdAt: string;
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* The status of the data job
|
|
1536
|
+
*/
|
|
1537
|
+
status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
|
|
1538
|
+
|
|
1539
|
+
/**
|
|
1540
|
+
* The date and time the data job was updated
|
|
1541
|
+
*/
|
|
1542
|
+
updatedAt: string;
|
|
1543
|
+
|
|
1544
|
+
/**
|
|
1545
|
+
* The message associated with the data job
|
|
1546
|
+
*/
|
|
1547
|
+
message?: string | null;
|
|
866
1548
|
}
|
|
867
1549
|
|
|
868
1550
|
export interface LoyaltyBadgeUser {
|
|
@@ -871,6 +1553,11 @@ export namespace BadgeDeleteResponse {
|
|
|
871
1553
|
*/
|
|
872
1554
|
id: string;
|
|
873
1555
|
|
|
1556
|
+
/**
|
|
1557
|
+
* The date and time the user badge was created
|
|
1558
|
+
*/
|
|
1559
|
+
createdAt: string;
|
|
1560
|
+
|
|
874
1561
|
/**
|
|
875
1562
|
* UUID of the badge (converted to lowercase)
|
|
876
1563
|
*/
|
|
@@ -886,6 +1573,11 @@ export namespace BadgeDeleteResponse {
|
|
|
886
1573
|
*/
|
|
887
1574
|
status: 'active' | 'inactive' | 'revoked';
|
|
888
1575
|
|
|
1576
|
+
/**
|
|
1577
|
+
* The date and time the user badge was updated
|
|
1578
|
+
*/
|
|
1579
|
+
updatedAt: string;
|
|
1580
|
+
|
|
889
1581
|
/**
|
|
890
1582
|
* UUID of the user (converted to lowercase)
|
|
891
1583
|
*/
|
|
@@ -896,10 +1588,97 @@ export namespace BadgeDeleteResponse {
|
|
|
896
1588
|
*/
|
|
897
1589
|
websiteId: string;
|
|
898
1590
|
|
|
1591
|
+
/**
|
|
1592
|
+
* The date and time the user badge was granted
|
|
1593
|
+
*/
|
|
1594
|
+
completedAt?: string | null;
|
|
1595
|
+
|
|
1596
|
+
/**
|
|
1597
|
+
* Whether the user has dismissed the badge in the UI
|
|
1598
|
+
*/
|
|
1599
|
+
dismissedInUi?: boolean;
|
|
1600
|
+
|
|
1601
|
+
/**
|
|
1602
|
+
* Whether to hide this badge in the user interface
|
|
1603
|
+
*/
|
|
1604
|
+
hideInUi?: boolean;
|
|
1605
|
+
|
|
899
1606
|
/**
|
|
900
1607
|
* Array of progress for the badge
|
|
901
1608
|
*/
|
|
902
1609
|
progress?: unknown;
|
|
1610
|
+
|
|
1611
|
+
/**
|
|
1612
|
+
* User associated with the user badge
|
|
1613
|
+
*/
|
|
1614
|
+
user?: LoyaltyBadgeUser.User;
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
export namespace LoyaltyBadgeUser {
|
|
1618
|
+
/**
|
|
1619
|
+
* User associated with the user badge
|
|
1620
|
+
*/
|
|
1621
|
+
export interface User {
|
|
1622
|
+
/**
|
|
1623
|
+
* UUID of the user (converted to lowercase)
|
|
1624
|
+
*/
|
|
1625
|
+
id: string;
|
|
1626
|
+
|
|
1627
|
+
/**
|
|
1628
|
+
* Wallet address of the user
|
|
1629
|
+
*/
|
|
1630
|
+
walletAddress: string;
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
export interface LoyaltyRule {
|
|
1635
|
+
/**
|
|
1636
|
+
* UUID of the loyalty rule (converted to lowercase)
|
|
1637
|
+
*/
|
|
1638
|
+
id: string;
|
|
1639
|
+
|
|
1640
|
+
/**
|
|
1641
|
+
* The name of the loyalty rule
|
|
1642
|
+
*/
|
|
1643
|
+
name: string;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
export interface Reward {
|
|
1647
|
+
/**
|
|
1648
|
+
* UUID of the badge reward
|
|
1649
|
+
*/
|
|
1650
|
+
id: string;
|
|
1651
|
+
|
|
1652
|
+
/**
|
|
1653
|
+
* Points amount to reward (for points reward type)
|
|
1654
|
+
*/
|
|
1655
|
+
amount: number | null;
|
|
1656
|
+
|
|
1657
|
+
/**
|
|
1658
|
+
* Whether the multiplier should be applied to the user's existing balance
|
|
1659
|
+
*/
|
|
1660
|
+
isRetroactive: boolean;
|
|
1661
|
+
|
|
1662
|
+
/**
|
|
1663
|
+
* UUID of the loyalty currency for this reward
|
|
1664
|
+
*/
|
|
1665
|
+
loyaltyCurrencyId: string | null;
|
|
1666
|
+
|
|
1667
|
+
/**
|
|
1668
|
+
* Multiplier to reward (for multiplier reward type)
|
|
1669
|
+
*/
|
|
1670
|
+
multiplier: number | null;
|
|
1671
|
+
|
|
1672
|
+
/**
|
|
1673
|
+
* Type of reward (points or multiplier)
|
|
1674
|
+
*/
|
|
1675
|
+
rewardType: 'points' | 'multiplier' | 'badge';
|
|
1676
|
+
|
|
1677
|
+
/**
|
|
1678
|
+
* Array of loyalty currency IDs for multiplier rewards (empty means all
|
|
1679
|
+
* currencies)
|
|
1680
|
+
*/
|
|
1681
|
+
loyaltyCurrencyIds?: Array<string>;
|
|
903
1682
|
}
|
|
904
1683
|
}
|
|
905
1684
|
|
|
@@ -952,6 +1731,11 @@ export namespace BadgeRewardResponse {
|
|
|
952
1731
|
}
|
|
953
1732
|
|
|
954
1733
|
export interface BadgeCreateParams {
|
|
1734
|
+
/**
|
|
1735
|
+
* Array of conditions for the badge
|
|
1736
|
+
*/
|
|
1737
|
+
conditions: Array<BadgeCreateParams.Condition>;
|
|
1738
|
+
|
|
955
1739
|
/**
|
|
956
1740
|
* The URL of the badge image
|
|
957
1741
|
*/
|
|
@@ -967,29 +1751,31 @@ export interface BadgeCreateParams {
|
|
|
967
1751
|
*/
|
|
968
1752
|
organizationId: string;
|
|
969
1753
|
|
|
970
|
-
/**
|
|
971
|
-
* Array of rules for the badge
|
|
972
|
-
*/
|
|
973
|
-
rules: Array<BadgeCreateParams.Rule>;
|
|
974
|
-
|
|
975
1754
|
/**
|
|
976
1755
|
* UUID of the website (optional, converted to lowercase)
|
|
977
1756
|
*/
|
|
978
1757
|
websiteId: string;
|
|
979
1758
|
|
|
1759
|
+
csvFiles?: Array<BadgeCreateParams.CsvFile>;
|
|
1760
|
+
|
|
980
1761
|
/**
|
|
981
1762
|
* The description of the badge
|
|
982
1763
|
*/
|
|
983
1764
|
description?: string;
|
|
1765
|
+
|
|
1766
|
+
/**
|
|
1767
|
+
* Whether to hide this badge in the user interface
|
|
1768
|
+
*/
|
|
1769
|
+
hideInUi?: boolean;
|
|
1770
|
+
|
|
1771
|
+
/**
|
|
1772
|
+
* Array of rewards granted when the badge is achieved
|
|
1773
|
+
*/
|
|
1774
|
+
rewards?: Array<BadgeCreateParams.Reward>;
|
|
984
1775
|
}
|
|
985
1776
|
|
|
986
1777
|
export namespace BadgeCreateParams {
|
|
987
|
-
export interface
|
|
988
|
-
/**
|
|
989
|
-
* The type of rule
|
|
990
|
-
*/
|
|
991
|
-
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
992
|
-
|
|
1778
|
+
export interface Condition {
|
|
993
1779
|
/**
|
|
994
1780
|
* The amount of the rule
|
|
995
1781
|
*/
|
|
@@ -1023,7 +1809,7 @@ export namespace BadgeCreateParams {
|
|
|
1023
1809
|
/**
|
|
1024
1810
|
* UUID of the loyalty rule chain (optional, converted to lowercase)
|
|
1025
1811
|
*/
|
|
1026
|
-
loyaltyRuleChainId?: string;
|
|
1812
|
+
loyaltyRuleChainId?: string | null;
|
|
1027
1813
|
|
|
1028
1814
|
/**
|
|
1029
1815
|
* Array of UUIDs of the rule group (optional, converted to lowercase)
|
|
@@ -1044,15 +1830,68 @@ export namespace BadgeCreateParams {
|
|
|
1044
1830
|
* The number of rules that need to be fulfilled to satisfy the condition
|
|
1045
1831
|
*/
|
|
1046
1832
|
requiredCount?: number | null;
|
|
1833
|
+
|
|
1834
|
+
/**
|
|
1835
|
+
* The type of rule
|
|
1836
|
+
*/
|
|
1837
|
+
type?: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
export interface CsvFile {
|
|
1841
|
+
src: string;
|
|
1842
|
+
|
|
1843
|
+
description?: string;
|
|
1844
|
+
|
|
1845
|
+
name?: string;
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
export interface Reward {
|
|
1849
|
+
/**
|
|
1850
|
+
* Type of reward (points or multiplier)
|
|
1851
|
+
*/
|
|
1852
|
+
rewardType: 'points' | 'multiplier' | 'badge';
|
|
1853
|
+
|
|
1854
|
+
/**
|
|
1855
|
+
* Points amount to reward (for points reward type)
|
|
1856
|
+
*/
|
|
1857
|
+
amount?: number;
|
|
1858
|
+
|
|
1859
|
+
/**
|
|
1860
|
+
* Whether the multiplier should be applied to the user's existing balance
|
|
1861
|
+
*/
|
|
1862
|
+
isRetroactive?: boolean;
|
|
1863
|
+
|
|
1864
|
+
/**
|
|
1865
|
+
* UUID of the loyalty currency for this reward
|
|
1866
|
+
*/
|
|
1867
|
+
loyaltyCurrencyId?: string;
|
|
1868
|
+
|
|
1869
|
+
/**
|
|
1870
|
+
* Array of loyalty currency IDs for multiplier rewards (empty means all
|
|
1871
|
+
* currencies)
|
|
1872
|
+
*/
|
|
1873
|
+
loyaltyCurrencyIds?: Array<string>;
|
|
1874
|
+
|
|
1875
|
+
/**
|
|
1876
|
+
* Multiplier to reward (for multiplier reward type)
|
|
1877
|
+
*/
|
|
1878
|
+
multiplier?: number;
|
|
1047
1879
|
}
|
|
1048
1880
|
}
|
|
1049
1881
|
|
|
1050
1882
|
export interface BadgeUpdateParams {
|
|
1883
|
+
csvFiles?: Array<BadgeUpdateParams.CsvFile>;
|
|
1884
|
+
|
|
1051
1885
|
/**
|
|
1052
1886
|
* The description of the badge
|
|
1053
1887
|
*/
|
|
1054
1888
|
description?: string;
|
|
1055
1889
|
|
|
1890
|
+
/**
|
|
1891
|
+
* Whether to hide this badge in the user interface
|
|
1892
|
+
*/
|
|
1893
|
+
hideInUi?: boolean;
|
|
1894
|
+
|
|
1056
1895
|
/**
|
|
1057
1896
|
* The URL of the badge image
|
|
1058
1897
|
*/
|
|
@@ -1062,18 +1901,66 @@ export interface BadgeUpdateParams {
|
|
|
1062
1901
|
* The name of the badge
|
|
1063
1902
|
*/
|
|
1064
1903
|
name?: string;
|
|
1904
|
+
|
|
1905
|
+
/**
|
|
1906
|
+
* Array of rewards granted when the badge is achieved
|
|
1907
|
+
*/
|
|
1908
|
+
rewards?: Array<BadgeUpdateParams.Reward>;
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
export namespace BadgeUpdateParams {
|
|
1912
|
+
export interface CsvFile {
|
|
1913
|
+
src: string;
|
|
1914
|
+
|
|
1915
|
+
description?: string;
|
|
1916
|
+
|
|
1917
|
+
name?: string;
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
export interface Reward {
|
|
1921
|
+
/**
|
|
1922
|
+
* Type of reward (points or multiplier)
|
|
1923
|
+
*/
|
|
1924
|
+
rewardType: 'points' | 'multiplier' | 'badge';
|
|
1925
|
+
|
|
1926
|
+
/**
|
|
1927
|
+
* Points amount to reward (for points reward type)
|
|
1928
|
+
*/
|
|
1929
|
+
amount?: number;
|
|
1930
|
+
|
|
1931
|
+
/**
|
|
1932
|
+
* Whether the multiplier should be applied to the user's existing balance
|
|
1933
|
+
*/
|
|
1934
|
+
isRetroactive?: boolean;
|
|
1935
|
+
|
|
1936
|
+
/**
|
|
1937
|
+
* UUID of the loyalty currency for this reward
|
|
1938
|
+
*/
|
|
1939
|
+
loyaltyCurrencyId?: string;
|
|
1940
|
+
|
|
1941
|
+
/**
|
|
1942
|
+
* Array of loyalty currency IDs for multiplier rewards (empty means all
|
|
1943
|
+
* currencies)
|
|
1944
|
+
*/
|
|
1945
|
+
loyaltyCurrencyIds?: Array<string>;
|
|
1946
|
+
|
|
1947
|
+
/**
|
|
1948
|
+
* Multiplier to reward (for multiplier reward type)
|
|
1949
|
+
*/
|
|
1950
|
+
multiplier?: number;
|
|
1951
|
+
}
|
|
1065
1952
|
}
|
|
1066
1953
|
|
|
1067
1954
|
export interface BadgeListParams {
|
|
1068
1955
|
/**
|
|
1069
1956
|
* Array of badge IDs (converted to lowercase) to fetch
|
|
1070
1957
|
*/
|
|
1071
|
-
badgeIds?: Array<string>;
|
|
1958
|
+
badgeIds?: string | Array<string>;
|
|
1072
1959
|
|
|
1073
1960
|
/**
|
|
1074
1961
|
* Include deleted badges in the response
|
|
1075
1962
|
*/
|
|
1076
|
-
includeDeleted?: boolean
|
|
1963
|
+
includeDeleted?: boolean;
|
|
1077
1964
|
|
|
1078
1965
|
/**
|
|
1079
1966
|
* Number of badges to fetch
|
|
@@ -1091,9 +1978,24 @@ export interface BadgeListParams {
|
|
|
1091
1978
|
startingAfter?: string;
|
|
1092
1979
|
|
|
1093
1980
|
/**
|
|
1094
|
-
*
|
|
1981
|
+
* External identifier of the user group
|
|
1095
1982
|
*/
|
|
1096
|
-
|
|
1983
|
+
userGroupExternalIdentifier?: string;
|
|
1984
|
+
|
|
1985
|
+
/**
|
|
1986
|
+
* UUID of the user group
|
|
1987
|
+
*/
|
|
1988
|
+
userGroupId?: string;
|
|
1989
|
+
|
|
1990
|
+
/**
|
|
1991
|
+
* UUID of the user, or array of UUID.
|
|
1992
|
+
*/
|
|
1993
|
+
userId?: string | Array<string>;
|
|
1994
|
+
|
|
1995
|
+
/**
|
|
1996
|
+
* Wallet Address of the user, or array of wallet addresses.
|
|
1997
|
+
*/
|
|
1998
|
+
walletAddress?: string | Array<string>;
|
|
1097
1999
|
|
|
1098
2000
|
/**
|
|
1099
2001
|
* UUID of the website (optional, converted to lowercase)
|
|
@@ -1102,6 +2004,11 @@ export interface BadgeListParams {
|
|
|
1102
2004
|
}
|
|
1103
2005
|
|
|
1104
2006
|
export interface BadgeRevokeParams {
|
|
2007
|
+
/**
|
|
2008
|
+
* Status of the badge
|
|
2009
|
+
*/
|
|
2010
|
+
status?: 'active' | 'inactive' | 'revoked';
|
|
2011
|
+
|
|
1105
2012
|
/**
|
|
1106
2013
|
* UUID of the user (converted to lowercase)
|
|
1107
2014
|
*/
|
|
@@ -1114,6 +2021,11 @@ export interface BadgeRevokeParams {
|
|
|
1114
2021
|
}
|
|
1115
2022
|
|
|
1116
2023
|
export interface BadgeRewardParams {
|
|
2024
|
+
/**
|
|
2025
|
+
* Status of the badge
|
|
2026
|
+
*/
|
|
2027
|
+
status?: 'active' | 'inactive' | 'revoked';
|
|
2028
|
+
|
|
1117
2029
|
/**
|
|
1118
2030
|
* UUID of the user (converted to lowercase)
|
|
1119
2031
|
*/
|