@studyportals/sp-lurch-interface 2.14.1 → 3.0.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.
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@studyportals/sp-lurch-interface",
3
- "version": "2.14.1",
3
+ "version": "3.0.0",
4
4
  "description": "Contains Data Transfer Objects required or provided by Lurch through its interface.",
5
5
  "scripts": {
6
6
  "test": "tsc && npm run test-u-o && nyc report --reporter=text",
7
7
  "test-u": "tsc && npm run test-u-o",
8
8
  "test-u-o": "npx --all --silent mocha \"bin/tests-u/**/*.test.js\"",
9
9
  "prepare-deployment": "cp package.json bin/package.json",
10
- "deploy": "npm test && npm run prepare-deployment && npm publish bin",
10
+ "deploy": "npm test && npm run prepare-deployment && npm publish bin --otp=946866",
11
11
  "lint": "tslint 'src/**/*.ts'",
12
12
  "lint-fix": "tslint --fix 'src/**/*.ts'",
13
13
  "coverage": "nyc report --reporter=lcov",
@@ -32,7 +32,7 @@
32
32
  "dependencies": {
33
33
  "@studyportals/mb-platform-http-requests": "^1.0.4",
34
34
  "@studyportals/sp-r2d2-interface": "^2.0.0",
35
- "@studyportals/sp-thing-interface": "^1.1.1",
35
+ "@studyportals/sp-thing-interface": "^1.4.0",
36
36
  "superagent": "^3.8.3"
37
37
  }
38
38
  }
@@ -0,0 +1,6 @@
1
+ import { IOrganisation } from "./i-organisation.interface";
2
+ export declare class MainOrganisationsDto {
3
+ readonly userId: number;
4
+ readonly organisations: IOrganisation[];
5
+ constructor(userId: number, organisations: IOrganisation[]);
6
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MainOrganisationsDto = void 0;
4
+ class MainOrganisationsDto {
5
+ constructor(userId, organisations) {
6
+ this.userId = userId;
7
+ this.organisations = organisations;
8
+ }
9
+ }
10
+ exports.MainOrganisationsDto = MainOrganisationsDto;
11
+ //# sourceMappingURL=main-organisations-dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main-organisations-dto.js","sourceRoot":"","sources":["../../../../src/entities/organisation/main-organisations-dto.ts"],"names":[],"mappings":";;;AAGA,MAAa,oBAAoB;IAChC,YACiB,MAAc,EACd,aAA8B;QAD9B,WAAM,GAAN,MAAM,CAAQ;QACd,kBAAa,GAAb,aAAa,CAAiB;IAC3C,CAAC;CACL;AALD,oDAKC"}
@@ -43,7 +43,7 @@ class LurchClient {
43
43
  }
44
44
  submitEnrollments(organisationId, representativeId, intakeStage, intakeMonth, intakeYear, inputs) {
45
45
  return __awaiter(this, void 0, void 0, function* () {
46
- const request = this.createPostRequest('submit-enrollments');
46
+ const request = this.createPostRequest('/submit-enrollments');
47
47
  request.send({
48
48
  organisationId,
49
49
  representativeId,
@@ -1 +1 @@
1
- {"version":3,"file":"lurch-client.js","sourceRoot":"","sources":["../../src/lurch-client.ts"],"names":[],"mappings":";;;;;;;;;;;;AASA,iFAA6E;AAG7E,MAAa,WAAW;IAOvB,YACS,wBAAmD,EACnD,aAA6B,EACrC,UAAkB,EAAE;QAFZ,6BAAwB,GAAxB,wBAAwB,CAA2B;QACnD,kBAAa,GAAb,aAAa,CAAgB;QAGrC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IACzB,CAAC;IAVD,IAAc,OAAO;QACpB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IAUY,uBAAuB;;YACnC,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;YACxD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAA6B,OAAO,CAAC,CAAC;YAEhG,OAAO,MAAM,CAAC,YAAY,CAAC;QAC5B,CAAC;KAAA;IAEY,iBAAiB,CAAC,kBAA0B;;YACxD,MAAM,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,CAAC;YAC/D,OAAO,CAA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,EAAE,CAAC;IACrC,CAAC;CACD;AAxED,kCAwEC"}
@@ -0,0 +1,9 @@
1
+ import { SuccessResult } from "@studyportals/sp-r2d2-interface";
2
+ import { IOrganisation } from "../entities/organisation/i-organisation.interface";
3
+ export declare class RetrieveMainOrganisationsResult extends SuccessResult {
4
+ readonly organisations: IOrganisation[];
5
+ readonly userId: number;
6
+ readonly __retrieve_main_organisation_result__: true;
7
+ constructor(organisations: IOrganisation[], userId: number);
8
+ protected toJSON(): object;
9
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RetrieveMainOrganisationsResult = void 0;
4
+ const sp_r2d2_interface_1 = require("@studyportals/sp-r2d2-interface");
5
+ class RetrieveMainOrganisationsResult extends sp_r2d2_interface_1.SuccessResult {
6
+ constructor(organisations, userId) {
7
+ super();
8
+ this.organisations = organisations;
9
+ this.userId = userId;
10
+ this.__retrieve_main_organisation_result__ = true;
11
+ }
12
+ toJSON() {
13
+ const obj = super.toJSON();
14
+ obj["__retrieve_main_organisation_result__"] = this.__retrieve_main_organisation_result__;
15
+ obj["organisations"] = this.organisations;
16
+ obj["userId"] = this.userId;
17
+ return obj;
18
+ }
19
+ }
20
+ exports.RetrieveMainOrganisationsResult = RetrieveMainOrganisationsResult;
21
+ //# sourceMappingURL=retrieve-main-organisations-result.class.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retrieve-main-organisations-result.class.js","sourceRoot":"","sources":["../../../src/results/retrieve-main-organisations-result.class.ts"],"names":[],"mappings":";;;AAAA,uEAAgE;AAIhE,MAAa,+BAAgC,SAAQ,iCAAa;IAIjE,YACiB,aAA8B,EAC9B,MAAc;QAE9B,KAAK,EAAE,CAAC;QAHQ,kBAAa,GAAb,aAAa,CAAiB;QAC9B,WAAM,GAAN,MAAM,CAAQ;QALf,0CAAqC,GAAS,IAAI,CAAC;IAQnE,CAAC;IAGS,MAAM;QACf,MAAM,GAAG,GAAQ,KAAK,CAAC,MAAM,EAAE,CAAC;QAEhC,GAAG,CAAC,uCAAuC,CAAC,GAAG,IAAI,CAAC,qCAAqC,CAAC;QAC1F,GAAG,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC;QAC1C,GAAG,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAE5B,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AArBD,0EAqBC"}
@@ -0,0 +1,9 @@
1
+ export interface IStudentProfile {
2
+ readonly identity: string;
3
+ readonly email: string;
4
+ readonly dateCreated: string;
5
+ readonly firstName: string;
6
+ readonly lastName: string;
7
+ readonly nationality: string;
8
+ readonly organisationId: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=I-student-profile.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"I-student-profile.interface.js","sourceRoot":"","sources":["../../../../src/student-profile/interfaces/I-student-profile.interface.ts"],"names":[],"mappings":""}
@@ -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"}