@invinite-org/data-api-client 5.9.0 → 5.10.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 (61) hide show
  1. package/.openapi-generator/FILES +16 -0
  2. package/dist/apis/HoldingsApi.d.ts +57 -2
  3. package/dist/apis/HoldingsApi.js +142 -3
  4. package/dist/esm/apis/HoldingsApi.d.ts +57 -2
  5. package/dist/esm/apis/HoldingsApi.js +141 -2
  6. package/dist/esm/models/EtfHolding.d.ts +167 -0
  7. package/dist/esm/models/EtfHolding.js +97 -0
  8. package/dist/esm/models/EtfWeight.d.ts +92 -0
  9. package/dist/esm/models/EtfWeight.js +85 -0
  10. package/dist/esm/models/ListEtfHoldings200Response.d.ts +52 -0
  11. package/dist/esm/models/ListEtfHoldings200Response.js +57 -0
  12. package/dist/esm/models/ListEtfHoldings200ResponseMeta.d.ts +89 -0
  13. package/dist/esm/models/ListEtfHoldings200ResponseMeta.js +72 -0
  14. package/dist/esm/models/ListEtfHoldings200ResponseMetaComposition.d.ts +57 -0
  15. package/dist/esm/models/ListEtfHoldings200ResponseMetaComposition.js +50 -0
  16. package/dist/esm/models/ListEtfHoldings200ResponseMetaCompositionStoredDatesInner.d.ts +59 -0
  17. package/dist/esm/models/ListEtfHoldings200ResponseMetaCompositionStoredDatesInner.js +59 -0
  18. package/dist/esm/models/ListEtfWeights200Response.d.ts +52 -0
  19. package/dist/esm/models/ListEtfWeights200Response.js +57 -0
  20. package/dist/esm/models/ListEtfWeights200ResponseMeta.d.ts +93 -0
  21. package/dist/esm/models/ListEtfWeights200ResponseMeta.js +79 -0
  22. package/dist/esm/models/index.d.ts +8 -0
  23. package/dist/esm/models/index.js +8 -0
  24. package/dist/models/EtfHolding.d.ts +167 -0
  25. package/dist/models/EtfHolding.js +105 -0
  26. package/dist/models/EtfWeight.d.ts +92 -0
  27. package/dist/models/EtfWeight.js +93 -0
  28. package/dist/models/ListEtfHoldings200Response.d.ts +52 -0
  29. package/dist/models/ListEtfHoldings200Response.js +64 -0
  30. package/dist/models/ListEtfHoldings200ResponseMeta.d.ts +89 -0
  31. package/dist/models/ListEtfHoldings200ResponseMeta.js +80 -0
  32. package/dist/models/ListEtfHoldings200ResponseMetaComposition.d.ts +57 -0
  33. package/dist/models/ListEtfHoldings200ResponseMetaComposition.js +57 -0
  34. package/dist/models/ListEtfHoldings200ResponseMetaCompositionStoredDatesInner.d.ts +59 -0
  35. package/dist/models/ListEtfHoldings200ResponseMetaCompositionStoredDatesInner.js +67 -0
  36. package/dist/models/ListEtfWeights200Response.d.ts +52 -0
  37. package/dist/models/ListEtfWeights200Response.js +64 -0
  38. package/dist/models/ListEtfWeights200ResponseMeta.d.ts +93 -0
  39. package/dist/models/ListEtfWeights200ResponseMeta.js +87 -0
  40. package/dist/models/index.d.ts +8 -0
  41. package/dist/models/index.js +8 -0
  42. package/docs/EtfHolding.md +76 -0
  43. package/docs/EtfWeight.md +48 -0
  44. package/docs/HoldingsApi.md +196 -1
  45. package/docs/ListEtfHoldings200Response.md +41 -0
  46. package/docs/ListEtfHoldings200ResponseMeta.md +47 -0
  47. package/docs/ListEtfHoldings200ResponseMetaComposition.md +43 -0
  48. package/docs/ListEtfHoldings200ResponseMetaCompositionStoredDatesInner.md +41 -0
  49. package/docs/ListEtfWeights200Response.md +41 -0
  50. package/docs/ListEtfWeights200ResponseMeta.md +45 -0
  51. package/package.json +1 -1
  52. package/src/apis/HoldingsApi.ts +192 -2
  53. package/src/models/EtfHolding.ts +248 -0
  54. package/src/models/EtfWeight.ts +150 -0
  55. package/src/models/ListEtfHoldings200Response.ts +108 -0
  56. package/src/models/ListEtfHoldings200ResponseMeta.ts +151 -0
  57. package/src/models/ListEtfHoldings200ResponseMetaComposition.ts +105 -0
  58. package/src/models/ListEtfHoldings200ResponseMetaCompositionStoredDatesInner.ts +103 -0
  59. package/src/models/ListEtfWeights200Response.ts +108 -0
  60. package/src/models/ListEtfWeights200ResponseMeta.ts +148 -0
  61. package/src/models/index.ts +8 -0
@@ -39,6 +39,8 @@ docs/DocumentKindCatalogEntry.md
39
39
  docs/DocumentSection.md
40
40
  docs/DocumentVersion.md
41
41
  docs/DocumentsApi.md
42
+ docs/EtfHolding.md
43
+ docs/EtfWeight.md
42
44
  docs/Event.md
43
45
  docs/EventCalendar.md
44
46
  docs/EventCalendarCall.md
@@ -129,6 +131,12 @@ docs/ListDatasets200Response.md
129
131
  docs/ListDividends200Response.md
130
132
  docs/ListDocumentKindCatalog200Response.md
131
133
  docs/ListDocumentSections200Response.md
134
+ docs/ListEtfHoldings200Response.md
135
+ docs/ListEtfHoldings200ResponseMeta.md
136
+ docs/ListEtfHoldings200ResponseMetaComposition.md
137
+ docs/ListEtfHoldings200ResponseMetaCompositionStoredDatesInner.md
138
+ docs/ListEtfWeights200Response.md
139
+ docs/ListEtfWeights200ResponseMeta.md
132
140
  docs/ListEventTypeCatalog200Response.md
133
141
  docs/ListEvents200Response.md
134
142
  docs/ListFactPlaces200Response.md
@@ -329,6 +337,8 @@ src/models/DocumentFigure.ts
329
337
  src/models/DocumentKindCatalogEntry.ts
330
338
  src/models/DocumentSection.ts
331
339
  src/models/DocumentVersion.ts
340
+ src/models/EtfHolding.ts
341
+ src/models/EtfWeight.ts
332
342
  src/models/Event.ts
333
343
  src/models/EventCalendar.ts
334
344
  src/models/EventCalendarCall.ts
@@ -411,6 +421,12 @@ src/models/ListDatasets200Response.ts
411
421
  src/models/ListDividends200Response.ts
412
422
  src/models/ListDocumentKindCatalog200Response.ts
413
423
  src/models/ListDocumentSections200Response.ts
