@barchart/events-api-common
Advanced tools
Comparing version 1.3.3 to 1.3.4
@@ -177,3 +177,3 @@ const assert = require('@barchart/common-js/lang/assert'), | ||
const watchlistDownloaded = new EventType('WATCHLIST-DOWNLOADED', 'Watchlist Downloaded', ProductType.WATCHLIST); | ||
const watchlistPrinted = new EventType('WATCHLIST-PRINTED', 'Watchlist Downloaded', ProductType.WATCHLIST); | ||
const watchlistPrinted = new EventType('WATCHLIST-PRINTED', 'Watchlist Printed', ProductType.WATCHLIST); | ||
@@ -180,0 +180,0 @@ const watchlistScreenEditAccessed = new EventType('SCREEN-EDIT-ACCESSED', 'Edit Screen Accessed', ProductType.WATCHLIST); |
@@ -41,3 +41,3 @@ const assert = require('@barchart/common-js/lang/assert'), | ||
/** | ||
* Returns event type and identifiers. | ||
* The schema for inbound and outbound client communication. | ||
* | ||
@@ -48,6 +48,17 @@ * @static | ||
*/ | ||
static get TYPE() { | ||
return type; | ||
static get COMPLETE() { | ||
return complete; | ||
} | ||
/** | ||
* The schema for inbound and outbound client communication. | ||
* | ||
* @static | ||
* @public | ||
* @returns {EventSchema} | ||
*/ | ||
static get CLIENT() { | ||
return client; | ||
} | ||
toString() { | ||
@@ -58,3 +69,3 @@ return `[EventSchema (code=${this._code})]`; | ||
const type = new EventSchema(SchemaBuilder.withName('type') | ||
const complete = new EventSchema(SchemaBuilder.withName('complete') | ||
.withField('customer', DataType.forEnum(CustomerType, 'CustomerType')) | ||
@@ -64,2 +75,4 @@ .withField('product', DataType.forEnum(ProductType, 'ProductType')) | ||
.withField('timestamp', DataType.TIMESTAMP) | ||
.withField('batch', DataType.STRING) | ||
.withField('sequence', DataType.NUMBER) | ||
.withField('context', DataType.ARRAY) | ||
@@ -69,3 +82,12 @@ .schema | ||
const client = new EventSchema(SchemaBuilder.withName('client') | ||
.withField('customer', DataType.forEnum(CustomerType, 'CustomerType')) | ||
.withField('product', DataType.forEnum(ProductType, 'ProductType')) | ||
.withField('type', DataType.forEnum(EventType, 'EventType')) | ||
.withField('timestamp', DataType.TIMESTAMP) | ||
.withField('context', DataType.ARRAY) | ||
.schema | ||
); | ||
return EventSchema; | ||
})(); |
{ | ||
"name": "@barchart/events-api-common", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"description": "Common classes used by the Event system", | ||
@@ -5,0 +5,0 @@ "author": { |
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
19904
619