@invinite-org/data-api-client 6.3.0 → 6.4.0

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 (92) hide show
  1. package/.openapi-generator/FILES +12 -0
  2. package/dist/apis/InsiderTradesApi.d.ts +2 -2
  3. package/dist/apis/InsiderTradesApi.js +2 -2
  4. package/dist/esm/apis/InsiderTradesApi.d.ts +2 -2
  5. package/dist/esm/apis/InsiderTradesApi.js +2 -2
  6. package/dist/esm/models/AlertCondition.d.ts +29 -5
  7. package/dist/esm/models/AlertCondition.js +12 -1
  8. package/dist/esm/models/AlertConditionInput.d.ts +29 -5
  9. package/dist/esm/models/AlertConditionInput.js +12 -1
  10. package/dist/esm/models/AlertTrigger.d.ts +2 -2
  11. package/dist/esm/models/AlertTriggerInput.d.ts +2 -2
  12. package/dist/esm/models/Company.d.ts +6 -6
  13. package/dist/esm/models/IndicatorFilterCondition.d.ts +3 -0
  14. package/dist/esm/models/IndicatorFilterCondition.js +4 -1
  15. package/dist/esm/models/IndicatorFilterConditionInput.d.ts +3 -0
  16. package/dist/esm/models/IndicatorFilterConditionInput.js +4 -1
  17. package/dist/esm/models/ScriptEvaluation.d.ts +65 -0
  18. package/dist/esm/models/ScriptEvaluation.js +66 -0
  19. package/dist/esm/models/ScriptEvaluationInput.d.ts +65 -0
  20. package/dist/esm/models/ScriptEvaluationInput.js +66 -0
  21. package/dist/esm/models/ScriptNode.d.ts +55 -0
  22. package/dist/esm/models/ScriptNode.js +53 -0
  23. package/dist/esm/models/ScriptNodeInput.d.ts +55 -0
  24. package/dist/esm/models/ScriptNodeInput.js +53 -0
  25. package/dist/esm/models/ScriptSeriesInput.d.ts +99 -0
  26. package/dist/esm/models/ScriptSeriesInput.js +78 -0
  27. package/dist/esm/models/ScriptSeriesInputInput.d.ts +93 -0
  28. package/dist/esm/models/ScriptSeriesInputInput.js +76 -0
  29. package/dist/esm/models/index.d.ts +6 -0
  30. package/dist/esm/models/index.js +6 -0
  31. package/dist/models/AlertCondition.d.ts +29 -5
  32. package/dist/models/AlertCondition.js +12 -1
  33. package/dist/models/AlertConditionInput.d.ts +29 -5
  34. package/dist/models/AlertConditionInput.js +12 -1
  35. package/dist/models/AlertTrigger.d.ts +2 -2
  36. package/dist/models/AlertTriggerInput.d.ts +2 -2
  37. package/dist/models/Company.d.ts +6 -6
  38. package/dist/models/IndicatorFilterCondition.d.ts +3 -0
  39. package/dist/models/IndicatorFilterCondition.js +4 -1
  40. package/dist/models/IndicatorFilterConditionInput.d.ts +3 -0
  41. package/dist/models/IndicatorFilterConditionInput.js +4 -1
  42. package/dist/models/ScriptEvaluation.d.ts +65 -0
  43. package/dist/models/ScriptEvaluation.js +74 -0
  44. package/dist/models/ScriptEvaluationInput.d.ts +65 -0
  45. package/dist/models/ScriptEvaluationInput.js +74 -0
  46. package/dist/models/ScriptNode.d.ts +55 -0
  47. package/dist/models/ScriptNode.js +60 -0
  48. package/dist/models/ScriptNodeInput.d.ts +55 -0
  49. package/dist/models/ScriptNodeInput.js +60 -0
  50. package/dist/models/ScriptSeriesInput.d.ts +99 -0
  51. package/dist/models/ScriptSeriesInput.js +86 -0
  52. package/dist/models/ScriptSeriesInputInput.d.ts +93 -0
  53. package/dist/models/ScriptSeriesInputInput.js +84 -0
  54. package/dist/models/index.d.ts +6 -0
  55. package/dist/models/index.js +6 -0
  56. package/docs/AlertCondition.md +7 -1
  57. package/docs/AlertConditionInput.md +7 -1
  58. package/docs/CompaniesApi.md +4 -4
  59. package/docs/EventsApi.md +2 -2
  60. package/docs/FilingsApi.md +4 -4
  61. package/docs/FinancialsApi.md +12 -12
  62. package/docs/GuidanceApi.md +4 -4
  63. package/docs/HoldingsApi.md +8 -8
  64. package/docs/IPOsApi.md +4 -4
  65. package/docs/InsiderTradesApi.md +5 -5
  66. package/docs/InvestorDocumentsApi.md +4 -4
  67. package/docs/MetricsApi.md +10 -10
  68. package/docs/NewsApi.md +6 -6
  69. package/docs/ReferenceApi.md +6 -6
  70. package/docs/ScriptEvaluation.md +39 -0
  71. package/docs/ScriptEvaluationInput.md +39 -0
  72. package/docs/ScriptNode.md +41 -0
  73. package/docs/ScriptNodeInput.md +41 -0
  74. package/docs/ScriptSeriesInput.md +49 -0
  75. package/docs/ScriptSeriesInputInput.md +47 -0
  76. package/docs/TranscriptsApi.md +2 -2
  77. package/package.json +1 -1
  78. package/src/apis/InsiderTradesApi.ts +2 -2
  79. package/src/models/AlertCondition.ts +52 -6
  80. package/src/models/AlertConditionInput.ts +52 -6
  81. package/src/models/AlertTrigger.ts +2 -2
  82. package/src/models/AlertTriggerInput.ts +2 -2
  83. package/src/models/Company.ts +6 -6
  84. package/src/models/IndicatorFilterCondition.ts +4 -1
  85. package/src/models/IndicatorFilterConditionInput.ts +4 -1
  86. package/src/models/ScriptEvaluation.ts +107 -0
  87. package/src/models/ScriptEvaluationInput.ts +107 -0
  88. package/src/models/ScriptNode.ts +99 -0
  89. package/src/models/ScriptNodeInput.ts +99 -0
  90. package/src/models/ScriptSeriesInput.ts +149 -0
  91. package/src/models/ScriptSeriesInputInput.ts +141 -0
  92. package/src/models/index.ts +6 -0
