@studyportals/domain-client 5.6.1-beta.0 → 6.0.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/index.d.ts +2 -0
- package/index.js +33 -63
- package/index.js.map +1 -1
- package/package.json +4 -2
- package/protobuf/InternalLink.d.ts +24 -0
- package/protobuf/InternalLink.js +49 -0
- package/protobuf/InternalLink.js.map +1 -0
- package/protobuf/Link.d.ts +23 -0
- package/protobuf/Link.js +44 -0
- package/protobuf/Link.js.map +1 -0
- package/protobuf/MiniProgrammeCard.d.ts +27 -0
- package/protobuf/MiniProgrammeCard.js +61 -0
- package/protobuf/MiniProgrammeCard.js.map +1 -0
- package/protobuf/index.d.ts +6 -0
- package/protobuf/index.js +7 -0
- package/protobuf/index.js.map +1 -0
- package/src/clients/index.d.ts +1 -0
- package/src/clients/index.js +2 -0
- package/src/clients/index.js.map +1 -0
- package/src/clients/mini-programme-card-client.d.ts +8 -0
- package/src/clients/mini-programme-card-client.js +17 -0
- package/src/clients/mini-programme-card-client.js.map +1 -0
- package/src/clients/protobuf-client.d.ts +11 -0
- package/src/clients/protobuf-client.js +16 -0
- package/src/clients/protobuf-client.js.map +1 -0
- package/src/domain-client.js +15 -13
- package/src/domain-client.js.map +1 -1
- package/src/exceptions/bad-request-exception.js +1 -5
- package/src/exceptions/bad-request-exception.js.map +1 -1
- package/src/exceptions/client-exception.js +1 -5
- package/src/exceptions/client-exception.js.map +1 -1
- package/src/exceptions/internal-server-exception.js +1 -5
- package/src/exceptions/internal-server-exception.js.map +1 -1
- package/src/exceptions/not-found-exception.js +1 -5
- package/src/exceptions/not-found-exception.js.map +1 -1
- package/src/exceptions/property-not-available-exception.js +1 -5
- package/src/exceptions/property-not-available-exception.js.map +1 -1
- package/src/factories/DateFactory.js +1 -5
- package/src/factories/DateFactory.js.map +1 -1
- package/src/factories/InternalLinkFactory.js +2 -5
- package/src/factories/InternalLinkFactory.js.map +1 -1
- package/src/i-api-response.js +1 -2
- package/src/i-class-factory.js +1 -2
- package/src/i-model-description.js +1 -5
- package/src/i-model-description.js.map +1 -1
- package/src/model-client.js +10 -12
- package/src/model-client.js.map +1 -1
- package/src/model-factory.js +11 -14
- package/src/model-factory.js.map +1 -1
- package/src/models/bestfit-programme/bestfit-programme-client.js +2 -6
- package/src/models/bestfit-programme/bestfit-programme-client.js.map +1 -1
- package/src/models/bestfit-programme/i-best-fit-programme.js +1 -2
- package/src/models/bestfit-programme/i-city.js +1 -2
- package/src/models/bestfit-programme/i-english-requirements.d.ts +51 -0
- package/src/models/bestfit-programme/i-english-requirements.js +2 -0
- package/src/models/bestfit-programme/i-english-requirements.js.map +1 -0
- package/src/models/bestfit-programme/i-g-p-a-requirement.d.ts +20 -0
- package/src/models/bestfit-programme/i-g-p-a-requirement.js +2 -0
- package/src/models/bestfit-programme/i-g-p-a-requirement.js.map +1 -0
- package/src/models/bestfit-programme/i-living-cost.js +1 -2
- package/src/models/bestfit-programme/i-tuition-fee.d.ts +50 -0
- package/src/models/bestfit-programme/i-tuition-fee.js +2 -0
- package/src/models/bestfit-programme/i-tuition-fee.js.map +1 -0
- package/src/models/common/i-city.js +1 -2
- package/src/models/common/i-country.js +1 -2
- package/src/models/common/i-english-requirements.js +1 -2
- package/src/models/common/i-g-p-a-requirement.js +1 -2
- package/src/models/common/i-internal-link.js +1 -2
- package/src/models/common/i-logo.js +1 -2
- package/src/models/common/i-tuition-fee.js +1 -2
- package/src/models/compare-programme/i-english-requirements.d.ts +51 -0
- package/src/models/compare-programme/i-english-requirements.js +2 -0
- package/src/models/compare-programme/i-english-requirements.js.map +1 -0
- package/src/models/compare-programme/i-g-p-a-requirement.d.ts +20 -0
- package/src/models/compare-programme/i-g-p-a-requirement.js +2 -0
- package/src/models/compare-programme/i-g-p-a-requirement.js.map +1 -0
- package/src/models/compare-programme/i-living-cost.d.ts +20 -0
- package/src/models/compare-programme/i-living-cost.js +2 -0
- package/src/models/compare-programme/i-living-cost.js.map +1 -0
- package/src/models/copilot-country/copilot-country-client.js +2 -6
- package/src/models/copilot-country/copilot-country-client.js.map +1 -1
- package/src/models/copilot-country/i-copilot-country.js +1 -2
- package/src/models/copilot-country/i-copilot-ranking-card.js +1 -2
- package/src/models/copilot-programme/copilot-programme-client.js +2 -6
- package/src/models/copilot-programme/copilot-programme-client.js.map +1 -1
- package/src/models/copilot-programme/i-copilot-programme.js +1 -2
- package/src/models/copilot-programme/i-deadline.d.ts +20 -0
- package/src/models/copilot-programme/i-deadline.js +2 -0
- package/src/models/copilot-programme/i-deadline.js.map +1 -0
- package/src/models/copilot-programme/i-english-requirements.d.ts +51 -0
- package/src/models/copilot-programme/i-english-requirements.js +2 -0
- package/src/models/copilot-programme/i-english-requirements.js.map +1 -0
- package/src/models/copilot-programme/i-g-p-a-requirement.d.ts +20 -0
- package/src/models/copilot-programme/i-g-p-a-requirement.js +2 -0
- package/src/models/copilot-programme/i-g-p-a-requirement.js.map +1 -0
- package/src/models/copilot-programme/i-geo-targeting-configuration.d.ts +38 -0
- package/src/models/copilot-programme/i-geo-targeting-configuration.js +2 -0
- package/src/models/copilot-programme/i-geo-targeting-configuration.js.map +1 -0
- package/src/models/copilot-programme/i-geo-targeting-values.d.ts +30 -0
- package/src/models/copilot-programme/i-geo-targeting-values.js +2 -0
- package/src/models/copilot-programme/i-geo-targeting-values.js.map +1 -0
- package/src/models/copilot-programme/i-internal-link.d.ts +28 -0
- package/src/models/copilot-programme/i-internal-link.js +2 -0
- package/src/models/copilot-programme/i-internal-link.js.map +1 -0
- package/src/models/copilot-programme/i-link.d.ts +22 -0
- package/src/models/copilot-programme/i-link.js +2 -0
- package/src/models/copilot-programme/i-link.js.map +1 -0
- package/src/models/copilot-programme/i-living-cost.d.ts +20 -0
- package/src/models/copilot-programme/i-living-cost.js +2 -0
- package/src/models/copilot-programme/i-living-cost.js.map +1 -0
- package/src/models/copilot-programme/i-start-date.d.ts +33 -0
- package/src/models/copilot-programme/i-start-date.js +2 -0
- package/src/models/copilot-programme/i-start-date.js.map +1 -0
- package/src/models/copilot-programme/i-timing.d.ts +45 -0
- package/src/models/copilot-programme/i-timing.js +2 -0
- package/src/models/copilot-programme/i-timing.js.map +1 -0
- package/src/models/copilot-programme/i-tuition-values.d.ts +50 -0
- package/src/models/copilot-programme/i-tuition-values.js +2 -0
- package/src/models/copilot-programme/i-tuition-values.js.map +1 -0
- package/src/models/customerio-organisation/customerio-organisation-client.js +2 -6
- package/src/models/customerio-organisation/customerio-organisation-client.js.map +1 -1
- package/src/models/customerio-organisation/i-city.d.ts +14 -0
- package/src/models/customerio-organisation/i-city.js +2 -0
- package/src/models/customerio-organisation/i-city.js.map +1 -0
- package/src/models/customerio-organisation/i-country.d.ts +20 -0
- package/src/models/customerio-organisation/i-country.js +2 -0
- package/src/models/customerio-organisation/i-country.js.map +1 -0
- package/src/models/customerio-organisation/i-customer-i-o-organisation.d.ts +35 -0
- package/src/models/customerio-organisation/i-customer-i-o-organisation.js +2 -0
- package/src/models/customerio-organisation/i-customer-i-o-organisation.js.map +1 -0
- package/src/models/customerio-organisation/i-customer-io-organisation.js +1 -2
- package/src/models/customerio-organisation/i-review.js +1 -2
- package/src/models/customerio-programme/customerio-programme-client.js +2 -6
- package/src/models/customerio-programme/customerio-programme-client.js.map +1 -1
- package/src/models/customerio-programme/i-country.d.ts +20 -0
- package/src/models/customerio-programme/i-country.js +2 -0
- package/src/models/customerio-programme/i-country.js.map +1 -0
- package/src/models/customerio-programme/i-customer-i-o-programme.d.ts +107 -0
- package/src/models/customerio-programme/i-customer-i-o-programme.js +2 -0
- package/src/models/customerio-programme/i-customer-i-o-programme.js.map +1 -0
- package/src/models/customerio-programme/i-customer-io-programme.js +1 -2
- package/src/models/customerio-programme/i-deadline.d.ts +20 -0
- package/src/models/customerio-programme/i-deadline.js +2 -0
- package/src/models/customerio-programme/i-deadline.js.map +1 -0
- package/src/models/customerio-programme/i-english-requirements.d.ts +51 -0
- package/src/models/customerio-programme/i-english-requirements.js +2 -0
- package/src/models/customerio-programme/i-english-requirements.js.map +1 -0
- package/src/models/customerio-programme/i-internal-link.js +1 -2
- package/src/models/customerio-programme/i-logo.d.ts +14 -0
- package/src/models/customerio-programme/i-logo.js +2 -0
- package/src/models/customerio-programme/i-logo.js.map +1 -0
- package/src/models/customerio-programme/i-start-date.d.ts +33 -0
- package/src/models/customerio-programme/i-start-date.js +2 -0
- package/src/models/customerio-programme/i-start-date.js.map +1 -0
- package/src/models/customerio-programme/i-timing.d.ts +45 -0
- package/src/models/customerio-programme/i-timing.js +2 -0
- package/src/models/customerio-programme/i-timing.js.map +1 -0
- package/src/models/customerio-programme/i-tuition-fee.d.ts +50 -0
- package/src/models/customerio-programme/i-tuition-fee.js +2 -0
- package/src/models/customerio-programme/i-tuition-fee.js.map +1 -0
- package/src/models/faq-static-content/i-faq-static-content.js +1 -2
- package/src/models/faq-static-content/i-faq.js +1 -2
- package/src/models/faq-static-content/i-static-content-url.js +1 -2
- package/src/models/faq-static-content/public-faq-static-content-client.js +2 -6
- package/src/models/faq-static-content/public-faq-static-content-client.js.map +1 -1
- package/src/models/organisation-card/i-organisation-card.d.ts +0 -2
- package/src/models/organisation-card/i-organisation-card.js +1 -2
- package/src/models/organisation-card/i-ranking-discipline.js +1 -2
- package/src/models/organisation-card/i-review-rating-domain.d.ts +6 -0
- package/src/models/organisation-card/i-review-rating-domain.js +2 -0
- package/src/models/organisation-card/i-review-rating-domain.js.map +1 -0
- package/src/models/organisation-card/organisation-card-client.js +2 -6
- package/src/models/organisation-card/organisation-card-client.js.map +1 -1
- package/src/models/organisation-for-search/i-organisation-for-search.js +1 -2
- package/src/models/organisation-for-search/public-organisation-for-search-client.js +2 -6
- package/src/models/organisation-for-search/public-organisation-for-search-client.js.map +1 -1
- package/src/models/organisation-search-document/i-organisation-search-document.js +1 -2
- package/src/models/organisation-search-document/organisation-search-document-client.js +2 -6
- package/src/models/organisation-search-document/organisation-search-document-client.js.map +1 -1
- package/src/models/programme-card/i-click-tracking-data.js +1 -2
- package/src/models/programme-card/i-cover.js +1 -2
- package/src/models/programme-card/i-deadline.js +1 -2
- package/src/models/programme-card/i-duration.js +1 -2
- package/src/models/programme-card/i-english-requirements.d.ts +51 -0
- package/src/models/programme-card/i-english-requirements.js +2 -0
- package/src/models/programme-card/i-english-requirements.js.map +1 -0
- package/src/models/programme-card/i-g-p-a-requirement.d.ts +20 -0
- package/src/models/programme-card/i-g-p-a-requirement.js +2 -0
- package/src/models/programme-card/i-g-p-a-requirement.js.map +1 -0
- package/src/models/programme-card/i-internal-link.js +1 -2
- package/src/models/programme-card/i-link.js +1 -2
- package/src/models/programme-card/i-living-cost.d.ts +20 -0
- package/src/models/programme-card/i-living-cost.js +2 -0
- package/src/models/programme-card/i-living-cost.js.map +1 -0
- package/src/models/programme-card/i-location.js +1 -2
- package/src/models/programme-card/i-logo.js +1 -2
- package/src/models/programme-card/i-optional-link.js +1 -2
- package/src/models/programme-card/i-programme-card.d.ts +0 -7
- package/src/models/programme-card/i-programme-card.js +1 -2
- package/src/models/programme-card/i-review-rating-domain.d.ts +6 -0
- package/src/models/programme-card/i-review-rating-domain.js +2 -0
- package/src/models/programme-card/i-review-rating-domain.js.map +1 -0
- package/src/models/programme-card/i-start-date.js +1 -2
- package/src/models/programme-card/i-timing.js +1 -2
- package/src/models/programme-card/i-tracked-link.js +1 -2
- package/src/models/programme-card/i-tracking.js +1 -2
- package/src/models/programme-card/i-tuition-fee.js +1 -2
- package/src/models/programme-card/programme-card-client.js +2 -6
- package/src/models/programme-card/programme-card-client.js.map +1 -1
- package/src/models/ranking-cards/i-ranking.js +1 -2
- package/src/models/scholarship-card/i-scholarship-card-v2.js +1 -2
- package/src/models/scholarship-card/i-scholarship-card.js +1 -2
- package/src/models/scholarship-card/public-scholarship-card-client.js +2 -6
- package/src/models/scholarship-card/public-scholarship-card-client.js.map +1 -1
- package/src/models/scholarship-card/scholarship-card-v2-client.js +2 -6
- package/src/models/scholarship-card/scholarship-card-v2-client.js.map +1 -1
- package/src/models/scholarship-card-v2/i-scholarship-card.d.ts +15 -0
- package/src/models/scholarship-card-v2/i-scholarship-card.js +2 -0
- package/src/models/scholarship-card-v2/i-scholarship-card.js.map +1 -0
- package/src/models/scholarship-card-v2/scholarship-card-v2-client.d.ts +7 -0
- package/src/models/scholarship-card-v2/scholarship-card-v2-client.js +13 -0
- package/src/models/scholarship-card-v2/scholarship-card-v2-client.js.map +1 -0
- package/src/models/scholarship-search-document/i-scholarship-search-document.js +1 -2
- package/src/models/scholarship-search-document/scholarship-search-document-client.js +2 -6
- package/src/models/scholarship-search-document/scholarship-search-document-client.js.map +1 -1
- package/src/models/search-discipline/i-search-discipline.js +1 -2
- package/src/models/search-discipline/public-search-discipline-client.js +2 -6
- package/src/models/search-discipline/public-search-discipline-client.js.map +1 -1
- package/src/models/search-projection/i-geo-targeting-configuration.js +1 -2
- package/src/models/search-projection/i-geo-targeting-values.js +1 -2
- package/src/models/search-projection/i-organisation-values.js +1 -2
- package/src/models/search-projection/i-premium-values.js +1 -2
- package/src/models/search-projection/i-search-projection.js +1 -2
- package/src/models/search-projection/i-tuition-values.js +1 -2
- package/src/models/search-projection/search-projection-client.js +2 -6
- package/src/models/search-projection/search-projection-client.js.map +1 -1
- package/src/models/sitemap-articles-info/i-sitemap-article-info.js +1 -2
- package/src/models/sitemap-articles-info/sitemap-articles-info-client.js +2 -6
- package/src/models/sitemap-articles-info/sitemap-articles-info-client.js.map +1 -1
- package/src/models/sitemap-cities-info/i-sitemap-city-info.js +1 -2
- package/src/models/sitemap-cities-info/sitemap-cities-info-client.js +2 -6
- package/src/models/sitemap-cities-info/sitemap-cities-info-client.js.map +1 -1
- package/src/models/sitemap-countries-info/i-sitemap-country-info.js +1 -2
- package/src/models/sitemap-countries-info/sitemap-countries-info-client.js +2 -6
- package/src/models/sitemap-countries-info/sitemap-countries-info-client.js.map +1 -1
- package/src/models/sitemap-country-degree-info/i-degree-info.js +1 -2
- package/src/models/sitemap-country-degree-info/i-sitemap-country-degree-info.js +1 -2
- package/src/models/sitemap-country-degree-info/sitemap-country-degree-info-client.js +2 -6
- package/src/models/sitemap-country-degree-info/sitemap-country-degree-info-client.js.map +1 -1
- package/src/models/sitemap-disciplines-info/i-sitemap-discipline-info.js +1 -2
- package/src/models/sitemap-disciplines-info/sitemap-disciplines-info-client.js +2 -6
- package/src/models/sitemap-disciplines-info/sitemap-disciplines-info-client.js.map +1 -1
- package/src/models/sitemap-organisations-info/i-sitemap-organisation-info.js +1 -2
- package/src/models/sitemap-organisations-info/sitemap-organisations-info-client.js +2 -6
- package/src/models/sitemap-organisations-info/sitemap-organisations-info-client.js.map +1 -1
- package/src/models/sitemap-programme-info/i-sitemap-programme-info.js +1 -2
- package/src/models/sitemap-programme-info/sitemap-programme-info-client.js +2 -6
- package/src/models/sitemap-programme-info/sitemap-programme-info-client.js.map +1 -1
- package/src/models/sitemap-rankings-info/i-sitemap-rankings-info.js +1 -2
- package/src/models/sitemap-rankings-info/sitemap-rankings-info-client.js +2 -6
- package/src/models/sitemap-rankings-info/sitemap-rankings-info-client.js.map +1 -1
- package/src/types/portal-map.js +1 -2
- package/src/types/portal-type.js +2 -5
- package/src/types/portal-type.js.map +1 -1
- package/src/types.js +1 -2
- package/src/models/common/i-review-rating.d.ts +0 -26
- package/src/models/common/i-review-rating.js +0 -3
- package/src/models/common/i-review-rating.js.map +0 -1
package/index.d.ts
CHANGED
|
@@ -81,3 +81,5 @@ import { ICopilotCountry } from "./src/models/copilot-country/i-copilot-country"
|
|
|
81
81
|
import { CopilotCountryClient } from "./src/models/copilot-country/copilot-country-client";
|
|
82
82
|
import { ICopilotRankingCard } from "./src/models/copilot-country/i-copilot-ranking-card";
|
|
83
83
|
export { BadRequestException, ClientException, InternalServerException, NotFoundException, PropertyNotAvailableException, ICover, ILink, IOptionalLink, ILocation, IClickTrackingData, ITracking, IDuration, IDeadline, IStartDate, ITiming, ITrackedLink, IProgrammeCard, ProgrammeCardClient, ITuitionValues, IPremiumValues, IOrganisationValues, IGeoTargetingConfiguration, IGeoTargetingValues, ISearchProjection, SearchProjectionClient, ILivingCost, IGPARequirement, IBestFitProgramme, BestfitProgrammeClient, ILogo, ITuitionFee, IEnglishRequirements, IInternalLink, ICustomerIOProgramme, CustomerIOProgrammeClient, IFaqStaticContent, PublicFaqStaticContentClient, ISitemapProgrammeInfo, SitemapProgrammeInfoClient, ISitemapCountryInfo, SitemapCountriesInfoClient, IDegreeInfo, ISitemapCountryDegreeInfo, SitemapCountryDegreeInfoClient, ISearchDiscipline, PublicSearchDisciplineClient, ISitemapDisciplineInfo, SitemapDisciplinesInfoClient, ICountry, ICity, IReview, ICustomerIOOrganisation, CustomerIOOrganisationClient, ISitemapOrganisationInfo, SitemapOrganisationsInfoClient, IOrganisationSearchDocument, OrganisationSearchDocumentClient, ISitemapRankingsInfo, SitemapRankingsInfoClient, ISitemapArticleInfo, SitemapArticlesInfoClient, ISitemapCityInfo, SitemapCitiesInfoClient, IScholarshipCard, PublicScholarshipCardClient, ScholarshipCardV2Client, IScholarshipSearchDocument, ScholarshipSearchDocumentClient, IRanking, PortalType, PortalMap, ModelClient, IOrganisationForSearch, PublicOrganisationForSearchClient, IOrganisationCard, IRankingDiscipline, OrganisationCardClient, ICopilotProgramme, ICopilotCountry, CopilotProgrammeClient, CopilotCountryClient, ICopilotRankingCard };
|
|
84
|
+
export * from './protobuf';
|
|
85
|
+
export * from './src/clients';
|
package/index.js
CHANGED
|
@@ -1,64 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const customerio_organisation_client_1 = require("./src/models/customerio-organisation/customerio-organisation-client");
|
|
35
|
-
Object.defineProperty(exports, "CustomerIOOrganisationClient", { enumerable: true, get: function () { return customerio_organisation_client_1.CustomerIOOrganisationClient; } });
|
|
36
|
-
const sitemap_organisations_info_client_1 = require("./src/models/sitemap-organisations-info/sitemap-organisations-info-client");
|
|
37
|
-
Object.defineProperty(exports, "SitemapOrganisationsInfoClient", { enumerable: true, get: function () { return sitemap_organisations_info_client_1.SitemapOrganisationsInfoClient; } });
|
|
38
|
-
const organisation_card_client_1 = require("./src/models/organisation-card/organisation-card-client");
|
|
39
|
-
Object.defineProperty(exports, "OrganisationCardClient", { enumerable: true, get: function () { return organisation_card_client_1.OrganisationCardClient; } });
|
|
40
|
-
const organisation_search_document_client_1 = require("./src/models/organisation-search-document/organisation-search-document-client");
|
|
41
|
-
Object.defineProperty(exports, "OrganisationSearchDocumentClient", { enumerable: true, get: function () { return organisation_search_document_client_1.OrganisationSearchDocumentClient; } });
|
|
42
|
-
const sitemap_rankings_info_client_1 = require("./src/models/sitemap-rankings-info/sitemap-rankings-info-client");
|
|
43
|
-
Object.defineProperty(exports, "SitemapRankingsInfoClient", { enumerable: true, get: function () { return sitemap_rankings_info_client_1.SitemapRankingsInfoClient; } });
|
|
44
|
-
const sitemap_articles_info_client_1 = require("./src/models/sitemap-articles-info/sitemap-articles-info-client");
|
|
45
|
-
Object.defineProperty(exports, "SitemapArticlesInfoClient", { enumerable: true, get: function () { return sitemap_articles_info_client_1.SitemapArticlesInfoClient; } });
|
|
46
|
-
const sitemap_cities_info_client_1 = require("./src/models/sitemap-cities-info/sitemap-cities-info-client");
|
|
47
|
-
Object.defineProperty(exports, "SitemapCitiesInfoClient", { enumerable: true, get: function () { return sitemap_cities_info_client_1.SitemapCitiesInfoClient; } });
|
|
48
|
-
const public_scholarship_card_client_1 = require("./src/models/scholarship-card/public-scholarship-card-client");
|
|
49
|
-
Object.defineProperty(exports, "PublicScholarshipCardClient", { enumerable: true, get: function () { return public_scholarship_card_client_1.PublicScholarshipCardClient; } });
|
|
50
|
-
const scholarship_card_v2_client_1 = require("./src/models/scholarship-card/scholarship-card-v2-client");
|
|
51
|
-
Object.defineProperty(exports, "ScholarshipCardV2Client", { enumerable: true, get: function () { return scholarship_card_v2_client_1.ScholarshipCardV2Client; } });
|
|
52
|
-
const scholarship_search_document_client_1 = require("./src/models/scholarship-search-document/scholarship-search-document-client");
|
|
53
|
-
Object.defineProperty(exports, "ScholarshipSearchDocumentClient", { enumerable: true, get: function () { return scholarship_search_document_client_1.ScholarshipSearchDocumentClient; } });
|
|
54
|
-
const portal_type_1 = require("./src/types/portal-type");
|
|
55
|
-
Object.defineProperty(exports, "PortalType", { enumerable: true, get: function () { return portal_type_1.PortalType; } });
|
|
56
|
-
const model_client_1 = require("./src/model-client");
|
|
57
|
-
Object.defineProperty(exports, "ModelClient", { enumerable: true, get: function () { return model_client_1.ModelClient; } });
|
|
58
|
-
const public_organisation_for_search_client_1 = require("./src/models/organisation-for-search/public-organisation-for-search-client");
|
|
59
|
-
Object.defineProperty(exports, "PublicOrganisationForSearchClient", { enumerable: true, get: function () { return public_organisation_for_search_client_1.PublicOrganisationForSearchClient; } });
|
|
60
|
-
const copilot_programme_client_1 = require("./src/models/copilot-programme/copilot-programme-client");
|
|
61
|
-
Object.defineProperty(exports, "CopilotProgrammeClient", { enumerable: true, get: function () { return copilot_programme_client_1.CopilotProgrammeClient; } });
|
|
62
|
-
const copilot_country_client_1 = require("./src/models/copilot-country/copilot-country-client");
|
|
63
|
-
Object.defineProperty(exports, "CopilotCountryClient", { enumerable: true, get: function () { return copilot_country_client_1.CopilotCountryClient; } });
|
|
1
|
+
import { BadRequestException } from "./src/exceptions/bad-request-exception";
|
|
2
|
+
import { ClientException } from "./src/exceptions/client-exception";
|
|
3
|
+
import { InternalServerException } from "./src/exceptions/internal-server-exception";
|
|
4
|
+
import { NotFoundException } from "./src/exceptions/not-found-exception";
|
|
5
|
+
import { PropertyNotAvailableException } from "./src/exceptions/property-not-available-exception";
|
|
6
|
+
import { ProgrammeCardClient } from "./src/models/programme-card/programme-card-client";
|
|
7
|
+
import { SearchProjectionClient } from "./src/models/search-projection/search-projection-client";
|
|
8
|
+
import { BestfitProgrammeClient } from "./src/models/bestfit-programme/bestfit-programme-client";
|
|
9
|
+
import { CustomerIOProgrammeClient } from "./src/models/customerio-programme/customerio-programme-client";
|
|
10
|
+
import { PublicFaqStaticContentClient } from "./src/models/faq-static-content/public-faq-static-content-client";
|
|
11
|
+
import { SitemapProgrammeInfoClient } from "./src/models/sitemap-programme-info/sitemap-programme-info-client";
|
|
12
|
+
import { SitemapCountriesInfoClient } from "./src/models/sitemap-countries-info/sitemap-countries-info-client";
|
|
13
|
+
import { SitemapCountryDegreeInfoClient } from "./src/models/sitemap-country-degree-info/sitemap-country-degree-info-client";
|
|
14
|
+
import { PublicSearchDisciplineClient } from "./src/models/search-discipline/public-search-discipline-client";
|
|
15
|
+
import { SitemapDisciplinesInfoClient } from "./src/models/sitemap-disciplines-info/sitemap-disciplines-info-client";
|
|
16
|
+
import { CustomerIOOrganisationClient } from "./src/models/customerio-organisation/customerio-organisation-client";
|
|
17
|
+
import { SitemapOrganisationsInfoClient } from "./src/models/sitemap-organisations-info/sitemap-organisations-info-client";
|
|
18
|
+
import { OrganisationCardClient } from "./src/models/organisation-card/organisation-card-client";
|
|
19
|
+
import { OrganisationSearchDocumentClient } from "./src/models/organisation-search-document/organisation-search-document-client";
|
|
20
|
+
import { SitemapRankingsInfoClient } from "./src/models/sitemap-rankings-info/sitemap-rankings-info-client";
|
|
21
|
+
import { SitemapArticlesInfoClient } from "./src/models/sitemap-articles-info/sitemap-articles-info-client";
|
|
22
|
+
import { SitemapCitiesInfoClient } from "./src/models/sitemap-cities-info/sitemap-cities-info-client";
|
|
23
|
+
import { PublicScholarshipCardClient } from "./src/models/scholarship-card/public-scholarship-card-client";
|
|
24
|
+
import { ScholarshipCardV2Client } from "./src/models/scholarship-card/scholarship-card-v2-client";
|
|
25
|
+
import { ScholarshipSearchDocumentClient } from "./src/models/scholarship-search-document/scholarship-search-document-client";
|
|
26
|
+
import { PortalType } from "./src/types/portal-type";
|
|
27
|
+
import { ModelClient } from "./src/model-client";
|
|
28
|
+
import { PublicOrganisationForSearchClient } from "./src/models/organisation-for-search/public-organisation-for-search-client";
|
|
29
|
+
import { CopilotProgrammeClient } from "./src/models/copilot-programme/copilot-programme-client";
|
|
30
|
+
import { CopilotCountryClient } from "./src/models/copilot-country/copilot-country-client";
|
|
31
|
+
export { BadRequestException, ClientException, InternalServerException, NotFoundException, PropertyNotAvailableException, ProgrammeCardClient, SearchProjectionClient, BestfitProgrammeClient, CustomerIOProgrammeClient, PublicFaqStaticContentClient, SitemapProgrammeInfoClient, SitemapCountriesInfoClient, SitemapCountryDegreeInfoClient, PublicSearchDisciplineClient, SitemapDisciplinesInfoClient, CustomerIOOrganisationClient, SitemapOrganisationsInfoClient, OrganisationSearchDocumentClient, SitemapRankingsInfoClient, SitemapArticlesInfoClient, SitemapCitiesInfoClient, PublicScholarshipCardClient, ScholarshipCardV2Client, ScholarshipSearchDocumentClient, PortalType, ModelClient, PublicOrganisationForSearchClient, OrganisationCardClient, CopilotProgrammeClient, CopilotCountryClient };
|
|
32
|
+
export * from './protobuf';
|
|
33
|
+
export * from './src/clients';
|
|
64
34
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAA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AU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,iCAAiC,EAAE,MAAM,4EAA4E,CAAC;AAE/H,OAAO,EAAE,sBAAsB,EAAE,MAAM,yDAAyD,CAAC;AAEjG,OAAO,EAAE,oBAAoB,EAAE,MAAM,qDAAqD,CAAC;AAG3F,OAAO,EACN,mBAAmB,EACnB,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,6BAA6B,EAa7B,mBAAmB,EAOnB,sBAAsB,EAItB,sBAAsB,EAMtB,yBAAyB,EAEzB,4BAA4B,EAE5B,0BAA0B,EAE1B,0BAA0B,EAG1B,8BAA8B,EAE9B,4BAA4B,EAE5B,4BAA4B,EAK5B,4BAA4B,EAE5B,8BAA8B,EAE9B,gCAAgC,EAEhC,yBAAyB,EAEzB,yBAAyB,EAEzB,uBAAuB,EAEvB,2BAA2B,EAC3B,uBAAuB,EAEvB,+BAA+B,EAE/B,UAAU,EAEV,WAAW,EAEX,iCAAiC,EAGjC,sBAAsB,EAGtB,sBAAsB,EACtB,oBAAoB,EAEpB,CAAC;AAGF,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studyportals/domain-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-0",
|
|
4
4
|
"description": "Responsible for fetching data from the Domain API",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "StudyPortals B.V.",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"license": "BSD-3-Clause",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"test": "
|
|
12
|
+
"test": "",
|
|
13
13
|
"coverage": "nyc mocha --reporter dot \"tests/**/*.test.ts\"",
|
|
14
14
|
"lint": "eslint . --ext .ts --max-warnings=0",
|
|
15
15
|
"lint:fix": "eslint . --ext .ts --fix",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"axios": "^1.6.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
+
"@bufbuild/protobuf": "^2.6.2",
|
|
33
34
|
"@studyportals/code-style": "^2.0.4",
|
|
34
35
|
"@testdeck/mocha": "^0.3.3",
|
|
35
36
|
"@types/axios": "^0.14.0",
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
"@types/reflect-metadata": "^0.1.0",
|
|
40
41
|
"@typescript-eslint/eslint-plugin": "^4.8.1",
|
|
41
42
|
"@typescript-eslint/parser": "^4.8.1",
|
|
43
|
+
"barrelsby": "^2.8.1",
|
|
42
44
|
"eslint": "^7.13.0",
|
|
43
45
|
"eslint-plugin-import": "^2.22.1",
|
|
44
46
|
"eslint-plugin-mocha": "^10.1.0",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface InternalLink {
|
|
2
|
+
url?: string | undefined;
|
|
3
|
+
description?: string | undefined;
|
|
4
|
+
canShowDescription?: boolean | undefined;
|
|
5
|
+
portalType?: string | undefined;
|
|
6
|
+
}
|
|
7
|
+
export declare const InternalLink: MessageFns<InternalLink>;
|
|
8
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
9
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
10
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
11
|
+
} : Partial<T>;
|
|
12
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
13
|
+
type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
14
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
15
|
+
} & {
|
|
16
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
17
|
+
};
|
|
18
|
+
interface MessageFns<T> {
|
|
19
|
+
fromJSON(object: any): T;
|
|
20
|
+
toJSON(message: T): unknown;
|
|
21
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
22
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.5
|
|
4
|
+
// protoc v3.12.4
|
|
5
|
+
// source: InternalLink.proto
|
|
6
|
+
function createBaseInternalLink() {
|
|
7
|
+
return { url: "", description: "", canShowDescription: false, portalType: "" };
|
|
8
|
+
}
|
|
9
|
+
export const InternalLink = {
|
|
10
|
+
fromJSON(object) {
|
|
11
|
+
return {
|
|
12
|
+
url: isSet(object.url) ? globalThis.String(object.url) : "",
|
|
13
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
14
|
+
canShowDescription: isSet(object.canShowDescription) ? globalThis.Boolean(object.canShowDescription) : false,
|
|
15
|
+
portalType: isSet(object.portalType) ? globalThis.String(object.portalType) : "",
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
toJSON(message) {
|
|
19
|
+
const obj = {};
|
|
20
|
+
if (message.url !== undefined && message.url !== "") {
|
|
21
|
+
obj.url = message.url;
|
|
22
|
+
}
|
|
23
|
+
if (message.description !== undefined && message.description !== "") {
|
|
24
|
+
obj.description = message.description;
|
|
25
|
+
}
|
|
26
|
+
if (message.canShowDescription !== undefined && message.canShowDescription !== false) {
|
|
27
|
+
obj.canShowDescription = message.canShowDescription;
|
|
28
|
+
}
|
|
29
|
+
if (message.portalType !== undefined && message.portalType !== "") {
|
|
30
|
+
obj.portalType = message.portalType;
|
|
31
|
+
}
|
|
32
|
+
return obj;
|
|
33
|
+
},
|
|
34
|
+
create(base) {
|
|
35
|
+
return InternalLink.fromPartial(base ?? {});
|
|
36
|
+
},
|
|
37
|
+
fromPartial(object) {
|
|
38
|
+
const message = createBaseInternalLink();
|
|
39
|
+
message.url = object.url ?? "";
|
|
40
|
+
message.description = object.description ?? "";
|
|
41
|
+
message.canShowDescription = object.canShowDescription ?? false;
|
|
42
|
+
message.portalType = object.portalType ?? "";
|
|
43
|
+
return message;
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
function isSet(value) {
|
|
47
|
+
return value !== null && value !== undefined;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=InternalLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InternalLink.js","sourceRoot":"","sources":["../../protobuf/InternalLink.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,YAAY;AACZ,gCAAgC;AAChC,iCAAiC;AACjC,6BAA6B;AAW7B,SAAS,sBAAsB;IAC7B,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,kBAAkB,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;AACjF,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAA6B;IACpD,QAAQ,CAAC,MAAW;QAClB,OAAO;YACL,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;YAC3D,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE;YACnF,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,KAAK;YAC5G,UAAU,EAAE,KAAK,CAAC,MAAM,C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UAAU,IAAI,EAAE,CAAC;QAC7C,OAAO,OAAO,CAAC;IACjB,CAAC;CACF,CAAC;AAcF,SAAS,KAAK,CAAC,KAAU;IACvB,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface Link {
|
|
2
|
+
url?: string | undefined;
|
|
3
|
+
description?: string | undefined;
|
|
4
|
+
canShowDescription?: boolean | undefined;
|
|
5
|
+
}
|
|
6
|
+
export declare const Link: MessageFns<Link>;
|
|
7
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
8
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
9
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
10
|
+
} : Partial<T>;
|
|
11
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
12
|
+
type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
13
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
14
|
+
} & {
|
|
15
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
16
|
+
};
|
|
17
|
+
interface MessageFns<T> {
|
|
18
|
+
fromJSON(object: any): T;
|
|
19
|
+
toJSON(message: T): unknown;
|
|
20
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
21
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
package/protobuf/Link.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.5
|
|
4
|
+
// protoc v3.12.4
|
|
5
|
+
// source: Link.proto
|
|
6
|
+
function createBaseLink() {
|
|
7
|
+
return { url: "", description: "", canShowDescription: false };
|
|
8
|
+
}
|
|
9
|
+
export const Link = {
|
|
10
|
+
fromJSON(object) {
|
|
11
|
+
return {
|
|
12
|
+
url: isSet(object.url) ? globalThis.String(object.url) : "",
|
|
13
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
14
|
+
canShowDescription: isSet(object.canShowDescription) ? globalThis.Boolean(object.canShowDescription) : false,
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
toJSON(message) {
|
|
18
|
+
const obj = {};
|
|
19
|
+
if (message.url !== undefined && message.url !== "") {
|
|
20
|
+
obj.url = message.url;
|
|
21
|
+
}
|
|
22
|
+
if (message.description !== undefined && message.description !== "") {
|
|
23
|
+
obj.description = message.description;
|
|
24
|
+
}
|
|
25
|
+
if (message.canShowDescription !== undefined && message.canShowDescription !== false) {
|
|
26
|
+
obj.canShowDescription = message.canShowDescription;
|
|
27
|
+
}
|
|
28
|
+
return obj;
|
|
29
|
+
},
|
|
30
|
+
create(base) {
|
|
31
|
+
return Link.fromPartial(base ?? {});
|
|
32
|
+
},
|
|
33
|
+
fromPartial(object) {
|
|
34
|
+
const message = createBaseLink();
|
|
35
|
+
message.url = object.url ?? "";
|
|
36
|
+
message.description = object.description ?? "";
|
|
37
|
+
message.canShowDescription = object.canShowDescription ?? false;
|
|
38
|
+
return message;
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
function isSet(value) {
|
|
42
|
+
return value !== null && value !== undefined;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=Link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Link.js","sourceRoot":"","sources":["../../protobuf/Link.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,YAAY;AACZ,gCAAgC;AAChC,iCAAiC;AACjC,qBAAqB;AAUrB,SAAS,cAAc;IACrB,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,WA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AC/C,CAAC;IACD,WAAW,CAAwC,MAAS;QAC1D,MAAM,OAAO,GAAG,cAAc,EAAE,CAAC;QACjC,OAAO,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;QAC/B,OAAO,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,EAAE,CAAC;QAC/C,OAAO,CAAC,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,IAAI,KAAK,CAAC;QAChE,OAAO,OAAO,CAAC;IACjB,CAAC;CACF,CAAC;AAcF,SAAS,KAAK,CAAC,KAAU;IACvB,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { InternalLink } from "./InternalLink";
|
|
2
|
+
import { Link } from "./Link";
|
|
3
|
+
export interface MiniProgrammeCard {
|
|
4
|
+
id?: number | undefined;
|
|
5
|
+
title?: string | undefined;
|
|
6
|
+
programmeLink?: InternalLink | undefined;
|
|
7
|
+
universityLink?: Link | undefined;
|
|
8
|
+
universityId?: number | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare const MiniProgrammeCard: MessageFns<MiniProgrammeCard>;
|
|
11
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
12
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
13
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
14
|
+
} : Partial<T>;
|
|
15
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
16
|
+
type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
17
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
18
|
+
} & {
|
|
19
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
20
|
+
};
|
|
21
|
+
interface MessageFns<T> {
|
|
22
|
+
fromJSON(object: any): T;
|
|
23
|
+
toJSON(message: T): unknown;
|
|
24
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
25
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.5
|
|
4
|
+
// protoc v3.12.4
|
|
5
|
+
// source: MiniProgrammeCard.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { InternalLink } from "./InternalLink";
|
|
8
|
+
import { Link } from "./Link";
|
|
9
|
+
function createBaseMiniProgrammeCard() {
|
|
10
|
+
return { id: 0, title: "", programmeLink: undefined, universityLink: undefined, universityId: 0 };
|
|
11
|
+
}
|
|
12
|
+
export const MiniProgrammeCard = {
|
|
13
|
+
fromJSON(object) {
|
|
14
|
+
return {
|
|
15
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
16
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
17
|
+
programmeLink: isSet(object.programmeLink) ? InternalLink.fromJSON(object.programmeLink) : undefined,
|
|
18
|
+
universityLink: isSet(object.universityLink) ? Link.fromJSON(object.universityLink) : undefined,
|
|
19
|
+
universityId: isSet(object.universityId) ? globalThis.Number(object.universityId) : 0,
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
toJSON(message) {
|
|
23
|
+
const obj = {};
|
|
24
|
+
if (message.id !== undefined && message.id !== 0) {
|
|
25
|
+
obj.id = Math.round(message.id);
|
|
26
|
+
}
|
|
27
|
+
if (message.title !== undefined && message.title !== "") {
|
|
28
|
+
obj.title = message.title;
|
|
29
|
+
}
|
|
30
|
+
if (message.programmeLink !== undefined) {
|
|
31
|
+
obj.programmeLink = InternalLink.toJSON(message.programmeLink);
|
|
32
|
+
}
|
|
33
|
+
if (message.universityLink !== undefined) {
|
|
34
|
+
obj.universityLink = Link.toJSON(message.universityLink);
|
|
35
|
+
}
|
|
36
|
+
if (message.universityId !== undefined && message.universityId !== 0) {
|
|
37
|
+
obj.universityId = Math.round(message.universityId);
|
|
38
|
+
}
|
|
39
|
+
return obj;
|
|
40
|
+
},
|
|
41
|
+
create(base) {
|
|
42
|
+
return MiniProgrammeCard.fromPartial(base ?? {});
|
|
43
|
+
},
|
|
44
|
+
fromPartial(object) {
|
|
45
|
+
const message = createBaseMiniProgrammeCard();
|
|
46
|
+
message.id = object.id ?? 0;
|
|
47
|
+
message.title = object.title ?? "";
|
|
48
|
+
message.programmeLink = (object.programmeLink !== undefined && object.programmeLink !== null)
|
|
49
|
+
? InternalLink.fromPartial(object.programmeLink)
|
|
50
|
+
: undefined;
|
|
51
|
+
message.universityLink = (object.universityLink !== undefined && object.universityLink !== null)
|
|
52
|
+
? Link.fromPartial(object.universityLink)
|
|
53
|
+
: undefined;
|
|
54
|
+
message.universityId = object.universityId ?? 0;
|
|
55
|
+
return message;
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
function isSet(value) {
|
|
59
|
+
return value !== null && value !== undefined;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=MiniProgrammeCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MiniProgrammeCard.js","sourceRoot":"","sources":["../../protobuf/MiniProgrammeCard.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,YAAY;AACZ,gCAAgC;AAChC,iCAAiC;AACjC,kCAAkC;AAElC,oBAAoB;AACpB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAU9B,SAAS,2BAA2B;IAClC,OAAO,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,aAAa,EAAE,SAAS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,CAAC,SAAS,CAAC;QACd,OAAO,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,CAAC,CAAC;QAChD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF,CAAC;AAcF,SAAS,KAAK,CAAC,KAAU;IACvB,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../protobuf/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './mini-programme-card-client';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clients/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ProtobufClient } from "./protobuf-client";
|
|
2
|
+
import { MiniProgrammeCard } from "../../protobuf/MiniProgrammeCard";
|
|
3
|
+
export declare class MiniProgrammeCardClient extends ProtobufClient<MiniProgrammeCard> {
|
|
4
|
+
protected constructModel(data: Record<string, any>): MiniProgrammeCard;
|
|
5
|
+
protected getModelName(): string;
|
|
6
|
+
protected getVersion(): string;
|
|
7
|
+
isPublic(): boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ProtobufClient } from "./protobuf-client";
|
|
2
|
+
import { MiniProgrammeCard } from "../../protobuf/MiniProgrammeCard";
|
|
3
|
+
export class MiniProgrammeCardClient extends ProtobufClient {
|
|
4
|
+
constructModel(data) {
|
|
5
|
+
return MiniProgrammeCard.fromJSON(data);
|
|
6
|
+
}
|
|
7
|
+
getModelName() {
|
|
8
|
+
return 'mini-programme-card';
|
|
9
|
+
}
|
|
10
|
+
getVersion() {
|
|
11
|
+
return 'v1';
|
|
12
|
+
}
|
|
13
|
+
isPublic() {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=mini-programme-card-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mini-programme-card-client.js","sourceRoot":"","sources":["../../../src/clients/mini-programme-card-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,MAAM,OAAO,uBAAwB,SAAQ,cAAiC;IAEnE,cAAc,CAAC,IAAyB;QACjD,OAAO,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAES,YAAY;QACrB,OAAO,qBAAqB,CAAC;IAC9B,CAAC;IAES,UAAU;QACnB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,QAAQ;QACd,OAAO,IAAI,CAAC;IACb,CAAC;CAED"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PortalMap } from "../types/portal-map";
|
|
2
|
+
export declare abstract class ProtobufClient<T> {
|
|
3
|
+
private readonly domainClient;
|
|
4
|
+
constructor(baseUrl: string, seed: number, apiKey?: string, portalMap?: PortalMap);
|
|
5
|
+
fetch(id: number): Promise<T>;
|
|
6
|
+
fetchMultiple(ids: number[]): Promise<T[]>;
|
|
7
|
+
protected abstract constructModel(data: Record<string, any>): T;
|
|
8
|
+
protected abstract getModelName(): string;
|
|
9
|
+
protected abstract getVersion(): string;
|
|
10
|
+
abstract isPublic(): boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DomainClient } from "../domain-client";
|
|
2
|
+
export class ProtobufClient {
|
|
3
|
+
domainClient;
|
|
4
|
+
constructor(baseUrl, seed, apiKey, portalMap) {
|
|
5
|
+
this.domainClient = new DomainClient(baseUrl, apiKey, this.getModelName(), this.getVersion(), this.isPublic(), seed);
|
|
6
|
+
}
|
|
7
|
+
async fetch(id) {
|
|
8
|
+
const results = await this.domainClient.doRequest([id]);
|
|
9
|
+
return this.constructModel(results[0]);
|
|
10
|
+
}
|
|
11
|
+
async fetchMultiple(ids) {
|
|
12
|
+
const results = await this.domainClient.doRequest(ids);
|
|
13
|
+
return results.map((data) => this.constructModel(data));
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=protobuf-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protobuf-client.js","sourceRoot":"","sources":["../../../src/clients/protobuf-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIhD,MAAM,OAAgB,cAAc;IAClB,YAAY,CAAsB;IAEnD,YACC,OAAe,EACf,IAAY,EACZ,MAAe,EACf,SAAqB;QAErB,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CACnC,OAAO,EACP,MAAM,EACN,IAAI,CAAC,YAAY,EAAE,EACnB,IAAI,CAAC,UAAU,EAAE,EACjB,IAAI,CAAC,QAAQ,EAAE,EACf,IAAI,CACJ,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,KAAK,CAAC,EAAU;QAC5B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,YAAa,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACxD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,GAAa;QACvC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,YAAa,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QACxD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;IACzD,CAAC;CAQD"}
|
package/src/domain-client.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import Axios from "axios";
|
|
2
|
+
import { BadRequestException } from "./exceptions/bad-request-exception";
|
|
3
|
+
import { InternalServerException } from "./exceptions/internal-server-exception";
|
|
4
|
+
import { NotFoundException } from "./exceptions/not-found-exception";
|
|
5
|
+
export class DomainClient {
|
|
6
|
+
baseUrl;
|
|
7
|
+
apiKey;
|
|
8
|
+
model;
|
|
9
|
+
version;
|
|
10
|
+
isPublic;
|
|
11
|
+
seed;
|
|
9
12
|
constructor(baseUrl, apiKey, model, version, isPublic, seed) {
|
|
10
13
|
this.baseUrl = baseUrl;
|
|
11
14
|
this.apiKey = apiKey;
|
|
@@ -21,7 +24,7 @@ class DomainClient {
|
|
|
21
24
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
22
25
|
config["headers"] = { 'x-api-key': this.apiKey };
|
|
23
26
|
}
|
|
24
|
-
const axiosResponse = await
|
|
27
|
+
const axiosResponse = await Axios.get(url, config);
|
|
25
28
|
const response = axiosResponse.data;
|
|
26
29
|
this.handleErrors(response);
|
|
27
30
|
const models = [];
|
|
@@ -36,13 +39,13 @@ class DomainClient {
|
|
|
36
39
|
}
|
|
37
40
|
handleErrors(response) {
|
|
38
41
|
if (!response.status) {
|
|
39
|
-
throw new
|
|
42
|
+
throw new InternalServerException(response.message);
|
|
40
43
|
}
|
|
41
44
|
if (response.status === 400) {
|
|
42
|
-
throw new
|
|
45
|
+
throw new BadRequestException(response.message);
|
|
43
46
|
}
|
|
44
47
|
if (response.status === 404) {
|
|
45
|
-
throw new
|
|
48
|
+
throw new NotFoundException(response.message);
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
51
|
buildUrl(ids) {
|
|
@@ -57,5 +60,4 @@ class DomainClient {
|
|
|
57
60
|
return this.isPublic && this.apiKey === undefined;
|
|
58
61
|
}
|
|
59
62
|
}
|
|
60
|
-
exports.DomainClient = DomainClient;
|
|
61
63
|
//# sourceMappingURL=domain-client.js.map
|
package/src/domain-client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-client.js","sourceRoot":"","sources":["../../src/domain-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"domain-client.js","sourceRoot":"","sources":["../../src/domain-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAKrE,MAAM,OAAO,YAAY;IAGP;IACA;IACA;IACA;IACA;IACA;IANjB,YACiB,OAAe,EACf,MAA0B,EAC1B,KAAa,EACb,OAAe,EACf,QAAiB,EACjB,IAAY;QALZ,YAAO,GAAP,OAAO,CAAQ;QACf,WAAM,GAAN,MAAM,CAAoB;QAC1B,UAAK,GAAL,KAAK,CAAQ;QACb,YAAO,GAAP,OAAO,CAAQ;QACf,aAAQ,GAAR,QAAQ,CAAS;QACjB,SAAI,GAAJ,IAAI,CAAQ;IAE7B,CAAC;IAEM,KAAK,CAAC,SAAS,CAAC,GAAa;QACnC,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QAC/B,MAAM,MAAM,GAAuB,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAA;QAC5D,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE;YAC9B,sEAAsE;YACtE,MAAM,CAAC,SAAS,CAAC,GAAG,EAAC,WAAW,EAAE,IAAI,CAAC,MAAM,EAAC,CAAA;SAC9C;QACD,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,G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Q,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC;IACnD,CAAC;CACD"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BadRequestException = void 0;
|
|
4
|
-
class BadRequestException extends Error {
|
|
1
|
+
export class BadRequestException extends Error {
|
|
5
2
|
}
|
|
6
|
-
exports.BadRequestException = BadRequestException;
|
|
7
3
|
//# sourceMappingURL=bad-request-exception.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bad-request-exception.js","sourceRoot":"","sources":["../../../src/exceptions/bad-request-exception.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bad-request-exception.js","sourceRoot":"","sources":["../../../src/exceptions/bad-request-exception.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,mBAAoB,SAAQ,KAAK;CAC7C"}
|