js-requests.js 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. 'use strict';
  2. const registerReportMin = {
  3. _type: 'oadrRegisterReport',
  4. requestId: '31c5ce71a68a73ece370',
  5. reports: [],
  6. };
  7. const registerReportMax = {
  8. _type: 'oadrRegisterReport',
  9. requestId: '31c5ce71a68a73ece370',
  10. venId: 'D8:1D:4B:20:5A:65:4C:50:32:FA',
  11. reports: [
  12. {
  13. reportRequestId: '31c5ce71a68a73ece370',
  14. reportSpecifierId: 'TELEMETRY_STATUS',
  15. createdDateTime: '2020-05-07T10:05:41.421-06:00',
  16. duration: 'PT1H',
  17. reportName: 'METADATA_TELEMETRY_STATUS',
  18. descriptions: [
  19. {
  20. reportId: 'TelemetryStatusReport',
  21. reportType: 'x-resourceStatus',
  22. readingType: 'x-notApplicable',
  23. samplingRate: {
  24. minPeriod: 'PT1M',
  25. maxPeriod: 'PT1H',
  26. onChange: false,
  27. },
  28. },
  29. ],
  30. },
  31. {
  32. reportRequestId: '3d92d98e0b65d94e60a7',
  33. reportSpecifierId: 'TELEMETRY_USAGE',
  34. createdDateTime: '2020-05-07T10:05:41.421-06:00',
  35. duration: 'PT1H',
  36. reportName: 'METADATA_TELEMETRY_USAGE',
  37. descriptions: [
  38. {
  39. reportId: 'rep1',
  40. reportType: 'usage',
  41. readingType: 'Direct Read',
  42. samplingRate: {
  43. minPeriod: 'PT1M',
  44. maxPeriod: 'PT1H',
  45. onChange: false,
  46. },
  47. },
  48. {
  49. reportId: 'rep2',
  50. reportType: 'usage',
  51. readingType: 'Direct Read',
  52. samplingRate: {
  53. minPeriod: 'PT1M',
  54. maxPeriod: 'PT1H',
  55. onChange: false,
  56. },
  57. },
  58. ],
  59. },
  60. ],
  61. };
  62. const registerReportCa = {
  63. _type: 'oadrRegisterReport',
  64. requestId: '1087c',
  65. reports: [
  66. {
  67. reportRequestId: '1087c',
  68. reportSpecifierId: 'TELEMETRY_STATUS',
  69. createdDateTime: '2020-05-11T19:32:33.632-06:00',
  70. reportName: 'METADATA_TELEMETRY_STATUS',
  71. descriptions: [
  72. {
  73. reportId: 'TelemetryStatusReport',
  74. reportType: 'x-resourceStatus',
  75. readingType: 'x-notApplicable',
  76. samplingRate: {
  77. minPeriod: 'PT1M',
  78. maxPeriod: 'PT1H',
  79. onChange: false,
  80. },
  81. },
  82. ],
  83. duration: 'PT1H',
  84. },
  85. {
  86. reportRequestId: '1087c',
  87. reportSpecifierId: 'TELEMETRY_USAGE',
  88. createdDateTime: '2020-05-11T19:32:33.632-06:00',
  89. reportName: 'METADATA_TELEMETRY_USAGE',
  90. descriptions: [
  91. {
  92. reportId: 'rep1',
  93. reportType: 'usage',
  94. readingType: 'Direct Read',
  95. samplingRate: {
  96. minPeriod: 'PT1M',
  97. maxPeriod: 'PT1H',
  98. onChange: false,
  99. },
  100. },
  101. {
  102. reportId: 'rep2',
  103. reportType: 'usage',
  104. readingType: 'Direct Read',
  105. samplingRate: {
  106. minPeriod: 'PT1M',
  107. maxPeriod: 'PT1H',
  108. onChange: false,
  109. },
  110. },
  111. ],
  112. duration: 'PT1H',
  113. },
  114. ],
  115. venId: 'D8:1D:4B:20:5A:65:4C:50:32:FA',
  116. };
  117. const createdReportMin = {
  118. _type: 'oadrCreatedReport',
  119. responseCode: '200',
  120. responseRequestId: 'c6e8147ead4eb3ad3dff',
  121. venId: 'D8:1D:4B:20:5A:65:4C:50:32:FA',
  122. pendingReports: [
  123. {
  124. reportRequestId: 'eec71ed4dfe1e52d65a5',
  125. },
  126. ],
  127. };
  128. const createdReportMax = {
  129. _type: 'oadrCreatedReport',
  130. responseCode: '200',
  131. responseDescription: 'OK',
  132. responseRequestId: 'c6e8147ead4eb3ad3dff',
  133. venId: 'D8:1D:4B:20:5A:65:4C:50:32:FA',
  134. pendingReports: [
  135. {
  136. reportRequestId: 'eec71ed4dfe1e52d65a5',
  137. },
  138. ],
  139. };
  140. const createdReportGenerated1 = {
  141. _type: 'oadrCreatedReport',
  142. responseCode: '200',
  143. responseDescription: 'OK',
  144. responseRequestId: 'c6e8147ead4eb3ad3dff',
  145. venId: 'D8:1D:4B:20:5A:65:4C:50:32:FA',
  146. pendingReports: [
  147. {
  148. reportRequestId: 'uuid0',
  149. },
  150. {
  151. reportRequestId: 'uuid1',
  152. },
  153. ],
  154. };
  155. const updateReportMin = {
  156. _type: 'oadrUpdateReport',
  157. reports: [],
  158. requestId: '87bbc1d44d903f317758',
  159. };
  160. const updateReportTelemetryStatus = {
  161. _type: 'oadrUpdateReport',
  162. reports: [
  163. {
  164. createdDateTime: '2020-05-13T10:56:11.058-06:00',
  165. duration: 'PT1M',
  166. intervals: [
  167. {
  168. duration: 'PT1M',
  169. reportPayloads: [
  170. {
  171. dataQuality: 'Quality Good - Non Specific',
  172. payloadStatus: {
  173. online: true,
  174. manualOverride: false,
  175. loadControlState: {
  176. oadrLevelOffset: {
  177. oadrNormal: 40,
  178. oadrCurrent: 50,
  179. },
  180. },
  181. },
  182. reportId: 'TelemetryStatusReport',
  183. },
  184. ],
  185. startDate: '2020-05-13T10:56:11.058-06:00',
  186. },
  187. ],
  188. reportName: 'TELEMETRY_STATUS',
  189. reportRequestId: 'uuid0',
  190. reportSpecifierId: 'TELEMETRY_STATUS',
  191. startDate: '2020-05-13T10:56:11.058-06:00',
  192. },
  193. ],
  194. requestId: 'uuid0',
  195. };
  196. const updateReportMax = {
  197. _type: 'oadrUpdateReport',
  198. reports: [
  199. {
  200. createdDateTime: '2020-05-08T21:27:49.591-06:00',
  201. duration: 'PT1M',
  202. intervals: [
  203. {
  204. duration: 'PT30S',
  205. reportPayloads: [
  206. {
  207. dataQuality: 'Quality Good - Non Specific',
  208. payloadFloat: 161.97970171999845,
  209. reportId: 'rep1',
  210. },
  211. ],
  212. startDate: '2020-05-08T21:26:49.562-06:00',
  213. },
  214. {
  215. duration: 'PT30S',
  216. reportPayloads: [
  217. {
  218. dataQuality: 'Quality Good - Non Specific',
  219. payloadFloat: 165.46849970752885,
  220. reportId: 'rep1',
  221. },
  222. ],
  223. startDate: '2020-05-08T21:27:19.594-06:00',
  224. },
  225. {
  226. duration: 'PT30S',
  227. reportPayloads: [
  228. {
  229. dataQuality: 'Quality Good - Non Specific',
  230. payloadFloat: 162.30118577122087,
  231. reportId: 'rep1',
  232. },
  233. ],
  234. startDate: '2020-05-08T21:27:49.591-06:00',
  235. },
  236. ],
  237. reportName: 'TELEMETRY_USAGE',
  238. reportRequestId: '87bbc1d44d903f317758',
  239. reportSpecifierId: 'TELEMETRY_USAGE',
  240. startDate: '2020-05-08T21:26:49.562-06:00',
  241. },
  242. ],
  243. requestId: '87bbc1d44d903f317758',
  244. };
  245. module.exports = {
  246. createdReportMin,
  247. createdReportMax,
  248. createdReportGenerated1,
  249. registerReportMin,
  250. registerReportMax,
  251. registerReportCa,
  252. updateReportMin,
  253. updateReportMax,
  254. updateReportTelemetryStatus,
  255. };