@@ -387,7 +387,7 @@ async function example() {
387
387
  const body = {
388
388
  // string | Query
389
389
  q: gross margin,
390
- // string | Ticker (`AAPL`) or CIK (all digits, any padding); a comma list of 1–50 reads several companies in one request (R2). One of the scope filters of this list is required. US ETFs: a fund registrant such as SPY and a series of a multi-series trust such as TQQQ both resolve on `/v1/dividends`, `/v1/splits` and `/v1/filings` (a trust series\' filings are the accessions naming its series; an ETF that is its own registrant lists its registrant\'s; a row\'s `company.cik` is the trust\'s CIK, empty for an ETF without a registrant link). The company-only families (financials, metrics, segments, fiscal periods, insider trades, events, transcripts, guidance, people, investor documents, IPOs) answer one 404 `not_covered` naming the ETF (\"TQQQ is an ETF: … exists only for companies\"); on the other lists a series ETF such as TQQQ is not a known company. (optional)
390
+ // string | Ticker (`AAPL`) or CIK (all digits, any padding); a comma list of 1–50 reads several companies in one request (R2). One of the scope filters of this list is required. US ETFs: a fund registrant such as SPY and a series of a multi-series trust such as TQQQ both resolve on every list, and ETF data is served where it exists: `/v1/dividends`, `/v1/splits`, `/v1/filings` and `/v1/search/filings` (a trust series\' filings are the accessions naming its series, and such a series is searched alone; an ETF that is its own registrant lists its registrant\'s; a row\'s `company.cik` is the trust\'s CIK, empty for an ETF without a registrant link), and the 13F, ETF and fund holder lists (holdings, holding changes, ETF / fund holdings) for an ETF that is its own registrant such as SPY (a trust series such as TQQQ answers one 404 `not_covered` naming it: holders are found by issuer CIK, which would mix its trust\'s other series). The families without ETF data (financials, metrics, segments, fiscal periods, insider trades, events, transcripts, guidance, people, investor documents, IPOs, news and announcements) answer one 404 `not_covered` naming the ETF, the same for SPY and TQQQ (\"TQQQ is an ETF: … exists only for companies\"); in a mixed list the companies answer. (optional)
391
391
  company: AAPL,
392
392
  // string | Event id (optional)
393
393
  event: evt_01JC8M2X,
@@ -427,7 +427,7 @@ example().catch(console.error);
427
427
  | Name | Type | Description | Notes |
428
428
  |------------- | ------------- | ------------- | -------------|
429
429
  | **q** | `string` | Query | [Defaults to `undefined`] |
430
- | **company** | `string` | Ticker (`AAPL`) or CIK (all digits, any padding); a comma list of 1–50 reads several companies in one request (R2). One of the scope filters of this list is required. US ETFs: a fund registrant such as SPY and a series of a multi-series trust such as TQQQ both resolve on `/v1/dividends`, `/v1/splits` and `/v1/filings` (a trust series\' filings are the accessions naming its series; an ETF that is its own registrant lists its registrant\'s; a row\'s `company.cik` is the trust\'s CIK, empty for an ETF without a registrant link). The company-only families (financials, metrics, segments, fiscal periods, insider trades, events, transcripts, guidance, people, investor documents, IPOs) answer one 404 `not_covered` naming the ETF (\"TQQQ is an ETF: … exists only for companies\"); on the other lists a series ETF such as TQQQ is not a known company. | [Optional] [Defaults to `undefined`] |
430
+ | **company** | `string` | Ticker (`AAPL`) or CIK (all digits, any padding); a comma list of 1–50 reads several companies in one request (R2). One of the scope filters of this list is required. US ETFs: a fund registrant such as SPY and a series of a multi-series trust such as TQQQ both resolve on every list, and ETF data is served where it exists: `/v1/dividends`, `/v1/splits`, `/v1/filings` and `/v1/search/filings` (a trust series\' filings are the accessions naming its series, and such a series is searched alone; an ETF that is its own registrant lists its registrant\'s; a row\'s `company.cik` is the trust\'s CIK, empty for an ETF without a registrant link), and the 13F, ETF and fund holder lists (holdings, holding changes, ETF / fund holdings) for an ETF that is its own registrant such as SPY (a trust series such as TQQQ answers one 404 `not_covered` naming it: holders are found by issuer CIK, which would mix its trust\'s other series). The families without ETF data (financials, metrics, segments, fiscal periods, insider trades, events, transcripts, guidance, people, investor documents, IPOs, news and announcements) answer one 404 `not_covered` naming the ETF, the same for SPY and TQQQ (\"TQQQ is an ETF: … exists only for companies\"); in a mixed list the companies answer. | [Optional] [Defaults to `undefined`] |
431
431
  | **event** | `string` | Event id | [Optional] [Defaults to `undefined`] |
432
432
  | **type** | `string` | Text types — any of `transcript`, `qa`, `prepared`, `presentation`, comma-separated | [Optional] [Defaults to `undefined`] |
433
433
  | **mode** | `lexical`, `literal` | Mode | [Optional] [Defaults to `'lexical'`] [Enum: lexical, literal] |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invinite-org/data-api-client",
3
- "version": "6.3.0",
3
+ "version": "6.4.0",
4
4
  "description": "Typed TypeScript/JavaScript client for the Invinite Data API",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -201,7 +201,7 @@ export class InsiderTradesApi extends runtime.BaseAPI {
201
201
  }
202
202
 
203
203
  /**
204
- *
204
+ * Insider transaction lines (Form 4; Forms 3 and 5 where the SEC insider data set supplies them), newest filing first. Since release 5.7 the default result includes derivative-security lines (options, RSUs, warrants; `is_derivative: true` on the row) beside the non-derivative ones. `is_derivative=false` restores the non-derivative-only result of the releases before 5.7, which is what a buy / sell aggregate wants.
205
205
  * List insider trades
206
206
  */
207
207
  async listInsiderTradesRaw(requestParameters: ListInsiderTradesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListInsiderTrades200Response>> {
@@ -212,7 +212,7 @@ export class InsiderTradesApi extends runtime.BaseAPI {
212
212
  }
213
213
 
214
214
  /**
215
- *
215
+ * Insider transaction lines (Form 4; Forms 3 and 5 where the SEC insider data set supplies them), newest filing first. Since release 5.7 the default result includes derivative-security lines (options, RSUs, warrants; `is_derivative: true` on the row) beside the non-derivative ones. `is_derivative=false` restores the non-derivative-only result of the releases before 5.7, which is what a buy / sell aggregate wants.
216
216
  * List insider trades
217
217
  */
218
218
  async listInsiderTrades(requestParameters: ListInsiderTradesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListInsiderTrades200Response> {
@@ -27,6 +27,13 @@ import {
27
27
  AlertConditionAmountChangeToJSON,
28
28
  AlertConditionAmountChangeToJSONTyped,
29
29
  } from './AlertConditionAmountChange';
30
+ import type { ScriptSeriesInput } from './ScriptSeriesInput';
31
+ import {
32
+ ScriptSeriesInputFromJSON,
33
+ ScriptSeriesInputFromJSONTyped,
34
+ ScriptSeriesInputToJSON,
35
+ ScriptSeriesInputToJSONTyped,
36
+ } from './ScriptSeriesInput';
30
37
  import type { AlertConditionMentionDeltaRule } from './AlertConditionMentionDeltaRule';
31
38
  import {
32
39
  AlertConditionMentionDeltaRuleFromJSON,
@@ -41,6 +48,13 @@ import {
41
48
  IndicatorTemplateRefToJSON,
42
49
  IndicatorTemplateRefToJSONTyped,
43
50
  } from './IndicatorTemplateRef';
51
+ import type { ScriptEvaluation } from './ScriptEvaluation';
52
+ import {
53
+ ScriptEvaluationFromJSON,
54
+ ScriptEvaluationFromJSONTyped,
55
+ ScriptEvaluationToJSON,
56
+ ScriptEvaluationToJSONTyped,
57
+ } from './ScriptEvaluation';
44
58
  import type { AlertConditionRulesInner } from './AlertConditionRulesInner';
45
59
  import {
46
60
  AlertConditionRulesInnerFromJSON,
@@ -48,6 +62,13 @@ import {
48
62
  AlertConditionRulesInnerToJSON,
49
63
  AlertConditionRulesInnerToJSONTyped,
50
64
  } from './AlertConditionRulesInner';
65
+ import type { ScriptNode } from './ScriptNode';
66
+ import {
67
+ ScriptNodeFromJSON,
68
+ ScriptNodeFromJSONTyped,
69
+ ScriptNodeToJSON,
70
+ ScriptNodeToJSONTyped,
71
+ } from './ScriptNode';
51
72
  import type { IndicatorResolved } from './IndicatorResolved';
52
73
  import {
53
74
  IndicatorResolvedFromJSON,
@@ -78,7 +99,7 @@ import {
78
99
  } from './IndicatorCondition';
79
100
 
80
101
  /**
81
- * What the alert watches; the fields depend on `type` (each field names the types that take it; any other field is refused). Companies: `ciks` / `symbols` (at most 100 in all) or, for single-company types, `cik` / `symbol`. A symbol is resolved to its CIK at create. Price types (`price`, `price_move`, `volume_spike`, `price_reminder`) and `script` watch ONE instrument: `symbol` + `asset_class`. A `script` alert runs a script version (`/v1/scripts`) at each close of `interval`; alerts with the same version, instrument, interval, inputs and frequency share one evaluation. An `indicator` alert takes a built-in `template` (`GET /v1/alert-templates`) or a structured `condition` (+ optional `filters`) on `symbol` / `interval`; alerts crossing a constant on the same indicator, instrument and interval share one evaluation whatever the threshold. Coverage: `filing_keyword`, `fundamental_metric` and `earnings_results` work only for companies whose filings and financials Invinite processes (any other company answers 404 `not_covered`); `earnings_call_keyword` takes any company with captured calls. US ETFs: `dividend`, `event_countdown` (`ex_dividend` / `dividend_payment`), `filing` and `filing_keyword` take an ETF ticker (SPY or a trust series such as TQQQ; a series ETF is stored by symbol and fires only on events that name it, never on another series' filing of its trust); `earnings_call`, `earnings_call_keyword`, `earnings_results`, `fundamental_metric` and an `earnings_call` countdown refuse an ETF by name (400 `invalid_parameter`), `news` / `news_keyword` a series ETF.
102
+ * What the alert watches; the fields depend on `type` (each field names the types that take it; any other field is refused). Companies: `ciks` / `symbols` (at most 100 in all) or, for single-company types, `cik` / `symbol`. A symbol is resolved to its CIK at create. Price types (`price`, `price_move`, `volume_spike`, `price_reminder`) and `script` watch ONE instrument: `symbol` + `asset_class`. A `script` alert runs a script version (`/v1/scripts`) at each close of `interval`; alerts with the same version, instrument, interval, inputs and frequency share one evaluation. An `indicator` alert takes a built-in `template` (`GET /v1/alert-templates`) or a structured `condition` (+ optional `filters`) on `symbol` / `interval`; alerts crossing a constant on the same indicator, instrument and interval share one evaluation whatever the threshold. Coverage: `filing_keyword`, `fundamental_metric` and `earnings_results` work only for companies whose filings and financials Invinite processes (any other company answers 404 `not_covered`); `earnings_call_keyword` takes any company with captured calls. US ETFs: `dividend`, `event_countdown` (`ex_dividend` / `dividend_payment`), `filing` and `filing_keyword` take an ETF ticker (SPY or a trust series such as TQQQ; a series ETF is stored by symbol and fires only on events that name it, never on another series' filing of its trust); `earnings_call`, `earnings_call_keyword`, `earnings_results`, `fundamental_metric`, `news`, `news_keyword` and an `earnings_call` countdown refuse an ETF of either identity (its ticker or a fund registrant's CIK) by name (400 `invalid_parameter`).
82
103
  * @export
83
104
  * @interface AlertCondition
84
105
  */
@@ -102,7 +123,7 @@ export interface AlertCondition {
102
123
  */
103
124
  cik?: string;
104
125
  /**
105
- * The company (or, for the types that take ETFs, the US ETF) by ticker. Same types as `cik`; price types, script and indicator: the instrument (a US stock / ETF ticker, or a crypto slug / ticker)
126
+ * The company (or, for the types that take ETFs, the US ETF) by ticker. Same types as `cik`; price types, script and indicator: the instrument (a US stock / ETF ticker, a crypto slug / ticker, or a commodity `XAUUSD` / `XAGUSD`)
106
127
  * @type {string}
107
128
  * @memberof AlertCondition
108
129
  */
@@ -282,7 +303,7 @@ export interface AlertCondition {
282
303
  */
283
304
  notify_on_date_change?: boolean;
284
305
  /**
285
- * The instrument's market: `us_stock` (US stocks and ETFs) or `crypto` (coins by CoinGecko slug or ticker). Absent at create = a stock first, then a coin; stored resolved. price, price_move, volume_spike, price_reminder, script, indicator
306
+ * The instrument's market: `us_stock` (US stocks and ETFs), `crypto` (coins by CoinGecko slug or ticker) or `commodity` (`XAUUSD` / `XAGUSD`, only when named). Absent at create = a stock first, then a coin; stored resolved. price, price_move, volume_spike, price_reminder, script, indicator
286
307
  * @type {AlertConditionAssetClassEnum}
287
308
  * @memberof AlertCondition
288
309
  */
@@ -330,7 +351,7 @@ export interface AlertCondition {
330
351
  */
331
352
  mode?: AlertConditionModeEnum;
332
353
  /**
333
- * The bar evaluated at its close. volume_spike (1h, 1d, 1w, 1mo); script and indicator (1m, 5m, 15m, 30m, 1h, 4h, 1d; the plan's shortest: FREE / LITE 1h, STANDARD 5m, PRO 1m)
354
+ * The bar evaluated at its close. volume_spike (1m, 5m, 15m, 30m, 1h, 1d, 1w, 1mo; every closed bar); script and indicator (1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w, 1mo; the plan's shortest: FREE / LITE 1h, STANDARD 5m, PRO 1m)
334
355
  * @type {AlertConditionIntervalEnum}
335
356
  * @memberof AlertCondition
336
357
  */
@@ -366,7 +387,7 @@ export interface AlertCondition {
366
387
  */
367
388
  price_direction?: AlertConditionPriceDirectionEnum;
368
389
  /**
369
- * price_reminder: when the reminder fires — once at `at`, on the hour, daily or weekly at `time_of_day_minutes`. script: when the script's alerts deliver — `once_per_bar_close` (default) at most once per alert id and closed bar, `once_per_bar` the same, `every_time` every evaluation, `once` the first evaluation only. indicator: the same (`once` = this alert's first fire only). price_reminder, script, indicator
390
+ * price_reminder: when the reminder fires — once at `at`, on the hour, daily or weekly at `time_of_day_minutes`. script: when the script's alerts deliver — `once_per_bar_close` (default) at most once per alert id and closed bar, `once_per_bar` the same, `every_time` every evaluation, `once` the first evaluation only. indicator: the same (`once` = this alert's first fire only). With `evaluation` pre_close: one delivery per alert id and session (`every_time`: every signal of the pass; `once`: the first only). price_reminder, script, indicator
370
391
  * @type {AlertConditionFrequencyEnum}
371
392
  * @memberof AlertCondition
372
393
  */
@@ -401,12 +422,30 @@ export interface AlertCondition {
401
422
  * @memberof AlertCondition
402
423
  */
403
424
  inputs?: { [key: string]: any; };
425
+ /**
426
+ * A script chain: what feeds each of the script's `input.externalSeries` inputs, by its input key (every such input must be bound; ≤ 4 `builtin_indicator`, ≤ 16 in the plan). script
427
+ * @type {{ [key: string]: ScriptSeriesInput; }}
428
+ * @memberof AlertCondition
429
+ */
430
+ series_inputs?: { [key: string]: ScriptSeriesInput; };
431
+ /**
432
+ * The producer scripts `script_output` series inputs read, producers before the nodes that read them (≤ 8 dependencies, ≤ 16,384 bytes with series_inputs). script
433
+ * @type {Array<ScriptNode>}
434
+ * @memberof AlertCondition
435
+ */
436
+ nodes?: Array<ScriptNode>;
404
437
  /**
405
438
  * Only these of the script's alerts (its version's `alert_ids`); empty = all. script
406
439
  * @type {Array<string>}
407
440
  * @memberof AlertCondition
408
441
  */
409
442
  alert_ids?: Array<string>;
443
+ /**
444
+ *
445
+ * @type {ScriptEvaluation}
446
+ * @memberof AlertCondition
447
+ */
448
+ evaluation?: ScriptEvaluation;
410
449
  /**
411
450
  *
412
451
  * @type {IndicatorTemplateRef}
@@ -563,7 +602,8 @@ export type AlertConditionEventEnum = typeof AlertConditionEventEnum[keyof typeo
563
602
  */
564
603
  export const AlertConditionAssetClassEnum = {
565
604
  UsStock: 'us_stock',
566
- Crypto: 'crypto'
605
+ Crypto: 'crypto',
606
+ Commodity: 'commodity'
567
607
  } as const;
568
608
  export type AlertConditionAssetClassEnum = typeof AlertConditionAssetClassEnum[keyof typeof AlertConditionAssetClassEnum] | (string & {});
569
609
 
@@ -732,7 +772,10 @@ export function AlertConditionFromJSONTyped(json: any, ignoreDiscriminator: bool
732
772
  'days': json['days'] == null ? undefined : json['days'],
733
773
  'script_version_id': json['script_version_id'] == null ? undefined : json['script_version_id'],
734
774
  'inputs': json['inputs'] == null ? undefined : json['inputs'],
775
+ 'series_inputs': json['series_inputs'] == null ? undefined : (mapValues(json['series_inputs'], ScriptSeriesInputFromJSON)),
776
+ 'nodes': json['nodes'] == null ? undefined : ((json['nodes'] as Array<any>).map(ScriptNodeFromJSON)),
735
777
  'alert_ids': json['alert_ids'] == null ? undefined : json['alert_ids'],
778
+ 'evaluation': json['evaluation'] == null ? undefined : ScriptEvaluationFromJSON(json['evaluation']),
736
779
  'template': json['template'] == null ? undefined : IndicatorTemplateRefFromJSON(json['template']),
737
780
  'condition': json['condition'] == null ? undefined : IndicatorConditionFromJSON(json['condition']),
738
781
  'filters': json['filters'] == null ? undefined : IndicatorFiltersFromJSON(json['filters']),
@@ -804,7 +847,10 @@ export function AlertConditionToJSONTyped(value?: AlertCondition | null, ignoreD
804
847
  'days': value['days'],
805
848
  'script_version_id': value['script_version_id'],
806
849
  'inputs': value['inputs'],
850
+ 'series_inputs': value['series_inputs'] == null ? undefined : (mapValues(value['series_inputs'], ScriptSeriesInputToJSON)),
851
+ 'nodes': value['nodes'] == null ? undefined : ((value['nodes'] as Array<any>).map(ScriptNodeToJSON)),
807
852
  'alert_ids': value['alert_ids'],
853
+ 'evaluation': ScriptEvaluationToJSON(value['evaluation']),
808
854
  'template': IndicatorTemplateRefToJSON(value['template']),
809
855
  'condition': IndicatorConditionToJSON(value['condition']),
810
856
  'filters': IndicatorFiltersToJSON(value['filters']),
@@ -27,6 +27,13 @@ import {
27
27
  AlertConditionInputMentionDeltaRuleToJSON,
28
28
  AlertConditionInputMentionDeltaRuleToJSONTyped,
29
29
  } from './AlertConditionInputMentionDeltaRule';
30
+ import type { ScriptSeriesInputInput } from './ScriptSeriesInputInput';
31
+ import {
32
+ ScriptSeriesInputInputFromJSON,
33
+ ScriptSeriesInputInputFromJSONTyped,
34
+ ScriptSeriesInputInputToJSON,
35
+ ScriptSeriesInputInputToJSONTyped,
36
+ } from './ScriptSeriesInputInput';
30
37
  import type { IndicatorTemplateRef } from './IndicatorTemplateRef';
31
38
  import {
32
39
  IndicatorTemplateRefFromJSON,
@@ -48,6 +55,13 @@ import {
48
55
  AlertConditionInputYoyRulesInnerToJSON,
49
56
  AlertConditionInputYoyRulesInnerToJSONTyped,
50
57
  } from './AlertConditionInputYoyRulesInner';
58
+ import type { ScriptEvaluationInput } from './ScriptEvaluationInput';
59
+ import {
60
+ ScriptEvaluationInputFromJSON,
61
+ ScriptEvaluationInputFromJSONTyped,
62
+ ScriptEvaluationInputToJSON,
63
+ ScriptEvaluationInputToJSONTyped,
64
+ } from './ScriptEvaluationInput';
51
65
  import type { AlertConditionInputRulesInner } from './AlertConditionInputRulesInner';
52
66
  import {
53
67
  AlertConditionInputRulesInnerFromJSON,
@@ -69,9 +83,16 @@ import {
69
83
  IndicatorFiltersInputToJSON,
70
84
  IndicatorFiltersInputToJSONTyped,
71
85
  } from './IndicatorFiltersInput';
86
+ import type { ScriptNodeInput } from './ScriptNodeInput';
87
+ import {
88
+ ScriptNodeInputFromJSON,
89
+ ScriptNodeInputFromJSONTyped,
90
+ ScriptNodeInputToJSON,
91
+ ScriptNodeInputToJSONTyped,
92
+ } from './ScriptNodeInput';
72
93
 
73
94
  /**
74
- * What the alert watches; the fields depend on `type` (each field names the types that take it; any other field is refused). Companies: `ciks` / `symbols` (at most 100 in all) or, for single-company types, `cik` / `symbol`. A symbol is resolved to its CIK at create. Price types (`price`, `price_move`, `volume_spike`, `price_reminder`), `script` and `indicator` watch ONE instrument: `symbol` + `asset_class`. An `indicator` alert takes a built-in `template` (`GET /v1/alert-templates`) or a structured `condition` (+ optional `filters`) on `symbol` / `interval`; alerts crossing a constant on the same indicator, instrument and interval share one evaluation whatever the threshold. Coverage: `filing_keyword`, `fundamental_metric` and `earnings_results` work only for companies whose filings and financials Invinite processes (any other company answers 404 `not_covered`); `earnings_call_keyword` takes any company with captured calls. (request form) US ETFs: `dividend`, `event_countdown` (`ex_dividend` / `dividend_payment`), `filing` and `filing_keyword` take an ETF ticker (SPY or a trust series such as TQQQ; a series ETF is stored by symbol and fires only on events that name it, never on another series' filing of its trust); `earnings_call`, `earnings_call_keyword`, `earnings_results`, `fundamental_metric` and an `earnings_call` countdown refuse an ETF by name (400 `invalid_parameter`), `news` / `news_keyword` a series ETF.
95
+ * What the alert watches; the fields depend on `type` (each field names the types that take it; any other field is refused). Companies: `ciks` / `symbols` (at most 100 in all) or, for single-company types, `cik` / `symbol`. A symbol is resolved to its CIK at create. Price types (`price`, `price_move`, `volume_spike`, `price_reminder`), `script` and `indicator` watch ONE instrument: `symbol` + `asset_class`. An `indicator` alert takes a built-in `template` (`GET /v1/alert-templates`) or a structured `condition` (+ optional `filters`) on `symbol` / `interval`; alerts crossing a constant on the same indicator, instrument and interval share one evaluation whatever the threshold. Coverage: `filing_keyword`, `fundamental_metric` and `earnings_results` work only for companies whose filings and financials Invinite processes (any other company answers 404 `not_covered`); `earnings_call_keyword` takes any company with captured calls. (request form) US ETFs: `dividend`, `event_countdown` (`ex_dividend` / `dividend_payment`), `filing` and `filing_keyword` take an ETF ticker (SPY or a trust series such as TQQQ; a series ETF is stored by symbol and fires only on events that name it, never on another series' filing of its trust); `earnings_call`, `earnings_call_keyword`, `earnings_results`, `fundamental_metric`, `news`, `news_keyword` and an `earnings_call` countdown refuse an ETF of either identity (its ticker or a fund registrant's CIK) by name (400 `invalid_parameter`).
75
96
  * @export
76
97
  * @interface AlertConditionInput
77
98
  */
@@ -95,7 +116,7 @@ export interface AlertConditionInput {
95
116
  */
96
117
  cik?: string;
97
118
  /**
98
- * The company (or, for the types that take ETFs, the US ETF) by ticker. Same types as `cik`; price types, script and indicator: the instrument (a US stock / ETF ticker, or a crypto slug / ticker)
119
+ * The company (or, for the types that take ETFs, the US ETF) by ticker. Same types as `cik`; price types, script and indicator: the instrument (a US stock / ETF ticker, a crypto slug / ticker, or a commodity `XAUUSD` / `XAGUSD`)
99
120
  * @type {string}
100
121
  * @memberof AlertConditionInput
101
122
  */
@@ -275,7 +296,7 @@ export interface AlertConditionInput {
275
296
  */
276
297
  notify_on_date_change?: boolean;
277
298
  /**
278
- * The instrument's market: `us_stock` (US stocks and ETFs) or `crypto` (coins by CoinGecko slug or ticker). Absent at create = a stock first, then a coin; stored resolved. price, price_move, volume_spike, price_reminder, script, indicator
299
+ * The instrument's market: `us_stock` (US stocks and ETFs), `crypto` (coins by CoinGecko slug or ticker) or `commodity` (`XAUUSD` / `XAGUSD`, only when named). Absent at create = a stock first, then a coin; stored resolved. price, price_move, volume_spike, price_reminder, script, indicator
279
300
  * @type {AlertConditionInputAssetClassEnum}
280
301
  * @memberof AlertConditionInput
281
302
  */
@@ -323,7 +344,7 @@ export interface AlertConditionInput {
323
344
  */
324
345
  mode?: AlertConditionInputModeEnum;
325
346
  /**
326
- * The bar evaluated at its close. volume_spike (1h, 1d, 1w, 1mo); script and indicator (1m, 5m, 15m, 30m, 1h, 4h, 1d; the plan's shortest: FREE / LITE 1h, STANDARD 5m, PRO 1m)
347
+ * The bar evaluated at its close. volume_spike (1m, 5m, 15m, 30m, 1h, 1d, 1w, 1mo; every closed bar); script and indicator (1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w, 1mo; the plan's shortest: FREE / LITE 1h, STANDARD 5m, PRO 1m)
327
348
  * @type {AlertConditionInputIntervalEnum}
328
349
  * @memberof AlertConditionInput
329
350
  */
@@ -359,7 +380,7 @@ export interface AlertConditionInput {
359
380
  */
360
381
  price_direction?: AlertConditionInputPriceDirectionEnum;
361
382
  /**
362
- * price_reminder: when the reminder fires — once at `at`, on the hour, daily or weekly at `time_of_day_minutes`. script: when the script's alerts deliver — `once_per_bar_close` (default) at most once per alert id and closed bar, `once_per_bar` the same, `every_time` every evaluation, `once` the first evaluation only. indicator: the same (`once` = this alert's first fire only). price_reminder, script, indicator
383
+ * price_reminder: when the reminder fires — once at `at`, on the hour, daily or weekly at `time_of_day_minutes`. script: when the script's alerts deliver — `once_per_bar_close` (default) at most once per alert id and closed bar, `once_per_bar` the same, `every_time` every evaluation, `once` the first evaluation only. indicator: the same (`once` = this alert's first fire only). With `evaluation` pre_close: one delivery per alert id and session (`every_time`: every signal of the pass; `once`: the first only). price_reminder, script, indicator
363
384
  * @type {AlertConditionInputFrequencyEnum}
364
385
  * @memberof AlertConditionInput
365
386
  */
@@ -394,12 +415,30 @@ export interface AlertConditionInput {
394
415
  * @memberof AlertConditionInput
395
416
  */
396
417
  inputs?: { [key: string]: any; };
418
+ /**
419
+ * A script chain: what feeds each of the script's `input.externalSeries` inputs, by its input key (every such input must be bound; ≤ 4 `builtin_indicator`, ≤ 16 in the plan). script
420
+ * @type {{ [key: string]: ScriptSeriesInputInput; }}
421
+ * @memberof AlertConditionInput
422
+ */
423
+ series_inputs?: { [key: string]: ScriptSeriesInputInput; };
424
+ /**
425
+ * The producer scripts `script_output` series inputs read, producers before the nodes that read them (≤ 8 dependencies, ≤ 16,384 bytes with series_inputs). script
426
+ * @type {Array<ScriptNodeInput>}
427
+ * @memberof AlertConditionInput
428
+ */
429
+ nodes?: Array<ScriptNodeInput>;
397
430
  /**
398
431
  * Only these of the script's alerts (its version's `alert_ids`); empty = all. script
399
432
  * @type {Array<string>}
400
433
  * @memberof AlertConditionInput
401
434
  */
402
435
  alert_ids?: Array<string>;
436
+ /**
437
+ *
438
+ * @type {ScriptEvaluationInput}
439
+ * @memberof AlertConditionInput
440
+ */
441
+ evaluation?: ScriptEvaluationInput;
403
442
  /**
404
443
  *
405
444
  * @type {IndicatorTemplateRef}
@@ -550,7 +589,8 @@ export type AlertConditionInputEventEnum = typeof AlertConditionInputEventEnum[k
550
589
  */
551
590
  export const AlertConditionInputAssetClassEnum = {
552
591
  UsStock: 'us_stock',
553
- Crypto: 'crypto'
592
+ Crypto: 'crypto',
593
+ Commodity: 'commodity'
554
594
  } as const;
555
595
  export type AlertConditionInputAssetClassEnum = typeof AlertConditionInputAssetClassEnum[keyof typeof AlertConditionInputAssetClassEnum];
556
596
 
@@ -719,7 +759,10 @@ export function AlertConditionInputFromJSONTyped(json: any, ignoreDiscriminator:
719
759
  'days': json['days'] == null ? undefined : json['days'],
720
760
  'script_version_id': json['script_version_id'] == null ? undefined : json['script_version_id'],
721
761
  'inputs': json['inputs'] == null ? undefined : json['inputs'],
762
+ 'series_inputs': json['series_inputs'] == null ? undefined : (mapValues(json['series_inputs'], ScriptSeriesInputInputFromJSON)),
763
+ 'nodes': json['nodes'] == null ? undefined : ((json['nodes'] as Array<any>).map(ScriptNodeInputFromJSON)),
722
764
  'alert_ids': json['alert_ids'] == null ? undefined : json['alert_ids'],
765
+ 'evaluation': json['evaluation'] == null ? undefined : ScriptEvaluationInputFromJSON(json['evaluation']),
723
766
  'template': json['template'] == null ? undefined : IndicatorTemplateRefFromJSON(json['template']),
724
767
  'condition': json['condition'] == null ? undefined : IndicatorConditionInputFromJSON(json['condition']),
725
768
  'filters': json['filters'] == null ? undefined : IndicatorFiltersInputFromJSON(json['filters']),
@@ -790,7 +833,10 @@ export function AlertConditionInputToJSONTyped(value?: AlertConditionInput | nul
790
833
  'days': value['days'],
791
834
  'script_version_id': value['script_version_id'],
792
835
  'inputs': value['inputs'],
836
+ 'series_inputs': value['series_inputs'] == null ? undefined : (mapValues(value['series_inputs'], ScriptSeriesInputInputToJSON)),
837
+ 'nodes': value['nodes'] == null ? undefined : ((value['nodes'] as Array<any>).map(ScriptNodeInputToJSON)),
793
838
  'alert_ids': value['alert_ids'],
839
+ 'evaluation': ScriptEvaluationInputToJSON(value['evaluation']),
794
840
  'template': IndicatorTemplateRefToJSON(value['template']),
795
841
  'condition': IndicatorConditionInputToJSON(value['condition']),
796
842
  'filters': IndicatorFiltersInputToJSON(value['filters']),
@@ -34,13 +34,13 @@ export interface AlertTrigger {
34
34
  */
35
35
  mode?: AlertTriggerModeEnum;
36
36
  /**
37
- * Minimum seconds between fires
37
+ * Minimum seconds between fires (at most 366 days)
38
38
  * @type {number}
39
39
  * @memberof AlertTrigger
40
40
  */
41
41
  cooldown_seconds?: number;
42
42
  /**
43
- * Minimum bars between fires (script / indicator types), counted like chartlang: the bar of a fire must start at least cooldown_bars × the interval after the bar of the last fire, so a night or a weekend counts as time
43
+ * Minimum bars between fires (script / indicator types), counted like chartlang: the bar of a fire must start at least cooldown_bars × the interval after the bar of the last fire, so a night or a weekend counts as time (half a bar of slack: a calendar `1mo` / `1w` / `1d` bar shorter than the nominal interval, a February or a DST day, still counts as a whole bar)
44
44
  * @type {number}
45
45
  * @memberof AlertTrigger
46
46
  */
@@ -34,13 +34,13 @@ export interface AlertTriggerInput {
34
34
  */
35
35
  mode?: AlertTriggerInputModeEnum;
36
36
  /**
37
- * Minimum seconds between fires
37
+ * Minimum seconds between fires (at most 366 days)
38
38
  * @type {number}
39
39
  * @memberof AlertTriggerInput
40
40
  */
41
41
  cooldown_seconds?: number;
42
42
  /**
43
- * Minimum bars between fires (script / indicator types), counted like chartlang: the bar of a fire must start at least cooldown_bars × the interval after the bar of the last fire, so a night or a weekend counts as time
43
+ * Minimum bars between fires (script / indicator types), counted like chartlang: the bar of a fire must start at least cooldown_bars × the interval after the bar of the last fire, so a night or a weekend counts as time (half a bar of slack: a calendar `1mo` / `1w` / `1d` bar shorter than the nominal interval, a February or a DST day, still counts as a whole bar)
44
44
  * @type {number}
45
45
  * @memberof AlertTriggerInput
46
46
  */
@@ -34,7 +34,7 @@ export interface Company {
34
34
  */
35
35
  ticker: string;
36
36
  /**
37
- * CIK with or without leading zeros
37
+ * CIK with or without leading zeros; for a US ETF that is a series of a multi-series trust (TQQQ) the trust's CIK, empty ("") for such an ETF without a registrant link
38
38
  * @type {string}
39
39
  * @memberof Company
40
40
  */
@@ -52,7 +52,7 @@ export interface Company {
52
52
  */
53
53
  description: string | null;
54
54
  /**
55
- * High-level category
55
+ * High-level category (`ETF` for a series of a multi-series trust such as TQQQ)
56
56
  * @type {string}
57
57
  * @memberof Company
58
58
  */
@@ -76,13 +76,13 @@ export interface Company {
76
76
  */
77
77
  sic: string | null;
78
78
  /**
79
- * Fama-French sector
79
+ * Fama-French sector, from the issuer's SIC code; null for a US ETF (no SIC-derived values are shown for a fund)
80
80
  * @type {string}
81
81
  * @memberof Company
82
82
  */
83
83
  fama_sector: string | null;
84
84
  /**
85
- * Fama-French industry
85
+ * Fama-French industry, from the issuer's SIC code; null for a US ETF (no SIC-derived values are shown for a fund)
86
86
  * @type {string}
87
87
  * @memberof Company
88
88
  */
@@ -202,7 +202,7 @@ export interface Company {
202
202
  */
203
203
  brand_colors: Array<string> | null;
204
204
  /**
205
- * Street address
205
+ * Street address; null for a US ETF
206
206
  * @type {string}
207
207
  * @memberof Company
208
208
  */
@@ -220,7 +220,7 @@ export interface Company {
220
220
  */
221
221
  state: string | null;
222
222
  /**
223
- * Postal/ZIP code
223
+ * Postal/ZIP code; null for a US ETF
224
224
  * @type {string}
225
225
  * @memberof Company
226
226
  */
@@ -74,7 +74,10 @@ export const IndicatorFilterConditionIntervalEnum = {
74
74
  _15m: '15m',
75
75
  _30m: '30m',
76
76
  _1h: '1h',
77
- _1d: '1d'
77
+ _4h: '4h',
78
+ _1d: '1d',
79
+ _1w: '1w',
80
+ _1mo: '1mo'
78
81
  } as const;
79
82
  export type IndicatorFilterConditionIntervalEnum = typeof IndicatorFilterConditionIntervalEnum[keyof typeof IndicatorFilterConditionIntervalEnum] | (string & {});
80
83
 
@@ -74,7 +74,10 @@ export const IndicatorFilterConditionInputIntervalEnum = {
74
74
  _15m: '15m',
75
75
  _30m: '30m',
76
76
  _1h: '1h',
77
- _1d: '1d'
77
+ _4h: '4h',
78
+ _1d: '1d',
79
+ _1w: '1w',
80
+ _1mo: '1mo'
78
81
  } as const;
79
82
  export type IndicatorFilterConditionInputIntervalEnum = typeof IndicatorFilterConditionInputIntervalEnum[keyof typeof IndicatorFilterConditionInputIntervalEnum];
80
83
 
@@ -0,0 +1,107 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Invinite API
5
+ * Invinite financial data API. Each operation has a base credit cost: `x-credits` is the base cost; responses add 1 credit per started 1,000 rows beyond the first 1,000; `X-Credits-Charged` reports the final debit and `X-Credits-Remaining` what is left of the plan\'s included credits after it. A `304 Not Modified` costs nothing. `GET /v1/me/usage` returns your account\'s usage by day, product family and key (it costs no credits). **Coverage.** Financial data covers US SEC registrants and their US listings; a symbol that is not a US SEC registrant (or a crypto pair such as `X:BTCUSD`) is not a known company and answers 404. A known company with no data in a family (for example no statements yet) answers 404 with `code: not_covered`; an empty page of a covered company stays 200 with an empty list. `GET /v1/companies` lists every known company. ## Webhooks Alerts (`POST /v1/alerts`) deliver their events to your destinations (`POST /v1/destinations`) as [Standard Webhooks](https://github.com/standard-webhooks/standard-webhooks/blob/main/spec/standard-webhooks.md): `alert.fired`, `alert.fired.batch`, `alert.status_changed`, `destination.disabled`, `destination.test`, `account.fire_cap_reached`; see `x-webhooks` for each `data` object. Every event is also on the pull feed `GET /v1/alert-events`. Every delivery is a `POST` with `Content-Type: application/json`, the body `{type, timestamp, data}` (or the destination\'s `body_template`) and the headers `webhook-id` (the event id; a batch: its `bat_…` id), `webhook-timestamp` (unix seconds) and `webhook-signature`: space-separated `v1,<base64 HMAC-SHA256 of <webhook-id>.<webhook-timestamp>.<raw body>>`, keyed with the base64-DECODED bytes of the destination\'s `whsec_…` secret — any Standard Webhooks library verifies it. After `POST /v1/destinations/{id}:rotate-secret` the old secret keeps signing beside the new one for 24 h (two `v1` entries). Reject a timestamp older than 5 minutes. Any 2xx within 10 s acknowledges; redirects are not followed; a body above 256 KB is not sent. A failed attempt is retried after [0, 5 s, 5 min, 30 min, 2 h, 5 h, 10 h, 10 h, 10 h, 34 h] (attempt n waits the n-th step) plus up to 10 % jitter; the delivery is dead after attempt 10. A 410 disables the destination at once; so do 72 h of nothing but failures with at least 10 failed attempts in a row (a `destination.disabled` event on the feed and a mail; `PATCH` with `status: active` re-enables it). Delivery is at-least-once and unordered: dedupe on `webhook-id`, order by `timestamp`. A `batch_webhook` destination receives `alert.fired.batch` with the pending events in `data.events[]` (dedupe on each `data.event_id`). Fires and deliveries cost no credits; two fair-use caps apply instead: at most 60 fires per alert per rolling hour (beyond: suppressed and counted in the next fire\'s `suppressed_since_last`) and per account and UTC day FREE 100 · LITE 5,000 · STANDARD 50,000 · PRO 500,000 fires (beyond: written to the feed with `delivery_skipped: fire_cap`, not delivered; one `account.fire_cap_reached` per day). ## Licensing | Tier | display | redistribute | rag | train | audio | resell | | --- | --- | --- | --- | --- | --- | --- | | FREE | ✓ | – | – | – | – | – | | LITE | ✓ | – | – | – | – | – | | STANDARD | ✓ | – | ✓ | – | – | – | | PRO | ✓ | ✓ | ✓ | – | ✓ | – | Invinite data may be shown and, from PRO, redistributed inside the licensee\'s own product with attribution (\"Source: Invinite\" on screen or in the API response that carries it). It may never be resold, relicensed, white-labelled or offered as a data feed as the licensee\'s own data, at any tier, under any contract. Policy version: 2026-10-draft. Draft — pending counsel sign-off. Audio files carry a forensic watermark that identifies the recording. Audio is subject to per-company takedown and may not be re-hosted. SEC data: Figures and filings originate from SEC EDGAR; the standardisation, mapping and derived metrics are Invinite\'s. News: News text is Invinite\'s own summary of the issuer\'s or the SEC\'s publication (the publisher\'s text and media are never served); the licensee shows the attribution (publisher, source URL and date) next to it; the resale rule applies. PDF documents: Branded PDFs of transcripts and news items are permanent URLs to one shared file per version. They may be shown, downloaded and forwarded unmodified with the notice page intact; the resale rule applies unchanged. News PDFs carry Invinite\'s summary of the issuer\'s or the SEC\'s publication under the attribution stated on their notice page; a PDF disappears when the item is taken down or its source\'s reuse is denied. Every `/v1/_*` data operation carries `x-license`, the minimum use right its data ships with; `GET /status/licensing` serves the same matrix per route, rendered at [data.invinite.com/docs/licensing](https://data.invinite.com/docs/licensing). `/v1/me` and `/v1/me/usage` serve no licensed data and carry none. ## Status [`/status`](/status) reports whether each product family works (a status and its uptime over 7, 30 and 90 days); [`/status/licensing`](/status/licensing) serves the licensing matrix per route. The status routes need no API key and are cached for 5 minutes. The public status page is [status.data.invinite.com](https://status.data.invinite.com): a snapshot of `/status` every 15 minutes plus an external reachability probe of the API. Uptime is the share of requests answered without a server error, measured by the API per product family; a window with too little traffic to judge shows no figure. Status reflects the last 24 hours. Product families: Company, Financials, SEC Filings, Insider Trades, Institutional Ownership, IPOs, Market, Metadata, Earnings Calls, News, WebSocket, Account, Alerts.
6
+ *
7
+ * The version of the OpenAPI document: 2026-11-13
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * When a script / indicator alert evaluates: `bar_close` (default) at each close of its interval, or `pre_close` — `offset_minutes` before the US session close (16:00 New York, 13:00 on a half day, never on a weekend or market holiday) on the still-forming bar of its interval. A pre_close alert delivers ONLY its pre-close evaluations (its closed bars still advance the script; their events are not delivered), at most once per session; the fire's `reason.details` carry `phase: "pre_close"`, `offset_minutes` and `session_close`.
18
+ * @export
19
+ * @interface ScriptEvaluation
20
+ */
21
+ export interface ScriptEvaluation {
22
+ /**
23
+ * `bar_close` at each bar close, `pre_close` before the session close
24
+ * @type {ScriptEvaluationKindEnum}
25
+ * @memberof ScriptEvaluation
26
+ */
27
+ kind: ScriptEvaluationKindEnum;
28
+ /**
29
+ * pre_close: minutes before the session close (1–720; any interval)
30
+ * @type {number}
31
+ * @memberof ScriptEvaluation
32
+ */
33
+ offset_minutes?: number;
34
+ /**
35
+ * pre_close: the venue whose close anchors the evaluation (every US venue shares the 16:00 New York close and the US holiday calendar); optional for a US stock, required for crypto and commodities
36
+ * @type {ScriptEvaluationExchangeEnum}
37
+ * @memberof ScriptEvaluation
38
+ */
39
+ exchange?: ScriptEvaluationExchangeEnum;
40
+ }
41
+
42
+
43
+ /**
44
+ * @export
45
+ */
46
+ export const ScriptEvaluationKindEnum = {
47
+ BarClose: 'bar_close',
48
+ PreClose: 'pre_close'
49
+ } as const;
50
+ export type ScriptEvaluationKindEnum = typeof ScriptEvaluationKindEnum[keyof typeof ScriptEvaluationKindEnum] | (string & {});
51
+
52
+ /**
53
+ * @export
54
+ */
55
+ export const ScriptEvaluationExchangeEnum = {
56
+ Nyse: 'NYSE',
57
+ Nasdaq: 'NASDAQ',
58
+ Amex: 'AMEX',
59
+ Nysearca: 'NYSEARCA',
60
+ Nysemkt: 'NYSEMKT',
61
+ Bats: 'BATS',
62
+ Cboe: 'CBOE'
63
+ } as const;
64
+ export type ScriptEvaluationExchangeEnum = typeof ScriptEvaluationExchangeEnum[keyof typeof ScriptEvaluationExchangeEnum] | (string & {});
65
+
66
+
67
+ /**
68
+ * Check if a given object implements the ScriptEvaluation interface.
69
+ */
70
+ export function instanceOfScriptEvaluation(value: object): value is ScriptEvaluation {
71
+ if (!('kind' in value) || value['kind'] === undefined) return false;
72
+ return true;
73
+ }
74
+
75
+ export function ScriptEvaluationFromJSON(json: any): ScriptEvaluation {
76
+ return ScriptEvaluationFromJSONTyped(json, false);
77
+ }
78
+
79
+ export function ScriptEvaluationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptEvaluation {
80
+ if (json == null) {
81
+ return json;
82
+ }
83
+ return {
84
+
85
+ 'kind': json['kind'],
86
+ 'offset_minutes': json['offset_minutes'] == null ? undefined : json['offset_minutes'],
87
+ 'exchange': json['exchange'] == null ? undefined : json['exchange'],
88
+ };
89
+ }
90
+
91
+ export function ScriptEvaluationToJSON(json: any): ScriptEvaluation {
92
+ return ScriptEvaluationToJSONTyped(json, false);
93
+ }
94
+
95
+ export function ScriptEvaluationToJSONTyped(value?: ScriptEvaluation | null, ignoreDiscriminator: boolean = false): any {
96
+ if (value == null) {
97
+ return value;
98
+ }
99
+
100
+ return {
101
+
102
+ 'kind': value['kind'],
103
+ 'offset_minutes': value['offset_minutes'],
104
+ 'exchange': value['exchange'],
105
+ };
106
+ }
107
+