@snagsolutions/sdk 0.1.0-alpha.10

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 +125 -0
  2. package/LICENSE +201 -0
  3. package/README.md +297 -0
  4. package/_shims/MultipartBody.d.ts +9 -0
  5. package/_shims/MultipartBody.d.ts.map +1 -0
  6. package/_shims/MultipartBody.js +16 -0
  7. package/_shims/MultipartBody.js.map +1 -0
  8. package/_shims/MultipartBody.mjs +12 -0
  9. package/_shims/MultipartBody.mjs.map +1 -0
  10. package/_shims/README.md +46 -0
  11. package/_shims/auto/runtime-bun.d.ts +5 -0
  12. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  13. package/_shims/auto/runtime-bun.js +21 -0
  14. package/_shims/auto/runtime-bun.js.map +1 -0
  15. package/_shims/auto/runtime-bun.mjs +2 -0
  16. package/_shims/auto/runtime-bun.mjs.map +1 -0
  17. package/_shims/auto/runtime-node.d.ts +5 -0
  18. package/_shims/auto/runtime-node.d.ts.map +1 -0
  19. package/_shims/auto/runtime-node.js +21 -0
  20. package/_shims/auto/runtime-node.js.map +1 -0
  21. package/_shims/auto/runtime-node.mjs +2 -0
  22. package/_shims/auto/runtime-node.mjs.map +1 -0
  23. package/_shims/auto/runtime.d.ts +5 -0
  24. package/_shims/auto/runtime.d.ts.map +1 -0
  25. package/_shims/auto/runtime.js +21 -0
  26. package/_shims/auto/runtime.js.map +1 -0
  27. package/_shims/auto/runtime.mjs +2 -0
  28. package/_shims/auto/runtime.mjs.map +1 -0
  29. package/_shims/auto/types-node.d.ts +5 -0
  30. package/_shims/auto/types-node.d.ts.map +1 -0
  31. package/_shims/auto/types-node.js +21 -0
  32. package/_shims/auto/types-node.js.map +1 -0
  33. package/_shims/auto/types-node.mjs +2 -0
  34. package/_shims/auto/types-node.mjs.map +1 -0
  35. package/_shims/auto/types.d.ts +101 -0
  36. package/_shims/auto/types.js +3 -0
  37. package/_shims/auto/types.mjs +3 -0
  38. package/_shims/bun-runtime.d.ts +6 -0
  39. package/_shims/bun-runtime.d.ts.map +1 -0
  40. package/_shims/bun-runtime.js +14 -0
  41. package/_shims/bun-runtime.js.map +1 -0
  42. package/_shims/bun-runtime.mjs +10 -0
  43. package/_shims/bun-runtime.mjs.map +1 -0
  44. package/_shims/index.d.ts +81 -0
  45. package/_shims/index.js +13 -0
  46. package/_shims/index.mjs +7 -0
  47. package/_shims/manual-types.d.ts +12 -0
  48. package/_shims/manual-types.js +3 -0
  49. package/_shims/manual-types.mjs +3 -0
  50. package/_shims/node-runtime.d.ts +3 -0
  51. package/_shims/node-runtime.d.ts.map +1 -0
  52. package/_shims/node-runtime.js +89 -0
  53. package/_shims/node-runtime.js.map +1 -0
  54. package/_shims/node-runtime.mjs +56 -0
  55. package/_shims/node-runtime.mjs.map +1 -0
  56. package/_shims/node-types.d.ts +42 -0
  57. package/_shims/node-types.js +3 -0
  58. package/_shims/node-types.mjs +3 -0
  59. package/_shims/registry.d.ts +37 -0
  60. package/_shims/registry.d.ts.map +1 -0
  61. package/_shims/registry.js +41 -0
  62. package/_shims/registry.js.map +1 -0
  63. package/_shims/registry.mjs +37 -0
  64. package/_shims/registry.mjs.map +1 -0
  65. package/_shims/web-runtime.d.ts +5 -0
  66. package/_shims/web-runtime.d.ts.map +1 -0
  67. package/_shims/web-runtime.js +78 -0
  68. package/_shims/web-runtime.js.map +1 -0
  69. package/_shims/web-runtime.mjs +71 -0
  70. package/_shims/web-runtime.mjs.map +1 -0
  71. package/_shims/web-types.d.ts +83 -0
  72. package/_shims/web-types.js +3 -0
  73. package/_shims/web-types.mjs +3 -0
  74. package/core.d.ts +241 -0
  75. package/core.d.ts.map +1 -0
  76. package/core.js +908 -0
  77. package/core.js.map +1 -0
  78. package/core.mjs +876 -0
  79. package/core.mjs.map +1 -0
  80. package/error.d.ts +47 -0
  81. package/error.d.ts.map +1 -0
  82. package/error.js +113 -0
  83. package/error.js.map +1 -0
  84. package/error.mjs +97 -0
  85. package/error.mjs.map +1 -0
  86. package/index.d.mts +126 -0
  87. package/index.d.ts +126 -0
  88. package/index.d.ts.map +1 -0
  89. package/index.js +141 -0
  90. package/index.js.map +1 -0
  91. package/index.mjs +98 -0
  92. package/index.mjs.map +1 -0
  93. package/internal/qs/formats.d.ts +6 -0
  94. package/internal/qs/formats.d.ts.map +1 -0
  95. package/internal/qs/formats.js +11 -0
  96. package/internal/qs/formats.js.map +1 -0
  97. package/internal/qs/formats.mjs +8 -0
  98. package/internal/qs/formats.mjs.map +1 -0
  99. package/internal/qs/index.d.ts +10 -0
  100. package/internal/qs/index.d.ts.map +1 -0
  101. package/internal/qs/index.js +14 -0
  102. package/internal/qs/index.js.map +1 -0
  103. package/internal/qs/index.mjs +10 -0
  104. package/internal/qs/index.mjs.map +1 -0
  105. package/internal/qs/stringify.d.ts +3 -0
  106. package/internal/qs/stringify.d.ts.map +1 -0
  107. package/internal/qs/stringify.js +280 -0
  108. package/internal/qs/stringify.js.map +1 -0
  109. package/internal/qs/stringify.mjs +276 -0
  110. package/internal/qs/stringify.mjs.map +1 -0
  111. package/internal/qs/types.d.ts +57 -0
  112. package/internal/qs/types.d.ts.map +1 -0
  113. package/internal/qs/types.js +3 -0
  114. package/internal/qs/types.js.map +1 -0
  115. package/internal/qs/types.mjs +2 -0
  116. package/internal/qs/types.mjs.map +1 -0
  117. package/internal/qs/utils.d.ts +14 -0
  118. package/internal/qs/utils.d.ts.map +1 -0
  119. package/internal/qs/utils.js +229 -0
  120. package/internal/qs/utils.js.map +1 -0
  121. package/internal/qs/utils.mjs +217 -0
  122. package/internal/qs/utils.mjs.map +1 -0
  123. package/package.json +103 -0
  124. package/resource.d.ts +6 -0
  125. package/resource.d.ts.map +1 -0
  126. package/resource.js +11 -0
  127. package/resource.js.map +1 -0
  128. package/resource.mjs +7 -0
  129. package/resource.mjs.map +1 -0
  130. package/resources/assets.d.ts +50 -0
  131. package/resources/assets.d.ts.map +1 -0
  132. package/resources/assets.js +17 -0
  133. package/resources/assets.js.map +1 -0
  134. package/resources/assets.mjs +13 -0
  135. package/resources/assets.mjs.map +1 -0
  136. package/resources/auction-bids.d.ts +81 -0
  137. package/resources/auction-bids.d.ts.map +1 -0
  138. package/resources/auction-bids.js +30 -0
  139. package/resources/auction-bids.js.map +1 -0
  140. package/resources/auction-bids.mjs +26 -0
  141. package/resources/auction-bids.mjs.map +1 -0
  142. package/resources/drip/drip.d.ts +14 -0
  143. package/resources/drip/drip.d.ts.map +1 -0
  144. package/resources/drip/drip.js +43 -0
  145. package/resources/drip/drip.js.map +1 -0
  146. package/resources/drip/drip.mjs +16 -0
  147. package/resources/drip/drip.mjs.map +1 -0
  148. package/resources/drip/index.d.ts +4 -0
  149. package/resources/drip/index.d.ts.map +1 -0
  150. package/resources/drip/index.js +11 -0
  151. package/resources/drip/index.js.map +1 -0
  152. package/resources/drip/index.mjs +5 -0
  153. package/resources/drip/index.mjs.map +1 -0
  154. package/resources/drip/quests.d.ts +168 -0
  155. package/resources/drip/quests.d.ts.map +1 -0
  156. package/resources/drip/quests.js +17 -0
  157. package/resources/drip/quests.js.map +1 -0
  158. package/resources/drip/quests.mjs +13 -0
  159. package/resources/drip/quests.mjs.map +1 -0
  160. package/resources/drip/status.d.ts +26 -0
  161. package/resources/drip/status.d.ts.map +1 -0
  162. package/resources/drip/status.js +16 -0
  163. package/resources/drip/status.js.map +1 -0
  164. package/resources/drip/status.mjs +12 -0
  165. package/resources/drip/status.mjs.map +1 -0
  166. package/resources/index.d.ts +7 -0
  167. package/resources/index.d.ts.map +1 -0
  168. package/resources/index.js +17 -0
  169. package/resources/index.js.map +1 -0
  170. package/resources/index.mjs +8 -0
  171. package/resources/index.mjs.map +1 -0
  172. package/resources/loyalty/accounts.d.ts +157 -0
  173. package/resources/loyalty/accounts.d.ts.map +1 -0
  174. package/resources/loyalty/accounts.js +16 -0
  175. package/resources/loyalty/accounts.js.map +1 -0
  176. package/resources/loyalty/accounts.mjs +12 -0
  177. package/resources/loyalty/accounts.mjs.map +1 -0
  178. package/resources/loyalty/badges.d.ts +299 -0
  179. package/resources/loyalty/badges.d.ts.map +1 -0
  180. package/resources/loyalty/badges.js +46 -0
  181. package/resources/loyalty/badges.js.map +1 -0
  182. package/resources/loyalty/badges.mjs +42 -0
  183. package/resources/loyalty/badges.mjs.map +1 -0
  184. package/resources/loyalty/currencies.d.ts +252 -0
  185. package/resources/loyalty/currencies.d.ts.map +1 -0
  186. package/resources/loyalty/currencies.js +21 -0
  187. package/resources/loyalty/currencies.js.map +1 -0
  188. package/resources/loyalty/currencies.mjs +17 -0
  189. package/resources/loyalty/currencies.mjs.map +1 -0
  190. package/resources/loyalty/index.d.ts +9 -0
  191. package/resources/loyalty/index.d.ts.map +1 -0
  192. package/resources/loyalty/index.js +21 -0
  193. package/resources/loyalty/index.js.map +1 -0
  194. package/resources/loyalty/index.mjs +10 -0
  195. package/resources/loyalty/index.mjs.map +1 -0
  196. package/resources/loyalty/loyalty.d.ts +34 -0
  197. package/resources/loyalty/loyalty.d.ts.map +1 -0
  198. package/resources/loyalty/loyalty.js +63 -0
  199. package/resources/loyalty/loyalty.js.map +1 -0
  200. package/resources/loyalty/loyalty.mjs +36 -0
  201. package/resources/loyalty/loyalty.mjs.map +1 -0
  202. package/resources/loyalty/multipliers.d.ts +129 -0
  203. package/resources/loyalty/multipliers.d.ts.map +1 -0
  204. package/resources/loyalty/multipliers.js +34 -0
  205. package/resources/loyalty/multipliers.js.map +1 -0
  206. package/resources/loyalty/multipliers.mjs +30 -0
  207. package/resources/loyalty/multipliers.mjs.map +1 -0
  208. package/resources/loyalty/rule-edits.d.ts +330 -0
  209. package/resources/loyalty/rule-edits.d.ts.map +1 -0
  210. package/resources/loyalty/rule-edits.js +21 -0
  211. package/resources/loyalty/rule-edits.js.map +1 -0
  212. package/resources/loyalty/rule-edits.mjs +17 -0
  213. package/resources/loyalty/rule-edits.mjs.map +1 -0
  214. package/resources/loyalty/rules.d.ts +2430 -0
  215. package/resources/loyalty/rules.d.ts.map +1 -0
  216. package/resources/loyalty/rules.js +46 -0
  217. package/resources/loyalty/rules.js.map +1 -0
  218. package/resources/loyalty/rules.mjs +42 -0
  219. package/resources/loyalty/rules.mjs.map +1 -0
  220. package/resources/loyalty/transaction-entries.d.ts +175 -0
  221. package/resources/loyalty/transaction-entries.d.ts.map +1 -0
  222. package/resources/loyalty/transaction-entries.js +16 -0
  223. package/resources/loyalty/transaction-entries.js.map +1 -0
  224. package/resources/loyalty/transaction-entries.mjs +12 -0
  225. package/resources/loyalty/transaction-entries.mjs.map +1 -0
  226. package/resources/users/index.d.ts +4 -0
  227. package/resources/users/index.d.ts.map +1 -0
  228. package/resources/users/index.js +11 -0
  229. package/resources/users/index.js.map +1 -0
  230. package/resources/users/index.mjs +5 -0
  231. package/resources/users/index.mjs.map +1 -0
  232. package/resources/users/metadatas.d.ts +64 -0
  233. package/resources/users/metadatas.d.ts.map +1 -0
  234. package/resources/users/metadatas.js +16 -0
  235. package/resources/users/metadatas.js.map +1 -0
  236. package/resources/users/metadatas.mjs +12 -0
  237. package/resources/users/metadatas.mjs.map +1 -0
  238. package/resources/users/users.d.ts +14 -0
  239. package/resources/users/users.d.ts.map +1 -0
  240. package/resources/users/users.js +43 -0
  241. package/resources/users/users.js.map +1 -0
  242. package/resources/users/users.mjs +16 -0
  243. package/resources/users/users.mjs.map +1 -0
  244. package/resources/users/wallets.d.ts +193 -0
  245. package/resources/users/wallets.d.ts.map +1 -0
  246. package/resources/users/wallets.js +28 -0
  247. package/resources/users/wallets.js.map +1 -0
  248. package/resources/users/wallets.mjs +24 -0
  249. package/resources/users/wallets.mjs.map +1 -0
  250. package/resources/websites.d.ts +203 -0
  251. package/resources/websites.d.ts.map +1 -0
  252. package/resources/websites.js +22 -0
  253. package/resources/websites.js.map +1 -0
  254. package/resources/websites.mjs +18 -0
  255. package/resources/websites.mjs.map +1 -0
  256. package/shims/node.d.ts +30 -0
  257. package/shims/node.d.ts.map +1 -0
  258. package/shims/node.js +31 -0
  259. package/shims/node.js.map +1 -0
  260. package/shims/node.mjs +5 -0
  261. package/shims/node.mjs.map +1 -0
  262. package/shims/web.d.ts +26 -0
  263. package/shims/web.d.ts.map +1 -0
  264. package/shims/web.js +31 -0
  265. package/shims/web.js.map +1 -0
  266. package/shims/web.mjs +5 -0
  267. package/shims/web.mjs.map +1 -0
  268. package/src/_shims/MultipartBody.ts +9 -0
  269. package/src/_shims/README.md +46 -0
  270. package/src/_shims/auto/runtime-bun.ts +4 -0
  271. package/src/_shims/auto/runtime-node.ts +4 -0
  272. package/src/_shims/auto/runtime.ts +4 -0
  273. package/src/_shims/auto/types-node.ts +4 -0
  274. package/src/_shims/auto/types.d.ts +101 -0
  275. package/src/_shims/auto/types.js +3 -0
  276. package/src/_shims/auto/types.mjs +3 -0
  277. package/src/_shims/bun-runtime.ts +14 -0
  278. package/src/_shims/index.d.ts +81 -0
  279. package/src/_shims/index.js +13 -0
  280. package/src/_shims/index.mjs +7 -0
  281. package/src/_shims/manual-types.d.ts +12 -0
  282. package/src/_shims/manual-types.js +3 -0
  283. package/src/_shims/manual-types.mjs +3 -0
  284. package/src/_shims/node-runtime.ts +81 -0
  285. package/src/_shims/node-types.d.ts +42 -0
  286. package/src/_shims/node-types.js +3 -0
  287. package/src/_shims/node-types.mjs +3 -0
  288. package/src/_shims/registry.ts +67 -0
  289. package/src/_shims/web-runtime.ts +103 -0
  290. package/src/_shims/web-types.d.ts +83 -0
  291. package/src/_shims/web-types.js +3 -0
  292. package/src/_shims/web-types.mjs +3 -0
  293. package/src/core.ts +1201 -0
  294. package/src/error.ts +130 -0
  295. package/src/index.ts +235 -0
  296. package/src/internal/qs/LICENSE.md +13 -0
  297. package/src/internal/qs/README.md +3 -0
  298. package/src/internal/qs/formats.ts +9 -0
  299. package/src/internal/qs/index.ts +13 -0
  300. package/src/internal/qs/stringify.ts +388 -0
  301. package/src/internal/qs/types.ts +71 -0
  302. package/src/internal/qs/utils.ts +265 -0
  303. package/src/lib/.keep +4 -0
  304. package/src/resource.ts +11 -0
  305. package/src/resources/assets.ts +71 -0
  306. package/src/resources/auction-bids.ts +123 -0
  307. package/src/resources/drip/drip.ts +25 -0
  308. package/src/resources/drip/index.ts +5 -0
  309. package/src/resources/drip/quests.ts +210 -0
  310. package/src/resources/drip/status.ts +33 -0
  311. package/src/resources/index.ts +14 -0
  312. package/src/resources/loyalty/accounts.ts +199 -0
  313. package/src/resources/loyalty/badges.ts +435 -0
  314. package/src/resources/loyalty/currencies.ts +321 -0
  315. package/src/resources/loyalty/index.ts +61 -0
  316. package/src/resources/loyalty/loyalty.ts +159 -0
  317. package/src/resources/loyalty/multipliers.ts +238 -0
  318. package/src/resources/loyalty/rule-edits.ts +421 -0
  319. package/src/resources/loyalty/rules.ts +3513 -0
  320. package/src/resources/loyalty/transaction-entries.ts +229 -0
  321. package/src/resources/users/index.ts +12 -0
  322. package/src/resources/users/metadatas.ts +103 -0
  323. package/src/resources/users/users.ts +39 -0
  324. package/src/resources/users/wallets.ts +271 -0
  325. package/src/resources/websites.ts +259 -0
  326. package/src/shims/node.ts +50 -0
  327. package/src/shims/web.ts +50 -0
  328. package/src/tsconfig.json +11 -0
  329. package/src/uploads.ts +255 -0
  330. package/src/version.ts +1 -0
  331. package/uploads.d.ts +75 -0
  332. package/uploads.d.ts.map +1 -0
  333. package/uploads.js +171 -0
  334. package/uploads.js.map +1 -0
  335. package/uploads.mjs +158 -0
  336. package/uploads.mjs.map +1 -0
  337. package/version.d.ts +2 -0
  338. package/version.d.ts.map +1 -0
  339. package/version.js +5 -0
  340. package/version.js.map +1 -0
  341. package/version.mjs +2 -0
  342. package/version.mjs.map +1 -0
