From 30db6c864346c852fb7311fe6d683945e084947c Mon Sep 17 00:00:00 2001 From: Steliyan Dinkov Date: Fri, 20 Dec 2024 11:02:05 +0100 Subject: [PATCH] add vidis client --- .../vidis-sync-service.response.spec.ts | 71 ++ apps/server/src/infra/vidis-client/README.md | 46 ++ .../infra/vidis-client/generated/.gitignore | 4 + .../infra/vidis-client/generated/.npmignore | 1 + .../generated/.openapi-generator-ignore | 23 + .../generated/.openapi-generator/FILES | 21 + .../src/infra/vidis-client/generated/api.ts | 20 + .../vidis-client/generated/api/default-api.ts | 142 ++++ .../generated/api/education-provider-api.ts | 676 ++++++++++++++++++ .../generated/api/idmbetreiber-api.ts | 338 +++++++++ .../src/infra/vidis-client/generated/base.ts | 86 +++ .../infra/vidis-client/generated/common.ts | 150 ++++ .../vidis-client/generated/configuration.ts | 110 +++ .../infra/vidis-client/generated/git_push.sh | 57 ++ .../src/infra/vidis-client/generated/index.ts | 18 + .../generated/models/activation-dto.ts | 78 ++ .../generated/models/facet-value.ts | 36 + .../vidis-client/generated/models/facet.ts | 39 + .../vidis-client/generated/models/index.ts | 9 + .../generated/models/offer-category-dto.ts | 54 ++ .../generated/models/offer-dto.ts | 129 ++++ .../generated/models/page-activation-dto.ts | 72 ++ .../generated/models/page-offer-dto.ts | 72 ++ .../generated/models/page-school-dto.ts | 72 ++ .../generated/models/school-dto.ts | 90 +++ apps/server/src/infra/vidis-client/vidis.yml | 542 ++++++++++++++ .../entity/school-license.entity.ts | 5 - openapitools.json | 16 + package.json | 6 +- 29 files changed, 2976 insertions(+), 7 deletions(-) create mode 100644 apps/server/src/infra/sync/media-licenses/service/vidis-sync-service.response.spec.ts create mode 100644 apps/server/src/infra/vidis-client/README.md create mode 100644 apps/server/src/infra/vidis-client/generated/.gitignore create mode 100644 apps/server/src/infra/vidis-client/generated/.npmignore create mode 100644 apps/server/src/infra/vidis-client/generated/.openapi-generator-ignore create mode 100644 apps/server/src/infra/vidis-client/generated/.openapi-generator/FILES create mode 100644 apps/server/src/infra/vidis-client/generated/api.ts create mode 100644 apps/server/src/infra/vidis-client/generated/api/default-api.ts create mode 100644 apps/server/src/infra/vidis-client/generated/api/education-provider-api.ts create mode 100644 apps/server/src/infra/vidis-client/generated/api/idmbetreiber-api.ts create mode 100644 apps/server/src/infra/vidis-client/generated/base.ts create mode 100644 apps/server/src/infra/vidis-client/generated/common.ts create mode 100644 apps/server/src/infra/vidis-client/generated/configuration.ts create mode 100644 apps/server/src/infra/vidis-client/generated/git_push.sh create mode 100644 apps/server/src/infra/vidis-client/generated/index.ts create mode 100644 apps/server/src/infra/vidis-client/generated/models/activation-dto.ts create mode 100644 apps/server/src/infra/vidis-client/generated/models/facet-value.ts create mode 100644 apps/server/src/infra/vidis-client/generated/models/facet.ts create mode 100644 apps/server/src/infra/vidis-client/generated/models/index.ts create mode 100644 apps/server/src/infra/vidis-client/generated/models/offer-category-dto.ts create mode 100644 apps/server/src/infra/vidis-client/generated/models/offer-dto.ts create mode 100644 apps/server/src/infra/vidis-client/generated/models/page-activation-dto.ts create mode 100644 apps/server/src/infra/vidis-client/generated/models/page-offer-dto.ts create mode 100644 apps/server/src/infra/vidis-client/generated/models/page-school-dto.ts create mode 100644 apps/server/src/infra/vidis-client/generated/models/school-dto.ts create mode 100644 apps/server/src/infra/vidis-client/vidis.yml diff --git a/apps/server/src/infra/sync/media-licenses/service/vidis-sync-service.response.spec.ts b/apps/server/src/infra/sync/media-licenses/service/vidis-sync-service.response.spec.ts new file mode 100644 index 00000000000..b215e1153f0 --- /dev/null +++ b/apps/server/src/infra/sync/media-licenses/service/vidis-sync-service.response.spec.ts @@ -0,0 +1,71 @@ +import { HttpStatus } from '@nestjs/common'; +import { Test, TestingModule } from '@nestjs/testing'; +import { HttpModule } from '@nestjs/axios'; +import { createMock, DeepMocked } from '@golevelup/ts-jest'; +import { Logger } from '@src/core/logger'; +import { DefaultEncryptionService, EncryptionService, SymetricKeyEncryptionService } from '@infra/encryption'; +import { mediaSourceFactory } from '@modules/media-source/testing'; +import { MediaSourceDataFormat, MediaSourceService } from '@modules/media-source'; +import { MediaSchoolLicenseService } from '@modules/school-license'; +import { SchoolService } from '@modules/school'; +import MockAdapter from 'axios-mock-adapter'; +import axios from 'axios'; +import { vidisResponseFactory } from '../testing'; +import { VidisSyncService } from './vidis-sync.service'; + +describe(`${VidisSyncService.name} Integration`, () => { + let module: TestingModule; + let axiosMock: MockAdapter; + let service: VidisSyncService; + let encryptionService: DeepMocked; + + beforeAll(async () => { + module = await Test.createTestingModule({ + imports: [HttpModule], + providers: [ + VidisSyncService, + { provide: MediaSchoolLicenseService, useValue: createMock() }, + { provide: SchoolService, useValue: createMock() }, + { provide: MediaSourceService, useValue: createMock() }, + { provide: Logger, useValue: createMock() }, + { provide: DefaultEncryptionService, useValue: createMock() }, + ], + }).compile(); + + service = module.get(VidisSyncService); + encryptionService = module.get(DefaultEncryptionService); + axiosMock = new MockAdapter(axios); + }); + + afterAll(async () => { + await module.close(); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + describe('getSchoolActivationsFromVidis', () => { + describe('when the vidis media source is passed', () => { + const setup = () => { + const mediaSource = mediaSourceFactory.withBasicAuthConfig().build({ format: MediaSourceDataFormat.VIDIS }); + const vidisResponse = vidisResponseFactory.build(); + + encryptionService.decrypt.mockReturnValueOnce('username'); + encryptionService.decrypt.mockReturnValueOnce('password'); + + axiosMock.onGet().replyOnce(HttpStatus.OK, vidisResponse); + + return { mediaSource, vidisResponse }; + }; + + it('should return the school activation items from vidis', async () => { + const { mediaSource, vidisResponse } = setup(); + + const items = await service.getSchoolActivationsFromVidis(mediaSource); + + expect(items).toEqual(vidisResponse.items); + }); + }); + }); +}); diff --git a/apps/server/src/infra/vidis-client/README.md b/apps/server/src/infra/vidis-client/README.md new file mode 100644 index 00000000000..2a9f57615bc --- /dev/null +++ b/apps/server/src/infra/vidis-client/README.md @@ -0,0 +1,46 @@ +# VIDIS API CLIENT + +> A short introduction how this module can be used and the api client is generated. + +## How to use the api client + +The clients for the different Tsp endpoints should be created through TspClientFactory. +Through the create methods of the factory the basic configuration will be set. Currently the +factory sets the base url and generates the JWT used for the requests. You can use the client +like this: + +```typescript +export class MyNewService { + // inject the factory into the constructor + constructor(private readonly tspClientFactory: TspClientFactory) {} + + public async doSomeStuff(): Promise { + // this will create a fully initialized client + const exportClient = tspClientFactory.createExportClient(); + + // calling the api + const versionResponse = await exportClient.version(); + + + // do other stuff... + } +} +``` + +## How the code generation works + +> IMPORTANT: Currently we are using the `openapi.json` and not the spec from +> https://test2.schulportal-thueringen.de/tip-ms/api/swagger.json, because we have to patch the security schemas +> manually into to the specification so the generator can generate them correctly. The provided +> specification does not contain all necessary definitions. Only the `Export` endpoints are +> decorated with the security definitions. + +We are using the openapi-generator-cli to generate apis, models and supporting files in the +`generated` directory. **DO NOT** modify anything in the `generated` folder, because it will +be deleted on the next client generation. + +The client generation is done with the npm command `npm run generate-client:tsp-api`. This +will delete the old and create new files. We are using the `tsp-api` generator configuration +from the `openapitools.json` found in the repository root. You can add new endpoints by +extending the `FILTER` list in the `openapiNormalizer` section with new `operationId` entries. +New models must be added to the list of `models` in the `globalProperty` section. diff --git a/apps/server/src/infra/vidis-client/generated/.gitignore b/apps/server/src/infra/vidis-client/generated/.gitignore new file mode 100644 index 00000000000..149b5765472 --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/apps/server/src/infra/vidis-client/generated/.npmignore b/apps/server/src/infra/vidis-client/generated/.npmignore new file mode 100644 index 00000000000..999d88df693 --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/apps/server/src/infra/vidis-client/generated/.openapi-generator-ignore b/apps/server/src/infra/vidis-client/generated/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/apps/server/src/infra/vidis-client/generated/.openapi-generator/FILES b/apps/server/src/infra/vidis-client/generated/.openapi-generator/FILES new file mode 100644 index 00000000000..3d1040f30c3 --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/.openapi-generator/FILES @@ -0,0 +1,21 @@ +.gitignore +.npmignore +api.ts +api/default-api.ts +api/education-provider-api.ts +api/idmbetreiber-api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts +models/activation-dto.ts +models/facet-value.ts +models/facet.ts +models/index.ts +models/offer-category-dto.ts +models/offer-dto.ts +models/page-activation-dto.ts +models/page-offer-dto.ts +models/page-school-dto.ts +models/school-dto.ts diff --git a/apps/server/src/infra/vidis-client/generated/api.ts b/apps/server/src/infra/vidis-client/generated/api.ts new file mode 100644 index 00000000000..cb84e884965 --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/api.ts @@ -0,0 +1,20 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Vidis REST + * Vidis REST API + * + * The version of the OpenAPI document: v1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export * from './api/default-api'; +export * from './api/education-provider-api'; +export * from './api/idmbetreiber-api'; + diff --git a/apps/server/src/infra/vidis-client/generated/api/default-api.ts b/apps/server/src/infra/vidis-client/generated/api/default-api.ts new file mode 100644 index 00000000000..ad8d41cb9b2 --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/api/default-api.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Vidis REST + * Vidis REST API + * + * The version of the OpenAPI document: v1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +/** + * DefaultApi - axios parameter creator + * @export + */ +export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {string} type + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOpenAPI: async (type: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'type' is not null or undefined + assertParamExists('getOpenAPI', 'type', type) + const localVarPath = `/v1.0/openapi.{type}` + .replace(`{${"type"}}`, encodeURIComponent(String(type))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * DefaultApi - functional programming interface + * @export + */ +export const DefaultApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) + return { + /** + * + * @param {string} type + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOpenAPI(type: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOpenAPI(type, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DefaultApi.getOpenAPI']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * DefaultApi - factory interface + * @export + */ +export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = DefaultApiFp(configuration) + return { + /** + * + * @param {string} type + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOpenAPI(type: string, options?: any): AxiosPromise { + return localVarFp.getOpenAPI(type, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * DefaultApi - interface + * @export + * @interface DefaultApi + */ +export interface DefaultApiInterface { + /** + * + * @param {string} type + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApiInterface + */ + getOpenAPI(type: string, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * DefaultApi - object-oriented interface + * @export + * @class DefaultApi + * @extends {BaseAPI} + */ +export class DefaultApi extends BaseAPI implements DefaultApiInterface { + /** + * + * @param {string} type + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public getOpenAPI(type: string, options?: RawAxiosRequestConfig) { + return DefaultApiFp(this.configuration).getOpenAPI(type, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/apps/server/src/infra/vidis-client/generated/api/education-provider-api.ts b/apps/server/src/infra/vidis-client/generated/api/education-provider-api.ts new file mode 100644 index 00000000000..e1d5c94cd49 --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/api/education-provider-api.ts @@ -0,0 +1,676 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Vidis REST + * Vidis REST API + * + * The version of the OpenAPI document: v1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { ActivationDTO } from '../models'; +// @ts-ignore +import type { PageActivationDTO } from '../models'; +// @ts-ignore +import type { PageOfferDTO } from '../models'; +// @ts-ignore +import type { PageSchoolDTO } from '../models'; +/** + * EducationProviderApi - axios parameter creator + * @export + */ +export const EducationProviderApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * List the activation details for a selected owned offer, that has activated by the selected school. + * @param {string} offerId + * @param {string} organizationId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getActivationByOfferAndSchool: async (offerId: string, organizationId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'offerId' is not null or undefined + assertParamExists('getActivationByOfferAndSchool', 'offerId', offerId) + // verify required parameter 'organizationId' is not null or undefined + assertParamExists('getActivationByOfferAndSchool', 'organizationId', organizationId) + const localVarPath = `/v1.0/activation/offers/{offerId}/schools/{organizationId}/details` + .replace(`{${"offerId"}}`, encodeURIComponent(String(offerId))) + .replace(`{${"organizationId"}}`, encodeURIComponent(String(organizationId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List the activation details for a selected school, that has activated the selected owned offer. + * @param {string} organizationId + * @param {string} offerId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getActivationBySchoolAndOffer: async (organizationId: string, offerId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organizationId' is not null or undefined + assertParamExists('getActivationBySchoolAndOffer', 'organizationId', organizationId) + // verify required parameter 'offerId' is not null or undefined + assertParamExists('getActivationBySchoolAndOffer', 'offerId', offerId) + const localVarPath = `/v1.0/activation/schools/{organizationId}/offers/{offerId}/details` + .replace(`{${"organizationId"}}`, encodeURIComponent(String(organizationId))) + .replace(`{${"offerId"}}`, encodeURIComponent(String(offerId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all the activation details for all owned offer. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getActivations: async (page?: string, pageSize?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1.0/activation/details`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all owned offers, that has activated by any schools. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOffers: async (page?: string, pageSize?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1.0/activation/offers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all owned offers, that has activated by the selected school. + * @param {string} organizationId + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOffersBySchool: async (organizationId: string, page?: string, pageSize?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'organizationId' is not null or undefined + assertParamExists('getOffersBySchool', 'organizationId', organizationId) + const localVarPath = `/v1.0/activation/schools/{organizationId}/offers` + .replace(`{${"organizationId"}}`, encodeURIComponent(String(organizationId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all schools, that has activated any of the owned offers. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSchools: async (page?: string, pageSize?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1.0/activation/schools`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all schools, that has activated the selected owned offer. + * @param {string} offerId + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSchoolsByOffer: async (offerId: string, page?: string, pageSize?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'offerId' is not null or undefined + assertParamExists('getSchoolsByOffer', 'offerId', offerId) + const localVarPath = `/v1.0/activation/offers/{offerId}/schools` + .replace(`{${"offerId"}}`, encodeURIComponent(String(offerId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * EducationProviderApi - functional programming interface + * @export + */ +export const EducationProviderApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = EducationProviderApiAxiosParamCreator(configuration) + return { + /** + * List the activation details for a selected owned offer, that has activated by the selected school. + * @param {string} offerId + * @param {string} organizationId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getActivationByOfferAndSchool(offerId: string, organizationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getActivationByOfferAndSchool(offerId, organizationId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['EducationProviderApi.getActivationByOfferAndSchool']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List the activation details for a selected school, that has activated the selected owned offer. + * @param {string} organizationId + * @param {string} offerId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getActivationBySchoolAndOffer(organizationId: string, offerId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getActivationBySchoolAndOffer(organizationId, offerId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['EducationProviderApi.getActivationBySchoolAndOffer']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all the activation details for all owned offer. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getActivations(page?: string, pageSize?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getActivations(page, pageSize, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['EducationProviderApi.getActivations']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all owned offers, that has activated by any schools. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOffers(page?: string, pageSize?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOffers(page, pageSize, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['EducationProviderApi.getOffers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all owned offers, that has activated by the selected school. + * @param {string} organizationId + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOffersBySchool(organizationId: string, page?: string, pageSize?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOffersBySchool(organizationId, page, pageSize, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['EducationProviderApi.getOffersBySchool']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all schools, that has activated any of the owned offers. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSchools(page?: string, pageSize?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSchools(page, pageSize, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['EducationProviderApi.getSchools']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all schools, that has activated the selected owned offer. + * @param {string} offerId + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSchoolsByOffer(offerId: string, page?: string, pageSize?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSchoolsByOffer(offerId, page, pageSize, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['EducationProviderApi.getSchoolsByOffer']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * EducationProviderApi - factory interface + * @export + */ +export const EducationProviderApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = EducationProviderApiFp(configuration) + return { + /** + * List the activation details for a selected owned offer, that has activated by the selected school. + * @param {string} offerId + * @param {string} organizationId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getActivationByOfferAndSchool(offerId: string, organizationId: string, options?: any): AxiosPromise { + return localVarFp.getActivationByOfferAndSchool(offerId, organizationId, options).then((request) => request(axios, basePath)); + }, + /** + * List the activation details for a selected school, that has activated the selected owned offer. + * @param {string} organizationId + * @param {string} offerId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getActivationBySchoolAndOffer(organizationId: string, offerId: string, options?: any): AxiosPromise { + return localVarFp.getActivationBySchoolAndOffer(organizationId, offerId, options).then((request) => request(axios, basePath)); + }, + /** + * List all the activation details for all owned offer. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getActivations(page?: string, pageSize?: string, options?: any): AxiosPromise { + return localVarFp.getActivations(page, pageSize, options).then((request) => request(axios, basePath)); + }, + /** + * List all owned offers, that has activated by any schools. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOffers(page?: string, pageSize?: string, options?: any): AxiosPromise { + return localVarFp.getOffers(page, pageSize, options).then((request) => request(axios, basePath)); + }, + /** + * List all owned offers, that has activated by the selected school. + * @param {string} organizationId + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOffersBySchool(organizationId: string, page?: string, pageSize?: string, options?: any): AxiosPromise { + return localVarFp.getOffersBySchool(organizationId, page, pageSize, options).then((request) => request(axios, basePath)); + }, + /** + * List all schools, that has activated any of the owned offers. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSchools(page?: string, pageSize?: string, options?: any): AxiosPromise { + return localVarFp.getSchools(page, pageSize, options).then((request) => request(axios, basePath)); + }, + /** + * List all schools, that has activated the selected owned offer. + * @param {string} offerId + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSchoolsByOffer(offerId: string, page?: string, pageSize?: string, options?: any): AxiosPromise { + return localVarFp.getSchoolsByOffer(offerId, page, pageSize, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * EducationProviderApi - interface + * @export + * @interface EducationProviderApi + */ +export interface EducationProviderApiInterface { + /** + * List the activation details for a selected owned offer, that has activated by the selected school. + * @param {string} offerId + * @param {string} organizationId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EducationProviderApiInterface + */ + getActivationByOfferAndSchool(offerId: string, organizationId: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List the activation details for a selected school, that has activated the selected owned offer. + * @param {string} organizationId + * @param {string} offerId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EducationProviderApiInterface + */ + getActivationBySchoolAndOffer(organizationId: string, offerId: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List all the activation details for all owned offer. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EducationProviderApiInterface + */ + getActivations(page?: string, pageSize?: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List all owned offers, that has activated by any schools. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EducationProviderApiInterface + */ + getOffers(page?: string, pageSize?: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List all owned offers, that has activated by the selected school. + * @param {string} organizationId + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EducationProviderApiInterface + */ + getOffersBySchool(organizationId: string, page?: string, pageSize?: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List all schools, that has activated any of the owned offers. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EducationProviderApiInterface + */ + getSchools(page?: string, pageSize?: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List all schools, that has activated the selected owned offer. + * @param {string} offerId + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EducationProviderApiInterface + */ + getSchoolsByOffer(offerId: string, page?: string, pageSize?: string, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * EducationProviderApi - object-oriented interface + * @export + * @class EducationProviderApi + * @extends {BaseAPI} + */ +export class EducationProviderApi extends BaseAPI implements EducationProviderApiInterface { + /** + * List the activation details for a selected owned offer, that has activated by the selected school. + * @param {string} offerId + * @param {string} organizationId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EducationProviderApi + */ + public getActivationByOfferAndSchool(offerId: string, organizationId: string, options?: RawAxiosRequestConfig) { + return EducationProviderApiFp(this.configuration).getActivationByOfferAndSchool(offerId, organizationId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List the activation details for a selected school, that has activated the selected owned offer. + * @param {string} organizationId + * @param {string} offerId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EducationProviderApi + */ + public getActivationBySchoolAndOffer(organizationId: string, offerId: string, options?: RawAxiosRequestConfig) { + return EducationProviderApiFp(this.configuration).getActivationBySchoolAndOffer(organizationId, offerId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List all the activation details for all owned offer. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EducationProviderApi + */ + public getActivations(page?: string, pageSize?: string, options?: RawAxiosRequestConfig) { + return EducationProviderApiFp(this.configuration).getActivations(page, pageSize, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List all owned offers, that has activated by any schools. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EducationProviderApi + */ + public getOffers(page?: string, pageSize?: string, options?: RawAxiosRequestConfig) { + return EducationProviderApiFp(this.configuration).getOffers(page, pageSize, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List all owned offers, that has activated by the selected school. + * @param {string} organizationId + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EducationProviderApi + */ + public getOffersBySchool(organizationId: string, page?: string, pageSize?: string, options?: RawAxiosRequestConfig) { + return EducationProviderApiFp(this.configuration).getOffersBySchool(organizationId, page, pageSize, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List all schools, that has activated any of the owned offers. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EducationProviderApi + */ + public getSchools(page?: string, pageSize?: string, options?: RawAxiosRequestConfig) { + return EducationProviderApiFp(this.configuration).getSchools(page, pageSize, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List all schools, that has activated the selected owned offer. + * @param {string} offerId + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EducationProviderApi + */ + public getSchoolsByOffer(offerId: string, page?: string, pageSize?: string, options?: RawAxiosRequestConfig) { + return EducationProviderApiFp(this.configuration).getSchoolsByOffer(offerId, page, pageSize, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/apps/server/src/infra/vidis-client/generated/api/idmbetreiber-api.ts b/apps/server/src/infra/vidis-client/generated/api/idmbetreiber-api.ts new file mode 100644 index 00000000000..f41affcfc54 --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/api/idmbetreiber-api.ts @@ -0,0 +1,338 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Vidis REST + * Vidis REST API + * + * The version of the OpenAPI document: v1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { PageOfferDTO } from '../models'; +/** + * IDMBetreiberApi - axios parameter creator + * @export + */ +export const IDMBetreiberApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * List all offers, that has activated by any schools in the selected region. + * @param {string} regionName + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getActivatedOffersByRegion: async (regionName: string, page?: string, pageSize?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'regionName' is not null or undefined + assertParamExists('getActivatedOffersByRegion', 'regionName', regionName) + const localVarPath = `/v1.0/offers/activated/by-region/{regionName}` + .replace(`{${"regionName"}}`, encodeURIComponent(String(regionName))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all offers, that has activated by the selected school. + * @param {string} schoolName + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getActivatedOffersBySchool: async (schoolName: string, page?: string, pageSize?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'schoolName' is not null or undefined + assertParamExists('getActivatedOffersBySchool', 'schoolName', schoolName) + const localVarPath = `/v1.0/offers/activated/by-school/{schoolName}` + .replace(`{${"schoolName"}}`, encodeURIComponent(String(schoolName))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * List all offers. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAllOffers: async (page?: string, pageSize?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/v1.0/offers/all`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (pageSize !== undefined) { + localVarQueryParameter['pageSize'] = pageSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * IDMBetreiberApi - functional programming interface + * @export + */ +export const IDMBetreiberApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = IDMBetreiberApiAxiosParamCreator(configuration) + return { + /** + * List all offers, that has activated by any schools in the selected region. + * @param {string} regionName + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getActivatedOffersByRegion(regionName: string, page?: string, pageSize?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getActivatedOffersByRegion(regionName, page, pageSize, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['IDMBetreiberApi.getActivatedOffersByRegion']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all offers, that has activated by the selected school. + * @param {string} schoolName + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getActivatedOffersBySchool(schoolName: string, page?: string, pageSize?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getActivatedOffersBySchool(schoolName, page, pageSize, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['IDMBetreiberApi.getActivatedOffersBySchool']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * List all offers. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAllOffers(page?: string, pageSize?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAllOffers(page, pageSize, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['IDMBetreiberApi.getAllOffers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * IDMBetreiberApi - factory interface + * @export + */ +export const IDMBetreiberApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = IDMBetreiberApiFp(configuration) + return { + /** + * List all offers, that has activated by any schools in the selected region. + * @param {string} regionName + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getActivatedOffersByRegion(regionName: string, page?: string, pageSize?: string, options?: any): AxiosPromise { + return localVarFp.getActivatedOffersByRegion(regionName, page, pageSize, options).then((request) => request(axios, basePath)); + }, + /** + * List all offers, that has activated by the selected school. + * @param {string} schoolName + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getActivatedOffersBySchool(schoolName: string, page?: string, pageSize?: string, options?: any): AxiosPromise { + return localVarFp.getActivatedOffersBySchool(schoolName, page, pageSize, options).then((request) => request(axios, basePath)); + }, + /** + * List all offers. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAllOffers(page?: string, pageSize?: string, options?: any): AxiosPromise { + return localVarFp.getAllOffers(page, pageSize, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * IDMBetreiberApi - interface + * @export + * @interface IDMBetreiberApi + */ +export interface IDMBetreiberApiInterface { + /** + * List all offers, that has activated by any schools in the selected region. + * @param {string} regionName + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof IDMBetreiberApiInterface + */ + getActivatedOffersByRegion(regionName: string, page?: string, pageSize?: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List all offers, that has activated by the selected school. + * @param {string} schoolName + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof IDMBetreiberApiInterface + */ + getActivatedOffersBySchool(schoolName: string, page?: string, pageSize?: string, options?: RawAxiosRequestConfig): AxiosPromise; + + /** + * List all offers. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof IDMBetreiberApiInterface + */ + getAllOffers(page?: string, pageSize?: string, options?: RawAxiosRequestConfig): AxiosPromise; + +} + +/** + * IDMBetreiberApi - object-oriented interface + * @export + * @class IDMBetreiberApi + * @extends {BaseAPI} + */ +export class IDMBetreiberApi extends BaseAPI implements IDMBetreiberApiInterface { + /** + * List all offers, that has activated by any schools in the selected region. + * @param {string} regionName + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof IDMBetreiberApi + */ + public getActivatedOffersByRegion(regionName: string, page?: string, pageSize?: string, options?: RawAxiosRequestConfig) { + return IDMBetreiberApiFp(this.configuration).getActivatedOffersByRegion(regionName, page, pageSize, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List all offers, that has activated by the selected school. + * @param {string} schoolName + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof IDMBetreiberApi + */ + public getActivatedOffersBySchool(schoolName: string, page?: string, pageSize?: string, options?: RawAxiosRequestConfig) { + return IDMBetreiberApiFp(this.configuration).getActivatedOffersBySchool(schoolName, page, pageSize, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * List all offers. + * @param {string} [page] + * @param {string} [pageSize] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof IDMBetreiberApi + */ + public getAllOffers(page?: string, pageSize?: string, options?: RawAxiosRequestConfig) { + return IDMBetreiberApiFp(this.configuration).getAllOffers(page, pageSize, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/apps/server/src/infra/vidis-client/generated/base.ts b/apps/server/src/infra/vidis-client/generated/base.ts new file mode 100644 index 00000000000..8e0da683e38 --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/base.ts @@ -0,0 +1,86 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Vidis REST + * Vidis REST API + * + * The version of the OpenAPI document: v1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from './configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; + +export const BASE_PATH = "https://service-stage.vidis.schule/o/vidis-rest".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: RawAxiosRequestConfig; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath ?? basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + constructor(public field: string, msg?: string) { + super(msg); + this.name = "RequiredError" + } +} + +interface ServerMap { + [key: string]: { + url: string, + description: string, + }[]; +} + +/** + * + * @export + */ +export const operationServerMap: ServerMap = { +} diff --git a/apps/server/src/infra/vidis-client/generated/common.ts b/apps/server/src/infra/vidis-client/generated/common.ts new file mode 100644 index 00000000000..41ee1950725 --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/common.ts @@ -0,0 +1,150 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Vidis REST + * Vidis REST API + * + * The version of the OpenAPI document: v1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); + } + else { + Object.keys(parameter).forEach(currentKey => + setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) + ); + } + } + else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter); + } + else { + urlSearchParams.set(key, parameter); + } + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + setFlattenedQueryParams(searchParams, objects); + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/apps/server/src/infra/vidis-client/generated/configuration.ts b/apps/server/src/infra/vidis-client/generated/configuration.ts new file mode 100644 index 00000000000..a1ad12cf2bf --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/configuration.ts @@ -0,0 +1,110 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Vidis REST + * Vidis REST API + * + * The version of the OpenAPI document: v1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + serverIndex?: number; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * override server index + * + * @type {number} + * @memberof Configuration + */ + serverIndex?: number; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.serverIndex = param.serverIndex; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/apps/server/src/infra/vidis-client/generated/git_push.sh b/apps/server/src/infra/vidis-client/generated/git_push.sh new file mode 100644 index 00000000000..f53a75d4fab --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/apps/server/src/infra/vidis-client/generated/index.ts b/apps/server/src/infra/vidis-client/generated/index.ts new file mode 100644 index 00000000000..a3bf20513ac --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Vidis REST + * Vidis REST API + * + * The version of the OpenAPI document: v1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; +export * from "./models"; diff --git a/apps/server/src/infra/vidis-client/generated/models/activation-dto.ts b/apps/server/src/infra/vidis-client/generated/models/activation-dto.ts new file mode 100644 index 00000000000..0071d907f4b --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/models/activation-dto.ts @@ -0,0 +1,78 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Vidis REST + * Vidis REST API + * + * The version of the OpenAPI document: v1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ActivationDTO + */ +export interface ActivationDTO { + /** + * + * @type {string} + * @memberof ActivationDTO + */ + 'activationUserEmail'?: string; + /** + * + * @type {string} + * @memberof ActivationDTO + */ + 'generatedAVVLink'?: string; + /** + * + * @type {number} + * @memberof ActivationDTO + */ + 'offerId'?: number; + /** + * + * @type {string} + * @memberof ActivationDTO + */ + 'offerTitle'?: string; + /** + * + * @type {number} + * @memberof ActivationDTO + */ + 'organizationId'?: number; + /** + * + * @type {string} + * @memberof ActivationDTO + */ + 'organizationName'?: string; + /** + * + * @type {string} + * @memberof ActivationDTO + */ + 'schoolNameFromIdm'?: string; + /** + * + * @type {string} + * @memberof ActivationDTO + */ + 'schoolNumber'?: string; + /** + * + * @type {string} + * @memberof ActivationDTO + */ + 'x-class-name'?: string; +} + diff --git a/apps/server/src/infra/vidis-client/generated/models/facet-value.ts b/apps/server/src/infra/vidis-client/generated/models/facet-value.ts new file mode 100644 index 00000000000..0e9996a503a --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/models/facet-value.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Vidis REST + * Vidis REST API + * + * The version of the OpenAPI document: v1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface FacetValue + */ +export interface FacetValue { + /** + * + * @type {number} + * @memberof FacetValue + */ + 'numberOfOccurrences'?: number; + /** + * + * @type {string} + * @memberof FacetValue + */ + 'term'?: string; +} + diff --git a/apps/server/src/infra/vidis-client/generated/models/facet.ts b/apps/server/src/infra/vidis-client/generated/models/facet.ts new file mode 100644 index 00000000000..7811c2f15e3 --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/models/facet.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Vidis REST + * Vidis REST API + * + * The version of the OpenAPI document: v1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { FacetValue } from './facet-value'; + +/** + * + * @export + * @interface Facet + */ +export interface Facet { + /** + * + * @type {string} + * @memberof Facet + */ + 'facetCriteria'?: string; + /** + * + * @type {Array} + * @memberof Facet + */ + 'facetValues'?: Array; +} + diff --git a/apps/server/src/infra/vidis-client/generated/models/index.ts b/apps/server/src/infra/vidis-client/generated/models/index.ts new file mode 100644 index 00000000000..16f1caefb51 --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/models/index.ts @@ -0,0 +1,9 @@ +export * from './activation-dto'; +export * from './facet'; +export * from './facet-value'; +export * from './offer-category-dto'; +export * from './offer-dto'; +export * from './page-activation-dto'; +export * from './page-offer-dto'; +export * from './page-school-dto'; +export * from './school-dto'; diff --git a/apps/server/src/infra/vidis-client/generated/models/offer-category-dto.ts b/apps/server/src/infra/vidis-client/generated/models/offer-category-dto.ts new file mode 100644 index 00000000000..16415c1846e --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/models/offer-category-dto.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Vidis REST + * Vidis REST API + * + * The version of the OpenAPI document: v1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface OfferCategoryDTO + */ +export interface OfferCategoryDTO { + /** + * + * @type {Array} + * @memberof OfferCategoryDTO + */ + 'category'?: Array; + /** + * + * @type {Array} + * @memberof OfferCategoryDTO + */ + 'competency'?: Array; + /** + * + * @type {Array} + * @memberof OfferCategoryDTO + */ + 'gradeLevel'?: Array; + /** + * + * @type {Array} + * @memberof OfferCategoryDTO + */ + 'schoolType'?: Array; + /** + * + * @type {string} + * @memberof OfferCategoryDTO + */ + 'x-class-name'?: string; +} + diff --git a/apps/server/src/infra/vidis-client/generated/models/offer-dto.ts b/apps/server/src/infra/vidis-client/generated/models/offer-dto.ts new file mode 100644 index 00000000000..63d0c814fa5 --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/models/offer-dto.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Vidis REST + * Vidis REST API + * + * The version of the OpenAPI document: v1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { OfferCategoryDTO } from './offer-category-dto'; + +/** + * + * @export + * @interface OfferDTO + */ +export interface OfferDTO { + /** + * + * @type {number} + * @memberof OfferDTO + */ + 'educationProviderOrganizationId'?: number; + /** + * + * @type {string} + * @memberof OfferDTO + */ + 'educationProviderOrganizationName'?: string; + /** + * + * @type {string} + * @memberof OfferDTO + */ + 'educationProviderUserEmail'?: string; + /** + * + * @type {number} + * @memberof OfferDTO + */ + 'educationProviderUserId'?: number; + /** + * + * @type {string} + * @memberof OfferDTO + */ + 'educationProviderUserName'?: string; + /** + * + * @type {OfferCategoryDTO} + * @memberof OfferDTO + */ + 'offerCategories'?: OfferCategoryDTO; + /** + * + * @type {string} + * @memberof OfferDTO + */ + 'offerDescription'?: string; + /** + * + * @type {number} + * @memberof OfferDTO + */ + 'offerId'?: number; + /** + * + * @type {string} + * @memberof OfferDTO + */ + 'offerLink'?: string; + /** + * + * @type {string} + * @memberof OfferDTO + */ + 'offerLogo'?: string; + /** + * + * @type {string} + * @memberof OfferDTO + */ + 'offerLongTitle'?: string; + /** + * + * @type {number} + * @memberof OfferDTO + */ + 'offerResourcePk'?: number; + /** + * + * @type {string} + * @memberof OfferDTO + */ + 'offerStatus'?: string; + /** + * + * @type {string} + * @memberof OfferDTO + */ + 'offerTitle'?: string; + /** + * + * @type {number} + * @memberof OfferDTO + */ + 'offerVersion'?: number; + /** + * + * @type {Array} + * @memberof OfferDTO + */ + 'schoolActivations'?: Array; + /** + * + * @type {string} + * @memberof OfferDTO + */ + 'x-class-name'?: string; +} + diff --git a/apps/server/src/infra/vidis-client/generated/models/page-activation-dto.ts b/apps/server/src/infra/vidis-client/generated/models/page-activation-dto.ts new file mode 100644 index 00000000000..58d803f23ef --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/models/page-activation-dto.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Vidis REST + * Vidis REST API + * + * The version of the OpenAPI document: v1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ActivationDTO } from './activation-dto'; +// May contain unused imports in some cases +// @ts-ignore +import type { Facet } from './facet'; + +/** + * + * @export + * @interface PageActivationDTO + */ +export interface PageActivationDTO { + /** + * + * @type {Array} + * @memberof PageActivationDTO + */ + 'items'?: Array; + /** + * + * @type {number} + * @memberof PageActivationDTO + */ + 'lastPage'?: number; + /** + * + * @type {number} + * @memberof PageActivationDTO + */ + 'totalCount'?: number; + /** + * + * @type {number} + * @memberof PageActivationDTO + */ + 'pageSize'?: number; + /** + * + * @type {{ [key: string]: { [key: string]: string; }; }} + * @memberof PageActivationDTO + */ + 'actions'?: { [key: string]: { [key: string]: string; }; }; + /** + * + * @type {number} + * @memberof PageActivationDTO + */ + 'page'?: number; + /** + * + * @type {Array} + * @memberof PageActivationDTO + */ + 'facets'?: Array; +} + diff --git a/apps/server/src/infra/vidis-client/generated/models/page-offer-dto.ts b/apps/server/src/infra/vidis-client/generated/models/page-offer-dto.ts new file mode 100644 index 00000000000..c4a159f150e --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/models/page-offer-dto.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Vidis REST + * Vidis REST API + * + * The version of the OpenAPI document: v1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Facet } from './facet'; +// May contain unused imports in some cases +// @ts-ignore +import type { OfferDTO } from './offer-dto'; + +/** + * + * @export + * @interface PageOfferDTO + */ +export interface PageOfferDTO { + /** + * + * @type {Array} + * @memberof PageOfferDTO + */ + 'items'?: Array; + /** + * + * @type {number} + * @memberof PageOfferDTO + */ + 'lastPage'?: number; + /** + * + * @type {number} + * @memberof PageOfferDTO + */ + 'totalCount'?: number; + /** + * + * @type {number} + * @memberof PageOfferDTO + */ + 'pageSize'?: number; + /** + * + * @type {{ [key: string]: { [key: string]: string; }; }} + * @memberof PageOfferDTO + */ + 'actions'?: { [key: string]: { [key: string]: string; }; }; + /** + * + * @type {number} + * @memberof PageOfferDTO + */ + 'page'?: number; + /** + * + * @type {Array} + * @memberof PageOfferDTO + */ + 'facets'?: Array; +} + diff --git a/apps/server/src/infra/vidis-client/generated/models/page-school-dto.ts b/apps/server/src/infra/vidis-client/generated/models/page-school-dto.ts new file mode 100644 index 00000000000..c1cf369984b --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/models/page-school-dto.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Vidis REST + * Vidis REST API + * + * The version of the OpenAPI document: v1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { Facet } from './facet'; +// May contain unused imports in some cases +// @ts-ignore +import type { SchoolDTO } from './school-dto'; + +/** + * + * @export + * @interface PageSchoolDTO + */ +export interface PageSchoolDTO { + /** + * + * @type {Array} + * @memberof PageSchoolDTO + */ + 'items'?: Array; + /** + * + * @type {number} + * @memberof PageSchoolDTO + */ + 'lastPage'?: number; + /** + * + * @type {number} + * @memberof PageSchoolDTO + */ + 'totalCount'?: number; + /** + * + * @type {number} + * @memberof PageSchoolDTO + */ + 'pageSize'?: number; + /** + * + * @type {{ [key: string]: { [key: string]: string; }; }} + * @memberof PageSchoolDTO + */ + 'actions'?: { [key: string]: { [key: string]: string; }; }; + /** + * + * @type {number} + * @memberof PageSchoolDTO + */ + 'page'?: number; + /** + * + * @type {Array} + * @memberof PageSchoolDTO + */ + 'facets'?: Array; +} + diff --git a/apps/server/src/infra/vidis-client/generated/models/school-dto.ts b/apps/server/src/infra/vidis-client/generated/models/school-dto.ts new file mode 100644 index 00000000000..c5fc0cc9643 --- /dev/null +++ b/apps/server/src/infra/vidis-client/generated/models/school-dto.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Vidis REST + * Vidis REST API + * + * The version of the OpenAPI document: v1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface SchoolDTO + */ +export interface SchoolDTO { + /** + * + * @type {number} + * @memberof SchoolDTO + */ + 'organizationId'?: number; + /** + * + * @type {string} + * @memberof SchoolDTO + */ + 'organizationName'?: string; + /** + * + * @type {string} + * @memberof SchoolDTO + */ + 'schoolAddress'?: string; + /** + * + * @type {string} + * @memberof SchoolDTO + */ + 'schoolAdminEmailAddress'?: string; + /** + * + * @type {string} + * @memberof SchoolDTO + */ + 'schoolCity'?: string; + /** + * + * @type {string} + * @memberof SchoolDTO + */ + 'schoolName'?: string; + /** + * + * @type {string} + * @memberof SchoolDTO + */ + 'schoolNameFromIdm'?: string; + /** + * + * @type {string} + * @memberof SchoolDTO + */ + 'schoolNumber'?: string; + /** + * + * @type {string} + * @memberof SchoolDTO + */ + 'schoolRegion'?: string; + /** + * + * @type {string} + * @memberof SchoolDTO + */ + 'schoolZipcode'?: string; + /** + * + * @type {string} + * @memberof SchoolDTO + */ + 'x-class-name'?: string; +} + diff --git a/apps/server/src/infra/vidis-client/vidis.yml b/apps/server/src/infra/vidis-client/vidis.yml new file mode 100644 index 00000000000..c50c3a596ad --- /dev/null +++ b/apps/server/src/infra/vidis-client/vidis.yml @@ -0,0 +1,542 @@ +components: + schemas: + Facet: + properties: + facetCriteria: + type: string + facetValues: + items: + $ref: "#/components/schemas/FacetValue" + type: array + type: object + FacetValue: + properties: + numberOfOccurrences: + format: int32 + type: integer + term: + type: string + type: object + PageSchoolDTO: + properties: + items: + items: + $ref: "#/components/schemas/SchoolDTO" + type: array + lastPage: + format: int64 + type: integer + totalCount: + format: int64 + type: integer + pageSize: + format: int64 + type: integer + actions: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + page: + format: int64 + type: integer + facets: + items: + $ref: "#/components/schemas/Facet" + type: array + type: object + SchoolDTO: + properties: + organizationId: + format: int64 + type: integer + organizationName: + type: string + schoolAddress: + type: string + schoolAdminEmailAddress: + type: string + schoolCity: + type: string + schoolName: + type: string + schoolNameFromIdm: + type: string + schoolNumber: + type: string + schoolRegion: + type: string + schoolZipcode: + type: string + x-class-name: + default: hu.webtown.liferay.vidis.rest.dto.v1_0.SchoolDTO + readOnly: true + type: string + type: object + xml: + name: SchoolDTO + OfferCategoryDTO: + properties: + category: + items: + type: string + type: array + competency: + items: + type: string + type: array + gradeLevel: + items: + type: string + type: array + schoolType: + items: + type: string + type: array + x-class-name: + default: hu.webtown.liferay.vidis.rest.dto.v1_0.OfferCategoryDTO + readOnly: true + type: string + type: object + xml: + name: OfferCategoryDTO + OfferDTO: + properties: + educationProviderOrganizationId: + format: int64 + type: integer + educationProviderOrganizationName: + type: string + educationProviderUserEmail: + type: string + educationProviderUserId: + format: int64 + type: integer + educationProviderUserName: + type: string + offerCategories: + $ref: "#/components/schemas/OfferCategoryDTO" + offerDescription: + type: string + offerId: + format: int64 + type: integer + offerLink: + type: string + offerLogo: + type: string + offerLongTitle: + type: string + offerResourcePk: + format: int64 + type: integer + offerStatus: + type: string + offerTitle: + type: string + offerVersion: + format: int32 + type: integer + schoolActivations: + items: + type: string + type: array + x-class-name: + default: hu.webtown.liferay.vidis.rest.dto.v1_0.OfferDTO + readOnly: true + type: string + type: object + xml: + name: OfferDTO + PageOfferDTO: + properties: + items: + items: + $ref: "#/components/schemas/OfferDTO" + type: array + lastPage: + format: int64 + type: integer + totalCount: + format: int64 + type: integer + pageSize: + format: int64 + type: integer + actions: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + page: + format: int64 + type: integer + facets: + items: + $ref: "#/components/schemas/Facet" + type: array + type: object + ActivationDTO: + properties: + activationUserEmail: + type: string + generatedAVVLink: + type: string + offerId: + format: int64 + type: integer + offerTitle: + type: string + organizationId: + format: int64 + type: integer + organizationName: + type: string + schoolNameFromIdm: + type: string + schoolNumber: + type: string + x-class-name: + default: hu.webtown.liferay.vidis.rest.dto.v1_0.ActivationDTO + readOnly: true + type: string + type: object + xml: + name: ActivationDTO + PageActivationDTO: + properties: + items: + items: + $ref: "#/components/schemas/ActivationDTO" + type: array + lastPage: + format: int64 + type: integer + totalCount: + format: int64 + type: integer + pageSize: + format: int64 + type: integer + actions: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + page: + format: int64 + type: integer + facets: + items: + $ref: "#/components/schemas/Facet" + type: array + type: object +info: + description: Vidis REST API + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + title: Vidis REST + version: v1.0 +openapi: 3.0.1 +paths: + /v1.0/activation/schools: + get: + description: List all schools, that has activated any of the owned offers. + operationId: getSchools + parameters: + - in: query + name: page + schema: + type: string + - in: query + name: pageSize + schema: + type: string + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/PageSchoolDTO" + application/xml: + schema: + $ref: "#/components/schemas/PageSchoolDTO" + description: default response + tags: + - EducationProvider + /v1.0/activation/schools/{organizationId}/offers: + get: + description: List all owned offers, that has activated by the selected school. + operationId: getOffersBySchool + parameters: + - in: path + name: organizationId + required: true + schema: + type: string + - in: query + name: page + schema: + type: string + - in: query + name: pageSize + schema: + type: string + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/PageOfferDTO" + application/xml: + schema: + $ref: "#/components/schemas/PageOfferDTO" + description: default response + tags: + - EducationProvider + /v1.0/activation/details: + get: + description: List all the activation details for all owned offer. + operationId: getActivations + parameters: + - in: query + name: page + schema: + type: string + - in: query + name: pageSize + schema: + type: string + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/PageActivationDTO" + application/xml: + schema: + $ref: "#/components/schemas/PageActivationDTO" + description: default response + tags: + - EducationProvider + /v1.0/activation/offers: + get: + description: List all owned offers, that has activated by any schools. + operationId: getOffers + parameters: + - in: query + name: page + schema: + type: string + - in: query + name: pageSize + schema: + type: string + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/PageOfferDTO" + application/xml: + schema: + $ref: "#/components/schemas/PageOfferDTO" + description: default response + tags: + - EducationProvider + /v1.0/activation/offers/{offerId}/schools: + get: + description: List all schools, that has activated the selected owned offer. + operationId: getSchoolsByOffer + parameters: + - in: path + name: offerId + required: true + schema: + type: string + - in: query + name: page + schema: + type: string + - in: query + name: pageSize + schema: + type: string + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/PageSchoolDTO" + application/xml: + schema: + $ref: "#/components/schemas/PageSchoolDTO" + description: default response + tags: + - EducationProvider + /v1.0/activation/offers/{offerId}/schools/{organizationId}/details: + get: + description: >- + List the activation details for a selected owned offer, that has + activated by the selected school. + operationId: getActivationByOfferAndSchool + parameters: + - in: path + name: offerId + required: true + schema: + type: string + - in: path + name: organizationId + required: true + schema: + type: string + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/ActivationDTO" + application/xml: + schema: + $ref: "#/components/schemas/ActivationDTO" + description: default response + tags: + - EducationProvider + /v1.0/activation/schools/{organizationId}/offers/{offerId}/details: + get: + description: >- + List the activation details for a selected school, that has activated + the selected owned offer. + operationId: getActivationBySchoolAndOffer + parameters: + - in: path + name: organizationId + required: true + schema: + type: string + - in: path + name: offerId + required: true + schema: + type: string + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/ActivationDTO" + application/xml: + schema: + $ref: "#/components/schemas/ActivationDTO" + description: default response + tags: + - EducationProvider + /v1.0/offers/all: + get: + description: List all offers. + operationId: getAllOffers + parameters: + - in: query + name: page + schema: + type: string + - in: query + name: pageSize + schema: + type: string + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/PageOfferDTO" + application/xml: + schema: + $ref: "#/components/schemas/PageOfferDTO" + description: default response + tags: + - IDMBetreiber + /v1.0/offers/activated/by-school/{schoolName}: + get: + description: List all offers, that has activated by the selected school. + operationId: getActivatedOffersBySchool + parameters: + - in: path + name: schoolName + required: true + schema: + type: string + - in: query + name: page + schema: + type: string + - in: query + name: pageSize + schema: + type: string + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/PageOfferDTO" + application/xml: + schema: + $ref: "#/components/schemas/PageOfferDTO" + description: default response + tags: + - IDMBetreiber + /v1.0/offers/activated/by-region/{regionName}: + get: + description: >- + List all offers, that has activated by any schools in the selected + region. + operationId: getActivatedOffersByRegion + parameters: + - in: path + name: regionName + required: true + schema: + type: string + - in: query + name: page + schema: + type: string + - in: query + name: pageSize + schema: + type: string + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/PageOfferDTO" + application/xml: + schema: + $ref: "#/components/schemas/PageOfferDTO" + description: default response + tags: + - IDMBetreiber + /v1.0/openapi.{type}: + get: + operationId: getOpenAPI + parameters: + - in: path + name: type + required: true + schema: + type: string + responses: + default: + content: + application/json: {} + application/yaml: {} + description: default response +servers: + - url: https://service-stage.vidis.schule/o/vidis-rest/ diff --git a/apps/server/src/modules/school-license/entity/school-license.entity.ts b/apps/server/src/modules/school-license/entity/school-license.entity.ts index 54b7b74a89f..65b01d8b85c 100644 --- a/apps/server/src/modules/school-license/entity/school-license.entity.ts +++ b/apps/server/src/modules/school-license/entity/school-license.entity.ts @@ -1,11 +1,9 @@ import { Entity, Enum, Index, ManyToOne } from '@mikro-orm/core'; import { BaseEntityWithTimestamps } from '@shared/domain/entity/base.entity'; import { SchoolEntity } from '@shared/domain/entity'; -import { EntityId } from '@shared/domain/types'; import { SchoolLicenseType } from '../enum'; export interface SchoolLicenseProps { - id?: EntityId; school: SchoolEntity; type: SchoolLicenseType; } @@ -15,9 +13,6 @@ export interface SchoolLicenseProps { export abstract class SchoolLicenseEntity extends BaseEntityWithTimestamps { protected constructor(props: SchoolLicenseProps) { super(); - if (props.id != null) { - this.id = props.id; - } this.type = props.type; this.school = props.school; } diff --git a/openapitools.json b/openapitools.json index e074aa9db9f..e0b466bd5c0 100644 --- a/openapitools.json +++ b/openapitools.json @@ -58,6 +58,22 @@ "withInterfaces": true, "withSeparateModelsAndApi": true } + }, + "vidis-api": { + "generatorName": "typescript-axios", + "inputSpec": "./apps/server/src/infra/vidis-client/vidis.yml", + "output": "./apps/server/src/infra/vidis-client/generated", + "skipValidateSpec": true, + "enablePostProcessFile": true, + "additionalProperties": { + "apiPackage": "api", + "enumNameSuffix": "", + "enumPropertyNaming": "UPPERCASE", + "modelPackage": "models", + "supportsES6": true, + "withInterfaces": true, + "withSeparateModelsAndApi": true + } } } } diff --git a/package.json b/package.json index f05361db402..bf0dfdadb75 100644 --- a/package.json +++ b/package.json @@ -119,9 +119,10 @@ "generate-client:etherpad": "node ./scripts/generate-client.js -u 'http://localhost:9001/api/openapi.json' -p 'apps/server/src/infra/etherpad-client/etherpad-api-client' -c 'openapitools-config.json'", "pregenerate-client:tsp-api": "rimraf ./apps/server/src/infra/tsp-client/generated", "generate-client:tsp-api": "openapi-generator-cli generate -c ./openapitools.json --generator-key tsp-api", - "generate-client:lessons-api":"openapi-generator-cli generate -c ./openapitools.json --generator-key svs-lesson-api", + "generate-client:lessons-api": "openapi-generator-cli generate -c ./openapitools.json --generator-key svs-lesson-api", "pregenerate-client:tldraw-api": "rimraf ./apps/server/src/infra/tldraw-client/generated", - "generate-client:tldraw-api": "openapi-generator-cli generate -c ./openapitools.json --generator-key tldraw-api" + "generate-client:tldraw-api": "openapi-generator-cli generate -c ./openapitools.json --generator-key tldraw-api", + "generate-client:vidis-api": "openapi-generator-cli generate -c ./openapitools.json --generator-key vidis-api" }, "dependencies": { "@aws-sdk/lib-storage": "^3.617.0", @@ -245,6 +246,7 @@ "rss-parser": "^3.13.0", "rxjs": "^7.3.1", "sanitize-html": "^2.13.0", + "schulcloud-server": "file:", "serve-favicon": "^2.3.2", "service": "^0.1.4", "socket.io": "^4.7.5",