@studyportals/domain-client 3.6.0 → 3.6.1-beta.2

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/index.d.ts CHANGED
@@ -31,9 +31,13 @@ import { IDotDigitalProgramme } from "./src/models/dotdigital-programme/i-dot-di
31
31
  import { DotdigitalProgrammeClient } from "./src/models/dotdigital-programme/dotdigital-programme-client";
32
32
  import { ISearchCountryFaq } from "./src/models/search-country-faq/i-search-country-faq";
33
33
  import { PublicSearchCountryFaqClient } from "./src/models/search-country-faq/public-search-country-faq-client";
34
+ import { ISearchDiscipline } from "./src/models/search-discipline/i-search-discipline";
35
+ import { PublicSearchDisciplineClient } from "./src/models/search-discipline/public-search-discipline-client";
34
36
  import { IReview } from "./src/models/dotdigital-organisation/i-review";
35
37
  import { IDotDigitalOrganisation } from "./src/models/dotdigital-organisation/i-dot-digital-organisation";
36
38
  import { DotdigitalOrganisationClient } from "./src/models/dotdigital-organisation/dotdigital-organisation-client";
39
+ import { ISitemapRankingsInfo } from "./src/models/sitemap-rankings-info/i-sitemap-rankings-info";
40
+ import { SitemapRankingsInfoClient } from "./src/models/sitemap-rankings-info/sitemap-rankings-info-client";
37
41
  import { IInternalLink } from "./src/models/common/i-internal-link";
38
42
  import { ILogo } from "./src/models/common/i-logo";
39
43
  import { ITuitionFee } from "./src/models/common/i-tuition-fee";
@@ -42,4 +46,5 @@ import { ICity } from "./src/models/common/i-city";
42
46
  import { ICountry } from "./src/models/common/i-country";
43
47
  import { PortalType } from "./src/types/portal-type";
44
48
  import { PortalMap } from "./src/types/portal-map";
45
- export { BadRequestException, ClientException, InternalServerException, NotFoundException, PropertyNotAvailableException, IInternalLink, ILogo, ITuitionFee, IEnglishRequirements, ICity, ICountry, ICover, ILink, IOptionalLink, ILocation, IClickTrackingData, ITracking, IDuration, IDeadline, IStartDate, ITiming, ITrackedLink, IProgrammeCard, ProgrammeCardClient, ITuitionValues, IPremiumValues, IOrganisationValues, IGeoTargetingConfiguration, IGeoTargetingValues, ISearchProjection, SearchProjectionClient, ILivingCost, IGPARequirement, IBestFitProgramme, BestfitProgrammeClient, IDotDigitalProgramme, DotdigitalProgrammeClient, ISearchCountryFaq, PublicSearchCountryFaqClient, IReview, IDotDigitalOrganisation, DotdigitalOrganisationClient, PortalMap, PortalType };
49
+ import { ModelClient } from "./src/model-client";
50
+ export { BadRequestException, ClientException, InternalServerException, NotFoundException, PropertyNotAvailableException, IInternalLink, ILogo, ITuitionFee, IEnglishRequirements, ICity, ICountry, ICover, ILink, IOptionalLink, ILocation, IClickTrackingData, ITracking, IDuration, IDeadline, IStartDate, ITiming, ITrackedLink, IProgrammeCard, ProgrammeCardClient, ITuitionValues, IPremiumValues, IOrganisationValues, IGeoTargetingConfiguration, IGeoTargetingValues, ISearchProjection, SearchProjectionClient, ILivingCost, IGPARequirement, IBestFitProgramme, BestfitProgrammeClient, IDotDigitalProgramme, DotdigitalProgrammeClient, ISearchCountryFaq, PublicSearchCountryFaqClient, ISearchDiscipline, PublicSearchDisciplineClient, IReview, IDotDigitalOrganisation, DotdigitalOrganisationClient, PortalMap, PortalType, ISitemapRankingsInfo, SitemapRankingsInfoClient, ModelClient };
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PortalType = exports.DotdigitalOrganisationClient = exports.PublicSearchCountryFaqClient = exports.DotdigitalProgrammeClient = exports.BestfitProgrammeClient = exports.SearchProjectionClient = exports.ProgrammeCardClient = exports.PropertyNotAvailableException = exports.NotFoundException = exports.InternalServerException = exports.ClientException = exports.BadRequestException = void 0;
3
+ exports.ModelClient = exports.SitemapRankingsInfoClient = exports.PortalType = exports.DotdigitalOrganisationClient = exports.PublicSearchDisciplineClient = exports.PublicSearchCountryFaqClient = exports.DotdigitalProgrammeClient = exports.BestfitProgrammeClient = exports.SearchProjectionClient = exports.ProgrammeCardClient = exports.PropertyNotAvailableException = exports.NotFoundException = exports.InternalServerException = exports.ClientException = exports.BadRequestException = void 0;
4
4
  const bad_request_exception_1 = require("./src/exceptions/bad-request-exception");