@@ -0,0 +1,330 @@
1
+ import { APIResource } from "../../resource.js";
2
+ import * as Core from "../../core.js";
3
+ export declare class RuleEdits extends APIResource {
4
+ /**
5
+ * Retrieve configured loyalty rule edits with optional pagination and filters
6
+ */
7
+ retrieve(query: RuleEditRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<RuleEditRetrieveResponse>;
8
+ /**
9
+ * Restore a loyalty rule from a rule edit
10
+ */
11
+ restore(id: string, body?: RuleEditRestoreParams | null | undefined, options?: Core.RequestOptions): Core.APIPromise<RuleEditRestoreResponse>;
12
+ }
13
+ export interface RuleEditRetrieveResponse {
14
+ data: Array<RuleEditRetrieveResponse.Data>;
15
+ hasNextPage: boolean;
16
+ }
17
+ export declare namespace RuleEditRetrieveResponse {
18
+ interface Data {
19
+ /**
20
+ * Unique identifier for the rule edit
21
+ */
22
+ id: string;
23
+ /**
24
+ * Type of action that was made on the rule
25
+ */
26
+ action: 'create' | 'update' | 'delete' | 'restore';
27
+ /**
28
+ * Data that was changed on the rule
29
+ */
30
+ data: Data.Data;
31
+ /**
32
+ * Timestamp of when the rule edit was made
33
+ */
34
+ editedAt: string;
35
+ /**
36
+ * User ID of the user who made the edit
37
+ */
38
+ editedByUserId: string;
39
+ /**
40
+ * ID of the loyalty rule
41
+ */
42
+ loyaltyRuleId: string;
43
+ /**
44
+ * Unique identifier for the organization
45
+ */
46
+ organizationId: string;
47
+ /**
48
+ * Unique identifier for the website
49
+ */
50
+ websiteId: string;
51
+ /**
52
+ * Comment that was made on the edit
53
+ */
54
+ comment?: string;
55
+ /**
56
+ * Previous data of the rule before the edit
57
+ */
58
+ previousData?: Data.PreviousData;
59
+ }
60
+ namespace Data {
61
+ /**
62
+ * Data that was changed on the rule
63
+ */
64
+ interface Data {
65
+ /**
66
+ * Unique identifier for the loyalty rule
67
+ */
68
+ id: string;
69
+ /**
70
+ * Amount associated with the loyalty rule
71
+ */
72
+ amount: number;
73
+ /**
74
+ * Timestamp when the loyalty rule was created
75
+ */
76
+ createdAt: string;
77
+ /**
78
+ * Timestamp when the loyalty rule was deleted (if applicable)
79
+ */
80
+ deletedAt: string | null;
81
+ /**
82
+ * Frequency of the loyalty rule
83
+ */
84
+ frequency: string;
85
+ /**
86
+ * Unique identifier for the organization
87
+ */
88
+ organizationId: string;
89
+ /**
90
+ * Type of the loyalty rule
91
+ */
92
+ type: string;
93
+ /**
94
+ * Timestamp when the loyalty rule was last updated
95
+ */
96
+ updatedAt: string;
97
+ /**
98
+ * Unique identifier for the website
99
+ */
100
+ websiteId: string;
101
+ /**
102
+ * Optional address of the collection
103
+ */
104
+ collectionAddress?: string;
105
+ /**
106
+ * Optional metadata for the loyalty rule
107
+ */
108
+ metadata?: Record<string, unknown>;
109
+ }
110
+ /**
111
+ * Previous data of the rule before the edit
112
+ */
113
+ interface PreviousData {
114
+ /**
115
+ * Unique identifier for the loyalty rule
116
+ */
117
+ id: string;
118
+ /**
119
+ * Amount associated with the loyalty rule
120
+ */
121
+ amount: number;
122
+ /**
123
+ * Timestamp when the loyalty rule was created
124
+ */
125
+ createdAt: string;
126
+ /**
127
+ * Timestamp when the loyalty rule was deleted (if applicable)
128
+ */
129
+ deletedAt: string | null;
130
+ /**
131
+ * Frequency of the loyalty rule
132
+ */
133
+ frequency: string;
134
+ /**
135
+ * Unique identifier for the organization
136
+ */
137
+ organizationId: string;
138
+ /**
139
+ * Type of the loyalty rule
140
+ */
141
+ type: string;
142
+ /**
143
+ * Timestamp when the loyalty rule was last updated
144
+ */
145
+ updatedAt: string;
146
+ /**
147
+ * Unique identifier for the website
148
+ */
149
+ websiteId: string;
150
+ /**
151
+ * Optional address of the collection
152
+ */
153
+ collectionAddress?: string;
154
+ /**
155
+ * Optional metadata for the loyalty rule
156
+ */
157
+ metadata?: Record<string, unknown>;
158
+ }
159
+ }
160
+ }
161
+ export interface RuleEditRestoreResponse {
162
+ /**
163
+ * Unique identifier for the rule edit
164
+ */
165
+ id: string;
166
+ /**
167
+ * Type of action that was made on the rule
168
+ */
169
+ action: 'create' | 'update' | 'delete' | 'restore';
170
+ /**
171
+ * Data that was changed on the rule
172
+ */
173
+ data: RuleEditRestoreResponse.Data;
174
+ /**
175
+ * Timestamp of when the rule edit was made
176
+ */
177
+ editedAt: string;
178
+ /**
179
+ * User ID of the user who made the edit
180
+ */
181
+ editedByUserId: string;
182
+ /**
183
+ * ID of the loyalty rule
184
+ */
185
+ loyaltyRuleId: string;
186
+ /**
187
+ * Unique identifier for the organization
188
+ */
189
+ organizationId: string;
190
+ /**
191
+ * Unique identifier for the website
192
+ */
193
+ websiteId: string;
194
+ /**
195
+ * Comment that was made on the edit
196
+ */
197
+ comment?: string;
198
+ /**
199
+ * Previous data of the rule before the edit
200
+ */
201
+ previousData?: RuleEditRestoreResponse.PreviousData;
202
+ }
203
+ export declare namespace RuleEditRestoreResponse {
204
+ /**
205
+ * Data that was changed on the rule
206
+ */
207
+ interface Data {
208
+ /**
209
+ * Unique identifier for the loyalty rule
210
+ */
211
+ id: string;
212
+ /**
213
+ * Amount associated with the loyalty rule
214
+ */
215
+ amount: number;
216
+ /**
217
+ * Timestamp when the loyalty rule was created
218
+ */
219
+ createdAt: string;
220
+ /**
221
+ * Timestamp when the loyalty rule was deleted (if applicable)
222
+ */
223
+ deletedAt: string | null;
224
+ /**
225
+ * Frequency of the loyalty rule
226
+ */
227
+ frequency: string;
228
+ /**
229
+ * Unique identifier for the organization
230
+ */
231
+ organizationId: string;
232
+ /**
233
+ * Type of the loyalty rule
234
+ */
235
+ type: string;
236
+ /**
237
+ * Timestamp when the loyalty rule was last updated
238
+ */
239
+ updatedAt: string;
240
+ /**
241
+ * Unique identifier for the website
242
+ */
243
+ websiteId: string;
244
+ /**
245
+ * Optional address of the collection
246
+ */
247
+ collectionAddress?: string;
248
+ /**
249
+ * Optional metadata for the loyalty rule
250
+ */
251
+ metadata?: Record<string, unknown>;
252
+ }
253
+ /**
254
+ * Previous data of the rule before the edit
255
+ */
256
+ interface PreviousData {
257
+ /**
258
+ * Unique identifier for the loyalty rule
259
+ */
260
+ id: string;
261
+ /**
262
+ * Amount associated with the loyalty rule
263
+ */
264
+ amount: number;
265
+ /**
266
+ * Timestamp when the loyalty rule was created
267
+ */
268
+ createdAt: string;
269
+ /**
270
+ * Timestamp when the loyalty rule was deleted (if applicable)
271
+ */
272
+ deletedAt: string | null;
273
+ /**
274
+ * Frequency of the loyalty rule
275
+ */
276
+ frequency: string;
277
+ /**
278
+ * Unique identifier for the organization
279
+ */
280
+ organizationId: string;
281
+ /**
282
+ * Type of the loyalty rule
283
+ */
284
+ type: string;
285
+ /**
286
+ * Timestamp when the loyalty rule was last updated
287
+ */
288
+ updatedAt: string;
289
+ /**
290
+ * Unique identifier for the website
291
+ */
292
+ websiteId: string;
293
+ /**
294
+ * Optional address of the collection
295
+ */
296
+ collectionAddress?: string;
297
+ /**
298
+ * Optional metadata for the loyalty rule
299
+ */
300
+ metadata?: Record<string, unknown>;
301
+ }
302
+ }
303
+ export interface RuleEditRetrieveParams {
304
+ /**
305
+ * ID of the loyalty rule
306
+ */
307
+ loyaltyRuleId: boolean;
308
+ /**
309
+ * Maximum number of edits to return
310
+ */
311
+ limit?: number | null;
312
+ /**
313
+ * Unique identifier for the organization to filter by
314
+ */
315
+ organizationId?: string;
316
+ /**
317
+ * Pagination cursor to start after a specific rule edit ID
318
+ */
319
+ startingAfter?: string;
320
+ /**
321
+ * Unique identifier for the website to filter by
322
+ */
323
+ websiteId?: string;
324
+ }
325
+ export interface RuleEditRestoreParams {
326
+ }
327
+ export declare namespace RuleEdits {
328
+ export { type RuleEditRetrieveResponse as RuleEditRetrieveResponse, type RuleEditRestoreResponse as RuleEditRestoreResponse, type RuleEditRetrieveParams as RuleEditRetrieveParams, type RuleEditRestoreParams as RuleEditRestoreParams, };
329
+ }
330
+ //# sourceMappingURL=rule-edits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-edits.d.ts","sourceRoot":"","sources":["../../src/resources/loyalty/rule-edits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,QAAQ,CACN,KAAK,EAAE,sBAAsB,EAC7B,OAAO,CAAC,EAAE,IAAI,C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AM,CAAC;QAE3B;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpC;CACF;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;CAAG;AAEzC,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.RuleEdits = void 0;
5
+ const resource_1 = require("../../resource.js");
6
+ class RuleEdits extends resource_1.APIResource {
7
+ /**
8
+ * Retrieve configured loyalty rule edits with optional pagination and filters
9
+ */
10
+ retrieve(query, options) {
11
+ return this._client.get('/api/loyalty/rule_edits', { query, ...options });
12
+ }
13
+ /**
14
+ * Restore a loyalty rule from a rule edit
15
+ */
16
+ restore(id, body, options) {
17
+ return this._client.post(`/api/api/loyalty/rule_edits/${id}/restore`, { body, ...options });
18
+ }
19
+ }
20
+ exports.RuleEdits = RuleEdits;
21
+ //# sourceMappingURL=rule-edits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-edits.js","sourceRoot":"","sources":["../../src/resources/loyalty/rule-edits.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAG7C,MAAa,SAAU,SAAQ,sBAAW;IACxC;;OAEG;IACH,QAAQ,CACN,KAA6B,EAC7B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACH,OAAO,CACL,EAAU,EACV,IAA+C,EAC/C,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9F,CAAC;CACF;AArBD,8BAqBC"}
@@ -0,0 +1,17 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../resource.mjs";
3
+ export class RuleEdits extends APIResource {
4
+ /**
5
+ * Retrieve configured loyalty rule edits with optional pagination and filters
6
+ */
7
+ retrieve(query, options) {
8
+ return this._client.get('/api/loyalty/rule_edits', { query, ...options });
9
+ }
10
+ /**
11
+ * Restore a loyalty rule from a rule edit
12
+ */
13
+ restore(id, body, options) {
14
+ return this._client.post(`/api/api/loyalty/rule_edits/${id}/restore`, { body, ...options });
15
+ }
16
+ }
17
+ //# sourceMappingURL=rule-edits.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-edits.mjs","sourceRoot":"","sources":["../../src/resources/loyalty/rule-edits.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,QAAQ,CACN,KAA6B,EAC7B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACH,OAAO,CACL,EAAU,EACV,IAA+C,EAC/C,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9F,CAAC;CACF"}