Comparing version 8.0.0 to 9.0.0
@@ -36,4 +36,17 @@ import { EndpointDescription } from "./types"; | ||
} | ||
export declare enum Field { | ||
ID = "id", | ||
HEADLINE = "headline", | ||
BODY = "body", | ||
TICKERS = "tickers", | ||
SOURCE = "source", | ||
PUBLICATION_TIME = "publicationTime", | ||
RECEIVED_TIME = "receivedTime", | ||
CREATION_TIME = "creationTime", | ||
CATEGORY_CODES = "categoryCodes", | ||
CIKS = "ciks", | ||
LINK = "link" | ||
} | ||
export declare const Endpoint: { | ||
[key: string]: EndpointDescription; | ||
}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Endpoint = exports.WebsocketResponseType = exports.WebsocketMethod = exports.Source = exports.FilterAction = exports.FilterType = void 0; | ||
exports.Endpoint = exports.Field = exports.WebsocketResponseType = exports.WebsocketMethod = exports.Source = exports.FilterAction = exports.FilterType = void 0; | ||
var FilterType; | ||
@@ -44,2 +44,16 @@ (function (FilterType) { | ||
})(WebsocketResponseType || (exports.WebsocketResponseType = WebsocketResponseType = {})); | ||
var Field; | ||
(function (Field) { | ||
Field["ID"] = "id"; | ||
Field["HEADLINE"] = "headline"; | ||
Field["BODY"] = "body"; | ||
Field["TICKERS"] = "tickers"; | ||
Field["SOURCE"] = "source"; | ||
Field["PUBLICATION_TIME"] = "publicationTime"; | ||
Field["RECEIVED_TIME"] = "receivedTime"; | ||
Field["CREATION_TIME"] = "creationTime"; | ||
Field["CATEGORY_CODES"] = "categoryCodes"; | ||
Field["CIKS"] = "ciks"; | ||
Field["LINK"] = "link"; | ||
})(Field || (exports.Field = Field = {})); | ||
exports.Endpoint = { | ||
@@ -46,0 +60,0 @@ LOCALHOST: { |
@@ -5,2 +5,2 @@ export { Or, And, Text, Ciks, Tickers, Sources, CategoryCodes } from "./filters"; | ||
export { News, Filter, TextOptions, WebsocketResponse, WebsocketErrorResponse, ConnectOptions, HistoricalFilter, RestResponse } from "./types"; | ||
export { Source, WebsocketMethod, WebsocketResponseType, FilterAction } from "./enums"; | ||
export { Source, WebsocketMethod, WebsocketResponseType, FilterAction, Field } from "./enums"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FilterAction = exports.WebsocketResponseType = exports.WebsocketMethod = exports.Source = exports.WsApi = exports.Api = exports.CategoryCodes = exports.Sources = exports.Tickers = exports.Ciks = exports.Text = exports.And = exports.Or = void 0; | ||
exports.Field = exports.FilterAction = exports.WebsocketResponseType = exports.WebsocketMethod = exports.Source = exports.WsApi = exports.Api = exports.CategoryCodes = exports.Sources = exports.Tickers = exports.Ciks = exports.Text = exports.And = exports.Or = void 0; | ||
var filters_1 = require("./filters"); | ||
@@ -21,2 +21,3 @@ Object.defineProperty(exports, "Or", { enumerable: true, get: function () { return filters_1.Or; } }); | ||
Object.defineProperty(exports, "FilterAction", { enumerable: true, get: function () { return enums_1.FilterAction; } }); | ||
Object.defineProperty(exports, "Field", { enumerable: true, get: function () { return enums_1.Field; } }); | ||
//# sourceMappingURL=index.js.map |
/// <reference types="ws" /> | ||
import { CloseEvent } from "isomorphic-ws"; | ||
import { FilterAction, FilterType, WebsocketMethod, WebsocketResponseType } from "./enums"; | ||
import { Field, FilterAction, FilterType, WebsocketMethod, WebsocketResponseType } from "./enums"; | ||
export type RestResponse = { | ||
@@ -68,2 +68,3 @@ error: ApiResponseError; | ||
subscriptionId: string; | ||
fields?: Field[]; | ||
filter?: Filter; | ||
@@ -84,3 +85,6 @@ } | ||
id: string; | ||
value?: Filter; | ||
value: { | ||
filter?: Filter; | ||
fields?: Field[]; | ||
}; | ||
} | { | ||
@@ -87,0 +91,0 @@ method: WebsocketMethod.UNSUBSCRIBE; |
@@ -79,3 +79,6 @@ "use strict"; | ||
id: options.subscriptionId, | ||
value: options.filter | ||
value: { | ||
filter: options.filter, | ||
fields: options.fields | ||
} | ||
}; | ||
@@ -82,0 +85,0 @@ this.sendSocketMessage(message, resubscribeOnReconnect); |
{ | ||
"name": "newsware", | ||
"version": "8.0.0", | ||
"version": "9.0.0", | ||
"description": "Typescript client for interacting with the Newsware API", | ||
@@ -5,0 +5,0 @@ "main": "lib/src/index.js", |
@@ -44,2 +44,16 @@ import {EndpointDescription} from "./types"; | ||
export enum Field { | ||
ID = "id", | ||
HEADLINE = "headline", | ||
BODY = "body", | ||
TICKERS = "tickers", | ||
SOURCE = "source", | ||
PUBLICATION_TIME = "publicationTime", | ||
RECEIVED_TIME = "receivedTime", | ||
CREATION_TIME = "creationTime", | ||
CATEGORY_CODES = "categoryCodes", | ||
CIKS = "ciks", | ||
LINK = "link" | ||
} | ||
export const Endpoint: { [key: string]: EndpointDescription } = { | ||
@@ -46,0 +60,0 @@ LOCALHOST: { |
@@ -14,2 +14,2 @@ export {Or, And, Text, Ciks, Tickers, Sources, CategoryCodes} from "./filters"; | ||
} from "./types" | ||
export {Source, WebsocketMethod, WebsocketResponseType, FilterAction} from "./enums" | ||
export {Source, WebsocketMethod, WebsocketResponseType, FilterAction, Field} from "./enums" |
import {CloseEvent} from "isomorphic-ws" | ||
import {FilterAction, FilterType, WebsocketMethod, WebsocketResponseType} from "./enums" | ||
import {Field, FilterAction, FilterType, WebsocketMethod, WebsocketResponseType} from "./enums" | ||
@@ -78,2 +78,3 @@ export type RestResponse = { | ||
subscriptionId: string, | ||
fields?: Field[], | ||
filter?: Filter, | ||
@@ -97,3 +98,3 @@ } | ||
id: string | ||
value?: Filter | ||
value: { filter?: Filter, fields?: Field[] } | ||
} | { | ||
@@ -100,0 +101,0 @@ method: WebsocketMethod.UNSUBSCRIBE |
@@ -89,3 +89,6 @@ import {ConnectOptions, EndpointDescription, SubscribeOptions, WebsocketRequest, WebsocketResponse,} from "./types"; | ||
id: options.subscriptionId, | ||
value: options.filter | ||
value: { | ||
filter: options.filter, | ||
fields: options.fields | ||
} | ||
} | ||
@@ -92,0 +95,0 @@ this.sendSocketMessage(message, resubscribeOnReconnect) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91390
1793