@studyportals/domain-client 4.13.0-beta.0 → 4.13.1-beta.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 (136) hide show
  1. package/index.js +31 -63
  2. package/index.js.map +1 -1
  3. package/package.json +14 -23
  4. package/src/domain-client.d.ts +4 -0
  5. package/src/domain-client.js +42 -30
  6. package/src/domain-client.js.map +1 -1
  7. package/src/exceptions/bad-request-exception.js +1 -5
  8. package/src/exceptions/bad-request-exception.js.map +1 -1
  9. package/src/exceptions/client-exception.js +1 -5
  10. package/src/exceptions/client-exception.js.map +1 -1
  11. package/src/exceptions/internal-server-exception.js +1 -5
  12. package/src/exceptions/internal-server-exception.js.map +1 -1
  13. package/src/exceptions/not-found-exception.js +1 -5
  14. package/src/exceptions/not-found-exception.js.map +1 -1
  15. package/src/exceptions/property-not-available-exception.js +1 -5
  16. package/src/exceptions/property-not-available-exception.js.map +1 -1
  17. package/src/factories/DateFactory.js +1 -5
  18. package/src/factories/DateFactory.js.map +1 -1
  19. package/src/factories/InternalLinkFactory.js +1 -5
  20. package/src/factories/InternalLinkFactory.js.map +1 -1
  21. package/src/i-api-response.js +1 -2
  22. package/src/i-class-factory.js +1 -2
  23. package/src/i-model-description.js +1 -5
  24. package/src/i-model-description.js.map +1 -1
  25. package/src/model-client.js +42 -29
  26. package/src/model-client.js.map +1 -1
  27. package/src/model-factory.js +10 -14
  28. package/src/model-factory.js.map +1 -1
  29. package/src/models/bestfit-programme/bestfit-programme-client.js +2 -6
  30. package/src/models/bestfit-programme/bestfit-programme-client.js.map +1 -1
  31. package/src/models/bestfit-programme/i-best-fit-programme.js +1 -2
  32. package/src/models/bestfit-programme/i-city.js +1 -2
  33. package/src/models/bestfit-programme/i-living-cost.js +1 -2
  34. package/src/models/common/i-city.js +1 -2
  35. package/src/models/common/i-country.js +1 -2
  36. package/src/models/common/i-english-requirements.js +1 -2
  37. package/src/models/common/i-g-p-a-requirement.js +1 -2
  38. package/src/models/common/i-internal-link.js +1 -2
  39. package/src/models/common/i-logo.js +1 -2
  40. package/src/models/common/i-tuition-fee.js +1 -2
  41. package/src/models/compare-programme/compare-programme-client.js +2 -6
  42. package/src/models/compare-programme/compare-programme-client.js.map +1 -1
  43. package/src/models/compare-programme/i-compare-programme.js +1 -2
  44. package/src/models/copilot-country/copilot-country-client.js +2 -6
  45. package/src/models/copilot-country/copilot-country-client.js.map +1 -1
  46. package/src/models/copilot-country/i-copilot-country.js +1 -2
  47. package/src/models/copilot-country/i-copilot-ranking-card.js +1 -2
  48. package/src/models/copilot-programme/copilot-programme-client.js +2 -6
  49. package/src/models/copilot-programme/copilot-programme-client.js.map +1 -1
  50. package/src/models/copilot-programme/i-copilot-programme.js +1 -2
  51. package/src/models/customerio-organisation/customerio-organisation-client.js +2 -6
  52. package/src/models/customerio-organisation/customerio-organisation-client.js.map +1 -1
  53. package/src/models/customerio-organisation/i-customer-io-organisation.js +1 -2
  54. package/src/models/customerio-organisation/i-review.js +1 -2
  55. package/src/models/customerio-programme/customerio-programme-client.js +2 -6
  56. package/src/models/customerio-programme/customerio-programme-client.js.map +1 -1
  57. package/src/models/customerio-programme/i-customer-io-programme.js +1 -2
  58. package/src/models/customerio-programme/i-internal-link.js +1 -2
  59. package/src/models/organisation-card/i-organisation-card.js +1 -2
  60. package/src/models/organisation-card/i-ranking-discipline.js +1 -2
  61. package/src/models/organisation-card/organisation-card-client.js +2 -6
  62. package/src/models/organisation-card/organisation-card-client.js.map +1 -1
  63. package/src/models/organisation-for-search/i-organisation-for-search.js +1 -2
  64. package/src/models/organisation-for-search/public-organisation-for-search-client.js +2 -6
  65. package/src/models/organisation-for-search/public-organisation-for-search-client.js.map +1 -1
  66. package/src/models/organisation-search-document/i-organisation-search-document.js +1 -2
  67. package/src/models/organisation-search-document/organisation-search-document-client.js +2 -6
  68. package/src/models/organisation-search-document/organisation-search-document-client.js.map +1 -1
  69. package/src/models/programme-card/i-click-tracking-data.js +1 -2
  70. package/src/models/programme-card/i-cover.js +1 -2
  71. package/src/models/programme-card/i-deadline.js +1 -2
  72. package/src/models/programme-card/i-duration.js +1 -2
  73. package/src/models/programme-card/i-internal-link.js +1 -2
  74. package/src/models/programme-card/i-link.js +1 -2
  75. package/src/models/programme-card/i-location.js +1 -2
  76. package/src/models/programme-card/i-logo.js +1 -2
  77. package/src/models/programme-card/i-optional-link.js +1 -2
  78. package/src/models/programme-card/i-programme-card.js +1 -2
  79. package/src/models/programme-card/i-start-date.js +1 -2
  80. package/src/models/programme-card/i-timing.js +1 -2
  81. package/src/models/programme-card/i-tracked-link.js +1 -2
  82. package/src/models/programme-card/i-tracking.js +1 -2
  83. package/src/models/programme-card/i-tuition-fee.js +1 -2
  84. package/src/models/programme-card/programme-card-client.js +2 -6
  85. package/src/models/programme-card/programme-card-client.js.map +1 -1
  86. package/src/models/ranking-cards/i-ranking-card.js +1 -2
  87. package/src/models/ranking-cards/i-ranking-cards.js +1 -2
  88. package/src/models/ranking-cards/i-ranking.js +1 -2
  89. package/src/models/ranking-cards/public-ranking-cards-client.js +2 -6
  90. package/src/models/ranking-cards/public-ranking-cards-client.js.map +1 -1
  91. package/src/models/scholarship-card/i-scholarship-card.js +1 -2
  92. package/src/models/scholarship-card/public-scholarship-card-client.js +2 -6
  93. package/src/models/scholarship-card/public-scholarship-card-client.js.map +1 -1
  94. package/src/models/search-country-faq/i-search-country-faq.js +1 -2
  95. package/src/models/search-country-faq/public-search-country-faq-client.js +2 -6
  96. package/src/models/search-country-faq/public-search-country-faq-client.js.map +1 -1
  97. package/src/models/search-discipline/i-search-discipline.js +1 -2
  98. package/src/models/search-discipline/public-search-discipline-client.js +2 -6
  99. package/src/models/search-discipline/public-search-discipline-client.js.map +1 -1
  100. package/src/models/search-projection/i-geo-targeting-configuration.js +1 -2
  101. package/src/models/search-projection/i-geo-targeting-values.js +1 -2
  102. package/src/models/search-projection/i-organisation-values.js +1 -2
  103. package/src/models/search-projection/i-premium-values.js +1 -2
  104. package/src/models/search-projection/i-search-projection.js +1 -2
  105. package/src/models/search-projection/i-tuition-values.js +1 -2
  106. package/src/models/search-projection/search-projection-client.js +2 -6
  107. package/src/models/search-projection/search-projection-client.js.map +1 -1
  108. package/src/models/sitemap-articles-info/i-sitemap-article-info.js +1 -2
  109. package/src/models/sitemap-articles-info/sitemap-articles-info-client.js +2 -6
  110. package/src/models/sitemap-articles-info/sitemap-articles-info-client.js.map +1 -1
  111. package/src/models/sitemap-cities-info/i-sitemap-city-info.js +1 -2
  112. package/src/models/sitemap-cities-info/sitemap-cities-info-client.js +2 -6
  113. package/src/models/sitemap-cities-info/sitemap-cities-info-client.js.map +1 -1
  114. package/src/models/sitemap-countries-info/i-sitemap-country-info.js +1 -2
  115. package/src/models/sitemap-countries-info/sitemap-countries-info-client.js +2 -6
  116. package/src/models/sitemap-countries-info/sitemap-countries-info-client.js.map +1 -1
  117. package/src/models/sitemap-country-degree-info/i-degree-info.js +1 -2
  118. package/src/models/sitemap-country-degree-info/i-sitemap-country-degree-info.js +1 -2
  119. package/src/models/sitemap-country-degree-info/sitemap-country-degree-info-client.js +2 -6
  120. package/src/models/sitemap-country-degree-info/sitemap-country-degree-info-client.js.map +1 -1
  121. package/src/models/sitemap-disciplines-info/i-sitemap-discipline-info.js +1 -2
  122. package/src/models/sitemap-disciplines-info/sitemap-disciplines-info-client.js +2 -6
  123. package/src/models/sitemap-disciplines-info/sitemap-disciplines-info-client.js.map +1 -1
  124. package/src/models/sitemap-organisations-info/i-sitemap-organisation-info.js +1 -2
  125. package/src/models/sitemap-organisations-info/sitemap-organisations-info-client.js +2 -6
  126. package/src/models/sitemap-organisations-info/sitemap-organisations-info-client.js.map +1 -1
  127. package/src/models/sitemap-programme-info/i-sitemap-programme-info.js +1 -2
  128. package/src/models/sitemap-programme-info/sitemap-programme-info-client.js +2 -6
  129. package/src/models/sitemap-programme-info/sitemap-programme-info-client.js.map +1 -1
  130. package/src/models/sitemap-rankings-info/i-sitemap-rankings-info.js +1 -2
  131. package/src/models/sitemap-rankings-info/sitemap-rankings-info-client.js +2 -6
  132. package/src/models/sitemap-rankings-info/sitemap-rankings-info-client.js.map +1 -1
  133. package/src/types/portal-map.js +1 -2
  134. package/src/types/portal-type.js +2 -5
  135. package/src/types/portal-type.js.map +1 -1
  136. package/src/types.js +1 -2