424
+ src/models/ListEtfHoldings200Response.ts
425
+ src/models/ListEtfHoldings200ResponseMeta.ts
426
+ src/models/ListEtfHoldings200ResponseMetaComposition.ts
427
+ src/models/ListEtfHoldings200ResponseMetaCompositionStoredDatesInner.ts
428
+ src/models/ListEtfWeights200Response.ts
429
+ src/models/ListEtfWeights200ResponseMeta.ts
414
430
  src/models/ListEventTypeCatalog200Response.ts
415
431
  src/models/ListEvents200Response.ts
416
432
  src/models/ListFactPlaces200Response.ts
@@ -10,9 +10,28 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
+ import { type ListEtfHoldings200Response } from '../models/ListEtfHoldings200Response';
14
+ import { type ListEtfWeights200Response } from '../models/ListEtfWeights200Response';
13
15
  import { type ListFundHoldings200Response } from '../models/ListFundHoldings200Response';
14
16
  import { type ListHoldingChanges200Response } from '../models/ListHoldingChanges200Response';
15
17
  import { type ListHoldings200Response } from '../models/ListHoldings200Response';
18
+ export interface ListEtfHoldingsRequest {
19
+ etf?: string;
20
+ company?: string;
21
+ asOf?: Date;
22
+ sort?: ListEtfHoldingsSortEnum;
23
+ fields?: string;
24
+ limit?: number;
25
+ cursor?: string;
26
+ }
27
+ export interface ListEtfWeightsRequest {
28
+ etf: string;
29
+ dimension?: string;
30
+ asOf?: Date;
31
+ fields?: string;
32
+ limit?: number;
33
+ cursor?: string;
34
+ }
16
35
  export interface ListFundHoldingsRequest {
17
36
  company?: string;
18
37
  filer?: string;
@@ -49,17 +68,45 @@ export interface ListHoldingsRequest {
49
68
  *
50
69
  */
51
70
  export declare class HoldingsApi extends runtime.BaseAPI {
71
+ /**
72
+ * Creates request options for listEtfHoldings without sending the request
73
+ */
74
+ listEtfHoldingsRequestOpts(requestParameters: ListEtfHoldingsRequest): Promise<runtime.RequestOpts>;
75
+ /**
76
+ * The holdings of US ETFs from the freshest source per ETF, always named: the issuer\'s own daily (or monthly) holdings file where the store reads one, else the fund\'s latest public N-PORT report (quarter end, about 60 days later). `etf=` lists one ETF\'s positions (`meta.source`, `meta.as_of`; `as_of=` reads a stored earlier date, `meta.composition.stored_dates` lists them), order `-weight_pct`; `company=` lists the ETFs whose newest issuer file holds the company (one row per ETF, its lines of the company summed; ETFs known only from N-PORT are listed by `/v1/fund-holdings?company=`), order `-market_value_usd`. Exactly one of `etf` or `company`. A single-asset trust (GLD) has no rows by design (`meta.reason: single_asset_trust`). `EtfHolding` is not `FundHolding` (R16): `/v1/fund-holdings` serves filed N-PORT rows per report (with `accession_number` and `report_date`); this collection is the current composition of a listed ETF by ticker and falls back to N-PORT only where no issuer file is read.
77
+ * List ETF holdings (daily issuer files or N-PORT)
78
+ */
79
+ listEtfHoldingsRaw(requestParameters: ListEtfHoldingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListEtfHoldings200Response>>;
80
+ /**
81
+ * The holdings of US ETFs from the freshest source per ETF, always named: the issuer\'s own daily (or monthly) holdings file where the store reads one, else the fund\'s latest public N-PORT report (quarter end, about 60 days later). `etf=` lists one ETF\'s positions (`meta.source`, `meta.as_of`; `as_of=` reads a stored earlier date, `meta.composition.stored_dates` lists them), order `-weight_pct`; `company=` lists the ETFs whose newest issuer file holds the company (one row per ETF, its lines of the company summed; ETFs known only from N-PORT are listed by `/v1/fund-holdings?company=`), order `-market_value_usd`. Exactly one of `etf` or `company`. A single-asset trust (GLD) has no rows by design (`meta.reason: single_asset_trust`). `EtfHolding` is not `FundHolding` (R16): `/v1/fund-holdings` serves filed N-PORT rows per report (with `accession_number` and `report_date`); this collection is the current composition of a listed ETF by ticker and falls back to N-PORT only where no issuer file is read.
82
+ * List ETF holdings (daily issuer files or N-PORT)
83
+ */
84
+ listEtfHoldings(requestParameters?: ListEtfHoldingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListEtfHoldings200Response>;
85
+ /**
86
+ * Creates request options for listEtfWeights without sending the request
87
+ */
88
+ listEtfWeightsRequestOpts(requestParameters: ListEtfWeightsRequest): Promise<runtime.RequestOpts>;
89
+ /**
90
+ * Sector, country and asset-class weights of one US ETF, from the same composition `/v1/etf-holdings?etf=` answers from (`meta.source`, `meta.as_of`): sector = the issuer\'s stated sector, else the SEC SIC sector of the holding\'s issuer; country = the stated location, else the N-PORT country / ISIN prefix / registrant country (each bucket names its `basis`, `mixed` when its positions differ); weights in percent of the fund. `dimension=` one or several of sector, country, asset_class (default all). An ETF without buckets for the chosen source answers `data: []` with `meta.reason: weights_unavailable`; a single-asset trust `meta.reason: single_asset_trust`. Positions themselves: `/v1/etf-holdings`; filed N-PORT rows: `/v1/fund-holdings`.
91
+ * List ETF sector, country and asset-class weights
92
+ */
93
+ listEtfWeightsRaw(requestParameters: ListEtfWeightsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListEtfWeights200Response>>;
94
+ /**
95
+ * Sector, country and asset-class weights of one US ETF, from the same composition `/v1/etf-holdings?etf=` answers from (`meta.source`, `meta.as_of`): sector = the issuer\'s stated sector, else the SEC SIC sector of the holding\'s issuer; country = the stated location, else the N-PORT country / ISIN prefix / registrant country (each bucket names its `basis`, `mixed` when its positions differ); weights in percent of the fund. `dimension=` one or several of sector, country, asset_class (default all). An ETF without buckets for the chosen source answers `data: []` with `meta.reason: weights_unavailable`; a single-asset trust `meta.reason: single_asset_trust`. Positions themselves: `/v1/etf-holdings`; filed N-PORT rows: `/v1/fund-holdings`.
96
+ * List ETF sector, country and asset-class weights
97
+ */
98
+ listEtfWeights(requestParameters: ListEtfWeightsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListEtfWeights200Response>;
52
99
  /**
53
100
  * Creates request options for listFundHoldings without sending the request
54
101
  */
55
102
  listFundHoldingsRequestOpts(requestParameters: ListFundHoldingsRequest): Promise<runtime.RequestOpts>;
56
103
  /**
57
- * N-PORT fund and ETF positions from the funds\' quarterly public reports (about 60 days after the report date): by issuer (`company=`, one row per fund holding it, from each fund\'s latest report on or before `period_end`, its positions in the issuer summed), by fund (`filer=` registrant CIK, `series=` when the registrant files for several funds: that fund\'s positions) or by filing (`accession=`, an NPORT-P filing\'s reported holdings as filed); exactly one of `company`, `filer` or `accession` (`series` alone needs `filer`). `period_end` defaults to today. Order: value in USD, descending (`company=`, `filer=`), the filing\'s line order (`accession=`); several companies are read one after another. A fund row is not a 13F `Holding` (different row type, R16): `/v1/holdings` keeps the 13F managers.
104
+ * N-PORT fund and ETF positions from the funds\' quarterly public reports (about 60 days after the report date): by issuer (`company=`, one row per fund holding it, from each fund\'s latest report on or before `period_end`, its positions in the issuer summed), by fund (`filer=` registrant CIK, `series=` when the registrant files for several funds: that fund\'s positions) or by filing (`accession=`, an NPORT-P filing\'s reported holdings as filed); exactly one of `company`, `filer` or `accession` (`series` alone needs `filer`). `period_end` defaults to today. Order: value in USD, descending (`company=`, `filer=`), the filing\'s line order (`accession=`); several companies are read one after another. A fund row is not a 13F `Holding` (different row type, R16): `/v1/holdings` keeps the 13F managers. ETFs\' current composition (daily issuer files, falling back to N-PORT): `/v1/etf-holdings`.
58
105
  * List N-PORT fund holdings
59
106
  */
60
107
  listFundHoldingsRaw(requestParameters: ListFundHoldingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListFundHoldings200Response>>;
61
108
  /**
62
- * N-PORT fund and ETF positions from the funds\' quarterly public reports (about 60 days after the report date): by issuer (`company=`, one row per fund holding it, from each fund\'s latest report on or before `period_end`, its positions in the issuer summed), by fund (`filer=` registrant CIK, `series=` when the registrant files for several funds: that fund\'s positions) or by filing (`accession=`, an NPORT-P filing\'s reported holdings as filed); exactly one of `company`, `filer` or `accession` (`series` alone needs `filer`). `period_end` defaults to today. Order: value in USD, descending (`company=`, `filer=`), the filing\'s line order (`accession=`); several companies are read one after another. A fund row is not a 13F `Holding` (different row type, R16): `/v1/holdings` keeps the 13F managers.
109
+ * N-PORT fund and ETF positions from the funds\' quarterly public reports (about 60 days after the report date): by issuer (`company=`, one row per fund holding it, from each fund\'s latest report on or before `period_end`, its positions in the issuer summed), by fund (`filer=` registrant CIK, `series=` when the registrant files for several funds: that fund\'s positions) or by filing (`accession=`, an NPORT-P filing\'s reported holdings as filed); exactly one of `company`, `filer` or `accession` (`series` alone needs `filer`). `period_end` defaults to today. Order: value in USD, descending (`company=`, `filer=`), the filing\'s line order (`accession=`); several companies are read one after another. A fund row is not a 13F `Holding` (different row type, R16): `/v1/holdings` keeps the 13F managers. ETFs\' current composition (daily issuer files, falling back to N-PORT): `/v1/etf-holdings`.
63
110
  * List N-PORT fund holdings
64
111
  */
65
112
  listFundHoldings(requestParameters?: ListFundHoldingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListFundHoldings200Response>;
@@ -92,6 +139,14 @@ export declare class HoldingsApi extends runtime.BaseAPI {
92
139
  */
93
140
  listHoldings(requestParameters?: ListHoldingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListHoldings200Response>;
94
141
  }
142
+ /**
143
+ * @export
144
+ */
145
+ export declare const ListEtfHoldingsSortEnum: {
146
+ readonly WeightPct: "-weight_pct";
147
+ readonly MarketValueUsd: "-market_value_usd";
148
+ };
149
+ export type ListEtfHoldingsSortEnum = typeof ListEtfHoldingsSortEnum[keyof typeof ListEtfHoldingsSortEnum];
95
150
  /**
96
151
  * @export
97
152
  */
@@ -22,8 +22,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.ListHoldingsSortEnum = exports.ListHoldingsInstrumentsEnum = exports.ListFundHoldingsSortEnum = exports.HoldingsApi = void 0;
25
+ exports.ListHoldingsSortEnum = exports.ListHoldingsInstrumentsEnum = exports.ListFundHoldingsSortEnum = exports.ListEtfHoldingsSortEnum = exports.HoldingsApi = void 0;
26
26
  const runtime = require("../runtime");
27
+ const ListEtfHoldings200Response_1 = require("../models/ListEtfHoldings200Response");
28
+ const ListEtfWeights200Response_1 = require("../models/ListEtfWeights200Response");
27
29
  const ListFundHoldings200Response_1 = require("../models/ListFundHoldings200Response");
28
30
  const ListHoldingChanges200Response_1 = require("../models/ListHoldingChanges200Response");
29
31
  const ListHoldings200Response_1 = require("../models/ListHoldings200Response");
@@ -31,6 +33,136 @@ const ListHoldings200Response_1 = require("../models/ListHoldings200Response");
31
33
  *
32
34
  */
33
35
  class HoldingsApi extends runtime.BaseAPI {
36
+ /**
37
+ * Creates request options for listEtfHoldings without sending the request
38
+ */
39
+ listEtfHoldingsRequestOpts(requestParameters) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ const queryParameters = {};
42
+ if (requestParameters['etf'] != null) {
43
+ queryParameters['etf'] = requestParameters['etf'];
44
+ }
45
+ if (requestParameters['company'] != null) {
46
+ queryParameters['company'] = requestParameters['company'];
47
+ }
48
+ if (requestParameters['asOf'] != null) {
49
+ queryParameters['as_of'] = requestParameters['asOf'].toISOString().substring(0, 10);
50
+ }
51
+ if (requestParameters['sort'] != null) {
52
+ queryParameters['sort'] = requestParameters['sort'];
53
+ }
54
+ if (requestParameters['fields'] != null) {
55
+ queryParameters['fields'] = requestParameters['fields'];
56
+ }
57
+ if (requestParameters['limit'] != null) {
58
+ queryParameters['limit'] = requestParameters['limit'];
59
+ }
60
+ if (requestParameters['cursor'] != null) {
61
+ queryParameters['cursor'] = requestParameters['cursor'];
62
+ }
63
+ const headerParameters = {};
64
+ if (this.configuration && this.configuration.accessToken) {
65
+ const token = this.configuration.accessToken;
66
+ const tokenString = yield token("bearerAuth", []);
67
+ if (tokenString) {
68
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
69
+ }
70
+ }
71
+ let urlPath = `/v1/etf-holdings`;
72
+ return {
73
+ path: urlPath,
74
+ method: 'GET',
75
+ headers: headerParameters,
76
+ query: queryParameters,
77
+ };
78
+ });
79
+ }
80
+ /**
81
+ * The holdings of US ETFs from the freshest source per ETF, always named: the issuer\'s own daily (or monthly) holdings file where the store reads one, else the fund\'s latest public N-PORT report (quarter end, about 60 days later). `etf=` lists one ETF\'s positions (`meta.source`, `meta.as_of`; `as_of=` reads a stored earlier date, `meta.composition.stored_dates` lists them), order `-weight_pct`; `company=` lists the ETFs whose newest issuer file holds the company (one row per ETF, its lines of the company summed; ETFs known only from N-PORT are listed by `/v1/fund-holdings?company=`), order `-market_value_usd`. Exactly one of `etf` or `company`. A single-asset trust (GLD) has no rows by design (`meta.reason: single_asset_trust`). `EtfHolding` is not `FundHolding` (R16): `/v1/fund-holdings` serves filed N-PORT rows per report (with `accession_number` and `report_date`); this collection is the current composition of a listed ETF by ticker and falls back to N-PORT only where no issuer file is read.
82
+ * List ETF holdings (daily issuer files or N-PORT)
83
+ */
84
+ listEtfHoldingsRaw(requestParameters, initOverrides) {
85
+ return __awaiter(this, void 0, void 0, function* () {
86
+ const requestOptions = yield this.listEtfHoldingsRequestOpts(requestParameters);
87
+ const response = yield this.request(requestOptions, initOverrides);
88
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ListEtfHoldings200Response_1.ListEtfHoldings200ResponseFromJSON)(jsonValue));
89
+ });
90
+ }
91
+ /**
92
+ * The holdings of US ETFs from the freshest source per ETF, always named: the issuer\'s own daily (or monthly) holdings file where the store reads one, else the fund\'s latest public N-PORT report (quarter end, about 60 days later). `etf=` lists one ETF\'s positions (`meta.source`, `meta.as_of`; `as_of=` reads a stored earlier date, `meta.composition.stored_dates` lists them), order `-weight_pct`; `company=` lists the ETFs whose newest issuer file holds the company (one row per ETF, its lines of the company summed; ETFs known only from N-PORT are listed by `/v1/fund-holdings?company=`), order `-market_value_usd`. Exactly one of `etf` or `company`. A single-asset trust (GLD) has no rows by design (`meta.reason: single_asset_trust`). `EtfHolding` is not `FundHolding` (R16): `/v1/fund-holdings` serves filed N-PORT rows per report (with `accession_number` and `report_date`); this collection is the current composition of a listed ETF by ticker and falls back to N-PORT only where no issuer file is read.
93
+ * List ETF holdings (daily issuer files or N-PORT)
94
+ */
95
+ listEtfHoldings() {
96
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
97
+ const response = yield this.listEtfHoldingsRaw(requestParameters, initOverrides);
98
+ return yield response.value();
99
+ });
100
+ }
101
+ /**
102
+ * Creates request options for listEtfWeights without sending the request
103
+ */
104
+ listEtfWeightsRequestOpts(requestParameters) {
105
+ return __awaiter(this, void 0, void 0, function* () {
106
+ if (requestParameters['etf'] == null) {
107
+ throw new runtime.RequiredError('etf', 'Required parameter "etf" was null or undefined when calling listEtfWeights().');
108
+ }
109
+ const queryParameters = {};
110
+ if (requestParameters['etf'] != null) {
111
+ queryParameters['etf'] = requestParameters['etf'];
112
+ }
113
+ if (requestParameters['dimension'] != null) {
114
+ queryParameters['dimension'] = requestParameters['dimension'];
115
+ }
116
+ if (requestParameters['asOf'] != null) {
117
+ queryParameters['as_of'] = requestParameters['asOf'].toISOString().substring(0, 10);
118
+ }
119
+ if (requestParameters['fields'] != null) {
120
+ queryParameters['fields'] = requestParameters['fields'];
121
+ }
122
+ if (requestParameters['limit'] != null) {
123
+ queryParameters['limit'] = requestParameters['limit'];
124
+ }
125
+ if (requestParameters['cursor'] != null) {
126
+ queryParameters['cursor'] = requestParameters['cursor'];
127
+ }
128
+ const headerParameters = {};
129
+ if (this.configuration && this.configuration.accessToken) {
130
+ const token = this.configuration.accessToken;
131
+ const tokenString = yield token("bearerAuth", []);
132
+ if (tokenString) {
133
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
134
+ }
135
+ }
136
+ let urlPath = `/v1/etf-weights`;
137
+ return {
138
+ path: urlPath,
139
+ method: 'GET',
140
+ headers: headerParameters,
141
+ query: queryParameters,
142
+ };
143
+ });
144
+ }
145
+ /**
146
+ * Sector, country and asset-class weights of one US ETF, from the same composition `/v1/etf-holdings?etf=` answers from (`meta.source`, `meta.as_of`): sector = the issuer\'s stated sector, else the SEC SIC sector of the holding\'s issuer; country = the stated location, else the N-PORT country / ISIN prefix / registrant country (each bucket names its `basis`, `mixed` when its positions differ); weights in percent of the fund. `dimension=` one or several of sector, country, asset_class (default all). An ETF without buckets for the chosen source answers `data: []` with `meta.reason: weights_unavailable`; a single-asset trust `meta.reason: single_asset_trust`. Positions themselves: `/v1/etf-holdings`; filed N-PORT rows: `/v1/fund-holdings`.
147
+ * List ETF sector, country and asset-class weights
148
+ */
149
+ listEtfWeightsRaw(requestParameters, initOverrides) {
150
+ return __awaiter(this, void 0, void 0, function* () {
151
+ const requestOptions = yield this.listEtfWeightsRequestOpts(requestParameters);
152
+ const response = yield this.request(requestOptions, initOverrides);
153
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ListEtfWeights200Response_1.ListEtfWeights200ResponseFromJSON)(jsonValue));
154
+ });
155
+ }
156
+ /**
157
+ * Sector, country and asset-class weights of one US ETF, from the same composition `/v1/etf-holdings?etf=` answers from (`meta.source`, `meta.as_of`): sector = the issuer\'s stated sector, else the SEC SIC sector of the holding\'s issuer; country = the stated location, else the N-PORT country / ISIN prefix / registrant country (each bucket names its `basis`, `mixed` when its positions differ); weights in percent of the fund. `dimension=` one or several of sector, country, asset_class (default all). An ETF without buckets for the chosen source answers `data: []` with `meta.reason: weights_unavailable`; a single-asset trust `meta.reason: single_asset_trust`. Positions themselves: `/v1/etf-holdings`; filed N-PORT rows: `/v1/fund-holdings`.
158
+ * List ETF sector, country and asset-class weights
159
+ */
160
+ listEtfWeights(requestParameters, initOverrides) {
161
+ return __awaiter(this, void 0, void 0, function* () {
162
+ const response = yield this.listEtfWeightsRaw(requestParameters, initOverrides);
163
+ return yield response.value();
164
+ });
165
+ }
34
166
  /**
35
167
  * Creates request options for listFundHoldings without sending the request
36
168
  */
@@ -82,7 +214,7 @@ class HoldingsApi extends runtime.BaseAPI {
82
214
  });
83
215
  }
