@invinite-org/data-api-client 6.2.0 → 6.3.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 (192) hide show
  1. package/.openapi-generator/FILES +52 -0
  2. package/dist/apis/ScriptsApi.d.ts +148 -0
  3. package/dist/apis/ScriptsApi.js +396 -0
  4. package/dist/apis/index.d.ts +1 -0
  5. package/dist/apis/index.js +1 -0
  6. package/dist/esm/apis/ScriptsApi.d.ts +148 -0
  7. package/dist/esm/apis/ScriptsApi.js +392 -0
  8. package/dist/esm/apis/index.d.ts +1 -0
  9. package/dist/esm/apis/index.js +1 -0
  10. package/dist/esm/models/Alert.d.ts +6 -0
  11. package/dist/esm/models/Alert.js +4 -0
  12. package/dist/esm/models/AlertCondition.d.ts +61 -5
  13. package/dist/esm/models/AlertCondition.js +27 -1
  14. package/dist/esm/models/AlertConditionInput.d.ts +54 -5
  15. package/dist/esm/models/AlertConditionInput.js +24 -1
  16. package/dist/esm/models/AlertTemplate.d.ts +83 -0
  17. package/dist/esm/models/AlertTemplate.js +79 -0
  18. package/dist/esm/models/AlertTemplateInput.d.ts +78 -0
  19. package/dist/esm/models/AlertTemplateInput.js +70 -0
  20. package/dist/esm/models/AlertTrigger.d.ts +1 -1
  21. package/dist/esm/models/AlertTriggerInput.d.ts +1 -1
  22. package/dist/esm/models/CreateScriptRequest.d.ts +44 -0
  23. package/dist/esm/models/CreateScriptRequest.js +49 -0
  24. package/dist/esm/models/CreateScriptVersionRequest.d.ts +32 -0
  25. package/dist/esm/models/CreateScriptVersionRequest.js +43 -0
  26. package/dist/esm/models/IndicatorCondition.d.ts +56 -0
  27. package/dist/esm/models/IndicatorCondition.js +62 -0
  28. package/dist/esm/models/IndicatorConditionInput.d.ts +56 -0
  29. package/dist/esm/models/IndicatorConditionInput.js +62 -0
  30. package/dist/esm/models/IndicatorFilterChild.d.ts +68 -0
  31. package/dist/esm/models/IndicatorFilterChild.js +65 -0
  32. package/dist/esm/models/IndicatorFilterChildInput.d.ts +68 -0
  33. package/dist/esm/models/IndicatorFilterChildInput.js +65 -0
  34. package/dist/esm/models/IndicatorFilterCondition.d.ts +73 -0
  35. package/dist/esm/models/IndicatorFilterCondition.js +74 -0
  36. package/dist/esm/models/IndicatorFilterConditionInput.d.ts +73 -0
  37. package/dist/esm/models/IndicatorFilterConditionInput.js +74 -0
  38. package/dist/esm/models/IndicatorFilterLeaf.d.ts +46 -0
  39. package/dist/esm/models/IndicatorFilterLeaf.js +54 -0
  40. package/dist/esm/models/IndicatorFilterLeafInput.d.ts +46 -0
  41. package/dist/esm/models/IndicatorFilterLeafInput.js +56 -0
  42. package/dist/esm/models/IndicatorFilters.d.ts +47 -0
  43. package/dist/esm/models/IndicatorFilters.js +55 -0
  44. package/dist/esm/models/IndicatorFiltersInput.d.ts +47 -0
  45. package/dist/esm/models/IndicatorFiltersInput.js +55 -0
  46. package/dist/esm/models/IndicatorOperand.d.ts +91 -0
  47. package/dist/esm/models/IndicatorOperand.js +74 -0
  48. package/dist/esm/models/IndicatorOperandInput.d.ts +91 -0
  49. package/dist/esm/models/IndicatorOperandInput.js +74 -0
  50. package/dist/esm/models/IndicatorResolved.d.ts +67 -0
  51. package/dist/esm/models/IndicatorResolved.js +65 -0
  52. package/dist/esm/models/IndicatorResolvedThreshold.d.ts +47 -0
  53. package/dist/esm/models/IndicatorResolvedThreshold.js +55 -0
  54. package/dist/esm/models/IndicatorTemplateRef.d.ts +46 -0
  55. package/dist/esm/models/IndicatorTemplateRef.js +47 -0
  56. package/dist/esm/models/ListAlertTemplates200Response.d.ts +52 -0
  57. package/dist/esm/models/ListAlertTemplates200Response.js +57 -0
  58. package/dist/esm/models/ListScriptVersions200Response.d.ts +52 -0
  59. package/dist/esm/models/ListScriptVersions200Response.js +57 -0
  60. package/dist/esm/models/ListScripts200Response.d.ts +52 -0
  61. package/dist/esm/models/ListScripts200Response.js +57 -0
  62. package/dist/esm/models/Script.d.ts +69 -0
  63. package/dist/esm/models/Script.js +68 -0
  64. package/dist/esm/models/ScriptDiagnostic.d.ts +64 -0
  65. package/dist/esm/models/ScriptDiagnostic.js +66 -0
  66. package/dist/esm/models/ScriptVersion.d.ts +103 -0
  67. package/dist/esm/models/ScriptVersion.js +91 -0
  68. package/dist/esm/models/index.d.ts +25 -0
  69. package/dist/esm/models/index.js +25 -0
  70. package/dist/models/Alert.d.ts +6 -0
  71. package/dist/models/Alert.js +4 -0
  72. package/dist/models/AlertCondition.d.ts +61 -5
  73. package/dist/models/AlertCondition.js +27 -1
  74. package/dist/models/AlertConditionInput.d.ts +54 -5
  75. package/dist/models/AlertConditionInput.js +24 -1
  76. package/dist/models/AlertTemplate.d.ts +83 -0
  77. package/dist/models/AlertTemplate.js +87 -0
  78. package/dist/models/AlertTemplateInput.d.ts +78 -0
  79. package/dist/models/AlertTemplateInput.js +78 -0
  80. package/dist/models/AlertTrigger.d.ts +1 -1
  81. package/dist/models/AlertTriggerInput.d.ts +1 -1
  82. package/dist/models/CreateScriptRequest.d.ts +44 -0
  83. package/dist/models/CreateScriptRequest.js +56 -0
  84. package/dist/models/CreateScriptVersionRequest.d.ts +32 -0
  85. package/dist/models/CreateScriptVersionRequest.js +50 -0
  86. package/dist/models/IndicatorCondition.d.ts +56 -0
  87. package/dist/models/IndicatorCondition.js +70 -0
  88. package/dist/models/IndicatorConditionInput.d.ts +56 -0
  89. package/dist/models/IndicatorConditionInput.js +70 -0
  90. package/dist/models/IndicatorFilterChild.d.ts +68 -0
  91. package/dist/models/IndicatorFilterChild.js +73 -0
  92. package/dist/models/IndicatorFilterChildInput.d.ts +68 -0
  93. package/dist/models/IndicatorFilterChildInput.js +73 -0
  94. package/dist/models/IndicatorFilterCondition.d.ts +73 -0
  95. package/dist/models/IndicatorFilterCondition.js +82 -0
  96. package/dist/models/IndicatorFilterConditionInput.d.ts +73 -0
  97. package/dist/models/IndicatorFilterConditionInput.js +82 -0
  98. package/dist/models/IndicatorFilterLeaf.d.ts +46 -0
  99. package/dist/models/IndicatorFilterLeaf.js +62 -0
  100. package/dist/models/IndicatorFilterLeafInput.d.ts +46 -0
  101. package/dist/models/IndicatorFilterLeafInput.js +64 -0
  102. package/dist/models/IndicatorFilters.d.ts +47 -0
  103. package/dist/models/IndicatorFilters.js +63 -0
  104. package/dist/models/IndicatorFiltersInput.d.ts +47 -0
  105. package/dist/models/IndicatorFiltersInput.js +63 -0
  106. package/dist/models/IndicatorOperand.d.ts +91 -0
  107. package/dist/models/IndicatorOperand.js +82 -0
  108. package/dist/models/IndicatorOperandInput.d.ts +91 -0
  109. package/dist/models/IndicatorOperandInput.js +82 -0
  110. package/dist/models/IndicatorResolved.d.ts +67 -0
  111. package/dist/models/IndicatorResolved.js +73 -0
  112. package/dist/models/IndicatorResolvedThreshold.d.ts +47 -0
  113. package/dist/models/IndicatorResolvedThreshold.js +63 -0
  114. package/dist/models/IndicatorTemplateRef.d.ts +46 -0
  115. package/dist/models/IndicatorTemplateRef.js +54 -0
  116. package/dist/models/ListAlertTemplates200Response.d.ts +52 -0
  117. package/dist/models/ListAlertTemplates200Response.js +64 -0
  118. package/dist/models/ListScriptVersions200Response.d.ts +52 -0
  119. package/dist/models/ListScriptVersions200Response.js +64 -0
  120. package/dist/models/ListScripts200Response.d.ts +52 -0
  121. package/dist/models/ListScripts200Response.js +64 -0
  122. package/dist/models/Script.d.ts +69 -0
  123. package/dist/models/Script.js +75 -0
  124. package/dist/models/ScriptDiagnostic.d.ts +64 -0
  125. package/dist/models/ScriptDiagnostic.js +74 -0
  126. package/dist/models/ScriptVersion.d.ts +103 -0
  127. package/dist/models/ScriptVersion.js +99 -0
  128. package/dist/models/index.d.ts +25 -0
  129. package/dist/models/index.js +25 -0
  130. package/docs/Alert.md +2 -0
  131. package/docs/AlertCondition.md +15 -1
  132. package/docs/AlertConditionInput.md +13 -1
  133. package/docs/AlertTemplate.md +49 -0
  134. package/docs/AlertTemplateInput.md +47 -0
  135. package/docs/CreateScriptRequest.md +38 -0
  136. package/docs/CreateScriptVersionRequest.md +34 -0
  137. package/docs/IndicatorCondition.md +39 -0
  138. package/docs/IndicatorConditionInput.md +39 -0
  139. package/docs/IndicatorFilterChild.md +41 -0
  140. package/docs/IndicatorFilterChildInput.md +41 -0
  141. package/docs/IndicatorFilterCondition.md +41 -0
  142. package/docs/IndicatorFilterConditionInput.md +41 -0
  143. package/docs/IndicatorFilterLeaf.md +37 -0
  144. package/docs/IndicatorFilterLeafInput.md +37 -0
  145. package/docs/IndicatorFilters.md +37 -0
  146. package/docs/IndicatorFiltersInput.md +37 -0
  147. package/docs/IndicatorOperand.md +47 -0
  148. package/docs/IndicatorOperandInput.md +47 -0
  149. package/docs/IndicatorResolved.md +43 -0
  150. package/docs/IndicatorResolvedThreshold.md +37 -0
  151. package/docs/IndicatorTemplateRef.md +39 -0
  152. package/docs/ListAlertTemplates200Response.md +41 -0
  153. package/docs/ListScriptVersions200Response.md +41 -0
  154. package/docs/ListScripts200Response.md +41 -0
  155. package/docs/Script.md +46 -0
  156. package/docs/ScriptDiagnostic.md +42 -0
  157. package/docs/ScriptVersion.md +54 -0
  158. package/docs/ScriptsApi.md +588 -0
  159. package/package.json +1 -1
  160. package/src/apis/ScriptsApi.ts +504 -0
  161. package/src/apis/index.ts +1 -0
  162. package/src/models/Alert.ts +9 -0
  163. package/src/models/AlertCondition.ts +98 -6
  164. package/src/models/AlertConditionInput.ts +83 -6
  165. package/src/models/AlertTemplate.ts +148 -0
  166. package/src/models/AlertTemplateInput.ts +130 -0
  167. package/src/models/AlertTrigger.ts +1 -1
  168. package/src/models/AlertTriggerInput.ts +1 -1
  169. package/src/models/CreateScriptRequest.ts +83 -0
  170. package/src/models/CreateScriptVersionRequest.ts +66 -0
  171. package/src/models/IndicatorCondition.ts +106 -0
  172. package/src/models/IndicatorConditionInput.ts +106 -0
  173. package/src/models/IndicatorFilterChild.ts +125 -0
  174. package/src/models/IndicatorFilterChildInput.ts +125 -0
  175. package/src/models/IndicatorFilterCondition.ts +126 -0
  176. package/src/models/IndicatorFilterConditionInput.ts +126 -0
  177. package/src/models/IndicatorFilterLeaf.ts +93 -0
  178. package/src/models/IndicatorFilterLeafInput.ts +95 -0
  179. package/src/models/IndicatorFilters.ts +94 -0
  180. package/src/models/IndicatorFiltersInput.ts +94 -0
  181. package/src/models/IndicatorOperand.ts +139 -0
  182. package/src/models/IndicatorOperandInput.ts +139 -0
  183. package/src/models/IndicatorResolved.ts +120 -0
  184. package/src/models/IndicatorResolvedThreshold.ts +87 -0
  185. package/src/models/IndicatorTemplateRef.ts +82 -0
  186. package/src/models/ListAlertTemplates200Response.ts +108 -0
  187. package/src/models/ListScriptVersions200Response.ts +108 -0
  188. package/src/models/ListScripts200Response.ts +108 -0
  189. package/src/models/Script.ts +128 -0
  190. package/src/models/ScriptDiagnostic.ts +113 -0
  191. package/src/models/ScriptVersion.ts +175 -0
  192. package/src/models/index.ts +25 -0