5
5
  Object.defineProperty(exports, "BadRequestException", { enumerable: true, get: function () { return bad_request_exception_1.BadRequestException; } });
6
6
  const client_exception_1 = require("./src/exceptions/client-exception");
@@ -21,8 +21,14 @@ const dotdigital_programme_client_1 = require("./src/models/dotdigital-programme
21
21
  Object.defineProperty(exports, "DotdigitalProgrammeClient", { enumerable: true, get: function () { return dotdigital_programme_client_1.DotdigitalProgrammeClient; } });
22
22
  const public_search_country_faq_client_1 = require("./src/models/search-country-faq/public-search-country-faq-client");
23
23
  Object.defineProperty(exports, "PublicSearchCountryFaqClient", { enumerable: true, get: function () { return public_search_country_faq_client_1.PublicSearchCountryFaqClient; } });
24
+ const public_search_discipline_client_1 = require("./src/models/search-discipline/public-search-discipline-client");
25
+ Object.defineProperty(exports, "PublicSearchDisciplineClient", { enumerable: true, get: function () { return public_search_discipline_client_1.PublicSearchDisciplineClient; } });
24
26
  const dotdigital_organisation_client_1 = require("./src/models/dotdigital-organisation/dotdigital-organisation-client");
25
27
  Object.defineProperty(exports, "DotdigitalOrganisationClient", { enumerable: true, get: function () { return dotdigital_organisation_client_1.DotdigitalOrganisationClient; } });
28
+ const sitemap_rankings_info_client_1 = require("./src/models/sitemap-rankings-info/sitemap-rankings-info-client");
29
+ Object.defineProperty(exports, "SitemapRankingsInfoClient", { enumerable: true, get: function () { return sitemap_rankings_info_client_1.SitemapRankingsInfoClient; } });
26
30
  const portal_type_1 = require("./src/types/portal-type");
27
31
  Object.defineProperty(exports, "PortalType", { enumerable: true, get: function () { return portal_type_1.PortalType; } });
32
+ const model_client_1 = require("./src/model-client");
33
+ Object.defineProperty(exports, "ModelClient", { enumerable: true, get: function () { return model_client_1.ModelClient; } });
28
34
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings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AyDlH,6GAzDQ,6DAA4B,OAyDR;AAvD7B,kHAA4G;AA2D3G,0GA3DQ,wDAAyB,OA2DR;AApD1B,yDAAoD;AAkDnD,2FAlDQ,wBAAU,OAkDR;AAhDX,qDAAiD;AAmDhD,4FAnDQ,0BAAW,OAmDR"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studyportals/domain-client",
3
- "version": "3.6.0",
3
+ "version": "3.6.1-beta.2",
4
4
  "description": "Responsible for fetching data from the Domain API",
5
5
  "main": "bin/index.js",
6
6
  "author": "StudyPortals B.V.",
@@ -12,6 +12,7 @@
12
12
  "test": "mocha --reporter spec \"tests/**/*.test.ts\"",
13
13
  "coverage": "nyc mocha --reporter dot \"tests/**/*.test.ts\"",
14
14
  "lint": "eslint . --ext .ts --max-warnings=0",
15
+ "lint:fix": "eslint . --ext .ts --fix",
15
16
  "pre-push": "npm run test && npm run coverage && npm run lint",
16
17
  "prepare-dist": "npm run test && rm -fR bin && npx tsc && cp package.json bin/package.json && rm -fR bin/tests",
17
18
  "publish-beta": "npm version prerelease --preid=beta && npm run prepare-dist && npm publish bin --tag beta",
@@ -30,16 +31,16 @@
30
31
  },
31
32
  "devDependencies": {
32
33
  "@studyportals/code-style": "^1.8.1",
33
- "@testdeck/mocha": "^0.2.1",
34
+ "@testdeck/mocha": "^0.3.3",
34
35
  "@types/axios": "^0.14.0",
35
36
  "@types/mocha": "^10.0.0",
36
- "@types/moxios": "^0.4.15",
37
- "@types/node": "^16.11.68",
37
+ "@types/moxios": "^0.4.9",
38
+ "@types/node": "^14.14.8",
38
39
  "@types/reflect-metadata": "^0.1.0",
39
- "@typescript-eslint/eslint-plugin": "^5.40.1",
40
- "@typescript-eslint/parser": "^5.40.1",
41
- "eslint": "^8.25.0",
42
- "eslint-plugin-import": "^2.26.0",
40
+ "@typescript-eslint/eslint-plugin": "^4.8.1",
41
+ "@typescript-eslint/parser": "^4.8.1",
42
+ "eslint": "^7.13.0",
43
+ "eslint-plugin-import": "^2.22.1",
43
44
  "eslint-plugin-mocha": "^10.1.0",
44
45
  "husky": "^4.3.0",
45
46
  "mocha": "^10.1.0",
@@ -49,6 +50,6 @@
49
50
  "ts-node": "^10.9.1",
50
51
  "tslint": "^6.1.3",
51
52
  "typemoq": "^2.1.0",
52
- "typescript": "^4.8.4"
53
+ "typescript": "^4.9.3"
53
54
  }
