@snagsolutions/sdk 0.1.0-alpha.20 → 0.1.0-alpha.200

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 (272) hide show
  1. package/CHANGELOG.md +1626 -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 +7 -4
  10. package/index.d.ts +7 -4
  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 +8 -4
  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 +368 -0
  28. package/resources/auctions/auctions.d.ts.map +1 -0
  29. package/resources/auctions/auctions.js +72 -0
  30. package/resources/auctions/auctions.js.map +1 -0
  31. package/resources/auctions/auctions.mjs +45 -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 +126 -0
  46. package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
  47. package/resources/auctions/website-user-attributes/values.js +49 -0
  48. package/resources/auctions/website-user-attributes/values.js.map +1 -0
  49. package/resources/auctions/website-user-attributes/values.mjs +45 -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 +136 -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 +76 -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 +49 -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 +17 -4
  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 +2 -2
  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 +1 -1
  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 +60 -16
  86. package/resources/loyalty/accounts.d.ts.map +1 -1
  87. package/resources/loyalty/accounts.js +14 -0
  88. package/resources/loyalty/accounts.js.map +1 -1
  89. package/resources/loyalty/accounts.mjs +14 -0
  90. package/resources/loyalty/accounts.mjs.map +1 -1
  91. package/resources/loyalty/badges.d.ts +666 -135
  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 -4
  104. package/resources/loyalty/index.d.ts.map +1 -1
  105. package/resources/loyalty/index.js +5 -5
  106. package/resources/loyalty/index.js.map +1 -1
  107. package/resources/loyalty/index.mjs +3 -3
  108. package/resources/loyalty/index.mjs.map +1 -1
  109. package/resources/loyalty/loyalty.d.ts +11 -11
  110. package/resources/loyalty/loyalty.d.ts.map +1 -1
  111. package/resources/loyalty/loyalty.js +6 -6
  112. package/resources/loyalty/loyalty.js.map +1 -1
  113. package/resources/loyalty/loyalty.mjs +7 -7
  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 +55 -4
  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 +52 -6
  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 +2646 -8
  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 +283 -64
  140. package/resources/loyalty/rule-groups.d.ts.map +1 -1
  141. package/resources/loyalty/rule-groups.js +38 -2
  142. package/resources/loyalty/rule-groups.js.map +1 -1
  143. package/resources/loyalty/rule-groups.mjs +38 -2
  144. package/resources/loyalty/rule-groups.mjs.map +1 -1
  145. package/resources/loyalty/rules.d.ts +1930 -269
  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 +120 -0
  158. package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
  159. package/resources/loyalty/transactions/rule-statuses.js +30 -0
  160. package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
  161. package/resources/loyalty/transactions/rule-statuses.mjs +26 -0
  162. package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
  163. package/resources/loyalty/transactions/transactions.d.ts +410 -0
  164. package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
  165. package/resources/loyalty/transactions/transactions.js +76 -0
  166. package/resources/loyalty/transactions/transactions.js.map +1 -0
  167. package/resources/loyalty/transactions/transactions.mjs +49 -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 +29 -3
  184. package/resources/referral/users.d.ts.map +1 -1
  185. package/resources/referral/users.js +12 -4
  186. package/resources/referral/users.js.map +1 -1
  187. package/resources/referral/users.mjs +12 -4
  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 +36 -3
  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 +184 -35
  198. package/resources/users/users.d.ts.map +1 -1
  199. package/resources/users/users.js +58 -1
  200. package/resources/users/users.js.map +1 -1
  201. package/resources/users/users.mjs +58 -1
  202. package/resources/users/users.mjs.map +1 -1
  203. package/resources/websites/website-collections.d.ts +22 -1
  204. package/resources/websites/website-collections.d.ts.map +1 -1
  205. package/resources/websites/website-collections.js +21 -0
  206. package/resources/websites/website-collections.js.map +1 -1
  207. package/resources/websites/website-collections.mjs +21 -0
  208. package/resources/websites/website-collections.mjs.map +1 -1
  209. package/resources/websites/website-user-roles.d.ts +24 -1
  210. package/resources/websites/website-user-roles.d.ts.map +1 -1
  211. package/resources/websites/website-user-roles.js +23 -0
  212. package/resources/websites/website-user-roles.js.map +1 -1
  213. package/resources/websites/website-user-roles.mjs +23 -0
  214. package/resources/websites/website-user-roles.mjs.map +1 -1
  215. package/resources/websites/websites.d.ts +12 -0
  216. package/resources/websites/websites.d.ts.map +1 -1
  217. package/resources/websites/websites.js +7 -0
  218. package/resources/websites/websites.js.map +1 -1
  219. package/resources/websites/websites.mjs +7 -0
  220. package/resources/websites/websites.mjs.map +1 -1
  221. package/src/core.ts +39 -16
  222. package/src/index.ts +31 -2
  223. package/src/resource.ts +1 -1
  224. package/src/resources/assets.ts +18 -3
  225. package/src/resources/auctions/auctions.ts +561 -0
  226. package/src/resources/auctions/index.ts +19 -0
  227. package/src/resources/auctions/website-user-attributes/index.ts +18 -0
  228. package/src/resources/auctions/website-user-attributes/values.ts +170 -0
  229. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +212 -0
  230. package/src/resources/auctions/website-user-attributes.ts +3 -0
  231. package/src/resources/auctions.ts +1 -207
  232. package/src/resources/auth.ts +21 -5
  233. package/src/resources/index.ts +12 -1
  234. package/src/resources/loyalty/account-streaks.ts +110 -0
  235. package/src/resources/loyalty/accounts.ts +65 -18
  236. package/src/resources/loyalty/badges.ts +790 -146
  237. package/src/resources/loyalty/currencies.ts +19 -0
  238. package/src/resources/loyalty/index.ts +19 -3
  239. package/src/resources/loyalty/loyalty.ts +39 -15
  240. package/src/resources/loyalty/multipliers.ts +43 -4
  241. package/src/resources/loyalty/questions-responses.ts +64 -4
  242. package/src/resources/loyalty/questions.ts +56 -6
  243. package/src/resources/loyalty/rule-edits.ts +3854 -100
  244. package/src/resources/loyalty/rule-groups.ts +499 -76
  245. package/src/resources/loyalty/rules.ts +3038 -318
  246. package/src/resources/loyalty/transactions/index.ts +18 -0
  247. package/src/resources/loyalty/transactions/rule-statuses.ts +178 -0
  248. package/src/resources/loyalty/transactions/transactions.ts +687 -0
  249. package/src/resources/loyalty/transactions.ts +1 -330
  250. package/src/resources/minting.ts +25 -5
  251. package/src/resources/referral/referral.ts +13 -11
  252. package/src/resources/referral/users.ts +43 -5
  253. package/src/resources/users/index.ts +4 -0
  254. package/src/resources/users/metadatas.ts +61 -3
  255. package/src/resources/users/users.ts +249 -38
  256. package/src/resources/websites/website-collections.ts +42 -1
  257. package/src/resources/websites/website-user-roles.ts +25 -1
  258. package/src/resources/websites/websites.ts +12 -0
  259. package/src/version.ts +1 -1
  260. package/version.d.ts +1 -1
  261. package/version.d.ts.map +1 -1
  262. package/version.js +1 -1
  263. package/version.js.map +1 -1
  264. package/version.mjs +1 -1
  265. package/version.mjs.map +1 -1
  266. package/resources/loyalty/rule-chains.d.ts +0 -34
  267. package/resources/loyalty/rule-chains.d.ts.map +0 -1
  268. package/resources/loyalty/rule-chains.js +0 -15
  269. package/resources/loyalty/rule-chains.js.map +0 -1
  270. package/resources/loyalty/rule-chains.mjs +0 -11
  271. package/resources/loyalty/rule-chains.mjs.map +0 -1
  272. package/src/resources/loyalty/rule-chains.ts +0 -45