84
216
  /**
85
- * N-PORT fund and ETF positions from the funds\' quarterly public reports (about 60 days after the report date): by issuer (`company=`, one row per fund holding it, from each fund\'s latest report on or before `period_end`, its positions in the issuer summed), by fund (`filer=` registrant CIK, `series=` when the registrant files for several funds: that fund\'s positions) or by filing (`accession=`, an NPORT-P filing\'s reported holdings as filed); exactly one of `company`, `filer` or `accession` (`series` alone needs `filer`). `period_end` defaults to today. Order: value in USD, descending (`company=`, `filer=`), the filing\'s line order (`accession=`); several companies are read one after another. A fund row is not a 13F `Holding` (different row type, R16): `/v1/holdings` keeps the 13F managers.
217
+ * N-PORT fund and ETF positions from the funds\' quarterly public reports (about 60 days after the report date): by issuer (`company=`, one row per fund holding it, from each fund\'s latest report on or before `period_end`, its positions in the issuer summed), by fund (`filer=` registrant CIK, `series=` when the registrant files for several funds: that fund\'s positions) or by filing (`accession=`, an NPORT-P filing\'s reported holdings as filed); exactly one of `company`, `filer` or `accession` (`series` alone needs `filer`). `period_end` defaults to today. Order: value in USD, descending (`company=`, `filer=`), the filing\'s line order (`accession=`); several companies are read one after another. A fund row is not a 13F `Holding` (different row type, R16): `/v1/holdings` keeps the 13F managers. ETFs\' current composition (daily issuer files, falling back to N-PORT): `/v1/etf-holdings`.
86
218
  * List N-PORT fund holdings
87
219
  */