54
55
  }
@@ -0,0 +1,26 @@
1
+ export interface ISearchDiscipline {
2
+ /**
3
+ * @return string | null
4
+ */
5
+ getIcon(): string | null;
6
+ /**
7
+ * @return number
8
+ */
9
+ getId(): number;
10
+ /**
11
+ * @return string
12
+ */
13
+ getName(): string;
14
+ /**
15
+ * @return string | null
16
+ */
17
+ getOldVirtualPath(): string | null;
18
+ /**
19
+ * @return number | null
20
+ */
21
+ getParentId(): number | null;
22
+ /**
23
+ * @return string
24
+ */
25
+ getVirtualPath(): string;
26
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=i-search-discipline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-search-discipline.js","sourceRoot":"","sources":["../../../../src/models/search-discipline/i-search-discipline.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { ISearchDiscipline } from "../../..";
2
+ import { ModelClient } from "../../model-client";
3
+ export declare class PublicSearchDisciplineClient extends ModelClient<ISearchDiscipline> {
4
+ protected getModelName(): string;
5
+ protected getVersion(): string;
6
+ isPublic(): boolean;
7
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PublicSearchDisciplineClient = void 0;
4
+ const model_client_1 = require("../../model-client");
5
+ class PublicSearchDisciplineClient extends model_client_1.ModelClient {
6
+ getModelName() {
7
+ return 'search-discipline';
8
+ }
9
+ getVersion() {
10
+ return 'v1';
11
+ }
12
+ isPublic() {
13
+ return true;
14
+ }
15
+ }
16
+ exports.PublicSearchDisciplineClient = PublicSearchDisciplineClient;
17
+ //# sourceMappingURL=public-search-discipline-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-search-discipline-client.js","sourceRoot":"","sources":["../../../../src/models/search-discipline/public-search-discipline-client.ts"],"names":[],"mappings":";;;AACA,qDAAiD;AAEjD,MAAa,4BAA6B,SAAQ,0BAA8B;IACrE,YAAY;QACrB,OAAO,mBAAmB,CAAC;IAC5B,CAAC;IAES,UAAU;QACnB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,QAAQ;QACd,OAAO,IAAI,CAAC;IACb,CAAC;CACD;AAZD,oEAYC"}
@@ -0,0 +1,10 @@
1
+ export interface ISitemapRankingsInfo {
2
+ /**
3
+ * @return number
4
+ */
5
+ getId(): number;
6
+ /**
7
+ * @return string
8
+ */
9
+ getPath(): string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=i-sitemap-rankings-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-sitemap-rankings-info.js","sourceRoot":"","sources":["../../../../src/models/sitemap-rankings-info/i-sitemap-rankings-info.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { ISitemapRankingsInfo } from "../../..";
2
+ import { ModelClient } from "../../model-client";
3
+ export declare class SitemapRankingsInfoClient extends ModelClient<ISitemapRankingsInfo> {
4
+ protected getModelName(): string;
5
+ protected getVersion(): string;
6
+ isPublic(): boolean;
7
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SitemapRankingsInfoClient = void 0;
4
+ const model_client_1 = require("../../model-client");
5
+ class SitemapRankingsInfoClient extends model_client_1.ModelClient {
6
+ getModelName() {
7
+ return 'sitemap-rankings-info';
8
+ }
9
+ getVersion() {
10
+ return 'v1';
11
+ }
12
+ isPublic() {
13
+ return false;
14
+ }
15
+ }
16
+ exports.SitemapRankingsInfoClient = SitemapRankingsInfoClient;
17
+ //# sourceMappingURL=sitemap-rankings-info-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sitemap-rankings-info-client.js","sourceRoot":"","sources":["../../../../src/models/sitemap-rankings-info/sitemap-rankings-info-client.ts"],"names":[],"mappings":";;;AACA,qDAAiD;AAEjD,MAAa,yBAA0B,SAAQ,0BAAiC;IACrE,YAAY;QACrB,OAAO,uBAAuB,CAAC;IAChC,CAAC;IAES,UAAU;QACnB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,QAAQ;QACd,OAAO,KAAK,CAAC;IACd,CAAC;CACD;AAZD,8DAYC"}
@@ -1,2 +1,2 @@
1
1
  import { PortalType } from "./portal-type";
2
- export declare type PortalMap = Map<PortalType, string>;
2
+ export type PortalMap = Map<PortalType, string>;
package/src/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare type Model = Record<string, Callable>;
2
- export declare type Callable = () => CallableReturnType | CallableReturnType[];
3
- export declare type CallableReturnType = AcceptedType | Model;
4
- export declare type AcceptedType = string | string[] | number | number[] | boolean | null | Date;
1
+ export type Model = Record<string, Callable>;
2
+ export type Callable = () => CallableReturnType | CallableReturnType[];
3
+ export type CallableReturnType = AcceptedType | Model;
4
+ export type AcceptedType = string | string[] | number | number[] | boolean | null | Date;