@snagsolutions/sdk 0.1.0-alpha.215 → 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.
Files changed (101) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/index.d.mts +5 -2
  3. package/index.d.ts +5 -2
  4. package/index.d.ts.map +1 -1
  5. package/index.js +4 -1
  6. package/index.js.map +1 -1
  7. package/index.mjs +4 -1
  8. package/index.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/index.d.ts +2 -1
  11. package/resources/index.d.ts.map +1 -1
  12. package/resources/index.js +4 -2
  13. package/resources/index.js.map +1 -1
  14. package/resources/index.mjs +2 -1
  15. package/resources/index.mjs.map +1 -1
  16. package/resources/loyalty/index.d.ts +1 -1
  17. package/resources/loyalty/index.d.ts.map +1 -1
  18. package/resources/loyalty/index.js.map +1 -1
  19. package/resources/loyalty/index.mjs.map +1 -1
  20. package/resources/loyalty/loyalty.d.ts +2 -2
  21. package/resources/loyalty/loyalty.d.ts.map +1 -1
  22. package/resources/loyalty/loyalty.js.map +1 -1
  23. package/resources/loyalty/loyalty.mjs.map +1 -1
  24. package/resources/loyalty/transactions/index.d.ts +2 -1
  25. package/resources/loyalty/transactions/index.d.ts.map +1 -1
  26. package/resources/loyalty/transactions/index.js +3 -1
  27. package/resources/loyalty/transactions/index.js.map +1 -1
  28. package/resources/loyalty/transactions/index.mjs +1 -0
  29. package/resources/loyalty/transactions/index.mjs.map +1 -1
  30. package/resources/loyalty/transactions/posts.d.ts +145 -0
  31. package/resources/loyalty/transactions/posts.d.ts.map +1 -0
  32. package/resources/loyalty/transactions/posts.js +32 -0
  33. package/resources/loyalty/transactions/posts.js.map +1 -0
  34. package/resources/loyalty/transactions/posts.mjs +28 -0
  35. package/resources/loyalty/transactions/posts.mjs.map +1 -0
  36. package/resources/loyalty/transactions/transactions.d.ts +143 -1
  37. package/resources/loyalty/transactions/transactions.d.ts.map +1 -1
  38. package/resources/loyalty/transactions/transactions.js +34 -0
  39. package/resources/loyalty/transactions/transactions.js.map +1 -1
  40. package/resources/loyalty/transactions/transactions.mjs +34 -0
  41. package/resources/loyalty/transactions/transactions.mjs.map +1 -1
  42. package/resources/minting/allowlist.d.ts +84 -0
  43. package/resources/minting/allowlist.d.ts.map +1 -0
  44. package/resources/minting/allowlist.js +42 -0
  45. package/resources/minting/allowlist.js.map +1 -0
  46. package/resources/minting/allowlist.mjs +38 -0
  47. package/resources/minting/allowlist.mjs.map +1 -0
  48. package/resources/minting/contracts.d.ts +38 -0
  49. package/resources/minting/contracts.d.ts.map +1 -0
  50. package/resources/minting/contracts.js +23 -0
  51. package/resources/minting/contracts.js.map +1 -0
  52. package/resources/minting/contracts.mjs +19 -0
  53. package/resources/minting/contracts.mjs.map +1 -0
  54. package/resources/minting/index.d.ts +5 -0
  55. package/resources/minting/index.d.ts.map +1 -0
  56. package/resources/minting/index.js +13 -0
  57. package/resources/minting/index.js.map +1 -0
  58. package/resources/minting/index.mjs +6 -0
  59. package/resources/minting/index.mjs.map +1 -0
  60. package/resources/minting/minting.d.ts +142 -0
  61. package/resources/minting/minting.d.ts.map +1 -0
  62. package/resources/minting/minting.js +79 -0
  63. package/resources/minting/minting.js.map +1 -0
  64. package/resources/minting/minting.mjs +52 -0
  65. package/resources/minting/minting.mjs.map +1 -0
  66. package/resources/minting/status.d.ts +44 -0
  67. package/resources/minting/status.d.ts.map +1 -0
  68. package/resources/minting/status.js +33 -0
  69. package/resources/minting/status.js.map +1 -0
  70. package/resources/minting/status.mjs +29 -0
  71. package/resources/minting/status.mjs.map +1 -0
  72. package/resources/minting.d.ts +1 -94
  73. package/resources/minting.d.ts.map +1 -1
  74. package/resources/minting.js +15 -11
  75. package/resources/minting.js.map +1 -1
  76. package/resources/minting.mjs +1 -9
  77. package/resources/minting.mjs.map +1 -1
  78. package/resources/token-claims.d.ts +160 -0
  79. package/resources/token-claims.d.ts.map +1 -0
  80. package/resources/token-claims.js +46 -0
  81. package/resources/token-claims.js.map +1 -0
  82. package/resources/token-claims.mjs +42 -0
  83. package/resources/token-claims.mjs.map +1 -0
  84. package/src/index.ts +42 -1
  85. package/src/resources/index.ts +22 -1
  86. package/src/resources/loyalty/index.ts +4 -0
  87. package/src/resources/loyalty/loyalty.ts +8 -0
  88. package/src/resources/loyalty/transactions/index.ts +11 -0
  89. package/src/resources/loyalty/transactions/posts.ts +221 -0
  90. package/src/resources/loyalty/transactions/transactions.ts +194 -0
  91. package/src/resources/minting/allowlist.ts +116 -0
  92. package/src/resources/minting/contracts.ts +73 -0
  93. package/src/resources/minting/index.ts +23 -0
  94. package/src/resources/minting/minting.ts +269 -0
  95. package/src/resources/minting/status.ts +70 -0
  96. package/src/resources/minting.ts +1 -176
  97. package/src/resources/token-claims.ts +307 -0
  98. package/src/version.ts +1 -1
  99. package/version.d.ts +1 -1
  100. package/version.js +1 -1
  101. package/version.mjs +1 -1
