@clearroad/api
Advanced tools
Comparing version 1.2.0-rc.5 to 1.2.0-rc.6
@@ -5,12 +5,8 @@ declare const jIO: any; | ||
import { IJioQueryOptions } from './storage'; | ||
declare enum PortalTypes { | ||
export declare enum PortalTypes { | ||
BillingPeriodMessage = "Billing Period Message", | ||
File = "File", | ||
RoadAccount = "Road Account", | ||
RoadAccountMessage = "Road Account Message", | ||
RoadEvent = "Road Event", | ||
RoadEventMessage = "Road Event Message", | ||
RoadMessage = "Road Message", | ||
RoadReportRequest = "Road Report Request", | ||
RoadTransaction = "Road Transaction" | ||
RoadReportRequest = "Road Report Request" | ||
} | ||
@@ -17,0 +13,0 @@ export declare type storageName = 'messages' | 'ingestion-reports' | 'directories' | 'reports'; |
@@ -7,13 +7,9 @@ import RSVP from 'rsvp'; | ||
const queryPortalType = 'portal_type'; | ||
var PortalTypes; | ||
export var PortalTypes; | ||
(function (PortalTypes) { | ||
PortalTypes["BillingPeriodMessage"] = "Billing Period Message"; | ||
PortalTypes["File"] = "File"; | ||
PortalTypes["RoadAccount"] = "Road Account"; | ||
PortalTypes["RoadAccountMessage"] = "Road Account Message"; | ||
PortalTypes["RoadEvent"] = "Road Event"; | ||
PortalTypes["RoadEventMessage"] = "Road Event Message"; | ||
PortalTypes["RoadMessage"] = "Road Message"; | ||
PortalTypes["RoadReportRequest"] = "Road Report Request"; | ||
PortalTypes["RoadTransaction"] = "Road Transaction"; | ||
})(PortalTypes || (PortalTypes = {})); | ||
@@ -27,2 +23,9 @@ const queryPortalTypes = [ | ||
].join(' OR '); | ||
var InternalPortalTypes; | ||
(function (InternalPortalTypes) { | ||
InternalPortalTypes["File"] = "File"; | ||
InternalPortalTypes["RoadAccount"] = "Road Account"; | ||
InternalPortalTypes["RoadEvent"] = "Road Event"; | ||
InternalPortalTypes["RoadTransaction"] = "Road Transaction"; | ||
})(InternalPortalTypes || (InternalPortalTypes = {})); | ||
var ValidationStates; | ||
@@ -213,3 +216,3 @@ (function (ValidationStates) { | ||
`${queryPortalType}:(${queryPortalTypes})`, | ||
'grouping_reference:"data"', | ||
`grouping_reference:"${defaultAttachmentName}"`, | ||
this.queryMaxDate() | ||
@@ -299,5 +302,5 @@ ]); | ||
const query = joinQueries([`${queryPortalType}:(` + [ | ||
`"${PortalTypes.RoadAccount}"`, | ||
`"${PortalTypes.RoadEvent}"`, | ||
`"${PortalTypes.RoadTransaction}"` | ||
`"${InternalPortalTypes.RoadAccount}"`, | ||
`"${InternalPortalTypes.RoadEvent}"`, | ||
`"${InternalPortalTypes.RoadTransaction}"` | ||
].join(' OR ') + ')', this.queryMaxDate()]); | ||
@@ -343,3 +346,3 @@ const signatureStorage = this.signatureSubStorage(`${this.databaseName}-directory-signatures`); | ||
const query = joinQueries([ | ||
`${queryPortalType}:("${PortalTypes.File}")`, | ||
`${queryPortalType}:("${InternalPortalTypes.File}")`, | ||
this.queryMaxDate() | ||
@@ -485,3 +488,3 @@ ]); | ||
return this.allDocs({ | ||
query: `${queryPortalType}:"${PortalTypes.File}"`, | ||
query: `${queryPortalType}:"${InternalPortalTypes.File}"`, | ||
select_list: ['source_reference', 'reference'] | ||
@@ -507,5 +510,5 @@ }).push(result => { | ||
}) | ||
.push(data => { | ||
.push(report => { | ||
return { | ||
[defaultAttachmentName]: data | ||
[defaultAttachmentName]: report | ||
}; | ||
@@ -512,0 +515,0 @@ }, () => { |
@@ -493,21 +493,23 @@ 'use strict'; | ||
var queryPortalType = 'portal_type'; | ||
var PortalTypes; | ||
(function (PortalTypes) { | ||
PortalTypes["BillingPeriodMessage"] = "Billing Period Message"; | ||
PortalTypes["File"] = "File"; | ||
PortalTypes["RoadAccount"] = "Road Account"; | ||
PortalTypes["RoadAccountMessage"] = "Road Account Message"; | ||
PortalTypes["RoadEvent"] = "Road Event"; | ||
PortalTypes["RoadEventMessage"] = "Road Event Message"; | ||
PortalTypes["RoadMessage"] = "Road Message"; | ||
PortalTypes["RoadReportRequest"] = "Road Report Request"; | ||
PortalTypes["RoadTransaction"] = "Road Transaction"; | ||
})(PortalTypes || (PortalTypes = {})); | ||
})(exports.PortalTypes || (exports.PortalTypes = {})); | ||
var queryPortalTypes = [ | ||
"\"" + PortalTypes.BillingPeriodMessage + "\"", | ||
"\"" + PortalTypes.RoadAccountMessage + "\"", | ||
"\"" + PortalTypes.RoadEventMessage + "\"", | ||
"\"" + PortalTypes.RoadMessage + "\" ", | ||
"\"" + PortalTypes.RoadReportRequest + "\"" | ||
"\"" + exports.PortalTypes.BillingPeriodMessage + "\"", | ||
"\"" + exports.PortalTypes.RoadAccountMessage + "\"", | ||
"\"" + exports.PortalTypes.RoadEventMessage + "\"", | ||
"\"" + exports.PortalTypes.RoadMessage + "\" ", | ||
"\"" + exports.PortalTypes.RoadReportRequest + "\"" | ||
].join(' OR '); | ||
var InternalPortalTypes; | ||
(function (InternalPortalTypes) { | ||
InternalPortalTypes["File"] = "File"; | ||
InternalPortalTypes["RoadAccount"] = "Road Account"; | ||
InternalPortalTypes["RoadEvent"] = "Road Event"; | ||
InternalPortalTypes["RoadTransaction"] = "Road Transaction"; | ||
})(InternalPortalTypes || (InternalPortalTypes = {})); | ||
var ValidationStates; | ||
@@ -703,3 +705,3 @@ (function (ValidationStates) { | ||
queryPortalType + ":(" + queryPortalTypes + ")", | ||
'grouping_reference:"data"', | ||
"grouping_reference:\"" + defaultAttachmentName + "\"", | ||
this.queryMaxDate() | ||
@@ -789,5 +791,5 @@ ]); | ||
var query = joinQueries([queryPortalType + ":(" + [ | ||
"\"" + PortalTypes.RoadAccount + "\"", | ||
"\"" + PortalTypes.RoadEvent + "\"", | ||
"\"" + PortalTypes.RoadTransaction + "\"" | ||
"\"" + InternalPortalTypes.RoadAccount + "\"", | ||
"\"" + InternalPortalTypes.RoadEvent + "\"", | ||
"\"" + InternalPortalTypes.RoadTransaction + "\"" | ||
].join(' OR ') + ')', this.queryMaxDate()]); | ||
@@ -833,3 +835,3 @@ var signatureStorage = this.signatureSubStorage(this.databaseName + "-directory-signatures"); | ||
var query = joinQueries([ | ||
queryPortalType + ":(\"" + PortalTypes.File + "\")", | ||
queryPortalType + ":(\"" + InternalPortalTypes.File + "\")", | ||
this.queryMaxDate() | ||
@@ -914,15 +916,15 @@ ]); | ||
switch (data.portal_type) { | ||
case PortalTypes.RoadAccountMessage: | ||
case exports.PortalTypes.RoadAccountMessage: | ||
options.parent_relative_url = 'road_account_message_module'; | ||
break; | ||
case PortalTypes.RoadEventMessage: | ||
case exports.PortalTypes.RoadEventMessage: | ||
options.parent_relative_url = 'road_event_message_module'; | ||
break; | ||
case PortalTypes.RoadMessage: | ||
case exports.PortalTypes.RoadMessage: | ||
options.parent_relative_url = 'road_message_module'; | ||
break; | ||
case PortalTypes.BillingPeriodMessage: | ||
case exports.PortalTypes.BillingPeriodMessage: | ||
options.parent_relative_url = 'billing_period_message_module'; | ||
break; | ||
case PortalTypes.RoadReportRequest: | ||
case exports.PortalTypes.RoadReportRequest: | ||
options.parent_relative_url = 'road_report_request_module'; | ||
@@ -980,3 +982,3 @@ break; | ||
return this.allDocs({ | ||
query: queryPortalType + ":\"" + PortalTypes.File + "\"", | ||
query: queryPortalType + ":\"" + InternalPortalTypes.File + "\"", | ||
select_list: ['source_reference', 'reference'] | ||
@@ -1003,6 +1005,6 @@ }).push(function (result) { | ||
}) | ||
.push(function (data) { | ||
.push(function (report) { | ||
var _a; | ||
return _a = {}, | ||
_a[defaultAttachmentName] = data, | ||
_a[defaultAttachmentName] = report, | ||
_a; | ||
@@ -1009,0 +1011,0 @@ }, function () { |
@@ -493,21 +493,23 @@ 'use strict'; | ||
var queryPortalType = 'portal_type'; | ||
var PortalTypes; | ||
(function (PortalTypes) { | ||
PortalTypes["BillingPeriodMessage"] = "Billing Period Message"; | ||
PortalTypes["File"] = "File"; | ||
PortalTypes["RoadAccount"] = "Road Account"; | ||
PortalTypes["RoadAccountMessage"] = "Road Account Message"; | ||
PortalTypes["RoadEvent"] = "Road Event"; | ||
PortalTypes["RoadEventMessage"] = "Road Event Message"; | ||
PortalTypes["RoadMessage"] = "Road Message"; | ||
PortalTypes["RoadReportRequest"] = "Road Report Request"; | ||
PortalTypes["RoadTransaction"] = "Road Transaction"; | ||
})(PortalTypes || (PortalTypes = {})); | ||
})(exports.PortalTypes || (exports.PortalTypes = {})); | ||
var queryPortalTypes = [ | ||
"\"" + PortalTypes.BillingPeriodMessage + "\"", | ||
"\"" + PortalTypes.RoadAccountMessage + "\"", | ||
"\"" + PortalTypes.RoadEventMessage + "\"", | ||
"\"" + PortalTypes.RoadMessage + "\" ", | ||
"\"" + PortalTypes.RoadReportRequest + "\"" | ||
"\"" + exports.PortalTypes.BillingPeriodMessage + "\"", | ||
"\"" + exports.PortalTypes.RoadAccountMessage + "\"", | ||
"\"" + exports.PortalTypes.RoadEventMessage + "\"", | ||
"\"" + exports.PortalTypes.RoadMessage + "\" ", | ||
"\"" + exports.PortalTypes.RoadReportRequest + "\"" | ||
].join(' OR '); | ||
var InternalPortalTypes; | ||
(function (InternalPortalTypes) { | ||
InternalPortalTypes["File"] = "File"; | ||
InternalPortalTypes["RoadAccount"] = "Road Account"; | ||
InternalPortalTypes["RoadEvent"] = "Road Event"; | ||
InternalPortalTypes["RoadTransaction"] = "Road Transaction"; | ||
})(InternalPortalTypes || (InternalPortalTypes = {})); | ||
var ValidationStates; | ||
@@ -703,3 +705,3 @@ (function (ValidationStates) { | ||
queryPortalType + ":(" + queryPortalTypes + ")", | ||
'grouping_reference:"data"', | ||
"grouping_reference:\"" + defaultAttachmentName + "\"", | ||
this.queryMaxDate() | ||
@@ -789,5 +791,5 @@ ]); | ||
var query = joinQueries([queryPortalType + ":(" + [ | ||
"\"" + PortalTypes.RoadAccount + "\"", | ||
"\"" + PortalTypes.RoadEvent + "\"", | ||
"\"" + PortalTypes.RoadTransaction + "\"" | ||
"\"" + InternalPortalTypes.RoadAccount + "\"", | ||
"\"" + InternalPortalTypes.RoadEvent + "\"", | ||
"\"" + InternalPortalTypes.RoadTransaction + "\"" | ||
].join(' OR ') + ')', this.queryMaxDate()]); | ||
@@ -833,3 +835,3 @@ var signatureStorage = this.signatureSubStorage(this.databaseName + "-directory-signatures"); | ||
var query = joinQueries([ | ||
queryPortalType + ":(\"" + PortalTypes.File + "\")", | ||
queryPortalType + ":(\"" + InternalPortalTypes.File + "\")", | ||
this.queryMaxDate() | ||
@@ -914,15 +916,15 @@ ]); | ||
switch (data.portal_type) { | ||
case PortalTypes.RoadAccountMessage: | ||
case exports.PortalTypes.RoadAccountMessage: | ||
options.parent_relative_url = 'road_account_message_module'; | ||
break; | ||
case PortalTypes.RoadEventMessage: | ||
case exports.PortalTypes.RoadEventMessage: | ||
options.parent_relative_url = 'road_event_message_module'; | ||
break; | ||
case PortalTypes.RoadMessage: | ||
case exports.PortalTypes.RoadMessage: | ||
options.parent_relative_url = 'road_message_module'; | ||
break; | ||
case PortalTypes.BillingPeriodMessage: | ||
case exports.PortalTypes.BillingPeriodMessage: | ||
options.parent_relative_url = 'billing_period_message_module'; | ||
break; | ||
case PortalTypes.RoadReportRequest: | ||
case exports.PortalTypes.RoadReportRequest: | ||
options.parent_relative_url = 'road_report_request_module'; | ||
@@ -980,3 +982,3 @@ break; | ||
return this.allDocs({ | ||
query: queryPortalType + ":\"" + PortalTypes.File + "\"", | ||
query: queryPortalType + ":\"" + InternalPortalTypes.File + "\"", | ||
select_list: ['source_reference', 'reference'] | ||
@@ -1003,6 +1005,6 @@ }).push(function (result) { | ||
}) | ||
.push(function (data) { | ||
.push(function (report) { | ||
var _a; | ||
return _a = {}, | ||
_a[defaultAttachmentName] = data, | ||
_a[defaultAttachmentName] = report, | ||
_a; | ||
@@ -1009,0 +1011,0 @@ }, function () { |
{ | ||
"name": "@clearroad/api", | ||
"version": "1.2.0-rc.5", | ||
"version": "1.2.0-rc.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/commonjs/clearroad.js", |
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
437186
10592