js-responses.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. 'use strict';
  2. const registeredReportMin = {
  3. _type: 'oadrRegisteredReport',
  4. responseCode: '200',
  5. responseRequestId: '31c5ce71a68a73ece370',
  6. };
  7. const registeredReportMax = {
  8. _type: 'oadrRegisteredReport',
  9. responseCode: '200',
  10. responseDescription: 'OK',
  11. responseRequestId: '31c5ce71a68a73ece370',
  12. requests: [
  13. {
  14. reportRequestId: '87bbc1d44d903f317758',
  15. reportSpecifierId: 'TELEMETRY_USAGE',
  16. granularityDuration: 'PT30S',
  17. reportBackDuration: 'PT1M',
  18. startDate: '2020-05-09T03:24:48.000Z',
  19. duration: 'PT24H',
  20. specifiers: [
  21. {
  22. reportId: 'rep1',
  23. readingType: 'x-notApplicable',
  24. },
  25. {
  26. reportId: 'rep2',
  27. readingType: 'x-notApplicable',
  28. },
  29. ],
  30. },
  31. {
  32. reportRequestId: '3d92d98e0b65d94e60a7',
  33. reportSpecifierId: 'TELEMETRY_STATUS',
  34. granularityDuration: 'PT30S',
  35. reportBackDuration: 'PT2M',
  36. startDate: '2020-05-09T03:25:44.000Z',
  37. duration: 'PT24H',
  38. specifiers: [
  39. {
  40. reportId: 'TelemetryStatusReport',
  41. readingType: 'x-notApplicable',
  42. },
  43. ],
  44. },
  45. ],
  46. };
  47. const createReportMin = {
  48. _type: 'oadrCreateReport',
  49. requests: [],
  50. requestId: '4323',
  51. };
  52. const createReportMax = {
  53. _type: 'oadrCreateReport',
  54. requestId: '31c5ce71a68a73ece370',
  55. requests: [
  56. {
  57. reportRequestId: '87bbc1d44d903f317758',
  58. reportSpecifierId: 'TELEMETRY_USAGE',
  59. granularityDuration: 'PT30S',
  60. reportBackDuration: 'PT1M',
  61. startDate: '2020-05-09T03:24:48.000Z',
  62. duration: 'PT24H',
  63. specifiers: [
  64. {
  65. reportId: 'rep1',
  66. readingType: 'x-notApplicable',
  67. },
  68. {
  69. reportId: 'rep2',
  70. readingType: 'x-notApplicable',
  71. },
  72. ],
  73. },
  74. {
  75. reportRequestId: '3d92d98e0b65d94e60a7',
  76. reportSpecifierId: 'TELEMETRY_STATUS',
  77. granularityDuration: 'PT30S',
  78. reportBackDuration: 'PT2M',
  79. startDate: '2020-05-09T03:25:44.000Z',
  80. duration: 'PT24H',
  81. specifiers: [
  82. {
  83. reportId: 'TelemetryStatusReport',
  84. readingType: 'x-notApplicable',
  85. },
  86. ],
  87. },
  88. ],
  89. };
  90. const createReportGenerated1 = {
  91. _type: 'oadrCreateReport',
  92. requestId: 'uuid2',
  93. requests: [
  94. {
  95. reportRequestId: 'uuid0',
  96. reportSpecifierId: 'TELEMETRY_STATUS',
  97. granularityDuration: 'PT60S',
  98. reportBackDuration: 'PT60S',
  99. startDate: '2020-04-26T01:00:00.000Z',
  100. duration: 'PT3600S',
  101. specifiers: [
  102. {
  103. reportId: 'TelemetryStatusReport',
  104. readingType: 'x-notApplicable',
  105. },
  106. ],
  107. },
  108. {
  109. reportRequestId: 'uuid1',
  110. reportSpecifierId: 'TELEMETRY_USAGE',
  111. granularityDuration: 'PT60S',
  112. reportBackDuration: 'PT60S',
  113. startDate: '2020-04-26T01:00:00.000Z',
  114. duration: 'PT3600S',
  115. specifiers: [
  116. {
  117. reportId: 'rep1',
  118. readingType: 'x-notApplicable',
  119. },
  120. {
  121. reportId: 'rep2',
  122. readingType: 'x-notApplicable',
  123. },
  124. ],
  125. },
  126. ],
  127. };
  128. const createReportGenerated2 = {
  129. _type: 'oadrCreateReport',
  130. requestId: 'uuid2',
  131. requests: [
  132. {
  133. reportRequestId: 'uuid0',
  134. reportSpecifierId: 'TELEMETRY_STATUS',
  135. granularityDuration: 'PT60S',
  136. reportBackDuration: 'PT60S',
  137. startDate: '2020-04-26T01:01:30.000Z',
  138. duration: 'PT3600S',
  139. specifiers: [
  140. {
  141. reportId: 'TelemetryStatusReport',
  142. readingType: 'x-notApplicable',
  143. },
  144. ],
  145. },
  146. {
  147. reportRequestId: 'uuid1',
  148. reportSpecifierId: 'TELEMETRY_USAGE',
  149. granularityDuration: 'PT60S',
  150. reportBackDuration: 'PT60S',
  151. startDate: '2020-04-26T01:01:30.000Z',
  152. duration: 'PT3600S',
  153. specifiers: [
  154. {
  155. reportId: 'rep1',
  156. readingType: 'x-notApplicable',
  157. },
  158. {
  159. reportId: 'rep2',
  160. readingType: 'x-notApplicable',
  161. },
  162. ],
  163. },
  164. ],
  165. };
  166. const updatedReportMin = {
  167. _type: 'oadrUpdatedReport',
  168. responseCode: '200',
  169. responseRequestId: '4323',
  170. };
  171. const updatedReportMax = {
  172. _type: 'oadrUpdatedReport',
  173. responseCode: '200',
  174. responseDescription: 'OK',
  175. responseRequestId: '4323',
  176. venId: 'D8:1D:4B:20:5A:65:4C:50:32:FA',
  177. };
  178. module.exports = {
  179. createReportMax,
  180. createReportMin,
  181. createReportGenerated1,
  182. createReportGenerated2,
  183. registeredReportMax,
  184. registeredReportMin,
  185. updatedReportMin,
  186. updatedReportMax,
  187. };