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

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 (271) hide show
  1. package/CHANGELOG.md +1328 -0
  2. package/README.md +13 -23
  3. package/core.d.ts +19 -5
  4. package/core.d.ts.map +1 -1
  5. package/core.js +24 -17
  6. package/core.js.map +1 -1
  7. package/core.mjs +24 -17
  8. package/core.mjs.map +1 -1
  9. package/index.d.mts +9 -6
  10. package/index.d.ts +9 -6
  11. package/index.d.ts.map +1 -1
  12. package/index.js +8 -4
  13. package/index.js.map +1 -1
  14. package/index.mjs +9 -5
  15. package/index.mjs.map +1 -1
  16. package/package.json +4 -5
  17. package/resource.d.ts +1 -1
  18. package/resource.d.ts.map +1 -1
  19. package/resource.js.map +1 -1
  20. package/resource.mjs.map +1 -1
  21. package/resources/assets.d.ts +16 -2
  22. package/resources/assets.d.ts.map +1 -1
  23. package/resources/assets.js +8 -0
  24. package/resources/assets.js.map +1 -1
  25. package/resources/assets.mjs +8 -0
  26. package/resources/assets.mjs.map +1 -1
  27. package/resources/auctions/auctions.d.ts +285 -0
  28. package/resources/auctions/auctions.d.ts.map +1 -0
  29. package/resources/auctions/auctions.js +76 -0
  30. package/resources/auctions/auctions.js.map +1 -0
  31. package/resources/auctions/auctions.mjs +49 -0
  32. package/resources/auctions/auctions.mjs.map +1 -0
  33. package/resources/auctions/index.d.ts +3 -0
  34. package/resources/auctions/index.d.ts.map +1 -0
  35. package/resources/auctions/index.js +9 -0
  36. package/resources/auctions/index.js.map +1 -0
  37. package/resources/auctions/index.mjs +4 -0
  38. package/resources/auctions/index.mjs.map +1 -0
  39. package/resources/auctions/website-user-attributes/index.d.ts +3 -0
  40. package/resources/auctions/website-user-attributes/index.d.ts.map +1 -0
  41. package/resources/auctions/website-user-attributes/index.js +9 -0
  42. package/resources/auctions/website-user-attributes/index.js.map +1 -0
  43. package/resources/auctions/website-user-attributes/index.mjs +4 -0
  44. package/resources/auctions/website-user-attributes/index.mjs.map +1 -0
  45. package/resources/auctions/website-user-attributes/values.d.ts +76 -0
  46. package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
  47. package/resources/auctions/website-user-attributes/values.js +35 -0
  48. package/resources/auctions/website-user-attributes/values.js.map +1 -0
  49. package/resources/auctions/website-user-attributes/values.mjs +31 -0
  50. package/resources/auctions/website-user-attributes/values.mjs.map +1 -0
  51. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +92 -0
  52. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -0
  53. package/resources/auctions/website-user-attributes/website-user-attributes.js +69 -0
  54. package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -0
  55. package/resources/auctions/website-user-attributes/website-user-attributes.mjs +42 -0
  56. package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -0
  57. package/resources/auctions/website-user-attributes.d.ts +2 -0
  58. package/resources/auctions/website-user-attributes.d.ts.map +1 -0
  59. package/resources/auctions/website-user-attributes.js +19 -0
  60. package/resources/auctions/website-user-attributes.js.map +1 -0
  61. package/resources/auctions/website-user-attributes.mjs +3 -0
  62. package/resources/auctions/website-user-attributes.mjs.map +1 -0
  63. package/resources/auctions.d.ts +1 -133
  64. package/resources/auctions.d.ts.map +1 -1
  65. package/resources/auctions.js +15 -22
  66. package/resources/auctions.js.map +1 -1
  67. package/resources/auctions.mjs +1 -20
  68. package/resources/auctions.mjs.map +1 -1
  69. package/resources/auth.d.ts +11 -3
  70. package/resources/auth.d.ts.map +1 -1
  71. package/resources/auth.js.map +1 -1
  72. package/resources/auth.mjs.map +1 -1
  73. package/resources/index.d.ts +3 -3
  74. package/resources/index.d.ts.map +1 -1
  75. package/resources/index.js +1 -1
  76. package/resources/index.js.map +1 -1
  77. package/resources/index.mjs +2 -2
  78. package/resources/index.mjs.map +1 -1
  79. package/resources/loyalty/account-streaks.d.ts +81 -0
  80. package/resources/loyalty/account-streaks.d.ts.map +1 -0
  81. package/resources/loyalty/account-streaks.js +24 -0
  82. package/resources/loyalty/account-streaks.js.map +1 -0
  83. package/resources/loyalty/account-streaks.mjs +20 -0
  84. package/resources/loyalty/account-streaks.mjs.map +1 -0
  85. package/resources/loyalty/accounts.d.ts +58 -16
  86. package/resources/loyalty/accounts.d.ts.map +1 -1
  87. package/resources/loyalty/accounts.js +13 -0
  88. package/resources/loyalty/accounts.js.map +1 -1
  89. package/resources/loyalty/accounts.mjs +13 -0
  90. package/resources/loyalty/accounts.mjs.map +1 -1
  91. package/resources/loyalty/badges.d.ts +472 -22
  92. package/resources/loyalty/badges.d.ts.map +1 -1
  93. package/resources/loyalty/badges.js +19 -1
  94. package/resources/loyalty/badges.js.map +1 -1
  95. package/resources/loyalty/badges.mjs +19 -1
  96. package/resources/loyalty/badges.mjs.map +1 -1
  97. package/resources/loyalty/currencies.d.ts +19 -0
  98. package/resources/loyalty/currencies.d.ts.map +1 -1
  99. package/resources/loyalty/currencies.js +19 -0
  100. package/resources/loyalty/currencies.js.map +1 -1
  101. package/resources/loyalty/currencies.mjs +19 -0
  102. package/resources/loyalty/currencies.mjs.map +1 -1
  103. package/resources/loyalty/index.d.ts +4 -3
  104. package/resources/loyalty/index.d.ts.map +1 -1
  105. package/resources/loyalty/index.js +5 -3
  106. package/resources/loyalty/index.js.map +1 -1
  107. package/resources/loyalty/index.mjs +2 -1
  108. package/resources/loyalty/index.mjs.map +1 -1
  109. package/resources/loyalty/loyalty.d.ts +10 -6
  110. package/resources/loyalty/loyalty.d.ts.map +1 -1
  111. package/resources/loyalty/loyalty.js +6 -2
  112. package/resources/loyalty/loyalty.js.map +1 -1
  113. package/resources/loyalty/loyalty.mjs +7 -3
  114. package/resources/loyalty/loyalty.mjs.map +1 -1
  115. package/resources/loyalty/multipliers.d.ts +39 -2
  116. package/resources/loyalty/multipliers.d.ts.map +1 -1
  117. package/resources/loyalty/multipliers.js +23 -0
  118. package/resources/loyalty/multipliers.js.map +1 -1
  119. package/resources/loyalty/multipliers.mjs +23 -0
  120. package/resources/loyalty/multipliers.mjs.map +1 -1
  121. package/resources/loyalty/questions-responses.d.ts +39 -0
  122. package/resources/loyalty/questions-responses.d.ts.map +1 -1
  123. package/resources/loyalty/questions-responses.js +9 -0
  124. package/resources/loyalty/questions-responses.js.map +1 -1
  125. package/resources/loyalty/questions-responses.mjs +9 -0
  126. package/resources/loyalty/questions-responses.mjs.map +1 -1
  127. package/resources/loyalty/questions.d.ts +37 -2
  128. package/resources/loyalty/questions.d.ts.map +1 -1
  129. package/resources/loyalty/questions.js +31 -0
  130. package/resources/loyalty/questions.js.map +1 -1
  131. package/resources/loyalty/questions.mjs +31 -0
  132. package/resources/loyalty/questions.mjs.map +1 -1
  133. package/resources/loyalty/rule-edits.d.ts +2610 -4
  134. package/resources/loyalty/rule-edits.d.ts.map +1 -1
  135. package/resources/loyalty/rule-edits.js +14 -0
  136. package/resources/loyalty/rule-edits.js.map +1 -1
  137. package/resources/loyalty/rule-edits.mjs +14 -0
  138. package/resources/loyalty/rule-edits.mjs.map +1 -1
  139. package/resources/loyalty/rule-groups.d.ts +269 -58
  140. package/resources/loyalty/rule-groups.d.ts.map +1 -1
  141. package/resources/loyalty/rule-groups.js +36 -0
  142. package/resources/loyalty/rule-groups.js.map +1 -1
  143. package/resources/loyalty/rule-groups.mjs +36 -0
  144. package/resources/loyalty/rule-groups.mjs.map +1 -1
  145. package/resources/loyalty/rules.d.ts +1848 -265
  146. package/resources/loyalty/rules.d.ts.map +1 -1
  147. package/resources/loyalty/rules.js +40 -9
  148. package/resources/loyalty/rules.js.map +1 -1
  149. package/resources/loyalty/rules.mjs +40 -9
  150. package/resources/loyalty/rules.mjs.map +1 -1
  151. package/resources/loyalty/transactions/index.d.ts +3 -0
  152. package/resources/loyalty/transactions/index.d.ts.map +1 -0
  153. package/resources/loyalty/transactions/index.js +9 -0
  154. package/resources/loyalty/transactions/index.js.map +1 -0
  155. package/resources/loyalty/transactions/index.mjs +4 -0
  156. package/resources/loyalty/transactions/index.mjs.map +1 -0
  157. package/resources/loyalty/transactions/rule-statuses.d.ts +61 -0
  158. package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
  159. package/resources/loyalty/transactions/rule-statuses.js +23 -0
  160. package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
  161. package/resources/loyalty/transactions/rule-statuses.mjs +19 -0
  162. package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
  163. package/resources/loyalty/transactions/transactions.d.ts +292 -0
  164. package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
  165. package/resources/loyalty/transactions/transactions.js +61 -0
  166. package/resources/loyalty/transactions/transactions.js.map +1 -0
  167. package/resources/loyalty/transactions/transactions.mjs +34 -0
  168. package/resources/loyalty/transactions/transactions.mjs.map +1 -0
  169. package/resources/loyalty/transactions.d.ts +1 -247
  170. package/resources/loyalty/transactions.d.ts.map +1 -1
  171. package/resources/loyalty/transactions.js +15 -18
  172. package/resources/loyalty/transactions.js.map +1 -1
  173. package/resources/loyalty/transactions.mjs +1 -16
  174. package/resources/loyalty/transactions.mjs.map +1 -1
  175. package/resources/minting.d.ts +5 -5
  176. package/resources/minting.d.ts.map +1 -1
  177. package/resources/referral/referral.d.ts +11 -3
  178. package/resources/referral/referral.d.ts.map +1 -1
  179. package/resources/referral/referral.js +11 -5
  180. package/resources/referral/referral.js.map +1 -1
  181. package/resources/referral/referral.mjs +11 -5
  182. package/resources/referral/referral.mjs.map +1 -1
  183. package/resources/referral/users.d.ts +28 -1
  184. package/resources/referral/users.d.ts.map +1 -1
  185. package/resources/referral/users.js +14 -0
  186. package/resources/referral/users.js.map +1 -1
  187. package/resources/referral/users.mjs +14 -0
  188. package/resources/referral/users.mjs.map +1 -1
  189. package/resources/users/index.d.ts +1 -1
  190. package/resources/users/index.d.ts.map +1 -1
  191. package/resources/users/index.js.map +1 -1
  192. package/resources/users/index.mjs.map +1 -1
  193. package/resources/users/metadatas.d.ts +27 -0
  194. package/resources/users/metadatas.d.ts.map +1 -1
  195. package/resources/users/metadatas.js.map +1 -1
  196. package/resources/users/metadatas.mjs.map +1 -1
  197. package/resources/users/users.d.ts +144 -6
  198. package/resources/users/users.d.ts.map +1 -1
  199. package/resources/users/users.js +53 -1
  200. package/resources/users/users.js.map +1 -1
  201. package/resources/users/users.mjs +53 -1
  202. package/resources/users/users.mjs.map +1 -1
  203. package/resources/websites/index.d.ts +2 -2
  204. package/resources/websites/index.d.ts.map +1 -1
  205. package/resources/websites/index.js.map +1 -1
  206. package/resources/websites/index.mjs +2 -2
  207. package/resources/websites/index.mjs.map +1 -1
  208. package/resources/websites/website-collections.d.ts +0 -69
  209. package/resources/websites/website-collections.d.ts.map +1 -1
  210. package/resources/websites/website-collections.js +0 -16
  211. package/resources/websites/website-collections.js.map +1 -1
  212. package/resources/websites/website-collections.mjs +0 -16
  213. package/resources/websites/website-collections.mjs.map +1 -1
  214. package/resources/websites/website-user-roles.d.ts +23 -0
  215. package/resources/websites/website-user-roles.d.ts.map +1 -1
  216. package/resources/websites/website-user-roles.js +23 -0
  217. package/resources/websites/website-user-roles.js.map +1 -1
  218. package/resources/websites/website-user-roles.mjs +23 -0
  219. package/resources/websites/website-user-roles.mjs.map +1 -1
  220. package/resources/websites/websites.d.ts +8 -98
  221. package/resources/websites/websites.d.ts.map +1 -1
  222. package/resources/websites/websites.js +0 -6
  223. package/resources/websites/websites.js.map +1 -1
  224. package/resources/websites/websites.mjs +1 -7
  225. package/resources/websites/websites.mjs.map +1 -1
  226. package/src/core.ts +39 -16
  227. package/src/index.ts +30 -11
  228. package/src/resource.ts +1 -1
  229. package/src/resources/assets.ts +18 -2
  230. package/src/resources/auctions/auctions.ts +432 -0
  231. package/src/resources/auctions/index.ts +16 -0
  232. package/src/resources/auctions/website-user-attributes/index.ts +10 -0
  233. package/src/resources/auctions/website-user-attributes/values.ts +97 -0
  234. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +137 -0
  235. package/src/resources/auctions/website-user-attributes.ts +3 -0
  236. package/src/resources/auctions.ts +1 -207
  237. package/src/resources/auth.ts +14 -4
  238. package/src/resources/index.ts +12 -8
  239. package/src/resources/loyalty/account-streaks.ts +110 -0
  240. package/src/resources/loyalty/accounts.ts +63 -18
  241. package/src/resources/loyalty/badges.ts +567 -24
  242. package/src/resources/loyalty/currencies.ts +19 -0
  243. package/src/resources/loyalty/index.ts +12 -1
  244. package/src/resources/loyalty/loyalty.ts +33 -3
  245. package/src/resources/loyalty/multipliers.ts +43 -4
  246. package/src/resources/loyalty/questions-responses.ts +45 -0
  247. package/src/resources/loyalty/questions.ts +38 -2
  248. package/src/resources/loyalty/rule-edits.ts +3669 -51
  249. package/src/resources/loyalty/rule-groups.ts +444 -65
  250. package/src/resources/loyalty/rules.ts +2769 -326
  251. package/src/resources/loyalty/transactions/index.ts +10 -0
  252. package/src/resources/loyalty/transactions/rule-statuses.ts +87 -0
  253. package/src/resources/loyalty/transactions/transactions.ts +520 -0
  254. package/src/resources/loyalty/transactions.ts +1 -330
  255. package/src/resources/minting.ts +19 -5
  256. package/src/resources/referral/referral.ts +13 -11
  257. package/src/resources/referral/users.ts +33 -2
  258. package/src/resources/users/index.ts +4 -0
  259. package/src/resources/users/metadatas.ts +52 -0
  260. package/src/resources/users/users.ts +192 -5
  261. package/src/resources/websites/index.ts +2 -13
  262. package/src/resources/websites/website-collections.ts +1 -145
  263. package/src/resources/websites/website-user-roles.ts +23 -0
  264. package/src/resources/websites/websites.ts +8 -134
  265. package/src/version.ts +1 -1
  266. package/version.d.ts +1 -1
  267. package/version.d.ts.map +1 -1
  268. package/version.js +1 -1
  269. package/version.js.map +1 -1
  270. package/version.mjs +1 -1
  271. package/version.mjs.map +1 -1