package/index.js CHANGED
@@ -1,64 +1,32 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CopilotCountryClient = exports.CopilotProgrammeClient = exports.OrganisationCardClient = exports.PublicOrganisationForSearchClient = exports.ModelClient = exports.PortalType = exports.CompareProgrammeClient = exports.PublicRankingCardsClient = exports.PublicScholarshipCardClient = exports.SitemapCitiesInfoClient = exports.SitemapArticlesInfoClient = exports.SitemapRankingsInfoClient = exports.OrganisationSearchDocumentClient = exports.SitemapOrganisationsInfoClient = exports.CustomerIOOrganisationClient = exports.SitemapDisciplinesInfoClient = exports.PublicSearchDisciplineClient = exports.SitemapCountryDegreeInfoClient = exports.SitemapCountriesInfoClient = exports.PublicSearchCountryFaqClient = exports.SitemapProgrammeInfoClient = exports.CustomerIOProgrammeClient = exports.BestfitProgrammeClient = exports.SearchProjectionClient = exports.ProgrammeCardClient = exports.PropertyNotAvailableException = exports.NotFoundException = exports.InternalServerException = exports.ClientException = exports.BadRequestException = void 0;
4
- const bad_request_exception_1 = require("./src/exceptions/bad-request-exception");
5
- Object.defineProperty(exports, "BadRequestException", { enumerable: true, get: function () { return bad_request_exception_1.BadRequestException; } });
6
- const client_exception_1 = require("./src/exceptions/client-exception");
7
- Object.defineProperty(exports, "ClientException", { enumerable: true, get: function () { return client_exception_1.ClientException; } });
8
- const internal_server_exception_1 = require("./src/exceptions/internal-server-exception");
9
- Object.defineProperty(exports, "InternalServerException", { enumerable: true, get: function () { return internal_server_exception_1.InternalServerException; } });
10
- const not_found_exception_1 = require("./src/exceptions/not-found-exception");
11
- Object.defineProperty(exports, "NotFoundException", { enumerable: true, get: function () { return not_found_exception_1.NotFoundException; } });
12
- const property_not_available_exception_1 = require("./src/exceptions/property-not-available-exception");
13
- Object.defineProperty(exports, "PropertyNotAvailableException", { enumerable: true, get: function () { return property_not_available_exception_1.PropertyNotAvailableException; } });
14
- const programme_card_client_1 = require("./src/models/programme-card/programme-card-client");
15
- Object.defineProperty(exports, "ProgrammeCardClient", { enumerable: true, get: function () { return programme_card_client_1.ProgrammeCardClient; } });
16
- const search_projection_client_1 = require("./src/models/search-projection/search-projection-client");
17
- Object.defineProperty(exports, "SearchProjectionClient", { enumerable: true, get: function () { return search_projection_client_1.SearchProjectionClient; } });
18
- const bestfit_programme_client_1 = require("./src/models/bestfit-programme/bestfit-programme-client");
19
- Object.defineProperty(exports, "BestfitProgrammeClient", { enumerable: true, get: function () { return bestfit_programme_client_1.BestfitProgrammeClient; } });
20
- const customerio_programme_client_1 = require("./src/models/customerio-programme/customerio-programme-client");
21
- Object.defineProperty(exports, "CustomerIOProgrammeClient", { enumerable: true, get: function () { return customerio_programme_client_1.CustomerIOProgrammeClient; } });
22
- const sitemap_programme_info_client_1 = require("./src/models/sitemap-programme-info/sitemap-programme-info-client");
23
- Object.defineProperty(exports, "SitemapProgrammeInfoClient", { enumerable: true, get: function () { return sitemap_programme_info_client_1.SitemapProgrammeInfoClient; } });
24
- const public_search_country_faq_client_1 = require("./src/models/search-country-faq/public-search-country-faq-client");
25
- Object.defineProperty(exports, "PublicSearchCountryFaqClient", { enumerable: true, get: function () { return public_search_country_faq_client_1.PublicSearchCountryFaqClient; } });
26
- const sitemap_countries_info_client_1 = require("./src/models/sitemap-countries-info/sitemap-countries-info-client");
27
- Object.defineProperty(exports, "SitemapCountriesInfoClient", { enumerable: true, get: function () { return sitemap_countries_info_client_1.SitemapCountriesInfoClient; } });
28
- const sitemap_country_degree_info_client_1 = require("./src/models/sitemap-country-degree-info/sitemap-country-degree-info-client");
29
- Object.defineProperty(exports, "SitemapCountryDegreeInfoClient", { enumerable: true, get: function () { return sitemap_country_degree_info_client_1.SitemapCountryDegreeInfoClient; } });
30
- const public_search_discipline_client_1 = require("./src/models/search-discipline/public-search-discipline-client");
31
- Object.defineProperty(exports, "PublicSearchDisciplineClient", { enumerable: true, get: function () { return public_search_discipline_client_1.PublicSearchDisciplineClient; } });
32
- const sitemap_disciplines_info_client_1 = require("./src/models/sitemap-disciplines-info/sitemap-disciplines-info-client");
33
- Object.defineProperty(exports, "SitemapDisciplinesInfoClient", { enumerable: true, get: function () { return sitemap_disciplines_info_client_1.SitemapDisciplinesInfoClient; } });
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 public_ranking_cards_client_1 = require("./src/models/ranking-cards/public-ranking-cards-client");
51
- Object.defineProperty(exports, "PublicRankingCardsClient", { enumerable: true, get: function () { return public_ranking_cards_client_1.PublicRankingCardsClient; } });
52
- const portal_type_1 = require("./src/types/portal-type");
53
- Object.defineProperty(exports, "PortalType", { enumerable: true, get: function () { return portal_type_1.PortalType; } });
54
- const model_client_1 = require("./src/model-client");
55
- Object.defineProperty(exports, "ModelClient", { enumerable: true, get: function () { return model_client_1.ModelClient; } });
56
- const compare_programme_client_1 = require("./src/models/compare-programme/compare-programme-client");
57
- Object.defineProperty(exports, "CompareProgrammeClient", { enumerable: true, get: function () { return compare_programme_client_1.CompareProgrammeClient; } });
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 { SitemapProgrammeInfoClient } from "./src/models/sitemap-programme-info/sitemap-programme-info-client";
11
+ import { PublicSearchCountryFaqClient } from "./src/models/search-country-faq/public-search-country-faq-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 { PublicRankingCardsClient } from './src/models/ranking-cards/public-ranking-cards-client';
25
+ import { PortalType } from "./src/types/portal-type";
26
+ import { ModelClient } from "./src/model-client";
27
+ import { CompareProgrammeClient } from "./src/models/compare-programme/compare-programme-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, SitemapProgrammeInfoClient, PublicSearchCountryFaqClient, SitemapCountriesInfoClient, SitemapCountryDegreeInfoClient, PublicSearchDisciplineClient, SitemapDisciplinesInfoClient, CustomerIOOrganisationClient, SitemapOrganisationsInfoClient, OrganisationSearchDocumentClient, SitemapRankingsInfoClient, SitemapArticlesInfoClient, SitemapCitiesInfoClient, PublicScholarshipCardClient, PublicRankingCardsClient, CompareProgrammeClient, PortalType, ModelClient, PublicOrganisationForSearchClient, OrganisationCardClient, CopilotProgrammeClient, CopilotCountryClient };
64
32
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,kFAA4E;AAsF3E,oGAtFQ,2CAAmB,OAsFR;AArFpB,wEAAmE;AAsFlE,gGAtFQ,kCAAe,OAsFR;AArFhB,0FAAoF;AAsFnF,wGAtFQ,mDAAuB,OAsFR;AArFxB,8EAAwE;AAsFvE,kGAtFQ,uCAAiB,OAsFR;AArFlB,wGAAiG;AAsFhG,8GAtFQ,gEAA6B,OAsFR;AAzE9B,6FAAwF;AAsFvF,oGAtFQ,2CAAmB,OAsFR;AA/EpB,sGAAiG;AAsFhG,uGAtFQ,iDAAsB,OAsFR;AAlFvB,sGAAiG;AAsFhG,uGAtFQ,iDAAsB,OAsFR;AAhFvB,+GAA0G;AAsFzG,0GAtFQ,uDAAyB,OAsFR;AApF1B,qHAA+G;AAsF9G,2GAtFQ,0DAA0B,OAsFR;AApF3B,uHAAgH;AAsF/G,6GAtFQ,+DAA4B,OAsFR;AApF7B,q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E,iCAAiC,EAAE,MAAM,4EAA4E,CAAA;AAE9H,OAAO,EAAE,sBAAsB,EAAE,MAAM,yDAAyD,CAAA;AAEhG,OAAO,EAAE,oBAAoB,EAAE,MAAM,qDAAqD,CAAA;AAG1F,OAAO,EACN,mBAAmB,EACnB,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,6BAA6B,EAa7B,mBAAmB,EAOnB,sBAAsB,EAItB,sBAAsB,EAMtB,yBAAyB,EAEzB,0BAA0B,EAE1B,4BAA4B,EAE5B,0BAA0B,EAG1B,8BAA8B,EAE9B,4BAA4B,EAE5B,4BAA4B,EAK5B,4BAA4B,EAE5B,8BAA8B,EAE9B,gCAAgC,EAEhC,yBAAyB,EAEzB,yBAAyB,EAEzB,uBAAuB,EAEvB,2BAA2B,EAI3B,wBAAwB,EAExB,sBAAsB,EACtB,UAAU,EAEV,WAAW,EAEX,iCAAiC,EAGjC,sBAAsB,EAGtB,sBAAsB,EACtB,oBAAoB,EAEpB,CAAA"}
package/package.json CHANGED
@@ -1,12 +1,9 @@
1
1
  {
2
2
  "name": "@studyportals/domain-client",
3
- "version": "4.13.0-beta.0",
3
+ "version": "4.13.1-beta.0",
4
4
  "description": "Responsible for fetching data from the Domain API",
5
5
  "main": "index.js",
6
6
  "author": "StudyPortals B.V.",
7
- "contributors": [
8
- "braaibander <danny@studyportals.com>"
9
- ],
10
7
  "license": "BSD-3-Clause",
11
8
  "scripts": {
12
9
  "test": "mocha --reporter spec \"tests/**/*.test.ts\"",
@@ -15,7 +12,7 @@
15
12
  "lint:fix": "eslint . --ext .ts --fix",
16
13
  "pre-push": "npm run test && npm run coverage && npm run lint",
17
14
  "prepare-dist": "npm run test && rm -fR bin && npx tsc && cp package.json bin/package.json && rm -fR bin/tests",
18
- "publish-beta": "npm run prepare-dist && npm publish ./bin --tag beta",
15
+ "publish-beta": "npm version prerelease --preid=beta && npm run prepare-dist && npm publish ./bin --tag beta",
19
16
  "publish-major": "npm version major && npm run prepare-dist && npm publish ./bin",
20
17
  "publish-minor": "npm version minor && npm run prepare-dist && npm publish ./bin",
21
18
  "publish-patch": "npm version patch && npm run prepare-dist && npm publish ./bin",
@@ -26,30 +23,24 @@
26
23
  "pre-push": "npm run pre-push"
27
24
  }
28
25
  },
