@snagsolutions/sdk 0.1.0-alpha.14 → 0.1.0-alpha.16

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 (352) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +19 -13
  3. package/_shims/index.d.ts +2 -0
  4. package/_shims/index.js +5 -1
  5. package/_shims/index.mjs +5 -1
  6. package/core.d.ts.map +1 -1
  7. package/core.js +4 -1
  8. package/core.js.map +1 -1
  9. package/core.mjs +5 -2
  10. package/core.mjs.map +1 -1
  11. package/index.d.mts +17 -11
  12. package/index.d.ts +17 -11
  13. package/index.d.ts.map +1 -1
  14. package/index.js +14 -8
  15. package/index.js.map +1 -1
  16. package/index.mjs +15 -9
  17. package/index.mjs.map +1 -1
  18. package/package.json +8 -29
  19. package/resources/assets.d.ts +50 -0
  20. package/resources/assets.d.ts.map +1 -0
  21. package/resources/assets.js +17 -0
  22. package/resources/assets.js.map +1 -0
  23. package/resources/assets.mjs +13 -0
  24. package/resources/assets.mjs.map +1 -0
  25. package/resources/auctions.d.ts +134 -0
  26. package/resources/auctions.d.ts.map +1 -0
  27. package/resources/{auction-bids.js → auctions.js} +12 -6
  28. package/resources/auctions.js.map +1 -0
  29. package/resources/{auction-bids.mjs → auctions.mjs} +10 -4
  30. package/resources/auctions.mjs.map +1 -0
  31. package/resources/auth.d.ts +40 -0
  32. package/resources/auth.d.ts.map +1 -0
  33. package/resources/auth.js +16 -0
  34. package/resources/auth.js.map +1 -0
  35. package/resources/auth.mjs +12 -0
  36. package/resources/auth.mjs.map +1 -0
  37. package/resources/index.d.ts +7 -5
  38. package/resources/index.d.ts.map +1 -1
  39. package/resources/index.js +11 -7
  40. package/resources/index.js.map +1 -1
  41. package/resources/index.mjs +7 -5
  42. package/resources/index.mjs.map +1 -1
  43. package/resources/loyalty/accounts.d.ts +190 -0
  44. package/resources/loyalty/accounts.d.ts.map +1 -1
  45. package/resources/loyalty/accounts.js +15 -0
  46. package/resources/loyalty/accounts.js.map +1 -1
  47. package/resources/loyalty/accounts.mjs +15 -0
  48. package/resources/loyalty/accounts.mjs.map +1 -1
  49. package/resources/loyalty/badges.d.ts +4 -0
  50. package/resources/loyalty/badges.d.ts.map +1 -1
  51. package/resources/loyalty/currencies.d.ts +6 -0
  52. package/resources/loyalty/currencies.d.ts.map +1 -1
  53. package/resources/loyalty/index.d.ts +8 -5
  54. package/resources/loyalty/index.d.ts.map +1 -1
  55. package/resources/loyalty/index.js +9 -3
  56. package/resources/loyalty/index.js.map +1 -1
  57. package/resources/loyalty/index.mjs +5 -2
  58. package/resources/loyalty/index.mjs.map +1 -1
  59. package/resources/loyalty/loyalty.d.ts +29 -17
  60. package/resources/loyalty/loyalty.d.ts.map +1 -1
  61. package/resources/loyalty/loyalty.js +24 -12
  62. package/resources/loyalty/loyalty.js.map +1 -1
  63. package/resources/loyalty/loyalty.mjs +25 -13
  64. package/resources/loyalty/loyalty.mjs.map +1 -1
  65. package/resources/loyalty/multipliers.d.ts +37 -6
  66. package/resources/loyalty/multipliers.d.ts.map +1 -1
  67. package/resources/loyalty/multipliers.js +7 -1
  68. package/resources/loyalty/multipliers.js.map +1 -1
  69. package/resources/loyalty/multipliers.mjs +7 -1
  70. package/resources/loyalty/multipliers.mjs.map +1 -1
  71. package/resources/loyalty/{transaction-entries/questions-responses.d.ts → questions-responses.d.ts} +2 -2
  72. package/resources/loyalty/questions-responses.d.ts.map +1 -0
  73. package/resources/loyalty/{transaction-entries/questions-responses.js → questions-responses.js} +2 -2
  74. package/resources/loyalty/questions-responses.js.map +1 -0
  75. package/resources/loyalty/{transaction-entries/questions-responses.mjs → questions-responses.mjs} +2 -2
  76. package/resources/loyalty/questions-responses.mjs.map +1 -0
  77. package/resources/loyalty/{transaction-entries/questions.d.ts → questions.d.ts} +2 -2
  78. package/resources/loyalty/questions.d.ts.map +1 -0
  79. package/resources/loyalty/{transaction-entries/questions.js → questions.js} +1 -1
  80. package/resources/loyalty/questions.js.map +1 -0
  81. package/resources/loyalty/{transaction-entries/questions.mjs → questions.mjs} +1 -1
  82. package/resources/loyalty/questions.mjs.map +1 -0
  83. package/resources/loyalty/rule-edits.d.ts +6 -6
  84. package/resources/loyalty/rule-edits.d.ts.map +1 -1
  85. package/resources/loyalty/rule-edits.js +1 -1
  86. package/resources/loyalty/rule-edits.js.map +1 -1
  87. package/resources/loyalty/rule-edits.mjs +1 -1
  88. package/resources/loyalty/rule-edits.mjs.map +1 -1
  89. package/resources/loyalty/rule-groups.d.ts +559 -0
  90. package/resources/loyalty/rule-groups.d.ts.map +1 -0
  91. package/resources/loyalty/rule-groups.js +16 -0
  92. package/resources/loyalty/rule-groups.js.map +1 -0
  93. package/resources/loyalty/rule-groups.mjs +12 -0
  94. package/resources/loyalty/rule-groups.mjs.map +1 -0
  95. package/resources/loyalty/rules.d.ts +144 -23
  96. package/resources/loyalty/rules.d.ts.map +1 -1
  97. package/resources/loyalty/rules.js +1 -1
  98. package/resources/loyalty/rules.js.map +1 -1
  99. package/resources/loyalty/rules.mjs +1 -1
  100. package/resources/loyalty/rules.mjs.map +1 -1
  101. package/resources/loyalty/transactions.d.ts +248 -0
  102. package/resources/loyalty/transactions.d.ts.map +1 -0
  103. package/resources/loyalty/transactions.js +22 -0
  104. package/resources/loyalty/transactions.js.map +1 -0
  105. package/resources/loyalty/transactions.mjs +18 -0
  106. package/resources/loyalty/transactions.mjs.map +1 -0
  107. package/resources/loyalty.d.ts +2 -0
  108. package/resources/loyalty.d.ts.map +1 -0
  109. package/resources/loyalty.js +19 -0
  110. package/resources/loyalty.js.map +1 -0
  111. package/resources/loyalty.mjs +3 -0
  112. package/resources/loyalty.mjs.map +1 -0
  113. package/resources/{assets/minting.d.ts → minting.d.ts} +10 -10
  114. package/resources/minting.d.ts.map +1 -0
  115. package/resources/{assets/minting.js → minting.js} +2 -2
  116. package/resources/minting.js.map +1 -0
  117. package/resources/{assets/minting.mjs → minting.mjs} +2 -2
  118. package/resources/minting.mjs.map +1 -0
  119. package/resources/referral/index.d.ts +3 -0
  120. package/resources/referral/index.d.ts.map +1 -0
  121. package/resources/referral/index.js.map +1 -0
  122. package/resources/{assets/referral → referral}/index.mjs +1 -1
  123. package/resources/referral/index.mjs.map +1 -0
  124. package/resources/referral/referral.d.ts +31 -0
  125. package/resources/referral/referral.d.ts.map +1 -0
  126. package/resources/{assets/referral → referral}/referral.js +4 -4
  127. package/resources/referral/referral.js.map +1 -0
  128. package/resources/{assets/referral → referral}/referral.mjs +5 -5
  129. package/resources/referral/referral.mjs.map +1 -0
  130. package/resources/{assets/referral → referral}/users.d.ts +11 -11
  131. package/resources/referral/users.d.ts.map +1 -0
  132. package/resources/{assets/referral → referral}/users.js +3 -3
  133. package/resources/referral/users.js.map +1 -0
  134. package/resources/{assets/referral → referral}/users.mjs +3 -3
  135. package/resources/referral/users.mjs.map +1 -0
  136. package/resources/referral.d.ts +2 -0
  137. package/resources/referral.d.ts.map +1 -0
  138. package/resources/referral.js +19 -0
  139. package/resources/referral.js.map +1 -0
  140. package/resources/referral.mjs +3 -0
  141. package/resources/referral.mjs.map +1 -0
  142. package/resources/users/index.d.ts +2 -3
  143. package/resources/users/index.d.ts.map +1 -1
  144. package/resources/users/index.js +1 -3
  145. package/resources/users/index.js.map +1 -1
  146. package/resources/users/index.mjs +1 -2
  147. package/resources/users/index.mjs.map +1 -1
  148. package/resources/users/metadatas.d.ts +17 -7
  149. package/resources/users/metadatas.d.ts.map +1 -1
  150. package/resources/users/metadatas.js +2 -2
  151. package/resources/users/metadatas.js.map +1 -1
  152. package/resources/users/metadatas.mjs +2 -2
  153. package/resources/users/metadatas.mjs.map +1 -1
  154. package/resources/users/users.d.ts +296 -6
  155. package/resources/users/users.d.ts.map +1 -1
  156. package/resources/users/users.js +25 -4
  157. package/resources/users/users.js.map +1 -1
  158. package/resources/users/users.mjs +25 -4
  159. package/resources/users/users.mjs.map +1 -1
  160. package/resources/users.d.ts +2 -0
  161. package/resources/users.d.ts.map +1 -0
  162. package/resources/users.js +19 -0
  163. package/resources/users.js.map +1 -0
  164. package/resources/users.mjs +3 -0
  165. package/resources/users.mjs.map +1 -0
  166. package/resources/websites/index.d.ts +4 -0
  167. package/resources/websites/index.d.ts.map +1 -0
  168. package/resources/websites/index.js +11 -0
  169. package/resources/websites/index.js.map +1 -0
  170. package/resources/{assets → websites}/index.mjs +1 -4
  171. package/resources/websites/index.mjs.map +1 -0
  172. package/resources/websites/website-collections.d.ts +73 -0
  173. package/resources/websites/website-collections.d.ts.map +1 -0
  174. package/resources/{assets → websites}/website-collections.js +2 -2
  175. package/resources/websites/website-collections.js.map +1 -0
  176. package/resources/{assets → websites}/website-collections.mjs +2 -2
  177. package/resources/websites/website-collections.mjs.map +1 -0
  178. package/resources/{assets → websites}/website-user-roles.d.ts +28 -28
  179. package/resources/websites/website-user-roles.d.ts.map +1 -0
  180. package/resources/{assets → websites}/website-user-roles.js +7 -7
  181. package/resources/websites/website-user-roles.js.map +1 -0
  182. package/resources/{assets → websites}/website-user-roles.mjs +7 -7
  183. package/resources/websites/website-user-roles.mjs.map +1 -0
  184. package/resources/websites/websites.d.ts +211 -0
  185. package/resources/websites/websites.d.ts.map +1 -0
  186. package/resources/{assets/assets.js → websites/websites.js} +14 -27
  187. package/resources/websites/websites.js.map +1 -0
  188. package/resources/websites/websites.mjs +29 -0
  189. package/resources/websites/websites.mjs.map +1 -0
  190. package/resources/websites.d.ts +1 -202
  191. package/resources/websites.d.ts.map +1 -1
  192. package/resources/websites.js +15 -18
  193. package/resources/websites.js.map +1 -1
  194. package/resources/websites.mjs +1 -16
  195. package/resources/websites.mjs.map +1 -1
  196. package/resources.d.ts +2 -0
  197. package/resources.d.ts.map +1 -0
  198. package/resources.js +18 -0
  199. package/resources.js.map +1 -0
  200. package/resources.mjs +2 -0
  201. package/resources.mjs.map +1 -0
  202. package/src/_shims/index.d.ts +2 -0
  203. package/src/_shims/index.js +5 -1
  204. package/src/_shims/index.mjs +5 -1
  205. package/src/core.ts +8 -3
  206. package/src/index.ts +66 -22
  207. package/src/resources/assets.ts +77 -0
  208. package/src/resources/auctions.ts +209 -0
  209. package/src/resources/auth.ts +69 -0
  210. package/src/resources/index.ts +21 -10
  211. package/src/resources/loyalty/accounts.ts +250 -1
  212. package/src/resources/loyalty/badges.ts +5 -0
  213. package/src/resources/loyalty/currencies.ts +6 -0
  214. package/src/resources/loyalty/index.ts +40 -14
  215. package/src/resources/loyalty/loyalty.ts +129 -69
  216. package/src/resources/loyalty/multipliers.ts +44 -8
  217. package/src/resources/loyalty/{transaction-entries/questions-responses.ts → questions-responses.ts} +3 -3
  218. package/src/resources/loyalty/{transaction-entries/questions.ts → questions.ts} +2 -2
  219. package/src/resources/loyalty/rule-edits.ts +7 -10
  220. package/src/resources/loyalty/rule-groups.ts +818 -0
  221. package/src/resources/loyalty/rules.ts +406 -192
  222. package/src/resources/loyalty/transactions.ts +332 -0
  223. package/src/resources/loyalty.ts +3 -0
  224. package/src/resources/{assets/minting.ts → minting.ts} +32 -27
  225. package/src/resources/referral/index.ts +10 -0
  226. package/src/resources/referral/referral.ts +70 -0
  227. package/src/resources/{assets/referral → referral}/users.ts +14 -20
  228. package/src/resources/referral.ts +3 -0
  229. package/src/resources/users/index.ts +13 -4
  230. package/src/resources/users/metadatas.ts +26 -15
  231. package/src/resources/users/users.ts +423 -9
  232. package/src/resources/users.ts +3 -0
  233. package/src/resources/websites/index.ts +22 -0
  234. package/src/resources/{assets → websites}/website-collections.ts +32 -30
  235. package/src/resources/{assets → websites}/website-user-roles.ts +40 -40
  236. package/src/resources/websites/websites.ts +299 -0
  237. package/src/resources/websites.ts +1 -257
  238. package/src/resources.ts +1 -0
  239. package/src/version.ts +1 -1
  240. package/version.d.ts +1 -1
  241. package/version.js +1 -1
  242. package/version.mjs +1 -1
  243. package/resources/assets/assets.d.ts +0 -153
  244. package/resources/assets/assets.d.ts.map +0 -1
  245. package/resources/assets/assets.js.map +0 -1
  246. package/resources/assets/assets.mjs +0 -42
  247. package/resources/assets/assets.mjs.map +0 -1
  248. package/resources/assets/index.d.ts +0 -7
  249. package/resources/assets/index.d.ts.map +0 -1
  250. package/resources/assets/index.js +0 -17
  251. package/resources/assets/index.js.map +0 -1
  252. package/resources/assets/index.mjs.map +0 -1
  253. package/resources/assets/minting.d.ts.map +0 -1
  254. package/resources/assets/minting.js.map +0 -1
  255. package/resources/assets/minting.mjs.map +0 -1
  256. package/resources/assets/referral/index.d.ts +0 -3
  257. package/resources/assets/referral/index.d.ts.map +0 -1
  258. package/resources/assets/referral/index.js.map +0 -1
  259. package/resources/assets/referral/index.mjs.map +0 -1
  260. package/resources/assets/referral/referral.d.ts +0 -30
  261. package/resources/assets/referral/referral.d.ts.map +0 -1
  262. package/resources/assets/referral/referral.js.map +0 -1
  263. package/resources/assets/referral/referral.mjs.map +0 -1
  264. package/resources/assets/referral/users.d.ts.map +0 -1
  265. package/resources/assets/referral/users.js.map +0 -1
  266. package/resources/assets/referral/users.mjs.map +0 -1
  267. package/resources/assets/users.d.ts +0 -285
  268. package/resources/assets/users.d.ts.map +0 -1
  269. package/resources/assets/users.js +0 -34
  270. package/resources/assets/users.js.map +0 -1
  271. package/resources/assets/users.mjs +0 -30
  272. package/resources/assets/users.mjs.map +0 -1
  273. package/resources/assets/website-collections.d.ts +0 -73
  274. package/resources/assets/website-collections.d.ts.map +0 -1
  275. package/resources/assets/website-collections.js.map +0 -1
  276. package/resources/assets/website-collections.mjs.map +0 -1
  277. package/resources/assets/website-user-roles.d.ts.map +0 -1
  278. package/resources/assets/website-user-roles.js.map +0 -1
  279. package/resources/assets/website-user-roles.mjs.map +0 -1
  280. package/resources/auction-bids.d.ts +0 -51
  281. package/resources/auction-bids.d.ts.map +0 -1
  282. package/resources/auction-bids.js.map +0 -1
  283. package/resources/auction-bids.mjs.map +0 -1
  284. package/resources/drip/drip.d.ts +0 -14
  285. package/resources/drip/drip.d.ts.map +0 -1
  286. package/resources/drip/drip.js +0 -43
  287. package/resources/drip/drip.js.map +0 -1
  288. package/resources/drip/drip.mjs +0 -16
  289. package/resources/drip/drip.mjs.map +0 -1
  290. package/resources/drip/index.d.ts +0 -4
  291. package/resources/drip/index.d.ts.map +0 -1
  292. package/resources/drip/index.js +0 -11
  293. package/resources/drip/index.js.map +0 -1
  294. package/resources/drip/index.mjs +0 -5
  295. package/resources/drip/index.mjs.map +0 -1
  296. package/resources/drip/quests.d.ts +0 -4
  297. package/resources/drip/quests.d.ts.map +0 -1
  298. package/resources/drip/quests.js +0 -9
  299. package/resources/drip/quests.js.map +0 -1
  300. package/resources/drip/quests.mjs +0 -5
  301. package/resources/drip/quests.mjs.map +0 -1
  302. package/resources/drip/status.d.ts +0 -4
  303. package/resources/drip/status.d.ts.map +0 -1
  304. package/resources/drip/status.js +0 -9
  305. package/resources/drip/status.js.map +0 -1
  306. package/resources/drip/status.mjs +0 -5
  307. package/resources/drip/status.mjs.map +0 -1
  308. package/resources/loyalty/transaction-entries/accounts.d.ts +0 -191
  309. package/resources/loyalty/transaction-entries/accounts.d.ts.map +0 -1
  310. package/resources/loyalty/transaction-entries/accounts.js +0 -24
  311. package/resources/loyalty/transaction-entries/accounts.js.map +0 -1
  312. package/resources/loyalty/transaction-entries/accounts.mjs +0 -20
  313. package/resources/loyalty/transaction-entries/accounts.mjs.map +0 -1
  314. package/resources/loyalty/transaction-entries/index.d.ts +0 -5
  315. package/resources/loyalty/transaction-entries/index.d.ts.map +0 -1
  316. package/resources/loyalty/transaction-entries/index.js +0 -13
  317. package/resources/loyalty/transaction-entries/index.js.map +0 -1
  318. package/resources/loyalty/transaction-entries/index.mjs +0 -6
  319. package/resources/loyalty/transaction-entries/index.mjs.map +0 -1
  320. package/resources/loyalty/transaction-entries/questions-responses.d.ts.map +0 -1
  321. package/resources/loyalty/transaction-entries/questions-responses.js.map +0 -1
  322. package/resources/loyalty/transaction-entries/questions-responses.mjs.map +0 -1
  323. package/resources/loyalty/transaction-entries/questions.d.ts.map +0 -1
  324. package/resources/loyalty/transaction-entries/questions.js.map +0 -1
  325. package/resources/loyalty/transaction-entries/questions.mjs.map +0 -1
  326. package/resources/loyalty/transaction-entries/transaction-entries.d.ts +0 -300
  327. package/resources/loyalty/transaction-entries/transaction-entries.d.ts.map +0 -1
  328. package/resources/loyalty/transaction-entries/transaction-entries.js +0 -66
  329. package/resources/loyalty/transaction-entries/transaction-entries.js.map +0 -1
  330. package/resources/loyalty/transaction-entries/transaction-entries.mjs +0 -39
  331. package/resources/loyalty/transaction-entries/transaction-entries.mjs.map +0 -1
  332. package/resources/users/wallets.d.ts +0 -4
  333. package/resources/users/wallets.d.ts.map +0 -1
  334. package/resources/users/wallets.js +0 -9
  335. package/resources/users/wallets.js.map +0 -1
  336. package/resources/users/wallets.mjs +0 -5
  337. package/resources/users/wallets.mjs.map +0 -1
  338. package/src/resources/assets/assets.ts +0 -294
  339. package/src/resources/assets/index.ts +0 -38
  340. package/src/resources/assets/referral/index.ts +0 -14
  341. package/src/resources/assets/referral/referral.ts +0 -74
  342. package/src/resources/assets/users.ts +0 -415
  343. package/src/resources/auction-bids.ts +0 -77
  344. package/src/resources/drip/drip.ts +0 -21
  345. package/src/resources/drip/index.ts +0 -5
  346. package/src/resources/drip/quests.ts +0 -5
  347. package/src/resources/drip/status.ts +0 -5
  348. package/src/resources/loyalty/transaction-entries/accounts.ts +0 -251
  349. package/src/resources/loyalty/transaction-entries/index.ts +0 -34
  350. package/src/resources/loyalty/transaction-entries/transaction-entries.ts +0 -525
  351. package/src/resources/users/wallets.ts +0 -5
  352. /package/resources/{assets/referral → referral}/index.js +0 -0
