fmp-node-types 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,48 @@
1
+ 'use strict';
2
+
3
+ // src/common.ts
4
+ var Period = /* @__PURE__ */ ((Period2) => {
5
+ Period2["ANNUAL"] = "annual";
6
+ Period2["QUARTER"] = "quarter";
7
+ return Period2;
8
+ })(Period || {});
9
+ var Exchange = /* @__PURE__ */ ((Exchange2) => {
10
+ Exchange2["NYSE"] = "NYSE";
11
+ Exchange2["NASDAQ"] = "NASDAQ";
12
+ Exchange2["AMEX"] = "AMEX";
13
+ Exchange2["TSX"] = "TSX";
14
+ Exchange2["LSE"] = "LSE";
15
+ Exchange2["ASX"] = "ASX";
16
+ Exchange2["NSE"] = "NSE";
17
+ Exchange2["BSE"] = "BSE";
18
+ return Exchange2;
19
+ })(Exchange || {});
20
+
21
+ // src/insider.ts
22
+ var TransactionType = /* @__PURE__ */ ((TransactionType2) => {
23
+ TransactionType2["AWARD"] = "A-Award";
24
+ TransactionType2["CONVERSION"] = "C-Conversion";
25
+ TransactionType2["RETURN"] = "D-Return";
26
+ TransactionType2["EXPIRE_SHORT"] = "E-ExpireShort";
27
+ TransactionType2["IN_KIND"] = "F-InKind";
28
+ TransactionType2["GIFT"] = "G-Gift";
29
+ TransactionType2["EXPIRE_LONG"] = "H-ExpireLong";
30
+ TransactionType2["DISCRETIONARY"] = "I-Discretionary";
31
+ TransactionType2["OTHER"] = "J-Other";
32
+ TransactionType2["SMALL"] = "L-Small";
33
+ TransactionType2["EXEMPT"] = "M-Exempt";
34
+ TransactionType2["OUT_OF_THE_MONEY"] = "O-OutOfTheMoney";
35
+ TransactionType2["PURCHASE"] = "P-Purchase";
36
+ TransactionType2["SALE"] = "S-Sale";
37
+ TransactionType2["TENDER"] = "U-Tender";
38
+ TransactionType2["WILL"] = "W-Will";
39
+ TransactionType2["IN_THE_MONEY"] = "X-InTheMoney";
40
+ TransactionType2["TRUST"] = "Z-Trust";
41
+ return TransactionType2;
42
+ })(TransactionType || {});
43
+
44
+ exports.Exchange = Exchange;
45
+ exports.Period = Period;
46
+ exports.TransactionType = TransactionType;
47
+ //# sourceMappingURL=index.js.map
48
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/common.ts","../src/insider.ts"],"names":["Period","Exchange","TransactionType"],"mappings":";;;AAyCO,IAAK,MAAA,qBAAAA,OAAAA,KAAL;AACL,EAAAA,QAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,QAAA,SAAA,CAAA,GAAU,SAAA;AAFA,EAAA,OAAAA,OAAAA;AAAA,CAAA,EAAA,MAAA,IAAA,EAAA;AAKL,IAAK,QAAA,qBAAAC,SAAAA,KAAL;AACL,EAAAA,UAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,UAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,UAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,UAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,UAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,UAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,UAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,UAAA,KAAA,CAAA,GAAM,KAAA;AARI,EAAA,OAAAA,SAAAA;AAAA,CAAA,EAAA,QAAA,IAAA,EAAA;;;ACsDL,IAAK,eAAA,qBAAAC,gBAAAA,KAAL;AACL,EAAAA,iBAAA,OAAA,CAAA,GAAQ,SAAA;AACR,EAAAA,iBAAA,YAAA,CAAA,GAAa,cAAA;AACb,EAAAA,iBAAA,QAAA,CAAA,GAAS,UAAA;AACT,EAAAA,iBAAA,cAAA,CAAA,GAAe,eAAA;AACf,EAAAA,iBAAA,SAAA,CAAA,GAAU,UAAA;AACV,EAAAA,iBAAA,MAAA,CAAA,GAAO,QAAA;AACP,EAAAA,iBAAA,aAAA,CAAA,GAAc,cAAA;AACd,EAAAA,iBAAA,eAAA,CAAA,GAAgB,iBAAA;AAChB,EAAAA,iBAAA,OAAA,CAAA,GAAQ,SAAA;AACR,EAAAA,iBAAA,OAAA,CAAA,GAAQ,SAAA;AACR,EAAAA,iBAAA,QAAA,CAAA,GAAS,UAAA;AACT,EAAAA,iBAAA,kBAAA,CAAA,GAAmB,iBAAA;AACnB,EAAAA,iBAAA,UAAA,CAAA,GAAW,YAAA;AACX,EAAAA,iBAAA,MAAA,CAAA,GAAO,QAAA;AACP,EAAAA,iBAAA,QAAA,CAAA,GAAS,UAAA;AACT,EAAAA,iBAAA,MAAA,CAAA,GAAO,QAAA;AACP,EAAAA,iBAAA,cAAA,CAAA,GAAe,cAAA;AACf,EAAAA,iBAAA,OAAA,CAAA,GAAQ,SAAA;AAlBE,EAAA,OAAAA,gBAAAA;AAAA,CAAA,EAAA,eAAA,IAAA,EAAA","file":"index.js","sourcesContent":["// Common types used across all FMP API endpoints\n\n// Base API response wrapper - consistent structure with nullable fields\nexport interface APIResponse<T = unknown> {\n success: boolean;\n data: T | null;\n error: string | null;\n status: number;\n}\n\n// FMP API configuration\nexport interface FMPConfig {\n apiKey?: string; // Optional since we support FMP_API_KEY environment variable\n timeout?: number;\n}\n\n// Common parameter interfaces\nexport interface SymbolParams {\n symbol: string;\n}\n\nexport interface DateRangeParams {\n from?: string;\n to?: string;\n}\n\nexport interface PaginationParams {\n limit?: number;\n page?: number;\n}\n\nexport interface PeriodParams {\n period?: 'annual' | 'quarter';\n}\n\n// Type-safe query parameters\nexport interface QueryParams {\n [key: string]: string | number | boolean | undefined;\n}\n\n// Common enums\nexport enum Period {\n ANNUAL = 'annual',\n QUARTER = 'quarter',\n}\n\nexport enum Exchange {\n NYSE = 'NYSE',\n NASDAQ = 'NASDAQ',\n AMEX = 'AMEX',\n TSX = 'TSX',\n LSE = 'LSE',\n ASX = 'ASX',\n NSE = 'NSE',\n BSE = 'BSE',\n}\n","// Insider Trading Types\n\n// RSS Feed Response\nexport interface InsiderTradingRSSResponse {\n title: string;\n fillingDate: string;\n symbol: string;\n link: string;\n reportingCik: string;\n issuerCik: string;\n}\n\n// Insider Trading Search Response\nexport interface InsiderTradingSearchResponse {\n symbol: string;\n filingDate: string;\n transactionDate: string;\n reportingCik: string;\n transactionType: string;\n securitiesOwned: number;\n securitiesTransacted: number;\n companyCik: string;\n reportingName: string;\n typeOfOwner: string;\n link: string;\n securityName: string;\n price: number;\n formType: string;\n acquistionOrDisposition: string;\n}\n\n// Transaction Types Response\nexport type TransactionTypesResponse = string[];\n\n// Insiders By Symbol Response\nexport interface InsidersBySymbolResponse {\n typeOfOwner: string;\n transactionDate: string;\n owner: string;\n}\n\n// Insider Trade Statistics Response\nexport interface InsiderTradeStatisticsResponse {\n symbol: string;\n cik: string;\n year: number;\n quarter: number;\n purchases: number;\n sales: number;\n buySellRatio: number;\n totalBought: number;\n totalSold: number;\n averageBought: number;\n averageSold: number;\n pPurchases: number;\n sSales: number;\n}\n\n// CIK Mapper Response\nexport interface CikMapperResponse {\n reportingCik: string;\n reportingName: string;\n}\n\n// CIK Mapper By Symbol Response\nexport interface CikMapperBySymbolResponse {\n symbol: string;\n companyCik: string;\n}\n\n// Beneficial Ownership Response\nexport interface BeneficialOwnershipResponse {\n cik: string;\n symbol: string;\n filingDate: string;\n acceptedDate: string;\n cusip: string;\n nameOfReportingPerson: string;\n citizenshipOrPlaceOfOrganization: string;\n soleVotingPower: string;\n sharedVotingPower: string;\n soleDispositivePower: string;\n sharedDispositivePower: string;\n amountBeneficiallyOwned: string;\n percentOfClass: string;\n typeOfReportingPerson: string;\n url: string;\n}\n\n// Fail to Deliver Response\nexport interface FailToDeliverResponse {\n symbol: string;\n date: string;\n price: number;\n quantity: number;\n cusip: string;\n name: string;\n}\n\n// Transaction type enum for better type safety\nexport enum TransactionType {\n AWARD = 'A-Award',\n CONVERSION = 'C-Conversion',\n RETURN = 'D-Return',\n EXPIRE_SHORT = 'E-ExpireShort',\n IN_KIND = 'F-InKind',\n GIFT = 'G-Gift',\n EXPIRE_LONG = 'H-ExpireLong',\n DISCRETIONARY = 'I-Discretionary',\n OTHER = 'J-Other',\n SMALL = 'L-Small',\n EXEMPT = 'M-Exempt',\n OUT_OF_THE_MONEY = 'O-OutOfTheMoney',\n PURCHASE = 'P-Purchase',\n SALE = 'S-Sale',\n TENDER = 'U-Tender',\n WILL = 'W-Will',\n IN_THE_MONEY = 'X-InTheMoney',\n TRUST = 'Z-Trust',\n}\n"]}
package/dist/index.mjs ADDED
@@ -0,0 +1,44 @@
1
+ // src/common.ts
2
+ var Period = /* @__PURE__ */ ((Period2) => {
3
+ Period2["ANNUAL"] = "annual";
4
+ Period2["QUARTER"] = "quarter";
5
+ return Period2;
6
+ })(Period || {});
7
+ var Exchange = /* @__PURE__ */ ((Exchange2) => {
8
+ Exchange2["NYSE"] = "NYSE";
9
+ Exchange2["NASDAQ"] = "NASDAQ";
10
+ Exchange2["AMEX"] = "AMEX";
11
+ Exchange2["TSX"] = "TSX";
12
+ Exchange2["LSE"] = "LSE";
13
+ Exchange2["ASX"] = "ASX";
14
+ Exchange2["NSE"] = "NSE";
15
+ Exchange2["BSE"] = "BSE";
16
+ return Exchange2;
17
+ })(Exchange || {});
18
+
19
+ // src/insider.ts
20
+ var TransactionType = /* @__PURE__ */ ((TransactionType2) => {
21
+ TransactionType2["AWARD"] = "A-Award";
22
+ TransactionType2["CONVERSION"] = "C-Conversion";
23
+ TransactionType2["RETURN"] = "D-Return";
24
+ TransactionType2["EXPIRE_SHORT"] = "E-ExpireShort";
25
+ TransactionType2["IN_KIND"] = "F-InKind";
26
+ TransactionType2["GIFT"] = "G-Gift";
27
+ TransactionType2["EXPIRE_LONG"] = "H-ExpireLong";
28
+ TransactionType2["DISCRETIONARY"] = "I-Discretionary";
29
+ TransactionType2["OTHER"] = "J-Other";
30
+ TransactionType2["SMALL"] = "L-Small";
31
+ TransactionType2["EXEMPT"] = "M-Exempt";
32
+ TransactionType2["OUT_OF_THE_MONEY"] = "O-OutOfTheMoney";
33
+ TransactionType2["PURCHASE"] = "P-Purchase";
34
+ TransactionType2["SALE"] = "S-Sale";
35
+ TransactionType2["TENDER"] = "U-Tender";
36
+ TransactionType2["WILL"] = "W-Will";
37
+ TransactionType2["IN_THE_MONEY"] = "X-InTheMoney";
38
+ TransactionType2["TRUST"] = "Z-Trust";
39
+ return TransactionType2;
40
+ })(TransactionType || {});
41
+
42
+ export { Exchange, Period, TransactionType };
43
+ //# sourceMappingURL=index.mjs.map
44
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/common.ts","../src/insider.ts"],"names":["Period","Exchange","TransactionType"],"mappings":";AAyCO,IAAK,MAAA,qBAAAA,OAAAA,KAAL;AACL,EAAAA,QAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,QAAA,SAAA,CAAA,GAAU,SAAA;AAFA,EAAA,OAAAA,OAAAA;AAAA,CAAA,EAAA,MAAA,IAAA,EAAA;AAKL,IAAK,QAAA,qBAAAC,SAAAA,KAAL;AACL,EAAAA,UAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,UAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,UAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,UAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,UAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,UAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,UAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,UAAA,KAAA,CAAA,GAAM,KAAA;AARI,EAAA,OAAAA,SAAAA;AAAA,CAAA,EAAA,QAAA,IAAA,EAAA;;;ACsDL,IAAK,eAAA,qBAAAC,gBAAAA,KAAL;AACL,EAAAA,iBAAA,OAAA,CAAA,GAAQ,SAAA;AACR,EAAAA,iBAAA,YAAA,CAAA,GAAa,cAAA;AACb,EAAAA,iBAAA,QAAA,CAAA,GAAS,UAAA;AACT,EAAAA,iBAAA,cAAA,CAAA,GAAe,eAAA;AACf,EAAAA,iBAAA,SAAA,CAAA,GAAU,UAAA;AACV,EAAAA,iBAAA,MAAA,CAAA,GAAO,QAAA;AACP,EAAAA,iBAAA,aAAA,CAAA,GAAc,cAAA;AACd,EAAAA,iBAAA,eAAA,CAAA,GAAgB,iBAAA;AAChB,EAAAA,iBAAA,OAAA,CAAA,GAAQ,SAAA;AACR,EAAAA,iBAAA,OAAA,CAAA,GAAQ,SAAA;AACR,EAAAA,iBAAA,QAAA,CAAA,GAAS,UAAA;AACT,EAAAA,iBAAA,kBAAA,CAAA,GAAmB,iBAAA;AACnB,EAAAA,iBAAA,UAAA,CAAA,GAAW,YAAA;AACX,EAAAA,iBAAA,MAAA,CAAA,GAAO,QAAA;AACP,EAAAA,iBAAA,QAAA,CAAA,GAAS,UAAA;AACT,EAAAA,iBAAA,MAAA,CAAA,GAAO,QAAA;AACP,EAAAA,iBAAA,cAAA,CAAA,GAAe,cAAA;AACf,EAAAA,iBAAA,OAAA,CAAA,GAAQ,SAAA;AAlBE,EAAA,OAAAA,gBAAAA;AAAA,CAAA,EAAA,eAAA,IAAA,EAAA","file":"index.mjs","sourcesContent":["// Common types used across all FMP API endpoints\n\n// Base API response wrapper - consistent structure with nullable fields\nexport interface APIResponse<T = unknown> {\n success: boolean;\n data: T | null;\n error: string | null;\n status: number;\n}\n\n// FMP API configuration\nexport interface FMPConfig {\n apiKey?: string; // Optional since we support FMP_API_KEY environment variable\n timeout?: number;\n}\n\n// Common parameter interfaces\nexport interface SymbolParams {\n symbol: string;\n}\n\nexport interface DateRangeParams {\n from?: string;\n to?: string;\n}\n\nexport interface PaginationParams {\n limit?: number;\n page?: number;\n}\n\nexport interface PeriodParams {\n period?: 'annual' | 'quarter';\n}\n\n// Type-safe query parameters\nexport interface QueryParams {\n [key: string]: string | number | boolean | undefined;\n}\n\n// Common enums\nexport enum Period {\n ANNUAL = 'annual',\n QUARTER = 'quarter',\n}\n\nexport enum Exchange {\n NYSE = 'NYSE',\n NASDAQ = 'NASDAQ',\n AMEX = 'AMEX',\n TSX = 'TSX',\n LSE = 'LSE',\n ASX = 'ASX',\n NSE = 'NSE',\n BSE = 'BSE',\n}\n","// Insider Trading Types\n\n// RSS Feed Response\nexport interface InsiderTradingRSSResponse {\n title: string;\n fillingDate: string;\n symbol: string;\n link: string;\n reportingCik: string;\n issuerCik: string;\n}\n\n// Insider Trading Search Response\nexport interface InsiderTradingSearchResponse {\n symbol: string;\n filingDate: string;\n transactionDate: string;\n reportingCik: string;\n transactionType: string;\n securitiesOwned: number;\n securitiesTransacted: number;\n companyCik: string;\n reportingName: string;\n typeOfOwner: string;\n link: string;\n securityName: string;\n price: number;\n formType: string;\n acquistionOrDisposition: string;\n}\n\n// Transaction Types Response\nexport type TransactionTypesResponse = string[];\n\n// Insiders By Symbol Response\nexport interface InsidersBySymbolResponse {\n typeOfOwner: string;\n transactionDate: string;\n owner: string;\n}\n\n// Insider Trade Statistics Response\nexport interface InsiderTradeStatisticsResponse {\n symbol: string;\n cik: string;\n year: number;\n quarter: number;\n purchases: number;\n sales: number;\n buySellRatio: number;\n totalBought: number;\n totalSold: number;\n averageBought: number;\n averageSold: number;\n pPurchases: number;\n sSales: number;\n}\n\n// CIK Mapper Response\nexport interface CikMapperResponse {\n reportingCik: string;\n reportingName: string;\n}\n\n// CIK Mapper By Symbol Response\nexport interface CikMapperBySymbolResponse {\n symbol: string;\n companyCik: string;\n}\n\n// Beneficial Ownership Response\nexport interface BeneficialOwnershipResponse {\n cik: string;\n symbol: string;\n filingDate: string;\n acceptedDate: string;\n cusip: string;\n nameOfReportingPerson: string;\n citizenshipOrPlaceOfOrganization: string;\n soleVotingPower: string;\n sharedVotingPower: string;\n soleDispositivePower: string;\n sharedDispositivePower: string;\n amountBeneficiallyOwned: string;\n percentOfClass: string;\n typeOfReportingPerson: string;\n url: string;\n}\n\n// Fail to Deliver Response\nexport interface FailToDeliverResponse {\n symbol: string;\n date: string;\n price: number;\n quantity: number;\n cusip: string;\n name: string;\n}\n\n// Transaction type enum for better type safety\nexport enum TransactionType {\n AWARD = 'A-Award',\n CONVERSION = 'C-Conversion',\n RETURN = 'D-Return',\n EXPIRE_SHORT = 'E-ExpireShort',\n IN_KIND = 'F-InKind',\n GIFT = 'G-Gift',\n EXPIRE_LONG = 'H-ExpireLong',\n DISCRETIONARY = 'I-Discretionary',\n OTHER = 'J-Other',\n SMALL = 'L-Small',\n EXEMPT = 'M-Exempt',\n OUT_OF_THE_MONEY = 'O-OutOfTheMoney',\n PURCHASE = 'P-Purchase',\n SALE = 'S-Sale',\n TENDER = 'U-Tender',\n WILL = 'W-Will',\n IN_THE_MONEY = 'X-InTheMoney',\n TRUST = 'Z-Trust',\n}\n"]}
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "fmp-node-types",
3
+ "version": "0.1.2",
4
+ "description": "Shared TypeScript types for FMP Node Wrapper ecosystem (internal package)",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist/**"
17
+ ],
18
+ "keywords": [
19
+ "typescript",
20
+ "types",
21
+ "financial",
22
+ "fmp",
23
+ "financial-modeling-prep",
24
+ "internal"
25
+ ],
26
+ "author": "Eric <https://github.com/e-roy>",
27
+ "license": "MIT",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "https://github.com/e-roy/fmp-node-wrapper.git"
31
+ },
32
+ "homepage": "https://fmp-node-wrapper-docs.vercel.app",
33
+ "devDependencies": {
34
+ "@types/node": "^20.11.0",
35
+ "prettier": "^3.2.5",
36
+ "tsup": "^8.0.0",
37
+ "typescript": "^5.3.3"
38
+ },
39
+ "scripts": {
40
+ "build": "tsup",
41
+ "dev": "tsup --watch",
42
+ "lint": "npx eslint src/**/*.ts",
43
+ "lint:fix": "eslint src/**/*.ts --fix",
44
+ "type-check": "tsc --noEmit",
45
+ "format": "prettier --write src/**/*.ts",
46
+ "format:check": "prettier --check src/**/*.ts",
47
+ "clean": "rm -rf dist"
48
+ }
49
+ }