29
- "dependencies": {
30
- "axios": "^1.6.0"
31
- },
32
26
  "devDependencies": {
33
- "@studyportals/code-style": "^2.0.4",
27
+ "@studyportals/code-style": "^2.0.5",
34
28
  "@testdeck/mocha": "^0.3.3",
35
- "@types/axios": "^0.14.0",
36
- "@types/mocha": "^10.0.0",
37
- "@types/moxios": "^0.4.9",
38
- "@types/node": "^14.14.8",
29
+ "@types/mocha": "^10.0.9",
30
+ "@types/node": "^22.7.5",
39
31
  "@types/reflect-metadata": "^0.1.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",
44
- "eslint-plugin-mocha": "^10.1.0",
32
+ "@types/sinon": "^17.0.3",
45
33
  "husky": "^4.3.0",
46
- "mocha": "^10.1.0",
47
- "moxios": "^0.4.0",
34
+ "mocha": "^10.7.3",
48
35
  "nyc": "^15.1.0",
49
36
  "source-map-support": "^0.5.19",
50
- "ts-node": "^10.9.1",
51
- "tslint": "^6.1.3",
37
+ "tsx": "^4.19.1",
52
38
  "typemoq": "^2.1.0",
53
- "typescript": "^4.9.3"
39
+ "typescript": "^5.6.3"
40
+ },
41
+ "dependencies": {
42
+ "fetch-mock": "^11.1.5",
43
+ "node-fetch": "^3.3.2",
44
+ "sinon": "^19.0.2"
54
45
  }
