@snagsolutions/sdk 0.1.0-alpha.15 → 0.1.0-alpha.17

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 (342) hide show
  1. package/CHANGELOG.md +31 -48
  2. package/README.md +12 -14
  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 +2 -0
  8. package/core.js.map +1 -1
  9. package/core.mjs +3 -1
  10. package/core.mjs.map +1 -1
  11. package/index.d.mts +27 -6
  12. package/index.d.ts +27 -6
  13. package/index.d.ts.map +1 -1
  14. package/index.js +29 -8
  15. package/index.js.map +1 -1
  16. package/index.mjs +29 -8
  17. package/index.mjs.map +1 -1
  18. package/package.json +1 -1
  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/auctions.js +26 -0
  28. package/resources/auctions.js.map +1 -0
  29. package/resources/auctions.mjs +22 -0
  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 +8 -1
  38. package/resources/index.d.ts.map +1 -1
  39. package/resources/index.js +17 -3
  40. package/resources/index.js.map +1 -1
  41. package/resources/index.mjs +8 -1
  42. package/resources/index.mjs.map +1 -1
  43. package/resources/{api/loyalty → loyalty}/accounts.d.ts +9 -10
  44. package/resources/loyalty/accounts.d.ts.map +1 -0
  45. package/resources/{api/loyalty → loyalty}/accounts.js +4 -4
  46. package/resources/loyalty/accounts.js.map +1 -0
  47. package/resources/{api/loyalty → loyalty}/accounts.mjs +4 -4
  48. package/resources/loyalty/accounts.mjs.map +1 -0
  49. package/resources/{api/loyalty → loyalty}/badges.d.ts +2 -2
  50. package/resources/loyalty/badges.d.ts.map +1 -0
  51. package/resources/{api/loyalty → loyalty}/badges.js +2 -2
  52. package/resources/loyalty/badges.js.map +1 -0
  53. package/resources/{api/loyalty → loyalty}/badges.mjs +2 -2
  54. package/resources/loyalty/badges.mjs.map +1 -0
  55. package/resources/{api/loyalty → loyalty}/currencies.d.ts +8 -2
  56. package/resources/loyalty/currencies.d.ts.map +1 -0
  57. package/resources/{api/loyalty → loyalty}/currencies.js +1 -1
  58. package/resources/loyalty/currencies.js.map +1 -0
  59. package/resources/{api/loyalty → loyalty}/currencies.mjs +1 -1
  60. package/resources/loyalty/currencies.mjs.map +1 -0
  61. package/resources/{api/loyalty → loyalty}/index.d.ts +5 -2
  62. package/resources/loyalty/index.d.ts.map +1 -0
  63. package/resources/{api/loyalty → loyalty}/index.js +7 -1
  64. package/resources/loyalty/index.js.map +1 -0
  65. package/resources/{api/loyalty → loyalty}/index.mjs +4 -1
  66. package/resources/loyalty/index.mjs.map +1 -0
  67. package/resources/loyalty/loyalty.d.ts +50 -0
  68. package/resources/loyalty/loyalty.d.ts.map +1 -0
  69. package/resources/{api/loyalty → loyalty}/loyalty.js +13 -20
  70. package/resources/loyalty/loyalty.js.map +1 -0
  71. package/resources/{api/loyalty → loyalty}/loyalty.mjs +13 -20
  72. package/resources/loyalty/loyalty.mjs.map +1 -0
  73. package/resources/{api/loyalty → loyalty}/multipliers.d.ts +26 -2
  74. package/resources/loyalty/multipliers.d.ts.map +1 -0
  75. package/resources/{api/loyalty → loyalty}/multipliers.js +2 -2
  76. package/resources/loyalty/multipliers.js.map +1 -0
  77. package/resources/{api/loyalty → loyalty}/multipliers.mjs +2 -2
  78. package/resources/loyalty/multipliers.mjs.map +1 -0
  79. package/resources/{api/loyalty → loyalty}/questions-responses.d.ts +2 -2
  80. package/resources/loyalty/questions-responses.d.ts.map +1 -0
  81. package/resources/{api/loyalty → loyalty}/questions-responses.js +2 -2
  82. package/resources/loyalty/questions-responses.js.map +1 -0
  83. package/resources/{api/loyalty → loyalty}/questions-responses.mjs +2 -2
  84. package/resources/loyalty/questions-responses.mjs.map +1 -0
  85. package/resources/{api/loyalty → loyalty}/questions.d.ts +2 -2
  86. package/resources/loyalty/questions.d.ts.map +1 -0
  87. package/resources/{api/loyalty → loyalty}/questions.js +1 -1
  88. package/resources/loyalty/questions.js.map +1 -0
  89. package/resources/{api/loyalty → loyalty}/questions.mjs +1 -1
  90. package/resources/loyalty/questions.mjs.map +1 -0
  91. package/resources/loyalty/rule-chains.d.ts +4 -0
  92. package/resources/loyalty/rule-chains.d.ts.map +1 -0
  93. package/resources/loyalty/rule-chains.js +9 -0
  94. package/resources/loyalty/rule-chains.js.map +1 -0
  95. package/resources/loyalty/rule-chains.mjs +5 -0
  96. package/resources/loyalty/rule-chains.mjs.map +1 -0
  97. package/resources/{api/loyalty → loyalty}/rule-edits.d.ts +2 -2
  98. package/resources/loyalty/rule-edits.d.ts.map +1 -0
  99. package/resources/{api/loyalty → loyalty}/rule-edits.js +1 -1
  100. package/resources/loyalty/rule-edits.js.map +1 -0
  101. package/resources/{api/loyalty → loyalty}/rule-edits.mjs +1 -1
  102. package/resources/loyalty/rule-edits.mjs.map +1 -0
  103. package/resources/{api/loyalty/loyalty.d.ts → loyalty/rule-groups.d.ts} +37 -285
  104. package/resources/loyalty/rule-groups.d.ts.map +1 -0
  105. package/resources/loyalty/rule-groups.js +16 -0
  106. package/resources/loyalty/rule-groups.js.map +1 -0
  107. package/resources/loyalty/rule-groups.mjs +12 -0
  108. package/resources/loyalty/rule-groups.mjs.map +1 -0
  109. package/resources/{api/loyalty → loyalty}/rules.d.ts +119 -14
  110. package/resources/loyalty/rules.d.ts.map +1 -0
  111. package/resources/{api/loyalty → loyalty}/rules.js +2 -2
  112. package/resources/loyalty/rules.js.map +1 -0
  113. package/resources/{api/loyalty → loyalty}/rules.mjs +2 -2
  114. package/resources/loyalty/rules.mjs.map +1 -0
  115. package/resources/loyalty/transactions.d.ts +248 -0
  116. package/resources/loyalty/transactions.d.ts.map +1 -0
  117. package/resources/loyalty/transactions.js +22 -0
  118. package/resources/loyalty/transactions.js.map +1 -0
  119. package/resources/loyalty/transactions.mjs +18 -0
  120. package/resources/loyalty/transactions.mjs.map +1 -0
  121. package/resources/loyalty.d.ts.map +1 -0
  122. package/resources/loyalty.js.map +1 -0
  123. package/resources/loyalty.mjs.map +1 -0
  124. package/resources/{api/minting.d.ts → minting.d.ts} +3 -3
  125. package/resources/minting.d.ts.map +1 -0
  126. package/resources/{api/minting.js → minting.js} +1 -1
  127. package/resources/minting.js.map +1 -0
  128. package/resources/{api/minting.mjs → minting.mjs} +1 -1
  129. package/resources/minting.mjs.map +1 -0
  130. package/resources/referral/index.d.ts.map +1 -0
  131. package/resources/referral/index.js.map +1 -0
  132. package/resources/referral/index.mjs.map +1 -0
  133. package/resources/{api/referral → referral}/referral.d.ts +2 -2
  134. package/resources/referral/referral.d.ts.map +1 -0
  135. package/resources/{api/referral → referral}/referral.js +2 -2
  136. package/resources/referral/referral.js.map +1 -0
  137. package/resources/{api/referral → referral}/referral.mjs +2 -2
  138. package/resources/referral/referral.mjs.map +1 -0
  139. package/resources/{api/referral → referral}/users.d.ts +2 -2
  140. package/resources/referral/users.d.ts.map +1 -0
  141. package/resources/{api/referral → referral}/users.js +1 -1
  142. package/resources/referral/users.js.map +1 -0
  143. package/resources/{api/referral → referral}/users.mjs +1 -1
  144. package/resources/referral/users.mjs.map +1 -0
  145. package/resources/referral.d.ts.map +1 -0
  146. package/resources/referral.js.map +1 -0
  147. package/resources/referral.mjs.map +1 -0
  148. package/resources/users/index.d.ts +3 -0
  149. package/resources/users/index.d.ts.map +1 -0
  150. package/resources/users/index.js.map +1 -0
  151. package/resources/users/index.mjs.map +1 -0
  152. package/resources/{api/users → users}/metadatas.d.ts +7 -2
  153. package/resources/users/metadatas.d.ts.map +1 -0
  154. package/resources/{api/users → users}/metadatas.js +2 -2
  155. package/resources/users/metadatas.js.map +1 -0
  156. package/resources/{api/users → users}/metadatas.mjs +2 -2
  157. package/resources/users/metadatas.mjs.map +1 -0
  158. package/resources/users/users.d.ts +304 -0
  159. package/resources/users/users.d.ts.map +1 -0
  160. package/resources/{api/users → users}/users.js +8 -1
  161. package/resources/users/users.js.map +1 -0
  162. package/resources/{api/users → users}/users.mjs +8 -1
  163. package/resources/users/users.mjs.map +1 -0
  164. package/resources/users.d.ts.map +1 -0
  165. package/resources/users.js.map +1 -0
  166. package/resources/users.mjs.map +1 -0
  167. package/resources/websites/index.d.ts +4 -0
  168. package/resources/websites/index.d.ts.map +1 -0
  169. package/resources/websites/index.js +11 -0
  170. package/resources/websites/index.js.map +1 -0
  171. package/resources/{api → websites}/index.mjs +0 -5
  172. package/resources/websites/index.mjs.map +1 -0
  173. package/resources/{api → websites}/website-collections.d.ts +1 -1
  174. package/resources/websites/website-collections.d.ts.map +1 -0
  175. package/resources/websites/website-collections.js.map +1 -0
  176. package/resources/websites/website-collections.mjs.map +1 -0
  177. package/resources/websites/website-user-roles.d.ts.map +1 -0
  178. package/resources/websites/website-user-roles.js.map +1 -0
  179. package/resources/websites/website-user-roles.mjs.map +1 -0
  180. package/resources/{api → websites}/websites.d.ts +8 -0
  181. package/resources/websites/websites.d.ts.map +1 -0
  182. package/resources/websites/websites.js +56 -0
  183. package/resources/websites/websites.js.map +1 -0
  184. package/resources/websites/websites.mjs +29 -0
  185. package/resources/websites/websites.mjs.map +1 -0
  186. package/resources/websites.d.ts +2 -0
  187. package/resources/websites.d.ts.map +1 -0
  188. package/resources/{api.js → websites.js} +2 -2
  189. package/resources/websites.js.map +1 -0
  190. package/resources/{api.mjs → websites.mjs} +2 -2
  191. package/resources/websites.mjs.map +1 -0
  192. package/src/_shims/index.d.ts +2 -0
  193. package/src/_shims/index.js +5 -1
  194. package/src/_shims/index.mjs +5 -1
  195. package/src/core.ts +6 -1
  196. package/src/index.ts +98 -23
  197. package/src/resources/assets.ts +77 -0
  198. package/src/resources/auctions.ts +209 -0
  199. package/src/resources/auth.ts +69 -0
  200. package/src/resources/index.ts +27 -8
  201. package/src/resources/{api/loyalty → loyalty}/accounts.ts +15 -17
  202. package/src/resources/{api/loyalty → loyalty}/badges.ts +3 -3
  203. package/src/resources/{api/loyalty → loyalty}/currencies.ts +8 -2
  204. package/src/resources/{api/loyalty → loyalty}/index.ts +16 -11
  205. package/src/resources/loyalty/loyalty.ts +231 -0
  206. package/src/resources/{api/loyalty → loyalty}/multipliers.ts +27 -3
  207. package/src/resources/{api/loyalty → loyalty}/questions-responses.ts +3 -3
  208. package/src/resources/{api/loyalty → loyalty}/questions.ts +2 -2
  209. package/src/resources/loyalty/rule-chains.ts +5 -0
  210. package/src/resources/{api/loyalty → loyalty}/rule-edits.ts +2 -2
  211. package/src/resources/{api/loyalty/loyalty.ts → loyalty/rule-groups.ts} +62 -541
  212. package/src/resources/{api/loyalty → loyalty}/rules.ts +326 -183
  213. package/src/resources/loyalty/transactions.ts +332 -0
  214. package/src/resources/{api/minting.ts → minting.ts} +18 -17
  215. package/src/resources/{api/referral → referral}/referral.ts +3 -3
  216. package/src/resources/{api/referral → referral}/users.ts +2 -2
  217. package/src/resources/{api/users → users}/index.ts +2 -0
  218. package/src/resources/{api/users → users}/metadatas.ts +10 -3
  219. package/src/resources/users/users.ts +447 -0
  220. package/src/resources/websites/index.ts +22 -0
  221. package/src/resources/{api → websites}/website-collections.ts +16 -15
  222. package/src/resources/{api → websites}/websites.ts +40 -0
  223. package/src/resources/{api.ts → websites.ts} +1 -1
  224. package/src/version.ts +1 -1
  225. package/version.d.ts +1 -1
  226. package/version.js +1 -1
  227. package/version.mjs +1 -1
  228. package/resources/api/api.d.ts +0 -365
  229. package/resources/api/api.d.ts.map +0 -1
  230. package/resources/api/api.js +0 -94
  231. package/resources/api/api.js.map +0 -1
  232. package/resources/api/api.mjs +0 -67
  233. package/resources/api/api.mjs.map +0 -1
  234. package/resources/api/index.d.ts +0 -9
  235. package/resources/api/index.d.ts.map +0 -1
  236. package/resources/api/index.js +0 -21
  237. package/resources/api/index.js.map +0 -1
  238. package/resources/api/index.mjs.map +0 -1
  239. package/resources/api/loyalty/accounts.d.ts.map +0 -1
  240. package/resources/api/loyalty/accounts.js.map +0 -1
  241. package/resources/api/loyalty/accounts.mjs.map +0 -1
  242. package/resources/api/loyalty/badges.d.ts.map +0 -1
  243. package/resources/api/loyalty/badges.js.map +0 -1
  244. package/resources/api/loyalty/badges.mjs.map +0 -1
  245. package/resources/api/loyalty/currencies.d.ts.map +0 -1
  246. package/resources/api/loyalty/currencies.js.map +0 -1
  247. package/resources/api/loyalty/currencies.mjs.map +0 -1
  248. package/resources/api/loyalty/index.d.ts.map +0 -1
  249. package/resources/api/loyalty/index.js.map +0 -1
  250. package/resources/api/loyalty/index.mjs.map +0 -1
  251. package/resources/api/loyalty/loyalty.d.ts.map +0 -1
  252. package/resources/api/loyalty/loyalty.js.map +0 -1
  253. package/resources/api/loyalty/loyalty.mjs.map +0 -1
  254. package/resources/api/loyalty/multipliers.d.ts.map +0 -1
  255. package/resources/api/loyalty/multipliers.js.map +0 -1
  256. package/resources/api/loyalty/multipliers.mjs.map +0 -1
  257. package/resources/api/loyalty/questions-responses.d.ts.map +0 -1
  258. package/resources/api/loyalty/questions-responses.js.map +0 -1
  259. package/resources/api/loyalty/questions-responses.mjs.map +0 -1
  260. package/resources/api/loyalty/questions.d.ts.map +0 -1
  261. package/resources/api/loyalty/questions.js.map +0 -1
  262. package/resources/api/loyalty/questions.mjs.map +0 -1
  263. package/resources/api/loyalty/rule-edits.d.ts.map +0 -1
  264. package/resources/api/loyalty/rule-edits.js.map +0 -1
  265. package/resources/api/loyalty/rule-edits.mjs.map +0 -1
  266. package/resources/api/loyalty/rules.d.ts.map +0 -1
  267. package/resources/api/loyalty/rules.js.map +0 -1
  268. package/resources/api/loyalty/rules.mjs.map +0 -1
  269. package/resources/api/loyalty.d.ts.map +0 -1
  270. package/resources/api/loyalty.js.map +0 -1
  271. package/resources/api/loyalty.mjs.map +0 -1
  272. package/resources/api/minting.d.ts.map +0 -1
  273. package/resources/api/minting.js.map +0 -1
  274. package/resources/api/minting.mjs.map +0 -1
  275. package/resources/api/referral/index.d.ts.map +0 -1
  276. package/resources/api/referral/index.js.map +0 -1
  277. package/resources/api/referral/index.mjs.map +0 -1
  278. package/resources/api/referral/referral.d.ts.map +0 -1
  279. package/resources/api/referral/referral.js.map +0 -1
  280. package/resources/api/referral/referral.mjs.map +0 -1
  281. package/resources/api/referral/users.d.ts.map +0 -1
  282. package/resources/api/referral/users.js.map +0 -1
  283. package/resources/api/referral/users.mjs.map +0 -1
  284. package/resources/api/referral.d.ts.map +0 -1
  285. package/resources/api/referral.js.map +0 -1
  286. package/resources/api/referral.mjs.map +0 -1
  287. package/resources/api/users/index.d.ts +0 -3
  288. package/resources/api/users/index.d.ts.map +0 -1
  289. package/resources/api/users/index.js.map +0 -1
  290. package/resources/api/users/index.mjs.map +0 -1
  291. package/resources/api/users/metadatas.d.ts.map +0 -1
  292. package/resources/api/users/metadatas.js.map +0 -1
  293. package/resources/api/users/metadatas.mjs.map +0 -1
  294. package/resources/api/users/users.d.ts +0 -133
  295. package/resources/api/users/users.d.ts.map +0 -1
  296. package/resources/api/users/users.js.map +0 -1
  297. package/resources/api/users/users.mjs.map +0 -1
  298. package/resources/api/users.d.ts.map +0 -1
  299. package/resources/api/users.js.map +0 -1
  300. package/resources/api/users.mjs.map +0 -1
  301. package/resources/api/website-collections.d.ts.map +0 -1
  302. package/resources/api/website-collections.js.map +0 -1
  303. package/resources/api/website-collections.mjs.map +0 -1
  304. package/resources/api/website-user-roles.d.ts.map +0 -1
  305. package/resources/api/website-user-roles.js.map +0 -1
  306. package/resources/api/website-user-roles.mjs.map +0 -1
  307. package/resources/api/websites.d.ts.map +0 -1
  308. package/resources/api/websites.js +0 -22
  309. package/resources/api/websites.js.map +0 -1
  310. package/resources/api/websites.mjs +0 -18
  311. package/resources/api/websites.mjs.map +0 -1
  312. package/resources/api.d.ts +0 -2
  313. package/resources/api.d.ts.map +0 -1
  314. package/resources/api.js.map +0 -1
  315. package/resources/api.mjs.map +0 -1
  316. package/src/resources/api/api.ts +0 -629
  317. package/src/resources/api/index.ts +0 -51
  318. package/src/resources/api/users/users.ts +0 -203
  319. /package/resources/{api/loyalty.d.ts → loyalty.d.ts} +0 -0
  320. /package/resources/{api/loyalty.js → loyalty.js} +0 -0
  321. /package/resources/{api/loyalty.mjs → loyalty.mjs} +0 -0
  322. /package/resources/{api/referral → referral}/index.d.ts +0 -0
  323. /package/resources/{api/referral → referral}/index.js +0 -0
  324. /package/resources/{api/referral → referral}/index.mjs +0 -0
  325. /package/resources/{api/referral.d.ts → referral.d.ts} +0 -0
  326. /package/resources/{api/referral.js → referral.js} +0 -0
  327. /package/resources/{api/referral.mjs → referral.mjs} +0 -0
  328. /package/resources/{api/users → users}/index.js +0 -0
  329. /package/resources/{api/users → users}/index.mjs +0 -0
  330. /package/resources/{api/users.d.ts → users.d.ts} +0 -0
  331. /package/resources/{api/users.js → users.js} +0 -0
  332. /package/resources/{api/users.mjs → users.mjs} +0 -0
  333. /package/resources/{api → websites}/website-collections.js +0 -0
  334. /package/resources/{api → websites}/website-collections.mjs +0 -0
  335. /package/resources/{api → websites}/website-user-roles.d.ts +0 -0
  336. /package/resources/{api → websites}/website-user-roles.js +0 -0
  337. /package/resources/{api → websites}/website-user-roles.mjs +0 -0
  338. /package/src/resources/{api/loyalty.ts → loyalty.ts} +0 -0
  339. /package/src/resources/{api/referral → referral}/index.ts +0 -0
  340. /package/src/resources/{api/referral.ts → referral.ts} +0 -0
  341. /package/src/resources/{api/users.ts → users.ts} +0 -0
  342. /package/src/resources/{api → websites}/website-user-roles.ts +0 -0