@@ -23,22 +23,22 @@ export class Metadatas extends APIResource {
23
23
  /**
24
24
  * This endpoint is used to get user metadata
25
25
  */
26
- retrieve(
27
- query?: MetadataRetrieveParams,
26
+ list(query?: MetadataListParams, options?: Core.RequestOptions): Core.APIPromise<MetadataListResponse>;
27
+ list(options?: Core.RequestOptions): Core.APIPromise<MetadataListResponse>;
28
+ list(
29
+ query: MetadataListParams | Core.RequestOptions = {},
28
30
  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> {
31
+ ): Core.APIPromise<MetadataListResponse> {
35
32
  if (isRequestOptions(query)) {
36
- return this.retrieve({}, query);
33
+ return this.list({}, query);
37
34
  }
38
35
  return this._client.get('/api/users/metadatas', { query, ...options });
39
36
  }
40
37
  }
41
38
 
39
+ /**
40
+ * Schema for a user metadata
41
+ */
42
42
  export interface MetadataCreateResponse {
43
43
  /**
44
44
  * Unique identifier for the user metadata
@@ -104,8 +104,8 @@ export namespace MetadataCreateResponse {
104
104
  /**
105
105
  * Response schema for fetching user metadata
106
106
  */
107
- export interface MetadataRetrieveResponse {
108
- data: Array<MetadataRetrieveResponse.Data>;
107
+ export interface MetadataListResponse {
108
+ data: Array<MetadataListResponse.Data>;
109
109
 
110
110
  /**
111
111
  * Indicates if there are more records available
@@ -113,7 +113,7 @@ export interface MetadataRetrieveResponse {
113
113
  hasNextPage: boolean;
114
114
  }
115
115
 
116
- export namespace MetadataRetrieveResponse {
116
+ export namespace MetadataListResponse {
117
117
  export interface Data {
118
118
  /**
119
119
  * Unique identifier for the user metadata
@@ -133,10 +133,14 @@ export interface MetadataCreateParams {
133
133
 
134
134
  epicAccountIdentifier?: string | null;
135
135
 
136
+ externalIdentifier?: string | null;
137
+
136
138
  isBlocked?: boolean;
137
139
 
138
140
  logoUrl?: string | null;
139
141
 
142
+ organizationId?: string;
143
+
140
144
  stardustProfileIdentifier?: string | null;
141
145
 
142
146
  stardustWalletIdentifier?: string | null;
@@ -158,9 +162,16 @@ export interface MetadataCreateParams {
158
162
  walletAddress?: string;
159
163
 
160
164
  walletGroupIdentifier?: string | null;
165
+
166
+ websiteId?: string;
161
167
  }
162
168
 
163
- export interface MetadataRetrieveParams {
169
+ export interface MetadataListParams {
170
+ /**
171
+ * External identifier for the user
172
+ */
173
+ externalIdentifier?: string | null;
174
+
164
175
  /**
165
176
  * Number of records to fetch
166
177
  */
@@ -195,8 +206,8 @@ export interface MetadataRetrieveParams {
195
206
  export declare namespace Metadatas {
196
207
  export {
197
208
  type MetadataCreateResponse as MetadataCreateResponse,
198
- type MetadataRetrieveResponse as MetadataRetrieveResponse,
209
+ type MetadataListResponse as MetadataListResponse,
199
210
  type MetadataCreateParams as MetadataCreateParams,
200
- type MetadataRetrieveParams as MetadataRetrieveParams,
211
+ type MetadataListParams as MetadataListParams,
201
212
  };
202
213
  }
@@ -1,33 +1,447 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../resource';
4
+ import { isRequestOptions } from '../../core';
5
+ import * as Core from '../../core';
4
6
  import * as MetadatasAPI from './metadatas';
5
7
  import {
6
8
  MetadataCreateParams,
7
9
  MetadataCreateResponse,
8
- MetadataRetrieveParams,
9
- MetadataRetrieveResponse,
10
+ MetadataListParams,
11
+ MetadataListResponse,
10
12
  Metadatas,
11
13
  } from './metadatas';
12
- import * as WalletsAPI from './wallets';
13
- import { Wallets } from './wallets';
14
14
 
15
15
  export class Users extends APIResource {
16
- wallets: WalletsAPI.Wallets = new WalletsAPI.Wallets(this._client);
17
16
  metadatas: MetadatasAPI.Metadatas = new MetadatasAPI.Metadatas(this._client);
17
+
18
+ /**
19
+ * This endpoint allows you to get users
20
+ */
21
+ list(query?: UserListParams, options?: Core.RequestOptions): Core.APIPromise<UserListResponse>;
22
+ list(options?: Core.RequestOptions): Core.APIPromise<UserListResponse>;
23
+ list(
24
+ query: UserListParams | Core.RequestOptions = {},
25
+ options?: Core.RequestOptions,
26
+ ): Core.APIPromise<UserListResponse> {
27
+ if (isRequestOptions(query)) {
28
+ return this.list({}, query);
29
+ }
30
+ return this._client.get('/api/users', { query, ...options });
31
+ }
32
+
33
+ /**
34
+ * This endpoint allows you to create a user
35
+ */
36
+ connect(body: UserConnectParams, options?: Core.RequestOptions): Core.APIPromise<UserConnectResponse> {
37
+ return this._client.post('/api/users/connect', { body, ...options });
38
+ }
39
+
40
+ /**
41
+ * This endpoint returns the total user count
42
+ */
43
+ count(query: UserCountParams, options?: Core.RequestOptions): Core.APIPromise<UserCountResponse> {
44
+ return this._client.get('/api/users/count', { query, ...options });
45
+ }
46
+
47
+ /**
48
+ * This endpoint allows you to disconnect a user from another user
49
+ */
50
+ disconnect(body: UserDisconnectParams, options?: Core.RequestOptions): Core.APIPromise<unknown> {
51
+ return this._client.post('/api/users/disconnect', { body, ...options });
52
+ }
53
+ }
54
+
55
+ export interface UserListResponse {
56
+ /**
57
+ * Schema for users response
58
+ */
59
+ data: Array<UserListResponse.Data>;
60
+ }
61
+
62
+ export namespace UserListResponse {
63
+ /**
64
+ * Schema for a user response
65
+ */
66
+ export interface Data {
67
+ id: string;
68
+
69
+ isSnagSuperAdmin: boolean;
70
+
71
+ walletAddress: string;
72
+
73
+ /**
74
+ * The followers of the user, only returned if includeFollow is true
75
+ */
76
+ _count?: Data._Count | null;
77
+
78
+ /**
79
+ * The delegations from the user, only returned if includeDelegation is true
80
+ */
81
+ delegationsFrom?: Array<Data.DelegationsFrom> | null;
82
+
83
+ /**
84
+ * The followers of the user, only returned if includeFollow is true and the user
85
+ * is querying their own user
86
+ */
87
+ followers?: Array<Data.Follower> | null;
88
+
89
+ /**
90
+ * Whether the user has notifications enabled, only returned if
91
+ * includeNotifications is true
92
+ */
93
+ notifications?: boolean;
94
+
95
+ privyUserId?: string | null;
96
+
97
+ stardustProfileId?: string | null;
98
+
99
+ temporaryLoyaltyUser?: boolean | null;
100
+
101
+ userMetadata?: Array<Data.UserMetadata> | null;
102
+ }
103
+
104
+ export namespace Data {
105
+ /**
106
+ * The followers of the user, only returned if includeFollow is true
107
+ */
108
+ export interface _Count {
109
+ select: _Count.Select;
110
+ }
111
+
112
+ export namespace _Count {
113
+ export interface Select {
114
+ followers: number;
115
+
116
+ follows: number;
117
+ }
118
+ }
119
+
120
+ export interface DelegationsFrom {
121
+ walletAddress: string;
122
+ }
123
+
124
+ export interface Follower {
125
+ userId: string;
126
+ }
127
+
128
+ export interface UserMetadata {
129
+ bio?: string | null;
130
+
131
+ discordUser?: string | null;
132
+
133
+ discordVerifiedAt?: string | null;
134
+
135
+ displayName?: string | null;
136
+
137
+ /**
138
+ * The email address of the user, only returned if the user is querying their own
139
+ * user
140
+ */
141
+ emailAddress?: string | null;
142
+
143
+ emailVerifiedAt?: string | null;
144
+
145
+ epicAccountIdentifier?: string | null;
146
+
147
+ epicUsername?: string | null;
148
+
149
+ instagramUser?: string | null;
150
+
151
+ instagramVerifiedAt?: string | null;
152
+
153
+ isBlocked?: boolean | null;
154
+
155
+ location?: string | null;
156
+
157
+ logoUrl?: string | null;
158
+
159
+ meta?: string | null;
160
+
161
+ portfolioUrl?: string | null;
162
+
163
+ steamUserId?: string | null;
164
+
165
+ steamUsername?: string | null;
166
+
167
+ telegramUserId?: string | null;
168
+
169
+ telegramUsername?: string | null;
170
+
171
+ telegramVerifiedAt?: string | null;
172
+
173
+ twitterUser?: string | null;
174
+
175
+ twitterUserFollowersCount?: number | null;
176
+
177
+ twitterVerifiedAt?: string | null;
178
+
179
+ userGroupId?: string | null;
180
+
181
+ walletGroupIdentifier?: string | null;
182
+ }
183
+ }
184
+ }
185
+
186
+ /**
187
+ * Schema for a connect users response
188
+ */
189
+ export interface UserConnectResponse {
190
+ /**
191
+ * The ID of the user
192
+ */
193
+ id: string;
194
+
195
+ /**
196
+ * Timestamp when the user was created
197
+ */
198
+ createdAt: string;
199
+
200
+ /**
201
+ * Timestamp when the user was last updated
202
+ */
203
+ updatedAt: string;
204
+
205
+ /**
206
+ * The wallet address of the user
207
+ */
208
+ walletAddress: string;
209
+ }
210
+
211
+ /**
212
+ * Schema for counting users response
213
+ */
214
+ export interface UserCountResponse {
215
+ /**
216
+ * Total count of users
217
+ */
218
+ totalCount: number;
219
+ }
220
+
221
+ export type UserDisconnectResponse = unknown;
222
+
223
+ export interface UserListParams {
224
+ /**
225
+ * The address of the user
226
+ */
227
+ address?: string;
228
+
229
+ /**
230
+ * Discord username of the user
231
+ */
232
+ discordUser?: string;
233
+
234
+ /**
235
+ * External identifier for the user
236
+ */
237
+ externalIdentifier?: string;
238
+
239
+ /**
240
+ * Whether to include delegations in the response
241
+ */
242
+ includeDelegation?: boolean | null;
243
+
244
+ /**
245
+ * Whether to include followers in the response
246
+ */
247
+ includeFollow?: boolean | null;
248
+
249
+ /**
250
+ * Number of users to return
251
+ */
252
+ limit?: number;
253
+
254
+ /**
255
+ * The ID of the organization
256
+ */
257
+ organizationId?: string;
258
+
259
+ /**
260
+ * Pagination cursor to start after a specific user ID
261
+ */
262
+ startingAfter?: string;
263
+
264
+ /**
265
+ * Steam ID of the user
266
+ */
267
+ steamUserId?: string;
268
+
269
+ /**
270
+ * Steam username of the user
271
+ */
272
+ steamUsername?: string;
273
+
274
+ /**
275
+ * Telegram ID of the user
276
+ */
277
+ telegramUserId?: string;
278
+
279
+ /**
280
+ * Telegram username of the user
281
+ */
282
+ telegramUsername?: string;
283
+
284
+ /**
285
+ * Twitter username of the user
286
+ */
287
+ twitterUser?: string;
288
+
289
+ /**
290
+ * External identifier for the user group controlled by you
291
+ */
292
+ userGroupExternalIdentifier?: string;
293
+
294
+ /**
295
+ * The ID of the user group
296
+ */
297
+ userGroupId?: string;
298
+
299
+ /**
300
+ * The ID of the user
301
+ */
302
+ userId?: string | Array<string>;
303
+
304
+ /**
305
+ * The wallet address of the user
306
+ */
307
+ walletAddress?: string;
308
+
309
+ /**
310
+ * The ID of the website
311
+ */
312
+ websiteId?: string;
313
+ }
314
+
315
+ export interface UserConnectParams {
316
+ /**
317
+ * The ID of the organization
318
+ */
319
+ organizationId: string;
320
+
321
+ /**
322
+ * The wallet address of the user
323
+ */
324
+ walletAddress: string;
325
+
326
+ walletType: 'evm' | 'solana' | 'imx' | 'sui' | 'ton';
327
+
328
+ /**
329
+ * The ID of the website
330
+ */
331
+ websiteId: string;
332
+
333
+ /**
334
+ * Whether to confirm the disconnect
335
+ */
336
+ confirmDisconnect?: boolean;
337
+
338
+ /**
339
+ * The ID of the user to whome this wallet is being connected
340
+ */
341
+ userId?: string;
342
+
343
+ /**
344
+ * The verification data of the user walletAddress
345
+ */
346
+ verificationData?: UserConnectParams.VerificationData;
347
+ }
348
+
349
+ export namespace UserConnectParams {
350
+ /**
351
+ * The verification data of the user walletAddress
352
+ */
353
+ export interface VerificationData {
354
+ accessToken?: string;
355
+
356
+ dynamicAuthToken?: string;
357
+
358
+ message?: string;
359
+
360
+ signature?: string;
361
+
362
+ tonVerification?: VerificationData.TonVerification;
363
+ }
364
+
365
+ export namespace VerificationData {
366
+ export interface TonVerification {
367
+ account: TonVerification.Account;
368
+
369
+ proof: TonVerification.Proof;
370
+ }
371
+
372
+ export namespace TonVerification {
373
+ export interface Account {
374
+ address: string;
375
+
376
+ chain: '-239' | '-3';
377
+
378
+ publicKey: string;
379
+
380
+ walletStateInit?: string;
381
+ }
382
+
383
+ export interface Proof {
384
+ domain: Proof.Domain;
385
+
386
+ payload: string;
387
+
388
+ signature: string;
389
+
390
+ timestamp: number;
391
+
392
+ state_init?: string;
393
+ }
394
+
395
+ export namespace Proof {
396
+ export interface Domain {
397
+ lengthBytes: number;
398
+
399
+ value: string;
400
+ }
401
+ }
402
+ }
403
+ }
404
+ }
405
+
406
+ export interface UserCountParams {
407
+ /**
408
+ * The ID of the organization
409
+ */
410
+ organizationId: string;
411
+
412
+ /**
413
+ * The ID of the website
414
+ */
415
+ websiteId: string;
416
+ }
417
+
418
+ export interface UserDisconnectParams {
419
+ organizationId: string;
420
+
421
+ userId: string;
422
+
423
+ websiteId: string;
18
424
  }
19
425
 
20
- Users.Wallets = Wallets;
21
426
  Users.Metadatas = Metadatas;
22
427
 
23
428
  export declare namespace Users {
24
- export { Wallets as Wallets };
429
+ export {
430
+ type UserListResponse as UserListResponse,
431
+ type UserConnectResponse as UserConnectResponse,
432
+ type UserCountResponse as UserCountResponse,
433
+ type UserDisconnectResponse as UserDisconnectResponse,
434
+ type UserListParams as UserListParams,
435
+ type UserConnectParams as UserConnectParams,
436
+ type UserCountParams as UserCountParams,
437
+ type UserDisconnectParams as UserDisconnectParams,
438
+ };
25
439
 
26
440
  export {
27
441
  Metadatas as Metadatas,
28
442
  type MetadataCreateResponse as MetadataCreateResponse,
29
- type MetadataRetrieveResponse as MetadataRetrieveResponse,
443
+ type MetadataListResponse as MetadataListResponse,
30
444
  type MetadataCreateParams as MetadataCreateParams,
31
- type MetadataRetrieveParams as MetadataRetrieveParams,
445
+ type MetadataListParams as MetadataListParams,
32
446
  };
33
447
  }
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './users/index';
@@ -0,0 +1,22 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export {
4
+ WebsiteCollections,
5
+ type WebsiteCollectionListResponse,
6
+ type WebsiteCollectionCreateParams,
7
+ type WebsiteCollectionListParams,
8
+ } from './website-collections';
9
+ export {
10
+ WebsiteUserRoles,
11
+ type WebsiteUserRoleListResponse,
12
+ type WebsiteUserRoleAssignResponse,
13
+ type WebsiteUserRoleListParams,
14
+ type WebsiteUserRoleAssignParams,
15
+ } from './website-user-roles';
16
+ export {
17
+ Websites,
18
+ type WebsiteCreateResponse,
19
+ type WebsiteListResponse,
20
+ type WebsiteCreateParams,
21
+ type WebsiteListParams,
22
+ } from './websites';
@@ -7,10 +7,7 @@ export class WebsiteCollections extends APIResource {
7
7
  /**
8
8
  * Creates a new collection under a website
9
9
  */
10
- createWebsiteCollection(
11
- body: WebsiteCollectionCreateWebsiteCollectionParams,
12
- options?: Core.RequestOptions,
13
- ): Core.APIPromise<void> {
10
+ create(body: WebsiteCollectionCreateParams, options?: Core.RequestOptions): Core.APIPromise<void> {
14
11
  return this._client.post('/api/website_collections', {
15
12
  body,
16
13
  ...options,
@@ -21,10 +18,10 @@ export class WebsiteCollections extends APIResource {
21
18
  /**
22
19
  * Retrieves collections for a specific website.
23
20
  */
24
- getWebsiteCollections(
25
- query: WebsiteCollectionGetWebsiteCollectionsParams,
21
+ list(
22
+ query: WebsiteCollectionListParams,
26
23
  options?: Core.RequestOptions,
27
- ): Core.APIPromise<WebsiteCollectionGetWebsiteCollectionsResponse> {
24
+ ): Core.APIPromise<WebsiteCollectionListResponse> {
28
25
  return this._client.get('/api/website_collections', { query, ...options });
29
26
  }
30
27
  }
@@ -32,11 +29,11 @@ export class WebsiteCollections extends APIResource {
32
29
  /**
33
30
  * Response schema for fetching website collections
34
31
  */
35
- export interface WebsiteCollectionGetWebsiteCollectionsResponse {
32
+ export interface WebsiteCollectionListResponse {
36
33
  /**
37
34
  * Array of websites
38
35
  */
39
- data: Array<WebsiteCollectionGetWebsiteCollectionsResponse.Data>;
36
+ data: Array<WebsiteCollectionListResponse.Data>;
40
37
 
41
38
  /**
42
39
  * Indicates if more pages are available
@@ -44,7 +41,7 @@ export interface WebsiteCollectionGetWebsiteCollectionsResponse {
44
41
  hasNextPage: boolean;
45
42
  }
46
43
 
47
- export namespace WebsiteCollectionGetWebsiteCollectionsResponse {
44
+ export namespace WebsiteCollectionListResponse {
48
45
  export interface Data {
49
46
  /**
50
47
  * Website Collection ID
@@ -53,41 +50,46 @@ export namespace WebsiteCollectionGetWebsiteCollectionsResponse {
53
50
  }
54
51
  }
55
52
 
56
- export interface WebsiteCollectionCreateWebsiteCollectionParams {
53
+ export interface WebsiteCollectionCreateParams {
57
54
  collectionAddress: string;
58
55
 
59
56
  name: string;
60
57
 
61
58
  network:
62
- | 'mainnet'
63
- | 'polygon'
64
- | 'polygon_mumbai'
65
- | 'optimism'
59
+ | 'apechain'
66
60
  | 'arbitrum'
67
- | 'binance'
68
- | 'bscTestnet'
69
61
  | 'avalanche'
70
62
  | 'avalancheFuji'
71
- | 'zksync'
72
- | 'fantom'
73
- | 'fantomTestnet'
74
63
  | 'base'
75
64
  | 'baseSepolia'
76
- | 'skaleNebula'
77
- | 'xai'
78
65
  | 'berachainArtio'
79
- | 'solana'
80
- | 'apechain'
81
- | 'flowMainnet'
66
+ | 'binance'
67
+ | 'bscTestnet'
82
68
  | 'campTestnet'
69
+ | 'fantom'
70
+ | 'fantomTestnet'
71
+ | 'flowMainnet'
72
+ | 'mainnet'
73
+ | 'optimism'
74
+ | 'polygon'
75
+ | 'polygon_mumbai'
76
+ | 'skaleNebula'
77
+ | 'solana'
78
+ | 'sophon'
83
79
  | 'sui'
80
+ | 'superseed'
81
+ | 'superseedSepolia'
84
82
  | 'vanar'
83
+ | 'xai'
84
+ | 'zksync'
85
85
  | 'sepolia'
86
86
  | 'optimism_sepolia'
87
87
  | 'arbitrumSepolia'
88
88
  | 'goerli'
89
89
  | 'optimism_goerli'
90
- | 'arbitrumGoerli';
90
+ | 'arbitrumGoerli'
91
+ | 'basecamp'
92
+ | 'abstract';
91
93
 
92
94
  organizationId: string;
93
95
 
@@ -116,7 +118,7 @@ export interface WebsiteCollectionCreateWebsiteCollectionParams {
116
118
  twitterUsername?: string;
117
119
  }
118
120
 
119
- export interface WebsiteCollectionGetWebsiteCollectionsParams {
121
+ export interface WebsiteCollectionListParams {
120
122
  /**
121
123
  * Filter by website ID
122
124
  */
@@ -140,8 +142,8 @@ export interface WebsiteCollectionGetWebsiteCollectionsParams {
140
142
 
141
143
  export declare namespace WebsiteCollections {
142
144
  export {
143
- type WebsiteCollectionGetWebsiteCollectionsResponse as WebsiteCollectionGetWebsiteCollectionsResponse,
144
- type WebsiteCollectionCreateWebsiteCollectionParams as WebsiteCollectionCreateWebsiteCollectionParams,
145
- type WebsiteCollectionGetWebsiteCollectionsParams as WebsiteCollectionGetWebsiteCollectionsParams,
145
+ type WebsiteCollectionListResponse as WebsiteCollectionListResponse,
146
+ type WebsiteCollectionCreateParams as WebsiteCollectionCreateParams,
147
+ type WebsiteCollectionListParams as WebsiteCollectionListParams,
146
148
  };
147
149
  }