@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
|
@@ -0,0 +1,699 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../resource';
|
|
4
|
+
import { isRequestOptions } from '../../../core';
|
|
5
|
+
import * as Core from '../../../core';
|
|
6
|
+
import * as RuleStatusesAPI from './rule-statuses';
|
|
7
|
+
import {
|
|
8
|
+
RuleStatusListParams,
|
|
9
|
+
RuleStatusListResponse,
|
|
10
|
+
RuleStatusUpdateParams,
|
|
11
|
+
RuleStatusUpdateResponse,
|
|
12
|
+
RuleStatuses,
|
|
13
|
+
} from './rule-statuses';
|
|
14
|
+
|
|
15
|
+
export class Transactions extends APIResource {
|
|
16
|
+
ruleStatuses: RuleStatusesAPI.RuleStatuses = new RuleStatusesAPI.RuleStatuses(this._client);
|
|
17
|
+
|
|
18
|
+
/**
|
|
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
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
createTransaction(
|
|
31
|
+
body: TransactionCreateTransactionParams,
|
|
32
|
+
options?: Core.RequestOptions,
|
|
33
|
+
): Core.APIPromise<TransactionCreateTransactionResponse> {
|
|
34
|
+
return this._client.post('/api/loyalty/transactions', { body, ...options });
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Fetch loyalty transaction entries for wallets or users, representing account
|
|
39
|
+
* balance changes.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const response =
|
|
44
|
+
* await client.loyalty.transactions.getTransactionEntries();
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
getTransactionEntries(
|
|
48
|
+
query?: TransactionGetTransactionEntriesParams,
|
|
49
|
+
options?: Core.RequestOptions,
|
|
50
|
+
): Core.APIPromise<TransactionGetTransactionEntriesResponse>;
|
|
51
|
+
getTransactionEntries(
|
|
52
|
+
options?: Core.RequestOptions,
|
|
53
|
+
): Core.APIPromise<TransactionGetTransactionEntriesResponse>;
|
|
54
|
+
getTransactionEntries(
|
|
55
|
+
query: TransactionGetTransactionEntriesParams | Core.RequestOptions = {},
|
|
56
|
+
options?: Core.RequestOptions,
|
|
57
|
+
): Core.APIPromise<TransactionGetTransactionEntriesResponse> {
|
|
58
|
+
if (isRequestOptions(query)) {
|
|
59
|
+
return this.getTransactionEntries({}, query);
|
|
60
|
+
}
|
|
61
|
+
return this._client.get('/api/loyalty/transaction_entries', { query, ...options });
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
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
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
listRuleChains(
|
|
77
|
+
query: TransactionListRuleChainsParams,
|
|
78
|
+
options?: Core.RequestOptions,
|
|
79
|
+
): Core.APIPromise<TransactionListRuleChainsResponse> {
|
|
80
|
+
return this._client.get('/api/loyalty/rule_chains', { query, ...options });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface TransactionCreateTransactionResponse {
|
|
85
|
+
id: string;
|
|
86
|
+
|
|
87
|
+
createdAt: string;
|
|
88
|
+
|
|
89
|
+
description: string;
|
|
90
|
+
|
|
91
|
+
entries: Array<TransactionCreateTransactionResponse.Entry>;
|
|
92
|
+
|
|
93
|
+
updatedAt: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export namespace TransactionCreateTransactionResponse {
|
|
97
|
+
export interface Entry {
|
|
98
|
+
amount: number;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Direction of the transaction entry
|
|
102
|
+
*/
|
|
103
|
+
direction: 'credit' | 'debit';
|
|
104
|
+
|
|
105
|
+
walletAddress: string;
|
|
106
|
+
|
|
107
|
+
idempotencyKey?: string;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface TransactionGetTransactionEntriesResponse {
|
|
112
|
+
data: Array<TransactionGetTransactionEntriesResponse.Data>;
|
|
113
|
+
|
|
114
|
+
hasNextPage: boolean;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export namespace TransactionGetTransactionEntriesResponse {
|
|
118
|
+
/**
|
|
119
|
+
* Schema for a loyalty transaction entry
|
|
120
|
+
*/
|
|
121
|
+
export interface Data {
|
|
122
|
+
/**
|
|
123
|
+
* Unique identifier for the transaction entry
|
|
124
|
+
*/
|
|
125
|
+
id: string;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Amount involved in the transaction
|
|
129
|
+
*/
|
|
130
|
+
amount: number;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Timestamp when the transaction entry was created
|
|
134
|
+
*/
|
|
135
|
+
createdAt: string;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Direction of the transaction entry
|
|
139
|
+
*/
|
|
140
|
+
direction: 'credit' | 'debit';
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Unique identifier for the loyalty account
|
|
144
|
+
*/
|
|
145
|
+
loyaltyAccountId: string;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Details of the loyalty transaction
|
|
149
|
+
*/
|
|
150
|
+
loyaltyTransaction: Data.LoyaltyTransaction;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Unique identifier for the organization
|
|
154
|
+
*/
|
|
155
|
+
organizationId: string;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Type of the loyalty transaction
|
|
159
|
+
*/
|
|
160
|
+
type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order' | null;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Timestamp when the transaction entry was last updated
|
|
164
|
+
*/
|
|
165
|
+
updatedAt: string;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Unique identifier for the website
|
|
169
|
+
*/
|
|
170
|
+
websiteId: string;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Optional metadata for the transaction entry
|
|
174
|
+
*/
|
|
175
|
+
metadata?: { [key: string]: unknown };
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export namespace Data {
|
|
179
|
+
/**
|
|
180
|
+
* Details of the loyalty transaction
|
|
181
|
+
*/
|
|
182
|
+
export interface LoyaltyTransaction {
|
|
183
|
+
/**
|
|
184
|
+
* Unique identifier for the loyalty transaction
|
|
185
|
+
*/
|
|
186
|
+
id: string;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Type of the loyalty transaction
|
|
190
|
+
*/
|
|
191
|
+
type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order' | null;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Details of the loyalty rule associated with the transaction
|
|
195
|
+
*/
|
|
196
|
+
loyaltyRule?: LoyaltyTransaction.LoyaltyRule;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export namespace LoyaltyTransaction {
|
|
200
|
+
/**
|
|
201
|
+
* Details of the loyalty rule associated with the transaction
|
|
202
|
+
*/
|
|
203
|
+
export interface LoyaltyRule {
|
|
204
|
+
/**
|
|
205
|
+
* Unique identifier for the loyalty rule
|
|
206
|
+
*/
|
|
207
|
+
id: string;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Type of the loyalty rule
|
|
211
|
+
*/
|
|
212
|
+
type: string;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Description of the loyalty rule
|
|
216
|
+
*/
|
|
217
|
+
description?: string;
|
|
218
|
+
|
|
219
|
+
loyaltyRuleGroupItem?: LoyaltyRule.LoyaltyRuleGroupItem;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Optional metadata for the loyalty rule
|
|
223
|
+
*/
|
|
224
|
+
metadata?: { [key: string]: unknown };
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Name of the loyalty rule
|
|
228
|
+
*/
|
|
229
|
+
name?: string;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export namespace LoyaltyRule {
|
|
233
|
+
export interface LoyaltyRuleGroupItem {
|
|
234
|
+
loyaltyRuleGroupId: string;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export interface TransactionListRuleChainsResponse {
|
|
242
|
+
data: Array<TransactionListRuleChainsResponse.Data>;
|
|
243
|
+
|
|
244
|
+
hasNextPage: boolean;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export namespace TransactionListRuleChainsResponse {
|
|
248
|
+
export interface Data {
|
|
249
|
+
/**
|
|
250
|
+
* Unique identifier for the rule chain
|
|
251
|
+
*/
|
|
252
|
+
id: string;
|
|
253
|
+
|
|
254
|
+
loyaltyConditions: Array<Data.LoyaltyCondition>;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Unique identifier for the loyalty rule
|
|
258
|
+
*/
|
|
259
|
+
loyaltyRuleId: string;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Name of the rule chain
|
|
263
|
+
*/
|
|
264
|
+
name: string;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export namespace Data {
|
|
268
|
+
export interface LoyaltyCondition {
|
|
269
|
+
/**
|
|
270
|
+
* Unique identifier for the condition
|
|
271
|
+
*/
|
|
272
|
+
id: string;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Amount of the condition
|
|
276
|
+
*/
|
|
277
|
+
amount: number | null;
|
|
278
|
+
|
|
279
|
+
association: Array<LoyaltyCondition.Association>;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* URL of the CSV file
|
|
283
|
+
*/
|
|
284
|
+
csvUrl: string | null;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Description of the condition
|
|
288
|
+
*/
|
|
289
|
+
description: string | null;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Number of times the condition must be met
|
|
293
|
+
*/
|
|
294
|
+
repeatCount: number | null;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Number of times the condition must be met
|
|
298
|
+
*/
|
|
299
|
+
requiredCount: number | null;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Type of the condition
|
|
303
|
+
*/
|
|
304
|
+
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export namespace LoyaltyCondition {
|
|
308
|
+
export interface Association {
|
|
309
|
+
/**
|
|
310
|
+
* Unique identifier for the association
|
|
311
|
+
*/
|
|
312
|
+
id: string;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Unique identifier for the loyalty badge
|
|
316
|
+
*/
|
|
317
|
+
loyaltyBadgeId: string | null;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Unique identifier for the loyalty currency
|
|
321
|
+
*/
|
|
322
|
+
loyaltyCurrencyId: string | null;
|
|
323
|
+
|
|
324
|
+
loyaltyRule: Association.LoyaltyRule | null;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Unique identifier for the loyalty rule group
|
|
328
|
+
*/
|
|
329
|
+
loyaltyRuleGroupId: string | null;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Unique identifier for the loyalty rule
|
|
333
|
+
*/
|
|
334
|
+
loyaltyRuleId: string | null;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export namespace Association {
|
|
338
|
+
export interface LoyaltyRule {
|
|
339
|
+
/**
|
|
340
|
+
* Name of the loyalty rule
|
|
341
|
+
*/
|
|
342
|
+
name: string;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export interface TransactionCreateTransactionParams {
|
|
350
|
+
/**
|
|
351
|
+
* Description of the loyalty transaction
|
|
352
|
+
*/
|
|
353
|
+
description: string;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Array of transaction entries
|
|
357
|
+
*/
|
|
358
|
+
entries: Array<TransactionCreateTransactionParams.Entry>;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Unique identifier for the loyalty currency
|
|
362
|
+
*/
|
|
363
|
+
loyaltyCurrencyId?: string;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export namespace TransactionCreateTransactionParams {
|
|
367
|
+
export interface Entry {
|
|
368
|
+
/**
|
|
369
|
+
* Transaction entry amount.
|
|
370
|
+
*/
|
|
371
|
+
amount: number;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Direction of the transaction entry for this wallet address
|
|
375
|
+
*/
|
|
376
|
+
direction?: 'credit' | 'debit';
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Idempotency key for the transaction entry. Creation will fail if already exists
|
|
380
|
+
* for this wallet address.
|
|
381
|
+
*/
|
|
382
|
+
idempotencyKey?: string;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Unique identifier for the loyalty currency for the wallet. Can only use
|
|
386
|
+
* entry-level currency or transaction-level currency.
|
|
387
|
+
*/
|
|
388
|
+
loyaltyCurrencyId?: string;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* The wallet address of the user
|
|
392
|
+
*/
|
|
393
|
+
walletAddress?: string;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
export interface TransactionGetTransactionEntriesParams {
|
|
398
|
+
/**
|
|
399
|
+
* End date to filter by (exclusive, less than)
|
|
400
|
+
*/
|
|
401
|
+
createdAtEnd?: string;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Start date to filter by (inclusive, greater than or equal to)
|
|
405
|
+
*/
|
|
406
|
+
createdAtStart?: string;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Key to ensure idempotency of the request
|
|
410
|
+
*/
|
|
411
|
+
idempotencyKey?: string;
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Maximum number of records to return (max 100)
|
|
415
|
+
*/
|
|
416
|
+
limit?: number;
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* UUID of the loyalty currency IDs to filter by. Use this to exclude deleted
|
|
420
|
+
* currencies
|
|
421
|
+
*/
|
|
422
|
+
loyaltyCurrencyId?: string | Array<string>;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* UUID of the rule group (converted to lowercase)
|
|
426
|
+
*/
|
|
427
|
+
loyaltyRuleGroupId?: string;
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Unique identifier for the loyalty rule to filter by
|
|
431
|
+
*/
|
|
432
|
+
loyaltyRuleId?: string;
|
|
433
|
+
|
|
434
|
+
loyaltyRuleType?:
|
|
435
|
+
| 'Bonus'
|
|
436
|
+
| 'BoughtOn'
|
|
437
|
+
| 'BoughtWithRoyalties'
|
|
438
|
+
| 'DiscordMessages'
|
|
439
|
+
| 'Listing'
|
|
440
|
+
| 'Lodging'
|
|
441
|
+
| 'MintOn'
|
|
442
|
+
| 'PoapClaim'
|
|
443
|
+
| 'SnagSocialsConnected'
|
|
444
|
+
| 'SnapshotFullset'
|
|
445
|
+
| 'SnapshotHold'
|
|
446
|
+
| 'SoldOn'
|
|
447
|
+
| 'SoldWithRoyalties'
|
|
448
|
+
| 'TokenHold'
|
|
449
|
+
| 'TwitterBio'
|
|
450
|
+
| 'TwitterHashTagPost'
|
|
451
|
+
| 'Retweet'
|
|
452
|
+
| 'check_in'
|
|
453
|
+
| 'code_entry'
|
|
454
|
+
| 'connect_wallet'
|
|
455
|
+
| 'connected_discord'
|
|
456
|
+
| 'connected_email'
|
|
457
|
+
| 'connected_epic'
|
|
458
|
+
| 'connected_github'
|
|
459
|
+
| 'connected_steam'
|
|
460
|
+
| 'connected_telegram'
|
|
461
|
+
| 'connected_twitter'
|
|
462
|
+
| 'create_partner_account'
|
|
463
|
+
| 'discord_member'
|
|
464
|
+
| 'drip_x_follow'
|
|
465
|
+
| 'drip_x_new_tweet'
|
|
466
|
+
| 'drip_x_text_in_bio'
|
|
467
|
+
| 'drip_x_text_in_comment'
|
|
468
|
+
| 'drip_x_text_in_name'
|
|
469
|
+
| 'drip_x_tweet'
|
|
470
|
+
| 'external_rule'
|
|
471
|
+
| 'link_click'
|
|
472
|
+
| 'manual_upload'
|
|
473
|
+
| 'profile_completed'
|
|
474
|
+
| 'referred_user'
|
|
475
|
+
| 'smart_contract_event'
|
|
476
|
+
| 'snapshot_governance'
|
|
477
|
+
| 'telegram_join'
|
|
478
|
+
| 'telegram_messages'
|
|
479
|
+
| 'text_input'
|
|
480
|
+
| 'token_hold_erc20'
|
|
481
|
+
| 'tweet_liked_by_project'
|
|
482
|
+
| 'twitter_comment'
|
|
483
|
+
| 'twitter_follow'
|
|
484
|
+
| 'twitter_followers'
|
|
485
|
+
| 'twitter_like'
|
|
486
|
+
| 'twitter_post_hashtag'
|
|
487
|
+
| 'quiz'
|
|
488
|
+
| 'poll'
|
|
489
|
+
| 'steam_wishlist'
|
|
490
|
+
| 'liquidity_uniswap_v2'
|
|
491
|
+
| 'liquidity_uniswap_v3'
|
|
492
|
+
| 'points_airdrop'
|
|
493
|
+
| 'youtube_subscribers'
|
|
494
|
+
| 'youtube_comment'
|
|
495
|
+
| 'shopify_spend'
|
|
496
|
+
| 'swap'
|
|
497
|
+
| 'tiktok_post'
|
|
498
|
+
| 'post_impressions'
|
|
499
|
+
| 'discord_join'
|
|
500
|
+
| 'connected_youtube'
|
|
501
|
+
| 'stratus_function'
|
|
502
|
+
| 'connected_tiktok'
|
|
503
|
+
| 'tiktok_follow'
|
|
504
|
+
| 'github_repo_star'
|
|
505
|
+
| 'github_repo_fork'
|
|
506
|
+
| 'github_repo_collaborator'
|
|
507
|
+
| 'github_merge_PR'
|
|
508
|
+
| 'discord_role_grant'
|
|
509
|
+
| 'connected_reddit'
|
|
510
|
+
| 'reddit_comment'
|
|
511
|
+
| Array<
|
|
512
|
+
| 'Bonus'
|
|
513
|
+
| 'BoughtOn'
|
|
514
|
+
| 'BoughtWithRoyalties'
|
|
515
|
+
| 'DiscordMessages'
|
|
516
|
+
| 'Listing'
|
|
517
|
+
| 'Lodging'
|
|
518
|
+
| 'MintOn'
|
|
519
|
+
| 'PoapClaim'
|
|
520
|
+
| 'SnagSocialsConnected'
|
|
521
|
+
| 'SnapshotFullset'
|
|
522
|
+
| 'SnapshotHold'
|
|
523
|
+
| 'SoldOn'
|
|
524
|
+
| 'SoldWithRoyalties'
|
|
525
|
+
| 'TokenHold'
|
|
526
|
+
| 'TwitterBio'
|
|
527
|
+
| 'TwitterHashTagPost'
|
|
528
|
+
| 'Retweet'
|
|
529
|
+
| 'check_in'
|
|
530
|
+
| 'code_entry'
|
|
531
|
+
| 'connect_wallet'
|
|
532
|
+
| 'connected_discord'
|
|
533
|
+
| 'connected_email'
|
|
534
|
+
| 'connected_epic'
|
|
535
|
+
| 'connected_github'
|
|
536
|
+
| 'connected_steam'
|
|
537
|
+
| 'connected_telegram'
|
|
538
|
+
| 'connected_twitter'
|
|
539
|
+
| 'create_partner_account'
|
|
540
|
+
| 'discord_member'
|
|
541
|
+
| 'drip_x_follow'
|
|
542
|
+
| 'drip_x_new_tweet'
|
|
543
|
+
| 'drip_x_text_in_bio'
|
|
544
|
+
| 'drip_x_text_in_comment'
|
|
545
|
+
| 'drip_x_text_in_name'
|
|
546
|
+
| 'drip_x_tweet'
|
|
547
|
+
| 'external_rule'
|
|
548
|
+
| 'link_click'
|
|
549
|
+
| 'manual_upload'
|
|
550
|
+
| 'profile_completed'
|
|
551
|
+
| 'referred_user'
|
|
552
|
+
| 'smart_contract_event'
|
|
553
|
+
| 'snapshot_governance'
|
|
554
|
+
| 'telegram_join'
|
|
555
|
+
| 'telegram_messages'
|
|
556
|
+
| 'text_input'
|
|
557
|
+
| 'token_hold_erc20'
|
|
558
|
+
| 'tweet_liked_by_project'
|
|
559
|
+
| 'twitter_comment'
|
|
560
|
+
| 'twitter_follow'
|
|
561
|
+
| 'twitter_followers'
|
|
562
|
+
| 'twitter_like'
|
|
563
|
+
| 'twitter_post_hashtag'
|
|
564
|
+
| 'quiz'
|
|
565
|
+
| 'poll'
|
|
566
|
+
| 'steam_wishlist'
|
|
567
|
+
| 'liquidity_uniswap_v2'
|
|
568
|
+
| 'liquidity_uniswap_v3'
|
|
569
|
+
| 'points_airdrop'
|
|
570
|
+
| 'youtube_subscribers'
|
|
571
|
+
| 'youtube_comment'
|
|
572
|
+
| 'shopify_spend'
|
|
573
|
+
| 'swap'
|
|
574
|
+
| 'tiktok_post'
|
|
575
|
+
| 'post_impressions'
|
|
576
|
+
| 'discord_join'
|
|
577
|
+
| 'connected_youtube'
|
|
578
|
+
| 'stratus_function'
|
|
579
|
+
| 'connected_tiktok'
|
|
580
|
+
| 'tiktok_follow'
|
|
581
|
+
| 'github_repo_star'
|
|
582
|
+
| 'github_repo_fork'
|
|
583
|
+
| 'github_repo_collaborator'
|
|
584
|
+
| 'github_merge_PR'
|
|
585
|
+
| 'discord_role_grant'
|
|
586
|
+
| 'connected_reddit'
|
|
587
|
+
| 'reddit_comment'
|
|
588
|
+
>;
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* Unique identifier for the loyalty transaction to filter by
|
|
592
|
+
*/
|
|
593
|
+
loyaltyTransactionId?: string;
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Unique identifier for the organization to filter by
|
|
597
|
+
*/
|
|
598
|
+
organizationId?: string;
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* Field to sort the results by
|
|
602
|
+
*/
|
|
603
|
+
sortBy?: 'createdAt' | 'updatedAt' | 'loyaltyAccountLockVersion';
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Direction to sort the results by
|
|
607
|
+
*/
|
|
608
|
+
sortDir?: 'asc' | 'desc';
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* Pagination cursor to start after a specific resource ID
|
|
612
|
+
*/
|
|
613
|
+
startingAfter?: string;
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* Type of the loyalty transaction to filter by
|
|
617
|
+
*/
|
|
618
|
+
type?: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* When passed in return the list of fulfilled entries for loyalty rules. If a
|
|
622
|
+
* loyalty rule has a fulfilled entry this means the user cannot currently complete
|
|
623
|
+
* the rule. Must be passed in with userId or walletAddress.
|
|
624
|
+
*/
|
|
625
|
+
userCompletedLoyaltyRuleId?: string | Array<string>;
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* External identifier for the user group controlled by you.
|
|
629
|
+
*/
|
|
630
|
+
userGroupExternalIdentifier?: string;
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* Unique identifier for the user group
|
|
634
|
+
*/
|
|
635
|
+
userGroupId?: string;
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* User ID or array of User IDs to filter by
|
|
639
|
+
*/
|
|
640
|
+
userId?: string | Array<string>;
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* Wallet address or array of wallet addresses to filter by
|
|
644
|
+
*/
|
|
645
|
+
walletAddress?: string | Array<string>;
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* Identifier for the wallet group to filter by
|
|
649
|
+
*/
|
|
650
|
+
walletGroupIdentifier?: string;
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* Unique identifier for the website to filter by
|
|
654
|
+
*/
|
|
655
|
+
websiteId?: string;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
export interface TransactionListRuleChainsParams {
|
|
659
|
+
/**
|
|
660
|
+
* Unique identifier for the organization
|
|
661
|
+
*/
|
|
662
|
+
organizationId: string;
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* Unique identifier for the website
|
|
666
|
+
*/
|
|
667
|
+
websiteId: string;
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* Number of rule chains to return
|
|
671
|
+
*/
|
|
672
|
+
limit?: number;
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Starting after the given rule chain ID
|
|
676
|
+
*/
|
|
677
|
+
startingAfter?: string;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
Transactions.RuleStatuses = RuleStatuses;
|
|
681
|
+
|
|
682
|
+
export declare namespace Transactions {
|
|
683
|
+
export {
|
|
684
|
+
type TransactionCreateTransactionResponse as TransactionCreateTransactionResponse,
|
|
685
|
+
type TransactionGetTransactionEntriesResponse as TransactionGetTransactionEntriesResponse,
|
|
686
|
+
type TransactionListRuleChainsResponse as TransactionListRuleChainsResponse,
|
|
687
|
+
type TransactionCreateTransactionParams as TransactionCreateTransactionParams,
|
|
688
|
+
type TransactionGetTransactionEntriesParams as TransactionGetTransactionEntriesParams,
|
|
689
|
+
type TransactionListRuleChainsParams as TransactionListRuleChainsParams,
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
export {
|
|
693
|
+
RuleStatuses as RuleStatuses,
|
|
694
|
+
type RuleStatusUpdateResponse as RuleStatusUpdateResponse,
|
|
695
|
+
type RuleStatusListResponse as RuleStatusListResponse,
|
|
696
|
+
type RuleStatusUpdateParams as RuleStatusUpdateParams,
|
|
697
|
+
type RuleStatusListParams as RuleStatusListParams,
|
|
698
|
+
};
|
|
699
|
+
}
|