@@ -0,0 +1,307 @@
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 TokenClaims extends APIResource {
8
+ /**
9
+ * Get a token claim by id
10
+ */
11
+ retrieve(
12
+ pathId: string,
13
+ query: TokenClaimRetrieveParams,
14
+ options?: Core.RequestOptions,
15
+ ): Core.APIPromise<TokenClaimRetrieveResponse> {
16
+ return this._client.get(`/api/token_claims/${pathId}`, { query, ...options });
17
+ }
18
+
19
+ /**
20
+ * Get all available token claims for a given website and organization
21
+ */
22
+ list(query?: TokenClaimListParams, options?: Core.RequestOptions): Core.APIPromise<TokenClaimListResponse>;
23
+ list(options?: Core.RequestOptions): Core.APIPromise<TokenClaimListResponse>;
24
+ list(
25
+ query: TokenClaimListParams | Core.RequestOptions = {},
26
+ options?: Core.RequestOptions,
27
+ ): Core.APIPromise<TokenClaimListResponse> {
28
+ if (isRequestOptions(query)) {
29
+ return this.list({}, query);
30
+ }
31
+ return this._client.get('/api/token_claims', { query, ...options });
32
+ }
33
+
34
+ /**
35
+ * Check if a wallet address is eligible for a token claim
36
+ */
37
+ checkEligibility(
38
+ pathId: string,
39
+ query: TokenClaimCheckEligibilityParams,
40
+ options?: Core.RequestOptions,
41
+ ): Core.APIPromise<TokenClaimCheckEligibilityResponse> {
42
+ return this._client.get(`/api/token_claims/${pathId}/eligibility`, { query, ...options });
43
+ }
44
+
45
+ /**
46
+ * Get a token claim proof for a given wallet address
47
+ */
48
+ getProof(
49
+ pathId: string,
50
+ query: TokenClaimGetProofParams,
51
+ options?: Core.RequestOptions,
52
+ ): Core.APIPromise<TokenClaimGetProofResponse> {
53
+ return this._client.get(`/api/token_claims/${pathId}/proof`, { query, ...options });
54
+ }
55
+
56
+ /**
57
+ * Get all users part of a token claim
58
+ */
59
+ listUsers(
60
+ id: string,
61
+ query?: TokenClaimListUsersParams,
62
+ options?: Core.RequestOptions,
63
+ ): Core.APIPromise<TokenClaimListUsersResponse>;
64
+ listUsers(id: string, options?: Core.RequestOptions): Core.APIPromise<TokenClaimListUsersResponse>;
65
+ listUsers(
66
+ id: string,
67
+ query: TokenClaimListUsersParams | Core.RequestOptions = {},
68
+ options?: Core.RequestOptions,
69
+ ): Core.APIPromise<TokenClaimListUsersResponse> {
70
+ if (isRequestOptions(query)) {
71
+ return this.listUsers(id, {}, query);
72
+ }
73
+ return this._client.get(`/api/token_claims/${id}/users`, { query, ...options });
74
+ }
75
+
76
+ /**
77
+ * Update a user claim status after a user has claimed
78
+ */
79
+ updateClaim(
80
+ id: string,
81
+ body: TokenClaimUpdateClaimParams,
82
+ options?: Core.RequestOptions,
83
+ ): Core.APIPromise<TokenClaimUpdateClaimResponse> {
84
+ return this._client.post(`/api/token_claims/${id}/claim`, { body, ...options });
85
+ }
86
+ }
87
+
88
+ export interface TokenClaimRetrieveResponse {
89
+ tokenClaimId: string;
90
+
91
+ totalAllocation: number;
92
+
93
+ walletAddress: string;
94
+
95
+ proof?: unknown;
96
+ }
97
+
98
+ export interface TokenClaimListResponse {
99
+ data: Array<TokenClaimListResponse.Data>;
100
+ }
101
+
102
+ export namespace TokenClaimListResponse {
103
+ export interface Data {
104
+ id: string;
105
+
106
+ claimContractAddress: string | null;
107
+
108
+ contract: Data.Contract;
109
+
110
+ csvUrl: string | null;
111
+
112
+ dataJobId: string | null;
113
+
114
+ endTime: string | null;
115
+
116
+ geoBlock: Array<string>;
117
+
118
+ isDraft: boolean;
119
+
120
+ name: string;
121
+
122
+ relayerId: string | null;
123
+
124
+ stakingContractAddress: string | null;
125
+
126
+ startTime: string | null;
127
+
128
+ totalAllocatedAmount: number;
129
+
130
+ totalClaimedAmount: number;
131
+
132
+ totalWalletsAllocated: number;
133
+
134
+ updatedAt: string;
135
+
136
+ claimAndStake?: boolean;
137
+
138
+ isStakingOptional?: boolean;
139
+
140
+ maxBonus?: number;
141
+
142
+ minLockup?: number;
143
+
144
+ minLockupForMultiplier?: number;
145
+
146
+ multiplier?: number;
147
+
148
+ stakingContractType?: 'linear' | 'timelock' | null;
149
+ }
150
+
151
+ export namespace Data {
152
+ export interface Contract {
153
+ id: string;
154
+
155
+ address: string;
156
+
157
+ chainId: number;
158
+
159
+ name: string | null;
160
+ }
161
+ }
162
+ }
163
+
164
+ export interface TokenClaimCheckEligibilityResponse {
165
+ alreadyClaimed: boolean;
166
+
167
+ amount: number;
168
+
169
+ claimContractAddress: string | null;
170
+
171
+ claimedAt: string | null;
172
+
173
+ eligible: boolean;
174
+
175
+ stakes: Array<TokenClaimCheckEligibilityResponse.Stake>;
176
+
177
+ tokenClaimId: string;
178
+ }
179
+
180
+ export namespace TokenClaimCheckEligibilityResponse {
181
+ export interface Stake {
182
+ amount: string;
183
+
184
+ claimable: string;
185
+
186
+ claimed: string;
187
+
188
+ duration: number;
189
+
190
+ stakeId: string;
191
+
192
+ startTime: string;
193
+ }
194
+ }
195
+
196
+ export interface TokenClaimGetProofResponse {
197
+ tokenClaimId: string;
198
+
199
+ totalAllocation: number;
200
+
201
+ walletAddress: string;
202
+
203
+ proof?: unknown;
204
+ }
205
+
206
+ export interface TokenClaimListUsersResponse {
207
+ data: Array<TokenClaimListUsersResponse.Data>;
208
+
209
+ hasNextPage: boolean;
210
+ }
211
+
212
+ export namespace TokenClaimListUsersResponse {
213
+ export interface Data {
214
+ id: string;
215
+
216
+ amount: number;
217
+
218
+ claimedAt: string | null;
219
+
220
+ user: Data.User;
221
+ }
222
+
223
+ export namespace Data {
224
+ export interface User {
225
+ id: string;
226
+
227
+ walletAddress: string;
228
+ }
229
+ }
230
+ }
231
+
232
+ export interface TokenClaimUpdateClaimResponse {
233
+ data: TokenClaimUpdateClaimResponse.Data;
234
+
235
+ message: string;
236
+ }
237
+
238
+ export namespace TokenClaimUpdateClaimResponse {
239
+ export interface Data {
240
+ claimedAt: string;
241
+
242
+ tokenClaimId: string;
243
+
244
+ totalAllocation: number;
245
+
246
+ walletAddress: string;
247
+ }
248
+ }
249
+
250
+ export interface TokenClaimRetrieveParams {
251
+ query_id: string;
252
+ }
253
+
254
+ export interface TokenClaimListParams {
255
+ contractId?: string;
256
+
257
+ organizationId?: string;
258
+
259
+ websiteId?: string;
260
+ }
261
+
262
+ export interface TokenClaimCheckEligibilityParams {
263
+ query_id: string;
264
+
265
+ walletAddress: string;
266
+ }
267
+
268
+ export interface TokenClaimGetProofParams {
269
+ query_id: string;
270
+
271
+ walletAddress: string;
272
+ }
273
+
274
+ export interface TokenClaimListUsersParams {
275
+ limit?: number;
276
+
277
+ sortBy?: 'claimedAt' | 'amount';
278
+
279
+ sortOrder?: 'asc' | 'desc';
280
+
281
+ startingAfter?: string;
282
+
283
+ walletAddress?: string;
284
+ }
285
+
286
+ export interface TokenClaimUpdateClaimParams {
287
+ txHash: string;
288
+
289
+ walletAddress: string;
290
+ }
291
+
292
+ export declare namespace TokenClaims {
293
+ export {
294
+ type TokenClaimRetrieveResponse as TokenClaimRetrieveResponse,
295
+ type TokenClaimListResponse as TokenClaimListResponse,
296
+ type TokenClaimCheckEligibilityResponse as TokenClaimCheckEligibilityResponse,
297
+ type TokenClaimGetProofResponse as TokenClaimGetProofResponse,
298
+ type TokenClaimListUsersResponse as TokenClaimListUsersResponse,
299
+ type TokenClaimUpdateClaimResponse as TokenClaimUpdateClaimResponse,
300
+ type TokenClaimRetrieveParams as TokenClaimRetrieveParams,
301
+ type TokenClaimListParams as TokenClaimListParams,
302
+ type TokenClaimCheckEligibilityParams as TokenClaimCheckEligibilityParams,
303
+ type TokenClaimGetProofParams as TokenClaimGetProofParams,
304
+ type TokenClaimListUsersParams as TokenClaimListUsersParams,
305
+ type TokenClaimUpdateClaimParams as TokenClaimUpdateClaimParams,
306
+ };
307
+ }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0-alpha.215'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.216'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-alpha.215";
1
+ export declare const VERSION = "0.1.0-alpha.216";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.1.0-alpha.215'; // x-release-please-version
4
+ exports.VERSION = '0.1.0-alpha.216'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.1.0-alpha.215'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.216'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map