@@ -1,248 +1,2 @@
1
- import { APIResource } from "../../resource.js";
2
- import * as Core from "../../core.js";
3
- export declare class Transactions extends APIResource {
4
- /**
5
- * Create a loyalty transaction to update account balances.
6
- */
7
- createTransaction(body: TransactionCreateTransactionParams, options?: Core.RequestOptions): Core.APIPromise<TransactionCreateTransactionResponse>;
8
- /**
9
- * Fetch loyalty transaction entries for wallets or users, representing account
10
- * balance changes.
11
- */
12
- getTransactionEntries(query?: TransactionGetTransactionEntriesParams, options?: Core.RequestOptions): Core.APIPromise<TransactionGetTransactionEntriesResponse>;
13
- getTransactionEntries(options?: Core.RequestOptions): Core.APIPromise<TransactionGetTransactionEntriesResponse>;
14
- }
15
- export interface TransactionCreateTransactionResponse {
16
- id: string;
17
- createdAt: string;
18
- description: string;
19
- entries: Array<TransactionCreateTransactionResponse.Entry>;
20
- updatedAt: string;
21
- }
22
- export declare namespace TransactionCreateTransactionResponse {
23
- interface Entry {
24
- amount: number;
25
- /**
26
- * Direction of the transaction entry
27
- */
28
- direction: 'credit' | 'debit';
29
- walletAddress: string;
30
- idempotencyKey?: string;
31
- }
32
- }
33
- export interface TransactionGetTransactionEntriesResponse {
34
- data: Array<TransactionGetTransactionEntriesResponse.Data>;
35
- hasNextPage: boolean;
36
- }
37
- export declare namespace TransactionGetTransactionEntriesResponse {
38
- /**
39
- * Schema for a loyalty transaction entry
40
- */
41
- interface Data {
42
- /**
43
- * Unique identifier for the transaction entry
44
- */
45
- id: string;
46
- /**
47
- * Amount involved in the transaction
48
- */
49
- amount: number;
50
- /**
51
- * Timestamp when the transaction entry was created
52
- */
53
- createdAt: string;
54
- /**
55
- * Direction of the transaction entry
56
- */
57
- direction: 'credit' | 'debit';
58
- /**
59
- * Unique identifier for the loyalty account
60
- */
61
- loyaltyAccountId: string;
62
- /**
63
- * Details of the loyalty transaction
64
- */
65
- loyaltyTransaction: Data.LoyaltyTransaction;
66
- /**
67
- * Unique identifier for the organization
68
- */
69
- organizationId: string;
70
- /**
71
- * Type of the loyalty transaction
72
- */
73
- type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
74
- /**
75
- * Timestamp when the transaction entry was last updated
76
- */
77
- updatedAt: string;
78
- /**
79
- * Unique identifier for the website
80
- */
81
- websiteId: string;
82
- /**
83
- * Optional metadata for the transaction entry
84
- */
85
- metadata?: Record<string, unknown>;
86
- }
87
- namespace Data {
88
- /**
89
- * Details of the loyalty transaction
90
- */
91
- interface LoyaltyTransaction {
92
- /**
93
- * Unique identifier for the loyalty transaction
94
- */
95
- id: string;
96
- /**
97
- * Type of the loyalty transaction
98
- */
99
- type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
100
- /**
101
- * Details of the loyalty rule associated with the transaction
102
- */
103
- loyaltyRule?: LoyaltyTransaction.LoyaltyRule;
104
- }
105
- namespace LoyaltyTransaction {
106
- /**
107
- * Details of the loyalty rule associated with the transaction
108
- */
109
- interface LoyaltyRule {
110
- /**
111
- * Unique identifier for the loyalty rule
112
- */
113
- id: string;
114
- /**
115
- * Type of the loyalty rule
116
- */
117
- type: string;
118
- /**
119
- * Description of the loyalty rule
120
- */
121
- description?: string;
122
- /**
123
- * Optional metadata for the loyalty rule
124
- */
125
- metadata?: Record<string, unknown>;
126
- /**
127
- * Name of the loyalty rule
128
- */
129
- name?: string;
130
- }
131
- }
132
- }
133
- }
134
- export interface TransactionCreateTransactionParams {
135
- /**
136
- * Description of the loyalty transaction
137
- */
138
- description: string;
139
- /**
140
- * Array of transaction entries
141
- */
142
- entries: Array<TransactionCreateTransactionParams.Entry>;
143
- /**
144
- * Unique identifier for the loyalty currency
145
- */
146
- loyaltyCurrencyId?: string;
147
- }
148
- export declare namespace TransactionCreateTransactionParams {
149
- interface Entry {
150
- /**
151
- * Transaction entry amount.
152
- */
153
- amount: number;
154
- /**
155
- * Direction of the transaction entry for this wallet address
156
- */
157
- direction?: 'credit' | 'debit';
158
- /**
159
- * Idempotency key for the transaction entry. Creation will fail if already exists
160
- * for this wallet address.
161
- */
162
- idempotencyKey?: string;
163
- /**
164
- * The wallet address of the user
165
- */
166
- walletAddress?: string;
167
- }
168
- }
169
- export interface TransactionGetTransactionEntriesParams {
170
- /**
171
- * End date to filter by (exclusive, less than)
172
- */
173
- createdAtEnd?: string;
174
- /**
175
- * Start date to filter by (inclusive, greater than or equal to)
176
- */
177
- createdAtStart?: string;
178
- /**
179
- * Direction of the transaction entry to filter by
180
- */
181
- direction?: 'credit' | 'debit';
182
- /**
183
- * Key to ensure idempotency of the request
184
- */
185
- idempotencyKey?: string;
186
- /**
187
- * Maximum number of records to return (max 1000)
188
- */
189
- limit?: number;
190
- /**
191
- * Unique identifier for the loyalty rule to filter by
192
- */
193
- loyaltyRuleId?: string;
194
- /**
195
- * Unique identifier for the loyalty transaction to filter by
196
- */
197
- loyaltyTransactionId?: string;
198
- /**
199
- * Field to order the results by
200
- */
201
- orderBy?: 'createdAt' | 'updatedAt' | 'loyaltyAccountLockVersion';
202
- /**
203
- * Unique identifier for the organization to filter by
204
- */
205
- organizationId?: string;
206
- /**
207
- * Pagination cursor to start after a specific resource ID
208
- */
209
- startingAfter?: string;
210
- /**
211
- * Type of the loyalty transaction to filter by
212
- */
213
- type?: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
214
- /**
215
- * When passed in return the list of fulfilled entries for loyalty rules. If a
216
- * loyalty rule has a fulfilled entry this means the user cannot currently complete
217
- * the rule. Must be passed in with userId or walletAddress.
218
- */
219
- userCompletedLoyaltyRuleId?: string | Array<string>;
220
- /**
221
- * External identifier for the user group controlled by you
222
- */
223
- userGroupExternalIdentifier?: string;
224
- /**
225
- * Unique identifier for the user group
226
- */
227
- userGroupId?: string;
228
- /**
229
- * User ID or array of User IDs to filter by
230
- */
231
- userId?: string | Array<string>;
232
- /**
233
- * Wallet address or array of wallet addresses to filter by
234
- */
235
- walletAddress?: string | Array<string>;
236
- /**
237
- * Identifier for the wallet group to filter by
238
- */
239
- walletGroupIdentifier?: string;
240
- /**
241
- * Unique identifier for the website to filter by
242
- */
243
- websiteId?: string;
244
- }
245
- export declare namespace Transactions {
246
- export { type TransactionCreateTransactionResponse as TransactionCreateTransactionResponse, type TransactionGetTransactionEntriesResponse as TransactionGetTransactionEntriesResponse, type TransactionCreateTransactionParams as TransactionCreateTransactionParams, type TransactionGetTransactionEntriesParams as TransactionGetTransactionEntriesParams, };
247
- }
1
+ export * from "./transactions/index.js";
248
2
  //# sourceMappingURL=transactions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../src/resources/loyalty/transactions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,iBAAiB,CACf,IAAI,EAAE,kCAAkC,EACxC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,oCAAoC,CAAC;IAIxD;;;OAGG;IACH,qBAAqB,CACnB,KAAK,CAAC,EAAE,sCAAsC,EAC9C,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,wCAAwC,CAAC;IAC5D,qBAAqB,CACnB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,wCAAwC,CAAC;CAU7D;AAED,MAAM,WAAW,oCAAoC;IACnD,EAAE,EAAE,MAAM,CAAC;IAEX,SAAS,EAAE,MAAM,CAAC;IAElB,WAAW,EAAE,MAAM,CAAC;IAEpB,OAAO,EAAE,KAAK,CAAC,oCAAoC,CAAC,KAAK,CAAC,CAAC;IAE3D,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,yBAAiB,oCAAoC,CAAC;IACpD,UAAiB,KAAK;QACpB,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,SAAS,EAAE,QAAQ,GAAG,OAAO,CAAC;QAE9B,aAAa,EAAE,MAAM,CAAC;QAEtB,cAAc,CAAC,EAAE,MAAM,CAA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Aa,GAAG,aAAa,GAAG,cAAc,GAAG,SAAS,GAAG,OAAO,CAAC;IAE5E;;;;OAIG;IACH,0BAA0B,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAEpD;;OAEG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC;IAErC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAEhC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAEvC;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,sCAAsC,IAAI,sCAAsC,GACtF,CAAC;CACH"}
