@snagsolutions/sdk 0.1.0-alpha.55 → 0.1.0-alpha.57
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 +27 -0
- package/package.json +1 -1
- package/resources/assets.d.ts +8 -0
- 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 +19 -0
- package/resources/auctions/auctions.d.ts.map +1 -1
- package/resources/auctions/auctions.js +14 -0
- package/resources/auctions/auctions.js.map +1 -1
- package/resources/auctions/auctions.mjs +14 -0
- package/resources/auctions/auctions.mjs.map +1 -1
- package/resources/auctions/website-user-attributes/values.d.ts +28 -0
- package/resources/auctions/website-user-attributes/values.d.ts.map +1 -1
- package/resources/auctions/website-user-attributes/values.js +28 -0
- package/resources/auctions/website-user-attributes/values.js.map +1 -1
- package/resources/auctions/website-user-attributes/values.mjs +28 -0
- package/resources/auctions/website-user-attributes/values.mjs.map +1 -1
- package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +24 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -1
- package/resources/auctions/website-user-attributes/website-user-attributes.js +18 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -1
- package/resources/auctions/website-user-attributes/website-user-attributes.mjs +18 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -1
- package/resources/loyalty/accounts.d.ts +18 -0
- package/resources/loyalty/accounts.d.ts.map +1 -1
- package/resources/loyalty/accounts.js +13 -0
- package/resources/loyalty/accounts.js.map +1 -1
- package/resources/loyalty/accounts.mjs +13 -0
- package/resources/loyalty/accounts.mjs.map +1 -1
- package/resources/loyalty/badges.d.ts +44 -0
- package/resources/loyalty/badges.d.ts.map +1 -1
- package/resources/loyalty/badges.js +18 -0
- package/resources/loyalty/badges.js.map +1 -1
- package/resources/loyalty/badges.mjs +18 -0
- 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/multipliers.d.ts +35 -0
- 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 +15 -0
- 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 +33 -0
- package/resources/loyalty/questions.d.ts.map +1 -1
- package/resources/loyalty/questions.js +33 -0
- package/resources/loyalty/questions.js.map +1 -1
- package/resources/loyalty/questions.mjs +33 -0
- package/resources/loyalty/questions.mjs.map +1 -1
- package/resources/loyalty/rule-edits.d.ts +22 -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 +35 -3
- package/resources/loyalty/rule-groups.d.ts.map +1 -1
- package/resources/loyalty/rule-groups.js +18 -0
- package/resources/loyalty/rule-groups.js.map +1 -1
- package/resources/loyalty/rule-groups.mjs +18 -0
- package/resources/loyalty/rule-groups.mjs.map +1 -1
- package/resources/loyalty/rules.d.ts +76 -21
- package/resources/loyalty/rules.d.ts.map +1 -1
- package/resources/loyalty/rules.js +30 -0
- package/resources/loyalty/rules.js.map +1 -1
- package/resources/loyalty/rules.mjs +30 -0
- package/resources/loyalty/rules.mjs.map +1 -1
- package/resources/loyalty/transactions/rule-statuses.d.ts +14 -0
- package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -1
- package/resources/loyalty/transactions/rule-statuses.js +8 -0
- package/resources/loyalty/transactions/rule-statuses.js.map +1 -1
- package/resources/loyalty/transactions/rule-statuses.mjs +8 -0
- package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -1
- package/resources/loyalty/transactions/transactions.d.ts +26 -1
- package/resources/loyalty/transactions/transactions.d.ts.map +1 -1
- package/resources/loyalty/transactions/transactions.js +18 -0
- package/resources/loyalty/transactions/transactions.js.map +1 -1
- package/resources/loyalty/transactions/transactions.mjs +18 -0
- package/resources/loyalty/transactions/transactions.mjs.map +1 -1
- package/resources/minting.d.ts +1 -1
- package/resources/minting.d.ts.map +1 -1
- package/resources/referral/referral.d.ts +7 -0
- package/resources/referral/referral.d.ts.map +1 -1
- package/resources/referral/referral.js +7 -0
- package/resources/referral/referral.js.map +1 -1
- package/resources/referral/referral.mjs +7 -0
- package/resources/referral/referral.mjs.map +1 -1
- package/resources/referral/users.d.ts +14 -0
- package/resources/referral/users.d.ts.map +1 -1
- package/resources/referral/users.js +14 -0
- package/resources/referral/users.js.map +1 -1
- package/resources/referral/users.mjs +14 -0
- package/resources/referral/users.mjs.map +1 -1
- package/resources/users/metadatas.d.ts +10 -0
- 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 +48 -0
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.js +43 -0
- package/resources/users/users.js.map +1 -1
- package/resources/users/users.mjs +43 -0
- 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 +23 -0
- 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/resources/assets.ts +8 -0
- package/src/resources/auctions/auctions.ts +19 -0
- package/src/resources/auctions/website-user-attributes/values.ts +28 -0
- package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +24 -0
- package/src/resources/loyalty/accounts.ts +18 -0
- package/src/resources/loyalty/badges.ts +44 -0
- package/src/resources/loyalty/currencies.ts +19 -0
- package/src/resources/loyalty/multipliers.ts +35 -0
- package/src/resources/loyalty/questions-responses.ts +15 -0
- package/src/resources/loyalty/questions.ts +33 -0
- package/src/resources/loyalty/rule-edits.ts +22 -0
- package/src/resources/loyalty/rule-groups.ts +35 -0
- package/src/resources/loyalty/rules.ts +76 -1
- package/src/resources/loyalty/transactions/rule-statuses.ts +14 -0
- package/src/resources/loyalty/transactions/transactions.ts +28 -0
- package/src/resources/minting.ts +1 -0
- package/src/resources/referral/referral.ts +7 -0
- package/src/resources/referral/users.ts +14 -0
- package/src/resources/users/metadatas.ts +10 -0
- package/src/resources/users/users.ts +48 -0
- package/src/resources/websites/website-collections.ts +22 -0
- package/src/resources/websites/website-user-roles.ts +23 -0
- package/src/resources/websites/websites.ts +12 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -8,6 +8,12 @@ export class QuestionsResponses extends APIResource {
|
|
|
8
8
|
/**
|
|
9
9
|
* Retrieve responses submitted by the authenticated user, optionally filtered by
|
|
10
10
|
* question IDs
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const questionsResponses =
|
|
15
|
+
* await client.loyalty.questionsResponses.list();
|
|
16
|
+
* ```
|
|
11
17
|
*/
|
|
12
18
|
list(
|
|
13
19
|
query?: QuestionsResponseListParams,
|
|
@@ -26,6 +32,15 @@ export class QuestionsResponses extends APIResource {
|
|
|
26
32
|
|
|
27
33
|
/**
|
|
28
34
|
* This endpoint allows you to submit a response to a question.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const response =
|
|
39
|
+
* await client.loyalty.questionsResponses.submit({
|
|
40
|
+
* loyaltyQuestionChoiceId:
|
|
41
|
+
* '123e4567-e89b-12d3-a456-426614174001',
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
29
44
|
*/
|
|
30
45
|
submit(
|
|
31
46
|
body: QuestionsResponseSubmitParams,
|
|
@@ -6,6 +6,17 @@ import * as Core from '../../core';
|
|
|
6
6
|
export class Questions extends APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* This endpoint allows you to create a new question.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const question = await client.loyalty.questions.create({
|
|
13
|
+
* loyaltyQuestionAnswers: [
|
|
14
|
+
* { isCorrect: true, sortIdentifier: 1, text: 'Red' },
|
|
15
|
+
* ],
|
|
16
|
+
* loyaltyRuleId: '123e4567-e89b-12d3-a456-426614174000',
|
|
17
|
+
* questionText: 'What is your favorite color?',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
9
20
|
*/
|
|
10
21
|
create(body: QuestionCreateParams, options?: Core.RequestOptions): Core.APIPromise<QuestionCreateResponse> {
|
|
11
22
|
return this._client.post('/api/loyalty/questions', { body, ...options });
|
|
@@ -13,6 +24,19 @@ export class Questions extends APIResource {
|
|
|
13
24
|
|
|
14
25
|
/**
|
|
15
26
|
* This endpoint allows you to update an existing question.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const question = await client.loyalty.questions.update(
|
|
31
|
+
* 'id',
|
|
32
|
+
* {
|
|
33
|
+
* loyaltyQuestionAnswers: [
|
|
34
|
+
* { isCorrect: true, sortIdentifier: 1, text: 'Red' },
|
|
35
|
+
* ],
|
|
36
|
+
* questionText: 'What is your favorite color?',
|
|
37
|
+
* },
|
|
38
|
+
* );
|
|
39
|
+
* ```
|
|
16
40
|
*/
|
|
17
41
|
update(
|
|
18
42
|
id: string,
|
|
@@ -24,6 +48,15 @@ export class Questions extends APIResource {
|
|
|
24
48
|
|
|
25
49
|
/**
|
|
26
50
|
* This endpoint allows you to fetch questions for a loyalty rule.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const questions = await client.loyalty.questions.list({
|
|
55
|
+
* loyaltyRuleIds: '123e4567-e89b-12d3-a456-426614174000',
|
|
56
|
+
* organizationId: '123e4567-e89b-12d3-a456-426614174002',
|
|
57
|
+
* websiteId: '123e4567-e89b-12d3-a456-426614174001',
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
27
60
|
*/
|
|
28
61
|
list(query: QuestionListParams, options?: Core.RequestOptions): Core.APIPromise<QuestionListResponse> {
|
|
29
62
|
return this._client.get('/api/loyalty/questions', { query, ...options });
|
|
@@ -6,6 +6,13 @@ import * as Core from '../../core';
|
|
|
6
6
|
export class RuleEdits extends APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Retrieve configured loyalty rule edits with optional pagination and filters
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const ruleEdits = await client.loyalty.ruleEdits.list({
|
|
13
|
+
* loyaltyRuleId: true,
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
9
16
|
*/
|
|
10
17
|
list(query: RuleEditListParams, options?: Core.RequestOptions): Core.APIPromise<RuleEditListResponse> {
|
|
11
18
|
return this._client.get('/api/loyalty/rule_edits', { query, ...options });
|
|
@@ -13,6 +20,13 @@ export class RuleEdits extends APIResource {
|
|
|
13
20
|
|
|
14
21
|
/**
|
|
15
22
|
* Restore a loyalty rule from a rule edit
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const response = await client.loyalty.ruleEdits.restore(
|
|
27
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
28
|
+
* );
|
|
29
|
+
* ```
|
|
16
30
|
*/
|
|
17
31
|
restore(
|
|
18
32
|
id: string,
|
|
@@ -577,6 +591,7 @@ export namespace RuleEditListResponse {
|
|
|
577
591
|
| 'skaleNebula'
|
|
578
592
|
| 'solana'
|
|
579
593
|
| 'sophon'
|
|
594
|
+
| 'sophonTestnet'
|
|
580
595
|
| 'sui'
|
|
581
596
|
| 'superseed'
|
|
582
597
|
| 'superseedSepolia'
|
|
@@ -701,6 +716,7 @@ export namespace RuleEditListResponse {
|
|
|
701
716
|
| 'skaleNebula'
|
|
702
717
|
| 'solana'
|
|
703
718
|
| 'sophon'
|
|
719
|
+
| 'sophonTestnet'
|
|
704
720
|
| 'sui'
|
|
705
721
|
| 'superseed'
|
|
706
722
|
| 'superseedSepolia'
|
|
@@ -1444,6 +1460,7 @@ export namespace RuleEditListResponse {
|
|
|
1444
1460
|
| 'skaleNebula'
|
|
1445
1461
|
| 'solana'
|
|
1446
1462
|
| 'sophon'
|
|
1463
|
+
| 'sophonTestnet'
|
|
1447
1464
|
| 'sui'
|
|
1448
1465
|
| 'superseed'
|
|
1449
1466
|
| 'superseedSepolia'
|
|
@@ -1568,6 +1585,7 @@ export namespace RuleEditListResponse {
|
|
|
1568
1585
|
| 'skaleNebula'
|
|
1569
1586
|
| 'solana'
|
|
1570
1587
|
| 'sophon'
|
|
1588
|
+
| 'sophonTestnet'
|
|
1571
1589
|
| 'sui'
|
|
1572
1590
|
| 'superseed'
|
|
1573
1591
|
| 'superseedSepolia'
|
|
@@ -2366,6 +2384,7 @@ export namespace RuleEditRestoreResponse {
|
|
|
2366
2384
|
| 'skaleNebula'
|
|
2367
2385
|
| 'solana'
|
|
2368
2386
|
| 'sophon'
|
|
2387
|
+
| 'sophonTestnet'
|
|
2369
2388
|
| 'sui'
|
|
2370
2389
|
| 'superseed'
|
|
2371
2390
|
| 'superseedSepolia'
|
|
@@ -2490,6 +2509,7 @@ export namespace RuleEditRestoreResponse {
|
|
|
2490
2509
|
| 'skaleNebula'
|
|
2491
2510
|
| 'solana'
|
|
2492
2511
|
| 'sophon'
|
|
2512
|
+
| 'sophonTestnet'
|
|
2493
2513
|
| 'sui'
|
|
2494
2514
|
| 'superseed'
|
|
2495
2515
|
| 'superseedSepolia'
|
|
@@ -3233,6 +3253,7 @@ export namespace RuleEditRestoreResponse {
|
|
|
3233
3253
|
| 'skaleNebula'
|
|
3234
3254
|
| 'solana'
|
|
3235
3255
|
| 'sophon'
|
|
3256
|
+
| 'sophonTestnet'
|
|
3236
3257
|
| 'sui'
|
|
3237
3258
|
| 'superseed'
|
|
3238
3259
|
| 'superseedSepolia'
|
|
@@ -3357,6 +3378,7 @@ export namespace RuleEditRestoreResponse {
|
|
|
3357
3378
|
| 'skaleNebula'
|
|
3358
3379
|
| 'solana'
|
|
3359
3380
|
| 'sophon'
|
|
3381
|
+
| 'sophonTestnet'
|
|
3360
3382
|
| 'sui'
|
|
3361
3383
|
| 'superseed'
|
|
3362
3384
|
| 'superseedSepolia'
|
|
@@ -7,6 +7,16 @@ import * as Core from '../../core';
|
|
|
7
7
|
export class RuleGroups extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Create a new loyalty rule groups
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response =
|
|
14
|
+
* await client.loyalty.ruleGroups.createRuleGroup({
|
|
15
|
+
* name: 'name',
|
|
16
|
+
* organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
17
|
+
* websiteId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
10
20
|
*/
|
|
11
21
|
createRuleGroup(
|
|
12
22
|
body: RuleGroupCreateRuleGroupParams,
|
|
@@ -17,6 +27,14 @@ export class RuleGroups extends APIResource {
|
|
|
17
27
|
|
|
18
28
|
/**
|
|
19
29
|
* Delete loyalty rule group by ID
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const response =
|
|
34
|
+
* await client.loyalty.ruleGroups.deleteRuleGroup(
|
|
35
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
36
|
+
* );
|
|
37
|
+
* ```
|
|
20
38
|
*/
|
|
21
39
|
deleteRuleGroup(id: string, options?: Core.RequestOptions): Core.APIPromise<unknown> {
|
|
22
40
|
return this._client.delete(`/api/loyalty/rule_groups/${id}`, options);
|
|
@@ -24,6 +42,12 @@ export class RuleGroups extends APIResource {
|
|
|
24
42
|
|
|
25
43
|
/**
|
|
26
44
|
* Retrieve configured loyalty rule groups
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const response =
|
|
49
|
+
* await client.loyalty.ruleGroups.getRuleGroups();
|
|
50
|
+
* ```
|
|
27
51
|
*/
|
|
28
52
|
getRuleGroups(
|
|
29
53
|
query?: RuleGroupGetRuleGroupsParams,
|
|
@@ -42,6 +66,14 @@ export class RuleGroups extends APIResource {
|
|
|
42
66
|
|
|
43
67
|
/**
|
|
44
68
|
* Update loyalty rule group by ID
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const response =
|
|
73
|
+
* await client.loyalty.ruleGroups.updateRuleGroup(
|
|
74
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
75
|
+
* );
|
|
76
|
+
* ```
|
|
45
77
|
*/
|
|
46
78
|
updateRuleGroup(
|
|
47
79
|
id: string,
|
|
@@ -212,6 +244,7 @@ export namespace RuleGroupGetRuleGroupsResponse {
|
|
|
212
244
|
| 'steam_wishlist'
|
|
213
245
|
| 'liquidity_uniswap_v2'
|
|
214
246
|
| 'liquidity_uniswap_v3'
|
|
247
|
+
| 'points_airdrop'
|
|
215
248
|
| 'youtube_subscribers'
|
|
216
249
|
| 'youtube_comment';
|
|
217
250
|
}
|
|
@@ -630,6 +663,7 @@ export namespace RuleGroupGetRuleGroupsResponse {
|
|
|
630
663
|
| 'skaleNebula'
|
|
631
664
|
| 'solana'
|
|
632
665
|
| 'sophon'
|
|
666
|
+
| 'sophonTestnet'
|
|
633
667
|
| 'sui'
|
|
634
668
|
| 'superseed'
|
|
635
669
|
| 'superseedSepolia'
|
|
@@ -754,6 +788,7 @@ export namespace RuleGroupGetRuleGroupsResponse {
|
|
|
754
788
|
| 'skaleNebula'
|
|
755
789
|
| 'solana'
|
|
756
790
|
| 'sophon'
|
|
791
|
+
| 'sophonTestnet'
|
|
757
792
|
| 'sui'
|
|
758
793
|
| 'superseed'
|
|
759
794
|
| 'superseedSepolia'
|
|
@@ -7,6 +7,24 @@ import * as Core from '../../core';
|
|
|
7
7
|
export class Rules extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Create a new Loyalty Rule
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const rule = await client.loyalty.rules.create({
|
|
14
|
+
* amount: '10.5',
|
|
15
|
+
* effectiveEndTime: '2024-12-31T23:59:00Z',
|
|
16
|
+
* effectiveStartTime: '2024-01-01T00:00:00Z',
|
|
17
|
+
* endTime: '2024-12-31T23:59:00Z',
|
|
18
|
+
* frequency: 'daily',
|
|
19
|
+
* loyaltyCurrencyId: '456e1234-e89b-12d3-a456-426614174003',
|
|
20
|
+
* metadata: {},
|
|
21
|
+
* name: 'Referral Bonus Rule',
|
|
22
|
+
* organizationId: '123e4567-e89b-12d3-a456-426614174001',
|
|
23
|
+
* startTime: '2024-01-01T00:00:00Z',
|
|
24
|
+
* type: 'Bonus',
|
|
25
|
+
* websiteId: '123e4567-e89b-12d3-a456-426614174002',
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
10
28
|
*/
|
|
11
29
|
create(body: RuleCreateParams, options?: Core.RequestOptions): Core.APIPromise<RuleCreateResponse> {
|
|
12
30
|
return this._client.post('/api/loyalty/rules', { body, ...options });
|
|
@@ -14,6 +32,18 @@ export class Rules extends APIResource {
|
|
|
14
32
|
|
|
15
33
|
/**
|
|
16
34
|
* Update an existing Loyalty Rule
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const rule = await client.loyalty.rules.update(
|
|
39
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
40
|
+
* {
|
|
41
|
+
* amount: '10.5',
|
|
42
|
+
* endTime: '2024-12-31T23:59:00Z',
|
|
43
|
+
* name: 'Daily Rewards Program',
|
|
44
|
+
* },
|
|
45
|
+
* );
|
|
46
|
+
* ```
|
|
17
47
|
*/
|
|
18
48
|
update(
|
|
19
49
|
id: string,
|
|
@@ -25,6 +55,11 @@ export class Rules extends APIResource {
|
|
|
25
55
|
|
|
26
56
|
/**
|
|
27
57
|
* Retrieve configured loyalty rules with optional pagination and filters
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const rules = await client.loyalty.rules.list();
|
|
62
|
+
* ```
|
|
28
63
|
*/
|
|
29
64
|
list(query?: RuleListParams, options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
|
|
30
65
|
list(options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
|
|
@@ -40,6 +75,13 @@ export class Rules extends APIResource {
|
|
|
40
75
|
|
|
41
76
|
/**
|
|
42
77
|
* Delete an existing Loyalty Rule
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* const rule = await client.loyalty.rules.delete(
|
|
82
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
83
|
+
* );
|
|
84
|
+
* ```
|
|
43
85
|
*/
|
|
44
86
|
delete(
|
|
45
87
|
id: string,
|
|
@@ -64,7 +106,15 @@ export class Rules extends APIResource {
|
|
|
64
106
|
* endpoint currently only supports following rule types code_entry, text_input,
|
|
65
107
|
* link_click, discord_member, connect_wallet, check_in, external_rule,
|
|
66
108
|
* drip_x_follow, drip_x_new_tweet, drip_x_text_in_bio, drip_x_text_in_name,
|
|
67
|
-
* drip_x_text_in_comment, drip_x_tweet, telegram_join, DiscordMessages
|
|
109
|
+
* drip_x_text_in_comment, drip_x_tweet, telegram_join, DiscordMessages,
|
|
110
|
+
* youtube_subscribers, youtube_comment, steam_wishlist
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```ts
|
|
114
|
+
* const response = await client.loyalty.rules.complete(
|
|
115
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
116
|
+
* );
|
|
117
|
+
* ```
|
|
68
118
|
*/
|
|
69
119
|
complete(
|
|
70
120
|
id: string,
|
|
@@ -85,6 +135,11 @@ export class Rules extends APIResource {
|
|
|
85
135
|
|
|
86
136
|
/**
|
|
87
137
|
* This will return the processing status of quests for a specific user
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```ts
|
|
141
|
+
* const response = await client.loyalty.rules.getStatus();
|
|
142
|
+
* ```
|
|
88
143
|
*/
|
|
89
144
|
getStatus(
|
|
90
145
|
query?: RuleGetStatusParams,
|
|
@@ -215,6 +270,7 @@ export interface RuleCreateResponse {
|
|
|
215
270
|
| 'steam_wishlist'
|
|
216
271
|
| 'liquidity_uniswap_v2'
|
|
217
272
|
| 'liquidity_uniswap_v3'
|
|
273
|
+
| 'points_airdrop'
|
|
218
274
|
| 'youtube_subscribers'
|
|
219
275
|
| 'youtube_comment';
|
|
220
276
|
|
|
@@ -309,6 +365,7 @@ export interface RuleCreateResponse {
|
|
|
309
365
|
| 'skaleNebula'
|
|
310
366
|
| 'solana'
|
|
311
367
|
| 'sophon'
|
|
368
|
+
| 'sophonTestnet'
|
|
312
369
|
| 'sui'
|
|
313
370
|
| 'superseed'
|
|
314
371
|
| 'superseedSepolia'
|
|
@@ -746,6 +803,7 @@ export namespace RuleCreateResponse {
|
|
|
746
803
|
| 'skaleNebula'
|
|
747
804
|
| 'solana'
|
|
748
805
|
| 'sophon'
|
|
806
|
+
| 'sophonTestnet'
|
|
749
807
|
| 'sui'
|
|
750
808
|
| 'superseed'
|
|
751
809
|
| 'superseedSepolia'
|
|
@@ -870,6 +928,7 @@ export namespace RuleCreateResponse {
|
|
|
870
928
|
| 'skaleNebula'
|
|
871
929
|
| 'solana'
|
|
872
930
|
| 'sophon'
|
|
931
|
+
| 'sophonTestnet'
|
|
873
932
|
| 'sui'
|
|
874
933
|
| 'superseed'
|
|
875
934
|
| 'superseedSepolia'
|
|
@@ -1150,6 +1209,7 @@ export namespace RuleCreateResponse {
|
|
|
1150
1209
|
| 'skaleNebula'
|
|
1151
1210
|
| 'solana'
|
|
1152
1211
|
| 'sophon'
|
|
1212
|
+
| 'sophonTestnet'
|
|
1153
1213
|
| 'sui'
|
|
1154
1214
|
| 'superseed'
|
|
1155
1215
|
| 'superseedSepolia'
|
|
@@ -1280,6 +1340,7 @@ export interface RuleUpdateResponse {
|
|
|
1280
1340
|
| 'skaleNebula'
|
|
1281
1341
|
| 'solana'
|
|
1282
1342
|
| 'sophon'
|
|
1343
|
+
| 'sophonTestnet'
|
|
1283
1344
|
| 'sui'
|
|
1284
1345
|
| 'superseed'
|
|
1285
1346
|
| 'superseedSepolia'
|
|
@@ -1348,6 +1409,7 @@ export namespace RuleUpdateResponse {
|
|
|
1348
1409
|
| 'skaleNebula'
|
|
1349
1410
|
| 'solana'
|
|
1350
1411
|
| 'sophon'
|
|
1412
|
+
| 'sophonTestnet'
|
|
1351
1413
|
| 'sui'
|
|
1352
1414
|
| 'superseed'
|
|
1353
1415
|
| 'superseedSepolia'
|
|
@@ -1769,6 +1831,7 @@ export namespace RuleUpdateResponse {
|
|
|
1769
1831
|
| 'skaleNebula'
|
|
1770
1832
|
| 'solana'
|
|
1771
1833
|
| 'sophon'
|
|
1834
|
+
| 'sophonTestnet'
|
|
1772
1835
|
| 'sui'
|
|
1773
1836
|
| 'superseed'
|
|
1774
1837
|
| 'superseedSepolia'
|
|
@@ -1893,6 +1956,7 @@ export namespace RuleUpdateResponse {
|
|
|
1893
1956
|
| 'skaleNebula'
|
|
1894
1957
|
| 'solana'
|
|
1895
1958
|
| 'sophon'
|
|
1959
|
+
| 'sophonTestnet'
|
|
1896
1960
|
| 'sui'
|
|
1897
1961
|
| 'superseed'
|
|
1898
1962
|
| 'superseedSepolia'
|
|
@@ -2745,6 +2809,7 @@ export namespace RuleListResponse {
|
|
|
2745
2809
|
| 'skaleNebula'
|
|
2746
2810
|
| 'solana'
|
|
2747
2811
|
| 'sophon'
|
|
2812
|
+
| 'sophonTestnet'
|
|
2748
2813
|
| 'sui'
|
|
2749
2814
|
| 'superseed'
|
|
2750
2815
|
| 'superseedSepolia'
|
|
@@ -2869,6 +2934,7 @@ export namespace RuleListResponse {
|
|
|
2869
2934
|
| 'skaleNebula'
|
|
2870
2935
|
| 'solana'
|
|
2871
2936
|
| 'sophon'
|
|
2937
|
+
| 'sophonTestnet'
|
|
2872
2938
|
| 'sui'
|
|
2873
2939
|
| 'superseed'
|
|
2874
2940
|
| 'superseedSepolia'
|
|
@@ -3258,6 +3324,7 @@ export interface RuleCreateParams {
|
|
|
3258
3324
|
| 'steam_wishlist'
|
|
3259
3325
|
| 'liquidity_uniswap_v2'
|
|
3260
3326
|
| 'liquidity_uniswap_v3'
|
|
3327
|
+
| 'points_airdrop'
|
|
3261
3328
|
| 'youtube_subscribers'
|
|
3262
3329
|
| 'youtube_comment';
|
|
3263
3330
|
|
|
@@ -3352,6 +3419,7 @@ export interface RuleCreateParams {
|
|
|
3352
3419
|
| 'skaleNebula'
|
|
3353
3420
|
| 'solana'
|
|
3354
3421
|
| 'sophon'
|
|
3422
|
+
| 'sophonTestnet'
|
|
3355
3423
|
| 'sui'
|
|
3356
3424
|
| 'superseed'
|
|
3357
3425
|
| 'superseedSepolia'
|
|
@@ -3789,6 +3857,7 @@ export namespace RuleCreateParams {
|
|
|
3789
3857
|
| 'skaleNebula'
|
|
3790
3858
|
| 'solana'
|
|
3791
3859
|
| 'sophon'
|
|
3860
|
+
| 'sophonTestnet'
|
|
3792
3861
|
| 'sui'
|
|
3793
3862
|
| 'superseed'
|
|
3794
3863
|
| 'superseedSepolia'
|
|
@@ -3913,6 +3982,7 @@ export namespace RuleCreateParams {
|
|
|
3913
3982
|
| 'skaleNebula'
|
|
3914
3983
|
| 'solana'
|
|
3915
3984
|
| 'sophon'
|
|
3985
|
+
| 'sophonTestnet'
|
|
3916
3986
|
| 'sui'
|
|
3917
3987
|
| 'superseed'
|
|
3918
3988
|
| 'superseedSepolia'
|
|
@@ -4193,6 +4263,7 @@ export namespace RuleCreateParams {
|
|
|
4193
4263
|
| 'skaleNebula'
|
|
4194
4264
|
| 'solana'
|
|
4195
4265
|
| 'sophon'
|
|
4266
|
+
| 'sophonTestnet'
|
|
4196
4267
|
| 'sui'
|
|
4197
4268
|
| 'superseed'
|
|
4198
4269
|
| 'superseedSepolia'
|
|
@@ -4321,6 +4392,7 @@ export interface RuleUpdateParams {
|
|
|
4321
4392
|
| 'skaleNebula'
|
|
4322
4393
|
| 'solana'
|
|
4323
4394
|
| 'sophon'
|
|
4395
|
+
| 'sophonTestnet'
|
|
4324
4396
|
| 'sui'
|
|
4325
4397
|
| 'superseed'
|
|
4326
4398
|
| 'superseedSepolia'
|
|
@@ -4389,6 +4461,7 @@ export namespace RuleUpdateParams {
|
|
|
4389
4461
|
| 'skaleNebula'
|
|
4390
4462
|
| 'solana'
|
|
4391
4463
|
| 'sophon'
|
|
4464
|
+
| 'sophonTestnet'
|
|
4392
4465
|
| 'sui'
|
|
4393
4466
|
| 'superseed'
|
|
4394
4467
|
| 'superseedSepolia'
|
|
@@ -4810,6 +4883,7 @@ export namespace RuleUpdateParams {
|
|
|
4810
4883
|
| 'skaleNebula'
|
|
4811
4884
|
| 'solana'
|
|
4812
4885
|
| 'sophon'
|
|
4886
|
+
| 'sophonTestnet'
|
|
4813
4887
|
| 'sui'
|
|
4814
4888
|
| 'superseed'
|
|
4815
4889
|
| 'superseedSepolia'
|
|
@@ -4934,6 +5008,7 @@ export namespace RuleUpdateParams {
|
|
|
4934
5008
|
| 'skaleNebula'
|
|
4935
5009
|
| 'solana'
|
|
4936
5010
|
| 'sophon'
|
|
5011
|
+
| 'sophonTestnet'
|
|
4937
5012
|
| 'sui'
|
|
4938
5013
|
| 'superseed'
|
|
4939
5014
|
| 'superseedSepolia'
|
|
@@ -7,6 +7,14 @@ import * as Core from '../../../core';
|
|
|
7
7
|
export class RuleStatuses extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Update a loyalty rule status
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const ruleStatus =
|
|
14
|
+
* await client.loyalty.transactions.ruleStatuses.update({
|
|
15
|
+
* loyaltyRuleId: '123e4567-e89b-12d3-a456-426614174030',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
10
18
|
*/
|
|
11
19
|
update(
|
|
12
20
|
body: RuleStatusUpdateParams,
|
|
@@ -17,6 +25,12 @@ export class RuleStatuses extends APIResource {
|
|
|
17
25
|
|
|
18
26
|
/**
|
|
19
27
|
* Retrieve loyalty rule statuses
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const ruleStatuses =
|
|
32
|
+
* await client.loyalty.transactions.ruleStatuses.list();
|
|
33
|
+
* ```
|
|
20
34
|
*/
|
|
21
35
|
list(query?: RuleStatusListParams, options?: Core.RequestOptions): Core.APIPromise<RuleStatusListResponse>;
|
|
22
36
|
list(options?: Core.RequestOptions): Core.APIPromise<RuleStatusListResponse>;
|
|
@@ -17,6 +17,15 @@ export class Transactions extends APIResource {
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a loyalty transaction to update account balances.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const response =
|
|
24
|
+
* await client.loyalty.transactions.createTransaction({
|
|
25
|
+
* description: 'Purchase of item X',
|
|
26
|
+
* entries: [{ amount: 5 }],
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
20
29
|
*/
|
|
21
30
|
createTransaction(
|
|
22
31
|
body: TransactionCreateTransactionParams,
|
|
@@ -28,6 +37,12 @@ export class Transactions extends APIResource {
|
|
|
28
37
|
/**
|
|
29
38
|
* Fetch loyalty transaction entries for wallets or users, representing account
|
|
30
39
|
* balance changes.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const response =
|
|
44
|
+
* await client.loyalty.transactions.getTransactionEntries();
|
|
45
|
+
* ```
|
|
31
46
|
*/
|
|
32
47
|
getTransactionEntries(
|
|
33
48
|
query?: TransactionGetTransactionEntriesParams,
|
|
@@ -48,6 +63,15 @@ export class Transactions extends APIResource {
|
|
|
48
63
|
|
|
49
64
|
/**
|
|
50
65
|
* Retrieve configured loyalty rule chains
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const response =
|
|
70
|
+
* await client.loyalty.transactions.listRuleChains({
|
|
71
|
+
* organizationId: '123e4567-e89b-12d3-a456-426614174001',
|
|
72
|
+
* websiteId: '123e4567-e89b-12d3-a456-426614174002',
|
|
73
|
+
* });
|
|
74
|
+
* ```
|
|
51
75
|
*/
|
|
52
76
|
listRuleChains(
|
|
53
77
|
query: TransactionListRuleChainsParams,
|
|
@@ -386,6 +410,8 @@ export interface TransactionGetTransactionEntriesParams {
|
|
|
386
410
|
*/
|
|
387
411
|
direction?: 'credit' | 'debit';
|
|
388
412
|
|
|
413
|
+
excludeDeletedCurrency?: 'true' | 'false';
|
|
414
|
+
|
|
389
415
|
/**
|
|
390
416
|
* Key to ensure idempotency of the request
|
|
391
417
|
*/
|
|
@@ -463,6 +489,7 @@ export interface TransactionGetTransactionEntriesParams {
|
|
|
463
489
|
| 'steam_wishlist'
|
|
464
490
|
| 'liquidity_uniswap_v2'
|
|
465
491
|
| 'liquidity_uniswap_v3'
|
|
492
|
+
| 'points_airdrop'
|
|
466
493
|
| 'youtube_subscribers'
|
|
467
494
|
| 'youtube_comment'
|
|
468
495
|
| Array<
|
|
@@ -522,6 +549,7 @@ export interface TransactionGetTransactionEntriesParams {
|
|
|
522
549
|
| 'steam_wishlist'
|
|
523
550
|
| 'liquidity_uniswap_v2'
|
|
524
551
|
| 'liquidity_uniswap_v3'
|
|
552
|
+
| 'points_airdrop'
|
|
525
553
|
| 'youtube_subscribers'
|
|
526
554
|
| 'youtube_comment'
|
|
527
555
|
>;
|
package/src/resources/minting.ts
CHANGED
|
@@ -10,6 +10,13 @@ export class Referral extends APIResource {
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* This endpoint allows you to create a referral code
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const response = await client.referral.createCode({
|
|
17
|
+
* loyaltyRuleId: '558bcf56-24f1-4ef4-9787-043086295780',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
13
20
|
*/
|
|
14
21
|
createCode(
|
|
15
22
|
body: ReferralCreateCodeParams,
|
|
@@ -6,6 +6,13 @@ import * as Core from '../../core';
|
|
|
6
6
|
export class Users extends APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* This endpoint allows you to create a referral user
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const user = await client.referral.users.create({
|
|
13
|
+
* userIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
9
16
|
*/
|
|
10
17
|
create(body: UserCreateParams, options?: Core.RequestOptions): Core.APIPromise<UserCreateResponse> {
|
|
11
18
|
return this._client.post('/api/referral/users', { body, ...options });
|
|
@@ -13,6 +20,13 @@ export class Users extends APIResource {
|
|
|
13
20
|
|
|
14
21
|
/**
|
|
15
22
|
* This endpoint allows you to get referrals
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const users = await client.referral.users.list({
|
|
27
|
+
* walletAddress: 'string',
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
16
30
|
*/
|
|
17
31
|
list(query: UserListParams, options?: Core.RequestOptions): Core.APIPromise<UserListResponse> {
|
|
18
32
|
return this._client.get('/api/referral/users', { query, ...options });
|
|
@@ -7,6 +7,11 @@ import * as Core from '../../core';
|
|
|
7
7
|
export class Metadatas extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* This endpoint is used to create user metadata
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const metadata = await client.users.metadatas.create();
|
|
14
|
+
* ```
|
|
10
15
|
*/
|
|
11
16
|
create(body?: MetadataCreateParams, options?: Core.RequestOptions): Core.APIPromise<MetadataCreateResponse>;
|
|
12
17
|
create(options?: Core.RequestOptions): Core.APIPromise<MetadataCreateResponse>;
|
|
@@ -22,6 +27,11 @@ export class Metadatas extends APIResource {
|
|
|
22
27
|
|
|
23
28
|
/**
|
|
24
29
|
* This endpoint is used to get user metadata
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const metadatas = await client.users.metadatas.list();
|
|
34
|
+
* ```
|
|
25
35
|
*/
|
|
26
36
|
list(query?: MetadataListParams, options?: Core.RequestOptions): Core.APIPromise<MetadataListResponse>;
|
|
27
37
|
list(options?: Core.RequestOptions): Core.APIPromise<MetadataListResponse>;
|