Skip to content

Commit 29a7c08

Browse files
committed
👽️(chore): generate joanie api client with open apiV3
1 parent ea3c089 commit 29a7c08

File tree

107 files changed

+5812
-4607
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+5812
-4607
lines changed

src/frontend/js/api/joanie/gen/ApiClientJoanie.ts

Lines changed: 5 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,20 @@ import type { BaseHttpRequest } from './core/BaseHttpRequest';
66
import type { OpenAPIConfig } from './core/OpenAPI';
77
import { FetchHttpRequest } from './core/FetchHttpRequest';
88

9-
import { AddressesService } from './services/AddressesService';
10-
import { AdminService } from './services/AdminService';
11-
import { CertificatesService } from './services/CertificatesService';
12-
import { ContractDefinitionsService } from './services/ContractDefinitionsService';
13-
import { ContractsService } from './services/ContractsService';
14-
import { CourseProductRelationsService } from './services/CourseProductRelationsService';
15-
import { CourseRunsService } from './services/CourseRunsService';
16-
import { CourseRunsSyncService } from './services/CourseRunsSyncService';
17-
import { CoursesService } from './services/CoursesService';
18-
import { CreditCardsService } from './services/CreditCardsService';
19-
import { EnrollmentsService } from './services/EnrollmentsService';
20-
import { OrdersService } from './services/OrdersService';
21-
import { OrganizationsService } from './services/OrganizationsService';
22-
import { PaymentsService } from './services/PaymentsService';
23-
import { SignatureService } from './services/SignatureService';
24-
import { UsersService } from './services/UsersService';
9+
import { ApiService } from './services/ApiService';
2510

2611
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
2712

