|
2 | 2 |
|
3 | 3 | import { APIResource } from '../../../resource'; |
4 | 4 | import * as Core from '../../../core'; |
| 5 | +import * as V2API from './v2'; |
5 | 6 |
|
6 | 7 | export class Backtests extends APIResource { |
7 | 8 | /** |
@@ -97,129 +98,9 @@ export interface BacktestResults { |
97 | 98 |
|
98 | 99 | export namespace BacktestResults { |
99 | 100 | export interface Results { |
100 | | - current_version?: Results.CurrentVersion | null; |
| 101 | + current_version?: V2API.RuleStats | null; |
101 | 102 |
|
102 | | - draft_version?: Results.DraftVersion | null; |
103 | | - } |
104 | | - |
105 | | - export namespace Results { |
106 | | - export interface CurrentVersion { |
107 | | - /** |
108 | | - * The total number of historical transactions approved by this rule during the |
109 | | - * relevant period, or the number of transactions that would have been approved if |
110 | | - * the rule was evaluated in shadow mode. |
111 | | - */ |
112 | | - approved?: number; |
113 | | - |
114 | | - /** |
115 | | - * The total number of historical transactions challenged by this rule during the |
116 | | - * relevant period, or the number of transactions that would have been challenged |
117 | | - * if the rule was evaluated in shadow mode. Currently applicable only for 3DS Auth |
118 | | - * Rules. |
119 | | - */ |
120 | | - challenged?: number; |
121 | | - |
122 | | - /** |
123 | | - * The total number of historical transactions declined by this rule during the |
124 | | - * relevant period, or the number of transactions that would have been declined if |
125 | | - * the rule was evaluated in shadow mode. |
126 | | - */ |
127 | | - declined?: number; |
128 | | - |
129 | | - /** |
130 | | - * Example events and their outcomes. |
131 | | - */ |
132 | | - examples?: Array<CurrentVersion.Example>; |
133 | | - |
134 | | - /** |
135 | | - * The version of the rule, this is incremented whenever the rule's parameters |
136 | | - * change. |
137 | | - */ |
138 | | - version?: number; |
139 | | - } |
140 | | - |
141 | | - export namespace CurrentVersion { |
142 | | - export interface Example { |
143 | | - /** |
144 | | - * Whether the rule would have approved the request. |
145 | | - */ |
146 | | - approved?: boolean; |
147 | | - |
148 | | - /** |
149 | | - * The decision made by the rule for this event. |
150 | | - */ |
151 | | - decision?: 'APPROVED' | 'DECLINED' | 'CHALLENGED'; |
152 | | - |
153 | | - /** |
154 | | - * The event token. |
155 | | - */ |
156 | | - event_token?: string; |
157 | | - |
158 | | - /** |
159 | | - * The timestamp of the event. |
160 | | - */ |
161 | | - timestamp?: string; |
162 | | - } |
163 | | - } |
164 | | - |
165 | | - export interface DraftVersion { |
166 | | - /** |
167 | | - * The total number of historical transactions approved by this rule during the |
168 | | - * relevant period, or the number of transactions that would have been approved if |
169 | | - * the rule was evaluated in shadow mode. |
170 | | - */ |
171 | | - approved?: number; |
172 | | - |
173 | | - /** |
174 | | - * The total number of historical transactions challenged by this rule during the |
175 | | - * relevant period, or the number of transactions that would have been challenged |
176 | | - * if the rule was evaluated in shadow mode. Currently applicable only for 3DS Auth |
177 | | - * Rules. |
178 | | - */ |
179 | | - challenged?: number; |
180 | | - |
181 | | - /** |
182 | | - * The total number of historical transactions declined by this rule during the |
183 | | - * relevant period, or the number of transactions that would have been declined if |
184 | | - * the rule was evaluated in shadow mode. |
185 | | - */ |
186 | | - declined?: number; |
187 | | - |
188 | | - /** |
189 | | - * Example events and their outcomes. |
190 | | - */ |
191 | | - examples?: Array<DraftVersion.Example>; |
192 | | - |
193 | | - /** |
194 | | - * The version of the rule, this is incremented whenever the rule's parameters |
195 | | - * change. |
196 | | - */ |
197 | | - version?: number; |
198 | | - } |
199 | | - |
200 | | - export namespace DraftVersion { |
201 | | - export interface Example { |
202 | | - /** |
203 | | - * Whether the rule would have approved the request. |
204 | | - */ |
205 | | - approved?: boolean; |
206 | | - |
207 | | - /** |
208 | | - * The decision made by the rule for this event. |
209 | | - */ |
210 | | - decision?: 'APPROVED' | 'DECLINED' | 'CHALLENGED'; |
211 | | - |
212 | | - /** |
213 | | - * The event token. |
214 | | - */ |
215 | | - event_token?: string; |
216 | | - |
217 | | - /** |
218 | | - * The timestamp of the event. |
219 | | - */ |
220 | | - timestamp?: string; |
221 | | - } |
222 | | - } |
| 103 | + draft_version?: V2API.RuleStats | null; |
223 | 104 | } |
224 | 105 |
|
225 | 106 | export interface SimulationParameters { |
|
0 commit comments