1
+ {"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../src/resources/loyalty/transactions.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAC"}
@@ -1,22 +1,19 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Transactions = void 0;
5
- const resource_1 = require("../../resource.js");
6
- const core_1 = require("../../core.js");
7
- class Transactions extends resource_1.APIResource {
8
- /**
9
- * Create a loyalty transaction to update account balances.
10
- */
11
- createTransaction(body, options) {
12
- return this._client.post('/api/loyalty/transactions', { body, ...options });
13
- }
14
- getTransactionEntries(query = {}, options) {
15
- if ((0, core_1.isRequestOptions)(query)) {
16
- return this.getTransactionEntries({}, query);
17
- }
18
- return this._client.get('/api/loyalty/transaction_entries', { query, ...options });
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
19
8
  }
20
- }
21
- exports.Transactions = Transactions;
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ __exportStar(require("./transactions/index.js"), exports);
22
19
  //# sourceMappingURL=transactions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../src/resources/loyalty/transactions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAC7C,wCAA8C;AAG9C,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;OAEG;IACH,iBAAiB,CACf,IAAwC,EACxC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAaD,qBAAqB,CACnB,QAAsE,EAAE,EACxE,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,qBAAqB,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC9C;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AA/BD,oCA+BC"}
1
+ {"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../src/resources/loyalty/transactions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;AAEtF,0DAAqC"}
@@ -1,18 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../../resource.mjs";
3
- import { isRequestOptions } from "../../core.mjs";
4
- export class Transactions extends APIResource {
5
- /**
6
- * Create a loyalty transaction to update account balances.
7
- */
8
- createTransaction(body, options) {
9
- return this._client.post('/api/loyalty/transactions', { body, ...options });
10
- }
11
- getTransactionEntries(query = {}, options) {
12
- if (isRequestOptions(query)) {
13
- return this.getTransactionEntries({}, query);
14
- }
15
- return this._client.get('/api/loyalty/transaction_entries', { query, ...options });
16
- }
17
- }
2
+ export * from "./transactions/index.mjs";
18
3
  //# sourceMappingURL=transactions.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"transactions.mjs","sourceRoot":"","sources":["../../src/resources/loyalty/transactions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAG3B,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,iBAAiB,CACf,IAAwC,EACxC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAaD,qBAAqB,CACnB,QAAsE,EAAE,EACxE,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,qBAAqB,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC9C;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF"}
