@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
|
@@ -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,30 @@ 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>;
|
|
131
200
|
}
|
|
132
201
|
|
|
133
202
|
export namespace BadgeCreateResponse {
|
|
@@ -148,7 +217,7 @@ export namespace BadgeCreateResponse {
|
|
|
148
217
|
association: Array<LoyaltyCondition.Association>;
|
|
149
218
|
|
|
150
219
|
/**
|
|
151
|
-
*
|
|
220
|
+
* URL of the CSV file
|
|
152
221
|
*/
|
|
153
222
|
csvUrl: string | null;
|
|
154
223
|
|
|
@@ -181,6 +250,11 @@ export namespace BadgeCreateResponse {
|
|
|
181
250
|
* The type of the condition
|
|
182
251
|
*/
|
|
183
252
|
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Array of CSV files associated with the condition
|
|
256
|
+
*/
|
|
257
|
+
csvFiles?: Array<LoyaltyCondition.CsvFile>;
|
|
184
258
|
}
|
|
185
259
|
|
|
186
260
|
export namespace LoyaltyCondition {
|
|
@@ -257,6 +331,55 @@ export namespace BadgeCreateResponse {
|
|
|
257
331
|
name: string;
|
|
258
332
|
}
|
|
259
333
|
}
|
|
334
|
+
|
|
335
|
+
export interface CsvFile {
|
|
336
|
+
/**
|
|
337
|
+
* UUID of the CSV file (converted to lowercase)
|
|
338
|
+
*/
|
|
339
|
+
id: string;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* The description of the CSV file
|
|
343
|
+
*/
|
|
344
|
+
description: string | null;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* The name of the CSV file
|
|
348
|
+
*/
|
|
349
|
+
name: string | null;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* The URL of the CSV file
|
|
353
|
+
*/
|
|
354
|
+
url: string | null;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export interface DataJob {
|
|
359
|
+
/**
|
|
360
|
+
* UUID of the data job (converted to lowercase)
|
|
361
|
+
*/
|
|
362
|
+
id: string;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* The date and time the data job was created
|
|
366
|
+
*/
|
|
367
|
+
createdAt: string;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* The status of the data job
|
|
371
|
+
*/
|
|
372
|
+
status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* The date and time the data job was updated
|
|
376
|
+
*/
|
|
377
|
+
updatedAt: string;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* The message associated with the data job
|
|
381
|
+
*/
|
|
382
|
+
message?: string | null;
|
|
260
383
|
}
|
|
261
384
|
|
|
262
385
|
export interface LoyaltyBadgeUser {
|
|
@@ -265,6 +388,11 @@ export namespace BadgeCreateResponse {
|
|
|
265
388
|
*/
|
|
266
389
|
id: string;
|
|
267
390
|
|
|
391
|
+
/**
|
|
392
|
+
* The date and time the user badge was created
|
|
393
|
+
*/
|
|
394
|
+
createdAt: string;
|
|
395
|
+
|
|
268
396
|
/**
|
|
269
397
|
* UUID of the badge (converted to lowercase)
|
|
270
398
|
*/
|
|
@@ -280,6 +408,11 @@ export namespace BadgeCreateResponse {
|
|
|
280
408
|
*/
|
|
281
409
|
status: 'active' | 'inactive' | 'revoked';
|
|
282
410
|
|
|
411
|
+
/**
|
|
412
|
+
* The date and time the user badge was updated
|
|
413
|
+
*/
|
|
414
|
+
updatedAt: string;
|
|
415
|
+
|
|
283
416
|
/**
|
|
284
417
|
* UUID of the user (converted to lowercase)
|
|
285
418
|
*/
|
|
@@ -290,10 +423,54 @@ export namespace BadgeCreateResponse {
|
|
|
290
423
|
*/
|
|
291
424
|
websiteId: string;
|
|
292
425
|
|
|
426
|
+
/**
|
|
427
|
+
* Whether the user has dismissed the badge in the UI
|
|
428
|
+
*/
|
|
429
|
+
dismissedInUi?: boolean;
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* Whether to hide this badge in the user interface
|
|
433
|
+
*/
|
|
434
|
+
hideInUi?: boolean;
|
|
435
|
+
|
|
293
436
|
/**
|
|
294
437
|
* Array of progress for the badge
|
|
295
438
|
*/
|
|
296
439
|
progress?: unknown;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* User associated with the user badge
|
|
443
|
+
*/
|
|
444
|
+
user?: LoyaltyBadgeUser.User;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
export namespace LoyaltyBadgeUser {
|
|
448
|
+
/**
|
|
449
|
+
* User associated with the user badge
|
|
450
|
+
*/
|
|
451
|
+
export interface User {
|
|
452
|
+
/**
|
|
453
|
+
* UUID of the user (converted to lowercase)
|
|
454
|
+
*/
|
|
455
|
+
id: string;
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Wallet address of the user
|
|
459
|
+
*/
|
|
460
|
+
walletAddress: string;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export interface LoyaltyRule {
|
|
465
|
+
/**
|
|
466
|
+
* UUID of the loyalty rule (converted to lowercase)
|
|
467
|
+
*/
|
|
468
|
+
id: string;
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* The name of the loyalty rule
|
|
472
|
+
*/
|
|
473
|
+
name: string;
|
|
297
474
|
}
|
|
298
475
|
}
|
|
299
476
|
|
|
@@ -306,6 +483,11 @@ export interface BadgeUpdateResponse {
|
|
|
306
483
|
*/
|
|
307
484
|
id: string;
|
|
308
485
|
|
|
486
|
+
/**
|
|
487
|
+
* The date and time the badge was created
|
|
488
|
+
*/
|
|
489
|
+
createdAt: string;
|
|
490
|
+
|
|
309
491
|
/**
|
|
310
492
|
* The description of the badge
|
|
311
493
|
*/
|
|
@@ -326,10 +508,30 @@ export interface BadgeUpdateResponse {
|
|
|
326
508
|
*/
|
|
327
509
|
name: string;
|
|
328
510
|
|
|
511
|
+
/**
|
|
512
|
+
* The date and time the badge was updated
|
|
513
|
+
*/
|
|
514
|
+
updatedAt: string;
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Array of data jobs associated with the badge
|
|
518
|
+
*/
|
|
519
|
+
dataJobs?: Array<BadgeUpdateResponse.DataJob>;
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Whether to hide this badge in the user interface
|
|
523
|
+
*/
|
|
524
|
+
hideInUi?: boolean;
|
|
525
|
+
|
|
329
526
|
/**
|
|
330
527
|
* Array of user badges
|
|
331
528
|
*/
|
|
332
|
-
|
|
529
|
+
loyaltyBadgeUsers?: Array<BadgeUpdateResponse.LoyaltyBadgeUser>;
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* Array of loyalty rules associated with the badge
|
|
533
|
+
*/
|
|
534
|
+
loyaltyRules?: Array<BadgeUpdateResponse.LoyaltyRule>;
|
|
333
535
|
}
|
|
334
536
|
|
|
335
537
|
export namespace BadgeUpdateResponse {
|
|
@@ -350,7 +552,7 @@ export namespace BadgeUpdateResponse {
|
|
|
350
552
|
association: Array<LoyaltyCondition.Association>;
|
|
351
553
|
|
|
352
554
|
/**
|
|
353
|
-
*
|
|
555
|
+
* URL of the CSV file
|
|
354
556
|
*/
|
|
355
557
|
csvUrl: string | null;
|
|
356
558
|
|
|
@@ -383,6 +585,11 @@ export namespace BadgeUpdateResponse {
|
|
|
383
585
|
* The type of the condition
|
|
384
586
|
*/
|
|
385
587
|
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Array of CSV files associated with the condition
|
|
591
|
+
*/
|
|
592
|
+
csvFiles?: Array<LoyaltyCondition.CsvFile>;
|
|
386
593
|
}
|
|
387
594
|
|
|
388
595
|
export namespace LoyaltyCondition {
|
|
@@ -459,6 +666,55 @@ export namespace BadgeUpdateResponse {
|
|
|
459
666
|
name: string;
|
|
460
667
|
}
|
|
461
668
|
}
|
|
669
|
+
|
|
670
|
+
export interface CsvFile {
|
|
671
|
+
/**
|
|
672
|
+
* UUID of the CSV file (converted to lowercase)
|
|
673
|
+
*/
|
|
674
|
+
id: string;
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* The description of the CSV file
|
|
678
|
+
*/
|
|
679
|
+
description: string | null;
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* The name of the CSV file
|
|
683
|
+
*/
|
|
684
|
+
name: string | null;
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* The URL of the CSV file
|
|
688
|
+
*/
|
|
689
|
+
url: string | null;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
export interface DataJob {
|
|
694
|
+
/**
|
|
695
|
+
* UUID of the data job (converted to lowercase)
|
|
696
|
+
*/
|
|
697
|
+
id: string;
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* The date and time the data job was created
|
|
701
|
+
*/
|
|
702
|
+
createdAt: string;
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* The status of the data job
|
|
706
|
+
*/
|
|
707
|
+
status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* The date and time the data job was updated
|
|
711
|
+
*/
|
|
712
|
+
updatedAt: string;
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* The message associated with the data job
|
|
716
|
+
*/
|
|
717
|
+
message?: string | null;
|
|
462
718
|
}
|
|
463
719
|
|
|
464
720
|
export interface LoyaltyBadgeUser {
|
|
@@ -467,6 +723,11 @@ export namespace BadgeUpdateResponse {
|
|
|
467
723
|
*/
|
|
468
724
|
id: string;
|
|
469
725
|
|
|
726
|
+
/**
|
|
727
|
+
* The date and time the user badge was created
|
|
728
|
+
*/
|
|
729
|
+
createdAt: string;
|
|
730
|
+
|
|
470
731
|
/**
|
|
471
732
|
* UUID of the badge (converted to lowercase)
|
|
472
733
|
*/
|
|
@@ -482,6 +743,11 @@ export namespace BadgeUpdateResponse {
|
|
|
482
743
|
*/
|
|
483
744
|
status: 'active' | 'inactive' | 'revoked';
|
|
484
745
|
|
|
746
|
+
/**
|
|
747
|
+
* The date and time the user badge was updated
|
|
748
|
+
*/
|
|
749
|
+
updatedAt: string;
|
|
750
|
+
|
|
485
751
|
/**
|
|
486
752
|
* UUID of the user (converted to lowercase)
|
|
487
753
|
*/
|
|
@@ -492,212 +758,400 @@ export namespace BadgeUpdateResponse {
|
|
|
492
758
|
*/
|
|
493
759
|
websiteId: string;
|
|
494
760
|
|
|
761
|
+
/**
|
|
762
|
+
* Whether the user has dismissed the badge in the UI
|
|
763
|
+
*/
|
|
764
|
+
dismissedInUi?: boolean;
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Whether to hide this badge in the user interface
|
|
768
|
+
*/
|
|
769
|
+
hideInUi?: boolean;
|
|
770
|
+
|
|
495
771
|
/**
|
|
496
772
|
* Array of progress for the badge
|
|
497
773
|
*/
|
|
498
774
|
progress?: unknown;
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* User associated with the user badge
|
|
778
|
+
*/
|
|
779
|
+
user?: LoyaltyBadgeUser.User;
|
|
499
780
|
}
|
|
500
|
-
}
|
|
501
781
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
782
|
+
export namespace LoyaltyBadgeUser {
|
|
783
|
+
/**
|
|
784
|
+
* User associated with the user badge
|
|
785
|
+
*/
|
|
786
|
+
export interface User {
|
|
787
|
+
/**
|
|
788
|
+
* UUID of the user (converted to lowercase)
|
|
789
|
+
*/
|
|
790
|
+
id: string;
|
|
510
791
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
792
|
+
/**
|
|
793
|
+
* Wallet address of the user
|
|
794
|
+
*/
|
|
795
|
+
walletAddress: string;
|
|
796
|
+
}
|
|
797
|
+
}
|
|
515
798
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
799
|
+
export interface LoyaltyRule {
|
|
800
|
+
/**
|
|
801
|
+
* UUID of the loyalty rule (converted to lowercase)
|
|
802
|
+
*/
|
|
803
|
+
id: string;
|
|
520
804
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
805
|
+
/**
|
|
806
|
+
* The name of the loyalty rule
|
|
807
|
+
*/
|
|
808
|
+
name: string;
|
|
809
|
+
}
|
|
810
|
+
}
|
|
525
811
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
*/
|
|
529
|
-
name: string;
|
|
812
|
+
export interface BadgeListResponse {
|
|
813
|
+
data: Array<BadgeListResponse.Data>;
|
|
530
814
|
|
|
531
815
|
/**
|
|
532
|
-
*
|
|
816
|
+
* Indicates if there is a next page of results
|
|
533
817
|
*/
|
|
534
|
-
|
|
818
|
+
hasNextPage: boolean;
|
|
535
819
|
}
|
|
536
820
|
|
|
537
821
|
export namespace BadgeListResponse {
|
|
538
822
|
/**
|
|
539
|
-
*
|
|
823
|
+
* Response returned upon successful fetching of the badges.
|
|
540
824
|
*/
|
|
541
|
-
export interface
|
|
825
|
+
export interface Data {
|
|
542
826
|
/**
|
|
543
|
-
* UUID of the
|
|
827
|
+
* UUID of the badge (converted to lowercase)
|
|
544
828
|
*/
|
|
545
829
|
id: string;
|
|
546
830
|
|
|
547
831
|
/**
|
|
548
|
-
* The
|
|
832
|
+
* The date and time the badge was created
|
|
549
833
|
*/
|
|
550
|
-
|
|
834
|
+
createdAt: string;
|
|
551
835
|
|
|
552
|
-
|
|
836
|
+
/**
|
|
837
|
+
* The description of the badge
|
|
838
|
+
*/
|
|
839
|
+
description: string | null;
|
|
553
840
|
|
|
554
841
|
/**
|
|
555
|
-
* The URL of the
|
|
842
|
+
* The URL of the badge image
|
|
556
843
|
*/
|
|
557
|
-
|
|
844
|
+
imageUrl: string | null;
|
|
558
845
|
|
|
559
846
|
/**
|
|
560
|
-
*
|
|
847
|
+
* Array of conditions of the badge
|
|
561
848
|
*/
|
|
562
|
-
|
|
849
|
+
loyaltyConditions: Array<Data.LoyaltyCondition>;
|
|
563
850
|
|
|
564
851
|
/**
|
|
565
|
-
*
|
|
852
|
+
* The name of the badge
|
|
566
853
|
*/
|
|
567
|
-
|
|
854
|
+
name: string;
|
|
568
855
|
|
|
569
856
|
/**
|
|
570
|
-
*
|
|
857
|
+
* The date and time the badge was updated
|
|
571
858
|
*/
|
|
572
|
-
|
|
859
|
+
updatedAt: string;
|
|
573
860
|
|
|
574
861
|
/**
|
|
575
|
-
*
|
|
862
|
+
* Array of data jobs associated with the badge
|
|
576
863
|
*/
|
|
577
|
-
|
|
864
|
+
dataJobs?: Array<Data.DataJob>;
|
|
578
865
|
|
|
579
866
|
/**
|
|
580
|
-
*
|
|
867
|
+
* Whether to hide this badge in the user interface
|
|
581
868
|
*/
|
|
582
|
-
|
|
869
|
+
hideInUi?: boolean;
|
|
583
870
|
|
|
584
871
|
/**
|
|
585
|
-
*
|
|
872
|
+
* Array of user badges
|
|
586
873
|
*/
|
|
587
|
-
|
|
874
|
+
loyaltyBadgeUsers?: Array<Data.LoyaltyBadgeUser>;
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* Array of loyalty rules associated with the badge
|
|
878
|
+
*/
|
|
879
|
+
loyaltyRules?: Array<Data.LoyaltyRule>;
|
|
588
880
|
}
|
|
589
881
|
|
|
590
|
-
export namespace
|
|
591
|
-
|
|
592
|
-
|
|
882
|
+
export namespace Data {
|
|
883
|
+
/**
|
|
884
|
+
* Schema for a loyalty condition rule.
|
|
885
|
+
*/
|
|
886
|
+
export interface LoyaltyCondition {
|
|
887
|
+
/**
|
|
888
|
+
* UUID of the condition (converted to lowercase)
|
|
889
|
+
*/
|
|
890
|
+
id: string;
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* The amount of the condition
|
|
894
|
+
*/
|
|
895
|
+
amount: number | null;
|
|
896
|
+
|
|
897
|
+
association: Array<LoyaltyCondition.Association>;
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* URL of the CSV file
|
|
901
|
+
*/
|
|
902
|
+
csvUrl: string | null;
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* The description of the condition
|
|
906
|
+
*/
|
|
907
|
+
description: string | null;
|
|
908
|
+
|
|
909
|
+
/**
|
|
910
|
+
* UUID of the currency (converted to lowercase)
|
|
911
|
+
*/
|
|
912
|
+
loyaltyCurrencyId: string | null;
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* UUID of the rule group (converted to lowercase)
|
|
916
|
+
*/
|
|
917
|
+
loyaltyRuleGroupId: string | null;
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* The repeat count of the condition
|
|
921
|
+
*/
|
|
922
|
+
repeatCount: number | null;
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* The required count of the condition
|
|
926
|
+
*/
|
|
927
|
+
requiredCount: number | null;
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* The type of the condition
|
|
931
|
+
*/
|
|
932
|
+
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* Array of CSV files associated with the condition
|
|
936
|
+
*/
|
|
937
|
+
csvFiles?: Array<LoyaltyCondition.CsvFile>;
|
|
938
|
+
}
|
|
593
939
|
|
|
594
|
-
|
|
940
|
+
export namespace LoyaltyCondition {
|
|
941
|
+
export interface Association {
|
|
942
|
+
loyaltyBadge: Association.LoyaltyBadge | null;
|
|
595
943
|
|
|
596
|
-
|
|
944
|
+
loyaltyCurrency: Association.LoyaltyCurrency | null;
|
|
597
945
|
|
|
598
|
-
|
|
946
|
+
loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
|
|
599
947
|
|
|
600
|
-
|
|
601
|
-
}
|
|
948
|
+
loyaltyRule: Association.LoyaltyRule | null;
|
|
602
949
|
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
/**
|
|
606
|
-
* UUID of the association (converted to lowercase)
|
|
607
|
-
*/
|
|
608
|
-
id: string;
|
|
950
|
+
loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
|
|
951
|
+
}
|
|
609
952
|
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
953
|
+
export namespace Association {
|
|
954
|
+
export interface LoyaltyBadge {
|
|
955
|
+
/**
|
|
956
|
+
* UUID of the association (converted to lowercase)
|
|
957
|
+
*/
|
|
958
|
+
id: string;
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* The name of the association
|
|
962
|
+
*/
|
|
963
|
+
name: string;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
export interface LoyaltyCurrency {
|
|
967
|
+
/**
|
|
968
|
+
* UUID of the association (converted to lowercase)
|
|
969
|
+
*/
|
|
970
|
+
id: string;
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* The name of the association
|
|
974
|
+
*/
|
|
975
|
+
name: string;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
export interface LoyaltyLeaderboardView {
|
|
979
|
+
/**
|
|
980
|
+
* UUID of the association (converted to lowercase)
|
|
981
|
+
*/
|
|
982
|
+
id: string;
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* The name of the association
|
|
986
|
+
*/
|
|
987
|
+
name: string;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
export interface LoyaltyRule {
|
|
991
|
+
/**
|
|
992
|
+
* UUID of the association (converted to lowercase)
|
|
993
|
+
*/
|
|
994
|
+
id: string;
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* The name of the association
|
|
998
|
+
*/
|
|
999
|
+
name: string;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
export interface LoyaltyRuleGroup {
|
|
1003
|
+
/**
|
|
1004
|
+
* UUID of the association (converted to lowercase)
|
|
1005
|
+
*/
|
|
1006
|
+
id: string;
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* The name of the association
|
|
1010
|
+
*/
|
|
1011
|
+
name: string;
|
|
1012
|
+
}
|
|
614
1013
|
}
|
|
615
1014
|
|
|
616
|
-
export interface
|
|
1015
|
+
export interface CsvFile {
|
|
617
1016
|
/**
|
|
618
|
-
* UUID of the
|
|
1017
|
+
* UUID of the CSV file (converted to lowercase)
|
|
619
1018
|
*/
|
|
620
1019
|
id: string;
|
|
621
1020
|
|
|
622
1021
|
/**
|
|
623
|
-
* The
|
|
1022
|
+
* The description of the CSV file
|
|
624
1023
|
*/
|
|
625
|
-
|
|
626
|
-
}
|
|
1024
|
+
description: string | null;
|
|
627
1025
|
|
|
628
|
-
export interface LoyaltyLeaderboardView {
|
|
629
1026
|
/**
|
|
630
|
-
*
|
|
1027
|
+
* The name of the CSV file
|
|
631
1028
|
*/
|
|
632
|
-
|
|
1029
|
+
name: string | null;
|
|
633
1030
|
|
|
634
1031
|
/**
|
|
635
|
-
* The
|
|
1032
|
+
* The URL of the CSV file
|
|
636
1033
|
*/
|
|
637
|
-
|
|
1034
|
+
url: string | null;
|
|
638
1035
|
}
|
|
1036
|
+
}
|
|
639
1037
|
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
1038
|
+
export interface DataJob {
|
|
1039
|
+
/**
|
|
1040
|
+
* UUID of the data job (converted to lowercase)
|
|
1041
|
+
*/
|
|
1042
|
+
id: string;
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* The date and time the data job was created
|
|
1046
|
+
*/
|
|
1047
|
+
createdAt: string;
|
|
1048
|
+
|
|
1049
|
+
/**
|
|
1050
|
+
* The status of the data job
|
|
1051
|
+
*/
|
|
1052
|
+
status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
|
|
1053
|
+
|
|
1054
|
+
/**
|
|
1055
|
+
* The date and time the data job was updated
|
|
1056
|
+
*/
|
|
1057
|
+
updatedAt: string;
|
|
1058
|
+
|
|
1059
|
+
/**
|
|
1060
|
+
* The message associated with the data job
|
|
1061
|
+
*/
|
|
1062
|
+
message?: string | null;
|
|
1063
|
+
}
|
|
645
1064
|
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
1065
|
+
export interface LoyaltyBadgeUser {
|
|
1066
|
+
/**
|
|
1067
|
+
* UUID of the user badge (converted to lowercase)
|
|
1068
|
+
*/
|
|
1069
|
+
id: string;
|
|
1070
|
+
|
|
1071
|
+
/**
|
|
1072
|
+
* The date and time the user badge was created
|
|
1073
|
+
*/
|
|
1074
|
+
createdAt: string;
|
|
1075
|
+
|
|
1076
|
+
/**
|
|
1077
|
+
* UUID of the badge (converted to lowercase)
|
|
1078
|
+
*/
|
|
1079
|
+
loyaltyBadgeId: string;
|
|
1080
|
+
|
|
1081
|
+
/**
|
|
1082
|
+
* UUID of the organization (converted to lowercase)
|
|
1083
|
+
*/
|
|
1084
|
+
organizationId: string;
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* The status of the badge
|
|
1088
|
+
*/
|
|
1089
|
+
status: 'active' | 'inactive' | 'revoked';
|
|
1090
|
+
|
|
1091
|
+
/**
|
|
1092
|
+
* The date and time the user badge was updated
|
|
1093
|
+
*/
|
|
1094
|
+
updatedAt: string;
|
|
1095
|
+
|
|
1096
|
+
/**
|
|
1097
|
+
* UUID of the user (converted to lowercase)
|
|
1098
|
+
*/
|
|
1099
|
+
userId: string;
|
|
1100
|
+
|
|
1101
|
+
/**
|
|
1102
|
+
* UUID of the website (converted to lowercase)
|
|
1103
|
+
*/
|
|
1104
|
+
websiteId: string;
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* Whether the user has dismissed the badge in the UI
|
|
1108
|
+
*/
|
|
1109
|
+
dismissedInUi?: boolean;
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* Whether to hide this badge in the user interface
|
|
1113
|
+
*/
|
|
1114
|
+
hideInUi?: boolean;
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* Array of progress for the badge
|
|
1118
|
+
*/
|
|
1119
|
+
progress?: unknown;
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* User associated with the user badge
|
|
1123
|
+
*/
|
|
1124
|
+
user?: LoyaltyBadgeUser.User;
|
|
1125
|
+
}
|
|
651
1126
|
|
|
652
|
-
|
|
1127
|
+
export namespace LoyaltyBadgeUser {
|
|
1128
|
+
/**
|
|
1129
|
+
* User associated with the user badge
|
|
1130
|
+
*/
|
|
1131
|
+
export interface User {
|
|
653
1132
|
/**
|
|
654
|
-
* UUID of the
|
|
1133
|
+
* UUID of the user (converted to lowercase)
|
|
655
1134
|
*/
|
|
656
1135
|
id: string;
|
|
657
1136
|
|
|
658
1137
|
/**
|
|
659
|
-
*
|
|
1138
|
+
* Wallet address of the user
|
|
660
1139
|
*/
|
|
661
|
-
|
|
1140
|
+
walletAddress: string;
|
|
662
1141
|
}
|
|
663
1142
|
}
|
|
664
|
-
}
|
|
665
1143
|
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
1144
|
+
export interface LoyaltyRule {
|
|
1145
|
+
/**
|
|
1146
|
+
* UUID of the loyalty rule (converted to lowercase)
|
|
1147
|
+
*/
|
|
1148
|
+
id: string;
|
|
671
1149
|
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
/**
|
|
678
|
-
* UUID of the organization (converted to lowercase)
|
|
679
|
-
*/
|
|
680
|
-
organizationId: string;
|
|
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;
|
|
696
|
-
|
|
697
|
-
/**
|
|
698
|
-
* Array of progress for the badge
|
|
699
|
-
*/
|
|
700
|
-
progress?: unknown;
|
|
1150
|
+
/**
|
|
1151
|
+
* The name of the loyalty rule
|
|
1152
|
+
*/
|
|
1153
|
+
name: string;
|
|
1154
|
+
}
|
|
701
1155
|
}
|
|
702
1156
|
}
|
|
703
1157
|
|
|
@@ -710,6 +1164,11 @@ export interface BadgeDeleteResponse {
|
|
|
710
1164
|
*/
|
|
711
1165
|
id: string;
|
|
712
1166
|
|
|
1167
|
+
/**
|
|
1168
|
+
* The date and time the badge was created
|
|
1169
|
+
*/
|
|
1170
|
+
createdAt: string;
|
|
1171
|
+
|
|
713
1172
|
/**
|
|
714
1173
|
* The description of the badge
|
|
715
1174
|
*/
|
|
@@ -730,10 +1189,30 @@ export interface BadgeDeleteResponse {
|
|
|
730
1189
|
*/
|
|
731
1190
|
name: string;
|
|
732
1191
|
|
|
1192
|
+
/**
|
|
1193
|
+
* The date and time the badge was updated
|
|
1194
|
+
*/
|
|
1195
|
+
updatedAt: string;
|
|
1196
|
+
|
|
1197
|
+
/**
|
|
1198
|
+
* Array of data jobs associated with the badge
|
|
1199
|
+
*/
|
|
1200
|
+
dataJobs?: Array<BadgeDeleteResponse.DataJob>;
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* Whether to hide this badge in the user interface
|
|
1204
|
+
*/
|
|
1205
|
+
hideInUi?: boolean;
|
|
1206
|
+
|
|
733
1207
|
/**
|
|
734
1208
|
* Array of user badges
|
|
735
1209
|
*/
|
|
736
|
-
|
|
1210
|
+
loyaltyBadgeUsers?: Array<BadgeDeleteResponse.LoyaltyBadgeUser>;
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* Array of loyalty rules associated with the badge
|
|
1214
|
+
*/
|
|
1215
|
+
loyaltyRules?: Array<BadgeDeleteResponse.LoyaltyRule>;
|
|
737
1216
|
}
|
|
738
1217
|
|
|
739
1218
|
export namespace BadgeDeleteResponse {
|
|
@@ -754,7 +1233,7 @@ export namespace BadgeDeleteResponse {
|
|
|
754
1233
|
association: Array<LoyaltyCondition.Association>;
|
|
755
1234
|
|
|
756
1235
|
/**
|
|
757
|
-
*
|
|
1236
|
+
* URL of the CSV file
|
|
758
1237
|
*/
|
|
759
1238
|
csvUrl: string | null;
|
|
760
1239
|
|
|
@@ -787,6 +1266,11 @@ export namespace BadgeDeleteResponse {
|
|
|
787
1266
|
* The type of the condition
|
|
788
1267
|
*/
|
|
789
1268
|
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
1269
|
+
|
|
1270
|
+
/**
|
|
1271
|
+
* Array of CSV files associated with the condition
|
|
1272
|
+
*/
|
|
1273
|
+
csvFiles?: Array<LoyaltyCondition.CsvFile>;
|
|
790
1274
|
}
|
|
791
1275
|
|
|
792
1276
|
export namespace LoyaltyCondition {
|
|
@@ -863,6 +1347,55 @@ export namespace BadgeDeleteResponse {
|
|
|
863
1347
|
name: string;
|
|
864
1348
|
}
|
|
865
1349
|
}
|
|
1350
|
+
|
|
1351
|
+
export interface CsvFile {
|
|
1352
|
+
/**
|
|
1353
|
+
* UUID of the CSV file (converted to lowercase)
|
|
1354
|
+
*/
|
|
1355
|
+
id: string;
|
|
1356
|
+
|
|
1357
|
+
/**
|
|
1358
|
+
* The description of the CSV file
|
|
1359
|
+
*/
|
|
1360
|
+
description: string | null;
|
|
1361
|
+
|
|
1362
|
+
/**
|
|
1363
|
+
* The name of the CSV file
|
|
1364
|
+
*/
|
|
1365
|
+
name: string | null;
|
|
1366
|
+
|
|
1367
|
+
/**
|
|
1368
|
+
* The URL of the CSV file
|
|
1369
|
+
*/
|
|
1370
|
+
url: string | null;
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
export interface DataJob {
|
|
1375
|
+
/**
|
|
1376
|
+
* UUID of the data job (converted to lowercase)
|
|
1377
|
+
*/
|
|
1378
|
+
id: string;
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
* The date and time the data job was created
|
|
1382
|
+
*/
|
|
1383
|
+
createdAt: string;
|
|
1384
|
+
|
|
1385
|
+
/**
|
|
1386
|
+
* The status of the data job
|
|
1387
|
+
*/
|
|
1388
|
+
status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
|
|
1389
|
+
|
|
1390
|
+
/**
|
|
1391
|
+
* The date and time the data job was updated
|
|
1392
|
+
*/
|
|
1393
|
+
updatedAt: string;
|
|
1394
|
+
|
|
1395
|
+
/**
|
|
1396
|
+
* The message associated with the data job
|
|
1397
|
+
*/
|
|
1398
|
+
message?: string | null;
|
|
866
1399
|
}
|
|
867
1400
|
|
|
868
1401
|
export interface LoyaltyBadgeUser {
|
|
@@ -871,6 +1404,11 @@ export namespace BadgeDeleteResponse {
|
|
|
871
1404
|
*/
|
|
872
1405
|
id: string;
|
|
873
1406
|
|
|
1407
|
+
/**
|
|
1408
|
+
* The date and time the user badge was created
|
|
1409
|
+
*/
|
|
1410
|
+
createdAt: string;
|
|
1411
|
+
|
|
874
1412
|
/**
|
|
875
1413
|
* UUID of the badge (converted to lowercase)
|
|
876
1414
|
*/
|
|
@@ -886,6 +1424,11 @@ export namespace BadgeDeleteResponse {
|
|
|
886
1424
|
*/
|
|
887
1425
|
status: 'active' | 'inactive' | 'revoked';
|
|
888
1426
|
|
|
1427
|
+
/**
|
|
1428
|
+
* The date and time the user badge was updated
|
|
1429
|
+
*/
|
|
1430
|
+
updatedAt: string;
|
|
1431
|
+
|
|
889
1432
|
/**
|
|
890
1433
|
* UUID of the user (converted to lowercase)
|
|
891
1434
|
*/
|
|
@@ -896,10 +1439,54 @@ export namespace BadgeDeleteResponse {
|
|
|
896
1439
|
*/
|
|
897
1440
|
websiteId: string;
|
|
898
1441
|
|
|
1442
|
+
/**
|
|
1443
|
+
* Whether the user has dismissed the badge in the UI
|
|
1444
|
+
*/
|
|
1445
|
+
dismissedInUi?: boolean;
|
|
1446
|
+
|
|
1447
|
+
/**
|
|
1448
|
+
* Whether to hide this badge in the user interface
|
|
1449
|
+
*/
|
|
1450
|
+
hideInUi?: boolean;
|
|
1451
|
+
|
|
899
1452
|
/**
|
|
900
1453
|
* Array of progress for the badge
|
|
901
1454
|
*/
|
|
902
1455
|
progress?: unknown;
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* User associated with the user badge
|
|
1459
|
+
*/
|
|
1460
|
+
user?: LoyaltyBadgeUser.User;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
export namespace LoyaltyBadgeUser {
|
|
1464
|
+
/**
|
|
1465
|
+
* User associated with the user badge
|
|
1466
|
+
*/
|
|
1467
|
+
export interface User {
|
|
1468
|
+
/**
|
|
1469
|
+
* UUID of the user (converted to lowercase)
|
|
1470
|
+
*/
|
|
1471
|
+
id: string;
|
|
1472
|
+
|
|
1473
|
+
/**
|
|
1474
|
+
* Wallet address of the user
|
|
1475
|
+
*/
|
|
1476
|
+
walletAddress: string;
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
export interface LoyaltyRule {
|
|
1481
|
+
/**
|
|
1482
|
+
* UUID of the loyalty rule (converted to lowercase)
|
|
1483
|
+
*/
|
|
1484
|
+
id: string;
|
|
1485
|
+
|
|
1486
|
+
/**
|
|
1487
|
+
* The name of the loyalty rule
|
|
1488
|
+
*/
|
|
1489
|
+
name: string;
|
|
903
1490
|
}
|
|
904
1491
|
}
|
|
905
1492
|
|
|
@@ -952,6 +1539,11 @@ export namespace BadgeRewardResponse {
|
|
|
952
1539
|
}
|
|
953
1540
|
|
|
954
1541
|
export interface BadgeCreateParams {
|
|
1542
|
+
/**
|
|
1543
|
+
* Array of conditions for the badge
|
|
1544
|
+
*/
|
|
1545
|
+
conditions: Array<BadgeCreateParams.Condition>;
|
|
1546
|
+
|
|
955
1547
|
/**
|
|
956
1548
|
* The URL of the badge image
|
|
957
1549
|
*/
|
|
@@ -967,29 +1559,26 @@ export interface BadgeCreateParams {
|
|
|
967
1559
|
*/
|
|
968
1560
|
organizationId: string;
|
|
969
1561
|
|
|
970
|
-
/**
|
|
971
|
-
* Array of rules for the badge
|
|
972
|
-
*/
|
|
973
|
-
rules: Array<BadgeCreateParams.Rule>;
|
|
974
|
-
|
|
975
1562
|
/**
|
|
976
1563
|
* UUID of the website (optional, converted to lowercase)
|
|
977
1564
|
*/
|
|
978
1565
|
websiteId: string;
|
|
979
1566
|
|
|
1567
|
+
csvFiles?: Array<BadgeCreateParams.CsvFile>;
|
|
1568
|
+
|
|
980
1569
|
/**
|
|
981
1570
|
* The description of the badge
|
|
982
1571
|
*/
|
|
983
1572
|
description?: string;
|
|
1573
|
+
|
|
1574
|
+
/**
|
|
1575
|
+
* Whether to hide this badge in the user interface
|
|
1576
|
+
*/
|
|
1577
|
+
hideInUi?: boolean;
|
|
984
1578
|
}
|
|
985
1579
|
|
|
986
1580
|
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
|
-
|
|
1581
|
+
export interface Condition {
|
|
993
1582
|
/**
|
|
994
1583
|
* The amount of the rule
|
|
995
1584
|
*/
|
|
@@ -1023,7 +1612,7 @@ export namespace BadgeCreateParams {
|
|
|
1023
1612
|
/**
|
|
1024
1613
|
* UUID of the loyalty rule chain (optional, converted to lowercase)
|
|
1025
1614
|
*/
|
|
1026
|
-
loyaltyRuleChainId?: string;
|
|
1615
|
+
loyaltyRuleChainId?: string | null;
|
|
1027
1616
|
|
|
1028
1617
|
/**
|
|
1029
1618
|
* Array of UUIDs of the rule group (optional, converted to lowercase)
|
|
@@ -1044,15 +1633,35 @@ export namespace BadgeCreateParams {
|
|
|
1044
1633
|
* The number of rules that need to be fulfilled to satisfy the condition
|
|
1045
1634
|
*/
|
|
1046
1635
|
requiredCount?: number | null;
|
|
1636
|
+
|
|
1637
|
+
/**
|
|
1638
|
+
* The type of rule
|
|
1639
|
+
*/
|
|
1640
|
+
type?: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
export interface CsvFile {
|
|
1644
|
+
src: string;
|
|
1645
|
+
|
|
1646
|
+
description?: string;
|
|
1647
|
+
|
|
1648
|
+
name?: string;
|
|
1047
1649
|
}
|
|
1048
1650
|
}
|
|
1049
1651
|
|
|
1050
1652
|
export interface BadgeUpdateParams {
|
|
1653
|
+
csvFiles?: Array<BadgeUpdateParams.CsvFile>;
|
|
1654
|
+
|
|
1051
1655
|
/**
|
|
1052
1656
|
* The description of the badge
|
|
1053
1657
|
*/
|
|
1054
1658
|
description?: string;
|
|
1055
1659
|
|
|
1660
|
+
/**
|
|
1661
|
+
* Whether to hide this badge in the user interface
|
|
1662
|
+
*/
|
|
1663
|
+
hideInUi?: boolean;
|
|
1664
|
+
|
|
1056
1665
|
/**
|
|
1057
1666
|
* The URL of the badge image
|
|
1058
1667
|
*/
|
|
@@ -1064,11 +1673,21 @@ export interface BadgeUpdateParams {
|
|
|
1064
1673
|
name?: string;
|
|
1065
1674
|
}
|
|
1066
1675
|
|
|
1676
|
+
export namespace BadgeUpdateParams {
|
|
1677
|
+
export interface CsvFile {
|
|
1678
|
+
src: string;
|
|
1679
|
+
|
|
1680
|
+
description?: string;
|
|
1681
|
+
|
|
1682
|
+
name?: string;
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1067
1686
|
export interface BadgeListParams {
|
|
1068
1687
|
/**
|
|
1069
1688
|
* Array of badge IDs (converted to lowercase) to fetch
|
|
1070
1689
|
*/
|
|
1071
|
-
badgeIds?: Array<string>;
|
|
1690
|
+
badgeIds?: string | Array<string>;
|
|
1072
1691
|
|
|
1073
1692
|
/**
|
|
1074
1693
|
* Include deleted badges in the response
|
|
@@ -1091,9 +1710,24 @@ export interface BadgeListParams {
|
|
|
1091
1710
|
startingAfter?: string;
|
|
1092
1711
|
|
|
1093
1712
|
/**
|
|
1094
|
-
*
|
|
1713
|
+
* External identifier of the user group
|
|
1095
1714
|
*/
|
|
1096
|
-
|
|
1715
|
+
userGroupExternalIdentifier?: string;
|
|
1716
|
+
|
|
1717
|
+
/**
|
|
1718
|
+
* UUID of the user group
|
|
1719
|
+
*/
|
|
1720
|
+
userGroupId?: string;
|
|
1721
|
+
|
|
1722
|
+
/**
|
|
1723
|
+
* UUID of the user, or array of UUID.
|
|
1724
|
+
*/
|
|
1725
|
+
userId?: string | Array<string>;
|
|
1726
|
+
|
|
1727
|
+
/**
|
|
1728
|
+
* Wallet Address of the user, or array of wallet addresses.
|
|
1729
|
+
*/
|
|
1730
|
+
walletAddress?: string | Array<string>;
|
|
1097
1731
|
|
|
1098
1732
|
/**
|
|
1099
1733
|
* UUID of the website (optional, converted to lowercase)
|
|
@@ -1102,6 +1736,11 @@ export interface BadgeListParams {
|
|
|
1102
1736
|
}
|
|
1103
1737
|
|
|
1104
1738
|
export interface BadgeRevokeParams {
|
|
1739
|
+
/**
|
|
1740
|
+
* Status of the badge
|
|
1741
|
+
*/
|
|
1742
|
+
status?: 'active' | 'inactive' | 'revoked';
|
|
1743
|
+
|
|
1105
1744
|
/**
|
|
1106
1745
|
* UUID of the user (converted to lowercase)
|
|
1107
1746
|
*/
|
|
@@ -1114,6 +1753,11 @@ export interface BadgeRevokeParams {
|
|
|
1114
1753
|
}
|
|
1115
1754
|
|
|
1116
1755
|
export interface BadgeRewardParams {
|
|
1756
|
+
/**
|
|
1757
|
+
* Status of the badge
|
|
1758
|
+
*/
|
|
1759
|
+
status?: 'active' | 'inactive' | 'revoked';
|
|
1760
|
+
|
|
1117
1761
|
/**
|
|
1118
1762
|
* UUID of the user (converted to lowercase)
|
|
1119
1763
|
*/
|