88
220
  listFundHoldingsRaw(requestParameters, initOverrides) {
@@ -93,7 +225,7 @@ class HoldingsApi extends runtime.BaseAPI {
93
225
  });
94
226
  }
95
227
  /**
96
- * N-PORT fund and ETF positions from the funds\' quarterly public reports (about 60 days after the report date): by issuer (`company=`, one row per fund holding it, from each fund\'s latest report on or before `period_end`, its positions in the issuer summed), by fund (`filer=` registrant CIK, `series=` when the registrant files for several funds: that fund\'s positions) or by filing (`accession=`, an NPORT-P filing\'s reported holdings as filed); exactly one of `company`, `filer` or `accession` (`series` alone needs `filer`). `period_end` defaults to today. Order: value in USD, descending (`company=`, `filer=`), the filing\'s line order (`accession=`); several companies are read one after another. A fund row is not a 13F `Holding` (different row type, R16): `/v1/holdings` keeps the 13F managers.
228
+ * N-PORT fund and ETF positions from the funds\' quarterly public reports (about 60 days after the report date): by issuer (`company=`, one row per fund holding it, from each fund\'s latest report on or before `period_end`, its positions in the issuer summed), by fund (`filer=` registrant CIK, `series=` when the registrant files for several funds: that fund\'s positions) or by filing (`accession=`, an NPORT-P filing\'s reported holdings as filed); exactly one of `company`, `filer` or `accession` (`series` alone needs `filer`). `period_end` defaults to today. Order: value in USD, descending (`company=`, `filer=`), the filing\'s line order (`accession=`); several companies are read one after another. A fund row is not a 13F `Holding` (different row type, R16): `/v1/holdings` keeps the 13F managers. ETFs\' current composition (daily issuer files, falling back to N-PORT): `/v1/etf-holdings`.
97
229
  * List N-PORT fund holdings
98
230
  */