@@ -1,190 +1,39 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../../resource';
4
- import { isRequestOptions } from '../../../core';
5
- import * as Core from '../../../core';
6
- import * as AccountsAPI from './accounts';
7
- import {
8
- AccountGetRankParams,
9
- AccountGetRankResponse,
10
- AccountListParams,
11
- AccountListResponse,
12
- Accounts,
13
- } from './accounts';
14
- import * as BadgesAPI from './badges';
15
- import {
16
- BadgeCreateParams,
17
- BadgeCreateResponse,
18
- BadgeDeleteResponse,
19
- BadgeListParams,
20
- BadgeListResponse,
21
- BadgeRevokeParams,
22
- BadgeRevokeResponse,
23
- BadgeRewardParams,
24
- BadgeRewardResponse,
25
- BadgeUpdateParams,
26
- BadgeUpdateResponse,
27
- Badges,
28
- } from './badges';
29
- import * as CurrenciesAPI from './currencies';
30
- import {
31
- Currencies,
32
- CurrencyCreateParams,
33
- CurrencyCreateResponse,
34
- CurrencyListParams,
35
- CurrencyListResponse,
36
- } from './currencies';
37
- import * as MultipliersAPI from './multipliers';
38
- import {
39
- MultiplierCreateParams,
40
- MultiplierCreateResponse,
41
- MultiplierDeleteByExternalIDParams,
42
- MultiplierDeleteByExternalIDResponse,
43
- MultiplierDeleteResponse,
44
- MultiplierListParams,
45
- MultiplierListResponse,
46
- MultiplierUpdateParams,
47
- MultiplierUpdateResponse,
48
- Multipliers,
49
- } from './multipliers';
50
- import * as QuestionsAPI from './questions';
51
- import {
52
- QuestionCreateParams,
53
- QuestionCreateResponse,
54
- QuestionListParams,
55
- QuestionListResponse,
56
- QuestionUpdateParams,
57
- QuestionUpdateResponse,
58
- Questions,
59
- } from './questions';
60
- import * as QuestionsResponsesAPI from './questions-responses';
61
- import {
62
- QuestionsResponseListParams,
63
- QuestionsResponseListResponse,
64
- QuestionsResponseSubmitParams,
65
- QuestionsResponseSubmitResponse,
66
- QuestionsResponses,
67
- } from './questions-responses';
68
- import * as RuleEditsAPI from './rule-edits';
69
- import {
70
- RuleEditListParams,
71
- RuleEditListResponse,
72
- RuleEditRestoreParams,
73
- RuleEditRestoreResponse,
74
- RuleEdits,
75
- } from './rule-edits';
76
- import * as RulesAPI from './rules';
77
- import {
78
- RuleCompleteParams,
79
- RuleCompleteResponse,
80
- RuleCreateParams,
81
- RuleCreateResponse,
82
- RuleDeleteResponse,
83
- RuleGetStatusParams,
84
- RuleGetStatusResponse,
85
- RuleListParams,
86
- RuleListResponse,
87
- RuleUpdateParams,
88
- RuleUpdateResponse,
89
- Rules,
90
- } from './rules';
91
-
92
- export class Loyalty extends APIResource {
93
- accounts: AccountsAPI.Accounts = new AccountsAPI.Accounts(this._client);
94
- badges: BadgesAPI.Badges = new BadgesAPI.Badges(this._client);
95
- currencies: CurrenciesAPI.Currencies = new CurrenciesAPI.Currencies(this._client);
96
- multipliers: MultipliersAPI.Multipliers = new MultipliersAPI.Multipliers(this._client);
97
- ruleEdits: RuleEditsAPI.RuleEdits = new RuleEditsAPI.RuleEdits(this._client);
98
- rules: RulesAPI.Rules = new RulesAPI.Rules(this._client);
99
- questions: QuestionsAPI.Questions = new QuestionsAPI.Questions(this._client);
100
- questionsResponses: QuestionsResponsesAPI.QuestionsResponses = new QuestionsResponsesAPI.QuestionsResponses(
101
- this._client,
102
- );
103
-
104
- /**
105
- * Create a loyalty transaction to update account balances.
106
- */
107
- createTransaction(
108
- body: LoyaltyCreateTransactionParams,
109
- options?: Core.RequestOptions,
110
- ): Core.APIPromise<LoyaltyCreateTransactionResponse> {
111
- return this._client.post('/api/loyalty/transactions', { body, ...options });
112
- }
3
+ import { APIResource } from '../../resource';
4
+ import { isRequestOptions } from '../../core';
5
+ import * as Core from '../../core';
113
6
 
7
+ export class RuleGroups extends APIResource {
114
8
  /**
115
9
  * Retrieve configured loyalty rule groups
116
10
  */
117
11
  getRuleGroups(
118
- query?: LoyaltyGetRuleGroupsParams,
12
+ query?: RuleGroupGetRuleGroupsParams,
119
13
  options?: Core.RequestOptions,
120
- ): Core.APIPromise<LoyaltyGetRuleGroupsResponse>;
121
- getRuleGroups(options?: Core.RequestOptions): Core.APIPromise<LoyaltyGetRuleGroupsResponse>;
14
+ ): Core.APIPromise<RuleGroupGetRuleGroupsResponse>;
15
+ getRuleGroups(options?: Core.RequestOptions): Core.APIPromise<RuleGroupGetRuleGroupsResponse>;
122
16
  getRuleGroups(
123
- query: LoyaltyGetRuleGroupsParams | Core.RequestOptions = {},
17
+ query: RuleGroupGetRuleGroupsParams | Core.RequestOptions = {},
124
18
  options?: Core.RequestOptions,
125
- ): Core.APIPromise<LoyaltyGetRuleGroupsResponse> {
19
+ ): Core.APIPromise<RuleGroupGetRuleGroupsResponse> {
126
20
  if (isRequestOptions(query)) {
127
21
  return this.getRuleGroups({}, query);
128
22
  }
129
23
  return this._client.get('/api/loyalty/rule_groups', { query, ...options });
130
24
  }
131
-
132
- /**
133
- * Fetch loyalty transaction entries for wallets or users, representing account
134
- * balance changes.
135
- */
136
- listTransactionEntries(
137
- query?: LoyaltyListTransactionEntriesParams,
138
- options?: Core.RequestOptions,
139
- ): Core.APIPromise<LoyaltyListTransactionEntriesResponse>;
140
- listTransactionEntries(
141
- options?: Core.RequestOptions,
142
- ): Core.APIPromise<LoyaltyListTransactionEntriesResponse>;
143
- listTransactionEntries(
144
- query: LoyaltyListTransactionEntriesParams | Core.RequestOptions = {},
145
- options?: Core.RequestOptions,
146
- ): Core.APIPromise<LoyaltyListTransactionEntriesResponse> {
147
- if (isRequestOptions(query)) {
148
- return this.listTransactionEntries({}, query);
149
- }
150
- return this._client.get('/api/loyalty/transaction_entries', { query, ...options });
151
- }
152
- }
153
-
154
- export interface LoyaltyCreateTransactionResponse {
155
- id: string;
156
-
157
- createdAt: string;
158
-
159
- description: string;
160
-
161
- entries: Array<LoyaltyCreateTransactionResponse.Entry>;
162
-
163
- updatedAt: string;
164
25
  }