1
+ {"version":3,"file":"transactions.mjs","sourceRoot":"","sources":["../../src/resources/loyalty/transactions.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
@@ -67,15 +67,15 @@ export interface MintingGetAssetsParams {
67
67
  /**
68
68
  * Network
69
69
  */
70
- network?: 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachainArtio' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp' | 'abstract';
70
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'nexusTestnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'skaleEuropa' | 'skaleCalypso' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp' | 'somnia' | 'zkverify' | 'polkadot' | 'kusama' | 'flow_cadence';
71
71
  /**
72
- * Sort Dir
72
+ * Sort Key
73
73
  */
74
- sortDir?: 'asc' | 'desc' | null;
74
+ sortBy?: 'price' | 'startsAt' | 'assetNr' | null;
75
75
  /**
76
- * Sort Key
76
+ * Sort Dir
77
77
  */
78
- sortKey?: 'price' | 'startsAt' | 'assetNr' | null;
78
+ sortDir?: 'asc' | 'desc' | null;
79
79
  /**
80
80
  * Status
81
81
  */
@@ -1 +1 @@
1
- {"version":3,"file":"minting.d.ts","sourceRoot":"","sources":["../src/resources/minting.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,SAAS,CACP,KAAK,EAAE,sBAAsB,EAC7B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC;CAG7C;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAE3C;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,yBAAiB,wBAAwB,CAAC;IACxC,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,IAAI,CAAC;IAE3C;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvC;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnC;;OAEG;IACH,OAAO,CAAC,EACJ,UAAU,GACV,UAAU,GACV,WAAW,GACX,eAAe,GACf,MAAM,GACN,aAAa,GACb,gBAAgB,GAChB,SAAS,GACT,YAAY,GACZ,aAAa,GACb,QAAQ,GACR,eAAe,GACf,aAAa,GACb,SAAS,GACT,UAAU,GACV,SAAS,GACT,gBAAgB,GAChB,aAAa,GACb,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,WAAW,GACX,kBAAkB,GAClB,OAAO,GACP,KAAK,GACL,QAAQ,GACR,SAAS,GACT,kBAAkB,GAClB,iBAAiB,GACjB,QAAQ,GACR,iBAAiB,GACjB,gBAAgB,GAChB,UAAU,GACV,UAAU,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,IAAI,CAAC;IAElD;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC;IAElC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAExC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;CACxC;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
1
+ {"version":3,"file":"minting.d.ts","sourceRoot":"","sources":["../src/resources/minting.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa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AAU,GACV,SAAS,GACT,gBAAgB,GAChB,aAAa,GACb,aAAa,GACb,cAAc,GACd,QAAQ,GACR,QAAQ,GACR,eAAe,GACf,KAAK,GACL,WAAW,GACX,kBAAkB,GAClB,OAAO,GACP,KAAK,GACL,QAAQ,GACR,MAAM,GACN,aAAa,GACb,OAAO,GACP,cAAc,GACd,cAAc,GACd,OAAO,GACP,cAAc,GACd,YAAY,GACZ,SAAS,GACT,kBAAkB,GAClB,iBAAiB,GACjB,QAAQ,GACR,iBAAiB,GACjB,gBAAgB,GAChB,UAAU,GACV,QAAQ,GACR,UAAU,GACV,UAAU,GACV,QAAQ,GACR,cAAc,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,IAAI,CAAC;IAEjD;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC;IAElC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAExC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;CACxC;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -6,9 +6,15 @@ export declare class Referral extends APIResource {
6
6
  users: UsersAPI.Users;
7
7
  /**
8
8
  * This endpoint allows you to create a referral code
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const response = await client.referral.createCode({
13
+ * loyaltyRuleId: '558bcf56-24f1-4ef4-9787-043086295780',
14
+ * });
15
+ * ```
9
16
  */
10
- createCode(body?: ReferralCreateCodeParams, options?: Core.RequestOptions): Core.APIPromise<ReferralCreateCodeResponse>;
11
- createCode(options?: Core.RequestOptions): Core.APIPromise<ReferralCreateCodeResponse>;
17
+ createCode(body: ReferralCreateCodeParams, options?: Core.RequestOptions): Core.APIPromise<ReferralCreateCodeResponse>;
12
18
  }
13
19
  export interface ReferralCreateCodeResponse {
14
20
  id: string;
@@ -21,8 +27,10 @@ export interface ReferralCreateCodeResponse {
21
27
  websiteId: string;
22
28
  }
23
29
  export interface ReferralCreateCodeParams {
24
- loyaltyRuleId?: string;
30
+ loyaltyRuleId: string;
31
+ organizationId?: string;
25
32
  userId?: string;
33
+ websiteId?: string;
26
34
  }
27
35
  export declare namespace Referral {
28
36
  export { type ReferralCreateCodeResponse as ReferralCreateCodeResponse, type ReferralCreateCodeParams as ReferralCreateCodeParams, };
@@ -1 +1 @@
1
- {"version":3,"file":"referral.d.ts","sourceRoot":"","sources":["../../src/resources/referral/referral.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,cAAc,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAExG,qBAAa,QAAS,SAAQ,WAAW;IACvC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IAEzD;;OAEG;IACH,UAAU,CACR,IAAI,CAAC,EAAE,wBAAwB,EAC/B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,0BAA0B,CAAC;IAC9C,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,0BAA0B,CAAC;CAUvF;AAED,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAC;IAEX,SAAS,EAAE,MAAM,CAAC;IAElB,S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,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,cAAc,EAAE,MAAM,CAAC;IAEvB,YAAY,EAAE,MAAM,CAAC;IAErB,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,MAAM,CAAC;IAEf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,wBAAwB;IACvC,aAAa,EAAE,MAAM,CAAC;IAEtB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
@@ -26,7 +26,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  Object.defineProperty(exports, "__esModule", { value: true });
27
27
  exports.Referral = void 0;
28
28
  const resource_1 = require("../../resource.js");
29
- const core_1 = require("../../core.js");
30
29
  const UsersAPI = __importStar(require("./users.js"));
31
30
  const users_1 = require("./users.js");
32
31
  class Referral extends resource_1.APIResource {
@@ -34,10 +33,17 @@ class Referral extends resource_1.APIResource {
34
33
  super(...arguments);
35
34
  this.users = new UsersAPI.Users(this._client);
36
35
  }
37
- createCode(body = {}, options) {
38
- if ((0, core_1.isRequestOptions)(body)) {
39
- return this.createCode({}, body);
40
- }
36
+ /**
37
+ * This endpoint allows you to create a referral code
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const response = await client.referral.createCode({
42
+ * loyaltyRuleId: '558bcf56-24f1-4ef4-9787-043086295780',
43
+ * });
44
+ * ```
45
+ */
46
+ createCode(body, options) {
41
47
  return this._client.post('/api/referral/codes', { body, ...options });
42
48
  }
43
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"referral.js","sourceRoot":"","sources":["../../src/resources/referral/referral.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAC7C,wCAA8C;AAE9C,qDAAoC;AACpC,sCAAwG;AAExG,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAmB3D,CAAC;IATC,UAAU,CACR,OAAuD,EAAE,EACzD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SAClC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF;AApBD,4BAoBC;AA0BD,QAAQ,CAAC,KAAK,GAAG,aAAK,CAAC"}
1
+ {"version":3,"file":"referral.js","sourceRoot":"","sources":["../../src/resources/referral/referral.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAE7C,qDAAoC;AACpC,sCAAwG;AAExG,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkB3D,CAAC;IAhBC;;;;;;;;;OASG;IACH,UAAU,CACR,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF;AAnBD,4BAmBC;AA8BD,QAAQ,CAAC,KAAK,GAAG,aAAK,CAAC"}
@@ -1,6 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { APIResource } from "../../resource.mjs";
3
- import { isRequestOptions } from "../../core.mjs";
4
3
  import * as UsersAPI from "./users.mjs";
5
4
  import { Users } from "./users.mjs";
6
5
  export class Referral extends APIResource {
@@ -8,10 +7,17 @@ export class Referral extends APIResource {
8
7
  super(...arguments);
9
8
  this.users = new UsersAPI.Users(this._client);
10
9
  }
11
- createCode(body = {}, options) {
12
- if (isRequestOptions(body)) {
13
- return this.createCode({}, body);
14
- }
10
+ /**
11
+ * This endpoint allows you to create a referral code
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const response = await client.referral.createCode({
16
+ * loyaltyRuleId: '558bcf56-24f1-4ef4-9787-043086295780',
17
+ * });
18
+ * ```
19
+ */
20
+ createCode(body, options) {
15
21
  return this._client.post('/api/referral/codes', { body, ...options });
16
22
  }
17
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"referral.mjs","sourceRoot":"","sources":["../../src/resources/referral/referral.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,KAAK,QAAQ;OACb,EAA0E,KAAK,EAAE;AAExF,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAmB3D,CAAC;IATC,UAAU,CACR,OAAuD,EAAE,EACzD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SAClC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF;AA0BD,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC"}
1
+ {"version":3,"file":"referral.mjs","sourceRoot":"","sources":["../../src/resources/referral/referral.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,QAAQ;OACb,EAA0E,KAAK,EAAE;AAExF,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkB3D,CAAC;IAhBC;;;;;;;;;OASG;IACH,UAAU,CACR,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF;AA8BD,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC"}
@@ -3,12 +3,25 @@ import * as Core from "../../core.js";
3
3
  export declare class Users extends APIResource {
4
4
  /**
5
5
  * This endpoint allows you to create a referral user
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const user = await client.referral.users.create({
10
+ * userIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
11
+ * });
12
+ * ```
6
13
  */
7
14
  create(body: UserCreateParams, options?: Core.RequestOptions): Core.APIPromise<UserCreateResponse>;
8
15
  /**
9
16
  * This endpoint allows you to get referrals
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * const users = await client.referral.users.list();
21
+ * ```
10
22
  */
11
- list(query: UserListParams, options?: Core.RequestOptions): Core.APIPromise<UserListResponse>;
23
+ list(query?: UserListParams, options?: Core.RequestOptions): Core.APIPromise<UserListResponse>;
24
+ list(options?: Core.RequestOptions): Core.APIPromise<UserListResponse>;
12
25
  }
13
26
  export interface UserCreateResponse {
14
27
  message: string;
@@ -22,13 +35,26 @@ export declare namespace UserListResponse {
22
35
  id: string;
23
36
  referralCode: Data.ReferralCode;
24
37
  user: Data.User;
38
+ eligible?: boolean | null;
25
39
  }
26
40
  namespace Data {
27
41
  interface ReferralCode {
28
42
  id: string;
43
+ /**
44
+ * This will only return data for earnings after 2025-04-24
45
+ */
46
+ amount: number;
29
47
  createdAt: string;
30
48
  deletedAt: string | null;
31
49
  referralCode: string;
50
+ /**
51
+ * This will only return data for earnings after 2025-04-24
52
+ */
53
+ tier1Amount: number;
54
+ /**
55
+ * This will only return data for earnings after 2025-04-24
56
+ */
57
+ tier2Amount: number;
32
58
  updatedAt: string;
33
59
  userId: string;
34
60
  }
@@ -44,11 +70,11 @@ export interface UserCreateParams {
44
70
  referralCodeId?: string;
45
71
  }
46
72
  export interface UserListParams {
47
- walletAddress: string | Array<string>;
48
- includeEligibility?: boolean | null;
49
73
  limit?: number;
74
+ loyaltyRuleId?: string;
50
75
  organizationId?: string;
51
76
  startingAfter?: string;
77
+ walletAddress?: string | Array<string>;
52
78
  websiteId?: string;
53
79
  }
54
80
  export declare namespace Users {
@@ -1 +1 @@
1
- {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/resources/referral/users.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAIlG;;OAEG;IACH,IAAI,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC;CAG9F;AAED,MAAM,WAAW,kBAAkB;IACj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M,CAAC;YAElB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;YAEzB,YAAY,EAAE,MAAM,CAAC;YAErB;;eAEG;YACH,WAAW,EAAE,MAAM,CAAC;YAEpB;;eAEG;YACH,WAAW,EAAE,MAAM,CAAC;YAEpB,SAAS,EAAE,MAAM,CAAC;YAElB,MAAM,EAAE,MAAM,CAAC;SAChB;QAED,UAAiB,IAAI;YACnB,EAAE,EAAE,MAAM,CAAC;YAEX,aAAa,EAAE,MAAM,CAAC;SACvB;KACF;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEvB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAEvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
@@ -3,17 +3,25 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Users = void 0;
5
5
  const resource_1 = require("../../resource.js");
6
+ const core_1 = require("../../core.js");
6
7
  class Users extends resource_1.APIResource {
7
8
  /**
8
9
  * This endpoint allows you to create a referral user
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const user = await client.referral.users.create({
14
+ * userIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
15
+ * });
16
+ * ```
9
17
  */
10
18
  create(body, options) {
11
19
  return this._client.post('/api/referral/users', { body, ...options });
12
20
  }
13
- /**
14
- * This endpoint allows you to get referrals
15
- */
16
- list(query, options) {
21
+ list(query = {}, options) {
22
+ if ((0, core_1.isRequestOptions)(query)) {
23
+ return this.list({}, query);
24
+ }
17
25
  return this._client.get('/api/referral/users', { query, ...options });
18
26
  }
19
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/resources/referral/users.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAG7C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,MAAM,CAAC,IAAsB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,KAAqB,EAAE,OAA6B;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF;AAdD,sBAcC"}
1
+ {"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/resources/referral/users.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAC7C,wCAA8C;AAG9C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAsB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAYD,IAAI,CACF,QAA8C,EAAE,EAChD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF;AAlCD,sBAkCC"}
@@ -1,16 +1,24 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { APIResource } from "../../resource.mjs";
3
+ import { isRequestOptions } from "../../core.mjs";
3
4
  export class Users extends APIResource {
4
5
  /**
5
6
  * This endpoint allows you to create a referral user
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const user = await client.referral.users.create({
11
+ * userIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
12
+ * });
13
+ * ```
6
14
  */
7
15
  create(body, options) {
8
16
  return this._client.post('/api/referral/users', { body, ...options });
9
17
  }
10
- /**
11
- * This endpoint allows you to get referrals
12
- */
13
- list(query, options) {
18
+ list(query = {}, options) {
19
+ if (isRequestOptions(query)) {
20
+ return this.list({}, query);
21
+ }
14
22
  return this._client.get('/api/referral/users', { query, ...options });
15
23
  }
16
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"users.mjs","sourceRoot":"","sources":["../../src/resources/referral/users.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,MAAM,CAAC,IAAsB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,KAAqB,EAAE,OAA6B;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF"}
1
+ {"version":3,"file":"users.mjs","sourceRoot":"","sources":["../../src/resources/referral/users.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAG3B,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAsB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAYD,IAAI,CACF,QAA8C,EAAE,EAChD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF"}
@@ -1,3 +1,3 @@
1
1
  export { Metadatas, type MetadataCreateResponse, type MetadataListResponse, type MetadataCreateParams, type MetadataListParams, } from "./metadatas.js";
2
- export { Users, type UserListResponse, type UserConnectResponse, type UserCountResponse, type UserDisconnectResponse, type UserListParams, type UserConnectParams, type UserCountParams, type UserDisconnectParams, } from "./users.js";
2
+ export { Users, type UserListResponse, type UserConnectResponse, type UserCountResponse, type UserCreateDeviceResponse, type UserDisconnectResponse, type UserVerifyResponse, type UserListParams, type UserConnectParams, type UserCountParams, type UserCreateDeviceParams, type UserDisconnectParams, type UserVerifyParams, } from "./users.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/users/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,EACL,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,oBAAoB,GAC1B,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/users/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,EACL,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,GACtB,MAAM,SAAS,CAAC"}