@@ -0,0 +1,392 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { CreateScriptRequestToJSON, } from '../models/CreateScriptRequest';
25
+ import { CreateScriptVersionRequestToJSON, } from '../models/CreateScriptVersionRequest';
26
+ import { ListAlertTemplates200ResponseFromJSON, } from '../models/ListAlertTemplates200Response';
27
+ import { ListScriptVersions200ResponseFromJSON, } from '../models/ListScriptVersions200Response';
28
+ import { ListScripts200ResponseFromJSON, } from '../models/ListScripts200Response';
29
+ import { ScriptFromJSON, } from '../models/Script';
30
+ import { ScriptVersionFromJSON, } from '../models/ScriptVersion';
31
+ /**
32
+ *
33
+ */
34
+ export class ScriptsApi extends runtime.BaseAPI {
35
+ /**
36
+ * Creates request options for createScript without sending the request
37
+ */
38
+ createScriptRequestOpts(requestParameters) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (requestParameters['createScriptRequest'] == null) {
41
+ throw new runtime.RequiredError('createScriptRequest', 'Required parameter "createScriptRequest" was null or undefined when calling createScript().');
42
+ }
43
+ const queryParameters = {};
44
+ const headerParameters = {};
45
+ headerParameters['Content-Type'] = 'application/json';
46
+ if (this.configuration && this.configuration.accessToken) {
47
+ const token = this.configuration.accessToken;
48
+ const tokenString = yield token("bearerAuth", []);
49
+ if (tokenString) {
50
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
51
+ }
52
+ }
53
+ let urlPath = `/v1/scripts`;
54
+ return {
55
+ path: urlPath,
56
+ method: 'POST',
57
+ headers: headerParameters,
58
+ query: queryParameters,
59
+ body: CreateScriptRequestToJSON(requestParameters['createScriptRequest']),
60
+ };
61
+ });
62
+ }
63
+ /**
64
+ * Creates the script and its version 1, compiled server-side (≤ 10 s, one compile per account at a time — a second concurrent upload answers 429 with Retry-After; a busy compiler 503 with Retry-After). A compile error is still a 201: the version has `status: error` and `diagnostics` (line, column, message). Answers 503 `unavailable` while hosted scripts are switched off.
65
+ * Upload a script
66
+ */
67
+ createScriptRaw(requestParameters, initOverrides) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ const requestOptions = yield this.createScriptRequestOpts(requestParameters);
70
+ const response = yield this.request(requestOptions, initOverrides);
71
+ return new runtime.JSONApiResponse(response, (jsonValue) => ScriptFromJSON(jsonValue));
72
+ });
73
+ }
74
+ /**
75
+ * Creates the script and its version 1, compiled server-side (≤ 10 s, one compile per account at a time — a second concurrent upload answers 429 with Retry-After; a busy compiler 503 with Retry-After). A compile error is still a 201: the version has `status: error` and `diagnostics` (line, column, message). Answers 503 `unavailable` while hosted scripts are switched off.
76
+ * Upload a script
77
+ */
78
+ createScript(requestParameters, initOverrides) {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ const response = yield this.createScriptRaw(requestParameters, initOverrides);
81
+ return yield response.value();
82
+ });
83
+ }
84
+ /**
85
+ * Creates request options for createScriptVersion without sending the request
86
+ */
87
+ createScriptVersionRequestOpts(requestParameters) {
88
+ return __awaiter(this, void 0, void 0, function* () {
89
+ if (requestParameters['id'] == null) {
90
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling createScriptVersion().');
91
+ }
92
+ if (requestParameters['createScriptVersionRequest'] == null) {
93
+ throw new runtime.RequiredError('createScriptVersionRequest', 'Required parameter "createScriptVersionRequest" was null or undefined when calling createScriptVersion().');
94
+ }
95
+ const queryParameters = {};
96
+ const headerParameters = {};
97
+ headerParameters['Content-Type'] = 'application/json';
98
+ if (this.configuration && this.configuration.accessToken) {
99
+ const token = this.configuration.accessToken;
100
+ const tokenString = yield token("bearerAuth", []);
101
+ if (tokenString) {
102
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
103
+ }
104
+ }
105
+ let urlPath = `/v1/scripts/{id}/versions`;
106
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
107
+ return {
108
+ path: urlPath,
109
+ method: 'POST',
110
+ headers: headerParameters,
111
+ query: queryParameters,
112
+ body: CreateScriptVersionRequestToJSON(requestParameters['createScriptVersionRequest']),
113
+ };
114
+ });
115
+ }
116
+ /**
117
+ * Adds the next version of the script (at most 20 per script), compiled like the first. Existing alerts keep their version. Answers 503 `unavailable` while hosted scripts are switched off.
118
+ * Upload a new script version
119
+ */
120
+ createScriptVersionRaw(requestParameters, initOverrides) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ const requestOptions = yield this.createScriptVersionRequestOpts(requestParameters);
123
+ const response = yield this.request(requestOptions, initOverrides);
124
+ return new runtime.JSONApiResponse(response, (jsonValue) => ScriptVersionFromJSON(jsonValue));
125
+ });
126
+ }
127
+ /**
128
+ * Adds the next version of the script (at most 20 per script), compiled like the first. Existing alerts keep their version. Answers 503 `unavailable` while hosted scripts are switched off.
129
+ * Upload a new script version
130
+ */
131
+ createScriptVersion(requestParameters, initOverrides) {
132
+ return __awaiter(this, void 0, void 0, function* () {
133
+ const response = yield this.createScriptVersionRaw(requestParameters, initOverrides);
134
+ return yield response.value();
135
+ });
136
+ }
137
+ /**
138
+ * Creates request options for deleteScript without sending the request
139
+ */
140
+ deleteScriptRequestOpts(requestParameters) {
141
+ return __awaiter(this, void 0, void 0, function* () {
142
+ if (requestParameters['id'] == null) {
143
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteScript().');
144
+ }
145
+ const queryParameters = {};
146
+ const headerParameters = {};
147
+ if (this.configuration && this.configuration.accessToken) {
148
+ const token = this.configuration.accessToken;
149
+ const tokenString = yield token("bearerAuth", []);
150
+ if (tokenString) {
151
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
152
+ }
153
+ }
154
+ let urlPath = `/v1/scripts/{id}`;
155
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
156
+ return {
157
+ path: urlPath,
158
+ method: 'DELETE',
159
+ headers: headerParameters,
160
+ query: queryParameters,
161
+ };
162
+ });
163
+ }
164
+ /**
165
+ * Deletes the script and its versions (204). 409 `conflict` while an alert uses one of its versions (delete those alerts first). Answers 503 `unavailable` while hosted scripts are switched off.
166
+ * Delete a script
167
+ */
168
+ deleteScriptRaw(requestParameters, initOverrides) {
169
+ return __awaiter(this, void 0, void 0, function* () {
170
+ const requestOptions = yield this.deleteScriptRequestOpts(requestParameters);
171
+ const response = yield this.request(requestOptions, initOverrides);
172
+ if (this.isJsonMime(response.headers.get('content-type'))) {
173
+ return new runtime.JSONApiResponse(response);
174
+ }
175
+ else {
176
+ return new runtime.TextApiResponse(response);
177
+ }
178
+ });
179
+ }
180
+ /**
181
+ * Deletes the script and its versions (204). 409 `conflict` while an alert uses one of its versions (delete those alerts first). Answers 503 `unavailable` while hosted scripts are switched off.
182
+ * Delete a script
183
+ */
184
+ deleteScript(requestParameters, initOverrides) {
185
+ return __awaiter(this, void 0, void 0, function* () {
186
+ const response = yield this.deleteScriptRaw(requestParameters, initOverrides);
187
+ return yield response.value();
188
+ });
189
+ }
190
+ /**
191
+ * Creates request options for getScript without sending the request
192
+ */
193
+ getScriptRequestOpts(requestParameters) {
194
+ return __awaiter(this, void 0, void 0, function* () {
195
+ if (requestParameters['id'] == null) {
196
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getScript().');
197
+ }
198
+ const queryParameters = {};
199
+ const headerParameters = {};
200
+ if (this.configuration && this.configuration.accessToken) {
201
+ const token = this.configuration.accessToken;
202
+ const tokenString = yield token("bearerAuth", []);
203
+ if (tokenString) {
204
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
205
+ }
206
+ }
207
+ let urlPath = `/v1/scripts/{id}`;
208
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
209
+ return {
210
+ path: urlPath,
211
+ method: 'GET',
212
+ headers: headerParameters,
213
+ query: queryParameters,
214
+ };
215
+ });
216
+ }
217
+ /**
218
+ * One script with its latest version. Answers 503 `unavailable` while hosted scripts are switched off.
219
+ * Get a script
220
+ */
221
+ getScriptRaw(requestParameters, initOverrides) {
222
+ return __awaiter(this, void 0, void 0, function* () {
223
+ const requestOptions = yield this.getScriptRequestOpts(requestParameters);
224
+ const response = yield this.request(requestOptions, initOverrides);
225
+ return new runtime.JSONApiResponse(response, (jsonValue) => ScriptFromJSON(jsonValue));
226
+ });
227
+ }
228
+ /**
229
+ * One script with its latest version. Answers 503 `unavailable` while hosted scripts are switched off.
230
+ * Get a script
231
+ */
232
+ getScript(requestParameters, initOverrides) {
233
+ return __awaiter(this, void 0, void 0, function* () {
234
+ const response = yield this.getScriptRaw(requestParameters, initOverrides);
235
+ return yield response.value();
236
+ });
237
+ }
238
+ /**
239
+ * Creates request options for listAlertTemplates without sending the request
240
+ */
241
+ listAlertTemplatesRequestOpts(requestParameters) {
242
+ return __awaiter(this, void 0, void 0, function* () {
243
+ const queryParameters = {};
244
+ if (requestParameters['limit'] != null) {
245
+ queryParameters['limit'] = requestParameters['limit'];
246
+ }
247
+ if (requestParameters['cursor'] != null) {
248
+ queryParameters['cursor'] = requestParameters['cursor'];
249
+ }
250
+ const headerParameters = {};
251
+ if (this.configuration && this.configuration.accessToken) {
252
+ const token = this.configuration.accessToken;
253
+ const tokenString = yield token("bearerAuth", []);
254
+ if (tokenString) {
255
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
256
+ }
257
+ }
258
+ let urlPath = `/v1/alert-templates`;
259
+ return {
260
+ path: urlPath,
261
+ method: 'GET',
262
+ headers: headerParameters,
263
+ query: queryParameters,
264
+ };
265
+ });
266
+ }
267
+ /**
268
+ * The built-in templates of the `indicator` alert type: key, version, inputs with their defaults, snapshot fidelity and chartlang source. Answers 503 `unavailable` while hosted scripts are switched off.
269
+ * List indicator alert templates
270
+ */
271
+ listAlertTemplatesRaw(requestParameters, initOverrides) {
272
+ return __awaiter(this, void 0, void 0, function* () {
273
+ const requestOptions = yield this.listAlertTemplatesRequestOpts(requestParameters);
274
+ const response = yield this.request(requestOptions, initOverrides);
275
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListAlertTemplates200ResponseFromJSON(jsonValue));
276
+ });
277
+ }
278
+ /**
279
+ * The built-in templates of the `indicator` alert type: key, version, inputs with their defaults, snapshot fidelity and chartlang source. Answers 503 `unavailable` while hosted scripts are switched off.
280
+ * List indicator alert templates
281
+ */
282
+ listAlertTemplates() {
283
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
284
+ const response = yield this.listAlertTemplatesRaw(requestParameters, initOverrides);
285
+ return yield response.value();
286
+ });
287
+ }
288
+ /**
289
+ * Creates request options for listScriptVersions without sending the request
290
+ */
291
+ listScriptVersionsRequestOpts(requestParameters) {
292
+ return __awaiter(this, void 0, void 0, function* () {
293
+ if (requestParameters['id'] == null) {
294
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling listScriptVersions().');
295
+ }
296
+ const queryParameters = {};
297
+ if (requestParameters['limit'] != null) {
298
+ queryParameters['limit'] = requestParameters['limit'];
299
+ }
300
+ if (requestParameters['cursor'] != null) {
301
+ queryParameters['cursor'] = requestParameters['cursor'];
302
+ }
303
+ const headerParameters = {};
304
+ if (this.configuration && this.configuration.accessToken) {
305
+ const token = this.configuration.accessToken;
306
+ const tokenString = yield token("bearerAuth", []);
307
+ if (tokenString) {
308
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
309
+ }
310
+ }
311
+ let urlPath = `/v1/scripts/{id}/versions`;
312
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
313
+ return {
314
+ path: urlPath,
315
+ method: 'GET',
316
+ headers: headerParameters,
317
+ query: queryParameters,
318
+ };
319
+ });
320
+ }
321
+ /**
322
+ * The script\'s versions, oldest first. Answers 503 `unavailable` while hosted scripts are switched off.
323
+ * List script versions
324
+ */
325
+ listScriptVersionsRaw(requestParameters, initOverrides) {
326
+ return __awaiter(this, void 0, void 0, function* () {
327
+ const requestOptions = yield this.listScriptVersionsRequestOpts(requestParameters);
328
+ const response = yield this.request(requestOptions, initOverrides);
329
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListScriptVersions200ResponseFromJSON(jsonValue));
330
+ });
331
+ }
332
+ /**
333
+ * The script\'s versions, oldest first. Answers 503 `unavailable` while hosted scripts are switched off.
334
+ * List script versions
335
+ */
336
+ listScriptVersions(requestParameters, initOverrides) {
337
+ return __awaiter(this, void 0, void 0, function* () {
338
+ const response = yield this.listScriptVersionsRaw(requestParameters, initOverrides);
339
+ return yield response.value();
340
+ });
341
+ }
342
+ /**
343
+ * Creates request options for listScripts without sending the request
344
+ */
345
+ listScriptsRequestOpts(requestParameters) {
346
+ return __awaiter(this, void 0, void 0, function* () {
347
+ const queryParameters = {};
348
+ if (requestParameters['limit'] != null) {
349
+ queryParameters['limit'] = requestParameters['limit'];
350
+ }
351
+ if (requestParameters['cursor'] != null) {
352
+ queryParameters['cursor'] = requestParameters['cursor'];
353
+ }
354
+ const headerParameters = {};
355
+ if (this.configuration && this.configuration.accessToken) {
356
+ const token = this.configuration.accessToken;
357
+ const tokenString = yield token("bearerAuth", []);
358
+ if (tokenString) {
359
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
360
+ }
361
+ }
362
+ let urlPath = `/v1/scripts`;
363
+ return {
364
+ path: urlPath,
365
+ method: 'GET',
366
+ headers: headerParameters,
367
+ query: queryParameters,
368
+ };
369
+ });
370
+ }
371
+ /**
372
+ * The account\'s scripts, oldest first, each with its latest version. Answers 503 `unavailable` while hosted scripts are switched off.
373
+ * List scripts
374
+ */
375
+ listScriptsRaw(requestParameters, initOverrides) {
376
+ return __awaiter(this, void 0, void 0, function* () {
377
+ const requestOptions = yield this.listScriptsRequestOpts(requestParameters);
378
+ const response = yield this.request(requestOptions, initOverrides);
379
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListScripts200ResponseFromJSON(jsonValue));
380
+ });
381
+ }
382
+ /**
383
+ * The account\'s scripts, oldest first, each with its latest version. Answers 503 `unavailable` while hosted scripts are switched off.
384
+ * List scripts
385
+ */
386
+ listScripts() {
387
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
388
+ const response = yield this.listScriptsRaw(requestParameters, initOverrides);
389
+ return yield response.value();
390
+ });
391
+ }
392
+ }
@@ -17,4 +17,5 @@ export * from './InvestorDocumentsApi';
17
17
  export * from './MetricsApi';
