@snagsolutions/sdk 0.1.0-alpha.13 → 0.1.0-alpha.14
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 +40 -0
- package/README.md +1 -1
- package/core.d.ts.map +1 -1
- package/core.js +12 -6
- package/core.js.map +1 -1
- package/core.mjs +12 -6
- package/core.mjs.map +1 -1
- package/index.d.mts +9 -9
- package/index.d.ts +9 -9
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -1
- package/index.mjs.map +1 -1
- package/package.json +29 -8
- package/resources/assets/assets.d.ts +153 -0
- package/resources/assets/assets.d.ts.map +1 -0
- package/resources/assets/assets.js +69 -0
- package/resources/assets/assets.js.map +1 -0
- package/resources/assets/assets.mjs +42 -0
- package/resources/assets/assets.mjs.map +1 -0
- package/resources/assets/index.d.ts +7 -0
- package/resources/assets/index.d.ts.map +1 -0
- package/resources/assets/index.js +17 -0
- package/resources/assets/index.js.map +1 -0
- package/resources/assets/index.mjs +8 -0
- package/resources/assets/index.mjs.map +1 -0
- package/resources/assets/minting.d.ts +95 -0
- package/resources/assets/minting.d.ts.map +1 -0
- package/resources/assets/minting.js +15 -0
- package/resources/assets/minting.js.map +1 -0
- package/resources/assets/minting.mjs +11 -0
- package/resources/assets/minting.mjs.map +1 -0
- package/resources/assets/referral/index.d.ts +3 -0
- package/resources/assets/referral/index.d.ts.map +1 -0
- package/resources/assets/referral/index.js +9 -0
- package/resources/assets/referral/index.js.map +1 -0
- package/resources/assets/referral/index.mjs +4 -0
- package/resources/assets/referral/index.mjs.map +1 -0
- package/resources/assets/referral/referral.d.ts +30 -0
- package/resources/assets/referral/referral.d.ts.map +1 -0
- package/resources/assets/referral/referral.js +46 -0
- package/resources/assets/referral/referral.js.map +1 -0
- package/resources/assets/referral/referral.mjs +19 -0
- package/resources/assets/referral/referral.mjs.map +1 -0
- package/resources/assets/referral/users.d.ts +57 -0
- package/resources/assets/referral/users.d.ts.map +1 -0
- package/resources/assets/referral/users.js +21 -0
- package/resources/assets/referral/users.js.map +1 -0
- package/resources/assets/referral/users.mjs +17 -0
- package/resources/assets/referral/users.mjs.map +1 -0
- package/resources/assets/users.d.ts +285 -0
- package/resources/assets/users.d.ts.map +1 -0
- package/resources/assets/users.js +34 -0
- package/resources/assets/users.js.map +1 -0
- package/resources/assets/users.mjs +30 -0
- package/resources/assets/users.mjs.map +1 -0
- package/resources/assets/website-collections.d.ts +73 -0
- package/resources/assets/website-collections.d.ts.map +1 -0
- package/resources/assets/website-collections.js +25 -0
- package/resources/assets/website-collections.js.map +1 -0
- package/resources/assets/website-collections.mjs +21 -0
- package/resources/assets/website-collections.mjs.map +1 -0
- package/resources/assets/website-user-roles.d.ts +73 -0
- package/resources/assets/website-user-roles.d.ts.map +1 -0
- package/resources/assets/website-user-roles.js +22 -0
- package/resources/assets/website-user-roles.js.map +1 -0
- package/resources/assets/website-user-roles.mjs +18 -0
- package/resources/assets/website-user-roles.mjs.map +1 -0
- package/resources/auction-bids.d.ts +2 -32
- package/resources/auction-bids.d.ts.map +1 -1
- package/resources/auction-bids.js +0 -10
- package/resources/auction-bids.js.map +1 -1
- package/resources/auction-bids.mjs +0 -10
- package/resources/auction-bids.mjs.map +1 -1
- package/resources/drip/drip.d.ts +4 -4
- package/resources/drip/drip.d.ts.map +1 -1
- package/resources/drip/drip.js.map +1 -1
- package/resources/drip/drip.mjs.map +1 -1
- package/resources/drip/index.d.ts +2 -2
- package/resources/drip/index.d.ts.map +1 -1
- package/resources/drip/index.js.map +1 -1
- package/resources/drip/index.mjs.map +1 -1
- package/resources/drip/quests.d.ts +0 -164
- package/resources/drip/quests.d.ts.map +1 -1
- package/resources/drip/quests.js +0 -8
- package/resources/drip/quests.js.map +1 -1
- package/resources/drip/quests.mjs +0 -8
- package/resources/drip/quests.mjs.map +1 -1
- package/resources/drip/status.d.ts +0 -22
- package/resources/drip/status.d.ts.map +1 -1
- package/resources/drip/status.js +0 -7
- package/resources/drip/status.js.map +1 -1
- package/resources/drip/status.mjs +0 -7
- package/resources/drip/status.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/accounts.d.ts +0 -153
- package/resources/loyalty/accounts.d.ts.map +1 -1
- package/resources/loyalty/accounts.js +0 -7
- package/resources/loyalty/accounts.js.map +1 -1
- package/resources/loyalty/accounts.mjs +0 -7
- package/resources/loyalty/accounts.mjs.map +1 -1
- package/resources/loyalty/badges.d.ts +639 -72
- package/resources/loyalty/badges.d.ts.map +1 -1
- package/resources/loyalty/currencies.d.ts +1 -7
- package/resources/loyalty/currencies.d.ts.map +1 -1
- package/resources/loyalty/index.d.ts +3 -3
- package/resources/loyalty/index.d.ts.map +1 -1
- package/resources/loyalty/index.js +2 -2
- package/resources/loyalty/index.js.map +1 -1
- package/resources/loyalty/index.mjs +1 -1
- package/resources/loyalty/index.mjs.map +1 -1
- package/resources/loyalty/loyalty.d.ts +7 -7
- package/resources/loyalty/loyalty.d.ts.map +1 -1
- package/resources/loyalty/loyalty.js +2 -2
- package/resources/loyalty/loyalty.js.map +1 -1
- package/resources/loyalty/loyalty.mjs +2 -2
- package/resources/loyalty/loyalty.mjs.map +1 -1
- package/resources/loyalty/multipliers.d.ts +29 -4
- package/resources/loyalty/multipliers.d.ts.map +1 -1
- package/resources/loyalty/multipliers.js +3 -3
- package/resources/loyalty/multipliers.js.map +1 -1
- package/resources/loyalty/multipliers.mjs +3 -3
- package/resources/loyalty/multipliers.mjs.map +1 -1
- package/resources/loyalty/rule-edits.d.ts +1 -1
- package/resources/loyalty/rule-edits.d.ts.map +1 -1
- package/resources/loyalty/rule-edits.js +1 -1
- package/resources/loyalty/rule-edits.js.map +1 -1
- package/resources/loyalty/rule-edits.mjs +1 -1
- package/resources/loyalty/rule-edits.mjs.map +1 -1
- package/resources/loyalty/rules.d.ts +132 -71
- package/resources/loyalty/rules.d.ts.map +1 -1
- package/resources/loyalty/transaction-entries/accounts.d.ts +191 -0
- package/resources/loyalty/transaction-entries/accounts.d.ts.map +1 -0
- package/resources/loyalty/transaction-entries/accounts.js +24 -0
- package/resources/loyalty/transaction-entries/accounts.js.map +1 -0
- package/resources/loyalty/transaction-entries/accounts.mjs +20 -0
- package/resources/loyalty/transaction-entries/accounts.mjs.map +1 -0
- package/resources/loyalty/transaction-entries/index.d.ts +5 -0
- package/resources/loyalty/transaction-entries/index.d.ts.map +1 -0
- package/resources/loyalty/transaction-entries/index.js +13 -0
- package/resources/loyalty/transaction-entries/index.js.map +1 -0
- package/resources/loyalty/transaction-entries/index.mjs +6 -0
- package/resources/loyalty/transaction-entries/index.mjs.map +1 -0
- package/resources/loyalty/transaction-entries/questions-responses.d.ts +97 -0
- package/resources/loyalty/transaction-entries/questions-responses.d.ts.map +1 -0
- package/resources/loyalty/transaction-entries/questions-responses.js +22 -0
- package/resources/loyalty/transaction-entries/questions-responses.js.map +1 -0
- package/resources/loyalty/transaction-entries/questions-responses.mjs +18 -0
- package/resources/loyalty/transaction-entries/questions-responses.mjs.map +1 -0
- package/resources/loyalty/transaction-entries/questions.d.ts +150 -0
- package/resources/loyalty/transaction-entries/questions.d.ts.map +1 -0
- package/resources/loyalty/transaction-entries/questions.js +27 -0
- package/resources/loyalty/transaction-entries/questions.js.map +1 -0
- package/resources/loyalty/transaction-entries/questions.mjs +23 -0
- package/resources/loyalty/transaction-entries/questions.mjs.map +1 -0
- package/resources/loyalty/transaction-entries/transaction-entries.d.ts +300 -0
- package/resources/loyalty/transaction-entries/transaction-entries.d.ts.map +1 -0
- package/resources/loyalty/transaction-entries/transaction-entries.js +66 -0
- package/resources/loyalty/transaction-entries/transaction-entries.js.map +1 -0
- package/resources/loyalty/transaction-entries/transaction-entries.mjs +39 -0
- package/resources/loyalty/transaction-entries/transaction-entries.mjs.map +1 -0
- package/resources/users/index.d.ts +2 -2
- package/resources/users/index.d.ts.map +1 -1
- package/resources/users/index.js.map +1 -1
- package/resources/users/index.mjs +2 -2
- package/resources/users/index.mjs.map +1 -1
- package/resources/users/metadatas.d.ts +79 -11
- package/resources/users/metadatas.d.ts.map +1 -1
- package/resources/users/metadatas.js +6 -0
- package/resources/users/metadatas.js.map +1 -1
- package/resources/users/metadatas.mjs +6 -0
- package/resources/users/metadatas.mjs.map +1 -1
- package/resources/users/users.d.ts +4 -4
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.js.map +1 -1
- package/resources/users/users.mjs +2 -2
- package/resources/users/users.mjs.map +1 -1
- package/resources/users/wallets.d.ts +0 -189
- package/resources/users/wallets.d.ts.map +1 -1
- package/resources/users/wallets.js +0 -19
- package/resources/users/wallets.js.map +1 -1
- package/resources/users/wallets.mjs +0 -19
- package/resources/users/wallets.mjs.map +1 -1
- package/src/core.ts +14 -6
- package/src/index.ts +14 -12
- package/src/resources/assets/assets.ts +294 -0
- package/src/resources/assets/index.ts +38 -0
- package/src/resources/assets/minting.ts +153 -0
- package/src/resources/assets/referral/index.ts +14 -0
- package/src/resources/assets/referral/referral.ts +74 -0
- package/src/resources/assets/referral/users.ts +99 -0
- package/src/resources/assets/users.ts +415 -0
- package/src/resources/assets/website-collections.ts +147 -0
- package/src/resources/assets/website-user-roles.ts +107 -0
- package/src/resources/auction-bids.ts +2 -48
- package/src/resources/drip/drip.ts +4 -8
- package/src/resources/drip/index.ts +2 -2
- package/src/resources/drip/quests.ts +1 -206
- package/src/resources/drip/status.ts +1 -29
- package/src/resources/index.ts +7 -2
- package/src/resources/loyalty/accounts.ts +1 -195
- package/src/resources/loyalty/badges.ts +779 -77
- package/src/resources/loyalty/currencies.ts +1 -7
- package/src/resources/loyalty/index.ts +7 -2
- package/src/resources/loyalty/loyalty.ts +14 -8
- package/src/resources/loyalty/multipliers.ts +49 -4
- package/src/resources/loyalty/rule-edits.ts +2 -2
- package/src/resources/loyalty/rules.ts +247 -159
- package/src/resources/loyalty/transaction-entries/accounts.ts +251 -0
- package/src/resources/loyalty/transaction-entries/index.ts +34 -0
- package/src/resources/loyalty/transaction-entries/questions-responses.ts +146 -0
- package/src/resources/loyalty/transaction-entries/questions.ts +208 -0
- package/src/resources/loyalty/transaction-entries/transaction-entries.ts +525 -0
- package/src/resources/users/index.ts +8 -9
- package/src/resources/users/metadatas.ts +109 -10
- package/src/resources/users/users.ts +11 -17
- package/src/resources/users/wallets.ts +1 -267
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/assets.d.ts +0 -50
- package/resources/assets.d.ts.map +0 -1
- package/resources/assets.js +0 -17
- package/resources/assets.js.map +0 -1
- package/resources/assets.mjs +0 -13
- package/resources/assets.mjs.map +0 -1
- package/resources/loyalty/transaction-entries.d.ts +0 -175
- package/resources/loyalty/transaction-entries.d.ts.map +0 -1
- package/resources/loyalty/transaction-entries.js +0 -16
- package/resources/loyalty/transaction-entries.js.map +0 -1
- package/resources/loyalty/transaction-entries.mjs +0 -12
- package/resources/loyalty/transaction-entries.mjs.map +0 -1
- package/src/resources/assets.ts +0 -71
- package/src/resources/loyalty/transaction-entries.ts +0 -229
|
@@ -0,0 +1,525 @@
|
|
|
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 AccountsAPI from './accounts';
|
|
7
|
+
import {
|
|
8
|
+
AccountListParams,
|
|
9
|
+
AccountListResponse,
|
|
10
|
+
AccountRetrieveRankParams,
|
|
11
|
+
AccountRetrieveRankResponse,
|
|
12
|
+
Accounts,
|
|
13
|
+
} from './accounts';
|
|
14
|
+
import * as QuestionsAPI from './questions';
|
|
15
|
+
import {
|
|
16
|
+
QuestionCreateParams,
|
|
17
|
+
QuestionCreateResponse,
|
|
18
|
+
QuestionListParams,
|
|
19
|
+
QuestionListResponse,
|
|
20
|
+
QuestionUpdateParams,
|
|
21
|
+
QuestionUpdateResponse,
|
|
22
|
+
Questions,
|
|
23
|
+
} from './questions';
|
|
24
|
+
import * as QuestionsResponsesAPI from './questions-responses';
|
|
25
|
+
import {
|
|
26
|
+
QuestionsResponseListParams,
|
|
27
|
+
QuestionsResponseListResponse,
|
|
28
|
+
QuestionsResponseSubmitParams,
|
|
29
|
+
QuestionsResponseSubmitResponse,
|
|
30
|
+
QuestionsResponses,
|
|
31
|
+
} from './questions-responses';
|
|
32
|
+
|
|
33
|
+
export class TransactionEntries extends APIResource {
|
|
34
|
+
accounts: AccountsAPI.Accounts = new AccountsAPI.Accounts(this._client);
|
|
35
|
+
questions: QuestionsAPI.Questions = new QuestionsAPI.Questions(this._client);
|
|
36
|
+
questionsResponses: QuestionsResponsesAPI.QuestionsResponses = new QuestionsResponsesAPI.QuestionsResponses(
|
|
37
|
+
this._client,
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Fetch loyalty transaction entries for wallets or users, representing account
|
|
42
|
+
* balance changes.
|
|
43
|
+
*/
|
|
44
|
+
list(
|
|
45
|
+
query?: TransactionEntryListParams,
|
|
46
|
+
options?: Core.RequestOptions,
|
|
47
|
+
): Core.APIPromise<TransactionEntryListResponse>;
|
|
48
|
+
list(options?: Core.RequestOptions): Core.APIPromise<TransactionEntryListResponse>;
|
|
49
|
+
list(
|
|
50
|
+
query: TransactionEntryListParams | Core.RequestOptions = {},
|
|
51
|
+
options?: Core.RequestOptions,
|
|
52
|
+
): Core.APIPromise<TransactionEntryListResponse> {
|
|
53
|
+
if (isRequestOptions(query)) {
|
|
54
|
+
return this.list({}, query);
|
|
55
|
+
}
|
|
56
|
+
return this._client.get('/api/loyalty/transaction_entries', { query, ...options });
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Create a loyalty transaction to update account balances.
|
|
61
|
+
*/
|
|
62
|
+
createTransaction(
|
|
63
|
+
body: TransactionEntryCreateTransactionParams,
|
|
64
|
+
options?: Core.RequestOptions,
|
|
65
|
+
): Core.APIPromise<TransactionEntryCreateTransactionResponse> {
|
|
66
|
+
return this._client.post('/api/loyalty/transactions', { body, ...options });
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Retrieve configured loyalty rule groups
|
|
71
|
+
*/
|
|
72
|
+
listRuleGroups(
|
|
73
|
+
query?: TransactionEntryListRuleGroupsParams,
|
|
74
|
+
options?: Core.RequestOptions,
|
|
75
|
+
): Core.APIPromise<TransactionEntryListRuleGroupsResponse>;
|
|
76
|
+
listRuleGroups(options?: Core.RequestOptions): Core.APIPromise<TransactionEntryListRuleGroupsResponse>;
|
|
77
|
+
listRuleGroups(
|
|
78
|
+
query: TransactionEntryListRuleGroupsParams | Core.RequestOptions = {},
|
|
79
|
+
options?: Core.RequestOptions,
|
|
80
|
+
): Core.APIPromise<TransactionEntryListRuleGroupsResponse> {
|
|
81
|
+
if (isRequestOptions(query)) {
|
|
82
|
+
return this.listRuleGroups({}, query);
|
|
83
|
+
}
|
|
84
|
+
return this._client.get('/api/loyalty/rule_groups', { query, ...options });
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface TransactionEntryListResponse {
|
|
89
|
+
data: Array<TransactionEntryListResponse.Data>;
|
|
90
|
+
|
|
91
|
+
hasNextPage: boolean;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export namespace TransactionEntryListResponse {
|
|
95
|
+
/**
|
|
96
|
+
* Schema for a loyalty transaction entry
|
|
97
|
+
*/
|
|
98
|
+
export interface Data {
|
|
99
|
+
/**
|
|
100
|
+
* Unique identifier for the transaction entry
|
|
101
|
+
*/
|
|
102
|
+
id: string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Amount involved in the transaction
|
|
106
|
+
*/
|
|
107
|
+
amount: number;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Timestamp when the transaction entry was created
|
|
111
|
+
*/
|
|
112
|
+
createdAt: string;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Direction of the transaction entry
|
|
116
|
+
*/
|
|
117
|
+
direction: 'credit' | 'debit';
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Unique identifier for the loyalty account
|
|
121
|
+
*/
|
|
122
|
+
loyaltyAccountId: string;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Details of the loyalty transaction
|
|
126
|
+
*/
|
|
127
|
+
loyaltyTransaction: Data.LoyaltyTransaction;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Unique identifier for the organization
|
|
131
|
+
*/
|
|
132
|
+
organizationId: string;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Type of the loyalty transaction
|
|
136
|
+
*/
|
|
137
|
+
type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Timestamp when the transaction entry was last updated
|
|
141
|
+
*/
|
|
142
|
+
updatedAt: string;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Unique identifier for the website
|
|
146
|
+
*/
|
|
147
|
+
websiteId: string;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Optional metadata for the transaction entry
|
|
151
|
+
*/
|
|
152
|
+
metadata?: Record<string, unknown>;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export namespace Data {
|
|
156
|
+
/**
|
|
157
|
+
* Details of the loyalty transaction
|
|
158
|
+
*/
|
|
159
|
+
export interface LoyaltyTransaction {
|
|
160
|
+
/**
|
|
161
|
+
* Unique identifier for the loyalty transaction
|
|
162
|
+
*/
|
|
163
|
+
id: string;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Type of the loyalty transaction
|
|
167
|
+
*/
|
|
168
|
+
type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Details of the loyalty rule associated with the transaction
|
|
172
|
+
*/
|
|
173
|
+
loyaltyRule?: LoyaltyTransaction.LoyaltyRule;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export namespace LoyaltyTransaction {
|
|
177
|
+
/**
|
|
178
|
+
* Details of the loyalty rule associated with the transaction
|
|
179
|
+
*/
|
|
180
|
+
export interface LoyaltyRule {
|
|
181
|
+
/**
|
|
182
|
+
* Unique identifier for the loyalty rule
|
|
183
|
+
*/
|
|
184
|
+
id: string;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Type of the loyalty rule
|
|
188
|
+
*/
|
|
189
|
+
type: string;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Description of the loyalty rule
|
|
193
|
+
*/
|
|
194
|
+
description?: string;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Optional metadata for the loyalty rule
|
|
198
|
+
*/
|
|
199
|
+
metadata?: Record<string, unknown>;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Name of the loyalty rule
|
|
203
|
+
*/
|
|
204
|
+
name?: string;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export interface TransactionEntryCreateTransactionResponse {
|
|
211
|
+
id: string;
|
|
212
|
+
|
|
213
|
+
createdAt: string;
|
|
214
|
+
|
|
215
|
+
description: string;
|
|
216
|
+
|
|
217
|
+
entries: Array<TransactionEntryCreateTransactionResponse.Entry>;
|
|
218
|
+
|
|
219
|
+
updatedAt: string;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export namespace TransactionEntryCreateTransactionResponse {
|
|
223
|
+
export interface Entry {
|
|
224
|
+
amount: number;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Direction of the transaction entry
|
|
228
|
+
*/
|
|
229
|
+
direction: 'credit' | 'debit';
|
|
230
|
+
|
|
231
|
+
walletAddress: string;
|
|
232
|
+
|
|
233
|
+
idempotencyKey?: string;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export interface TransactionEntryListRuleGroupsResponse {
|
|
238
|
+
data: Array<TransactionEntryListRuleGroupsResponse.Data>;
|
|
239
|
+
|
|
240
|
+
hasNextPage: boolean;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export namespace TransactionEntryListRuleGroupsResponse {
|
|
244
|
+
export interface Data {
|
|
245
|
+
id: string;
|
|
246
|
+
|
|
247
|
+
isCollapsible: boolean;
|
|
248
|
+
|
|
249
|
+
isRequired: boolean;
|
|
250
|
+
|
|
251
|
+
loyaltyGroupItems: Array<Data.LoyaltyGroupItem>;
|
|
252
|
+
|
|
253
|
+
name: string;
|
|
254
|
+
|
|
255
|
+
sortId: number;
|
|
256
|
+
|
|
257
|
+
subTitle: string | null;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export namespace Data {
|
|
261
|
+
export interface LoyaltyGroupItem {
|
|
262
|
+
id: string;
|
|
263
|
+
|
|
264
|
+
loyaltyRule: LoyaltyGroupItem.LoyaltyRule;
|
|
265
|
+
|
|
266
|
+
sortId: number;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export namespace LoyaltyGroupItem {
|
|
270
|
+
export interface LoyaltyRule {
|
|
271
|
+
id: string;
|
|
272
|
+
|
|
273
|
+
amount: number | null;
|
|
274
|
+
|
|
275
|
+
description: string | null;
|
|
276
|
+
|
|
277
|
+
endTime: string | null;
|
|
278
|
+
|
|
279
|
+
hideInUi: boolean;
|
|
280
|
+
|
|
281
|
+
isRequired: boolean;
|
|
282
|
+
|
|
283
|
+
loyaltyCurrencyId: string;
|
|
284
|
+
|
|
285
|
+
name: string;
|
|
286
|
+
|
|
287
|
+
rewardType: 'points' | 'multiplier';
|
|
288
|
+
|
|
289
|
+
type:
|
|
290
|
+
| 'Bonus'
|
|
291
|
+
| 'BoughtOn'
|
|
292
|
+
| 'BoughtWithRoyalties'
|
|
293
|
+
| 'DiscordMessages'
|
|
294
|
+
| 'Listing'
|
|
295
|
+
| 'Lodging'
|
|
296
|
+
| 'MintOn'
|
|
297
|
+
| 'PoapClaim'
|
|
298
|
+
| 'SnagSocialsConnected'
|
|
299
|
+
| 'SnapshotFullset'
|
|
300
|
+
| 'SnapshotHold'
|
|
301
|
+
| 'SoldOn'
|
|
302
|
+
| 'SoldWithRoyalties'
|
|
303
|
+
| 'TokenHold'
|
|
304
|
+
| 'TwitterBio'
|
|
305
|
+
| 'TwitterHashTagPost'
|
|
306
|
+
| 'Retweet'
|
|
307
|
+
| 'check_in'
|
|
308
|
+
| 'code_entry'
|
|
309
|
+
| 'connect_wallet'
|
|
310
|
+
| 'connected_discord'
|
|
311
|
+
| 'connected_email'
|
|
312
|
+
| 'connected_epic'
|
|
313
|
+
| 'connected_steam'
|
|
314
|
+
| 'connected_telegram'
|
|
315
|
+
| 'connected_twitter'
|
|
316
|
+
| 'create_partner_account'
|
|
317
|
+
| 'discord_member'
|
|
318
|
+
| 'drip_x_follow'
|
|
319
|
+
| 'drip_x_new_tweet'
|
|
320
|
+
| 'drip_x_text_in_bio'
|
|
321
|
+
| 'drip_x_text_in_comment'
|
|
322
|
+
| 'drip_x_text_in_name'
|
|
323
|
+
| 'drip_x_tweet'
|
|
324
|
+
| 'external_rule'
|
|
325
|
+
| 'link_click'
|
|
326
|
+
| 'manual_upload'
|
|
327
|
+
| 'profile_completed'
|
|
328
|
+
| 'referred_user'
|
|
329
|
+
| 'smart_contract_event'
|
|
330
|
+
| 'snapshot_governance'
|
|
331
|
+
| 'telegram_join'
|
|
332
|
+
| 'telegram_messages'
|
|
333
|
+
| 'text_input'
|
|
334
|
+
| 'token_hold_erc20'
|
|
335
|
+
| 'tweet_liked_by_project'
|
|
336
|
+
| 'twitter_comment'
|
|
337
|
+
| 'twitter_follow'
|
|
338
|
+
| 'twitter_followers'
|
|
339
|
+
| 'twitter_like'
|
|
340
|
+
| 'twitter_post_hashtag'
|
|
341
|
+
| 'quiz'
|
|
342
|
+
| 'poll';
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export interface TransactionEntryListParams {
|
|
349
|
+
/**
|
|
350
|
+
* Direction of the transaction entry to filter by
|
|
351
|
+
*/
|
|
352
|
+
direction?: 'credit' | 'debit';
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Key to ensure idempotency of the request
|
|
356
|
+
*/
|
|
357
|
+
idempotencyKey?: string;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Maximum number of records to return (max 1000)
|
|
361
|
+
*/
|
|
362
|
+
limit?: number;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Unique identifier for the loyalty rule to filter by
|
|
366
|
+
*/
|
|
367
|
+
loyaltyRuleId?: string;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Unique identifier for the loyalty transaction to filter by
|
|
371
|
+
*/
|
|
372
|
+
loyaltyTransactionId?: string;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Field to order the results by
|
|
376
|
+
*/
|
|
377
|
+
orderBy?: 'createdAt' | 'updatedAt' | 'loyaltyAccountLockVersion';
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Unique identifier for the organization to filter by
|
|
381
|
+
*/
|
|
382
|
+
organizationId?: string;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Pagination cursor to start after a specific resource ID
|
|
386
|
+
*/
|
|
387
|
+
startingAfter?: string;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Type of the loyalty transaction to filter by
|
|
391
|
+
*/
|
|
392
|
+
type?: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* When passed in return the list of fulfilled entries for loyalty rules. If a
|
|
396
|
+
* loyalty rule has a fulfilled entry this means the user cannot currently complete
|
|
397
|
+
* the rule. Must be passed in with userId or walletAddress.
|
|
398
|
+
*/
|
|
399
|
+
userCompletedLoyaltyRuleId?: string | Array<string>;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* External identifier for the user group controlled by you
|
|
403
|
+
*/
|
|
404
|
+
userGroupExternalIdentifier?: string;
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Unique identifier for the user group
|
|
408
|
+
*/
|
|
409
|
+
userGroupId?: string;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* User ID or array of User IDs to filter by
|
|
413
|
+
*/
|
|
414
|
+
userId?: string | Array<string>;
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Wallet address or array of wallet addresses to filter by
|
|
418
|
+
*/
|
|
419
|
+
walletAddress?: string | Array<string>;
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Identifier for the wallet group to filter by
|
|
423
|
+
*/
|
|
424
|
+
walletGroupIdentifier?: string;
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Unique identifier for the website to filter by
|
|
428
|
+
*/
|
|
429
|
+
websiteId?: string;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export interface TransactionEntryCreateTransactionParams {
|
|
433
|
+
/**
|
|
434
|
+
* Description of the loyalty transaction
|
|
435
|
+
*/
|
|
436
|
+
description: string;
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Array of transaction entries
|
|
440
|
+
*/
|
|
441
|
+
entries: Array<TransactionEntryCreateTransactionParams.Entry>;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Unique identifier for the loyalty currency
|
|
445
|
+
*/
|
|
446
|
+
loyaltyCurrencyId?: string;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
export namespace TransactionEntryCreateTransactionParams {
|
|
450
|
+
export interface Entry {
|
|
451
|
+
/**
|
|
452
|
+
* Transaction entry amount.
|
|
453
|
+
*/
|
|
454
|
+
amount: number;
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Direction of the transaction entry for this wallet address
|
|
458
|
+
*/
|
|
459
|
+
direction?: 'credit' | 'debit';
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Idempotency key for the transaction entry. Creation will fail if already exists
|
|
463
|
+
* for this wallet address.
|
|
464
|
+
*/
|
|
465
|
+
idempotencyKey?: string;
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* The wallet address of the user
|
|
469
|
+
*/
|
|
470
|
+
walletAddress?: string;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
export interface TransactionEntryListRuleGroupsParams {
|
|
475
|
+
excludeHidden?: string;
|
|
476
|
+
|
|
477
|
+
limit?: number;
|
|
478
|
+
|
|
479
|
+
organizationId?: string;
|
|
480
|
+
|
|
481
|
+
startingAfter?: string;
|
|
482
|
+
|
|
483
|
+
websiteId?: string;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
TransactionEntries.Accounts = Accounts;
|
|
487
|
+
TransactionEntries.Questions = Questions;
|
|
488
|
+
TransactionEntries.QuestionsResponses = QuestionsResponses;
|
|
489
|
+
|
|
490
|
+
export declare namespace TransactionEntries {
|
|
491
|
+
export {
|
|
492
|
+
type TransactionEntryListResponse as TransactionEntryListResponse,
|
|
493
|
+
type TransactionEntryCreateTransactionResponse as TransactionEntryCreateTransactionResponse,
|
|
494
|
+
type TransactionEntryListRuleGroupsResponse as TransactionEntryListRuleGroupsResponse,
|
|
495
|
+
type TransactionEntryListParams as TransactionEntryListParams,
|
|
496
|
+
type TransactionEntryCreateTransactionParams as TransactionEntryCreateTransactionParams,
|
|
497
|
+
type TransactionEntryListRuleGroupsParams as TransactionEntryListRuleGroupsParams,
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
export {
|
|
501
|
+
Accounts as Accounts,
|
|
502
|
+
type AccountListResponse as AccountListResponse,
|
|
503
|
+
type AccountRetrieveRankResponse as AccountRetrieveRankResponse,
|
|
504
|
+
type AccountListParams as AccountListParams,
|
|
505
|
+
type AccountRetrieveRankParams as AccountRetrieveRankParams,
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
export {
|
|
509
|
+
Questions as Questions,
|
|
510
|
+
type QuestionCreateResponse as QuestionCreateResponse,
|
|
511
|
+
type QuestionUpdateResponse as QuestionUpdateResponse,
|
|
512
|
+
type QuestionListResponse as QuestionListResponse,
|
|
513
|
+
type QuestionCreateParams as QuestionCreateParams,
|
|
514
|
+
type QuestionUpdateParams as QuestionUpdateParams,
|
|
515
|
+
type QuestionListParams as QuestionListParams,
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
export {
|
|
519
|
+
QuestionsResponses as QuestionsResponses,
|
|
520
|
+
type QuestionsResponseListResponse as QuestionsResponseListResponse,
|
|
521
|
+
type QuestionsResponseSubmitResponse as QuestionsResponseSubmitResponse,
|
|
522
|
+
type QuestionsResponseListParams as QuestionsResponseListParams,
|
|
523
|
+
type QuestionsResponseSubmitParams as QuestionsResponseSubmitParams,
|
|
524
|
+
};
|
|
525
|
+
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export { Metadatas, type MetadataCreateResponse, type MetadataCreateParams } from './metadatas';
|
|
4
|
-
export { Users } from './users';
|
|
5
3
|
export {
|
|
6
|
-
|
|
7
|
-
type
|
|
8
|
-
type
|
|
9
|
-
type
|
|
10
|
-
type
|
|
11
|
-
|
|
12
|
-
} from './
|
|
4
|
+
Metadatas,
|
|
5
|
+
type MetadataCreateResponse,
|
|
6
|
+
type MetadataRetrieveResponse,
|
|
7
|
+
type MetadataCreateParams,
|
|
8
|
+
type MetadataRetrieveParams,
|
|
9
|
+
} from './metadatas';
|
|
10
|
+
export { Users } from './users';
|
|
11
|
+
export { Wallets } from './wallets';
|
|
@@ -6,7 +6,7 @@ import * as Core from '../../core';
|
|
|
6
6
|
|
|
7
7
|
export class Metadatas extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* This endpoint
|
|
9
|
+
* This endpoint is used to create user metadata
|
|
10
10
|
*/
|
|
11
11
|
create(body?: MetadataCreateParams, options?: Core.RequestOptions): Core.APIPromise<MetadataCreateResponse>;
|
|
12
12
|
create(options?: Core.RequestOptions): Core.APIPromise<MetadataCreateResponse>;
|
|
@@ -19,11 +19,26 @@ export class Metadatas extends APIResource {
|
|
|
19
19
|
}
|
|
20
20
|
return this._client.post('/api/users/metadatas', { body, ...options });
|
|
21
21
|
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* This endpoint is used to get user metadata
|
|
25
|
+
*/
|
|
26
|
+
retrieve(
|
|
27
|
+
query?: MetadataRetrieveParams,
|
|
28
|
+
options?: Core.RequestOptions,
|
|
29
|
+
): Core.APIPromise<MetadataRetrieveResponse>;
|
|
30
|
+
retrieve(options?: Core.RequestOptions): Core.APIPromise<MetadataRetrieveResponse>;
|
|
31
|
+
retrieve(
|
|
32
|
+
query: MetadataRetrieveParams | Core.RequestOptions = {},
|
|
33
|
+
options?: Core.RequestOptions,
|
|
34
|
+
): Core.APIPromise<MetadataRetrieveResponse> {
|
|
35
|
+
if (isRequestOptions(query)) {
|
|
36
|
+
return this.retrieve({}, query);
|
|
37
|
+
}
|
|
38
|
+
return this._client.get('/api/users/metadatas', { query, ...options });
|
|
39
|
+
}
|
|
22
40
|
}
|
|
23
41
|
|
|
24
|
-
/**
|
|
25
|
-
* Schema for user metadata response
|
|
26
|
-
*/
|
|
27
42
|
export interface MetadataCreateResponse {
|
|
28
43
|
/**
|
|
29
44
|
* Unique identifier for the user metadata
|
|
@@ -40,15 +55,14 @@ export interface MetadataCreateResponse {
|
|
|
40
55
|
*/
|
|
41
56
|
organizationId: string;
|
|
42
57
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
updatedAt: string;
|
|
58
|
+
user: MetadataCreateResponse.User;
|
|
59
|
+
|
|
60
|
+
userGroup: MetadataCreateResponse.UserGroup;
|
|
47
61
|
|
|
48
62
|
/**
|
|
49
|
-
*
|
|
63
|
+
* Identifier for the user group set via api
|
|
50
64
|
*/
|
|
51
|
-
|
|
65
|
+
userGroupId: string | null;
|
|
52
66
|
|
|
53
67
|
/**
|
|
54
68
|
* Identifier for the user wallet group set via api
|
|
@@ -61,6 +75,53 @@ export interface MetadataCreateResponse {
|
|
|
61
75
|
websiteId: string;
|
|
62
76
|
}
|
|
63
77
|
|
|
78
|
+
export namespace MetadataCreateResponse {
|
|
79
|
+
export interface User {
|
|
80
|
+
/**
|
|
81
|
+
* Id for the user
|
|
82
|
+
*/
|
|
83
|
+
id: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Wallet address of the user
|
|
87
|
+
*/
|
|
88
|
+
walletAddress: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface UserGroup {
|
|
92
|
+
/**
|
|
93
|
+
* id for the user group
|
|
94
|
+
*/
|
|
95
|
+
id: string;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* External identifier for the user group
|
|
99
|
+
*/
|
|
100
|
+
externalIdentifier: string | null;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Response schema for fetching user metadata
|
|
106
|
+
*/
|
|
107
|
+
export interface MetadataRetrieveResponse {
|
|
108
|
+
data: Array<MetadataRetrieveResponse.Data>;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Indicates if there are more records available
|
|
112
|
+
*/
|
|
113
|
+
hasNextPage: boolean;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export namespace MetadataRetrieveResponse {
|
|
117
|
+
export interface Data {
|
|
118
|
+
/**
|
|
119
|
+
* Unique identifier for the user metadata
|
|
120
|
+
*/
|
|
121
|
+
id: string;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
64
125
|
export interface MetadataCreateParams {
|
|
65
126
|
discordUser?: string | null;
|
|
66
127
|
|
|
@@ -88,6 +149,10 @@ export interface MetadataCreateParams {
|
|
|
88
149
|
|
|
89
150
|
twitterUserId?: string | null;
|
|
90
151
|
|
|
152
|
+
userGroupExternalIdentifier?: string | null;
|
|
153
|
+
|
|
154
|
+
userGroupId?: string;
|
|
155
|
+
|
|
91
156
|
userId?: string;
|
|
92
157
|
|
|
93
158
|
walletAddress?: string;
|
|
@@ -95,9 +160,43 @@ export interface MetadataCreateParams {
|
|
|
95
160
|
walletGroupIdentifier?: string | null;
|
|
96
161
|
}
|
|
97
162
|
|
|
163
|
+
export interface MetadataRetrieveParams {
|
|
164
|
+
/**
|
|
165
|
+
* Number of records to fetch
|
|
166
|
+
*/
|
|
167
|
+
limit?: number;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* UUID of the organization
|
|
171
|
+
*/
|
|
172
|
+
organizationId?: string;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Fetch records starting after this ID
|
|
176
|
+
*/
|
|
177
|
+
startingAfter?: string;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* UUID of the user
|
|
181
|
+
*/
|
|
182
|
+
userId?: string;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Wallet address of the user
|
|
186
|
+
*/
|
|
187
|
+
walletAddress?: string;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* UUID of the website
|
|
191
|
+
*/
|
|
192
|
+
websiteId?: string;
|
|
193
|
+
}
|
|
194
|
+
|
|
98
195
|
export declare namespace Metadatas {
|
|
99
196
|
export {
|
|
100
197
|
type MetadataCreateResponse as MetadataCreateResponse,
|
|
198
|
+
type MetadataRetrieveResponse as MetadataRetrieveResponse,
|
|
101
199
|
type MetadataCreateParams as MetadataCreateParams,
|
|
200
|
+
type MetadataRetrieveParams as MetadataRetrieveParams,
|
|
102
201
|
};
|
|
103
202
|
}
|