@snagsolutions/sdk 0.1.0-alpha.214 → 0.1.0-alpha.216
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 +21 -0
- package/index.d.mts +5 -2
- package/index.d.ts +5 -2
- package/index.d.ts.map +1 -1
- package/index.js +4 -1
- package/index.js.map +1 -1
- package/index.mjs +4 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -1
- package/resources/index.mjs.map +1 -1
- package/resources/loyalty/index.d.ts +1 -1
- package/resources/loyalty/index.d.ts.map +1 -1
- package/resources/loyalty/index.js.map +1 -1
- package/resources/loyalty/index.mjs.map +1 -1
- package/resources/loyalty/loyalty.d.ts +2 -2
- package/resources/loyalty/loyalty.d.ts.map +1 -1
- package/resources/loyalty/loyalty.js.map +1 -1
- package/resources/loyalty/loyalty.mjs.map +1 -1
- package/resources/loyalty/rule-groups.d.ts +1 -1
- package/resources/loyalty/rule-groups.d.ts.map +1 -1
- package/resources/loyalty/rules.d.ts +2 -2
- package/resources/loyalty/rules.d.ts.map +1 -1
- package/resources/loyalty/transactions/index.d.ts +2 -1
- package/resources/loyalty/transactions/index.d.ts.map +1 -1
- package/resources/loyalty/transactions/index.js +3 -1
- package/resources/loyalty/transactions/index.js.map +1 -1
- package/resources/loyalty/transactions/index.mjs +1 -0
- package/resources/loyalty/transactions/index.mjs.map +1 -1
- package/resources/loyalty/transactions/posts.d.ts +145 -0
- package/resources/loyalty/transactions/posts.d.ts.map +1 -0
- package/resources/loyalty/transactions/posts.js +32 -0
- package/resources/loyalty/transactions/posts.js.map +1 -0
- package/resources/loyalty/transactions/posts.mjs +28 -0
- package/resources/loyalty/transactions/posts.mjs.map +1 -0
- package/resources/loyalty/transactions/transactions.d.ts +144 -2
- package/resources/loyalty/transactions/transactions.d.ts.map +1 -1
- package/resources/loyalty/transactions/transactions.js +34 -0
- package/resources/loyalty/transactions/transactions.js.map +1 -1
- package/resources/loyalty/transactions/transactions.mjs +34 -0
- package/resources/loyalty/transactions/transactions.mjs.map +1 -1
- package/resources/minting/allowlist.d.ts +84 -0
- package/resources/minting/allowlist.d.ts.map +1 -0
- package/resources/minting/allowlist.js +42 -0
- package/resources/minting/allowlist.js.map +1 -0
- package/resources/minting/allowlist.mjs +38 -0
- package/resources/minting/allowlist.mjs.map +1 -0
- package/resources/minting/contracts.d.ts +38 -0
- package/resources/minting/contracts.d.ts.map +1 -0
- package/resources/minting/contracts.js +23 -0
- package/resources/minting/contracts.js.map +1 -0
- package/resources/minting/contracts.mjs +19 -0
- package/resources/minting/contracts.mjs.map +1 -0
- package/resources/minting/index.d.ts +5 -0
- package/resources/minting/index.d.ts.map +1 -0
- package/resources/minting/index.js +13 -0
- package/resources/minting/index.js.map +1 -0
- package/resources/minting/index.mjs +6 -0
- package/resources/minting/index.mjs.map +1 -0
- package/resources/minting/minting.d.ts +142 -0
- package/resources/minting/minting.d.ts.map +1 -0
- package/resources/minting/minting.js +79 -0
- package/resources/minting/minting.js.map +1 -0
- package/resources/minting/minting.mjs +52 -0
- package/resources/minting/minting.mjs.map +1 -0
- package/resources/minting/status.d.ts +44 -0
- package/resources/minting/status.d.ts.map +1 -0
- package/resources/minting/status.js +33 -0
- package/resources/minting/status.js.map +1 -0
- package/resources/minting/status.mjs +29 -0
- package/resources/minting/status.mjs.map +1 -0
- package/resources/minting.d.ts +1 -94
- package/resources/minting.d.ts.map +1 -1
- package/resources/minting.js +15 -11
- package/resources/minting.js.map +1 -1
- package/resources/minting.mjs +1 -9
- package/resources/minting.mjs.map +1 -1
- package/resources/token-claims.d.ts +160 -0
- package/resources/token-claims.d.ts.map +1 -0
- package/resources/token-claims.js +46 -0
- package/resources/token-claims.js.map +1 -0
- package/resources/token-claims.mjs +42 -0
- package/resources/token-claims.mjs.map +1 -0
- package/src/index.ts +42 -1
- package/src/resources/index.ts +22 -1
- package/src/resources/loyalty/index.ts +4 -0
- package/src/resources/loyalty/loyalty.ts +8 -0
- package/src/resources/loyalty/rule-groups.ts +1 -2
- package/src/resources/loyalty/rules.ts +2 -4
- package/src/resources/loyalty/transactions/index.ts +11 -0
- package/src/resources/loyalty/transactions/posts.ts +221 -0
- package/src/resources/loyalty/transactions/transactions.ts +194 -2
- package/src/resources/minting/allowlist.ts +116 -0
- package/src/resources/minting/contracts.ts +73 -0
- package/src/resources/minting/index.ts +23 -0
- package/src/resources/minting/minting.ts +269 -0
- package/src/resources/minting/status.ts +70 -0
- package/src/resources/minting.ts +1 -176
- package/src/resources/token-claims.ts +307 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,221 @@
|
|
|
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
|
+
|
|
7
|
+
export class Posts extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Fetch social posts with pagination and filtering options. Note: Rank is
|
|
10
|
+
* calculated for top 20,000 posts only. Posts beyond this threshold will have a
|
|
11
|
+
* null rank.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const posts =
|
|
16
|
+
* await client.loyalty.transactions.posts.list();
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
list(query?: PostListParams, options?: Core.RequestOptions): Core.APIPromise<PostListResponse>;
|
|
20
|
+
list(options?: Core.RequestOptions): Core.APIPromise<PostListResponse>;
|
|
21
|
+
list(
|
|
22
|
+
query: PostListParams | Core.RequestOptions = {},
|
|
23
|
+
options?: Core.RequestOptions,
|
|
24
|
+
): Core.APIPromise<PostListResponse> {
|
|
25
|
+
if (isRequestOptions(query)) {
|
|
26
|
+
return this.list({}, query);
|
|
27
|
+
}
|
|
28
|
+
return this._client.get('/api/loyalty/posts', { query, ...options });
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Reward a user for their social post.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const response =
|
|
37
|
+
* await client.loyalty.transactions.posts.reward('id', {
|
|
38
|
+
* amount: 100,
|
|
39
|
+
* loyaltyCurrencyId:
|
|
40
|
+
* '123e4567-e89b-12d3-a456-426614174000',
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
reward(
|
|
45
|
+
id: string,
|
|
46
|
+
body: PostRewardParams,
|
|
47
|
+
options?: Core.RequestOptions,
|
|
48
|
+
): Core.APIPromise<PostRewardResponse> {
|
|
49
|
+
return this._client.post(`/api/loyalty/posts/${id}/reward`, { body, ...options });
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Response containing social posts with pagination info
|
|
55
|
+
*/
|
|
56
|
+
export interface PostListResponse {
|
|
57
|
+
data: Array<PostListResponse.Data>;
|
|
58
|
+
|
|
59
|
+
hasNextPage: boolean;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export namespace PostListResponse {
|
|
63
|
+
/**
|
|
64
|
+
* A social media post
|
|
65
|
+
*/
|
|
66
|
+
export interface Data {
|
|
67
|
+
id: string;
|
|
68
|
+
|
|
69
|
+
authorId: string;
|
|
70
|
+
|
|
71
|
+
createdAt: string;
|
|
72
|
+
|
|
73
|
+
isSeen: boolean;
|
|
74
|
+
|
|
75
|
+
loyaltyCurrencyId: string;
|
|
76
|
+
|
|
77
|
+
loyaltyRuleId: string;
|
|
78
|
+
|
|
79
|
+
mediaType: 'image' | 'video';
|
|
80
|
+
|
|
81
|
+
platform: 'twitter' | 'tiktok';
|
|
82
|
+
|
|
83
|
+
postType: 'post' | 'comment' | 'repost';
|
|
84
|
+
|
|
85
|
+
updatedAt: string;
|
|
86
|
+
|
|
87
|
+
userId: string;
|
|
88
|
+
|
|
89
|
+
userMetadata: Data.UserMetadata;
|
|
90
|
+
|
|
91
|
+
commentCount?: number;
|
|
92
|
+
|
|
93
|
+
contentQualityScore?: number | null;
|
|
94
|
+
|
|
95
|
+
dynamicScore?: number | null;
|
|
96
|
+
|
|
97
|
+
externalIdentifier?: string | null;
|
|
98
|
+
|
|
99
|
+
latestReward?: number | null;
|
|
100
|
+
|
|
101
|
+
likeCount?: number;
|
|
102
|
+
|
|
103
|
+
manualRank?: number | null;
|
|
104
|
+
|
|
105
|
+
mediaUrl?: string;
|
|
106
|
+
|
|
107
|
+
parentPostId?: string;
|
|
108
|
+
|
|
109
|
+
postedAt?: string | null;
|
|
110
|
+
|
|
111
|
+
previewUrl?: string;
|
|
112
|
+
|
|
113
|
+
rank?: number | null;
|
|
114
|
+
|
|
115
|
+
repostCount?: number;
|
|
116
|
+
|
|
117
|
+
sentimentScore?: number | null;
|
|
118
|
+
|
|
119
|
+
text?: string;
|
|
120
|
+
|
|
121
|
+
viewCount?: number;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export namespace Data {
|
|
125
|
+
export interface UserMetadata {
|
|
126
|
+
twitterUser: string;
|
|
127
|
+
|
|
128
|
+
twitterUserFollowersCount: number;
|
|
129
|
+
|
|
130
|
+
twitterUserId: string;
|
|
131
|
+
|
|
132
|
+
twitterVerifiedAccount: boolean;
|
|
133
|
+
|
|
134
|
+
userId: string;
|
|
135
|
+
|
|
136
|
+
logoUrl?: string;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Response containing the reward transaction details
|
|
143
|
+
*/
|
|
144
|
+
export interface PostRewardResponse {
|
|
145
|
+
success: boolean;
|
|
146
|
+
|
|
147
|
+
transaction: PostRewardResponse.Transaction;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export namespace PostRewardResponse {
|
|
151
|
+
export interface Transaction {
|
|
152
|
+
id: string;
|
|
153
|
+
|
|
154
|
+
amount: number;
|
|
155
|
+
|
|
156
|
+
loyaltyCurrencyId: string;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface PostListParams {
|
|
161
|
+
/**
|
|
162
|
+
* Cursor for pagination
|
|
163
|
+
*/
|
|
164
|
+
cursor?: string;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Number of posts to fetch per page
|
|
168
|
+
*/
|
|
169
|
+
limit?: number;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Optional UUID of the loyalty post to filter posts
|
|
173
|
+
*/
|
|
174
|
+
loyaltyPostId?: string | Array<string>;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* UUID of the organization to fetch social posts for
|
|
178
|
+
*/
|
|
179
|
+
organizationId?: string;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Sort posts by createdAt or rank
|
|
183
|
+
*/
|
|
184
|
+
sortBy?: 'rank' | 'createdAt';
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Optional UUID of the user group to filter posts
|
|
188
|
+
*/
|
|
189
|
+
userGroupId?: string;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Optional UUID of the user to filter posts
|
|
193
|
+
*/
|
|
194
|
+
userId?: string | Array<string>;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* UUID of the website to fetch social posts for
|
|
198
|
+
*/
|
|
199
|
+
websiteId?: string;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export interface PostRewardParams {
|
|
203
|
+
/**
|
|
204
|
+
* Amount to reward
|
|
205
|
+
*/
|
|
206
|
+
amount: number;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* UUID of the loyalty currency to reward with
|
|
210
|
+
*/
|
|
211
|
+
loyaltyCurrencyId: string;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export declare namespace Posts {
|
|
215
|
+
export {
|
|
216
|
+
type PostListResponse as PostListResponse,
|
|
217
|
+
type PostRewardResponse as PostRewardResponse,
|
|
218
|
+
type PostListParams as PostListParams,
|
|
219
|
+
type PostRewardParams as PostRewardParams,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import { APIResource } from '../../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../../core';
|
|
5
5
|
import * as Core from '../../../core';
|
|
6
|
+
import * as PostsAPI from './posts';
|
|
7
|
+
import { PostListParams, PostListResponse, PostRewardParams, PostRewardResponse, Posts } from './posts';
|
|
6
8
|
import * as RuleStatusesAPI from './rule-statuses';
|
|
7
9
|
import {
|
|
8
10
|
RuleStatusListParams,
|
|
@@ -14,6 +16,7 @@ import {
|
|
|
14
16
|
|
|
15
17
|
export class Transactions extends APIResource {
|
|
16
18
|
ruleStatuses: RuleStatusesAPI.RuleStatuses = new RuleStatusesAPI.RuleStatuses(this._client);
|
|
19
|
+
posts: PostsAPI.Posts = new PostsAPI.Posts(this._client);
|
|
17
20
|
|
|
18
21
|
/**
|
|
19
22
|
* Create a loyalty transaction to update account balances.
|
|
@@ -61,6 +64,24 @@ export class Transactions extends APIResource {
|
|
|
61
64
|
return this._client.get('/api/loyalty/transaction_entries', { query, ...options });
|
|
62
65
|
}
|
|
63
66
|
|
|
67
|
+
/**
|
|
68
|
+
* This endpoint allows you to fetch users for a specific badge.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const response =
|
|
73
|
+
* await client.loyalty.transactions.listBadgeUsers({
|
|
74
|
+
* loyaltyBadgeId: '123e4567-e89b-12d3-a456-426614174222',
|
|
75
|
+
* });
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
listBadgeUsers(
|
|
79
|
+
query: TransactionListBadgeUsersParams,
|
|
80
|
+
options?: Core.RequestOptions,
|
|
81
|
+
): Core.APIPromise<TransactionListBadgeUsersResponse> {
|
|
82
|
+
return this._client.get('/api/loyalty/badge_users', { query, ...options });
|
|
83
|
+
}
|
|
84
|
+
|
|
64
85
|
/**
|
|
65
86
|
* Retrieve configured loyalty rule chains
|
|
66
87
|
*
|
|
@@ -79,6 +100,26 @@ export class Transactions extends APIResource {
|
|
|
79
100
|
): Core.APIPromise<TransactionListRuleChainsResponse> {
|
|
80
101
|
return this._client.get('/api/loyalty/rule_chains', { query, ...options });
|
|
81
102
|
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Reset Loyalty Currency of a website
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```ts
|
|
109
|
+
* const response =
|
|
110
|
+
* await client.loyalty.transactions.resetLoyaltyCurrency({
|
|
111
|
+
* loyaltyCurrencyId:
|
|
112
|
+
* '123e4567-e89b-12d3-a456-426614174000',
|
|
113
|
+
* type: 'loyalty_reset_balances',
|
|
114
|
+
* });
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
resetLoyaltyCurrency(
|
|
118
|
+
body: TransactionResetLoyaltyCurrencyParams,
|
|
119
|
+
options?: Core.RequestOptions,
|
|
120
|
+
): Core.APIPromise<TransactionResetLoyaltyCurrencyResponse> {
|
|
121
|
+
return this._client.post('/api/loyalty/reset', { body, ...options });
|
|
122
|
+
}
|
|
82
123
|
}
|
|
83
124
|
|
|
84
125
|
export interface TransactionCreateTransactionResponse {
|
|
@@ -238,6 +279,83 @@ export namespace TransactionGetTransactionEntriesResponse {
|
|
|
238
279
|
}
|
|
239
280
|
}
|
|
240
281
|
|
|
282
|
+
/**
|
|
283
|
+
* Response returned upon successful fetching of the badge users.
|
|
284
|
+
*/
|
|
285
|
+
export interface TransactionListBadgeUsersResponse {
|
|
286
|
+
/**
|
|
287
|
+
* UUID of the user badge (converted to lowercase)
|
|
288
|
+
*/
|
|
289
|
+
id: string;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* The date and time the user badge was created
|
|
293
|
+
*/
|
|
294
|
+
createdAt: string;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* The date and time the user badge was deleted
|
|
298
|
+
*/
|
|
299
|
+
deletedAt: string | null;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* UUID of the badge (converted to lowercase)
|
|
303
|
+
*/
|
|
304
|
+
loyaltyBadgeId: string;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* UUID of the organization (converted to lowercase)
|
|
308
|
+
*/
|
|
309
|
+
organizationId: string;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Array of progress for the badge
|
|
313
|
+
*/
|
|
314
|
+
progress: Array<unknown>;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* The status of the badge
|
|
318
|
+
*/
|
|
319
|
+
status: 'active' | 'inactive' | 'revoked';
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* The date and time the user badge was updated
|
|
323
|
+
*/
|
|
324
|
+
updatedAt: string;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* UUID of the user (converted to lowercase)
|
|
328
|
+
*/
|
|
329
|
+
userId: string;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* UUID of the website (converted to lowercase)
|
|
333
|
+
*/
|
|
334
|
+
websiteId: string;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Whether the user has dismissed the badge in the UI
|
|
338
|
+
*/
|
|
339
|
+
dismissedInUi?: boolean;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* User associated with the user badge
|
|
343
|
+
*/
|
|
344
|
+
user?: TransactionListBadgeUsersResponse.User | null;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
export namespace TransactionListBadgeUsersResponse {
|
|
348
|
+
/**
|
|
349
|
+
* User associated with the user badge
|
|
350
|
+
*/
|
|
351
|
+
export interface User {
|
|
352
|
+
/**
|
|
353
|
+
* Wallet address of the user
|
|
354
|
+
*/
|
|
355
|
+
walletAddress: string;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
241
359
|
export interface TransactionListRuleChainsResponse {
|
|
242
360
|
data: Array<TransactionListRuleChainsResponse.Data>;
|
|
243
361
|
|
|
@@ -346,6 +464,10 @@ export namespace TransactionListRuleChainsResponse {
|
|
|
346
464
|
}
|
|
347
465
|
}
|
|
348
466
|
|
|
467
|
+
export interface TransactionResetLoyaltyCurrencyResponse {
|
|
468
|
+
success: boolean;
|
|
469
|
+
}
|
|
470
|
+
|
|
349
471
|
export interface TransactionCreateTransactionParams {
|
|
350
472
|
/**
|
|
351
473
|
* Description of the loyalty transaction
|
|
@@ -509,7 +631,6 @@ export interface TransactionGetTransactionEntriesParams {
|
|
|
509
631
|
| 'connected_reddit'
|
|
510
632
|
| 'reddit_comment'
|
|
511
633
|
| 'robinhood_token_hold'
|
|
512
|
-
| 'shopify_purchase'
|
|
513
634
|
| Array<
|
|
514
635
|
| 'Bonus'
|
|
515
636
|
| 'BoughtOn'
|
|
@@ -588,7 +709,6 @@ export interface TransactionGetTransactionEntriesParams {
|
|
|
588
709
|
| 'connected_reddit'
|
|
589
710
|
| 'reddit_comment'
|
|
590
711
|
| 'robinhood_token_hold'
|
|
591
|
-
| 'shopify_purchase'
|
|
592
712
|
>;
|
|
593
713
|
|
|
594
714
|
/**
|
|
@@ -659,6 +779,43 @@ export interface TransactionGetTransactionEntriesParams {
|
|
|
659
779
|
websiteId?: string;
|
|
660
780
|
}
|
|
661
781
|
|
|
782
|
+
export interface TransactionListBadgeUsersParams {
|
|
783
|
+
/**
|
|
784
|
+
* UUID of the loyalty badge (converted to lowercase)
|
|
785
|
+
*/
|
|
786
|
+
loyaltyBadgeId: string;
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Number of badges to fetch
|
|
790
|
+
*/
|
|
791
|
+
limit?: number;
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* UUID of the organization (optional, converted to lowercase)
|
|
795
|
+
*/
|
|
796
|
+
organizationId?: string;
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* UUID of the badge to start after (converted to lowercase)
|
|
800
|
+
*/
|
|
801
|
+
startingAfter?: string;
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* Status of the badge
|
|
805
|
+
*/
|
|
806
|
+
status?: 'active' | 'inactive' | 'revoked';
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Wallet Address of the user, or array of wallet addresses.
|
|
810
|
+
*/
|
|
811
|
+
walletAddress?: string;
|
|
812
|
+
|
|
813
|
+
/**
|
|
814
|
+
* UUID of the website (optional, converted to lowercase)
|
|
815
|
+
*/
|
|
816
|
+
websiteId?: string;
|
|
817
|
+
}
|
|
818
|
+
|
|
662
819
|
export interface TransactionListRuleChainsParams {
|
|
663
820
|
/**
|
|
664
821
|
* Unique identifier for the organization
|
|
@@ -681,16 +838,43 @@ export interface TransactionListRuleChainsParams {
|
|
|
681
838
|
startingAfter?: string;
|
|
682
839
|
}
|
|
683
840
|
|
|
841
|
+
export interface TransactionResetLoyaltyCurrencyParams {
|
|
842
|
+
/**
|
|
843
|
+
* UUID of the loyalty currency to reset
|
|
844
|
+
*/
|
|
845
|
+
loyaltyCurrencyId: string;
|
|
846
|
+
|
|
847
|
+
type:
|
|
848
|
+
| 'loyalty_reset_balances'
|
|
849
|
+
| 'loyalty_reset_balances_data_and_rules'
|
|
850
|
+
| 'loyalty_reset_balances_data_not_rules';
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* UUID of the organization (optional, converted to lowercase)
|
|
854
|
+
*/
|
|
855
|
+
organizationId?: string;
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* UUID of the website (optional, converted to lowercase)
|
|
859
|
+
*/
|
|
860
|
+
websiteId?: string;
|
|
861
|
+
}
|
|
862
|
+
|
|
684
863
|
Transactions.RuleStatuses = RuleStatuses;
|
|
864
|
+
Transactions.Posts = Posts;
|
|
685
865
|
|
|
686
866
|
export declare namespace Transactions {
|
|
687
867
|
export {
|
|
688
868
|
type TransactionCreateTransactionResponse as TransactionCreateTransactionResponse,
|
|
689
869
|
type TransactionGetTransactionEntriesResponse as TransactionGetTransactionEntriesResponse,
|
|
870
|
+
type TransactionListBadgeUsersResponse as TransactionListBadgeUsersResponse,
|
|
690
871
|
type TransactionListRuleChainsResponse as TransactionListRuleChainsResponse,
|
|
872
|
+
type TransactionResetLoyaltyCurrencyResponse as TransactionResetLoyaltyCurrencyResponse,
|
|
691
873
|
type TransactionCreateTransactionParams as TransactionCreateTransactionParams,
|
|
692
874
|
type TransactionGetTransactionEntriesParams as TransactionGetTransactionEntriesParams,
|
|
875
|
+
type TransactionListBadgeUsersParams as TransactionListBadgeUsersParams,
|
|
693
876
|
type TransactionListRuleChainsParams as TransactionListRuleChainsParams,
|
|
877
|
+
type TransactionResetLoyaltyCurrencyParams as TransactionResetLoyaltyCurrencyParams,
|
|
694
878
|
};
|
|
695
879
|
|
|
696
880
|
export {
|
|
@@ -700,4 +884,12 @@ export declare namespace Transactions {
|
|
|
700
884
|
type RuleStatusUpdateParams as RuleStatusUpdateParams,
|
|
701
885
|
type RuleStatusListParams as RuleStatusListParams,
|
|
702
886
|
};
|
|
887
|
+
|
|
888
|
+
export {
|
|
889
|
+
Posts as Posts,
|
|
890
|
+
type PostListResponse as PostListResponse,
|
|
891
|
+
type PostRewardResponse as PostRewardResponse,
|
|
892
|
+
type PostListParams as PostListParams,
|
|
893
|
+
type PostRewardParams as PostRewardParams,
|
|
894
|
+
};
|
|
703
895
|
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as Core from '../../core';
|
|
5
|
+
|
|
6
|
+
export class Allowlist extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Fetch allowlist entries for a minting contract asset
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const allowlists = await client.minting.allowlist.list({
|
|
13
|
+
* mintingContractAssetId:
|
|
14
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
list(query: AllowlistListParams, options?: Core.RequestOptions): Core.APIPromise<AllowlistListResponse> {
|
|
19
|
+
return this._client.get('/api/minting/assets/allowlist', { query, ...options });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Create or update allowlist entries for a minting contract asset (max 25 entries
|
|
24
|
+
* per request). If an entry already exists, it will be updated with the new
|
|
25
|
+
* quantity.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const response = await client.minting.allowlist.upsert({
|
|
30
|
+
* entries: [
|
|
31
|
+
* { quantity: 1, walletAddress: 'walletAddress' },
|
|
32
|
+
* ],
|
|
33
|
+
* mintingContractAssetId:
|
|
34
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
upsert(
|
|
39
|
+
body: AllowlistUpsertParams,
|
|
40
|
+
options?: Core.RequestOptions,
|
|
41
|
+
): Core.APIPromise<AllowlistUpsertResponse> {
|
|
42
|
+
return this._client.post('/api/minting/assets/allowlist', { body, ...options });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Response schema for allowlist entries
|
|
48
|
+
*/
|
|
49
|
+
export interface AllowlistListResponse {
|
|
50
|
+
data: Array<AllowlistListResponse.Data>;
|
|
51
|
+
|
|
52
|
+
hasNextPage: boolean;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export namespace AllowlistListResponse {
|
|
56
|
+
export interface Data {
|
|
57
|
+
mintingContractAssetId: string;
|
|
58
|
+
|
|
59
|
+
quantityMinted: number;
|
|
60
|
+
|
|
61
|
+
totalQuantity: number;
|
|
62
|
+
|
|
63
|
+
walletAddress: string;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Response schema for allowlist mutations
|
|
69
|
+
*/
|
|
70
|
+
export interface AllowlistUpsertResponse {
|
|
71
|
+
createdCount: number;
|
|
72
|
+
|
|
73
|
+
mintingContractAssetId: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface AllowlistListParams {
|
|
77
|
+
mintingContractAssetId: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Number of items to return
|
|
81
|
+
*/
|
|
82
|
+
limit?: number;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Cursor for pagination (entry ID)
|
|
86
|
+
*/
|
|
87
|
+
startingAfter?: string;
|
|
88
|
+
|
|
89
|
+
walletAddress?: string;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface AllowlistUpsertParams {
|
|
93
|
+
/**
|
|
94
|
+
* Allowlist entries (max 25 per request)
|
|
95
|
+
*/
|
|
96
|
+
entries: Array<AllowlistUpsertParams.Entry>;
|
|
97
|
+
|
|
98
|
+
mintingContractAssetId: string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export namespace AllowlistUpsertParams {
|
|
102
|
+
export interface Entry {
|
|
103
|
+
quantity: number;
|
|
104
|
+
|
|
105
|
+
walletAddress: string;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export declare namespace Allowlist {
|
|
110
|
+
export {
|
|
111
|
+
type AllowlistListResponse as AllowlistListResponse,
|
|
112
|
+
type AllowlistUpsertResponse as AllowlistUpsertResponse,
|
|
113
|
+
type AllowlistListParams as AllowlistListParams,
|
|
114
|
+
type AllowlistUpsertParams as AllowlistUpsertParams,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as Core from '../../core';
|
|
5
|
+
|
|
6
|
+
export class Contracts extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Generates a signature for minting an asset on a given contract
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const response = await client.minting.contracts.mint({
|
|
13
|
+
* assetId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
14
|
+
* contractId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
mint(body: ContractMintParams, options?: Core.RequestOptions): Core.APIPromise<ContractMintResponse> {
|
|
19
|
+
return this._client.post('/api/minting/contracts/mint', { body, ...options });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Use the id returned here to fetch the status and signature of the mint from the
|
|
25
|
+
* `/api/minting/status/:id` endpoint
|
|
26
|
+
*/
|
|
27
|
+
export interface ContractMintResponse {
|
|
28
|
+
mintingContractAssetMintStatusId: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface ContractMintParams {
|
|
32
|
+
assetId: string;
|
|
33
|
+
|
|
34
|
+
contractId: string;
|
|
35
|
+
|
|
36
|
+
agreedToSendW9?: boolean | null;
|
|
37
|
+
|
|
38
|
+
customInputValue?: string | null;
|
|
39
|
+
|
|
40
|
+
emailAddress?: string;
|
|
41
|
+
|
|
42
|
+
quantity?: number;
|
|
43
|
+
|
|
44
|
+
shippingId?: string;
|
|
45
|
+
|
|
46
|
+
shippingOrderType?:
|
|
47
|
+
| 'stripe'
|
|
48
|
+
| 'shipstation'
|
|
49
|
+
| 'drip'
|
|
50
|
+
| 'twitter_bearer'
|
|
51
|
+
| 'epic_games'
|
|
52
|
+
| 'stardust'
|
|
53
|
+
| 'twitter_clientsecret'
|
|
54
|
+
| 'immutable_passport'
|
|
55
|
+
| 'sequence'
|
|
56
|
+
| 'google'
|
|
57
|
+
| 'walletConnect'
|
|
58
|
+
| 'auth0'
|
|
59
|
+
| 'privy'
|
|
60
|
+
| 'thirdweb'
|
|
61
|
+
| 'steam'
|
|
62
|
+
| 'discord'
|
|
63
|
+
| 'google_api'
|
|
64
|
+
| 'shopify'
|
|
65
|
+
| 'ultra'
|
|
66
|
+
| 'github';
|
|
67
|
+
|
|
68
|
+
walletAddress?: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export declare namespace Contracts {
|
|
72
|
+
export { type ContractMintResponse as ContractMintResponse, type ContractMintParams as ContractMintParams };
|
|
73
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Allowlist,
|
|
5
|
+
type AllowlistListResponse,
|
|
6
|
+
type AllowlistUpsertResponse,
|
|
7
|
+
type AllowlistListParams,
|
|
8
|
+
type AllowlistUpsertParams,
|
|
9
|
+
} from './allowlist';
|
|
10
|
+
export { Contracts, type ContractMintResponse, type ContractMintParams } from './contracts';
|
|
11
|
+
export {
|
|
12
|
+
Minting,
|
|
13
|
+
type MintingGetAssetsResponse,
|
|
14
|
+
type MintingGetTokenGateStatusResponse,
|
|
15
|
+
type MintingGetAssetsParams,
|
|
16
|
+
type MintingGetTokenGateStatusParams,
|
|
17
|
+
} from './minting';
|
|
18
|
+
export {
|
|
19
|
+
Status,
|
|
20
|
+
type StatusRetrieveResponse,
|
|
21
|
+
type StatusUpdateResponse,
|
|
22
|
+
type StatusUpdateParams,
|
|
23
|
+
} from './status';
|