165
26
 
166
- export namespace LoyaltyCreateTransactionResponse {
167
- export interface Entry {
168
- amount: number;
169
-
170
- /**
171
- * Direction of the transaction entry
172
- */
173
- direction: 'credit' | 'debit';
174
-
175
- walletAddress: string;
176
-
177
- idempotencyKey?: string;
178
- }
179
- }
180
-
181
- export interface LoyaltyGetRuleGroupsResponse {
182
- data: Array<LoyaltyGetRuleGroupsResponse.Data>;
27
+ export interface RuleGroupGetRuleGroupsResponse {
28
+ data: Array<RuleGroupGetRuleGroupsResponse.Data>;
183
29
 
184
30
  hasNextPage: boolean;
185
31
  }
186
32
 
187
- export namespace LoyaltyGetRuleGroupsResponse {
33
+ export namespace RuleGroupGetRuleGroupsResponse {
34
+ /**
35
+ * Schema for a get loyalty rule groups response
36
+ */
188
37
  export interface Data {
189
38
  id: string;
190
39
 
@@ -230,6 +79,8 @@ export namespace LoyaltyGetRuleGroupsResponse {
230
79
 
231
80
  loyaltyCurrencyId: string;
232
81
 
82
+ mediaUrl: string | null;
83
+
233
84
  metadata: LoyaltyRule.Metadata;
234
85
 
235
86
  name: string;
@@ -326,6 +177,11 @@ export namespace LoyaltyGetRuleGroupsResponse {
326
177
  */
327
178
  collection?: Array<Metadata.Collection>;
328
179
 
180
+ /**
181
+ * Conditions for completing the profile.
182
+ */
183
+ completeProfileConditions?: Record<string, boolean> | null;
184
+
329
185
  /**
330
186
  * Object containing details for the call-to-action.
331
187
  */
@@ -361,16 +217,31 @@ export namespace LoyaltyGetRuleGroupsResponse {
361
217
  */
362
218
  enableVerifiedMultiplier?: boolean;
363
219
 
220
+ /**
221
+ * Fill source of the order for the token sale
222
+ */
223
+ fillSource?: string;
224
+
364
225
  /**
365
226
  * Percentage reward given to a user for their first referral.
366
227
  */
367
228
  firstReferralReward?: number | null;
368
229
 
230
+ /**
231
+ * Flag indicating whether the fill source is included.
232
+ */
233
+ hasFillSource?: boolean;
234
+
369
235
  /**
370
236
  * Indicates if the item has never been sold.
371
237
  */
372
238
  hasNeverSold?: boolean;
373
239
 
240
+ /**
241
+ * Flag indicating whether the order source is included.
242
+ */
243
+ hasOrderSource?: boolean;
244
+
374
245
  /**
375
246
  * Indicates if the full royalty has been paid for items.
376
247
  */
@@ -451,6 +322,11 @@ export namespace LoyaltyGetRuleGroupsResponse {
451
322
  */
452
323
  onlyRewardSingleTokenOwnership?: boolean | null;
453
324
 
325
+ /**
326
+ * Order source of the order for the token sale
327
+ */
328
+ orderSource?: string;
329
+
454
330
  /**
455
331
  * Promotional code associated with the rule.
456
332
  */
@@ -609,31 +485,32 @@ export namespace LoyaltyGetRuleGroupsResponse {
609
485
  * Blockchain network of the collection.
610
486
  */
611
487
  network?:
612
- | 'mainnet'
613
- | 'polygon'
614
- | 'polygon_mumbai'
615
- | 'optimism'
488
+ | 'apechain'
616
489
  | 'arbitrum'
617
- | 'binance'
618
- | 'bscTestnet'
619
490
  | 'avalanche'
620
491
  | 'avalancheFuji'
621
- | 'zksync'
622
- | 'fantom'
623
- | 'fantomTestnet'
624
492
  | 'base'
625
493
  | 'baseSepolia'
626
- | 'skaleNebula'
627
- | 'xai'
628
494
  | 'berachainArtio'
629
- | 'solana'
630
- | 'apechain'
631
- | 'flowMainnet'
495
+ | 'binance'
496
+ | 'bscTestnet'
632
497
  | 'campTestnet'
498
+ | 'fantom'
499
+ | 'fantomTestnet'
500
+ | 'flowMainnet'
501
+ | 'mainnet'
502
+ | 'optimism'
503
+ | 'polygon'
504
+ | 'polygon_mumbai'
505
+ | 'skaleNebula'
506
+ | 'solana'
507
+ | 'sophon'
633
508
  | 'sui'
634
- | 'vanar'
635
509
  | 'superseed'
636
510
  | 'superseedSepolia'
511
+ | 'vanar'
512
+ | 'xai'
513
+ | 'zksync'
637
514
  | 'sepolia'
638
515
  | 'optimism_sepolia'
639
516
  | 'arbitrumSepolia'
@@ -921,171 +798,7 @@ export namespace LoyaltyGetRuleGroupsResponse {
921
798
  }
922
799
  }
923
800
 
924
- export interface LoyaltyListTransactionEntriesResponse {
925
- data: Array<LoyaltyListTransactionEntriesResponse.Data>;
926
-
927
- hasNextPage: boolean;
928
- }
929
-
930
- export namespace LoyaltyListTransactionEntriesResponse {
931
- /**
932
- * Schema for a loyalty transaction entry
933
- */
934
- export interface Data {
935
- /**
936
- * Unique identifier for the transaction entry
937
- */
938
- id: string;
939
-
940
- /**
941
- * Amount involved in the transaction
942
- */
943
- amount: number;
944
-
945
- /**
946
- * Timestamp when the transaction entry was created
947
- */
948
- createdAt: string;
949
-
950
- /**
951
- * Direction of the transaction entry
952
- */
953
- direction: 'credit' | 'debit';
954
-
955
- /**
956
- * Unique identifier for the loyalty account
957
- */
958
- loyaltyAccountId: string;
959
-
960
- /**
961
- * Details of the loyalty transaction
962
- */
963
- loyaltyTransaction: Data.LoyaltyTransaction;
964
-
965
- /**
966
- * Unique identifier for the organization
967
- */
968
- organizationId: string;
969
-
970
- /**
971
- * Type of the loyalty transaction
972
- */
973
- type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
974
-
975
- /**
976
- * Timestamp when the transaction entry was last updated
977
- */
978
- updatedAt: string;
979
-
980
- /**
981
- * Unique identifier for the website
982
- */
983
- websiteId: string;
984
-
985
- /**
986
- * Optional metadata for the transaction entry
987
- */
988
- metadata?: Record<string, unknown>;
989
- }
990
-
991
- export namespace Data {
992
- /**
993
- * Details of the loyalty transaction
994
- */
995
- export interface LoyaltyTransaction {
996
- /**
997
- * Unique identifier for the loyalty transaction
998
- */
999
- id: string;
1000
-
1001
- /**
1002
- * Type of the loyalty transaction
1003
- */
1004
- type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
1005
-
1006
- /**
1007
- * Details of the loyalty rule associated with the transaction
1008
- */
1009
- loyaltyRule?: LoyaltyTransaction.LoyaltyRule;
1010
- }
1011
-
1012
- export namespace LoyaltyTransaction {
1013
- /**
1014
- * Details of the loyalty rule associated with the transaction
1015
- */
1016
- export interface LoyaltyRule {
1017
- /**
1018
- * Unique identifier for the loyalty rule
1019
- */
1020
- id: string;
1021
-
1022
- /**
1023
- * Type of the loyalty rule
1024
- */
1025
- type: string;
1026
-
1027
- /**
1028
- * Description of the loyalty rule
1029
- */
1030
- description?: string;
1031
-
1032
- /**
1033
- * Optional metadata for the loyalty rule
1034
- */
1035
- metadata?: Record<string, unknown>;
1036
-
1037
- /**
1038
- * Name of the loyalty rule
1039
- */
1040
- name?: string;
1041
- }
1042
- }
1043
- }
1044
- }
1045
-
1046
- export interface LoyaltyCreateTransactionParams {
1047
- /**
1048
- * Description of the loyalty transaction
1049
- */
1050
- description: string;
1051
-
1052
- /**
1053
- * Array of transaction entries
1054
- */
1055
- entries: Array<LoyaltyCreateTransactionParams.Entry>;
1056
-
1057
- /**
1058
- * Unique identifier for the loyalty currency
1059
- */
1060
- loyaltyCurrencyId?: string;
1061
- }
1062
-
1063
- export namespace LoyaltyCreateTransactionParams {
1064
- export interface Entry {
1065
- /**
1066
- * Transaction entry amount.
1067
- */
1068
- amount: number;
1069
-
1070
- /**
1071
- * Direction of the transaction entry for this wallet address
1072
- */
1073
- direction?: 'credit' | 'debit';
1074
-
1075
- /**
1076
- * Idempotency key for the transaction entry. Creation will fail if already exists
1077
- * for this wallet address.
1078
- */
1079
- idempotencyKey?: string;
1080
-
1081
- /**
1082
- * The wallet address of the user
1083
- */
1084
- walletAddress?: string;
1085
- }
1086
- }
1087
-
1088
- export interface LoyaltyGetRuleGroupsParams {
801
+ export interface RuleGroupGetRuleGroupsParams {
1089
802
  excludeHidden?: string;
1090
803
 
1091
804
  limit?: number;
@@ -1097,201 +810,9 @@ export interface LoyaltyGetRuleGroupsParams {
1097
810
  websiteId?: string;
1098
811
  }
1099
812
 
1100
- export interface LoyaltyListTransactionEntriesParams {
1101
- /**
1102
- * End date to filter by (exclusive, less than)
1103
- */
1104
- createdAtEnd?: string;
1105
-
1106
- /**
1107
- * Start date to filter by (inclusive, greater than or equal to)
1108
- */
1109
- createdAtStart?: string;
1110
-
1111
- /**
1112
- * Direction of the transaction entry to filter by
1113
- */
1114
- direction?: 'credit' | 'debit';
1115
-
1116
- /**
1117
- * Key to ensure idempotency of the request
1118
- */
1119
- idempotencyKey?: string;
1120
-
1121
- /**
1122
- * Maximum number of records to return (max 1000)
1123
- */
1124
- limit?: number;
1125
-
1126
- /**
1127
- * Unique identifier for the loyalty rule to filter by
1128
- */
1129
- loyaltyRuleId?: string;
1130
-
1131
- /**
1132
- * Unique identifier for the loyalty transaction to filter by
1133
- */
1134
- loyaltyTransactionId?: string;
1135
-
1136
- /**
1137
- * Field to order the results by
1138
- */
1139
- orderBy?: 'createdAt' | 'updatedAt' | 'loyaltyAccountLockVersion';
1140
-
1141
- /**
1142
- * Unique identifier for the organization to filter by
1143
- */
1144
- organizationId?: string;
1145
-
1146
- /**
1147
- * Pagination cursor to start after a specific resource ID
1148
- */
1149
- startingAfter?: string;
1150
-
1151
- /**
1152
- * Type of the loyalty transaction to filter by
1153
- */
1154
- type?: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
1155
-
1156
- /**
1157
- * When passed in return the list of fulfilled entries for loyalty rules. If a
1158
- * loyalty rule has a fulfilled entry this means the user cannot currently complete
1159
- * the rule. Must be passed in with userId or walletAddress.
1160
- */
1161
- userCompletedLoyaltyRuleId?: string | Array<string>;
1162
-
1163
- /**
1164
- * External identifier for the user group controlled by you
1165
- */
1166
- userGroupExternalIdentifier?: string;
1167
-
1168
- /**
1169
- * Unique identifier for the user group
1170
- */
1171
- userGroupId?: string;
1172
-
1173
- /**
1174
- * User ID or array of User IDs to filter by
1175
- */
1176
- userId?: string | Array<string>;
1177
-
1178
- /**
1179
- * Wallet address or array of wallet addresses to filter by
1180
- */
1181
- walletAddress?: string | Array<string>;
1182
-
1183
- /**
1184
- * Identifier for the wallet group to filter by
1185
- */
1186
- walletGroupIdentifier?: string;
1187
-
1188
- /**
1189
- * Unique identifier for the website to filter by
1190
- */
1191
- websiteId?: string;
1192
- }
1193
-
1194
- Loyalty.Accounts = Accounts;
1195
- Loyalty.Badges = Badges;
1196
- Loyalty.Currencies = Currencies;
1197
- Loyalty.Multipliers = Multipliers;
1198
- Loyalty.RuleEdits = RuleEdits;
1199
- Loyalty.Rules = Rules;
1200
- Loyalty.Questions = Questions;
1201
- Loyalty.QuestionsResponses = QuestionsResponses;
1202
-
1203
- export declare namespace Loyalty {
1204
- export {
1205
- type LoyaltyCreateTransactionResponse as LoyaltyCreateTransactionResponse,
1206
- type LoyaltyGetRuleGroupsResponse as LoyaltyGetRuleGroupsResponse,
1207
- type LoyaltyListTransactionEntriesResponse as LoyaltyListTransactionEntriesResponse,
1208
- type LoyaltyCreateTransactionParams as LoyaltyCreateTransactionParams,
1209
- type LoyaltyGetRuleGroupsParams as LoyaltyGetRuleGroupsParams,
1210
- type LoyaltyListTransactionEntriesParams as LoyaltyListTransactionEntriesParams,
1211
- };
1212
-
1213
- export {
1214
- Accounts as Accounts,
1215
- type AccountListResponse as AccountListResponse,
1216
- type AccountGetRankResponse as AccountGetRankResponse,
1217
- type AccountListParams as AccountListParams,
1218
- type AccountGetRankParams as AccountGetRankParams,
1219
- };
1220
-
1221
- export {
1222
- Badges as Badges,
1223
- type BadgeCreateResponse as BadgeCreateResponse,
1224
- type BadgeUpdateResponse as BadgeUpdateResponse,
1225
- type BadgeListResponse as BadgeListResponse,
1226
- type BadgeDeleteResponse as BadgeDeleteResponse,
1227
- type BadgeRevokeResponse as BadgeRevokeResponse,
1228
- type BadgeRewardResponse as BadgeRewardResponse,
1229
- type BadgeCreateParams as BadgeCreateParams,
1230
- type BadgeUpdateParams as BadgeUpdateParams,
1231
- type BadgeListParams as BadgeListParams,
1232
- type BadgeRevokeParams as BadgeRevokeParams,
1233
- type BadgeRewardParams as BadgeRewardParams,
1234
- };
1235
-
1236
- export {
1237
- Currencies as Currencies,
1238
- type CurrencyCreateResponse as CurrencyCreateResponse,
1239
- type CurrencyListResponse as CurrencyListResponse,
1240
- type CurrencyCreateParams as CurrencyCreateParams,
1241
- type CurrencyListParams as CurrencyListParams,
1242
- };
1243
-
1244
- export {
1245
- Multipliers as Multipliers,
1246
- type MultiplierCreateResponse as MultiplierCreateResponse,
1247
- type MultiplierUpdateResponse as MultiplierUpdateResponse,
1248
- type MultiplierListResponse as MultiplierListResponse,
1249
- type MultiplierDeleteResponse as MultiplierDeleteResponse,
1250
- type MultiplierDeleteByExternalIDResponse as MultiplierDeleteByExternalIDResponse,
1251
- type MultiplierCreateParams as MultiplierCreateParams,
1252
- type MultiplierUpdateParams as MultiplierUpdateParams,
1253
- type MultiplierListParams as MultiplierListParams,
1254
- type MultiplierDeleteByExternalIDParams as MultiplierDeleteByExternalIDParams,
1255
- };
1256
-
1257
- export {
1258
- RuleEdits as RuleEdits,
1259
- type RuleEditListResponse as RuleEditListResponse,
1260
- type RuleEditRestoreResponse as RuleEditRestoreResponse,
1261
- type RuleEditListParams as RuleEditListParams,
1262
- type RuleEditRestoreParams as RuleEditRestoreParams,
1263
- };
1264
-
1265
- export {
1266
- Rules as Rules,
1267
- type RuleCreateResponse as RuleCreateResponse,
1268
- type RuleUpdateResponse as RuleUpdateResponse,
1269
- type RuleListResponse as RuleListResponse,
1270
- type RuleDeleteResponse as RuleDeleteResponse,
1271
- type RuleCompleteResponse as RuleCompleteResponse,
1272
- type RuleGetStatusResponse as RuleGetStatusResponse,
1273
- type RuleCreateParams as RuleCreateParams,
1274
- type RuleUpdateParams as RuleUpdateParams,
1275
- type RuleListParams as RuleListParams,
1276
- type RuleCompleteParams as RuleCompleteParams,
1277
- type RuleGetStatusParams as RuleGetStatusParams,
1278
- };
1279
-
1280
- export {
1281
- Questions as Questions,
1282
- type QuestionCreateResponse as QuestionCreateResponse,
1283
- type QuestionUpdateResponse as QuestionUpdateResponse,
1284
- type QuestionListResponse as QuestionListResponse,
1285
- type QuestionCreateParams as QuestionCreateParams,
1286
- type QuestionUpdateParams as QuestionUpdateParams,
1287
- type QuestionListParams as QuestionListParams,
1288
- };
1289
-
813
+ export declare namespace RuleGroups {
1290
814
  export {
1291
- QuestionsResponses as QuestionsResponses,
1292
- type QuestionsResponseListResponse as QuestionsResponseListResponse,
1293
- type QuestionsResponseSubmitResponse as QuestionsResponseSubmitResponse,
1294
- type QuestionsResponseListParams as QuestionsResponseListParams,
1295
- type QuestionsResponseSubmitParams as QuestionsResponseSubmitParams,
815
+ type RuleGroupGetRuleGroupsResponse as RuleGroupGetRuleGroupsResponse,
816
+ type RuleGroupGetRuleGroupsParams as RuleGroupGetRuleGroupsParams,
1296
817
  };
1297
818
  }