55
46
  }
@@ -1,3 +1,4 @@
1
+ import { IApiResponse } from "./i-api-response";
1
2
  import { IModelDescription } from "./i-model-description";
2
3
  export declare class DomainClient {
3
4
  readonly baseUrl: string;
@@ -8,6 +9,9 @@ export declare class DomainClient {
8
9
  readonly seed: number;
9
10
  constructor(baseUrl: string, apiKey: string | undefined, model: string, version: string, isPublic: boolean, seed: number);
10
11
  doRequest(ids: number[]): Promise<IModelDescription[]>;
12
+ fetching(url: string, headers: {
13
+ [key: string]: string;
14
+ }): Promise<IApiResponse>;
11
15
  private handleErrors;
12
16
  private buildUrl;
13
17
  private shouldAddPublicPrefix;
@@ -1,11 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DomainClient = void 0;
4
- const axios_1 = require("axios");
5
- const bad_request_exception_1 = require("./exceptions/bad-request-exception");
6
- const internal_server_exception_1 = require("./exceptions/internal-server-exception");
7
- const not_found_exception_1 = require("./exceptions/not-found-exception");
8
- class DomainClient {
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { BadRequestException } from "./exceptions/bad-request-exception";
11
+ import { InternalServerException } from "./exceptions/internal-server-exception";
12
+ import { NotFoundException } from "./exceptions/not-found-exception";
13
+ import fetch from "node-fetch";
14
+ export class DomainClient {
9
15
  constructor(baseUrl, apiKey, model, version, isPublic, seed) {
10
16
  this.baseUrl = baseUrl;
11
17
  this.apiKey = apiKey;
@@ -14,35 +20,42 @@ class DomainClient {
14
20
  this.isPublic = isPublic;
15
21
  this.seed = seed;
16
22
  }
17
- async doRequest(ids) {
18
- const url = this.buildUrl(ids);
19
- const config = { baseURL: this.baseUrl };
20
- if (this.apiKey !== undefined) {
21
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
22
- config["headers"] = { 'x-api-key': this.apiKey };
23
- }
24
- const axiosResponse = await axios_1.default.get(url, config);
25
- const response = axiosResponse.data;
26
- this.handleErrors(response);
27
- const models = [];
28
- for (const id of ids) {
29
- const modelData = response.data[id];
30
- if (!modelData) {
31
- continue;
23
+ doRequest(ids) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ const url = this.buildUrl(ids);
26
+ const headers = {};
27
+ if (this.apiKey !== undefined) {
28
+ headers['x-api-key'] = this.apiKey;
32
29
  }
33
- models.push(modelData);
34
- }
35
- return models;
30
+ const data = yield this.fetching(url, headers);
31
+ this.handleErrors(data);
32
+ const models = [];
33
+ for (const id of ids) {
34
+ const modelData = data.data[id];
35
+ if (!modelData) {
36
+ continue;
37
+ }
38
+ models.push(modelData);
39
+ }
40
+ return models;
41
+ });
42
+ }
43
+ fetching(url, headers) {
44
+ return __awaiter(this, void 0, void 0, function* () {
45
+ const response = yield fetch(url, { headers });
46
+ const data = yield response.json();
47
+ return data;
48
+ });
36
49
  }
37
50
  handleErrors(response) {
38
51
  if (!response.status) {
39
- throw new internal_server_exception_1.InternalServerException(response.message);
52
+ throw new InternalServerException(response.message);
40
53
  }
41
54
  if (response.status === 400) {
42
- throw new bad_request_exception_1.BadRequestException(response.message);
55
+ throw new BadRequestException(response.message);
43
56
  }
44
57
  if (response.status === 404) {
45
- throw new not_found_exception_1.NotFoundException(response.message);
58
+ throw new NotFoundException(response.message);
46
59
  }
47
60
  }
48
61
  buildUrl(ids) {
@@ -57,5 +70,4 @@ class DomainClient {
57
70
  return this.isPublic && this.apiKey === undefined;
58
71
  }
59
72
  }
60
- exports.DomainClient = DomainClient;
61
73
  //# sourceMappingURL=domain-client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"domain-client.js","sourceRoot":"","sources":["../../src/domain-client.ts"],"names":[],"mappings":";;;AAAA,iCAAkD;AAElD,8EAAyE;AACzE,sFAAiF;AACjF,0EAAqE;AAKrE,MAAa,YAAY;IAExB,YACiB,OAAe,EACf,MAA0B,EAC1B,KAAa,EACb,OAAe,EACf,QAAiB,EACjB,IAA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AED,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAC7B,MAAM,IAAI,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/C,CAAC;IACF,CAAC;IAEO,QAAQ,CAAC,GAAa;QAC7B,MAAM,YAAY,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;QACnE,IAAI,KAAK,GAAG,GAAG,YAAY,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,UAAU,IAAI,CAAC,IAAI,EAAE,CAAC;QAC9E,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;YACtB,KAAK,IAAI,OAAO,EAAE,EAAE,CAAC;QACtB,CAAC;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IAEO,qBAAqB;QAC5B,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC;IACnD,CAAC;CACD"}
@@ -1,7 +1,3 @@
1
- "use strict";
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":";;;AAAA,MAAa,mBAAoB,SAAQ,KAAK;CAC7C;AADD,kDACC"}
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"}
@@ -1,7 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ClientException = void 0;
4
- class ClientException extends Error {
1
+ export class ClientException extends Error {
5
2
  }
6
- exports.ClientException = ClientException;
7
3
  //# sourceMappingURL=client-exception.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-exception.js","sourceRoot":"","sources":["../../../src/exceptions/client-exception.ts"],"names":[],"mappings":";;;AAAA,MAAa,eAAgB,SAAQ,KAAK;CACzC;AADD,0CACC"}
1
+ {"version":3,"file":"client-exception.js","sourceRoot":"","sources":["../../../src/exceptions/client-exception.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,eAAgB,SAAQ,KAAK;CACzC"}
@@ -1,7 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InternalServerException = void 0;
4
- class InternalServerException extends Error {
1
+ export class InternalServerException extends Error {
5
2
  }
6
- exports.InternalServerException = InternalServerException;
7
3
  //# sourceMappingURL=internal-server-exception.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal-server-exception.js","sourceRoot":"","sources":["../../../src/exceptions/internal-server-exception.ts"],"names":[],"mappings":";;;AAAA,MAAa,uBAAwB,SAAQ,KAAK;CACjD;AADD,0DACC"}
1
+ {"version":3,"file":"internal-server-exception.js","sourceRoot":"","sources":["../../../src/exceptions/internal-server-exception.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,uBAAwB,SAAQ,KAAK;CACjD"}
@@ -1,7 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotFoundException = void 0;
4
- class NotFoundException extends Error {
1
+ export class NotFoundException extends Error {
5
2
  }
6
- exports.NotFoundException = NotFoundException;
7
3
  //# sourceMappingURL=not-found-exception.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"not-found-exception.js","sourceRoot":"","sources":["../../../src/exceptions/not-found-exception.ts"],"names":[],"mappings":";;;AAAA,MAAa,iBAAkB,SAAQ,KAAK;CAC3C;AADD,8CACC"}
1
+ {"version":3,"file":"not-found-exception.js","sourceRoot":"","sources":["../../../src/exceptions/not-found-exception.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,iBAAkB,SAAQ,KAAK;CAC3C"}
@@ -1,7 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PropertyNotAvailableException = void 0;
4
- class PropertyNotAvailableException extends Error {
1
+ export class PropertyNotAvailableException extends Error {
5
2
  }
6
- exports.PropertyNotAvailableException = PropertyNotAvailableException;
7
3
  //# sourceMappingURL=property-not-available-exception.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"property-not-available-exception.js","sourceRoot":"","sources":["../../../src/exceptions/property-not-available-exception.ts"],"names":[],"mappings":";;;AAAA,MAAa,6BAA8B,SAAQ,KAAK;CACvD;AADD,sEACC"}
1
+ {"version":3,"file":"property-not-available-exception.js","sourceRoot":"","sources":["../../../src/exceptions/property-not-available-exception.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,6BAA8B,SAAQ,KAAK;CACvD"}
@@ -1,10 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DateFactory = void 0;
4
- class DateFactory {
1
+ export class DateFactory {
5
2
  create(data, parameters) {
6
3
  return new Date(parameters[0]);
7
4
  }
8
5
  }
9
- exports.DateFactory = DateFactory;
10
6
  //# sourceMappingURL=DateFactory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DateFactory.js","sourceRoot":"","sources":["../../../src/factories/DateFactory.ts"],"names":[],"mappings":";;;AAGA,MAAa,WAAW;IAChB,MAAM,CAAC,IAAW,EAAE,UAAoB;QAC9C,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAChC,CAAC;CACD;AAJD,kCAIC"}
1
+ {"version":3,"file":"DateFactory.js","sourceRoot":"","sources":["../../../src/factories/DateFactory.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,WAAW;IAChB,MAAM,CAAC,IAAW,EAAE,UAAoB;QAC9C,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAChC,CAAC;CACD"}
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InternalLinkFactory = void 0;
4
- class InternalLinkFactory {
1
+ export class InternalLinkFactory {
5
2
  constructor(portalMap) {
6
3
  this.portalMap = portalMap;
7
4
  }
@@ -16,5 +13,4 @@ class InternalLinkFactory {
16
13
  return url || '';
17
14
  }
18
15
  }
19
- exports.InternalLinkFactory = InternalLinkFactory;
20
16
  //# sourceMappingURL=InternalLinkFactory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InternalLinkFactory.js","sourceRoot":"","sources":["../../../src/factories/InternalLinkFactory.ts"],"names":[],"mappings":";;;AAKA,MAAa,mBAAmB;IAG/B,YAAY,SAAoB;QAC/B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC5B,CAAC;IAEM,MAAM,CAAC,IAAW;QACxB,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,aAAa,EAAgB,CAAC,CAAC;QAEhF,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAY,CAAC;QACxC,IAAI,CAAC,QAAQ,CAAC,GAAG,GAAW,EAAE,CAAC,aAAa,GAAG,IAAI,CAAC;QAEpD,OAAO,IAAI,CAAC;IACb,CAAC;IAEO,gBAAgB,CAAC,UAAsB;QAC9C,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAC3C,OAAO,GAAG,IAAI,EAAE,CAAC;IAClB,CAAC;CAED;AArBD,kDAqBC"}
1
+ {"version":3,"file":"InternalLinkFactory.js","sourceRoot":"","sources":["../../../src/factories/InternalLinkFactory.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,mBAAmB;IAG/B,YAAY,SAAoB;QAC/B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC5B,CAAC;IAEM,MAAM,CAAC,IAAW;QACxB,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,aAAa,EAAgB,CAAC,CAAC;QAEhF,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAY,CAAC;QACxC,IAAI,CAAC,QAAQ,CAAC,GAAG,GAAW,EAAE,CAAC,aAAa,GAAG,IAAI,CAAC;QAEpD,OAAO,IAAI,CAAC;IACb,CAAC;IAEO,gBAAgB,CAAC,UAAsB;QAC9C,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAC3C,OAAO,GAAG,IAAI,EAAE,CAAC;IAClB,CAAC;CAED"}
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=i-api-response.js.map
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=i-class-factory.js.map
@@ -1,10 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isModelDescription = void 0;
4
1
  // eslint-disable-next-line
5
- function isModelDescription(arg) {
2
+ export function isModelDescription(arg) {
6
3
  // eslint-disable-next-line
7
4
  return arg && arg.class && (arg.func || arg.parameters);
8
5
  }
9
- exports.isModelDescription = isModelDescription;
10
6
  //# sourceMappingURL=i-model-description.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"i-model-description.js","sourceRoot":"","sources":["../../src/i-model-description.ts"],"names":[],"mappings":";;;AAQA,2BAA2B;AAC3B,SAAgB,kBAAkB,CAAC,GAAQ;IAC1C,2BAA2B;IAC3B,OAAO,GAAG,IAAI,GAAG,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;AACzD,CAAC;AAHD,gDAGC"}
1
+ {"version":3,"file":"i-model-description.js","sourceRoot":"","sources":["../../src/i-model-description.ts"],"names":[],"mappings":"AAQA,2BAA2B;AAC3B,MAAM,UAAU,kBAAkB,CAAC,GAAQ;IAC1C,2BAA2B;IAC3B,OAAO,GAAG,IAAI,GAAG,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;AACzD,CAAC"}
@@ -1,39 +1,53 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ModelClient = void 0;
4
- const domain_client_1 = require("./domain-client");
5
- const client_exception_1 = require("./exceptions/client-exception");
6
- const model_factory_1 = require("./model-factory");
7
- class ModelClient {
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { DomainClient } from "./domain-client";
11
+ import { ClientException } from "./exceptions/client-exception";
12
+ import { ModelFactory } from "./model-factory";
13
+ export class ModelClient {
8
14
  constructor(baseUrl, apiKey, seed, portalMap) {
9
15
  if (!baseUrl || !seed) {
10
16
  return;
11
17
  }
12
- this.modelFactory = new model_factory_1.ModelFactory(portalMap);
13
- this.domainClient = new domain_client_1.DomainClient(baseUrl, apiKey, this.getModelName(), this.getVersion(), this.isPublic(), seed);
18
+ this.modelFactory = new ModelFactory(portalMap);
19
+ this.domainClient = new DomainClient(baseUrl, apiKey, this.getModelName(), this.getVersion(), this.isPublic(), seed);
14
20
  }
15
- async fetch(id) {
16
- const modelDescriptions = await this.fetchDescription(id);
17
- return this.modelFactory.fromDescription(modelDescriptions);
21
+ fetch(id) {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const modelDescriptions = yield this.fetchDescription(id);
24
+ return this.modelFactory.fromDescription(modelDescriptions);
25
+ });
18
26
  }
19
- async fetchDescription(id) {
20
- if (!this.domainClient) {
21
- throw new client_exception_1.ClientException("Offline mode active: did you provide all parameters " +
22
- "in the constructor?");
23
- }
24
- const result = await this.domainClient.doRequest([id]);
25
- return result[0];
27
+ fetchDescription(id) {
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ if (!this.domainClient) {
30
+ throw new ClientException("Offline mode active: did you provide all parameters " +
31
+ "in the constructor?");
32
+ }
33
+ const result = yield this.domainClient.doRequest([id]);
34
+ return result[0];
35
+ });
26
36
  }
27
- async fetchMultiple(ids) {
28
- const descriptions = await this.fetchMultipleDescriptions(ids);
29
- return this.modelFactory.fromDescriptions(descriptions);
37
+ fetchMultiple(ids) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ const descriptions = yield this.fetchMultipleDescriptions(ids);
40
+ return this.modelFactory.fromDescriptions(descriptions);
41
+ });
30
42
  }
31
- async fetchMultipleDescriptions(ids) {
32
- if (!this.domainClient) {
33
- throw new client_exception_1.ClientException('Offline mode active: did you provide all parameters ' +
34
- 'in the constructor?');
35
- }
36
- return await this.domainClient.doRequest(ids);
43
+ fetchMultipleDescriptions(ids) {
44
+ return __awaiter(this, void 0, void 0, function* () {
45
+ if (!this.domainClient) {
46
+ throw new ClientException('Offline mode active: did you provide all parameters ' +
47
+ 'in the constructor?');
48
+ }
49
+ return yield this.domainClient.doRequest(ids);
50
+ });
37
51
  }
38
52
  fromDescription(description) {
39
53
  return this.modelFactory.fromDescription(description);
@@ -42,5 +56,4 @@ class ModelClient {
42
56
  return this.modelFactory.fromDescriptions(descriptions);
43
57
  }
44
58
  }
45
- exports.ModelClient = ModelClient;
46
59
  //# sourceMappingURL=model-client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-client.js","sourceRoot":"","sources":["../../src/model-client.ts"],"names":[],"mappings":";;;A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