18
18
  export * from './NewsApi';
19
19
  export * from './ReferenceApi';
20
+ export * from './ScriptsApi';
20
21
  export * from './TranscriptsApi';
@@ -19,4 +19,5 @@ export * from './InvestorDocumentsApi';
19
19
  export * from './MetricsApi';
20
20
  export * from './NewsApi';
21
21
  export * from './ReferenceApi';
22
+ export * from './ScriptsApi';
22
23
  export * from './TranscriptsApi';
@@ -35,6 +35,12 @@ export interface Alert {
35
35
  * @memberof Alert
36
36
  */
37
37
  status: AlertStatusEnum;
38
+ /**
39
+ * Why the platform disabled the alert (`script_error`: its script aborted on 3 bars in a row); null otherwise
40
+ * @type {string}
41
+ * @memberof Alert
42
+ */
43
+ disabled_reason: string | null;
38
44
  /**
39
45
  *
40
46
  * @type {AlertCondition}
@@ -56,6 +56,8 @@ export function instanceOfAlert(value) {
56
56
  return false;
57
57
  if (!('status' in value) || value['status'] === undefined)
58
58
  return false;
59
+ if (!('disabled_reason' in value) || value['disabled_reason'] === undefined)
60
+ return false;
59
61
  if (!('condition' in value) || value['condition'] === undefined)
60
62
  return false;
61
63
  if (!('trigger' in value) || value['trigger'] === undefined)
@@ -95,6 +97,7 @@ export function AlertFromJSONTyped(json, ignoreDiscriminator) {
95
97
  'id': json['id'],
96
98
  'type': json['type'],
97
99
  'status': json['status'],
100
+ 'disabled_reason': json['disabled_reason'],
98
101
  'condition': AlertConditionFromJSON(json['condition']),
99
102
  'trigger': AlertTriggerFromJSON(json['trigger']),
100
103
  'destination_ids': json['destination_ids'],
@@ -121,6 +124,7 @@ export function AlertToJSONTyped(value, ignoreDiscriminator = false) {
121
124
  'id': value['id'],
122
125
  'type': value['type'],
123
126
  'status': value['status'],
127
+ 'disabled_reason': value['disabled_reason'],
124
128
  'condition': AlertConditionToJSON(value['condition']),
125
129
  'trigger': AlertTriggerToJSON(value['trigger']),
126
130
  'destination_ids': value['destination_ids'],
@@ -9,13 +9,17 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { IndicatorFilters } from './IndicatorFilters';
12
13
  import type { AlertConditionAmountChange } from './AlertConditionAmountChange';
13
14
  import type { AlertConditionMentionDeltaRule } from './AlertConditionMentionDeltaRule';
15
+ import type { IndicatorTemplateRef } from './IndicatorTemplateRef';
14
16
  import type { AlertConditionRulesInner } from './AlertConditionRulesInner';
17
+ import type { IndicatorResolved } from './IndicatorResolved';
15
18
  import type { AlertConditionYieldRule } from './AlertConditionYieldRule';
16
19
  import type { AlertConditionYoyRulesInner } from './AlertConditionYoyRulesInner';
20
+ import type { IndicatorCondition } from './IndicatorCondition';
17
21
  /**
18
- * 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`) watch ONE instrument: `symbol` + `asset_class`. 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.
22
+ * 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.
19
23
  * @export
20
24
  * @interface AlertCondition
21
25
  */
@@ -39,7 +43,7 @@ export interface AlertCondition {
39
43
  */
40
44
  cik?: string;
41
45
  /**
42
- * The company (or, for the types that take ETFs, the US ETF) by ticker. Same types as `cik`; price types: the instrument (a US stock / ETF ticker, or a crypto slug / ticker)
46
+ * 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)
43
47
  * @type {string}
44
48
  * @memberof AlertCondition
45
49
  */
@@ -219,7 +223,7 @@ export interface AlertCondition {
219
223
  */
220
224
  notify_on_date_change?: boolean;
221
225
  /**
222
- * 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
226
+ * 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
223
227
  * @type {AlertConditionAssetClassEnum}
224
228
  * @memberof AlertCondition
225
229
  */
@@ -267,7 +271,7 @@ export interface AlertCondition {
267
271
  */
268
272
  mode?: AlertConditionModeEnum;
269
273
  /**
270
- * The bar evaluated at its close (relative / absolute). volume_spike
274
+ * 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)
271
275
  * @type {AlertConditionIntervalEnum}
272
276
  * @memberof AlertCondition
273
277
  */
@@ -303,7 +307,7 @@ export interface AlertCondition {
303
307
  */
304
308
  price_direction?: AlertConditionPriceDirectionEnum;
305
309
  /**
306
- * When the reminder fires: once at `at`, on the hour, daily or weekly at `time_of_day_minutes`. price_reminder
310
+ * 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
307
311
  * @type {AlertConditionFrequencyEnum}
308
312
  * @memberof AlertCondition
309
313
  */
@@ -326,6 +330,50 @@ export interface AlertCondition {
326
330
  * @memberof AlertCondition
327
331
  */
328
332
  days?: Array<number>;
333
+ /**
334
+ * The script version evaluated (`scv_…`, status ok, of a script of this account). script
335
+ * @type {string}
336
+ * @memberof AlertCondition
337
+ */
338
+ script_version_id?: string;
339
+ /**
340
+ * Values for the script's declared inputs (checked against its manifest; absent = the defaults). script
341
+ * @type {{ [key: string]: any; }}
342
+ * @memberof AlertCondition
343
+ */
344
+ inputs?: {
345
+ [key: string]: any;
346
+ };
347
+ /**
348
+ * Only these of the script's alerts (its version's `alert_ids`); empty = all. script
349
+ * @type {Array<string>}
350
+ * @memberof AlertCondition
351
+ */
352
+ alert_ids?: Array<string>;
353
+ /**
354
+ *
355
+ * @type {IndicatorTemplateRef}
356
+ * @memberof AlertCondition
357
+ */
358
+ template?: IndicatorTemplateRef;
359
+ /**
360
+ *
361
+ * @type {IndicatorCondition}
362
+ * @memberof AlertCondition
363
+ */
364
+ condition?: IndicatorCondition;
365
+ /**
366
+ *
367
+ * @type {IndicatorFilters}
368
+ * @memberof AlertCondition
369
+ */
370
+ filters?: IndicatorFilters;
371
+ /**
372
+ *
373
+ * @type {IndicatorResolved}
374
+ * @memberof AlertCondition
375
+ */
376
+ resolved?: IndicatorResolved;
329
377
  }
330
378
  /**
331
379
  * @export
@@ -493,7 +541,12 @@ export type AlertConditionModeEnum = typeof AlertConditionModeEnum[keyof typeof
493
541
  * @export
494
542
  */
495
543
  export declare const AlertConditionIntervalEnum: {
544
+ readonly _1m: "1m";
545
+ readonly _5m: "5m";
546
+ readonly _15m: "15m";
547
+ readonly _30m: "30m";
496
548
  readonly _1h: "1h";
549
+ readonly _4h: "4h";
497
550
  readonly _1d: "1d";
498
551
  readonly _1w: "1w";
499
552
  readonly _1mo: "1mo";
@@ -525,6 +578,9 @@ export declare const AlertConditionFrequencyEnum: {
525
578
  readonly Hourly: "hourly";
526
579
  readonly Daily: "daily";
527
580
  readonly Weekly: "weekly";
581
+ readonly OncePerBar: "once_per_bar";
582
+ readonly OncePerBarClose: "once_per_bar_close";
583
+ readonly EveryTime: "every_time";
528
584
  };
529
585
  export type AlertConditionFrequencyEnum = typeof AlertConditionFrequencyEnum[keyof typeof AlertConditionFrequencyEnum] | (string & {});
530
586
  /**
@@ -11,11 +11,15 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { IndicatorFiltersFromJSON, IndicatorFiltersToJSON, } from './IndicatorFilters';
14
15
  import { AlertConditionAmountChangeFromJSON, AlertConditionAmountChangeToJSON, } from './AlertConditionAmountChange';
15
16
  import { AlertConditionMentionDeltaRuleFromJSON, AlertConditionMentionDeltaRuleToJSON, } from './AlertConditionMentionDeltaRule';
17
+ import { IndicatorTemplateRefFromJSON, IndicatorTemplateRefToJSON, } from './IndicatorTemplateRef';
16
18
  import { AlertConditionRulesInnerFromJSON, AlertConditionRulesInnerToJSON, } from './AlertConditionRulesInner';
19
+ import { IndicatorResolvedFromJSON, IndicatorResolvedToJSON, } from './IndicatorResolved';
17
20
  import { AlertConditionYieldRuleFromJSON, AlertConditionYieldRuleToJSON, } from './AlertConditionYieldRule';
18
21
  import { AlertConditionYoyRulesInnerFromJSON, AlertConditionYoyRulesInnerToJSON, } from './AlertConditionYoyRulesInner';
22
+ import { IndicatorConditionFromJSON, IndicatorConditionToJSON, } from './IndicatorCondition';
19
23
  /**
20
24
  * @export
21
25
  */
@@ -167,7 +171,12 @@ export const AlertConditionModeEnum = {
167
171
  * @export
168
172
  */
169
173
  export const AlertConditionIntervalEnum = {
174
+ _1m: '1m',
175
+ _5m: '5m',
176
+ _15m: '15m',
177
+ _30m: '30m',
170
178
  _1h: '1h',
179
+ _4h: '4h',
171
180
  _1d: '1d',
172
181
  _1w: '1w',
173
182
  _1mo: '1mo'
@@ -195,7 +204,10 @@ export const AlertConditionFrequencyEnum = {
195
204
  Once: 'once',
196
205
  Hourly: 'hourly',
197
206
  Daily: 'daily',
198
- Weekly: 'weekly'
207
+ Weekly: 'weekly',
208
+ OncePerBar: 'once_per_bar',
209
+ OncePerBarClose: 'once_per_bar_close',
210
+ EveryTime: 'every_time'
199
211
  };
200
212
  /**
201
213
  * Check if a given object implements the AlertCondition interface.
@@ -262,6 +274,13 @@ export function AlertConditionFromJSONTyped(json, ignoreDiscriminator) {
262
274
  'at': json['at'] == null ? undefined : (new Date(json['at'])),
263
275
  'weekday': json['weekday'] == null ? undefined : json['weekday'],
264
276
  'days': json['days'] == null ? undefined : json['days'],
277
+ 'script_version_id': json['script_version_id'] == null ? undefined : json['script_version_id'],
278
+ 'inputs': json['inputs'] == null ? undefined : json['inputs'],
279
+ 'alert_ids': json['alert_ids'] == null ? undefined : json['alert_ids'],
280
+ 'template': json['template'] == null ? undefined : IndicatorTemplateRefFromJSON(json['template']),
281
+ 'condition': json['condition'] == null ? undefined : IndicatorConditionFromJSON(json['condition']),
282
+ 'filters': json['filters'] == null ? undefined : IndicatorFiltersFromJSON(json['filters']),
283
+ 'resolved': json['resolved'] == null ? undefined : IndicatorResolvedFromJSON(json['resolved']),
265
284
  };
266
285
  }
267
286
  export function AlertConditionToJSON(json) {
@@ -323,5 +342,12 @@ export function AlertConditionToJSONTyped(value, ignoreDiscriminator = false) {
323
342
  'at': value['at'] == null ? value['at'] : value['at'].toISOString(),
324
343
  'weekday': value['weekday'],
325
344
  'days': value['days'],
345
+ 'script_version_id': value['script_version_id'],
346
+ 'inputs': value['inputs'],
347
+ 'alert_ids': value['alert_ids'],
348
+ 'template': IndicatorTemplateRefToJSON(value['template']),
349
+ 'condition': IndicatorConditionToJSON(value['condition']),
350
+ 'filters': IndicatorFiltersToJSON(value['filters']),
351
+ 'resolved': IndicatorResolvedToJSON(value['resolved']),
326
352
  };
327
353
  }