@studyportals/sp-lurch-interface 2.14.0 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/{index.ts → index.d.ts} +2 -24
  2. package/index.js +34 -0
  3. package/index.js.map +1 -0
  4. package/package.json +3 -3
  5. package/src/entities/organisation/i-organisation.interface.d.ts +5 -0
  6. package/src/entities/organisation/i-organisation.interface.js +3 -0
  7. package/src/entities/organisation/i-organisation.interface.js.map +1 -0
  8. package/src/entities/organisation/main-organisations-dto.d.ts +6 -0
  9. package/src/entities/organisation/main-organisations-dto.js +11 -0
  10. package/src/entities/organisation/main-organisations-dto.js.map +1 -0
  11. package/src/entities/organisation/organisation-dto.class.d.ts +7 -0
  12. package/src/entities/organisation/organisation-dto.class.js +12 -0
  13. package/src/entities/organisation/organisation-dto.class.js.map +1 -0
  14. package/src/entities/organisation/organisations-dto.d.ts +6 -0
  15. package/src/entities/organisation/organisations-dto.js +11 -0
  16. package/src/entities/organisation/organisations-dto.js.map +1 -0
  17. package/src/input-batches/input-batch-dto.class.d.ts +15 -0
  18. package/src/input-batches/input-batch-dto.class.js +20 -0
  19. package/src/input-batches/input-batch-dto.class.js.map +1 -0
  20. package/src/input-batches/input-batch-status.d.ts +5 -0
  21. package/src/input-batches/input-batch-status.js +10 -0
  22. package/src/input-batches/input-batch-status.js.map +1 -0
  23. package/src/input-batches/interfaces/i-input-batch.interface.d.ts +13 -0
  24. package/src/input-batches/interfaces/i-input-batch.interface.js +3 -0
  25. package/src/input-batches/interfaces/i-input-batch.interface.js.map +1 -0
  26. package/src/intakes/intake-dto.class.d.ts +14 -0
  27. package/src/intakes/intake-dto.class.js +18 -0
  28. package/src/intakes/intake-dto.class.js.map +1 -0
  29. package/src/intakes/intake-stage-type.d.ts +6 -0
  30. package/src/intakes/intake-stage-type.js +11 -0
  31. package/src/intakes/intake-stage-type.js.map +1 -0
  32. package/src/intakes/interfaces/i-intake.interface.d.ts +12 -0
  33. package/src/intakes/interfaces/i-intake.interface.js +3 -0
  34. package/src/intakes/interfaces/i-intake.interface.js.map +1 -0
  35. package/src/intakes/interfaces/i-match.interface.d.ts +4 -0
  36. package/src/intakes/interfaces/i-match.interface.js +3 -0
  37. package/src/intakes/interfaces/i-match.interface.js.map +1 -0
  38. package/src/intakes/match-dto.class.d.ts +6 -0
  39. package/src/intakes/match-dto.class.js +11 -0
  40. package/src/intakes/match-dto.class.js.map +1 -0
  41. package/src/lurch-client.d.ts +19 -0
  42. package/src/lurch-client.js +77 -0
  43. package/src/lurch-client.js.map +1 -0
  44. package/src/results/discard-input-batch-result.class.d.ts +6 -0
  45. package/src/results/discard-input-batch-result.class.js +17 -0
  46. package/src/results/discard-input-batch-result.class.js.map +1 -0
  47. package/src/results/microsite-student-profile-result.class.d.ts +8 -0
  48. package/src/results/microsite-student-profile-result.class.js +19 -0
  49. package/src/results/microsite-student-profile-result.class.js.map +1 -0
  50. package/src/results/retrieve-input-batch-result.class.d.ts +8 -0
  51. package/src/results/retrieve-input-batch-result.class.js +19 -0
  52. package/src/results/retrieve-input-batch-result.class.js.map +1 -0
  53. package/src/results/retrieve-input-batches-result.class.d.ts +8 -0
  54. package/src/results/retrieve-input-batches-result.class.js +19 -0
  55. package/src/results/retrieve-input-batches-result.class.js.map +1 -0
  56. package/src/results/retrieve-intake-result.class.d.ts +8 -0
  57. package/src/results/retrieve-intake-result.class.js +19 -0
  58. package/src/results/retrieve-intake-result.class.js.map +1 -0
  59. package/src/results/retrieve-intakes-result.class.d.ts +8 -0
  60. package/src/results/retrieve-intakes-result.class.js +19 -0
  61. package/src/results/retrieve-intakes-result.class.js.map +1 -0
  62. package/src/results/retrieve-main-organisations-result.class.d.ts +9 -0
  63. package/src/results/retrieve-main-organisations-result.class.js +21 -0
  64. package/src/results/retrieve-main-organisations-result.class.js.map +1 -0
  65. package/src/results/retrieve-organisations-result.class.d.ts +9 -0
  66. package/src/results/retrieve-organisations-result.class.js +21 -0
  67. package/src/results/retrieve-organisations-result.class.js.map +1 -0
  68. package/src/results/submit-matches-result.class.d.ts +6 -0
  69. package/src/results/submit-matches-result.class.js +17 -0
  70. package/src/results/submit-matches-result.class.js.map +1 -0
  71. package/src/student-profile/interfaces/I-microsite-student-profile.interface.d.ts +9 -0
  72. package/src/student-profile/interfaces/I-microsite-student-profile.interface.js +3 -0
  73. package/src/student-profile/interfaces/I-microsite-student-profile.interface.js.map +1 -0
  74. package/src/student-profile/interfaces/I-student-profile.interface.d.ts +9 -0
  75. package/src/student-profile/interfaces/I-student-profile.interface.js +3 -0
  76. package/src/student-profile/interfaces/I-student-profile.interface.js.map +1 -0
  77. package/tests-u/entities/organisations/organisation-dto.test.d.ts +1 -0
  78. package/tests-u/entities/organisations/organisation-dto.test.js +62 -0
  79. package/tests-u/entities/organisations/organisation-dto.test.js.map +1 -0
  80. package/tests-u/input-batches/input-batch-dto.test.d.ts +1 -0
  81. package/tests-u/input-batches/input-batch-dto.test.js +150 -0
  82. package/tests-u/input-batches/input-batch-dto.test.js.map +1 -0
  83. package/tests-u/input-batches/input-batch-status.test.d.ts +1 -0
  84. package/tests-u/input-batches/input-batch-status.test.js +47 -0
  85. package/tests-u/input-batches/input-batch-status.test.js.map +1 -0
  86. package/tests-u/intakes/intake-dto.test.d.ts +1 -0
  87. package/tests-u/intakes/intake-dto.test.js +128 -0
  88. package/tests-u/intakes/intake-dto.test.js.map +1 -0
  89. package/tests-u/intakes/intake-stage-type.test.d.ts +1 -0
  90. package/tests-u/intakes/intake-stage-type.test.js +56 -0
  91. package/tests-u/intakes/intake-stage-type.test.js.map +1 -0
  92. package/tests-u/intakes/match-dto.test.d.ts +1 -0
  93. package/tests-u/intakes/match-dto.test.js +51 -0
  94. package/tests-u/intakes/match-dto.test.js.map +1 -0
  95. package/tests-u/lurch-client.test.d.ts +1 -0
  96. package/tests-u/lurch-client.test.js +303 -0
  97. package/tests-u/lurch-client.test.js.map +1 -0
  98. package/tests-u/results/discard-input-batch-result.test.d.ts +1 -0
  99. package/tests-u/results/discard-input-batch-result.test.js +40 -0
  100. package/tests-u/results/discard-input-batch-result.test.js.map +1 -0
  101. package/tests-u/results/retrieve-input-batch-result.test.d.ts +1 -0
  102. package/tests-u/results/retrieve-input-batch-result.test.js +51 -0
  103. package/tests-u/results/retrieve-input-batch-result.test.js.map +1 -0
  104. package/tests-u/results/retrieve-input-batches-result.test.d.ts +1 -0
  105. package/tests-u/results/retrieve-input-batches-result.test.js +51 -0
  106. package/tests-u/results/retrieve-input-batches-result.test.js.map +1 -0
  107. package/tests-u/results/retrieve-intake-result.test.d.ts +1 -0
  108. package/tests-u/results/retrieve-intake-result.test.js +51 -0
  109. package/tests-u/results/retrieve-intake-result.test.js.map +1 -0
  110. package/tests-u/results/retrieve-intakes-result.test.d.ts +1 -0
  111. package/tests-u/results/retrieve-intakes-result.test.js +51 -0
  112. package/tests-u/results/retrieve-intakes-result.test.js.map +1 -0
  113. package/tests-u/results/retrieve-main-organisation-result.test.d.ts +1 -0
  114. package/tests-u/results/retrieve-main-organisation-result.test.js +53 -0
  115. package/tests-u/results/retrieve-main-organisation-result.test.js.map +1 -0
  116. package/tests-u/results/retrieve-organisation-result.test.d.ts +1 -0
  117. package/tests-u/results/retrieve-organisation-result.test.js +53 -0
  118. package/tests-u/results/retrieve-organisation-result.test.js.map +1 -0
  119. package/tests-u/results/submit-matches-result.test.d.ts +1 -0
  120. package/tests-u/results/submit-matches-result.test.js +31 -0
  121. package/tests-u/results/submit-matches-result.test.js.map +1 -0
  122. package/src/entities/organisation/i-organisation.interface.ts +0 -5
  123. package/src/entities/organisation/organisation-dto.class.ts +0 -11
  124. package/src/entities/organisation/organisations-dto.ts +0 -9
  125. package/src/input-batches/input-batch-dto.class.ts +0 -19
  126. package/src/input-batches/input-batch-status.ts +0 -5
  127. package/src/input-batches/interfaces/i-input-batch.interface.ts +0 -13
  128. package/src/intakes/intake-dto.class.ts +0 -18
  129. package/src/intakes/intake-stage-type.ts +0 -6
  130. package/src/intakes/interfaces/i-intake.interface.ts +0 -14
  131. package/src/intakes/interfaces/i-match.interface.ts +0 -4
  132. package/src/intakes/match-dto.class.ts +0 -10
  133. package/src/lurch-client.ts +0 -85
  134. package/src/results/discard-input-batch-result.class.ts +0 -21
  135. package/src/results/microsite-student-profile-result.class.ts +0 -25
  136. package/src/results/retrieve-input-batch-result.class.ts +0 -25
  137. package/src/results/retrieve-input-batches-result.class.ts +0 -25
  138. package/src/results/retrieve-intake-result.class.ts +0 -25
  139. package/src/results/retrieve-intakes-result.class.ts +0 -25
  140. package/src/results/retrieve-organisations-result.class.ts +0 -26
  141. package/src/results/submit-matches-result.class.ts +0 -18
  142. package/src/student-profile/interfaces/I-microsite-student-profile.interface.ts +0 -10
  143. package/tests-u/entities/organisations/organisation-dto.test.ts +0 -37
  144. package/tests-u/input-batches/input-batch-dto.test.ts +0 -102
  145. package/tests-u/input-batches/input-batch-status.test.ts +0 -21
  146. package/tests-u/intakes/intake-dto.test.ts +0 -86
  147. package/tests-u/intakes/intake-stage-type.test.ts +0 -26
  148. package/tests-u/intakes/match-dto.test.ts +0 -30
  149. package/tests-u/lurch-client.test.ts +0 -257
  150. package/tests-u/results/discard-input-batch-result.test.ts +0 -22
  151. package/tests-u/results/retrieve-input-batch-result.test.ts +0 -31
  152. package/tests-u/results/retrieve-input-batches-result.test.ts +0 -30
  153. package/tests-u/results/retrieve-intake-result.test.ts +0 -30
  154. package/tests-u/results/retrieve-intakes-result.test.ts +0 -30
  155. package/tests-u/results/retrieve-organisation-result.test.ts +0 -32
  156. package/tests-u/results/submit-matches-result.test.ts +0 -16
  157. package/tsconfig.json +0 -38
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const chai_1 = require("chai");
13
+ const mocha_typescript_1 = require("mocha-typescript");
14
+ const retrieve_input_batch_result_class_1 = require("../../src/results/retrieve-input-batch-result.class");
15
+ let RetrieveInputBatchResultTest = class RetrieveInputBatchResultTest {
16
+ constructor__TypeGuardInitialized() {
17
+ const testInstance = new retrieve_input_batch_result_class_1.RetrieveInputBatchResult(null);
18
+ chai_1.assert.isTrue(testInstance.__retrieve_input_batch_result__);
19
+ }
20
+ serialization__TypeGuardSerialized() {
21
+ const deserialization = JSON.parse(JSON.stringify(new retrieve_input_batch_result_class_1.RetrieveInputBatchResult(null)));
22
+ chai_1.assert.isTrue(deserialization.__retrieve_input_batch_result__);
23
+ }
24
+ serialization__InputBatchSerialized() {
25
+ const value = "SomeValue";
26
+ const deserialization = JSON.parse(JSON.stringify(new retrieve_input_batch_result_class_1.RetrieveInputBatchResult(value)));
27
+ chai_1.assert.equal(deserialization.inputBatch, value);
28
+ }
29
+ };
30
+ __decorate([
31
+ mocha_typescript_1.test,
32
+ __metadata("design:type", Function),
33
+ __metadata("design:paramtypes", []),
34
+ __metadata("design:returntype", void 0)
35
+ ], RetrieveInputBatchResultTest.prototype, "constructor__TypeGuardInitialized", null);
36
+ __decorate([
37
+ mocha_typescript_1.test,
38
+ __metadata("design:type", Function),
39
+ __metadata("design:paramtypes", []),
40
+ __metadata("design:returntype", void 0)
41
+ ], RetrieveInputBatchResultTest.prototype, "serialization__TypeGuardSerialized", null);
42
+ __decorate([
43
+ mocha_typescript_1.test,
44
+ __metadata("design:type", Function),
45
+ __metadata("design:paramtypes", []),
46
+ __metadata("design:returntype", void 0)
47
+ ], RetrieveInputBatchResultTest.prototype, "serialization__InputBatchSerialized", null);
48
+ RetrieveInputBatchResultTest = __decorate([
49
+ mocha_typescript_1.suite
50
+ ], RetrieveInputBatchResultTest);
51
+ //# sourceMappingURL=retrieve-input-batch-result.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retrieve-input-batch-result.test.js","sourceRoot":"","sources":["../../../tests-u/results/retrieve-input-batch-result.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+BAA8B;AAC9B,uDAA+C;AAE/C,2GAA+F;AAK/F,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAE1B,iCAAiC;QACvC,MAAM,YAAY,GAAG,IAAI,4DAAwB,CAAC,IAAW,CAAC,CAAC;QAE/D,aAAM,CAAC,MAAM,CAAC,YAAY,CAAC,+BAA+B,CAAC,CAAC;IAC7D,CAAC;IAGM,kCAAkC;QACxC,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,4DAAwB,CAAC,IAAW,CAAC,CAAC,CAAC,CAAC;QAE9F,aAAM,CAAC,MAAM,CAAC,eAAe,CAAC,+BAA+B,CAAC,CAAC;IAChE,CAAC;IAGM,mCAAmC;QACzC,MAAM,KAAK,GAAG,WAAkB,CAAC;QACjC,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,4DAAwB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAExF,aAAM,CAAC,KAAK,CAAC,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IACjD,CAAC;CACD,CAAA;AApBA;IADC,uBAAI;;;;qFAKJ;AAGD;IADC,uBAAI;;;;sFAKJ;AAGD;IADC,uBAAI;;;;uFAMJ;AArBI,4BAA4B;IADjC,wBAAK;GACA,4BAA4B,CAsBjC"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const chai_1 = require("chai");
13
+ const mocha_typescript_1 = require("mocha-typescript");
14
+ const retrieve_input_batches_result_class_1 = require("../../src/results/retrieve-input-batches-result.class");
15
+ let RetrieveInputBatchesResultTest = class RetrieveInputBatchesResultTest {
16
+ constructor__TypeGuardInitialized() {
17
+ const testInstance = new retrieve_input_batches_result_class_1.RetrieveInputBatchesResult([]);
18
+ chai_1.assert.isTrue(testInstance.__retrieve_input_batches_result__);
19
+ }
20
+ serialization__TypeGuardSerialized() {
21
+ const deserialization = JSON.parse(JSON.stringify(new retrieve_input_batches_result_class_1.RetrieveInputBatchesResult([])));
22
+ chai_1.assert.isTrue(deserialization.__retrieve_input_batches_result__);
23
+ }
24
+ serialization__InputBatchesSerialized() {
25
+ const value = "SomeValue";
26
+ const deserialization = JSON.parse(JSON.stringify(new retrieve_input_batches_result_class_1.RetrieveInputBatchesResult(value)));
27
+ chai_1.assert.equal(deserialization.inputBatches, value);
28
+ }
29
+ };
30
+ __decorate([
31
+ mocha_typescript_1.test,
32
+ __metadata("design:type", Function),
33
+ __metadata("design:paramtypes", []),
34
+ __metadata("design:returntype", void 0)
35
+ ], RetrieveInputBatchesResultTest.prototype, "constructor__TypeGuardInitialized", null);
36
+ __decorate([
37
+ mocha_typescript_1.test,
38
+ __metadata("design:type", Function),
39
+ __metadata("design:paramtypes", []),
40
+ __metadata("design:returntype", void 0)
41
+ ], RetrieveInputBatchesResultTest.prototype, "serialization__TypeGuardSerialized", null);
42
+ __decorate([
43
+ mocha_typescript_1.test,
44
+ __metadata("design:type", Function),
45
+ __metadata("design:paramtypes", []),
46
+ __metadata("design:returntype", void 0)
47
+ ], RetrieveInputBatchesResultTest.prototype, "serialization__InputBatchesSerialized", null);
48
+ RetrieveInputBatchesResultTest = __decorate([
49
+ mocha_typescript_1.suite
50
+ ], RetrieveInputBatchesResultTest);
51
+ //# sourceMappingURL=retrieve-input-batches-result.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retrieve-input-batches-result.test.js","sourceRoot":"","sources":["../../../tests-u/results/retrieve-input-batches-result.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+BAA8B;AAC9B,uDAA+C;AAE/C,+GAAmG;AAInG,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAE5B,iCAAiC;QACvC,MAAM,YAAY,GAAG,IAAI,gEAA0B,CAAC,EAAE,CAAC,CAAC;QAExD,aAAM,CAAC,MAAM,CAAC,YAAY,CAAC,iCAAiC,CAAC,CAAC;IAC/D,CAAC;IAGM,kCAAkC;QACxC,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,gEAA0B,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAEvF,aAAM,CAAC,MAAM,CAAC,eAAe,CAAC,iCAAiC,CAAC,CAAC;IAClE,CAAC;IAGM,qCAAqC;QAC3C,MAAM,KAAK,GAAG,WAAkB,CAAC;QACjC,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,gEAA0B,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAE1F,aAAM,CAAC,KAAK,CAAC,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IACnD,CAAC;CACD,CAAA;AApBA;IADC,uBAAI;;;;uFAKJ;AAGD;IADC,uBAAI;;;;wFAKJ;AAGD;IADC,uBAAI;;;;2FAMJ;AArBI,8BAA8B;IADnC,wBAAK;GACA,8BAA8B,CAsBnC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const chai_1 = require("chai");
13
+ const mocha_typescript_1 = require("mocha-typescript");
14
+ const retrieve_intake_result_class_1 = require("../../src/results/retrieve-intake-result.class");
15
+ let RetrieveIntakeResultTest = class RetrieveIntakeResultTest {
16
+ constructor__TypeGuardInitialized() {
17
+ const testInstance = new retrieve_intake_result_class_1.RetrieveIntakeResult(null);
18
+ chai_1.assert.isTrue(testInstance.__retrieve_intake_result__);
19
+ }
20
+ serialization__TypeGuardSerialized() {
21
+ const deserialization = JSON.parse(JSON.stringify(new retrieve_intake_result_class_1.RetrieveIntakeResult(null)));
22
+ chai_1.assert.isTrue(deserialization.__retrieve_intake_result__);
23
+ }
24
+ serialization__IntakeSerialized() {
25
+ const value = "SomeValue";
26
+ const deserialization = JSON.parse(JSON.stringify(new retrieve_intake_result_class_1.RetrieveIntakeResult(value)));
27
+ chai_1.assert.equal(deserialization.intake, value);
28
+ }
29
+ };
30
+ __decorate([
31
+ mocha_typescript_1.test,
32
+ __metadata("design:type", Function),
33
+ __metadata("design:paramtypes", []),
34
+ __metadata("design:returntype", void 0)
35
+ ], RetrieveIntakeResultTest.prototype, "constructor__TypeGuardInitialized", null);
36
+ __decorate([
37
+ mocha_typescript_1.test,
38
+ __metadata("design:type", Function),
39
+ __metadata("design:paramtypes", []),
40
+ __metadata("design:returntype", void 0)
41
+ ], RetrieveIntakeResultTest.prototype, "serialization__TypeGuardSerialized", null);
42
+ __decorate([
43
+ mocha_typescript_1.test,
44
+ __metadata("design:type", Function),
45
+ __metadata("design:paramtypes", []),
46
+ __metadata("design:returntype", void 0)
47
+ ], RetrieveIntakeResultTest.prototype, "serialization__IntakeSerialized", null);
48
+ RetrieveIntakeResultTest = __decorate([
49
+ mocha_typescript_1.suite
50
+ ], RetrieveIntakeResultTest);
51
+ //# sourceMappingURL=retrieve-intake-result.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retrieve-intake-result.test.js","sourceRoot":"","sources":["../../../tests-u/results/retrieve-intake-result.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+BAA8B;AAC9B,uDAA+C;AAE/C,iGAAsF;AAItF,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAEtB,iCAAiC;QACvC,MAAM,YAAY,GAAG,IAAI,mDAAoB,CAAC,IAAW,CAAC,CAAC;QAE3D,aAAM,CAAC,MAAM,CAAC,YAAY,CAAC,0BAA0B,CAAC,CAAC;IACxD,CAAC;IAGM,kCAAkC;QACxC,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,mDAAoB,CAAC,IAAW,CAAC,CAAC,CAAC,CAAC;QAE1F,aAAM,CAAC,MAAM,CAAC,eAAe,CAAC,0BAA0B,CAAC,CAAC;IAC3D,CAAC;IAGM,+BAA+B;QACrC,MAAM,KAAK,GAAG,WAAkB,CAAC;QACjC,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,mDAAoB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAEpF,aAAM,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC7C,CAAC;CACD,CAAA;AApBA;IADC,uBAAI;;;;iFAKJ;AAGD;IADC,uBAAI;;;;kFAKJ;AAGD;IADC,uBAAI;;;;+EAMJ;AArBI,wBAAwB;IAD7B,wBAAK;GACA,wBAAwB,CAsB7B"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const chai_1 = require("chai");
13
+ const mocha_typescript_1 = require("mocha-typescript");
14
+ const retrieve_intakes_result_class_1 = require("../../src/results/retrieve-intakes-result.class");
15
+ let RetrieveIntakesResultTest = class RetrieveIntakesResultTest {
16
+ constructor__TypeGuardInitialized() {
17
+ const testInstance = new retrieve_intakes_result_class_1.RetrieveIntakesResult([]);
18
+ chai_1.assert.isTrue(testInstance.__retrieve_intakes_result__);
19
+ }
20
+ serialization__TypeGuardSerialized() {
21
+ const deserialization = JSON.parse(JSON.stringify(new retrieve_intakes_result_class_1.RetrieveIntakesResult([])));
22
+ chai_1.assert.isTrue(deserialization.__retrieve_intakes_result__);
23
+ }
24
+ serialization__IntakesSerialized() {
25
+ const value = "SomeValue";
26
+ const deserialization = JSON.parse(JSON.stringify(new retrieve_intakes_result_class_1.RetrieveIntakesResult(value)));
27
+ chai_1.assert.equal(deserialization.intakes, value);
28
+ }
29
+ };
30
+ __decorate([
31
+ mocha_typescript_1.test,
32
+ __metadata("design:type", Function),
33
+ __metadata("design:paramtypes", []),
34
+ __metadata("design:returntype", void 0)
35
+ ], RetrieveIntakesResultTest.prototype, "constructor__TypeGuardInitialized", null);
36
+ __decorate([
37
+ mocha_typescript_1.test,
38
+ __metadata("design:type", Function),
39
+ __metadata("design:paramtypes", []),
40
+ __metadata("design:returntype", void 0)
41
+ ], RetrieveIntakesResultTest.prototype, "serialization__TypeGuardSerialized", null);
42
+ __decorate([
43
+ mocha_typescript_1.test,
44
+ __metadata("design:type", Function),
45
+ __metadata("design:paramtypes", []),
46
+ __metadata("design:returntype", void 0)
47
+ ], RetrieveIntakesResultTest.prototype, "serialization__IntakesSerialized", null);
48
+ RetrieveIntakesResultTest = __decorate([
49
+ mocha_typescript_1.suite
50
+ ], RetrieveIntakesResultTest);
51
+ //# sourceMappingURL=retrieve-intakes-result.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retrieve-intakes-result.test.js","sourceRoot":"","sources":["../../../tests-u/results/retrieve-intakes-result.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+BAA8B;AAC9B,uDAA+C;AAE/C,mGAAwF;AAIxF,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAEvB,iCAAiC;QACvC,MAAM,YAAY,GAAG,IAAI,qDAAqB,CAAC,EAAE,CAAC,CAAC;QAEnD,aAAM,CAAC,MAAM,CAAC,YAAY,CAAC,2BAA2B,CAAC,CAAC;IACzD,CAAC;IAGM,kCAAkC;QACxC,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,qDAAqB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAElF,aAAM,CAAC,MAAM,CAAC,eAAe,CAAC,2BAA2B,CAAC,CAAC;IAC5D,CAAC;IAGM,gCAAgC;QACtC,MAAM,KAAK,GAAG,WAAkB,CAAC;QACjC,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,qDAAqB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAErF,aAAM,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;CACD,CAAA;AApBA;IADC,uBAAI;;;;kFAKJ;AAGD;IADC,uBAAI;;;;mFAKJ;AAGD;IADC,uBAAI;;;;iFAMJ;AArBI,yBAAyB;IAD9B,wBAAK;GACA,yBAAyB,CAsB9B"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const chai_1 = require("chai");
13
+ const mocha_typescript_1 = require("mocha-typescript");
14
+ const retrieve_main_organisations_result_class_1 = require("../../src/results/retrieve-main-organisations-result.class");
15
+ let RetrieveMainOrganisationsResultTest = class RetrieveMainOrganisationsResultTest {
16
+ constructor__TypeGuardInitialized() {
17
+ const testInstance = new retrieve_main_organisations_result_class_1.RetrieveMainOrganisationsResult([], 0);
18
+ chai_1.assert.isTrue(testInstance.__retrieve_main_organisation_result__);
19
+ }
20
+ serialization__TypeGuardSerialized() {
21
+ const deserialization = JSON.parse(JSON.stringify(new retrieve_main_organisations_result_class_1.RetrieveMainOrganisationsResult([], 0)));
22
+ chai_1.assert.isTrue(deserialization.__retrieve_main_organisation_result__);
23
+ }
24
+ serialization__OrganisationsSerialized() {
25
+ const value = "SomeValue";
26
+ const userId = 1;
27
+ const deserialization = JSON.parse(JSON.stringify(new retrieve_main_organisations_result_class_1.RetrieveMainOrganisationsResult(value, userId)));
28
+ chai_1.assert.equal(deserialization.organisations, value);
29
+ chai_1.assert.equal(deserialization.userId, userId);
30
+ }
31
+ };
32
+ __decorate([
33
+ mocha_typescript_1.test,
34
+ __metadata("design:type", Function),
35
+ __metadata("design:paramtypes", []),
36
+ __metadata("design:returntype", void 0)
37
+ ], RetrieveMainOrganisationsResultTest.prototype, "constructor__TypeGuardInitialized", null);
38
+ __decorate([
39
+ mocha_typescript_1.test,
40
+ __metadata("design:type", Function),
41
+ __metadata("design:paramtypes", []),
42
+ __metadata("design:returntype", void 0)
43
+ ], RetrieveMainOrganisationsResultTest.prototype, "serialization__TypeGuardSerialized", null);
44
+ __decorate([
45
+ mocha_typescript_1.test,
46
+ __metadata("design:type", Function),
47
+ __metadata("design:paramtypes", []),
48
+ __metadata("design:returntype", void 0)
49
+ ], RetrieveMainOrganisationsResultTest.prototype, "serialization__OrganisationsSerialized", null);
50
+ RetrieveMainOrganisationsResultTest = __decorate([
51
+ mocha_typescript_1.suite
52
+ ], RetrieveMainOrganisationsResultTest);
53
+ //# sourceMappingURL=retrieve-main-organisation-result.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retrieve-main-organisation-result.test.js","sourceRoot":"","sources":["../../../tests-u/results/retrieve-main-organisation-result.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+BAA8B;AAC9B,uDAA+C;AAE/C,yHAA6G;AAI7G,IAAM,mCAAmC,GAAzC,MAAM,mCAAmC;IAEjC,iCAAiC;QACvC,MAAM,YAAY,GAAG,IAAI,0EAA+B,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAEhE,aAAM,CAAC,MAAM,CAAC,YAAY,CAAC,qCAAqC,CAAC,CAAC;IACnE,CAAC;IAGM,kCAAkC;QACxC,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,0EAA+B,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAE/F,aAAM,CAAC,MAAM,CAAC,eAAe,CAAC,qCAAqC,CAAC,CAAC;IACtE,CAAC;IAGM,sCAAsC;QAC5C,MAAM,KAAK,GAAG,WAAkB,CAAC;QACjC,MAAM,MAAM,GAAG,CAAC,CAAC;QACjB,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,0EAA+B,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;QAEvG,aAAM,CAAC,KAAK,CAAC,eAAe,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QACnD,aAAM,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;CACD,CAAA;AAtBA;IADC,uBAAI;;;;4FAKJ;AAGD;IADC,uBAAI;;;;6FAKJ;AAGD;IADC,uBAAI;;;;iGAQJ;AAvBI,mCAAmC;IADxC,wBAAK;GACA,mCAAmC,CAwBxC"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const chai_1 = require("chai");
13
+ const mocha_typescript_1 = require("mocha-typescript");
14
+ const retrieve_organisations_result_class_1 = require("../../src/results/retrieve-organisations-result.class");
15
+ let RetrieveOrganisationsResultTest = class RetrieveOrganisationsResultTest {
16
+ constructor__TypeGuardInitialized() {
17
+ const testInstance = new retrieve_organisations_result_class_1.RetrieveOrganisationsResult([], 0);
18
+ chai_1.assert.isTrue(testInstance.__retrieve_organisation_result__);
19
+ }
20
+ serialization__TypeGuardSerialized() {
21
+ const deserialization = JSON.parse(JSON.stringify(new retrieve_organisations_result_class_1.RetrieveOrganisationsResult([], 0)));
22
+ chai_1.assert.isTrue(deserialization.__retrieve_organisation_result__);
23
+ }
24
+ serialization__OrganisationsSerialized() {
25
+ const value = "SomeValue";
26
+ const userId = 1;
27
+ const deserialization = JSON.parse(JSON.stringify(new retrieve_organisations_result_class_1.RetrieveOrganisationsResult(value, userId)));
28
+ chai_1.assert.equal(deserialization.organisations, value);
29
+ chai_1.assert.equal(deserialization.userId, userId);
30
+ }
31
+ };
32
+ __decorate([
33
+ mocha_typescript_1.test,
34
+ __metadata("design:type", Function),
35
+ __metadata("design:paramtypes", []),
36
+ __metadata("design:returntype", void 0)
37
+ ], RetrieveOrganisationsResultTest.prototype, "constructor__TypeGuardInitialized", null);
38
+ __decorate([
39
+ mocha_typescript_1.test,
40
+ __metadata("design:type", Function),
41
+ __metadata("design:paramtypes", []),
42
+ __metadata("design:returntype", void 0)
43
+ ], RetrieveOrganisationsResultTest.prototype, "serialization__TypeGuardSerialized", null);
44
+ __decorate([
45
+ mocha_typescript_1.test,
46
+ __metadata("design:type", Function),
47
+ __metadata("design:paramtypes", []),
48
+ __metadata("design:returntype", void 0)
49
+ ], RetrieveOrganisationsResultTest.prototype, "serialization__OrganisationsSerialized", null);
50
+ RetrieveOrganisationsResultTest = __decorate([
51
+ mocha_typescript_1.suite
52
+ ], RetrieveOrganisationsResultTest);
53
+ //# sourceMappingURL=retrieve-organisation-result.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retrieve-organisation-result.test.js","sourceRoot":"","sources":["../../../tests-u/results/retrieve-organisation-result.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+BAA8B;AAC9B,uDAA+C;AAE/C,+GAAoG;AAIpG,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAE7B,iCAAiC;QACvC,MAAM,YAAY,GAAG,IAAI,iEAA2B,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAE5D,aAAM,CAAC,MAAM,CAAC,YAAY,CAAC,gCAAgC,CAAC,CAAC;IAC9D,CAAC;IAGM,kCAAkC;QACxC,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,iEAA2B,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAE3F,aAAM,CAAC,MAAM,CAAC,eAAe,CAAC,gCAAgC,CAAC,CAAC;IACjE,CAAC;IAGM,sCAAsC;QAC5C,MAAM,KAAK,GAAG,WAAkB,CAAC;QACjC,MAAM,MAAM,GAAG,CAAC,CAAC;QACjB,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,iEAA2B,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;QAEnG,aAAM,CAAC,KAAK,CAAC,eAAe,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QACnD,aAAM,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;CACD,CAAA;AAtBA;IADC,uBAAI;;;;wFAKJ;AAGD;IADC,uBAAI;;;;yFAKJ;AAGD;IADC,uBAAI;;;;6FAQJ;AAvBI,+BAA+B;IADpC,wBAAK;GACA,+BAA+B,CAwBpC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const chai_1 = require("chai");
13
+ const mocha_typescript_1 = require("mocha-typescript");
14
+ const submit_matches_result_class_1 = require("../../src/results/submit-matches-result.class");
15
+ let SubmitMatchesResultTest = class SubmitMatchesResultTest {
16
+ serialization__ConfirmedMatchesCountSerialized() {
17
+ const value = "SomeValue";
18
+ const deserialization = JSON.parse(JSON.stringify(new submit_matches_result_class_1.SubmitMatchesResult(value)));
19
+ chai_1.assert.equal(deserialization.confirmedMatchesCount, value);
20
+ }
21
+ };
22
+ __decorate([
23
+ mocha_typescript_1.test,
24
+ __metadata("design:type", Function),
25
+ __metadata("design:paramtypes", []),
26
+ __metadata("design:returntype", void 0)
27
+ ], SubmitMatchesResultTest.prototype, "serialization__ConfirmedMatchesCountSerialized", null);
28
+ SubmitMatchesResultTest = __decorate([
29
+ mocha_typescript_1.suite
30
+ ], SubmitMatchesResultTest);
31
+ //# sourceMappingURL=submit-matches-result.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"submit-matches-result.test.js","sourceRoot":"","sources":["../../../tests-u/results/submit-matches-result.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+BAA8B;AAC9B,uDAA+C;AAE/C,+FAAoF;AAIpF,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAErB,8CAA8C;QACpD,MAAM,KAAK,GAAG,WAAkB,CAAC;QACjC,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,iDAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAEnF,aAAM,CAAC,KAAK,CAAC,eAAe,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC;IAC5D,CAAC;CACD,CAAA;AANA;IADC,uBAAI;;;;6FAMJ;AAPI,uBAAuB;IAD5B,wBAAK;GACA,uBAAuB,CAQ5B"}
@@ -1,5 +0,0 @@
1
- export interface IOrganisation {
2
- readonly __i_organisation__: true;
3
- readonly identity: string;
4
- readonly name: string;
5
- }
@@ -1,11 +0,0 @@
1
- import { IOrganisation } from "./i-organisation.interface";
2
-
3
-
4
- export class OrganisationDto implements IOrganisation {
5
- public readonly __i_organisation__: true = true;
6
-
7
- public constructor(
8
- public readonly identity: string,
9
- public readonly name: string,
10
- ) { }
11
- }
@@ -1,9 +0,0 @@
1
- import { IOrganisation } from "./i-organisation.interface";
2
-
3
-
4
- export class OrganisationsDto {
5
- public constructor(
6
- public readonly userId: number,
7
- public readonly organisations: IOrganisation[],
8
- ) { }
9
- }
@@ -1,19 +0,0 @@
1
- import { IInputBatch } from "./interfaces/i-input-batch.interface";
2
-
3
-
4
- export class InputBatchDto implements IInputBatch {
5
- public readonly __i_input_batch__: true = true;
6
-
7
- public constructor(
8
- public readonly identity: string,
9
- public readonly creationTimeIso: string,
10
- public readonly status: number,
11
- public readonly organisationIdentity: string,
12
- public readonly intakeMonth: number,
13
- public readonly intakeYear: number,
14
- public readonly targetIntakeStageType: number,
15
- public readonly inputSize: number,
16
- public readonly matchesCount: number,
17
- public readonly representativeIdentity: string
18
- ) { }
19
- }
@@ -1,5 +0,0 @@
1
- export enum InputBatchStatus {
2
- SUBMITTED = 0,
3
- APPROVED = 1,
4
- DISCARDED = 2,
5
- }
@@ -1,13 +0,0 @@
1
- export interface IInputBatch {
2
- readonly __i_input_batch__: true;
3
- readonly identity: string;
4
- readonly creationTimeIso: string;
5
- readonly status: number;
6
- readonly organisationIdentity: string;
7
- readonly intakeMonth: number;
8
- readonly intakeYear: number;
9
- readonly targetIntakeStageType: number;
10
- readonly inputSize: number;
11
- readonly matchesCount: number;
12
- readonly representativeIdentity: string;
13
- }
@@ -1,18 +0,0 @@
1
- import { IIntake } from "./interfaces/i-intake.interface";
2
- import { IMatch } from "./interfaces/i-match.interface";
3
-
4
-
5
- export class IntakeDto implements IIntake {
6
- public readonly __i_intake__: true = true;
7
-
8
- public constructor(
9
- public readonly identity: string,
10
- public readonly organisationId: string,
11
- public readonly intakeMonth: number,
12
- public readonly intakeYear: number,
13
- public readonly applications: IMatch[],
14
- public readonly accepted: IMatch[],
15
- public readonly enrolments: IMatch[],
16
- public readonly leads: IMatch[]
17
- ) { }
18
- }
@@ -1,6 +0,0 @@
1
- export enum IntakeStageType {
2
- APPLICATION = 0,
3
- ACCEPTED = 1,
4
- ENROLMENT = 2,
5
- LEAD = 3
6
- }
@@ -1,14 +0,0 @@
1
- import { IMatch } from "./i-match.interface";
2
-
3
-
4
- export interface IIntake {
5
- readonly __i_intake__: true;
6
- readonly identity: string;
7
- readonly organisationId: string;
8
- readonly intakeMonth: number;
9
- readonly intakeYear: number;
10
- readonly applications: IMatch[];
11
- readonly accepted: IMatch[];
12
- readonly enrolments: IMatch[];
13
- readonly leads: IMatch[];
14
- }
@@ -1,4 +0,0 @@
1
- export interface IMatch {
2
- readonly __i_match__: true;
3
- readonly studentId: string;
4
- }
@@ -1,10 +0,0 @@
1
- import { IMatch } from "./interfaces/i-match.interface";
2
-
3
-
4
- export class MatchDto implements IMatch {
5
- public readonly __i_match__: true = true;
6
-
7
- public constructor(
8
- public readonly studentId: string
9
- ) { }
10
- }
@@ -1,85 +0,0 @@
1
- import { SuperAgentRequest } from "superagent";
2
-
3
- import { IRequestSender, ISuperAgentRequestFactory } from "@studyportals/mb-platform-http-requests";
4
-
5
- import { IInputBatch } from "./input-batches/interfaces/i-input-batch.interface";
6
- import { RetrieveInputBatchesResult } from "./results/retrieve-input-batches-result.class";
7
- import { IntakeStageType } from "./intakes/intake-stage-type";
8
- import { SubmitMatchesResult } from "./results/submit-matches-result.class";
9
- import { RetrieveOrganisationsResult } from "./results/retrieve-organisations-result.class";
10
- import { OrganisationsDto } from "./entities/organisation/organisations-dto";
11
-
12
-
13
- export class LurchClient {
14
- private _baseUrl: string;
15
-
16
- protected get baseUrl(): string {
17
- return this._baseUrl;
18
- }
19
-
20
- public constructor(
21
- private superAgentRequestFactory: ISuperAgentRequestFactory,
22
- private requestSender: IRequestSender,
23
- baseUrl: string = ''
24
- ) {
25
- this._baseUrl = baseUrl;
26
- }
27
-
28
- public async retrieveAllInputBatches(): Promise<IInputBatch[]> {
29
- const request = this.createGetRequest('/input-batches');
30
- const result = await this.requestSender.sendAndExtractBody<RetrieveInputBatchesResult>(request);
31
-
32
- return result.inputBatches;
33
- }
34
-
35
- public async approveInputBatch(inputBatchIdentity: string): Promise<void> {
36
- const request = this.createPostRequest('/input-batch/approve');
37
- request.send({ inputBatchIdentity });
38
-
39
- await this.requestSender.send(request);
40
- }
41
-
42
- public async discardInputBatch(inputBatchIdentity: string): Promise<void> {
43
- const request = this.createPostRequest('/input-batch/discard');
44
- request.send({ inputBatchIdentity });
45
-
46
- await this.requestSender.send(request);
47
- }
48
-
49
- public async submitEnrollments(organisationId: string, representativeId: string, intakeStage: IntakeStageType, intakeMonth: number, intakeYear: number, inputs: string ): Promise<number> {
50
- const request = this.createPostRequest('submit-enrollments');
51
-
52
- request.send({
53
- organisationId,
54
- representativeId,
55
- intakeStage,
56
- intakeMonth,
57
- intakeYear,
58
- inputs
59
- });
60
-
61
- const result = await this.requestSender.sendAndExtractBody<SubmitMatchesResult>(request);
62
-
63
- return result.confirmedMatchesCount;
64
- }
65
-
66
- public async retrieveOrganisationsFromUser(): Promise<OrganisationsDto> {
67
- const request = this.createGetRequest('/organisations-for-user');
68
- const result = await this.requestSender.sendAndExtractBody<RetrieveOrganisationsResult>(request);
69
-
70
- return new OrganisationsDto(result.userId, result.organisations);
71
- }
72
-
73
-
74
- private createGetRequest(relative: string = ''): SuperAgentRequest {
75
- return this.superAgentRequestFactory.get(this.buildUrl(relative));
76
- }
77
-
78
- private createPostRequest(relative: string = ''): SuperAgentRequest {
79
- return this.superAgentRequestFactory.post(this.buildUrl(relative));
80
- }
81
-
82
- private buildUrl(relative: string): string {
83
- return `${this.baseUrl}${relative}`;
84
- }
85
- }
@@ -1,21 +0,0 @@
1
- import { SuccessResult } from "@studyportals/sp-r2d2-interface";
2
-
3
-
4
- export class DiscardInputBatchresult extends SuccessResult {
5
- public readonly __discard_input_batch_result__: true = true;
6
-
7
-
8
- public constructor(
9
- ) {
10
- super();
11
- }
12
-
13
-
14
- protected toJSON(): object {
15
- const obj: any = super.toJSON();
16
-
17
- obj["__discard_input_batch_result__"] = this.__discard_input_batch_result__;
18
-
19
- return obj;
20
- }
21
- }