2813
export class ApiClientJoanie {
2914

30-
public readonly addresses: AddressesService;
31-
public readonly admin: AdminService;
32-
public readonly certificates: CertificatesService;
33-
public readonly contractDefinitions: ContractDefinitionsService;
34-
public readonly contracts: ContractsService;
35-
public readonly courseProductRelations: CourseProductRelationsService;
36-
public readonly courseRuns: CourseRunsService;
37-
public readonly courseRunsSync: CourseRunsSyncService;
38-
public readonly courses: CoursesService;
39-
public readonly creditCards: CreditCardsService;
40-
public readonly enrollments: EnrollmentsService;
41-
public readonly orders: OrdersService;
42-
public readonly organizations: OrganizationsService;
43-
public readonly payments: PaymentsService;
44-
public readonly signature: SignatureService;
45-
public readonly users: UsersService;
15+
public readonly api: ApiService;
4616

4717
public readonly request: BaseHttpRequest;
4818

4919
constructor(config?: Partial<OpenAPIConfig>, HttpRequest: HttpRequestConstructor = FetchHttpRequest) {
5020
this.request = new HttpRequest({
51-
BASE: config?.BASE ?? 'http://localhost:8071/api/v1.0',
52-
VERSION: config?.VERSION ?? '1.0',
21+
BASE: config?.BASE ?? '',
22+
VERSION: config?.VERSION ?? '1.0.0 (v1.0)',
5323
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
5424
CREDENTIALS: config?.CREDENTIALS ?? 'include',
5525
TOKEN: config?.TOKEN,
@@ -59,22 +29,7 @@ export class ApiClientJoanie {
5929
ENCODE_PATH: config?.ENCODE_PATH,
6030
});
6131

62-
this.addresses = new AddressesService(this.request);
63-
this.admin = new AdminService(this.request);
64-
this.certificates = new CertificatesService(this.request);
65-
this.contractDefinitions = new ContractDefinitionsService(this.request);
66-
this.contracts = new ContractsService(this.request);
67-
this.courseProductRelations = new CourseProductRelationsService(this.request);
68-
this.courseRuns = new CourseRunsService(this.request);
69-
this.courseRunsSync = new CourseRunsSyncService(this.request);
70-
this.courses = new CoursesService(this.request);
71-
this.creditCards = new CreditCardsService(this.request);
72-
this.enrollments = new EnrollmentsService(this.request);
73-
this.orders = new OrdersService(this.request);
74-
this.organizations = new OrganizationsService(this.request);
75-
this.payments = new PaymentsService(this.request);
76-
this.signature = new SignatureService(this.request);
77-
this.users = new UsersService(this.request);
32+
this.api = new ApiService(this.request);
7833
}
7934
}
8035

src/frontend/js/api/joanie/gen/core/OpenAPI.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ export type OpenAPIConfig = {
2020
};
2121

2222
export const OpenAPI: OpenAPIConfig = {
23-
BASE: 'http://localhost:8071/api/v1.0',
24-
VERSION: '1.0',
23+
BASE: '',
24+
VERSION: '1.0.0 (v1.0)',
2525
WITH_CREDENTIALS: false,
2626
CREDENTIALS: 'include',
2727
TOKEN: undefined,

src/frontend/js/api/joanie/gen/index.ts

Lines changed: 64 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,59 +10,92 @@ export { CancelablePromise, CancelError } from './core/CancelablePromise';
1010
export { OpenAPI } from './core/OpenAPI';
1111
export type { OpenAPIConfig } from './core/OpenAPI';
1212

13-
export { Address } from './models/Address';
14-
export { AdminCertificateDefinition } from './models/AdminCertificateDefinition';
15-
export { AdminContractDefinition } from './models/AdminContractDefinition';
13+
export type { Address } from './models/Address';
14+
export type { AdminCertificateDefinition } from './models/AdminCertificateDefinition';
15+
export type { AdminContractDefinition } from './models/AdminContractDefinition';
1616
export type { AdminCourse } from './models/AdminCourse';
17-
export { AdminCourseAccess } from './models/AdminCourseAccess';
17+
export type { AdminCourseAccess } from './models/AdminCourseAccess';
1818
export type { AdminCourseLight } from './models/AdminCourseLight';
1919
export type { AdminCourseRun } from './models/AdminCourseRun';
2020
export type { AdminOrderGroup } from './models/AdminOrderGroup';
2121
export type { AdminOrderGroupCreate } from './models/AdminOrderGroupCreate';
2222
export type { AdminOrganization } from './models/AdminOrganization';
23-
export { AdminOrganizationAccess } from './models/AdminOrganizationAccess';
23+
export type { AdminOrganizationAccess } from './models/AdminOrganizationAccess';
2424
export type { AdminOrganizationLight } from './models/AdminOrganizationLight';
25-
export { AdminProduct } from './models/AdminProduct';
26-
export { AdminProductLight } from './models/AdminProductLight';
25+
export type { AdminProduct } from './models/AdminProduct';
26+
export type { AdminProductLight } from './models/AdminProductLight';
2727
export type { AdminProductRelation } from './models/AdminProductRelation';
2828
export type { AdminProductTargetCourseRelation } from './models/AdminProductTargetCourseRelation';
2929
export type { AdminUser } from './models/AdminUser';
30+
export { BlankEnum } from './models/BlankEnum';
3031
export type { Certificate } from './models/Certificate';
3132
export type { CertificationDefinition } from './models/CertificationDefinition';
3233
export type { Contract } from './models/Contract';
33-
export { ContractDefinition } from './models/ContractDefinition';
34+
export type { ContractDefinition } from './models/ContractDefinition';
35+
export { CountryEnum } from './models/CountryEnum';
3436
export type { Course } from './models/Course';
35-
export { CourseAccess } from './models/CourseAccess';
37+
export type { CourseAccess } from './models/CourseAccess';
38+
export { CourseAccessRoleChoiceEnum } from './models/CourseAccessRoleChoiceEnum';
3639
export type { CourseLight } from './models/CourseLight';
3740
export type { CourseProductRelation } from './models/CourseProductRelation';
38-
export { CourseRun } from './models/CourseRun';
41+
export type { CourseRun } from './models/CourseRun';
3942
export type { CreditCard } from './models/CreditCard';
40-
export { Enrollment } from './models/Enrollment';
41-
export { EnrollmentLight } from './models/EnrollmentLight';
43+
export type { Enrollment } from './models/Enrollment';
44+
export type { EnrollmentLight } from './models/EnrollmentLight';
45+
export { EnrollmentStateEnum } from './models/EnrollmentStateEnum';
4246
export type { ErrorResponse } from './models/ErrorResponse';
47+
export { LanguageEnum } from './models/LanguageEnum';
48+
export { LanguagesEnum } from './models/LanguagesEnum';
49+
export { NameEnum } from './models/NameEnum';
4350
export type { NestedOrder } from './models/NestedOrder';
44-
export { Order } from './models/Order';
51+
export type { NullEnum } from './models/NullEnum';
52+
export type { Order } from './models/Order';
4553
export type { OrderGroup } from './models/OrderGroup';
54+
export { OrderStateEnum } from './models/OrderStateEnum';
4655
export type { OrderTargetCourseRelation } from './models/OrderTargetCourseRelation';
4756
export type { Organization } from './models/Organization';
48-
export { OrganizationAccess } from './models/OrganizationAccess';
49-
export { Product } from './models/Product';
57+
export type { OrganizationAccess } from './models/OrganizationAccess';
58+
export { OrganizationAccessRoleChoiceEnum } from './models/OrganizationAccessRoleChoiceEnum';
59+
export type { PaginatedAddressList } from './models/PaginatedAddressList';
60+
export type { PaginatedAdminCertificateDefinitionList } from './models/PaginatedAdminCertificateDefinitionList';
61+
export type { PaginatedAdminContractDefinitionList } from './models/PaginatedAdminContractDefinitionList';
62+
export type { PaginatedAdminCourseLightList } from './models/PaginatedAdminCourseLightList';
63+
export type { PaginatedAdminCourseRunList } from './models/PaginatedAdminCourseRunList';
64+
export type { PaginatedAdminOrderGroupList } from './models/PaginatedAdminOrderGroupList';
65+
export type { PaginatedAdminOrganizationLightList } from './models/PaginatedAdminOrganizationLightList';
66+
export type { PaginatedAdminProductLightList } from './models/PaginatedAdminProductLightList';
67+
export type { PaginatedAdminUserList } from './models/PaginatedAdminUserList';
68+
export type { PaginatedCertificateList } from './models/PaginatedCertificateList';
69+
export type { PaginatedContractList } from './models/PaginatedContractList';
70+
export type { PaginatedCourseAccessList } from './models/PaginatedCourseAccessList';
71+
export type { PaginatedCourseList } from './models/PaginatedCourseList';
72+
export type { PaginatedCourseProductRelationList } from './models/PaginatedCourseProductRelationList';
73+
export type { PaginatedCourseRunList } from './models/PaginatedCourseRunList';
74+
export type { PaginatedCreditCardList } from './models/PaginatedCreditCardList';
75+
export type { PaginatedEnrollmentList } from './models/PaginatedEnrollmentList';
76+
export type { PaginatedOrderList } from './models/PaginatedOrderList';
77+
export type { PaginatedOrganizationAccessList } from './models/PaginatedOrganizationAccessList';
78+
export type { PaginatedOrganizationList } from './models/PaginatedOrganizationList';
79+
export type { PatchedAddress } from './models/PatchedAddress';
80+
export type { PatchedAdminCertificateDefinition } from './models/PatchedAdminCertificateDefinition';
81+
export type { PatchedAdminContractDefinition } from './models/PatchedAdminContractDefinition';
82+
export type { PatchedAdminCourse } from './models/PatchedAdminCourse';
83+
export type { PatchedAdminCourseAccess } from './models/PatchedAdminCourseAccess';
84+
export type { PatchedAdminCourseRun } from './models/PatchedAdminCourseRun';
85+
export type { PatchedAdminOrderGroup } from './models/PatchedAdminOrderGroup';
86+
export type { PatchedAdminOrganization } from './models/PatchedAdminOrganization';
87+
export type { PatchedAdminOrganizationAccess } from './models/PatchedAdminOrganizationAccess';
88+
export type { PatchedAdminProduct } from './models/PatchedAdminProduct';
89+
export type { PatchedAdminProductTargetCourseRelation } from './models/PatchedAdminProductTargetCourseRelation';
90+
export type { PatchedCourseAccess } from './models/PatchedCourseAccess';
91+
export type { PatchedCreditCard } from './models/PatchedCreditCard';
92+
export type { PatchedEnrollment } from './models/PatchedEnrollment';
93+
export type { PatchedOrder } from './models/PatchedOrder';
94+
export type { PatchedOrganizationAccess } from './models/PatchedOrganizationAccess';
95+
export type { Product } from './models/Product';
5096
export type { ProductTargetCourseRelation } from './models/ProductTargetCourseRelation';
97+
export { TemplateEnum } from './models/TemplateEnum';
98+
export { TypeEnum } from './models/TypeEnum';
5199
export type { User } from './models/User';
52100

53-
export { AddressesService } from './services/AddressesService';
54-
export { AdminService } from './services/AdminService';
55-
export { CertificatesService } from './services/CertificatesService';
56-
export { ContractDefinitionsService } from './services/ContractDefinitionsService';
57-
export { ContractsService } from './services/ContractsService';
58-
export { CourseProductRelationsService } from './services/CourseProductRelationsService';
59-
export { CourseRunsService } from './services/CourseRunsService';
60-
export { CourseRunsSyncService } from './services/CourseRunsSyncService';
61-
export { CoursesService } from './services/CoursesService';
62-
export { CreditCardsService } from './services/CreditCardsService';
63-
export { EnrollmentsService } from './services/EnrollmentsService';
64-
export { OrdersService } from './services/OrdersService';
65-
export { OrganizationsService } from './services/OrganizationsService';
66-
export { PaymentsService } from './services/PaymentsService';
67-
export { SignatureService } from './services/SignatureService';
68-
export { UsersService } from './services/UsersService';
101+
export { ApiService } from './services/ApiService';

0 commit comments

Comments
 (0)