99
231
  listFundHoldings() {
@@ -243,6 +375,13 @@ class HoldingsApi extends runtime.BaseAPI {
243
375
  }
244
376
  }
245
377
  exports.HoldingsApi = HoldingsApi;
378
+ /**
379
+ * @export
380
+ */
381
+ exports.ListEtfHoldingsSortEnum = {
382
+ WeightPct: '-weight_pct',
383
+ MarketValueUsd: '-market_value_usd'
384
+ };
246
385
  /**
247
386
  * @export
248
387
  */
@@ -10,9 +10,28 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
+ import { type ListEtfHoldings200Response } from '../models/ListEtfHoldings200Response';
14
+ import { type ListEtfWeights200Response } from '../models/ListEtfWeights200Response';
13
15
  import { type ListFundHoldings200Response } from '../models/ListFundHoldings200Response';
14
16
  import { type ListHoldingChanges200Response } from '../models/ListHoldingChanges200Response';
15
17
  import { type ListHoldings200Response } from '../models/ListHoldings200Response';
18
+ export interface ListEtfHoldingsRequest {
19
+ etf?: string;
20
+ company?: string;
21
+ asOf?: Date;
22
+ sort?: ListEtfHoldingsSortEnum;
23
+ fields?: string;
24
+ limit?: number;
25
+ cursor?: string;
26
+ }
27
+ export interface ListEtfWeightsRequest {
28
+ etf: string;
29
+ dimension?: string;
30
+ asOf?: Date;
31
+ fields?: string;
32
+ limit?: number;
33
+ cursor?: string;
34
+ }
16
35
  export interface ListFundHoldingsRequest {
17
36
  company?: string;
18
37
  filer?: string;
@@ -49,17 +68,45 @@ export interface ListHoldingsRequest {
49
68
  *
50
69
  */
51
70
  export declare class HoldingsApi extends runtime.BaseAPI {
71
+ /**
72
+ * Creates request options for listEtfHoldings without sending the request
73
+ */
74
+ listEtfHoldingsRequestOpts(requestParameters: ListEtfHoldingsRequest): Promise<runtime.RequestOpts>;
75
+ /**
76
+ * The holdings of US ETFs from the freshest source per ETF, always named: the issuer\'s own daily (or monthly) holdings file where the store reads one, else the fund\'s latest public N-PORT report (quarter end, about 60 days later). `etf=` lists one ETF\'s positions (`meta.source`, `meta.as_of`; `as_of=` reads a stored earlier date, `meta.composition.stored_dates` lists them), order `-weight_pct`; `company=` lists the ETFs whose newest issuer file holds the company (one row per ETF, its lines of the company summed; ETFs known only from N-PORT are listed by `/v1/fund-holdings?company=`), order `-market_value_usd`. Exactly one of `etf` or `company`. A single-asset trust (GLD) has no rows by design (`meta.reason: single_asset_trust`). `EtfHolding` is not `FundHolding` (R16): `/v1/fund-holdings` serves filed N-PORT rows per report (with `accession_number` and `report_date`); this collection is the current composition of a listed ETF by ticker and falls back to N-PORT only where no issuer file is read.
77
+ * List ETF holdings (daily issuer files or N-PORT)
78
+ */
79
+ listEtfHoldingsRaw(requestParameters: ListEtfHoldingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListEtfHoldings200Response>>;
80
+ /**
81
+ * The holdings of US ETFs from the freshest source per ETF, always named: the issuer\'s own daily (or monthly) holdings file where the store reads one, else the fund\'s latest public N-PORT report (quarter end, about 60 days later). `etf=` lists one ETF\'s positions (`meta.source`, `meta.as_of`; `as_of=` reads a stored earlier date, `meta.composition.stored_dates` lists them), order `-weight_pct`; `company=` lists the ETFs whose newest issuer file holds the company (one row per ETF, its lines of the company summed; ETFs known only from N-PORT are listed by `/v1/fund-holdings?company=`), order `-market_value_usd`. Exactly one of `etf` or `company`. A single-asset trust (GLD) has no rows by design (`meta.reason: single_asset_trust`). `EtfHolding` is not `FundHolding` (R16): `/v1/fund-holdings` serves filed N-PORT rows per report (with `accession_number` and `report_date`); this collection is the current composition of a listed ETF by ticker and falls back to N-PORT only where no issuer file is read.
82
+ * List ETF holdings (daily issuer files or N-PORT)
83
+ */
84
+ listEtfHoldings(requestParameters?: ListEtfHoldingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListEtfHoldings200Response>;
85
+ /**
86
+ * Creates request options for listEtfWeights without sending the request
87
+ */
88
+ listEtfWeightsRequestOpts(requestParameters: ListEtfWeightsRequest): Promise<runtime.RequestOpts>;
89
+ /**
90
+ * Sector, country and asset-class weights of one US ETF, from the same composition `/v1/etf-holdings?etf=` answers from (`meta.source`, `meta.as_of`): sector = the issuer\'s stated sector, else the SEC SIC sector of the holding\'s issuer; country = the stated location, else the N-PORT country / ISIN prefix / registrant country (each bucket names its `basis`, `mixed` when its positions differ); weights in percent of the fund. `dimension=` one or several of sector, country, asset_class (default all). An ETF without buckets for the chosen source answers `data: []` with `meta.reason: weights_unavailable`; a single-asset trust `meta.reason: single_asset_trust`. Positions themselves: `/v1/etf-holdings`; filed N-PORT rows: `/v1/fund-holdings`.
91
+ * List ETF sector, country and asset-class weights
92
+ */
93
+ listEtfWeightsRaw(requestParameters: ListEtfWeightsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListEtfWeights200Response>>;
94
+ /**
95
+ * Sector, country and asset-class weights of one US ETF, from the same composition `/v1/etf-holdings?etf=` answers from (`meta.source`, `meta.as_of`): sector = the issuer\'s stated sector, else the SEC SIC sector of the holding\'s issuer; country = the stated location, else the N-PORT country / ISIN prefix / registrant country (each bucket names its `basis`, `mixed` when its positions differ); weights in percent of the fund. `dimension=` one or several of sector, country, asset_class (default all). An ETF without buckets for the chosen source answers `data: []` with `meta.reason: weights_unavailable`; a single-asset trust `meta.reason: single_asset_trust`. Positions themselves: `/v1/etf-holdings`; filed N-PORT rows: `/v1/fund-holdings`.
96
+ * List ETF sector, country and asset-class weights
97
+ */
98
+ listEtfWeights(requestParameters: ListEtfWeightsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListEtfWeights200Response>;
52
99
  /**
53
100
  * Creates request options for listFundHoldings without sending the request
54
101
  */
55
102
  listFundHoldingsRequestOpts(requestParameters: ListFundHoldingsRequest): Promise<runtime.RequestOpts>;
56
103
  /**
57
- * N-PORT fund and ETF positions from the funds\' quarterly public reports (about 60 days after the report date): by issuer (`company=`, one row per fund holding it, from each fund\'s latest report on or before `period_end`, its positions in the issuer summed), by fund (`filer=` registrant CIK, `series=` when the registrant files for several funds: that fund\'s positions) or by filing (`accession=`, an NPORT-P filing\'s reported holdings as filed); exactly one of `company`, `filer` or `accession` (`series` alone needs `filer`). `period_end` defaults to today. Order: value in USD, descending (`company=`, `filer=`), the filing\'s line order (`accession=`); several companies are read one after another. A fund row is not a 13F `Holding` (different row type, R16): `/v1/holdings` keeps the 13F managers.
104
+ * N-PORT fund and ETF positions from the funds\' quarterly public reports (about 60 days after the report date): by issuer (`company=`, one row per fund holding it, from each fund\'s latest report on or before `period_end`, its positions in the issuer summed), by fund (`filer=` registrant CIK, `series=` when the registrant files for several funds: that fund\'s positions) or by filing (`accession=`, an NPORT-P filing\'s reported holdings as filed); exactly one of `company`, `filer` or `accession` (`series` alone needs `filer`). `period_end` defaults to today. Order: value in USD, descending (`company=`, `filer=`), the filing\'s line order (`accession=`); several companies are read one after another. A fund row is not a 13F `Holding` (different row type, R16): `/v1/holdings` keeps the 13F managers. ETFs\' current composition (daily issuer files, falling back to N-PORT): `/v1/etf-holdings`.
58
105
  * List N-PORT fund holdings
59
106
  */
60
107
  listFundHoldingsRaw(requestParameters: ListFundHoldingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListFundHoldings200Response>>;
61
108
  /**
62
- * N-PORT fund and ETF positions from the funds\' quarterly public reports (about 60 days after the report date): by issuer (`company=`, one row per fund holding it, from each fund\'s latest report on or before `period_end`, its positions in the issuer summed), by fund (`filer=` registrant CIK, `series=` when the registrant files for several funds: that fund\'s positions) or by filing (`accession=`, an NPORT-P filing\'s reported holdings as filed); exactly one of `company`, `filer` or `accession` (`series` alone needs `filer`). `period_end` defaults to today. Order: value in USD, descending (`company=`, `filer=`), the filing\'s line order (`accession=`); several companies are read one after another. A fund row is not a 13F `Holding` (different row type, R16): `/v1/holdings` keeps the 13F managers.
109
+ * N-PORT fund and ETF positions from the funds\' quarterly public reports (about 60 days after the report date): by issuer (`company=`, one row per fund holding it, from each fund\'s latest report on or before `period_end`, its positions in the issuer summed), by fund (`filer=` registrant CIK, `series=` when the registrant files for several funds: that fund\'s positions) or by filing (`accession=`, an NPORT-P filing\'s reported holdings as filed); exactly one of `company`, `filer` or `accession` (`series` alone needs `filer`). `period_end` defaults to today. Order: value in USD, descending (`company=`, `filer=`), the filing\'s line order (`accession=`); several companies are read one after another. A fund row is not a 13F `Holding` (different row type, R16): `/v1/holdings` keeps the 13F managers. ETFs\' current composition (daily issuer files, falling back to N-PORT): `/v1/etf-holdings`.
63
110
  * List N-PORT fund holdings
64
111
  */
65
112
  listFundHoldings(requestParameters?: ListFundHoldingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListFundHoldings200Response>;
@@ -92,6 +139,14 @@ export declare class HoldingsApi extends runtime.BaseAPI {
92
139
  */
93
140
  listHoldings(requestParameters?: ListHoldingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListHoldings200Response>;
94
141
  }
142
+ /**
143
+ * @export
144
+ */
145
+ export declare const ListEtfHoldingsSortEnum: {
146
+ readonly WeightPct: "-weight_pct";
147
+ readonly MarketValueUsd: "-market_value_usd";
148
+ };
149
+ export type ListEtfHoldingsSortEnum = typeof ListEtfHoldingsSortEnum[keyof typeof ListEtfHoldingsSortEnum];
95
150
  /**
96
151
  * @export
97
152
  */
@@ -21,6 +21,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
+ import { ListEtfHoldings200ResponseFromJSON, } from '../models/ListEtfHoldings200Response';
25
+ import { ListEtfWeights200ResponseFromJSON, } from '../models/ListEtfWeights200Response';
24
26
  import { ListFundHoldings200ResponseFromJSON, } from '../models/ListFundHoldings200Response';
25
27
  import { ListHoldingChanges200ResponseFromJSON, } from '../models/ListHoldingChanges200Response';
26
28
  import { ListHoldings200ResponseFromJSON, } from '../models/ListHoldings200Response';
@@ -28,6 +30,136 @@ import { ListHoldings200ResponseFromJSON, } from '../models/ListHoldings200Respo
28
30
  *
29
31
  */
30
32
  export class HoldingsApi extends runtime.BaseAPI {
33
+ /**
34
+ * Creates request options for listEtfHoldings without sending the request
35
+ */
36
+ listEtfHoldingsRequestOpts(requestParameters) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ const queryParameters = {};
39
+ if (requestParameters['etf'] != null) {
40
+ queryParameters['etf'] = requestParameters['etf'];
41
+ }
42
+ if (requestParameters['company'] != null) {
43
+ queryParameters['company'] = requestParameters['company'];
44
+ }
45
+ if (requestParameters['asOf'] != null) {
46
+ queryParameters['as_of'] = requestParameters['asOf'].toISOString().substring(0, 10);
47
+ }
48
+ if (requestParameters['sort'] != null) {
49
+ queryParameters['sort'] = requestParameters['sort'];
50
+ }
51
+ if (requestParameters['fields'] != null) {
52
+ queryParameters['fields'] = requestParameters['fields'];
53
+ }
54
+ if (requestParameters['limit'] != null) {
55
+ queryParameters['limit'] = requestParameters['limit'];
56
+ }
57
+ if (requestParameters['cursor'] != null) {
58
+ queryParameters['cursor'] = requestParameters['cursor'];
59
+ }
60
+ const headerParameters = {};
61
+ if (this.configuration && this.configuration.accessToken) {
62
+ const token = this.configuration.accessToken;
63
+ const tokenString = yield token("bearerAuth", []);
64
+ if (tokenString) {
65
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
66
+ }
67
+ }
68
+ let urlPath = `/v1/etf-holdings`;
69
+ return {
70
+ path: urlPath,
71
+ method: 'GET',
72
+ headers: headerParameters,
73
+ query: queryParameters,
74
+ };
75
+ });
76
+ }
77
+ /**
78
+ * The holdings of US ETFs from the freshest source per ETF, always named: the issuer\'s own daily (or monthly) holdings file where the store reads one, else the fund\'s latest public N-PORT report (quarter end, about 60 days later). `etf=` lists one ETF\'s positions (`meta.source`, `meta.as_of`; `as_of=` reads a stored earlier date, `meta.composition.stored_dates` lists them), order `-weight_pct`; `company=` lists the ETFs whose newest issuer file holds the company (one row per ETF, its lines of the company summed; ETFs known only from N-PORT are listed by `/v1/fund-holdings?company=`), order `-market_value_usd`. Exactly one of `etf` or `company`. A single-asset trust (GLD) has no rows by design (`meta.reason: single_asset_trust`). `EtfHolding` is not `FundHolding` (R16): `/v1/fund-holdings` serves filed N-PORT rows per report (with `accession_number` and `report_date`); this collection is the current composition of a listed ETF by ticker and falls back to N-PORT only where no issuer file is read.
79
+ * List ETF holdings (daily issuer files or N-PORT)
80
+ */
81
+ listEtfHoldingsRaw(requestParameters, initOverrides) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ const requestOptions = yield this.listEtfHoldingsRequestOpts(requestParameters);
84
+ const response = yield this.request(requestOptions, initOverrides);
85
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListEtfHoldings200ResponseFromJSON(jsonValue));
86
+ });
87
+ }
88
+ /**
89
+ * The holdings of US ETFs from the freshest source per ETF, always named: the issuer\'s own daily (or monthly) holdings file where the store reads one, else the fund\'s latest public N-PORT report (quarter end, about 60 days later). `etf=` lists one ETF\'s positions (`meta.source`, `meta.as_of`; `as_of=` reads a stored earlier date, `meta.composition.stored_dates` lists them), order `-weight_pct`; `company=` lists the ETFs whose newest issuer file holds the company (one row per ETF, its lines of the company summed; ETFs known only from N-PORT are listed by `/v1/fund-holdings?company=`), order `-market_value_usd`. Exactly one of `etf` or `company`. A single-asset trust (GLD) has no rows by design (`meta.reason: single_asset_trust`). `EtfHolding` is not `FundHolding` (R16): `/v1/fund-holdings` serves filed N-PORT rows per report (with `accession_number` and `report_date`); this collection is the current composition of a listed ETF by ticker and falls back to N-PORT only where no issuer file is read.
90
+ * List ETF holdings (daily issuer files or N-PORT)
91
+ */
92
+ listEtfHoldings() {
93
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
94
+ const response = yield this.listEtfHoldingsRaw(requestParameters, initOverrides);
95
+ return yield response.value();
96
+ });
97
+ }
98
+ /**
99
+ * Creates request options for listEtfWeights without sending the request
100
+ */
101
+ listEtfWeightsRequestOpts(requestParameters) {
102
+ return __awaiter(this, void 0, void 0, function* () {
103
+ if (requestParameters['etf'] == null) {
104
+ throw new runtime.RequiredError('etf', 'Required parameter "etf" was null or undefined when calling listEtfWeights().');
105
+ }
106
+ const queryParameters = {};
107
+ if (requestParameters['etf'] != null) {
108
+ queryParameters['etf'] = requestParameters['etf'];
109
+ }
110
+ if (requestParameters['dimension'] != null) {
111
+ queryParameters['dimension'] = requestParameters['dimension'];
112
+ }
113
+ if (requestParameters['asOf'] != null) {
114
+ queryParameters['as_of'] = requestParameters['asOf'].toISOString().substring(0, 10);
115
+ }
116
+ if (requestParameters['fields'] != null) {
117
+ queryParameters['fields'] = requestParameters['fields'];
118
+ }
119
+ if (requestParameters['limit'] != null) {
120
+ queryParameters['limit'] = requestParameters['limit'];
121
+ }
122
+ if (requestParameters['cursor'] != null) {
123
+ queryParameters['cursor'] = requestParameters['cursor'];
124
+ }
125
+ const headerParameters = {};
126
+ if (this.configuration && this.configuration.accessToken) {
127
+ const token = this.configuration.accessToken;
128
+ const tokenString = yield token("bearerAuth", []);
129
+ if (tokenString) {
130
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
131
+ }
132
+ }
133
+ let urlPath = `/v1/etf-weights`;
134
+ return {
135
+ path: urlPath,
136
+ method: 'GET',
137
+ headers: headerParameters,
138
+ query: queryParameters,
139
+ };
140
+ });
141
+ }
142
+ /**
143
+ * Sector, country and asset-class weights of one US ETF, from the same composition `/v1/etf-holdings?etf=` answers from (`meta.source`, `meta.as_of`): sector = the issuer\'s stated sector, else the SEC SIC sector of the holding\'s issuer; country = the stated location, else the N-PORT country / ISIN prefix / registrant country (each bucket names its `basis`, `mixed` when its positions differ); weights in percent of the fund. `dimension=` one or several of sector, country, asset_class (default all). An ETF without buckets for the chosen source answers `data: []` with `meta.reason: weights_unavailable`; a single-asset trust `meta.reason: single_asset_trust`. Positions themselves: `/v1/etf-holdings`; filed N-PORT rows: `/v1/fund-holdings`.
144
+ * List ETF sector, country and asset-class weights
145
+ */
146
+ listEtfWeightsRaw(requestParameters, initOverrides) {
147
+ return __awaiter(this, void 0, void 0, function* () {
148
+ const requestOptions = yield this.listEtfWeightsRequestOpts(requestParameters);
149
+ const response = yield this.request(requestOptions, initOverrides);
150
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListEtfWeights200ResponseFromJSON(jsonValue));
151
+ });
152
+ }
153
+ /**
154
+ * Sector, country and asset-class weights of one US ETF, from the same composition `/v1/etf-holdings?etf=` answers from (`meta.source`, `meta.as_of`): sector = the issuer\'s stated sector, else the SEC SIC sector of the holding\'s issuer; country = the stated location, else the N-PORT country / ISIN prefix / registrant country (each bucket names its `basis`, `mixed` when its positions differ); weights in percent of the fund. `dimension=` one or several of sector, country, asset_class (default all). An ETF without buckets for the chosen source answers `data: []` with `meta.reason: weights_unavailable`; a single-asset trust `meta.reason: single_asset_trust`. Positions themselves: `/v1/etf-holdings`; filed N-PORT rows: `/v1/fund-holdings`.
155
+ * List ETF sector, country and asset-class weights
156
+ */
157
+ listEtfWeights(requestParameters, initOverrides) {
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ const response = yield this.listEtfWeightsRaw(requestParameters, initOverrides);
160
+ return yield response.value();
161
+ });
162
+ }
31
163
  /**
32
164
  * Creates request options for listFundHoldings without sending the request
33
165
  */