@@ -17,6 +17,11 @@ export class Users extends APIResource {
17
17
 
18
18
  /**
19
19
  * This endpoint allows you to get users
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * const users = await client.users.list();
24
+ * ```
20
25
  */
21
26
  list(query?: UserListParams, options?: Core.RequestOptions): Core.APIPromise<UserListResponse>;
22
27
  list(options?: Core.RequestOptions): Core.APIPromise<UserListResponse>;
@@ -31,7 +36,18 @@ export class Users extends APIResource {
31
36
  }
32
37
 
33
38
  /**
34
- * This endpoint allows you to create a user
39
+ * This endpoint allows you to connect a user to a user group
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * const response = await client.users.connect({
44
+ * organizationId: '123e4567-e89b-12d3-a456-426614174001',
45
+ * walletAddress:
46
+ * '0x1234567890abcdef1234567890abcdef12345678',
47
+ * walletType: 'evm',
48
+ * websiteId: '123e4567-e89b-12d3-a456-426614174000',
49
+ * });
50
+ * ```
35
51
  */
36
52
  connect(body: UserConnectParams, options?: Core.RequestOptions): Core.APIPromise<UserConnectResponse> {
37
53
  return this._client.post('/api/users/connect', { body, ...options });
@@ -39,17 +55,66 @@ export class Users extends APIResource {
39
55
 
40
56
  /**
41
57
  * This endpoint returns the total user count
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * const response = await client.users.count({
62
+ * organizationId: '123e4567-e89b-12d3-a456-426614174001',
63
+ * websiteId: '123e4567-e89b-12d3-a456-426614174000',
64
+ * });
65
+ * ```
42
66
  */
43
67
  count(query: UserCountParams, options?: Core.RequestOptions): Core.APIPromise<UserCountResponse> {
44
68
  return this._client.get('/api/users/count', { query, ...options });
45
69
  }
46
70
 
47
71
  /**
48
- * This endpoint allows you to disconnect a user from another user
72
+ * This endpoint is used to create user devices for fraud tracking
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * const response = await client.users.createDevice({
77
+ * ipAddress: '123.456.789.012',
78
+ * });
79
+ * ```
49
80
  */
50
- disconnect(body: UserDisconnectParams, options?: Core.RequestOptions): Core.APIPromise<unknown> {
81
+ createDevice(
82
+ body: UserCreateDeviceParams,
83
+ options?: Core.RequestOptions,
84
+ ): Core.APIPromise<UserCreateDeviceResponse> {
85
+ return this._client.post('/api/users/devices', { body, ...options });
86
+ }
87
+
88
+ /**
89
+ * This endpoint allows you to disconnect a user from another user
90
+ *
91
+ * @example
92
+ * ```ts
93
+ * const response = await client.users.disconnect({
94
+ * organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
95
+ * userId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
96
+ * websiteId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
97
+ * });
98
+ * ```
99
+ */
100
+ disconnect(
101
+ body: UserDisconnectParams,
102
+ options?: Core.RequestOptions,
103
+ ): Core.APIPromise<UserDisconnectResponse> {
51
104
  return this._client.post('/api/users/disconnect', { body, ...options });
52
105
  }
106
+
107
+ /**
108
+ * @example
109
+ * ```ts
110
+ * const response = await client.users.verify({
111
+ * accountLinkData: 'accountLinkData',
112
+ * });
113
+ * ```
114
+ */
115
+ verify(body: UserVerifyParams, options?: Core.RequestOptions): Core.APIPromise<UserVerifyResponse> {
116
+ return this._client.post('/api/users/verify', { body, ...options });
117
+ }
53
118
  }
54
119
 
55
120
  export interface UserListResponse {
@@ -99,6 +164,8 @@ export namespace UserListResponse {
99
164
  temporaryLoyaltyUser?: boolean | null;
100
165
 
101
166
  userMetadata?: Array<Data.UserMetadata> | null;
167
+
168
+ websiteUserAttributes?: Array<Data.WebsiteUserAttribute> | null;
102
169
  }
103
170
 
104
171
  export namespace Data {
@@ -128,6 +195,8 @@ export namespace UserListResponse {
128
195
  export interface UserMetadata {
129
196
  bio?: string | null;
130
197
 
198
+ createdAt?: string | null;
199
+
131
200
  discordUser?: string | null;
132
201
 
133
202
  discordVerifiedAt?: string | null;
@@ -146,6 +215,12 @@ export namespace UserListResponse {
146
215
 
147
216
  epicUsername?: string | null;
148
217
 
218
+ externalLoyaltyScore?: string | null;
219
+
220
+ googleUser?: string | null;
221
+
222
+ googleUserId?: string | null;
223
+
149
224
  instagramUser?: string | null;
150
225
 
151
226
  instagramVerifiedAt?: string | null;
@@ -170,15 +245,43 @@ export namespace UserListResponse {
170
245
 
171
246
  telegramVerifiedAt?: string | null;
172
247
 
248
+ tiktokUser?: string | null;
249
+
250
+ tiktokUserId?: string | null;
251
+
173
252
  twitterUser?: string | null;
174
253
 
175
254
  twitterUserFollowersCount?: number | null;
176
255
 
177
256
  twitterVerifiedAt?: string | null;
178
257
 
258
+ updatedAt?: string | null;
259
+
179
260
  userGroupId?: string | null;
180
261
 
181
262
  walletGroupIdentifier?: string | null;
263
+
264
+ YTChannelId?: string | null;
265
+ }
266
+
267
+ export interface WebsiteUserAttribute {
268
+ id: string;
269
+
270
+ label: string;
271
+
272
+ websiteUserAttributeValues: Array<WebsiteUserAttribute.WebsiteUserAttributeValue>;
273
+ }
274
+
275
+ export namespace WebsiteUserAttribute {
276
+ export interface WebsiteUserAttributeValue {
277
+ id: string;
278
+
279
+ userId: string;
280
+
281
+ value: string;
282
+
283
+ websiteUserAttributeId: string;
284
+ }
182
285
  }
183
286
  }
184
287
  }
@@ -218,7 +321,56 @@ export interface UserCountResponse {
218
321
  totalCount: number;
219
322
  }
220
323
 
221
- export type UserDisconnectResponse = unknown;
324
+ /**
325
+ * Schema for a user device
326
+ */
327
+ export interface UserCreateDeviceResponse {
328
+ /**
329
+ * Unique identifier for the user device
330
+ */
331
+ id: string;
332
+
333
+ /**
334
+ * Timestamp when the wallet was created
335
+ */
336
+ createdAt: string;
337
+
338
+ /**
339
+ * IP address of the user device
340
+ */
341
+ ipAddress: string;
342
+
343
+ /**
344
+ * Unique identifier for the organization
345
+ */
346
+ organizationId: string;
347
+
348
+ /**
349
+ * Source of the user device
350
+ */
351
+ source: string;
352
+
353
+ /**
354
+ * Unique identifier for the website
355
+ */
356
+ websiteId: string;
357
+
358
+ /**
359
+ * Device identifier of the user device
360
+ */
361
+ deviceIdentifier?: string;
362
+ }
363
+
364
+ export interface UserDisconnectResponse {
365
+ /**
366
+ * The message of the disconnect user response
367
+ */
368
+ message: 'Success';
369
+ }
370
+
371
+ export interface UserVerifyResponse {
372
+ message: string;
373
+ }
222
374
 
223
375
  export interface UserListParams {
224
376
  /**
@@ -281,6 +433,11 @@ export interface UserListParams {
281
433
  */
282
434
  telegramUsername?: string;
283
435
 
436
+ /**
437
+ * TikTok username of the user
438
+ */
439
+ tiktokUser?: string;
440
+
284
441
  /**
285
442
  * Twitter username of the user
286
443
  */
@@ -323,7 +480,7 @@ export interface UserConnectParams {
323
480
  */
324
481
  walletAddress: string;
325
482
 
326
- walletType: 'evm' | 'solana' | 'imx' | 'sui' | 'ton';
483
+ walletType: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | 'agw';
327
484
 
328
485
  /**
329
486
  * The ID of the website
@@ -415,6 +572,22 @@ export interface UserCountParams {
415
572
  websiteId: string;
416
573
  }
417
574
 
575
+ export interface UserCreateDeviceParams {
576
+ /**
577
+ * IP address of the user device
578
+ */
579
+ ipAddress: string;
580
+
581
+ /**
582
+ * Device identifier of the user device
583
+ */
584
+ deviceIdentifier?: string;
585
+
586
+ userId?: string;
587
+
588
+ walletAddress?: string;
589
+ }
590
+
418
591
  export interface UserDisconnectParams {
419
592
  organizationId: string;
420
593
 
@@ -423,6 +596,16 @@ export interface UserDisconnectParams {
423
596
  websiteId: string;
424
597
  }
425
598
 
599
+ export interface UserVerifyParams {
600
+ accountLinkData: string;
601
+
602
+ organizationId?: string;
603
+
604
+ userId?: string;
605
+
606
+ websiteId?: string;
607
+ }
608
+
426
609
  Users.Metadatas = Metadatas;
427
610
 
428
611
  export declare namespace Users {
@@ -430,11 +613,15 @@ export declare namespace Users {
430
613
  type UserListResponse as UserListResponse,
431
614
  type UserConnectResponse as UserConnectResponse,
432
615
  type UserCountResponse as UserCountResponse,
616
+ type UserCreateDeviceResponse as UserCreateDeviceResponse,
433
617
  type UserDisconnectResponse as UserDisconnectResponse,
618
+ type UserVerifyResponse as UserVerifyResponse,
434
619
  type UserListParams as UserListParams,
435
620
  type UserConnectParams as UserConnectParams,
436
621
  type UserCountParams as UserCountParams,
622
+ type UserCreateDeviceParams as UserCreateDeviceParams,
437
623
  type UserDisconnectParams as UserDisconnectParams,
624
+ type UserVerifyParams as UserVerifyParams,
438
625
  };
439
626
 
440
627
  export {
@@ -1,11 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export {
4
- WebsiteCollections,
5
- type WebsiteCollectionListResponse,
6
- type WebsiteCollectionCreateParams,
7
- type WebsiteCollectionListParams,
8
- } from './website-collections';
3
+ export { WebsiteCollections } from './website-collections';
9
4
  export {
10
5
  WebsiteUserRoles,
11
6
  type WebsiteUserRoleListResponse,
@@ -13,10 +8,4 @@ export {
13
8
  type WebsiteUserRoleListParams,
14
9
  type WebsiteUserRoleAssignParams,
15
10
  } from './website-user-roles';
16
- export {
17
- Websites,
18
- type WebsiteCreateResponse,
19
- type WebsiteListResponse,
20
- type WebsiteCreateParams,
21
- type WebsiteListParams,
22
- } from './websites';
11
+ export { Websites, type WebsiteListResponse, type WebsiteListParams } from './websites';
@@ -1,149 +1,5 @@
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 * as Core from '../../core';
5
4
 
6
- export class WebsiteCollections extends APIResource {
7
- /**
8
- * Creates a new collection under a website
9
- */
10
- create(body: WebsiteCollectionCreateParams, options?: Core.RequestOptions): Core.APIPromise<void> {
11
- return this._client.post('/api/website_collections', {
12
- body,
13
- ...options,
14
- headers: { Accept: '*/*', ...options?.headers },
15
- });
16
- }
17
-
18
- /**
19
- * Retrieves collections for a specific website.
20
- */
21
- list(
22
- query: WebsiteCollectionListParams,
23
- options?: Core.RequestOptions,
24
- ): Core.APIPromise<WebsiteCollectionListResponse> {
25
- return this._client.get('/api/website_collections', { query, ...options });
26
- }
27
- }
28
-
29
- /**
30
- * Response schema for fetching website collections
31
- */
32
- export interface WebsiteCollectionListResponse {
33
- /**
34
- * Array of websites
35
- */
36
- data: Array<WebsiteCollectionListResponse.Data>;
37
-
38
- /**
39
- * Indicates if more pages are available
40
- */
41
- hasNextPage: boolean;
42
- }
43
-
44
- export namespace WebsiteCollectionListResponse {
45
- export interface Data {
46
- /**
47
- * Website Collection ID
48
- */
49
- id: string;
50
- }
51
- }
52
-
53
- export interface WebsiteCollectionCreateParams {
54
- collectionAddress: string;
55
-
56
- name: string;
57
-
58
- network:
59
- | 'apechain'
60
- | 'arbitrum'
61
- | 'avalanche'
62
- | 'avalancheFuji'
63
- | 'base'
64
- | 'baseSepolia'
65
- | 'berachainArtio'
66
- | 'binance'
67
- | 'bscTestnet'
68
- | 'campTestnet'
69
- | 'fantom'
70
- | 'fantomTestnet'
71
- | 'flowMainnet'
72
- | 'mainnet'
73
- | 'optimism'
74
- | 'polygon'
75
- | 'polygon_mumbai'
76
- | 'skaleNebula'
77
- | 'solana'
78
- | 'sophon'
79
- | 'sui'
80
- | 'superseed'
81
- | 'superseedSepolia'
82
- | 'vanar'
83
- | 'xai'
84
- | 'zksync'
85
- | 'sepolia'
86
- | 'optimism_sepolia'
87
- | 'arbitrumSepolia'
88
- | 'goerli'
89
- | 'optimism_goerli'
90
- | 'arbitrumGoerli'
91
- | 'basecamp'
92
- | 'abstract';
93
-
94
- organizationId: string;
95
-
96
- sortId: number;
97
-
98
- websiteId: string;
99
-
100
- discordUrl?: string;
101
-
102
- homeUrl?: string;
103
-
104
- imageUrl?: string | null;
105
-
106
- instagramUsername?: string;
107
-
108
- royaltyFee?: number | null;
109
-
110
- royaltyFeeAddress?: string | null;
111
-
112
- stakingAddress?: string;
113
-
114
- telegramUrl?: string;
115
-
116
- themeId?: string;
117
-
118
- twitterUsername?: string;
119
- }
120
-
121
- export interface WebsiteCollectionListParams {
122
- /**
123
- * Filter by website ID
124
- */
125
- websiteId: string;
126
-
127
- /**
128
- * Number of items to return
129
- */
130
- limit?: number;
131
-
132
- /**
133
- * Filter by organization ID
134
- */
135
- organizationId?: string;
136
-
137
- /**
138
- * Pagination cursor, start after this ID
139
- */
140
- startingAfter?: string;
141
- }
142
-
143
- export declare namespace WebsiteCollections {
144
- export {
145
- type WebsiteCollectionListResponse as WebsiteCollectionListResponse,
146
- type WebsiteCollectionCreateParams as WebsiteCollectionCreateParams,
147
- type WebsiteCollectionListParams as WebsiteCollectionListParams,
148
- };
149
- }
5
+ export class WebsiteCollections extends APIResource {}
@@ -7,6 +7,14 @@ export class WebsiteUserRoles extends APIResource {
7
7
  /**
8
8
  * Retrieves roles of users for a specific website. If userId is provided,
9
9
  * retrieves the role of that specific user for the website.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const websiteUserRoles =
14
+ * await client.websites.websiteUserRoles.list({
15
+ * websiteId: '123e4567-e89b-12d3-a456-426614174000',
16
+ * });
17
+ * ```
10
18
  */
11
19
  list(
12
20
  query: WebsiteUserRoleListParams,
@@ -17,6 +25,21 @@ export class WebsiteUserRoles extends APIResource {
17
25
 
18
26
  /**
19
27
  * Assign roles to users for a specific website
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const response =
32
+ * await client.websites.websiteUserRoles.assign({
33
+ * websiteId: '123e4567-e89b-12d3-a456-426614174000',
34
+ * websiteUserRoles: [
35
+ * {
36
+ * roleType: 'WEBSITE_SUPER_ADMIN',
37
+ * walletAddress:
38
+ * '0x1234567890abcdef1234567890abcdef12345678',
39
+ * },
40
+ * ],
41
+ * });
42
+ * ```
20
43
  */
21
44
  assign(
22
45
  body: WebsiteUserRoleAssignParams,
@@ -4,12 +4,7 @@ import { APIResource } from '../../resource';
4
4
  import { isRequestOptions } from '../../core';
5
5
  import * as Core from '../../core';
6
6
  import * as WebsiteCollectionsAPI from './website-collections';
7
- import {
8
- WebsiteCollectionCreateParams,
9
- WebsiteCollectionListParams,
10
- WebsiteCollectionListResponse,
11
- WebsiteCollections,
12
- } from './website-collections';
7
+ import { WebsiteCollections } from './website-collections';
13
8
  import * as WebsiteUserRolesAPI from './website-user-roles';
14
9
  import {
15
10
  WebsiteUserRoleAssignParams,
@@ -27,16 +22,14 @@ export class Websites extends APIResource {
27
22
  this._client,
28
23
  );
29
24
 
30
- /**
31
- * Creates a new website
32
- */
33
- create(body: WebsiteCreateParams, options?: Core.RequestOptions): Core.APIPromise<WebsiteCreateResponse> {
34
- return this._client.post('/api/websites', { body, ...options });
35
- }
36
-
37
25
  /**
38
26
  * Returns a list of websites. Includes optional query parameters for filtering and
39
27
  * pagination.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const websites = await client.websites.list();
32
+ * ```
40
33
  */
41
34
  list(query?: WebsiteListParams, options?: Core.RequestOptions): Core.APIPromise<WebsiteListResponse>;
42
35
  list(options?: Core.RequestOptions): Core.APIPromise<WebsiteListResponse>;
@@ -51,78 +44,6 @@ export class Websites extends APIResource {
51
44
  }
52
45
  }
53
46
 
54
- /**
55
- * Schema representing a website
56
- */
57
- export interface WebsiteCreateResponse {
58
- /**
59
- * Website ID
60
- */
61
- id: string;
62
-
63
- /**
64
- * Counts of related entities
65
- */
66
- _count: WebsiteCreateResponse._Count;
67
-
68
- /**
69
- * Collections associated with the website
70
- */
71
- collections: Array<WebsiteCreateResponse.Collection>;
72
-
73
- /**
74
- * Website name
75
- */
76
- name: string;
77
-
78
- /**
79
- * Date when terms were signed
80
- */
81
- termsSignedAt: string | null;
82
- }
83
-
84
- export namespace WebsiteCreateResponse {
85
- /**
86
- * Counts of related entities
87
- */
88
- export interface _Count {
89
- /**
90
- * Count of minting contract assets
91
- */
92
- mintingContractAssets: number;
93
- }
94
-
95
- /**
96
- * Schema representing a collection
97
- */
98
- export interface Collection {
99
- /**
100
- * Collection ID
101
- */
102
- id: string;
103
-
104
- /**
105
- * URL of the collection image
106
- */
107
- imageUrl: string | null;
108
-
109
- /**
110
- * Collection name
111
- */
112
- name: string;
113
-
114
- /**
115
- * Royalty fee percentage
116
- */
117
- royaltyFee: number;
118
-
119
- /**
120
- * Address to receive royalty fees
121
- */
122
- royaltyFeeAddress: string;
123
- }
124
- }
125
-
126
47
  /**
127
48
  * Response schema for fetching websites
128
49
  */
@@ -212,43 +133,6 @@ export namespace WebsiteListResponse {
212
133
  }
213
134
  }
214
135
 
215
- export interface WebsiteCreateParams {
216
- /**
217
- * Name of the website
218
- */
219
- name: string;
220
-
221
- /**
222
- * Discord URL of the website account
223
- */
224
- discordUrl?: string;
225
-
226
- /**
227
- * Home URL of the official website
228
- */
229
- homeUrl?: string;
230
-
231
- /**
232
- * Instagram username of the website account
233
- */
234
- instagramUsername?: string;
235
-
236
- /**
237
- * Organization ID for which this website is being created
238
- */
239
- organizationId?: string;
240
-
241
- /**
242
- * Telegram URL of the website account
243
- */
244
- telegramUrl?: string;
245
-
246
- /**
247
- * Twitter username of the website account
248
- */
249
- twitterUsername?: string;
250
- }
251
-
252
136
  export interface WebsiteListParams {
253
137
  /**
254
138
  * Number of items to return
@@ -275,19 +159,9 @@ Websites.WebsiteCollections = WebsiteCollections;
275
159
  Websites.WebsiteUserRoles = WebsiteUserRoles;
276
160
 
277
161
  export declare namespace Websites {
278
- export {
279
- type WebsiteCreateResponse as WebsiteCreateResponse,
280
- type WebsiteListResponse as WebsiteListResponse,
281
- type WebsiteCreateParams as WebsiteCreateParams,
282
- type WebsiteListParams as WebsiteListParams,
283
- };
162
+ export { type WebsiteListResponse as WebsiteListResponse, type WebsiteListParams as WebsiteListParams };
284
163
 
285
- export {
286
- WebsiteCollections as WebsiteCollections,
287
- type WebsiteCollectionListResponse as WebsiteCollectionListResponse,
288
- type WebsiteCollectionCreateParams as WebsiteCollectionCreateParams,
289
- type WebsiteCollectionListParams as WebsiteCollectionListParams,
290
- };
164
+ export { WebsiteCollections as WebsiteCollections };
291
165
 
292
166
  export {
293
167
  WebsiteUserRoles as WebsiteUserRoles,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0-alpha.16'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.160'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-alpha.16";
1
+ export declare const VERSION = "0.1.0-alpha.160";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,mBAAmB,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,oBAAoB,CAAC"}