@sentio/api 1.0.5-rc.8 → 2.0.0-rc.1

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.
package/src/sdk.gen.ts DELETED
@@ -1,1766 +0,0 @@
1
- // This file is auto-generated by @hey-api/openapi-ts
2
-
3
- import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';
4
- import type { ai_service, alert_service, analytic_service, web_service, insights_service, metrics_service, google, move_service, price_service, processor_service, solidity_service, solidit_service } from './types.gen';
5
- import { client as _heyApiClient } from './client.gen';
6
-
7
- export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
8
- /**
9
- * You can provide a client instance returned by `createClient()` instead of
10
- * individual options. This might be also useful if you want to implement a
11
- * custom client.
12
- */
13
- client?: Client;
14
- /**
15
- * You can pass arbitrary values through the `meta` object. This can be
16
- * used to access values that aren't defined as part of the SDK function.
17
- */
18
- meta?: Record<string, unknown>;
19
- };
20
-
21
- export class AiService {
22
- /**
23
- * Create Chat Session
24
- * Initialize a new AI chat session. Returns a session_id that can be used with PostSessionMessage to have a conversation with the AI. Messages are generated as part of runs, with is_final indicating run completion.
25
- */
26
- public static createChatSession<ThrowOnError extends boolean = false>(options: Options<ai_service.CreateChatSessionData, ThrowOnError>) {
27
- return (options.client ?? _heyApiClient).post<ai_service.CreateChatSessionResponse2, unknown, ThrowOnError>({
28
- security: [
29
- {
30
- name: 'api-key',
31
- type: 'apiKey'
32
- },
33
- {
34
- in: 'query',
35
- name: 'api-key',
36
- type: 'apiKey'
37
- }
38
- ],
39
- url: '/v1/ai/chat',
40
- ...options,
41
- headers: {
42
- 'Content-Type': 'application/json',
43
- ...options?.headers
44
- }
45
- });
46
- }
47
-
48
- /**
49
- * Query Chat Session
50
- * Retrieve information about an existing chat session, returning only messages after the specified cursor position. Messages include run_id to identify generation runs.
51
- */
52
- public static queryChatSession<ThrowOnError extends boolean = false>(options: Options<ai_service.QueryChatSessionData, ThrowOnError>) {
53
- return (options.client ?? _heyApiClient).get<ai_service.QueryChatSessionResponse, unknown, ThrowOnError>({
54
- security: [
55
- {
56
- name: 'api-key',
57
- type: 'apiKey'
58
- },
59
- {
60
- in: 'query',
61
- name: 'api-key',
62
- type: 'apiKey'
63
- }
64
- ],
65
- url: '/v1/ai/chat/{sessionId}',
66
- ...options
67
- });
68
- }
69
-
70
- /**
71
- * Post Session Message
72
- * Add a new message to an existing chat session. This will trigger AI message generation as a run. check is_final to know when all messages for the run have been generated.
73
- */
74
- public static postSessionMessage<ThrowOnError extends boolean = false>(options: Options<ai_service.PostSessionMessageData, ThrowOnError>) {
75
- return (options.client ?? _heyApiClient).post<ai_service.PostSessionMessageResponse2, unknown, ThrowOnError>({
76
- security: [
77
- {
78
- name: 'api-key',
79
- type: 'apiKey'
80
- },
81
- {
82
- in: 'query',
83
- name: 'api-key',
84
- type: 'apiKey'
85
- }
86
- ],
87
- url: '/v1/ai/chat/{sessionId}/message',
88
- ...options,
89
- headers: {
90
- 'Content-Type': 'application/json',
91
- ...options?.headers
92
- }
93
- });
94
- }
95
-
96
- /**
97
- * Healthz provides a health check endpoint for monitoring
98
- */
99
- public static healthz<ThrowOnError extends boolean = false>(options?: Options<ai_service.HealthzData, ThrowOnError>) {
100
- return (options?.client ?? _heyApiClient).get<ai_service.HealthzResponse2, unknown, ThrowOnError>({
101
- security: [
102
- {
103
- name: 'api-key',
104
- type: 'apiKey'
105
- },
106
- {
107
- in: 'query',
108
- name: 'api-key',
109
- type: 'apiKey'
110
- }
111
- ],
112
- url: '/v1/ai/healthz',
113
- ...options
114
- });
115
- }
116
-
117
- }
118
-
119
- export class AlertsService {
120
- /**
121
- * Save an alert rule
122
- */
123
- public static saveAlertRule<ThrowOnError extends boolean = false>(options: Options<alert_service.SaveAlertRuleData, ThrowOnError>) {
124
- return (options.client ?? _heyApiClient).post<alert_service.SaveAlertRuleResponse, unknown, ThrowOnError>({
125
- security: [
126
- {
127
- name: 'api-key',
128
- type: 'apiKey'
129
- },
130
- {
131
- in: 'query',
132
- name: 'api-key',
133
- type: 'apiKey'
134
- }
135
- ],
136
- url: '/v1/alerts/rule',
137
- ...options,
138
- headers: {
139
- 'Content-Type': 'application/json',
140
- ...options?.headers
141
- }
142
- });
143
- }
144
-
145
- /**
146
- * List all alert rules for a project
147
- */
148
- public static getAlertRules<ThrowOnError extends boolean = false>(options: Options<alert_service.GetAlertRulesData, ThrowOnError>) {
149
- return (options.client ?? _heyApiClient).get<alert_service.GetAlertRulesResponse2, unknown, ThrowOnError>({
150
- security: [
151
- {
152
- name: 'api-key',
153
- type: 'apiKey'
154
- },
155
- {
156
- in: 'query',
157
- name: 'api-key',
158
- type: 'apiKey'
159
- }
160
- ],
161
- url: '/v1/alerts/rule/project/{projectId}',
162
- ...options
163
- });
164
- }
165
-
166
- /**
167
- * Delete an alert rule
168
- */
169
- public static deleteAlertRule<ThrowOnError extends boolean = false>(options: Options<alert_service.DeleteAlertRuleData, ThrowOnError>) {
170
- return (options.client ?? _heyApiClient).delete<alert_service.DeleteAlertRuleResponse, unknown, ThrowOnError>({
171
- security: [
172
- {
173
- name: 'api-key',
174
- type: 'apiKey'
175
- },
176
- {
177
- in: 'query',
178
- name: 'api-key',
179
- type: 'apiKey'
180
- }
181
- ],
182
- url: '/v1/alerts/rule/{id}',
183
- ...options
184
- });
185
- }
186
-
187
- /**
188
- * Save an alert rule
189
- */
190
- public static saveAlertRule2<ThrowOnError extends boolean = false>(options: Options<alert_service.SaveAlertRule2Data, ThrowOnError>) {
191
- return (options.client ?? _heyApiClient).put<alert_service.SaveAlertRule2Response, unknown, ThrowOnError>({
192
- security: [
193
- {
194
- name: 'api-key',
195
- type: 'apiKey'
196
- },
197
- {
198
- in: 'query',
199
- name: 'api-key',
200
- type: 'apiKey'
201
- }
202
- ],
203
- url: '/v1/alerts/rule/{id}',
204
- ...options,
205
- headers: {
206
- 'Content-Type': 'application/json',
207
- ...options?.headers
208
- }
209
- });
210
- }
211
-
212
- /**
213
- * Find an alert rule by id, and list all alerts for this rule
214
- */
215
- public static getAlert<ThrowOnError extends boolean = false>(options: Options<alert_service.GetAlertData, ThrowOnError>) {
216
- return (options.client ?? _heyApiClient).get<alert_service.GetAlertResponse2, unknown, ThrowOnError>({
217
- security: [
218
- {
219
- name: 'api-key',
220
- type: 'apiKey'
221
- },
222
- {
223
- in: 'query',
224
- name: 'api-key',
225
- type: 'apiKey'
226
- }
227
- ],
228
- url: '/v1/alerts/{ruleId}',
229
- ...options
230
- });
231
- }
232
-
233
- }
234
-
235
- export class DataService {
236
- /**
237
- * Save Sharing SQL
238
- * Save or update sharing settings for a SQL query.
239
- */
240
- public static saveSharingSql<ThrowOnError extends boolean = false>(options: Options<analytic_service.SaveSharingSqlData, ThrowOnError>) {
241
- return (options.client ?? _heyApiClient).post<analytic_service.SaveSharingSqlResponse2, unknown, ThrowOnError>({
242
- security: [
243
- {
244
- name: 'api-key',
245
- type: 'apiKey'
246
- },
247
- {
248
- in: 'query',
249
- name: 'api-key',
250
- type: 'apiKey'
251
- }
252
- ],
253
- url: '/v1/analytics/sql/sharing',
254
- ...options,
255
- headers: {
256
- 'Content-Type': 'application/json',
257
- ...options?.headers
258
- }
259
- });
260
- }
261
-
262
- /**
263
- * Get Sharing SQL
264
- * Get sharing settings for a SQL query.
265
- */
266
- public static getSharingSql<ThrowOnError extends boolean = false>(options: Options<analytic_service.GetSharingSqlData, ThrowOnError>) {
267
- return (options.client ?? _heyApiClient).get<analytic_service.GetSharingSqlResponse2, unknown, ThrowOnError>({
268
- security: [
269
- {
270
- name: 'api-key',
271
- type: 'apiKey'
272
- },
273
- {
274
- in: 'query',
275
- name: 'api-key',
276
- type: 'apiKey'
277
- }
278
- ],
279
- url: '/v1/analytics/sql/sharing/{id}',
280
- ...options
281
- });
282
- }
283
-
284
- /**
285
- * Query Tables
286
- * Query tables in a project. use flag to control which type of tables to include.
287
- */
288
- public static queryTables2<ThrowOnError extends boolean = false>(options?: Options<analytic_service.QueryTables2Data, ThrowOnError>) {
289
- return (options?.client ?? _heyApiClient).get<analytic_service.QueryTables2Response, unknown, ThrowOnError>({
290
- security: [
291
- {
292
- name: 'api-key',
293
- type: 'apiKey'
294
- },
295
- {
296
- in: 'query',
297
- name: 'api-key',
298
- type: 'apiKey'
299
- }
300
- ],
301
- url: '/v1/analytics/sql/tables',
302
- ...options
303
- });
304
- }
305
-
306
- /**
307
- * Cancel SQL Query
308
- * Cancel a SQL query by execution_id.
309
- */
310
- public static cancelSqlQuery<ThrowOnError extends boolean = false>(options: Options<analytic_service.CancelSqlQueryData, ThrowOnError>) {
311
- return (options.client ?? _heyApiClient).put<analytic_service.CancelSqlQueryResponse, unknown, ThrowOnError>({
312
- security: [
313
- {
314
- name: 'api-key',
315
- type: 'apiKey'
316
- },
317
- {
318
- in: 'query',
319
- name: 'api-key',
320
- type: 'apiKey'
321
- }
322
- ],
323
- url: '/v1/analytics/{owner}/{slug}/sql/cancel_query/{executionId}',
324
- ...options
325
- });
326
- }
327
-
328
- /**
329
- * Execute SQL
330
- * Execute SQL in a project. Go to "Data Studio" -> "SQL Editor", write your query and then click "Export as cURL"
331
- *
332
- * ![screenshot](https://media.githubusercontent.com/media/sentioxyz/docs/HEAD/assets/image%20(102).png)
333
- *
334
- * Find more: https://docs.sentio.xyz/reference/data#sql-api
335
- */
336
- public static executeSql<ThrowOnError extends boolean = false>(options: Options<analytic_service.ExecuteSqlData, ThrowOnError>) {
337
- return (options.client ?? _heyApiClient).post<analytic_service.ExecuteSqlResponse, unknown, ThrowOnError>({
338
- security: [
339
- {
340
- name: 'api-key',
341
- type: 'apiKey'
342
- },
343
- {
344
- in: 'query',
345
- name: 'api-key',
346
- type: 'apiKey'
347
- }
348
- ],
349
- url: '/v1/analytics/{owner}/{slug}/sql/execute',
350
- ...options,
351
- headers: {
352
- 'Content-Type': 'application/json',
353
- ...options?.headers
354
- }
355
- });
356
- }
357
-
358
- /**
359
- * Execute SQL by Async
360
- * Execute SQL in a project asynchronously.
361
- */
362
- public static executeSqlAsync<ThrowOnError extends boolean = false>(options: Options<analytic_service.ExecuteSqlAsyncData, ThrowOnError>) {
363
- return (options.client ?? _heyApiClient).post<analytic_service.ExecuteSqlAsyncResponse, unknown, ThrowOnError>({
364
- security: [
365
- {
366
- name: 'api-key',
367
- type: 'apiKey'
368
- },
369
- {
370
- in: 'query',
371
- name: 'api-key',
372
- type: 'apiKey'
373
- }
374
- ],
375
- url: '/v1/analytics/{owner}/{slug}/sql/execute/async',
376
- ...options,
377
- headers: {
378
- 'Content-Type': 'application/json',
379
- ...options?.headers
380
- }
381
- });
382
- }
383
-
384
- /**
385
- * Query SQL Execution Detail
386
- * Query the execution detail of a SQL query by execution_id.
387
- */
388
- public static querySqlExecutionDetail<ThrowOnError extends boolean = false>(options: Options<analytic_service.QuerySqlExecutionDetailData, ThrowOnError>) {
389
- return (options.client ?? _heyApiClient).get<analytic_service.QuerySqlExecutionDetailResponse2, unknown, ThrowOnError>({
390
- security: [
391
- {
392
- name: 'api-key',
393
- type: 'apiKey'
394
- },
395
- {
396
- in: 'query',
397
- name: 'api-key',
398
- type: 'apiKey'
399
- }
400
- ],
401
- url: '/v1/analytics/{owner}/{slug}/sql/query_execution_detail/{executionId}',
402
- ...options
403
- });
404
- }
405
-
406
- /**
407
- * Query SQL Result
408
- * Query the result of a SQL query by execution_id.
409
- */
410
- public static querySqlResult<ThrowOnError extends boolean = false>(options: Options<analytic_service.QuerySqlResultData, ThrowOnError>) {
411
- return (options.client ?? _heyApiClient).get<analytic_service.QuerySqlResultResponse2, unknown, ThrowOnError>({
412
- security: [
413
- {
414
- name: 'api-key',
415
- type: 'apiKey'
416
- },
417
- {
418
- in: 'query',
419
- name: 'api-key',
420
- type: 'apiKey'
421
- }
422
- ],
423
- url: '/v1/analytics/{owner}/{slug}/sql/query_result/{executionId}',
424
- ...options
425
- });
426
- }
427
-
428
- /**
429
- * Save Refreshable Materialized View
430
- * Save or update a refreshable materialized view in a project.
431
- */
432
- public static saveRefreshableMaterializedView<ThrowOnError extends boolean = false>(options: Options<analytic_service.SaveRefreshableMaterializedViewData, ThrowOnError>) {
433
- return (options.client ?? _heyApiClient).post<analytic_service.SaveRefreshableMaterializedViewResponse2, unknown, ThrowOnError>({
434
- security: [
435
- {
436
- name: 'api-key',
437
- type: 'apiKey'
438
- },
439
- {
440
- in: 'query',
441
- name: 'api-key',
442
- type: 'apiKey'
443
- }
444
- ],
445
- url: '/v1/analytics/{owner}/{slug}/sql/refreshable_materialized_view',
446
- ...options,
447
- headers: {
448
- 'Content-Type': 'application/json',
449
- ...options?.headers
450
- }
451
- });
452
- }
453
-
454
- /**
455
- * Delete Refreshable Materialized View
456
- * Delete a refreshable materialized view in a project.
457
- */
458
- public static deleteRefreshableMaterializedView<ThrowOnError extends boolean = false>(options: Options<analytic_service.DeleteRefreshableMaterializedViewData, ThrowOnError>) {
459
- return (options.client ?? _heyApiClient).delete<analytic_service.DeleteRefreshableMaterializedViewResponse, unknown, ThrowOnError>({
460
- security: [
461
- {
462
- name: 'api-key',
463
- type: 'apiKey'
464
- },
465
- {
466
- in: 'query',
467
- name: 'api-key',
468
- type: 'apiKey'
469
- }
470
- ],
471
- url: '/v1/analytics/{owner}/{slug}/sql/refreshable_materialized_view/{name}',
472
- ...options
473
- });
474
- }
475
-
476
- /**
477
- * Get Refreshable Materialized View Status
478
- * Get the status of a refreshable materialized view in a project.
479
- */
480
- public static getRefreshableMaterializedStatus<ThrowOnError extends boolean = false>(options: Options<analytic_service.GetRefreshableMaterializedStatusData, ThrowOnError>) {
481
- return (options.client ?? _heyApiClient).get<analytic_service.GetRefreshableMaterializedStatusResponse, unknown, ThrowOnError>({
482
- security: [
483
- {
484
- name: 'api-key',
485
- type: 'apiKey'
486
- },
487
- {
488
- in: 'query',
489
- name: 'api-key',
490
- type: 'apiKey'
491
- }
492
- ],
493
- url: '/v1/analytics/{owner}/{slug}/sql/refreshable_materialized_view/{name}',
494
- ...options
495
- });
496
- }
497
-
498
- /**
499
- * List Refreshable Materialized Views
500
- * List all refreshable materialized views in a project.
501
- */
502
- public static listRefreshableMaterializedViews<ThrowOnError extends boolean = false>(options: Options<analytic_service.ListRefreshableMaterializedViewsData, ThrowOnError>) {
503
- return (options.client ?? _heyApiClient).get<analytic_service.ListRefreshableMaterializedViewsResponse, unknown, ThrowOnError>({
504
- security: [
505
- {
506
- name: 'api-key',
507
- type: 'apiKey'
508
- },
509
- {
510
- in: 'query',
511
- name: 'api-key',
512
- type: 'apiKey'
513
- }
514
- ],
515
- url: '/v1/analytics/{owner}/{slug}/sql/refreshable_materialized_views',
516
- ...options
517
- });
518
- }
519
-
520
- /**
521
- * Save SQL
522
- * Save or update a SQL query in a project.
523
- */
524
- public static saveSql<ThrowOnError extends boolean = false>(options: Options<analytic_service.SaveSqlData, ThrowOnError>) {
525
- return (options.client ?? _heyApiClient).post<analytic_service.SaveSqlResponse2, unknown, ThrowOnError>({
526
- security: [
527
- {
528
- name: 'api-key',
529
- type: 'apiKey'
530
- },
531
- {
532
- in: 'query',
533
- name: 'api-key',
534
- type: 'apiKey'
535
- }
536
- ],
537
- url: '/v1/analytics/{owner}/{slug}/sql/save',
538
- ...options,
539
- headers: {
540
- 'Content-Type': 'application/json',
541
- ...options?.headers
542
- }
543
- });
544
- }
545
-
546
- /**
547
- * Save SQL
548
- * Save or update a SQL query in a project.
549
- */
550
- public static saveSql2<ThrowOnError extends boolean = false>(options: Options<analytic_service.SaveSql2Data, ThrowOnError>) {
551
- return (options.client ?? _heyApiClient).put<analytic_service.SaveSql2Response, unknown, ThrowOnError>({
552
- security: [
553
- {
554
- name: 'api-key',
555
- type: 'apiKey'
556
- },
557
- {
558
- in: 'query',
559
- name: 'api-key',
560
- type: 'apiKey'
561
- }
562
- ],
563
- url: '/v1/analytics/{owner}/{slug}/sql/save',
564
- ...options,
565
- headers: {
566
- 'Content-Type': 'application/json',
567
- ...options?.headers
568
- }
569
- });
570
- }
571
-
572
- /**
573
- * Query Tables
574
- * Query tables in a project. use flag to control which type of tables to include.
575
- */
576
- public static queryTables<ThrowOnError extends boolean = false>(options: Options<analytic_service.QueryTablesData, ThrowOnError>) {
577
- return (options.client ?? _heyApiClient).get<analytic_service.QueryTablesResponse2, unknown, ThrowOnError>({
578
- security: [
579
- {
580
- name: 'api-key',
581
- type: 'apiKey'
582
- },
583
- {
584
- in: 'query',
585
- name: 'api-key',
586
- type: 'apiKey'
587
- }
588
- ],
589
- url: '/v1/analytics/{owner}/{slug}/sql/tables',
590
- ...options
591
- });
592
- }
593
-
594
- /**
595
- * Query event logs
596
- */
597
- public static queryLog<ThrowOnError extends boolean = false>(options: Options<analytic_service.QueryLogData, ThrowOnError>) {
598
- return (options.client ?? _heyApiClient).post<analytic_service.QueryLogResponse, unknown, ThrowOnError>({
599
- security: [
600
- {
601
- name: 'api-key',
602
- type: 'apiKey'
603
- },
604
- {
605
- in: 'query',
606
- name: 'api-key',
607
- type: 'apiKey'
608
- }
609
- ],
610
- url: '/v1/eventlogs/{owner}/{slug}',
611
- ...options,
612
- headers: {
613
- 'Content-Type': 'application/json',
614
- ...options?.headers
615
- }
616
- });
617
- }
618
-
619
- /**
620
- * Query event logs
621
- */
622
- public static queryLog2<ThrowOnError extends boolean = false>(options: Options<analytic_service.QueryLog2Data, ThrowOnError>) {
623
- return (options.client ?? _heyApiClient).get<analytic_service.QueryLog2Response, unknown, ThrowOnError>({
624
- security: [
625
- {
626
- name: 'api-key',
627
- type: 'apiKey'
628
- },
629
- {
630
- in: 'query',
631
- name: 'api-key',
632
- type: 'apiKey'
633
- }
634
- ],
635
- url: '/v1/eventlogs/{owner}/{slug}/query',
636
- ...options
637
- });
638
- }
639
-
640
- /**
641
- * List coins
642
- * Get a list of coins in a project.
643
- */
644
- public static listCoins2<ThrowOnError extends boolean = false>(options?: Options<insights_service.ListCoins2Data, ThrowOnError>) {
645
- return (options?.client ?? _heyApiClient).get<insights_service.ListCoins2Response, unknown, ThrowOnError>({
646
- security: [
647
- {
648
- name: 'api-key',
649
- type: 'apiKey'
650
- },
651
- {
652
- in: 'query',
653
- name: 'api-key',
654
- type: 'apiKey'
655
- }
656
- ],
657
- url: '/v1/insights/coins',
658
- ...options
659
- });
660
- }
661
-
662
- /**
663
- * List coins
664
- * Get a list of coins in a project.
665
- */
666
- public static listCoins<ThrowOnError extends boolean = false>(options: Options<insights_service.ListCoinsData, ThrowOnError>) {
667
- return (options.client ?? _heyApiClient).get<insights_service.ListCoinsResponse3, unknown, ThrowOnError>({
668
- security: [
669
- {
670
- name: 'api-key',
671
- type: 'apiKey'
672
- },
673
- {
674
- in: 'query',
675
- name: 'api-key',
676
- type: 'apiKey'
677
- }
678
- ],
679
- url: '/v1/insights/{owner}/{slug}/coins',
680
- ...options
681
- });
682
- }
683
-
684
- /**
685
- * Insight Query
686
- * Query for metrics,event logs and coin prices in a project.
687
- */
688
- public static query<ThrowOnError extends boolean = false>(options: Options<insights_service.QueryData, ThrowOnError>) {
689
- return (options.client ?? _heyApiClient).post<insights_service.QueryResponse2, unknown, ThrowOnError>({
690
- security: [
691
- {
692
- name: 'api-key',
693
- type: 'apiKey'
694
- },
695
- {
696
- in: 'query',
697
- name: 'api-key',
698
- type: 'apiKey'
699
- }
700
- ],
701
- url: '/v1/insights/{owner}/{slug}/query',
702
- ...options,
703
- headers: {
704
- 'Content-Type': 'application/json',
705
- ...options?.headers
706
- }
707
- });
708
- }
709
-
710
- /**
711
- * Get a list of metrics in a project
712
- */
713
- public static getMetrics<ThrowOnError extends boolean = false>(options?: Options<metrics_service.GetMetricsData, ThrowOnError>) {
714
- return (options?.client ?? _heyApiClient).get<metrics_service.GetMetricsResponse2, unknown, ThrowOnError>({
715
- security: [
716
- {
717
- name: 'api-key',
718
- type: 'apiKey'
719
- },
720
- {
721
- in: 'query',
722
- name: 'api-key',
723
- type: 'apiKey'
724
- }
725
- ],
726
- url: '/v1/metrics',
727
- ...options
728
- });
729
- }
730
-
731
- /**
732
- * Metric instant queries
733
- */
734
- public static queryInstant<ThrowOnError extends boolean = false>(options: Options<metrics_service.QueryInstantData, ThrowOnError>) {
735
- return (options.client ?? _heyApiClient).post<metrics_service.QueryInstantResponse, unknown, ThrowOnError>({
736
- security: [
737
- {
738
- name: 'api-key',
739
- type: 'apiKey'
740
- },
741
- {
742
- in: 'query',
743
- name: 'api-key',
744
- type: 'apiKey'
745
- }
746
- ],
747
- url: '/v1/metrics/{owner}/{slug}/query',
748
- ...options,
749
- headers: {
750
- 'Content-Type': 'application/json',
751
- ...options?.headers
752
- }
753
- });
754
- }
755
-
756
- /**
757
- * Metric range queries
758
- * The easiest way to build query is through UI, you could first create an insight chart, and then **Export as cURL**.
759
- *
760
- * ![screenshot](https://media.githubusercontent.com/media/sentioxyz/docs/HEAD/assets/image%20(101).png)
761
- */
762
- public static queryRange<ThrowOnError extends boolean = false>(options: Options<metrics_service.QueryRangeData, ThrowOnError>) {
763
- return (options.client ?? _heyApiClient).post<metrics_service.QueryRangeResponse, unknown, ThrowOnError>({
764
- security: [
765
- {
766
- name: 'api-key',
767
- type: 'apiKey'
768
- },
769
- {
770
- in: 'query',
771
- name: 'api-key',
772
- type: 'apiKey'
773
- }
774
- ],
775
- url: '/v1/metrics/{owner}/{slug}/query_range',
776
- ...options,
777
- headers: {
778
- 'Content-Type': 'application/json',
779
- ...options?.headers
780
- }
781
- });
782
- }
783
-
784
- /**
785
- * Query Table By Name
786
- * Query table schema by name.
787
- */
788
- public static queryTable2<ThrowOnError extends boolean = false>(options?: Options<analytic_service.QueryTable2Data, ThrowOnError>) {
789
- return (options?.client ?? _heyApiClient).get<analytic_service.QueryTable2Response, unknown, ThrowOnError>({
790
- security: [
791
- {
792
- name: 'api-key',
793
- type: 'apiKey'
794
- },
795
- {
796
- in: 'query',
797
- name: 'api-key',
798
- type: 'apiKey'
799
- }
800
- ],
801
- url: '/v1/sql/table',
802
- ...options
803
- });
804
- }
805
-
806
- /**
807
- * List Tables
808
- */
809
- public static listTables2<ThrowOnError extends boolean = false>(options?: Options<analytic_service.ListTables2Data, ThrowOnError>) {
810
- return (options?.client ?? _heyApiClient).get<analytic_service.ListTables2Response, unknown, ThrowOnError>({
811
- security: [
812
- {
813
- name: 'api-key',
814
- type: 'apiKey'
815
- },
816
- {
817
- in: 'query',
818
- name: 'api-key',
819
- type: 'apiKey'
820
- }
821
- ],
822
- url: '/v1/sql/tables',
823
- ...options
824
- });
825
- }
826
-
827
- /**
828
- * Query Table By Name
829
- * Query table schema by name.
830
- */
831
- public static queryTable<ThrowOnError extends boolean = false>(options: Options<analytic_service.QueryTableData, ThrowOnError>) {
832
- return (options.client ?? _heyApiClient).get<analytic_service.QueryTableResponse2, unknown, ThrowOnError>({
833
- security: [
834
- {
835
- name: 'api-key',
836
- type: 'apiKey'
837
- },
838
- {
839
- in: 'query',
840
- name: 'api-key',
841
- type: 'apiKey'
842
- }
843
- ],
844
- url: '/v1/sql/{owner}/{slug}/table/{name}',
845
- ...options
846
- });
847
- }
848
-
849
- /**
850
- * List Tables
851
- */
852
- public static listTables<ThrowOnError extends boolean = false>(options: Options<analytic_service.ListTablesData, ThrowOnError>) {
853
- return (options.client ?? _heyApiClient).get<analytic_service.ListTablesResponse2, unknown, ThrowOnError>({
854
- security: [
855
- {
856
- name: 'api-key',
857
- type: 'apiKey'
858
- },
859
- {
860
- in: 'query',
861
- name: 'api-key',
862
- type: 'apiKey'
863
- }
864
- ],
865
- url: '/v1/sql/{owner}/{slug}/tables',
866
- ...options
867
- });
868
- }
869
-
870
- }
871
-
872
- export class WebService {
873
- /**
874
- * List all dashboards in a project
875
- */
876
- public static listDashboards<ThrowOnError extends boolean = false>(options?: Options<web_service.ListDashboardsData, ThrowOnError>) {
877
- return (options?.client ?? _heyApiClient).get<web_service.ListDashboardsResponse, unknown, ThrowOnError>({
878
- security: [
879
- {
880
- name: 'api-key',
881
- type: 'apiKey'
882
- },
883
- {
884
- in: 'query',
885
- name: 'api-key',
886
- type: 'apiKey'
887
- }
888
- ],
889
- url: '/v1/dashboards',
890
- ...options
891
- });
892
- }
893
-
894
- /**
895
- * Import a dashboard
896
- */
897
- public static importDashboard<ThrowOnError extends boolean = false>(options: Options<web_service.ImportDashboardData, ThrowOnError>) {
898
- return (options.client ?? _heyApiClient).post<web_service.ImportDashboardResponse2, unknown, ThrowOnError>({
899
- security: [
900
- {
901
- name: 'api-key',
902
- type: 'apiKey'
903
- },
904
- {
905
- in: 'query',
906
- name: 'api-key',
907
- type: 'apiKey'
908
- }
909
- ],
910
- url: '/v1/dashboards/json',
911
- ...options,
912
- headers: {
913
- 'Content-Type': 'application/json',
914
- ...options?.headers
915
- }
916
- });
917
- }
918
-
919
- /**
920
- * Delete a dashboard by id
921
- */
922
- public static deleteDashboard<ThrowOnError extends boolean = false>(options: Options<web_service.DeleteDashboardData, ThrowOnError>) {
923
- return (options.client ?? _heyApiClient).delete<web_service.DeleteDashboardResponse, unknown, ThrowOnError>({
924
- security: [
925
- {
926
- name: 'api-key',
927
- type: 'apiKey'
928
- },
929
- {
930
- in: 'query',
931
- name: 'api-key',
932
- type: 'apiKey'
933
- }
934
- ],
935
- url: '/v1/dashboards/{dashboardId}',
936
- ...options
937
- });
938
- }
939
-
940
- /**
941
- * Get a dashboard by id
942
- */
943
- public static getDashboard<ThrowOnError extends boolean = false>(options: Options<web_service.GetDashboardData, ThrowOnError>) {
944
- return (options.client ?? _heyApiClient).get<web_service.GetDashboardResponse2, unknown, ThrowOnError>({
945
- security: [
946
- {
947
- name: 'api-key',
948
- type: 'apiKey'
949
- },
950
- {
951
- in: 'query',
952
- name: 'api-key',
953
- type: 'apiKey'
954
- }
955
- ],
956
- url: '/v1/dashboards/{dashboardId}',
957
- ...options
958
- });
959
- }
960
-
961
- /**
962
- * Get dashboard history by dashboard id
963
- */
964
- public static getDashboardHistory<ThrowOnError extends boolean = false>(options: Options<web_service.GetDashboardHistoryData, ThrowOnError>) {
965
- return (options.client ?? _heyApiClient).get<web_service.GetDashboardHistoryResponse2, unknown, ThrowOnError>({
966
- security: [
967
- {
968
- name: 'api-key',
969
- type: 'apiKey'
970
- },
971
- {
972
- in: 'query',
973
- name: 'api-key',
974
- type: 'apiKey'
975
- }
976
- ],
977
- url: '/v1/dashboards/{dashboardId}/history',
978
- ...options
979
- });
980
- }
981
-
982
- /**
983
- * Export a dashboard to json
984
- */
985
- public static exportDashboard<ThrowOnError extends boolean = false>(options: Options<web_service.ExportDashboardData, ThrowOnError>) {
986
- return (options.client ?? _heyApiClient).get<web_service.ExportDashboardResponse2, unknown, ThrowOnError>({
987
- security: [
988
- {
989
- name: 'api-key',
990
- type: 'apiKey'
991
- },
992
- {
993
- in: 'query',
994
- name: 'api-key',
995
- type: 'apiKey'
996
- }
997
- ],
998
- url: '/v1/dashboards/{dashboardId}/json',
999
- ...options
1000
- });
1001
- }
1002
-
1003
- /**
1004
- * List all dashboards in a project
1005
- */
1006
- public static listDashboards2<ThrowOnError extends boolean = false>(options: Options<web_service.ListDashboards2Data, ThrowOnError>) {
1007
- return (options.client ?? _heyApiClient).get<web_service.ListDashboards2Response, unknown, ThrowOnError>({
1008
- security: [
1009
- {
1010
- name: 'api-key',
1011
- type: 'apiKey'
1012
- },
1013
- {
1014
- in: 'query',
1015
- name: 'api-key',
1016
- type: 'apiKey'
1017
- }
1018
- ],
1019
- url: '/v1/projects/{owner}/{slug}/dashboards',
1020
- ...options
1021
- });
1022
- }
1023
-
1024
- /**
1025
- * Get a dashboard by id
1026
- */
1027
- public static getDashboard2<ThrowOnError extends boolean = false>(options: Options<web_service.GetDashboard2Data, ThrowOnError>) {
1028
- return (options.client ?? _heyApiClient).get<web_service.GetDashboard2Response, unknown, ThrowOnError>({
1029
- security: [
1030
- {
1031
- name: 'api-key',
1032
- type: 'apiKey'
1033
- },
1034
- {
1035
- in: 'query',
1036
- name: 'api-key',
1037
- type: 'apiKey'
1038
- }
1039
- ],
1040
- url: '/v1/projects/{owner}/{slug}/dashboards/{dashboardId}',
1041
- ...options
1042
- });
1043
- }
1044
-
1045
- public static createLinkSession<ThrowOnError extends boolean = false>(options?: Options<web_service.CreateLinkSessionData, ThrowOnError>) {
1046
- return (options?.client ?? _heyApiClient).get<web_service.CreateLinkSessionResponse, unknown, ThrowOnError>({
1047
- security: [
1048
- {
1049
- name: 'api-key',
1050
- type: 'apiKey'
1051
- },
1052
- {
1053
- in: 'query',
1054
- name: 'api-key',
1055
- type: 'apiKey'
1056
- }
1057
- ],
1058
- url: '/v1/users/link',
1059
- ...options
1060
- });
1061
- }
1062
-
1063
- }
1064
-
1065
- export class MoveService {
1066
- /**
1067
- * Get Aptos transaction call trace
1068
- * Retrieves the detailed call trace for an Aptos transaction
1069
- */
1070
- public static getCallTrace<ThrowOnError extends boolean = false>(options?: Options<google.GetCallTraceData, ThrowOnError>) {
1071
- return (options?.client ?? _heyApiClient).get<google.GetCallTraceResponse, unknown, ThrowOnError>({
1072
- security: [
1073
- {
1074
- name: 'api-key',
1075
- type: 'apiKey'
1076
- },
1077
- {
1078
- in: 'query',
1079
- name: 'api-key',
1080
- type: 'apiKey'
1081
- }
1082
- ],
1083
- url: '/v1/move/call_trace',
1084
- ...options
1085
- });
1086
- }
1087
-
1088
- /**
1089
- * Get Sui transaction call trace
1090
- * Retrieves the detailed call trace for a Sui transaction
1091
- */
1092
- public static getSuiCallTrace<ThrowOnError extends boolean = false>(options?: Options<move_service.GetSuiCallTraceData, ThrowOnError>) {
1093
- return (options?.client ?? _heyApiClient).get<move_service.GetSuiCallTraceResponse2, unknown, ThrowOnError>({
1094
- security: [
1095
- {
1096
- name: 'api-key',
1097
- type: 'apiKey'
1098
- },
1099
- {
1100
- in: 'query',
1101
- name: 'api-key',
1102
- type: 'apiKey'
1103
- }
1104
- ],
1105
- url: '/v1/move/sui_call_trace',
1106
- ...options
1107
- });
1108
- }
1109
-
1110
- }
1111
-
1112
- export class PriceService {
1113
- /**
1114
- * Get price
1115
- * GetPrice returns the price of a given coin identifier, in a best effort way.
1116
- * If we do not have any price data for the given coin, we will return NOT_FOUND error.
1117
- * If we have at least one price data for the given coin, we will return it with the actual timestamp.
1118
- * Client is responsible for checking the timestamp and decide whether to use the price or not.
1119
- */
1120
- public static getPrice<ThrowOnError extends boolean = false>(options?: Options<price_service.GetPriceData, ThrowOnError>) {
1121
- return (options?.client ?? _heyApiClient).get<price_service.GetPriceResponse2, unknown, ThrowOnError>({
1122
- security: [
1123
- {
1124
- name: 'api-key',
1125
- type: 'apiKey'
1126
- },
1127
- {
1128
- in: 'query',
1129
- name: 'api-key',
1130
- type: 'apiKey'
1131
- }
1132
- ],
1133
- url: '/v1/prices',
1134
- ...options
1135
- });
1136
- }
1137
-
1138
- /**
1139
- * Add coin by Gecko
1140
- * adds a coin by its coingecko id.
1141
- *
1142
- * coingecko id the API ID of the coin in coingecko web page.
1143
- *
1144
- * please AWARE that the coingecko id is NOT the same as the symbol of the coin.
1145
- *
1146
- * ![screenshot](https://media.githubusercontent.com/media/sentioxyz/docs/HEAD/assets/coingecko_apiid.png)
1147
- */
1148
- public static addCoinByGecko<ThrowOnError extends boolean = false>(options: Options<price_service.AddCoinByGeckoData, ThrowOnError>) {
1149
- return (options.client ?? _heyApiClient).post<price_service.AddCoinByGeckoResponse2, unknown, ThrowOnError>({
1150
- security: [
1151
- {
1152
- name: 'api-key',
1153
- type: 'apiKey'
1154
- },
1155
- {
1156
- in: 'query',
1157
- name: 'api-key',
1158
- type: 'apiKey'
1159
- }
1160
- ],
1161
- url: '/v1/prices/add_coin_by_gecko',
1162
- ...options,
1163
- headers: {
1164
- 'Content-Type': 'application/json',
1165
- ...options?.headers
1166
- }
1167
- });
1168
- }
1169
-
1170
- /**
1171
- * Batch get prices
1172
- */
1173
- public static batchGetPrices<ThrowOnError extends boolean = false>(options: Options<price_service.BatchGetPricesData, ThrowOnError>) {
1174
- return (options.client ?? _heyApiClient).post<price_service.BatchGetPricesResponse2, unknown, ThrowOnError>({
1175
- security: [
1176
- {
1177
- name: 'api-key',
1178
- type: 'apiKey'
1179
- },
1180
- {
1181
- in: 'query',
1182
- name: 'api-key',
1183
- type: 'apiKey'
1184
- }
1185
- ],
1186
- url: '/v1/prices/batch',
1187
- ...options,
1188
- headers: {
1189
- 'Content-Type': 'application/json',
1190
- ...options?.headers
1191
- }
1192
- });
1193
- }
1194
-
1195
- /**
1196
- * Check latest price
1197
- */
1198
- public static checkLatestPrice<ThrowOnError extends boolean = false>(options?: Options<price_service.CheckLatestPriceData, ThrowOnError>) {
1199
- return (options?.client ?? _heyApiClient).get<price_service.CheckLatestPriceResponse2, unknown, ThrowOnError>({
1200
- security: [
1201
- {
1202
- name: 'api-key',
1203
- type: 'apiKey'
1204
- },
1205
- {
1206
- in: 'query',
1207
- name: 'api-key',
1208
- type: 'apiKey'
1209
- }
1210
- ],
1211
- url: '/v1/prices/check_latest',
1212
- ...options
1213
- });
1214
- }
1215
-
1216
- /**
1217
- * List coins
1218
- */
1219
- public static priceListCoins<ThrowOnError extends boolean = false>(options?: Options<price_service.PriceListCoinsData, ThrowOnError>) {
1220
- return (options?.client ?? _heyApiClient).get<price_service.PriceListCoinsResponse, unknown, ThrowOnError>({
1221
- security: [
1222
- {
1223
- name: 'api-key',
1224
- type: 'apiKey'
1225
- },
1226
- {
1227
- in: 'query',
1228
- name: 'api-key',
1229
- type: 'apiKey'
1230
- }
1231
- ],
1232
- url: '/v1/prices/coins',
1233
- ...options
1234
- });
1235
- }
1236
-
1237
- }
1238
-
1239
- export class ProcessorService {
1240
- /**
1241
- * activate the pending version of a processor
1242
- */
1243
- public static activatePendingVersion<ThrowOnError extends boolean = false>(options: Options<processor_service.ActivatePendingVersionData, ThrowOnError>) {
1244
- return (options.client ?? _heyApiClient).put<processor_service.ActivatePendingVersionResponse, unknown, ThrowOnError>({
1245
- security: [
1246
- {
1247
- name: 'api-key',
1248
- type: 'apiKey'
1249
- },
1250
- {
1251
- in: 'query',
1252
- name: 'api-key',
1253
- type: 'apiKey'
1254
- }
1255
- ],
1256
- url: '/v1/processors/{owner}/{slug}/activate_pending',
1257
- ...options
1258
- });
1259
- }
1260
-
1261
- /**
1262
- * Get processor status
1263
- */
1264
- public static getProcessorStatusV2<ThrowOnError extends boolean = false>(options: Options<processor_service.GetProcessorStatusV2Data, ThrowOnError>) {
1265
- return (options.client ?? _heyApiClient).get<processor_service.GetProcessorStatusV2Response, unknown, ThrowOnError>({
1266
- security: [
1267
- {
1268
- name: 'api-key',
1269
- type: 'apiKey'
1270
- },
1271
- {
1272
- in: 'query',
1273
- name: 'api-key',
1274
- type: 'apiKey'
1275
- }
1276
- ],
1277
- url: '/v1/processors/{owner}/{slug}/status',
1278
- ...options
1279
- });
1280
- }
1281
-
1282
- }
1283
-
1284
- export class ProcessorExtService {
1285
- /**
1286
- * Get the source files of a processor
1287
- */
1288
- public static getProcessorSourceFiles<ThrowOnError extends boolean = false>(options: Options<processor_service.GetProcessorSourceFilesData, ThrowOnError>) {
1289
- return (options.client ?? _heyApiClient).get<processor_service.GetProcessorSourceFilesResponse2, unknown, ThrowOnError>({
1290
- security: [
1291
- {
1292
- name: 'api-key',
1293
- type: 'apiKey'
1294
- },
1295
- {
1296
- in: 'query',
1297
- name: 'api-key',
1298
- type: 'apiKey'
1299
- }
1300
- ],
1301
- url: '/v1/processors/{owner}/{slug}/source_files',
1302
- ...options
1303
- });
1304
- }
1305
-
1306
- }
1307
-
1308
- export class ForksService {
1309
- /**
1310
- * List all forks
1311
- */
1312
- public static listForks<ThrowOnError extends boolean = false>(options: Options<solidity_service.ListForksData, ThrowOnError>) {
1313
- return (options.client ?? _heyApiClient).get<solidity_service.ListForksResponse2, unknown, ThrowOnError>({
1314
- security: [
1315
- {
1316
- name: 'api-key',
1317
- type: 'apiKey'
1318
- },
1319
- {
1320
- in: 'query',
1321
- name: 'api-key',
1322
- type: 'apiKey'
1323
- }
1324
- ],
1325
- url: '/v1/solidity/{owner}/{slug}/fork',
1326
- ...options
1327
- });
1328
- }
1329
-
1330
- /**
1331
- * Create a fork
1332
- */
1333
- public static createFork<ThrowOnError extends boolean = false>(options: Options<solidity_service.CreateForkData, ThrowOnError>) {
1334
- return (options.client ?? _heyApiClient).post<solidity_service.CreateForkResponse2, unknown, ThrowOnError>({
1335
- security: [
1336
- {
1337
- name: 'api-key',
1338
- type: 'apiKey'
1339
- },
1340
- {
1341
- in: 'query',
1342
- name: 'api-key',
1343
- type: 'apiKey'
1344
- }
1345
- ],
1346
- url: '/v1/solidity/{owner}/{slug}/fork',
1347
- ...options,
1348
- headers: {
1349
- 'Content-Type': 'application/json',
1350
- ...options?.headers
1351
- }
1352
- });
1353
- }
1354
-
1355
- /**
1356
- * Get trace by bundle simulation
1357
- */
1358
- public static getCallTraceOnForkBundle<ThrowOnError extends boolean = false>(options: Options<google.GetCallTraceOnForkBundleData, ThrowOnError>) {
1359
- return (options.client ?? _heyApiClient).get<google.GetCallTraceOnForkBundleResponse, unknown, ThrowOnError>({
1360
- security: [
1361
- {
1362
- name: 'api-key',
1363
- type: 'apiKey'
1364
- },
1365
- {
1366
- in: 'query',
1367
- name: 'api-key',
1368
- type: 'apiKey'
1369
- }
1370
- ],
1371
- url: '/v1/solidity/{owner}/{slug}/fork/{forkId}/bundle/{bundleId}/call_trace',
1372
- ...options
1373
- });
1374
- }
1375
-
1376
- /**
1377
- * Run Simulation
1378
- */
1379
- public static simulateTransactionOnFork<ThrowOnError extends boolean = false>(options: Options<solidity_service.SimulateTransactionOnForkData, ThrowOnError>) {
1380
- return (options.client ?? _heyApiClient).post<solidity_service.SimulateTransactionOnForkResponse, unknown, ThrowOnError>({
1381
- security: [
1382
- {
1383
- name: 'api-key',
1384
- type: 'apiKey'
1385
- },
1386
- {
1387
- in: 'query',
1388
- name: 'api-key',
1389
- type: 'apiKey'
1390
- }
1391
- ],
1392
- url: '/v1/solidity/{owner}/{slug}/fork/{forkId}/simulation',
1393
- ...options,
1394
- headers: {
1395
- 'Content-Type': 'application/json',
1396
- ...options?.headers
1397
- }
1398
- });
1399
- }
1400
-
1401
- /**
1402
- * Get trace by simulation
1403
- */
1404
- public static getCallTraceOnForkSimulation<ThrowOnError extends boolean = false>(options: Options<google.GetCallTraceOnForkSimulationData, ThrowOnError>) {
1405
- return (options.client ?? _heyApiClient).get<google.GetCallTraceOnForkSimulationResponse, unknown, ThrowOnError>({
1406
- security: [
1407
- {
1408
- name: 'api-key',
1409
- type: 'apiKey'
1410
- },
1411
- {
1412
- in: 'query',
1413
- name: 'api-key',
1414
- type: 'apiKey'
1415
- }
1416
- ],
1417
- url: '/v1/solidity/{owner}/{slug}/fork/{forkId}/simulation/{simulationId}/call_trace',
1418
- ...options
1419
- });
1420
- }
1421
-
1422
- /**
1423
- * Run bundle simulation
1424
- */
1425
- public static simulateTransactionBundleOnFork<ThrowOnError extends boolean = false>(options: Options<solidity_service.SimulateTransactionBundleOnForkData, ThrowOnError>) {
1426
- return (options.client ?? _heyApiClient).post<solidity_service.SimulateTransactionBundleOnForkResponse, unknown, ThrowOnError>({
1427
- security: [
1428
- {
1429
- name: 'api-key',
1430
- type: 'apiKey'
1431
- },
1432
- {
1433
- in: 'query',
1434
- name: 'api-key',
1435
- type: 'apiKey'
1436
- }
1437
- ],
1438
- url: '/v1/solidity/{owner}/{slug}/fork/{forkId}/simulation_bundle',
1439
- ...options,
1440
- headers: {
1441
- 'Content-Type': 'application/json',
1442
- ...options?.headers
1443
- }
1444
- });
1445
- }
1446
-
1447
- /**
1448
- * Get trace by transaction
1449
- */
1450
- public static getCallTraceOnForkTransaction<ThrowOnError extends boolean = false>(options: Options<google.GetCallTraceOnForkTransactionData, ThrowOnError>) {
1451
- return (options.client ?? _heyApiClient).get<google.GetCallTraceOnForkTransactionResponse, unknown, ThrowOnError>({
1452
- security: [
1453
- {
1454
- name: 'api-key',
1455
- type: 'apiKey'
1456
- },
1457
- {
1458
- in: 'query',
1459
- name: 'api-key',
1460
- type: 'apiKey'
1461
- }
1462
- ],
1463
- url: '/v1/solidity/{owner}/{slug}/fork/{forkId}/transaction/{txHash}/call_trace',
1464
- ...options
1465
- });
1466
- }
1467
-
1468
- /**
1469
- * Delete fork by id
1470
- */
1471
- public static deleteFork<ThrowOnError extends boolean = false>(options: Options<solidit_service.DeleteForkData, ThrowOnError>) {
1472
- return (options.client ?? _heyApiClient).delete<solidit_service.DeleteForkResponse, unknown, ThrowOnError>({
1473
- security: [
1474
- {
1475
- name: 'api-key',
1476
- type: 'apiKey'
1477
- },
1478
- {
1479
- in: 'query',
1480
- name: 'api-key',
1481
- type: 'apiKey'
1482
- }
1483
- ],
1484
- url: '/v1/solidity/{owner}/{slug}/fork/{id}',
1485
- ...options
1486
- });
1487
- }
1488
-
1489
- /**
1490
- * Get fork by id
1491
- */
1492
- public static getFork<ThrowOnError extends boolean = false>(options: Options<solidity_service.GetForkData, ThrowOnError>) {
1493
- return (options.client ?? _heyApiClient).get<solidity_service.GetForkResponse2, unknown, ThrowOnError>({
1494
- security: [
1495
- {
1496
- name: 'api-key',
1497
- type: 'apiKey'
1498
- },
1499
- {
1500
- in: 'query',
1501
- name: 'api-key',
1502
- type: 'apiKey'
1503
- }
1504
- ],
1505
- url: '/v1/solidity/{owner}/{slug}/fork/{id}',
1506
- ...options
1507
- });
1508
- }
1509
-
1510
- /**
1511
- * Update fork by id
1512
- */
1513
- public static updateFork<ThrowOnError extends boolean = false>(options: Options<solidity_service.UpdateForkData, ThrowOnError>) {
1514
- return (options.client ?? _heyApiClient).put<solidity_service.UpdateForkResponse2, unknown, ThrowOnError>({
1515
- security: [
1516
- {
1517
- name: 'api-key',
1518
- type: 'apiKey'
1519
- },
1520
- {
1521
- in: 'query',
1522
- name: 'api-key',
1523
- type: 'apiKey'
1524
- }
1525
- ],
1526
- url: '/v1/solidity/{owner}/{slug}/fork/{id}',
1527
- ...options,
1528
- headers: {
1529
- 'Content-Type': 'application/json',
1530
- ...options?.headers
1531
- }
1532
- });
1533
- }
1534
-
1535
- /**
1536
- * Get fork info by id
1537
- */
1538
- public static getForkInfo<ThrowOnError extends boolean = false>(options: Options<solidity_service.GetForkInfoData, ThrowOnError>) {
1539
- return (options.client ?? _heyApiClient).get<solidity_service.GetForkInfoResponse2, unknown, ThrowOnError>({
1540
- security: [
1541
- {
1542
- name: 'api-key',
1543
- type: 'apiKey'
1544
- },
1545
- {
1546
- in: 'query',
1547
- name: 'api-key',
1548
- type: 'apiKey'
1549
- }
1550
- ],
1551
- url: '/v1/solidity/{owner}/{slug}/fork/{id}/info',
1552
- ...options
1553
- });
1554
- }
1555
-
1556
- }
1557
-
1558
- export class DebugAndSimulationService {
1559
- /**
1560
- * Search transactions
1561
- */
1562
- public static searchTransactions<ThrowOnError extends boolean = false>(options: Options<solidity_service.SearchTransactionsData, ThrowOnError>) {
1563
- return (options.client ?? _heyApiClient).get<solidity_service.SearchTransactionsResponse, unknown, ThrowOnError>({
1564
- security: [
1565
- {
1566
- name: 'api-key',
1567
- type: 'apiKey'
1568
- },
1569
- {
1570
- in: 'query',
1571
- name: 'api-key',
1572
- type: 'apiKey'
1573
- }
1574
- ],
1575
- url: '/v1/solidity/{owner}/{slug}/search_transactions',
1576
- ...options
1577
- });
1578
- }
1579
-
1580
- /**
1581
- * Get list of simulations
1582
- */
1583
- public static getSimulations<ThrowOnError extends boolean = false>(options: Options<solidity_service.GetSimulationsData, ThrowOnError>) {
1584
- return (options.client ?? _heyApiClient).get<solidity_service.GetSimulationsResponse2, unknown, ThrowOnError>({
1585
- security: [
1586
- {
1587
- name: 'api-key',
1588
- type: 'apiKey'
1589
- },
1590
- {
1591
- in: 'query',
1592
- name: 'api-key',
1593
- type: 'apiKey'
1594
- }
1595
- ],
1596
- url: '/v1/solidity/{owner}/{slug}/simulation',
1597
- ...options
1598
- });
1599
- }
1600
-
1601
- /**
1602
- * Get simulation by ID
1603
- */
1604
- public static getSimulation<ThrowOnError extends boolean = false>(options: Options<solidity_service.GetSimulationData, ThrowOnError>) {
1605
- return (options.client ?? _heyApiClient).get<solidity_service.GetSimulationResponse2, unknown, ThrowOnError>({
1606
- security: [
1607
- {
1608
- name: 'api-key',
1609
- type: 'apiKey'
1610
- },
1611
- {
1612
- in: 'query',
1613
- name: 'api-key',
1614
- type: 'apiKey'
1615
- }
1616
- ],
1617
- url: '/v1/solidity/{owner}/{slug}/simulation/{simulationId}',
1618
- ...options
1619
- });
1620
- }
1621
-
1622
- /**
1623
- * Get bundle simulation by ID
1624
- */
1625
- public static getSimulationBundleInProject<ThrowOnError extends boolean = false>(options: Options<solidity_service.GetSimulationBundleInProjectData, ThrowOnError>) {
1626
- return (options.client ?? _heyApiClient).get<solidity_service.GetSimulationBundleInProjectResponse, unknown, ThrowOnError>({
1627
- security: [
1628
- {
1629
- name: 'api-key',
1630
- type: 'apiKey'
1631
- },
1632
- {
1633
- in: 'query',
1634
- name: 'api-key',
1635
- type: 'apiKey'
1636
- }
1637
- ],
1638
- url: '/v1/solidity/{owner}/{slug}/simulation_bundle/{bundleId}',
1639
- ...options
1640
- });
1641
- }
1642
-
1643
- /**
1644
- * Get trace by bundle simulation
1645
- */
1646
- public static getCallTraceByBundle<ThrowOnError extends boolean = false>(options: Options<google.GetCallTraceByBundleData, ThrowOnError>) {
1647
- return (options.client ?? _heyApiClient).get<google.GetCallTraceByBundleResponse, unknown, ThrowOnError>({
1648
- security: [
1649
- {
1650
- name: 'api-key',
1651
- type: 'apiKey'
1652
- },
1653
- {
1654
- in: 'query',
1655
- name: 'api-key',
1656
- type: 'apiKey'
1657
- }
1658
- ],
1659
- url: '/v1/solidity/{owner}/{slug}/{chainId}/bundle/{bundleId}/call_trace',
1660
- ...options
1661
- });
1662
- }
1663
-
1664
- /**
1665
- * Run simulation
1666
- * Create a new transaction simulation. The simulation body should be included in the request body.
1667
- * Your simulations will be saved, and a unique ID for each simulation is included in the response. It will be useful for fetching simulation details.
1668
- */
1669
- public static simulateTransaction<ThrowOnError extends boolean = false>(options: Options<solidity_service.SimulateTransactionData, ThrowOnError>) {
1670
- return (options.client ?? _heyApiClient).post<solidity_service.SimulateTransactionResponse2, unknown, ThrowOnError>({
1671
- security: [
1672
- {
1673
- name: 'api-key',
1674
- type: 'apiKey'
1675
- },
1676
- {
1677
- in: 'query',
1678
- name: 'api-key',
1679
- type: 'apiKey'
1680
- }
1681
- ],
1682
- url: '/v1/solidity/{owner}/{slug}/{chainId}/simulation',
1683
- ...options,
1684
- headers: {
1685
- 'Content-Type': 'application/json',
1686
- ...options?.headers
1687
- }
1688
- });
1689
- }
1690
-
1691
- /**
1692
- * Get trace by simulation
1693
- */
1694
- public static getCallTraceBySimulation<ThrowOnError extends boolean = false>(options: Options<google.GetCallTraceBySimulationData, ThrowOnError>) {
1695
- return (options.client ?? _heyApiClient).get<google.GetCallTraceBySimulationResponse, unknown, ThrowOnError>({
1696
- security: [
1697
- {
1698
- name: 'api-key',
1699
- type: 'apiKey'
1700
- },
1701
- {
1702
- in: 'query',
1703
- name: 'api-key',
1704
- type: 'apiKey'
1705
- }
1706
- ],
1707
- url: '/v1/solidity/{owner}/{slug}/{chainId}/simulation/{simulationId}/call_trace',
1708
- ...options
1709
- });
1710
- }
1711
-
1712
- /**
1713
- * Run bundle simulation
1714
- * You could also create bundle simulations so that one transaction could be executed one after another. For `blockNumber` `transactionIndex` `networkId` `stateOverrides` and `blockOverrides` fields, only the first simulation takes effect.
1715
- */
1716
- public static simulateTransactionBundle<ThrowOnError extends boolean = false>(options: Options<solidity_service.SimulateTransactionBundleData, ThrowOnError>) {
1717
- return (options.client ?? _heyApiClient).post<solidity_service.SimulateTransactionBundleResponse2, unknown, ThrowOnError>({
1718
- security: [
1719
- {
1720
- name: 'api-key',
1721
- type: 'apiKey'
1722
- },
1723
- {
1724
- in: 'query',
1725
- name: 'api-key',
1726
- type: 'apiKey'
1727
- }
1728
- ],
1729
- url: '/v1/solidity/{owner}/{slug}/{chainId}/simulation_bundle',
1730
- ...options,
1731
- headers: {
1732
- 'Content-Type': 'application/json',
1733
- ...options?.headers
1734
- }
1735
- });
1736
- }
1737
-
1738
- /**
1739
- * Get trace by transaction
1740
- * API to get Sentio call trace. It takes `txId.txHash` and `chainSpec.chainId` arguments, where the first is transaction hash, and the second is the numeric ethereum chain ID.
1741
- *
1742
- * The results looks very similar to the normal [Ethereum call trace](https://media.githubusercontent.com/media/sentioxyz/docs/HEAD/assets/image%20(2)%20(1)%20(1)%20(1).png). But we have an additional `startIndex` and `startIndex` on each trace entry even for the LOG, representing the execution order in the trace.
1743
- *
1744
- * This allows you to build chart that marks the order of fund flow.
1745
- *
1746
- * ![screenshot](https://media.githubusercontent.com/media/sentioxyz/docs/HEAD/assets/image%20(2)%20(1)%20(1)%20(1).png)
1747
- */
1748
- public static getCallTraceByTransaction<ThrowOnError extends boolean = false>(options: Options<google.GetCallTraceByTransactionData, ThrowOnError>) {
1749
- return (options.client ?? _heyApiClient).get<google.GetCallTraceByTransactionResponse, unknown, ThrowOnError>({
1750
- security: [
1751
- {
1752
- name: 'api-key',
1753
- type: 'apiKey'
1754
- },
1755
- {
1756
- in: 'query',
1757
- name: 'api-key',
1758
- type: 'apiKey'
1759
- }
1760
- ],
1761
- url: '/v1/solidity/{owner}/{slug}/{chainId}/transaction/{txHash}/call_trace',
1762
- ...options
1763
- });
1764
- }
1765
-
1766
- }