@@ -79,7 +211,7 @@ export class HoldingsApi extends runtime.BaseAPI {
79
211
  });
80
212
  }
81
213
  /**
82
- * N-PORT fund and ETF positions from the funds\' quarterly public reports (about 60 days after the report date): by issuer (`company=`, one row per fund holding it, from each fund\'s latest report on or before `period_end`, its positions in the issuer summed), by fund (`filer=` registrant CIK, `series=` when the registrant files for several funds: that fund\'s positions) or by filing (`accession=`, an NPORT-P filing\'s reported holdings as filed); exactly one of `company`, `filer` or `accession` (`series` alone needs `filer`). `period_end` defaults to today. Order: value in USD, descending (`company=`, `filer=`), the filing\'s line order (`accession=`); several companies are read one after another. A fund row is not a 13F `Holding` (different row type, R16): `/v1/holdings` keeps the 13F managers.
214
+ * N-PORT fund and ETF positions from the funds\' quarterly public reports (about 60 days after the report date): by issuer (`company=`, one row per fund holding it, from each fund\'s latest report on or before `period_end`, its positions in the issuer summed), by fund (`filer=` registrant CIK, `series=` when the registrant files for several funds: that fund\'s positions) or by filing (`accession=`, an NPORT-P filing\'s reported holdings as filed); exactly one of `company`, `filer` or `accession` (`series` alone needs `filer`). `period_end` defaults to today. Order: value in USD, descending (`company=`, `filer=`), the filing\'s line order (`accession=`); several companies are read one after another. A fund row is not a 13F `Holding` (different row type, R16): `/v1/holdings` keeps the 13F managers. ETFs\' current composition (daily issuer files, falling back to N-PORT): `/v1/etf-holdings`.
83
215
  * List N-PORT fund holdings
84
216
  */
