@snagsolutions/sdk 0.1.0-alpha.21 → 0.1.0-alpha.211
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 +1711 -0
- package/LICENSE +1 -1
- package/README.md +15 -23
- package/core.d.ts +19 -5
- package/core.d.ts.map +1 -1
- package/core.js +24 -17
- package/core.js.map +1 -1
- package/core.mjs +24 -17
- package/core.mjs.map +1 -1
- package/index.d.mts +7 -4
- package/index.d.ts +7 -4
- package/index.d.ts.map +1 -1
- package/index.js +8 -4
- package/index.js.map +1 -1
- package/index.mjs +8 -4
- 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 +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 +368 -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 +17 -4
- package/resources/auth.d.ts.map +1 -1
- package/resources/auth.js.map +1 -1
- package/resources/auth.mjs.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- 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 +666 -135
- 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 +4 -4
- 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 +3 -3
- package/resources/loyalty/index.mjs.map +1 -1
- package/resources/loyalty/loyalty.d.ts +11 -11
- 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 +7 -7
- 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 +2730 -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 +302 -62
- package/resources/loyalty/rule-groups.d.ts.map +1 -1
- package/resources/loyalty/rule-groups.js +38 -2
- package/resources/loyalty/rule-groups.js.map +1 -1
- package/resources/loyalty/rule-groups.mjs +38 -2
- package/resources/loyalty/rule-groups.mjs.map +1 -1
- package/resources/loyalty/rules.d.ts +2024 -258
- 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 +1 -248
- 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.d.ts +5 -5
- package/resources/minting.d.ts.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/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 +36 -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 +192 -35
- 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/website-collections.d.ts +22 -1
- package/resources/websites/website-collections.d.ts.map +1 -1
- package/resources/websites/website-collections.js +21 -0
- package/resources/websites/website-collections.js.map +1 -1
- package/resources/websites/website-collections.mjs +21 -0
- 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 +12 -0
- package/resources/websites/websites.d.ts.map +1 -1
- package/resources/websites/websites.js +7 -0
- package/resources/websites/websites.js.map +1 -1
- package/resources/websites/websites.mjs +7 -0
- package/resources/websites/websites.mjs.map +1 -1
- package/src/core.ts +39 -16
- package/src/index.ts +31 -2
- package/src/resource.ts +1 -1
- package/src/resources/assets.ts +18 -3
- package/src/resources/auctions/auctions.ts +561 -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 +21 -5
- package/src/resources/index.ts +12 -1
- package/src/resources/loyalty/account-streaks.ts +128 -0
- package/src/resources/loyalty/accounts.ts +65 -18
- package/src/resources/loyalty/badges.ts +790 -146
- package/src/resources/loyalty/currencies.ts +19 -0
- package/src/resources/loyalty/index.ts +19 -3
- package/src/resources/loyalty/loyalty.ts +39 -15
- 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 +3962 -100
- package/src/resources/loyalty/rule-groups.ts +530 -74
- package/src/resources/loyalty/rules.ts +3162 -295
- 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 +699 -0
- package/src/resources/loyalty/transactions.ts +1 -440
- package/src/resources/minting.ts +25 -5
- package/src/resources/referral/referral.ts +15 -11
- package/src/resources/referral/users.ts +45 -5
- package/src/resources/users/index.ts +4 -0
- package/src/resources/users/metadatas.ts +61 -3
- package/src/resources/users/users.ts +259 -38
- package/src/resources/websites/website-collections.ts +42 -1
- package/src/resources/websites/website-user-roles.ts +25 -1
- package/src/resources/websites/websites.ts +12 -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/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
|
@@ -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>;
|
|
@@ -38,6 +82,10 @@ export interface BadgeCreateResponse {
|
|
|
38
82
|
* UUID of the badge (converted to lowercase)
|
|
39
83
|
*/
|
|
40
84
|
id: string;
|
|
85
|
+
/**
|
|
86
|
+
* The date and time the badge was created
|
|
87
|
+
*/
|
|
88
|
+
createdAt: string;
|
|
41
89
|
/**
|
|
42
90
|
* The description of the badge
|
|
43
91
|
*/
|
|
@@ -54,10 +102,26 @@ export interface BadgeCreateResponse {
|
|
|
54
102
|
* The name of the badge
|
|
55
103
|
*/
|
|
56
104
|
name: string;
|
|
105
|
+
/**
|
|
106
|
+
* The date and time the badge was updated
|
|
107
|
+
*/
|
|
108
|
+
updatedAt: string;
|
|
109
|
+
/**
|
|
110
|
+
* Array of data jobs associated with the badge
|
|
111
|
+
*/
|
|
112
|
+
dataJobs?: Array<BadgeCreateResponse.DataJob>;
|
|
113
|
+
/**
|
|
114
|
+
* Whether to hide this badge in the user interface
|
|
115
|
+
*/
|
|
116
|
+
hideInUi?: boolean;
|
|
57
117
|
/**
|
|
58
118
|
* Array of user badges
|
|
59
119
|
*/
|
|
60
|
-
|
|
120
|
+
loyaltyBadgeUsers?: Array<BadgeCreateResponse.LoyaltyBadgeUser>;
|
|
121
|
+
/**
|
|
122
|
+
* Array of loyalty rules associated with the badge
|
|
123
|
+
*/
|
|
124
|
+
loyaltyRules?: Array<BadgeCreateResponse.LoyaltyRule>;
|
|
61
125
|
}
|
|
62
126
|
export declare namespace BadgeCreateResponse {
|
|
63
127
|
/**
|
|
@@ -74,7 +138,7 @@ export declare namespace BadgeCreateResponse {
|
|
|
74
138
|
amount: number | null;
|
|
75
139
|
association: Array<LoyaltyCondition.Association>;
|
|
76
140
|
/**
|
|
77
|
-
*
|
|
141
|
+
* URL of the CSV file
|
|
78
142
|
*/
|
|
79
143
|
csvUrl: string | null;
|
|
80
144
|
/**
|
|
@@ -101,6 +165,10 @@ export declare namespace BadgeCreateResponse {
|
|
|
101
165
|
* The type of the condition
|
|
102
166
|
*/
|
|
103
167
|
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
168
|
+
/**
|
|
169
|
+
* Array of CSV files associated with the condition
|
|
170
|
+
*/
|
|
171
|
+
csvFiles?: Array<LoyaltyCondition.CsvFile>;
|
|
104
172
|
}
|
|
105
173
|
namespace LoyaltyCondition {
|
|
106
174
|
interface Association {
|
|
@@ -162,12 +230,56 @@ export declare namespace BadgeCreateResponse {
|
|
|
162
230
|
name: string;
|
|
163
231
|
}
|
|
164
232
|
}
|
|
233
|
+
interface CsvFile {
|
|
234
|
+
/**
|
|
235
|
+
* UUID of the CSV file (converted to lowercase)
|
|
236
|
+
*/
|
|
237
|
+
id: string;
|
|
238
|
+
/**
|
|
239
|
+
* The description of the CSV file
|
|
240
|
+
*/
|
|
241
|
+
description: string | null;
|
|
242
|
+
/**
|
|
243
|
+
* The name of the CSV file
|
|
244
|
+
*/
|
|
245
|
+
name: string | null;
|
|
246
|
+
/**
|
|
247
|
+
* The URL of the CSV file
|
|
248
|
+
*/
|
|
249
|
+
url: string | null;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
interface DataJob {
|
|
253
|
+
/**
|
|
254
|
+
* UUID of the data job (converted to lowercase)
|
|
255
|
+
*/
|
|
256
|
+
id: string;
|
|
257
|
+
/**
|
|
258
|
+
* The date and time the data job was created
|
|
259
|
+
*/
|
|
260
|
+
createdAt: string;
|
|
261
|
+
/**
|
|
262
|
+
* The status of the data job
|
|
263
|
+
*/
|
|
264
|
+
status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
|
|
265
|
+
/**
|
|
266
|
+
* The date and time the data job was updated
|
|
267
|
+
*/
|
|
268
|
+
updatedAt: string;
|
|
269
|
+
/**
|
|
270
|
+
* The message associated with the data job
|
|
271
|
+
*/
|
|
272
|
+
message?: string | null;
|
|
165
273
|
}
|
|
166
274
|
interface LoyaltyBadgeUser {
|
|
167
275
|
/**
|
|
168
276
|
* UUID of the user badge (converted to lowercase)
|
|
169
277
|
*/
|
|
170
278
|
id: string;
|
|
279
|
+
/**
|
|
280
|
+
* The date and time the user badge was created
|
|
281
|
+
*/
|
|
282
|
+
createdAt: string;
|
|
171
283
|
/**
|
|
172
284
|
* UUID of the badge (converted to lowercase)
|
|
173
285
|
*/
|
|
@@ -180,6 +292,10 @@ export declare namespace BadgeCreateResponse {
|
|
|
180
292
|
* The status of the badge
|
|
181
293
|
*/
|
|
182
294
|
status: 'active' | 'inactive' | 'revoked';
|
|
295
|
+
/**
|
|
296
|
+
* The date and time the user badge was updated
|
|
297
|
+
*/
|
|
298
|
+
updatedAt: string;
|
|
183
299
|
/**
|
|
184
300
|
* UUID of the user (converted to lowercase)
|
|
185
301
|
*/
|
|
@@ -188,10 +304,47 @@ export declare namespace BadgeCreateResponse {
|
|
|
188
304
|
* UUID of the website (converted to lowercase)
|
|
189
305
|
*/
|
|
190
306
|
websiteId: string;
|
|
307
|
+
/**
|
|
308
|
+
* Whether the user has dismissed the badge in the UI
|
|
309
|
+
*/
|
|
310
|
+
dismissedInUi?: boolean;
|
|
311
|
+
/**
|
|
312
|
+
* Whether to hide this badge in the user interface
|
|
313
|
+
*/
|
|
314
|
+
hideInUi?: boolean;
|
|
191
315
|
/**
|
|
192
316
|
* Array of progress for the badge
|
|
193
317
|
*/
|
|
194
318
|
progress?: unknown;
|
|
319
|
+
/**
|
|
320
|
+
* User associated with the user badge
|
|
321
|
+
*/
|
|
322
|
+
user?: LoyaltyBadgeUser.User;
|
|
323
|
+
}
|
|
324
|
+
namespace LoyaltyBadgeUser {
|
|
325
|
+
/**
|
|
326
|
+
* User associated with the user badge
|
|
327
|
+
*/
|
|
328
|
+
interface User {
|
|
329
|
+
/**
|
|
330
|
+
* UUID of the user (converted to lowercase)
|
|
331
|
+
*/
|
|
332
|
+
id: string;
|
|
333
|
+
/**
|
|
334
|
+
* Wallet address of the user
|
|
335
|
+
*/
|
|
336
|
+
walletAddress: string;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
interface LoyaltyRule {
|
|
340
|
+
/**
|
|
341
|
+
* UUID of the loyalty rule (converted to lowercase)
|
|
342
|
+
*/
|
|
343
|
+
id: string;
|
|
344
|
+
/**
|
|
345
|
+
* The name of the loyalty rule
|
|
346
|
+
*/
|
|
347
|
+
name: string;
|
|
195
348
|
}
|
|
196
349
|
}
|
|
197
350
|
/**
|
|
@@ -202,6 +355,10 @@ export interface BadgeUpdateResponse {
|
|
|
202
355
|
* UUID of the badge (converted to lowercase)
|
|
203
356
|
*/
|
|
204
357
|
id: string;
|
|
358
|
+
/**
|
|
359
|
+
* The date and time the badge was created
|
|
360
|
+
*/
|
|
361
|
+
createdAt: string;
|
|
205
362
|
/**
|
|
206
363
|
* The description of the badge
|
|
207
364
|
*/
|
|
@@ -218,10 +375,26 @@ export interface BadgeUpdateResponse {
|
|
|
218
375
|
* The name of the badge
|
|
219
376
|
*/
|
|
220
377
|
name: string;
|
|
378
|
+
/**
|
|
379
|
+
* The date and time the badge was updated
|
|
380
|
+
*/
|
|
381
|
+
updatedAt: string;
|
|
382
|
+
/**
|
|
383
|
+
* Array of data jobs associated with the badge
|
|
384
|
+
*/
|
|
385
|
+
dataJobs?: Array<BadgeUpdateResponse.DataJob>;
|
|
386
|
+
/**
|
|
387
|
+
* Whether to hide this badge in the user interface
|
|
388
|
+
*/
|
|
389
|
+
hideInUi?: boolean;
|
|
221
390
|
/**
|
|
222
391
|
* Array of user badges
|
|
223
392
|
*/
|
|
224
|
-
|
|
393
|
+
loyaltyBadgeUsers?: Array<BadgeUpdateResponse.LoyaltyBadgeUser>;
|
|
394
|
+
/**
|
|
395
|
+
* Array of loyalty rules associated with the badge
|
|
396
|
+
*/
|
|
397
|
+
loyaltyRules?: Array<BadgeUpdateResponse.LoyaltyRule>;
|
|
225
398
|
}
|
|
226
399
|
export declare namespace BadgeUpdateResponse {
|
|
227
400
|
/**
|
|
@@ -238,7 +411,7 @@ export declare namespace BadgeUpdateResponse {
|
|
|
238
411
|
amount: number | null;
|
|
239
412
|
association: Array<LoyaltyCondition.Association>;
|
|
240
413
|
/**
|
|
241
|
-
*
|
|
414
|
+
* URL of the CSV file
|
|
242
415
|
*/
|
|
243
416
|
csvUrl: string | null;
|
|
244
417
|
/**
|
|
@@ -265,6 +438,10 @@ export declare namespace BadgeUpdateResponse {
|
|
|
265
438
|
* The type of the condition
|
|
266
439
|
*/
|
|
267
440
|
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
441
|
+
/**
|
|
442
|
+
* Array of CSV files associated with the condition
|
|
443
|
+
*/
|
|
444
|
+
csvFiles?: Array<LoyaltyCondition.CsvFile>;
|
|
268
445
|
}
|
|
269
446
|
namespace LoyaltyCondition {
|
|
270
447
|
interface Association {
|
|
@@ -326,12 +503,56 @@ export declare namespace BadgeUpdateResponse {
|
|
|
326
503
|
name: string;
|
|
327
504
|
}
|
|
328
505
|
}
|
|
506
|
+
interface CsvFile {
|
|
507
|
+
/**
|
|
508
|
+
* UUID of the CSV file (converted to lowercase)
|
|
509
|
+
*/
|
|
510
|
+
id: string;
|
|
511
|
+
/**
|
|
512
|
+
* The description of the CSV file
|
|
513
|
+
*/
|
|
514
|
+
description: string | null;
|
|
515
|
+
/**
|
|
516
|
+
* The name of the CSV file
|
|
517
|
+
*/
|
|
518
|
+
name: string | null;
|
|
519
|
+
/**
|
|
520
|
+
* The URL of the CSV file
|
|
521
|
+
*/
|
|
522
|
+
url: string | null;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
interface DataJob {
|
|
526
|
+
/**
|
|
527
|
+
* UUID of the data job (converted to lowercase)
|
|
528
|
+
*/
|
|
529
|
+
id: string;
|
|
530
|
+
/**
|
|
531
|
+
* The date and time the data job was created
|
|
532
|
+
*/
|
|
533
|
+
createdAt: string;
|
|
534
|
+
/**
|
|
535
|
+
* The status of the data job
|
|
536
|
+
*/
|
|
537
|
+
status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
|
|
538
|
+
/**
|
|
539
|
+
* The date and time the data job was updated
|
|
540
|
+
*/
|
|
541
|
+
updatedAt: string;
|
|
542
|
+
/**
|
|
543
|
+
* The message associated with the data job
|
|
544
|
+
*/
|
|
545
|
+
message?: string | null;
|
|
329
546
|
}
|
|
330
547
|
interface LoyaltyBadgeUser {
|
|
331
548
|
/**
|
|
332
549
|
* UUID of the user badge (converted to lowercase)
|
|
333
550
|
*/
|
|
334
551
|
id: string;
|
|
552
|
+
/**
|
|
553
|
+
* The date and time the user badge was created
|
|
554
|
+
*/
|
|
555
|
+
createdAt: string;
|
|
335
556
|
/**
|
|
336
557
|
* UUID of the badge (converted to lowercase)
|
|
337
558
|
*/
|
|
@@ -344,6 +565,10 @@ export declare namespace BadgeUpdateResponse {
|
|
|
344
565
|
* The status of the badge
|
|
345
566
|
*/
|
|
346
567
|
status: 'active' | 'inactive' | 'revoked';
|
|
568
|
+
/**
|
|
569
|
+
* The date and time the user badge was updated
|
|
570
|
+
*/
|
|
571
|
+
updatedAt: string;
|
|
347
572
|
/**
|
|
348
573
|
* UUID of the user (converted to lowercase)
|
|
349
574
|
*/
|
|
@@ -352,174 +577,329 @@ export declare namespace BadgeUpdateResponse {
|
|
|
352
577
|
* UUID of the website (converted to lowercase)
|
|
353
578
|
*/
|
|
354
579
|
websiteId: string;
|
|
580
|
+
/**
|
|
581
|
+
* Whether the user has dismissed the badge in the UI
|
|
582
|
+
*/
|
|
583
|
+
dismissedInUi?: boolean;
|
|
584
|
+
/**
|
|
585
|
+
* Whether to hide this badge in the user interface
|
|
586
|
+
*/
|
|
587
|
+
hideInUi?: boolean;
|
|
355
588
|
/**
|
|
356
589
|
* Array of progress for the badge
|
|
357
590
|
*/
|
|
358
591
|
progress?: unknown;
|
|
592
|
+
/**
|
|
593
|
+
* User associated with the user badge
|
|
594
|
+
*/
|
|
595
|
+
user?: LoyaltyBadgeUser.User;
|
|
596
|
+
}
|
|
597
|
+
namespace LoyaltyBadgeUser {
|
|
598
|
+
/**
|
|
599
|
+
* User associated with the user badge
|
|
600
|
+
*/
|
|
601
|
+
interface User {
|
|
602
|
+
/**
|
|
603
|
+
* UUID of the user (converted to lowercase)
|
|
604
|
+
*/
|
|
605
|
+
id: string;
|
|
606
|
+
/**
|
|
607
|
+
* Wallet address of the user
|
|
608
|
+
*/
|
|
609
|
+
walletAddress: string;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
interface LoyaltyRule {
|
|
613
|
+
/**
|
|
614
|
+
* UUID of the loyalty rule (converted to lowercase)
|
|
615
|
+
*/
|
|
616
|
+
id: string;
|
|
617
|
+
/**
|
|
618
|
+
* The name of the loyalty rule
|
|
619
|
+
*/
|
|
620
|
+
name: string;
|
|
359
621
|
}
|
|
360
622
|
}
|
|
361
|
-
/**
|
|
362
|
-
* Response returned upon successful fetching of the badges.
|
|
363
|
-
*/
|
|
364
623
|
export interface BadgeListResponse {
|
|
624
|
+
data: Array<BadgeListResponse.Data>;
|
|
365
625
|
/**
|
|
366
|
-
*
|
|
367
|
-
*/
|
|
368
|
-
id: string;
|
|
369
|
-
/**
|
|
370
|
-
* The description of the badge
|
|
371
|
-
*/
|
|
372
|
-
description: string | null;
|
|
373
|
-
/**
|
|
374
|
-
* The URL of the badge image
|
|
375
|
-
*/
|
|
376
|
-
imageUrl: string | null;
|
|
377
|
-
/**
|
|
378
|
-
* Array of conditions of the badge
|
|
379
|
-
*/
|
|
380
|
-
loyaltyConditions: Array<BadgeListResponse.LoyaltyCondition>;
|
|
381
|
-
/**
|
|
382
|
-
* The name of the badge
|
|
383
|
-
*/
|
|
384
|
-
name: string;
|
|
385
|
-
/**
|
|
386
|
-
* Array of user badges
|
|
626
|
+
* Indicates if there is a next page of results
|
|
387
627
|
*/
|
|
388
|
-
|
|
628
|
+
hasNextPage: boolean;
|
|
389
629
|
}
|
|
390
630
|
export declare namespace BadgeListResponse {
|
|
391
631
|
/**
|
|
392
|
-
*
|
|
632
|
+
* Response returned upon successful fetching of the badges.
|
|
393
633
|
*/
|
|
394
|
-
interface
|
|
634
|
+
interface Data {
|
|
395
635
|
/**
|
|
396
|
-
* UUID of the
|
|
636
|
+
* UUID of the badge (converted to lowercase)
|
|
397
637
|
*/
|
|
398
638
|
id: string;
|
|
399
639
|
/**
|
|
400
|
-
* The
|
|
640
|
+
* The date and time the badge was created
|
|
401
641
|
*/
|
|
402
|
-
|
|
403
|
-
association: Array<LoyaltyCondition.Association>;
|
|
642
|
+
createdAt: string;
|
|
404
643
|
/**
|
|
405
|
-
* The
|
|
644
|
+
* The description of the badge
|
|
406
645
|
*/
|
|
407
|
-
|
|
646
|
+
description: string | null;
|
|
408
647
|
/**
|
|
409
|
-
* The
|
|
648
|
+
* The URL of the badge image
|
|
410
649
|
*/
|
|
411
|
-
|
|
650
|
+
imageUrl: string | null;
|
|
412
651
|
/**
|
|
413
|
-
*
|
|
652
|
+
* Array of conditions of the badge
|
|
414
653
|
*/
|
|
415
|
-
|
|
654
|
+
loyaltyConditions: Array<Data.LoyaltyCondition>;
|
|
416
655
|
/**
|
|
417
|
-
*
|
|
656
|
+
* The name of the badge
|
|
418
657
|
*/
|
|
419
|
-
|
|
658
|
+
name: string;
|
|
420
659
|
/**
|
|
421
|
-
* The
|
|
660
|
+
* The date and time the badge was updated
|
|
422
661
|
*/
|
|
423
|
-
|
|
662
|
+
updatedAt: string;
|
|
424
663
|
/**
|
|
425
|
-
*
|
|
664
|
+
* Array of data jobs associated with the badge
|
|
426
665
|
*/
|
|
427
|
-
|
|
666
|
+
dataJobs?: Array<Data.DataJob>;
|
|
428
667
|
/**
|
|
429
|
-
*
|
|
668
|
+
* Whether to hide this badge in the user interface
|
|
430
669
|
*/
|
|
431
|
-
|
|
670
|
+
hideInUi?: boolean;
|
|
671
|
+
/**
|
|
672
|
+
* Array of user badges
|
|
673
|
+
*/
|
|
674
|
+
loyaltyBadgeUsers?: Array<Data.LoyaltyBadgeUser>;
|
|
675
|
+
/**
|
|
676
|
+
* Array of loyalty rules associated with the badge
|
|
677
|
+
*/
|
|
678
|
+
loyaltyRules?: Array<Data.LoyaltyRule>;
|
|
432
679
|
}
|
|
433
|
-
namespace
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
680
|
+
namespace Data {
|
|
681
|
+
/**
|
|
682
|
+
* Schema for a loyalty condition rule.
|
|
683
|
+
*/
|
|
684
|
+
interface LoyaltyCondition {
|
|
685
|
+
/**
|
|
686
|
+
* UUID of the condition (converted to lowercase)
|
|
687
|
+
*/
|
|
688
|
+
id: string;
|
|
689
|
+
/**
|
|
690
|
+
* The amount of the condition
|
|
691
|
+
*/
|
|
692
|
+
amount: number | null;
|
|
693
|
+
association: Array<LoyaltyCondition.Association>;
|
|
694
|
+
/**
|
|
695
|
+
* URL of the CSV file
|
|
696
|
+
*/
|
|
697
|
+
csvUrl: string | null;
|
|
698
|
+
/**
|
|
699
|
+
* The description of the condition
|
|
700
|
+
*/
|
|
701
|
+
description: string | null;
|
|
702
|
+
/**
|
|
703
|
+
* UUID of the currency (converted to lowercase)
|
|
704
|
+
*/
|
|
705
|
+
loyaltyCurrencyId: string | null;
|
|
706
|
+
/**
|
|
707
|
+
* UUID of the rule group (converted to lowercase)
|
|
708
|
+
*/
|
|
709
|
+
loyaltyRuleGroupId: string | null;
|
|
710
|
+
/**
|
|
711
|
+
* The repeat count of the condition
|
|
712
|
+
*/
|
|
713
|
+
repeatCount: number | null;
|
|
714
|
+
/**
|
|
715
|
+
* The required count of the condition
|
|
716
|
+
*/
|
|
717
|
+
requiredCount: number | null;
|
|
718
|
+
/**
|
|
719
|
+
* The type of the condition
|
|
720
|
+
*/
|
|
721
|
+
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
722
|
+
/**
|
|
723
|
+
* Array of CSV files associated with the condition
|
|
724
|
+
*/
|
|
725
|
+
csvFiles?: Array<LoyaltyCondition.CsvFile>;
|
|
440
726
|
}
|
|
441
|
-
namespace
|
|
442
|
-
interface
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
* The name of the association
|
|
449
|
-
*/
|
|
450
|
-
name: string;
|
|
727
|
+
namespace LoyaltyCondition {
|
|
728
|
+
interface Association {
|
|
729
|
+
loyaltyBadge: Association.LoyaltyBadge | null;
|
|
730
|
+
loyaltyCurrency: Association.LoyaltyCurrency | null;
|
|
731
|
+
loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
|
|
732
|
+
loyaltyRule: Association.LoyaltyRule | null;
|
|
733
|
+
loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
|
|
451
734
|
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
735
|
+
namespace Association {
|
|
736
|
+
interface LoyaltyBadge {
|
|
737
|
+
/**
|
|
738
|
+
* UUID of the association (converted to lowercase)
|
|
739
|
+
*/
|
|
740
|
+
id: string;
|
|
741
|
+
/**
|
|
742
|
+
* The name of the association
|
|
743
|
+
*/
|
|
744
|
+
name: string;
|
|
745
|
+
}
|
|
746
|
+
interface LoyaltyCurrency {
|
|
747
|
+
/**
|
|
748
|
+
* UUID of the association (converted to lowercase)
|
|
749
|
+
*/
|
|
750
|
+
id: string;
|
|
751
|
+
/**
|
|
752
|
+
* The name of the association
|
|
753
|
+
*/
|
|
754
|
+
name: string;
|
|
755
|
+
}
|
|
756
|
+
interface LoyaltyLeaderboardView {
|
|
757
|
+
/**
|
|
758
|
+
* UUID of the association (converted to lowercase)
|
|
759
|
+
*/
|
|
760
|
+
id: string;
|
|
761
|
+
/**
|
|
762
|
+
* The name of the association
|
|
763
|
+
*/
|
|
764
|
+
name: string;
|
|
765
|
+
}
|
|
766
|
+
interface LoyaltyRule {
|
|
767
|
+
/**
|
|
768
|
+
* UUID of the association (converted to lowercase)
|
|
769
|
+
*/
|
|
770
|
+
id: string;
|
|
771
|
+
/**
|
|
772
|
+
* The name of the association
|
|
773
|
+
*/
|
|
774
|
+
name: string;
|
|
775
|
+
}
|
|
776
|
+
interface LoyaltyRuleGroup {
|
|
777
|
+
/**
|
|
778
|
+
* UUID of the association (converted to lowercase)
|
|
779
|
+
*/
|
|
780
|
+
id: string;
|
|
781
|
+
/**
|
|
782
|
+
* The name of the association
|
|
783
|
+
*/
|
|
784
|
+
name: string;
|
|
785
|
+
}
|
|
461
786
|
}
|
|
462
|
-
interface
|
|
787
|
+
interface CsvFile {
|
|
463
788
|
/**
|
|
464
|
-
* UUID of the
|
|
789
|
+
* UUID of the CSV file (converted to lowercase)
|
|
465
790
|
*/
|
|
466
791
|
id: string;
|
|
467
792
|
/**
|
|
468
|
-
* The
|
|
793
|
+
* The description of the CSV file
|
|
469
794
|
*/
|
|
470
|
-
|
|
471
|
-
}
|
|
472
|
-
interface LoyaltyRule {
|
|
795
|
+
description: string | null;
|
|
473
796
|
/**
|
|
474
|
-
*
|
|
797
|
+
* The name of the CSV file
|
|
475
798
|
*/
|
|
476
|
-
|
|
799
|
+
name: string | null;
|
|
477
800
|
/**
|
|
478
|
-
* The
|
|
801
|
+
* The URL of the CSV file
|
|
479
802
|
*/
|
|
480
|
-
|
|
803
|
+
url: string | null;
|
|
481
804
|
}
|
|
482
|
-
|
|
805
|
+
}
|
|
806
|
+
interface DataJob {
|
|
807
|
+
/**
|
|
808
|
+
* UUID of the data job (converted to lowercase)
|
|
809
|
+
*/
|
|
810
|
+
id: string;
|
|
811
|
+
/**
|
|
812
|
+
* The date and time the data job was created
|
|
813
|
+
*/
|
|
814
|
+
createdAt: string;
|
|
815
|
+
/**
|
|
816
|
+
* The status of the data job
|
|
817
|
+
*/
|
|
818
|
+
status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
|
|
819
|
+
/**
|
|
820
|
+
* The date and time the data job was updated
|
|
821
|
+
*/
|
|
822
|
+
updatedAt: string;
|
|
823
|
+
/**
|
|
824
|
+
* The message associated with the data job
|
|
825
|
+
*/
|
|
826
|
+
message?: string | null;
|
|
827
|
+
}
|
|
828
|
+
interface LoyaltyBadgeUser {
|
|
829
|
+
/**
|
|
830
|
+
* UUID of the user badge (converted to lowercase)
|
|
831
|
+
*/
|
|
832
|
+
id: string;
|
|
833
|
+
/**
|
|
834
|
+
* The date and time the user badge was created
|
|
835
|
+
*/
|
|
836
|
+
createdAt: string;
|
|
837
|
+
/**
|
|
838
|
+
* UUID of the badge (converted to lowercase)
|
|
839
|
+
*/
|
|
840
|
+
loyaltyBadgeId: string;
|
|
841
|
+
/**
|
|
842
|
+
* UUID of the organization (converted to lowercase)
|
|
843
|
+
*/
|
|
844
|
+
organizationId: string;
|
|
845
|
+
/**
|
|
846
|
+
* The status of the badge
|
|
847
|
+
*/
|
|
848
|
+
status: 'active' | 'inactive' | 'revoked';
|
|
849
|
+
/**
|
|
850
|
+
* The date and time the user badge was updated
|
|
851
|
+
*/
|
|
852
|
+
updatedAt: string;
|
|
853
|
+
/**
|
|
854
|
+
* UUID of the user (converted to lowercase)
|
|
855
|
+
*/
|
|
856
|
+
userId: string;
|
|
857
|
+
/**
|
|
858
|
+
* UUID of the website (converted to lowercase)
|
|
859
|
+
*/
|
|
860
|
+
websiteId: string;
|
|
861
|
+
/**
|
|
862
|
+
* Whether the user has dismissed the badge in the UI
|
|
863
|
+
*/
|
|
864
|
+
dismissedInUi?: boolean;
|
|
865
|
+
/**
|
|
866
|
+
* Whether to hide this badge in the user interface
|
|
867
|
+
*/
|
|
868
|
+
hideInUi?: boolean;
|
|
869
|
+
/**
|
|
870
|
+
* Array of progress for the badge
|
|
871
|
+
*/
|
|
872
|
+
progress?: unknown;
|
|
873
|
+
/**
|
|
874
|
+
* User associated with the user badge
|
|
875
|
+
*/
|
|
876
|
+
user?: LoyaltyBadgeUser.User;
|
|
877
|
+
}
|
|
878
|
+
namespace LoyaltyBadgeUser {
|
|
879
|
+
/**
|
|
880
|
+
* User associated with the user badge
|
|
881
|
+
*/
|
|
882
|
+
interface User {
|
|
483
883
|
/**
|
|
484
|
-
* UUID of the
|
|
884
|
+
* UUID of the user (converted to lowercase)
|
|
485
885
|
*/
|
|
486
886
|
id: string;
|
|
487
887
|
/**
|
|
488
|
-
*
|
|
888
|
+
* Wallet address of the user
|
|
489
889
|
*/
|
|
490
|
-
|
|
890
|
+
walletAddress: string;
|
|
491
891
|
}
|
|
492
892
|
}
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
/**
|
|
504
|
-
* UUID of the organization (converted to lowercase)
|
|
505
|
-
*/
|
|
506
|
-
organizationId: string;
|
|
507
|
-
/**
|
|
508
|
-
* The status of the badge
|
|
509
|
-
*/
|
|
510
|
-
status: 'active' | 'inactive' | 'revoked';
|
|
511
|
-
/**
|
|
512
|
-
* UUID of the user (converted to lowercase)
|
|
513
|
-
*/
|
|
514
|
-
userId: string;
|
|
515
|
-
/**
|
|
516
|
-
* UUID of the website (converted to lowercase)
|
|
517
|
-
*/
|
|
518
|
-
websiteId: string;
|
|
519
|
-
/**
|
|
520
|
-
* Array of progress for the badge
|
|
521
|
-
*/
|
|
522
|
-
progress?: unknown;
|
|
893
|
+
interface LoyaltyRule {
|
|
894
|
+
/**
|
|
895
|
+
* UUID of the loyalty rule (converted to lowercase)
|
|
896
|
+
*/
|
|
897
|
+
id: string;
|
|
898
|
+
/**
|
|
899
|
+
* The name of the loyalty rule
|
|
900
|
+
*/
|
|
901
|
+
name: string;
|
|
902
|
+
}
|
|
523
903
|
}
|
|
524
904
|
}
|
|
525
905
|
/**
|
|
@@ -530,6 +910,10 @@ export interface BadgeDeleteResponse {
|
|
|
530
910
|
* UUID of the badge (converted to lowercase)
|
|
531
911
|
*/
|
|
532
912
|
id: string;
|
|
913
|
+
/**
|
|
914
|
+
* The date and time the badge was created
|
|
915
|
+
*/
|
|
916
|
+
createdAt: string;
|
|
533
917
|
/**
|
|
534
918
|
* The description of the badge
|
|
535
919
|
*/
|
|
@@ -546,10 +930,26 @@ export interface BadgeDeleteResponse {
|
|
|
546
930
|
* The name of the badge
|
|
547
931
|
*/
|
|
548
932
|
name: string;
|
|
933
|
+
/**
|
|
934
|
+
* The date and time the badge was updated
|
|
935
|
+
*/
|
|
936
|
+
updatedAt: string;
|
|
937
|
+
/**
|
|
938
|
+
* Array of data jobs associated with the badge
|
|
939
|
+
*/
|
|
940
|
+
dataJobs?: Array<BadgeDeleteResponse.DataJob>;
|
|
941
|
+
/**
|
|
942
|
+
* Whether to hide this badge in the user interface
|
|
943
|
+
*/
|
|
944
|
+
hideInUi?: boolean;
|
|
549
945
|
/**
|
|
550
946
|
* Array of user badges
|
|
551
947
|
*/
|
|
552
|
-
|
|
948
|
+
loyaltyBadgeUsers?: Array<BadgeDeleteResponse.LoyaltyBadgeUser>;
|
|
949
|
+
/**
|
|
950
|
+
* Array of loyalty rules associated with the badge
|
|
951
|
+
*/
|
|
952
|
+
loyaltyRules?: Array<BadgeDeleteResponse.LoyaltyRule>;
|
|
553
953
|
}
|
|
554
954
|
export declare namespace BadgeDeleteResponse {
|
|
555
955
|
/**
|
|
@@ -566,7 +966,7 @@ export declare namespace BadgeDeleteResponse {
|
|
|
566
966
|
amount: number | null;
|
|
567
967
|
association: Array<LoyaltyCondition.Association>;
|
|
568
968
|
/**
|
|
569
|
-
*
|
|
969
|
+
* URL of the CSV file
|
|
570
970
|
*/
|
|
571
971
|
csvUrl: string | null;
|
|
572
972
|
/**
|
|
@@ -593,6 +993,10 @@ export declare namespace BadgeDeleteResponse {
|
|
|
593
993
|
* The type of the condition
|
|
594
994
|
*/
|
|
595
995
|
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
996
|
+
/**
|
|
997
|
+
* Array of CSV files associated with the condition
|
|
998
|
+
*/
|
|
999
|
+
csvFiles?: Array<LoyaltyCondition.CsvFile>;
|
|
596
1000
|
}
|
|
597
1001
|
namespace LoyaltyCondition {
|
|
598
1002
|
interface Association {
|
|
@@ -654,12 +1058,56 @@ export declare namespace BadgeDeleteResponse {
|
|
|
654
1058
|
name: string;
|
|
655
1059
|
}
|
|
656
1060
|
}
|
|
1061
|
+
interface CsvFile {
|
|
1062
|
+
/**
|
|
1063
|
+
* UUID of the CSV file (converted to lowercase)
|
|
1064
|
+
*/
|
|
1065
|
+
id: string;
|
|
1066
|
+
/**
|
|
1067
|
+
* The description of the CSV file
|
|
1068
|
+
*/
|
|
1069
|
+
description: string | null;
|
|
1070
|
+
/**
|
|
1071
|
+
* The name of the CSV file
|
|
1072
|
+
*/
|
|
1073
|
+
name: string | null;
|
|
1074
|
+
/**
|
|
1075
|
+
* The URL of the CSV file
|
|
1076
|
+
*/
|
|
1077
|
+
url: string | null;
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
interface DataJob {
|
|
1081
|
+
/**
|
|
1082
|
+
* UUID of the data job (converted to lowercase)
|
|
1083
|
+
*/
|
|
1084
|
+
id: string;
|
|
1085
|
+
/**
|
|
1086
|
+
* The date and time the data job was created
|
|
1087
|
+
*/
|
|
1088
|
+
createdAt: string;
|
|
1089
|
+
/**
|
|
1090
|
+
* The status of the data job
|
|
1091
|
+
*/
|
|
1092
|
+
status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
|
|
1093
|
+
/**
|
|
1094
|
+
* The date and time the data job was updated
|
|
1095
|
+
*/
|
|
1096
|
+
updatedAt: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* The message associated with the data job
|
|
1099
|
+
*/
|
|
1100
|
+
message?: string | null;
|
|
657
1101
|
}
|
|
658
1102
|
interface LoyaltyBadgeUser {
|
|
659
1103
|
/**
|
|
660
1104
|
* UUID of the user badge (converted to lowercase)
|
|
661
1105
|
*/
|
|
662
1106
|
id: string;
|
|
1107
|
+
/**
|
|
1108
|
+
* The date and time the user badge was created
|
|
1109
|
+
*/
|
|
1110
|
+
createdAt: string;
|
|
663
1111
|
/**
|
|
664
1112
|
* UUID of the badge (converted to lowercase)
|
|
665
1113
|
*/
|
|
@@ -672,6 +1120,10 @@ export declare namespace BadgeDeleteResponse {
|
|
|
672
1120
|
* The status of the badge
|
|
673
1121
|
*/
|
|
674
1122
|
status: 'active' | 'inactive' | 'revoked';
|
|
1123
|
+
/**
|
|
1124
|
+
* The date and time the user badge was updated
|
|
1125
|
+
*/
|
|
1126
|
+
updatedAt: string;
|
|
675
1127
|
/**
|
|
676
1128
|
* UUID of the user (converted to lowercase)
|
|
677
1129
|
*/
|
|
@@ -680,10 +1132,47 @@ export declare namespace BadgeDeleteResponse {
|
|
|
680
1132
|
* UUID of the website (converted to lowercase)
|
|
681
1133
|
*/
|
|
682
1134
|
websiteId: string;
|
|
1135
|
+
/**
|
|
1136
|
+
* Whether the user has dismissed the badge in the UI
|
|
1137
|
+
*/
|
|
1138
|
+
dismissedInUi?: boolean;
|
|
1139
|
+
/**
|
|
1140
|
+
* Whether to hide this badge in the user interface
|
|
1141
|
+
*/
|
|
1142
|
+
hideInUi?: boolean;
|
|
683
1143
|
/**
|
|
684
1144
|
* Array of progress for the badge
|
|
685
1145
|
*/
|
|
686
1146
|
progress?: unknown;
|
|
1147
|
+
/**
|
|
1148
|
+
* User associated with the user badge
|
|
1149
|
+
*/
|
|
1150
|
+
user?: LoyaltyBadgeUser.User;
|
|
1151
|
+
}
|
|
1152
|
+
namespace LoyaltyBadgeUser {
|
|
1153
|
+
/**
|
|
1154
|
+
* User associated with the user badge
|
|
1155
|
+
*/
|
|
1156
|
+
interface User {
|
|
1157
|
+
/**
|
|
1158
|
+
* UUID of the user (converted to lowercase)
|
|
1159
|
+
*/
|
|
1160
|
+
id: string;
|
|
1161
|
+
/**
|
|
1162
|
+
* Wallet address of the user
|
|
1163
|
+
*/
|
|
1164
|
+
walletAddress: string;
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
interface LoyaltyRule {
|
|
1168
|
+
/**
|
|
1169
|
+
* UUID of the loyalty rule (converted to lowercase)
|
|
1170
|
+
*/
|
|
1171
|
+
id: string;
|
|
1172
|
+
/**
|
|
1173
|
+
* The name of the loyalty rule
|
|
1174
|
+
*/
|
|
1175
|
+
name: string;
|
|
687
1176
|
}
|
|
688
1177
|
}
|
|
689
1178
|
/**
|
|
@@ -723,6 +1212,10 @@ export declare namespace BadgeRewardResponse {
|
|
|
723
1212
|
}
|
|
724
1213
|
}
|
|
725
1214
|
export interface BadgeCreateParams {
|
|
1215
|
+
/**
|
|
1216
|
+
* Array of conditions for the badge
|
|
1217
|
+
*/
|
|
1218
|
+
conditions: Array<BadgeCreateParams.Condition>;
|
|
726
1219
|
/**
|
|
727
1220
|
* The URL of the badge image
|
|
728
1221
|
*/
|
|
@@ -735,25 +1228,22 @@ export interface BadgeCreateParams {
|
|
|
735
1228
|
* UUID of the organization (optional, converted to lowercase)
|
|
736
1229
|
*/
|
|
737
1230
|
organizationId: string;
|
|
738
|
-
/**
|
|
739
|
-
* Array of rules for the badge
|
|
740
|
-
*/
|
|
741
|
-
rules: Array<BadgeCreateParams.Rule>;
|
|
742
1231
|
/**
|
|
743
1232
|
* UUID of the website (optional, converted to lowercase)
|
|
744
1233
|
*/
|
|
745
1234
|
websiteId: string;
|
|
1235
|
+
csvFiles?: Array<BadgeCreateParams.CsvFile>;
|
|
746
1236
|
/**
|
|
747
1237
|
* The description of the badge
|
|
748
1238
|
*/
|
|
749
1239
|
description?: string;
|
|
1240
|
+
/**
|
|
1241
|
+
* Whether to hide this badge in the user interface
|
|
1242
|
+
*/
|
|
1243
|
+
hideInUi?: boolean;
|
|
750
1244
|
}
|
|
751
1245
|
export declare namespace BadgeCreateParams {
|
|
752
|
-
interface
|
|
753
|
-
/**
|
|
754
|
-
* The type of rule
|
|
755
|
-
*/
|
|
756
|
-
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
1246
|
+
interface Condition {
|
|
757
1247
|
/**
|
|
758
1248
|
* The amount of the rule
|
|
759
1249
|
*/
|
|
@@ -781,7 +1271,7 @@ export declare namespace BadgeCreateParams {
|
|
|
781
1271
|
/**
|
|
782
1272
|
* UUID of the loyalty rule chain (optional, converted to lowercase)
|
|
783
1273
|
*/
|
|
784
|
-
loyaltyRuleChainId?: string;
|
|
1274
|
+
loyaltyRuleChainId?: string | null;
|
|
785
1275
|
/**
|
|
786
1276
|
* Array of UUIDs of the rule group (optional, converted to lowercase)
|
|
787
1277
|
*/
|
|
@@ -798,13 +1288,27 @@ export declare namespace BadgeCreateParams {
|
|
|
798
1288
|
* The number of rules that need to be fulfilled to satisfy the condition
|
|
799
1289
|
*/
|
|
800
1290
|
requiredCount?: number | null;
|
|
1291
|
+
/**
|
|
1292
|
+
* The type of rule
|
|
1293
|
+
*/
|
|
1294
|
+
type?: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
1295
|
+
}
|
|
1296
|
+
interface CsvFile {
|
|
1297
|
+
src: string;
|
|
1298
|
+
description?: string;
|
|
1299
|
+
name?: string;
|
|
801
1300
|
}
|
|
802
1301
|
}
|
|
803
1302
|
export interface BadgeUpdateParams {
|
|
1303
|
+
csvFiles?: Array<BadgeUpdateParams.CsvFile>;
|
|
804
1304
|
/**
|
|
805
1305
|
* The description of the badge
|
|
806
1306
|
*/
|
|
807
1307
|
description?: string;
|
|
1308
|
+
/**
|
|
1309
|
+
* Whether to hide this badge in the user interface
|
|
1310
|
+
*/
|
|
1311
|
+
hideInUi?: boolean;
|
|
808
1312
|
/**
|
|
809
1313
|
* The URL of the badge image
|
|
810
1314
|
*/
|
|
@@ -814,11 +1318,18 @@ export interface BadgeUpdateParams {
|
|
|
814
1318
|
*/
|
|
815
1319
|
name?: string;
|
|
816
1320
|
}
|
|
1321
|
+
export declare namespace BadgeUpdateParams {
|
|
1322
|
+
interface CsvFile {
|
|
1323
|
+
src: string;
|
|
1324
|
+
description?: string;
|
|
1325
|
+
name?: string;
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
817
1328
|
export interface BadgeListParams {
|
|
818
1329
|
/**
|
|
819
1330
|
* Array of badge IDs (converted to lowercase) to fetch
|
|
820
1331
|
*/
|
|
821
|
-
badgeIds?: Array<string>;
|
|
1332
|
+
badgeIds?: string | Array<string>;
|
|
822
1333
|
/**
|
|
823
1334
|
* Include deleted badges in the response
|
|
824
1335
|
*/
|
|
@@ -836,15 +1347,31 @@ export interface BadgeListParams {
|
|
|
836
1347
|
*/
|
|
837
1348
|
startingAfter?: string;
|
|
838
1349
|
/**
|
|
839
|
-
*
|
|
1350
|
+
* External identifier of the user group
|
|
840
1351
|
*/
|
|
841
|
-
|
|
1352
|
+
userGroupExternalIdentifier?: string;
|
|
1353
|
+
/**
|
|
1354
|
+
* UUID of the user group
|
|
1355
|
+
*/
|
|
1356
|
+
userGroupId?: string;
|
|
1357
|
+
/**
|
|
1358
|
+
* UUID of the user, or array of UUID.
|
|
1359
|
+
*/
|
|
1360
|
+
userId?: string | Array<string>;
|
|
1361
|
+
/**
|
|
1362
|
+
* Wallet Address of the user, or array of wallet addresses.
|
|
1363
|
+
*/
|
|
1364
|
+
walletAddress?: string | Array<string>;
|
|
842
1365
|
/**
|
|
843
1366
|
* UUID of the website (optional, converted to lowercase)
|
|
844
1367
|
*/
|
|
845
1368
|
websiteId?: string;
|
|
846
1369
|
}
|
|
847
1370
|
export interface BadgeRevokeParams {
|
|
1371
|
+
/**
|
|
1372
|
+
* Status of the badge
|
|
1373
|
+
*/
|
|
1374
|
+
status?: 'active' | 'inactive' | 'revoked';
|
|
848
1375
|
/**
|
|
849
1376
|
* UUID of the user (converted to lowercase)
|
|
850
1377
|
*/
|
|
@@ -855,6 +1382,10 @@ export interface BadgeRevokeParams {
|
|
|
855
1382
|
walletAddress?: string;
|
|
856
1383
|
}
|
|
857
1384
|
export interface BadgeRewardParams {
|
|
1385
|
+
/**
|
|
1386
|
+
* Status of the badge
|
|
1387
|
+
*/
|
|
1388
|
+
status?: 'active' | 'inactive' | 'revoked';
|
|
858
1389
|
/**
|
|
859
1390
|
* UUID of the user (converted to lowercase)
|
|
860
1391
|
*/
|