85
217
  listFundHoldingsRaw(requestParameters, initOverrides) {
@@ -90,7 +222,7 @@ export class HoldingsApi extends runtime.BaseAPI {
90
222
  });
91
223
  }
92
224
  /**
93
- * N-PORT fund and ETF positions from the funds\' quarterly public reports (about 60 days after the report date): by issuer (`company=`, one row per fund holding it, from each fund\'s latest report on or before `period_end`, its positions in the issuer summed), by fund (`filer=` registrant CIK, `series=` when the registrant files for several funds: that fund\'s positions) or by filing (`accession=`, an NPORT-P filing\'s reported holdings as filed); exactly one of `company`, `filer` or `accession` (`series` alone needs `filer`). `period_end` defaults to today. Order: value in USD, descending (`company=`, `filer=`), the filing\'s line order (`accession=`); several companies are read one after another. A fund row is not a 13F `Holding` (different row type, R16): `/v1/holdings` keeps the 13F managers.
225
+ * N-PORT fund and ETF positions from the funds\' quarterly public reports (about 60 days after the report date): by issuer (`company=`, one row per fund holding it, from each fund\'s latest report on or before `period_end`, its positions in the issuer summed), by fund (`filer=` registrant CIK, `series=` when the registrant files for several funds: that fund\'s positions) or by filing (`accession=`, an NPORT-P filing\'s reported holdings as filed); exactly one of `company`, `filer` or `accession` (`series` alone needs `filer`). `period_end` defaults to today. Order: value in USD, descending (`company=`, `filer=`), the filing\'s line order (`accession=`); several companies are read one after another. A fund row is not a 13F `Holding` (different row type, R16): `/v1/holdings` keeps the 13F managers. ETFs\' current composition (daily issuer files, falling back to N-PORT): `/v1/etf-holdings`.
94
226
  * List N-PORT fund holdings
95
227
  */
96
228
  listFundHoldings() {
@@ -239,6 +371,13 @@ export class HoldingsApi extends runtime.BaseAPI {
239
371
  });
240
372
  }
241
373
  }
374
+ /**
375
+ * @export
376
+ */
377
+ export const ListEtfHoldingsSortEnum = {
378
+ WeightPct: '-weight_pct',
379
+ MarketValueUsd: '-market_value_usd'
380
+ };
242
381
  /**
243
382
  * @export
244
383
  */