karibu-layer 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/README.md +236 -0
  2. package/api/api.d.ts +23 -0
  3. package/api/authentication.service.d.ts +143 -0
  4. package/api/board.service.d.ts +267 -0
  5. package/api/establishment.service.d.ts +181 -0
  6. package/api/establishmentAccessor.service.d.ts +161 -0
  7. package/api/invoice.service.d.ts +180 -0
  8. package/api/order.service.d.ts +183 -0
  9. package/api/orderItem.service.d.ts +202 -0
  10. package/api/payment.service.d.ts +222 -0
  11. package/api/product.service.d.ts +161 -0
  12. package/api/role.service.d.ts +117 -0
  13. package/api/user.service.d.ts +271 -0
  14. package/api.base.service.d.ts +12 -0
  15. package/api.module.d.ts +11 -0
  16. package/configuration.d.ts +106 -0
  17. package/encoder.d.ts +11 -0
  18. package/esm2022/api/api.mjs +24 -0
  19. package/esm2022/api/authentication.service.mjs +304 -0
  20. package/esm2022/api/board.service.mjs +495 -0
  21. package/esm2022/api/establishment.service.mjs +345 -0
  22. package/esm2022/api/establishmentAccessor.service.mjs +295 -0
  23. package/esm2022/api/invoice.service.mjs +349 -0
  24. package/esm2022/api/order.service.mjs +355 -0
  25. package/esm2022/api/orderItem.service.mjs +381 -0
  26. package/esm2022/api/payment.service.mjs +417 -0
  27. package/esm2022/api/product.service.mjs +312 -0
  28. package/esm2022/api/role.service.mjs +237 -0
  29. package/esm2022/api/user.service.mjs +507 -0
  30. package/esm2022/api.base.service.mjs +68 -0
  31. package/esm2022/api.module.mjs +40 -0
  32. package/esm2022/configuration.mjs +133 -0
  33. package/esm2022/encoder.mjs +19 -0
  34. package/esm2022/index.mjs +7 -0
  35. package/esm2022/karibu-api-client.mjs +5 -0
  36. package/esm2022/model/board.mjs +8 -0
  37. package/esm2022/model/boardRequestDTO.mjs +17 -0
  38. package/esm2022/model/boardResponseDTO.mjs +8 -0
  39. package/esm2022/model/dashboard.mjs +11 -0
  40. package/esm2022/model/establishment.mjs +34 -0
  41. package/esm2022/model/establishmentAccessor.mjs +2 -0
  42. package/esm2022/model/establishmentAccessorDTO.mjs +11 -0
  43. package/esm2022/model/establishmentAccessorRequestDTO.mjs +11 -0
  44. package/esm2022/model/establishmentAccessorResponseDTO.mjs +34 -0
  45. package/esm2022/model/establishmentRequestDTO.mjs +43 -0
  46. package/esm2022/model/establishmentResponseDTO.mjs +43 -0
  47. package/esm2022/model/invoice.mjs +2 -0
  48. package/esm2022/model/invoiceDTO.mjs +11 -0
  49. package/esm2022/model/loginAccessorRequestDTO.mjs +11 -0
  50. package/esm2022/model/loginRequestDTO.mjs +11 -0
  51. package/esm2022/model/loginResponseDTO.mjs +2 -0
  52. package/esm2022/model/models.mjs +35 -0
  53. package/esm2022/model/order.mjs +8 -0
  54. package/esm2022/model/orderItem.mjs +2 -0
  55. package/esm2022/model/orderItemRequestDTO.mjs +2 -0
  56. package/esm2022/model/orderItemResponseDTO.mjs +2 -0
  57. package/esm2022/model/orderRequestDTO.mjs +17 -0
  58. package/esm2022/model/orderResponseDTO.mjs +8 -0
  59. package/esm2022/model/payment.mjs +12 -0
  60. package/esm2022/model/paymentDTO.mjs +21 -0
  61. package/esm2022/model/product.mjs +10 -0
  62. package/esm2022/model/productRequestDTO.mjs +19 -0
  63. package/esm2022/model/productResponseDTO.mjs +10 -0
  64. package/esm2022/model/role.mjs +11 -0
  65. package/esm2022/model/roleDTO.mjs +20 -0
  66. package/esm2022/model/tokenRequest.mjs +11 -0
  67. package/esm2022/model/tokenResponse.mjs +11 -0
  68. package/esm2022/model/user.mjs +11 -0
  69. package/esm2022/model/userRequestDTO.mjs +2 -0
  70. package/esm2022/model/userResponseDTO.mjs +11 -0
  71. package/esm2022/param.mjs +2 -0
  72. package/esm2022/variables.mjs +9 -0
  73. package/fesm2022/karibu-layer.mjs +4608 -0
  74. package/fesm2022/karibu-layer.mjs.map +1 -0
  75. package/index.d.ts +6 -0
  76. package/model/board.d.ts +30 -0
  77. package/model/boardRequestDTO.d.ts +24 -0
  78. package/model/boardResponseDTO.d.ts +28 -0
  79. package/model/dashboard.d.ts +13 -0
  80. package/model/establishment.d.ts +73 -0
  81. package/model/establishmentAccessor.d.ts +23 -0
  82. package/model/establishmentAccessorDTO.d.ts +22 -0
  83. package/model/establishmentAccessorRequestDTO.d.ts +18 -0
  84. package/model/establishmentAccessorResponseDTO.d.ts +64 -0
  85. package/model/establishmentRequestDTO.d.ts +59 -0
  86. package/model/establishmentResponseDTO.d.ts +62 -0
  87. package/model/invoice.d.ts +19 -0
  88. package/model/invoiceDTO.d.ts +16 -0
  89. package/model/loginAccessorRequestDTO.d.ts +13 -0
  90. package/model/loginRequestDTO.d.ts +13 -0
  91. package/model/loginResponseDTO.d.ts +21 -0
  92. package/model/models.d.ts +34 -0
  93. package/model/order.d.ts +32 -0
  94. package/model/orderItem.d.ts +18 -0
  95. package/model/orderItemRequestDTO.d.ts +18 -0
  96. package/model/orderItemResponseDTO.d.ts +18 -0
  97. package/model/orderRequestDTO.d.ts +21 -0
  98. package/model/orderResponseDTO.d.ts +31 -0
  99. package/model/payment.d.ts +30 -0
  100. package/model/paymentDTO.d.ts +30 -0
  101. package/model/product.d.ts +33 -0
  102. package/model/productRequestDTO.d.ts +32 -0
  103. package/model/productResponseDTO.d.ts +35 -0
  104. package/model/role.d.ts +26 -0
  105. package/model/roleDTO.d.ts +24 -0
  106. package/model/tokenRequest.d.ts +12 -0
  107. package/model/tokenResponse.d.ts +12 -0
  108. package/model/user.d.ts +40 -0
  109. package/model/userRequestDTO.d.ts +19 -0
  110. package/model/userResponseDTO.d.ts +36 -0
  111. package/package.json +46 -0
  112. package/param.d.ts +37 -0
  113. package/variables.d.ts +8 -0
package/README.md ADDED
@@ -0,0 +1,236 @@
1
+ # karibu-api-client@1.0.0
2
+
3
+ API pour la gestion des établissements karibu
4
+
5
+ The version of the OpenAPI document: 1.0
6
+
7
+ ## Building
8
+
9
+ To install the required dependencies and to build the typescript sources run:
10
+
11
+ ```console
12
+ npm install
13
+ npm run build
14
+ ```
15
+
16
+ ## Publishing
17
+
18
+ First build the package then run `npm publish dist` (don't forget to specify the `dist` folder!)
19
+
20
+ ## Consuming
21
+
22
+ Navigate to the folder of your consuming project and run one of next commands.
23
+
24
+ _published:_
25
+
26
+ ```console
27
+ npm install karibu-api-client@1.0.0 --save
28
+ ```
29
+
30
+ _without publishing (not recommended):_
31
+
32
+ ```console
33
+ npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save
34
+ ```
35
+
36
+ _It's important to take the tgz file, otherwise you'll get trouble with links on windows_
37
+
38
+ _using `npm link`:_
39
+
40
+ In PATH_TO_GENERATED_PACKAGE/dist:
41
+
42
+ ```console
43
+ npm link
44
+ ```
45
+
46
+ In your project:
47
+
48
+ ```console
49
+ npm link karibu-api-client
50
+ ```
51
+
52
+ __Note for Windows users:__ The Angular CLI has troubles to use linked npm packages.
53
+ Please refer to this issue <https://github.com/angular/angular-cli/issues/8284> for a solution / workaround.
54
+ Published packages are not effected by this issue.
55
+
56
+ ### General usage
57
+
58
+ In your Angular project:
59
+
60
+ ```typescript
61
+ // without configuring providers
62
+ import { ApiModule } from 'karibu-api-client';
63
+ import { HttpClientModule } from '@angular/common/http';
64
+
65
+ @NgModule({
66
+ imports: [
67
+ ApiModule,
68
+ // make sure to import the HttpClientModule in the AppModule only,
69
+ // see https://github.com/angular/angular/issues/20575
70
+ HttpClientModule
71
+ ],
72
+ declarations: [ AppComponent ],
73
+ providers: [],
74
+ bootstrap: [ AppComponent ]
75
+ })
76
+ export class AppModule {}
77
+ ```
78
+
79
+ ```typescript
80
+ // configuring providers
81
+ import { ApiModule, Configuration, ConfigurationParameters } from 'karibu-api-client';
82
+
83
+ export function apiConfigFactory (): Configuration {
84
+ const params: ConfigurationParameters = {
85
+ // set configuration parameters here.
86
+ }
87
+ return new Configuration(params);
88
+ }
89
+
90
+ @NgModule({
91
+ imports: [ ApiModule.forRoot(apiConfigFactory) ],
92
+ declarations: [ AppComponent ],
93
+ providers: [],
94
+ bootstrap: [ AppComponent ]
95
+ })
96
+ export class AppModule {}
97
+ ```
98
+
99
+ ```typescript
100
+ // configuring providers with an authentication service that manages your access tokens
101
+ import { ApiModule, Configuration } from 'karibu-api-client';
102
+
103
+ @NgModule({
104
+ imports: [ ApiModule ],
105
+ declarations: [ AppComponent ],
106
+ providers: [
107
+ {
108
+ provide: Configuration,
109
+ useFactory: (authService: AuthService) => new Configuration(
110
+ {
111
+ basePath: environment.apiUrl,
112
+ accessToken: authService.getAccessToken.bind(authService)
113
+ }
114
+ ),
115
+ deps: [AuthService],
116
+ multi: false
117
+ }
118
+ ],
119
+ bootstrap: [ AppComponent ]
120
+ })
121
+ export class AppModule {}
122
+ ```
123
+
124
+ ```typescript
125
+ import { DefaultApi } from 'karibu-api-client';
126
+
127
+ export class AppComponent {
128
+ constructor(private apiGateway: DefaultApi) { }
129
+ }
130
+ ```
131
+
132
+ Note: The ApiModule is restricted to being instantiated once app wide.
133
+ This is to ensure that all services are treated as singletons.
134
+
135
+ ### Using multiple OpenAPI files / APIs / ApiModules
136
+
137
+ In order to use multiple `ApiModules` generated from different OpenAPI files,
138
+ you can create an alias name when importing the modules
139
+ in order to avoid naming conflicts:
140
+
141
+ ```typescript
142
+ import { ApiModule } from 'my-api-path';
143
+ import { ApiModule as OtherApiModule } from 'my-other-api-path';
144
+ import { HttpClientModule } from '@angular/common/http';
145
+
146
+ @NgModule({
147
+ imports: [
148
+ ApiModule,
149
+ OtherApiModule,
150
+ // make sure to import the HttpClientModule in the AppModule only,
151
+ // see https://github.com/angular/angular/issues/20575
152
+ HttpClientModule
153
+ ]
154
+ })
155
+ export class AppModule {
156
+
157
+ }
158
+ ```
159
+
160
+ ### Set service base path
161
+
162
+ If different than the generated base path, during app bootstrap, you can provide the base path to your service.
163
+
164
+ ```typescript
165
+ import { BASE_PATH } from 'karibu-api-client';
166
+
167
+ bootstrap(AppComponent, [
168
+ { provide: BASE_PATH, useValue: 'https://your-web-service.com' },
169
+ ]);
170
+ ```
171
+
172
+ or
173
+
174
+ ```typescript
175
+ import { BASE_PATH } from 'karibu-api-client';
176
+
177
+ @NgModule({
178
+ imports: [],
179
+ declarations: [ AppComponent ],
180
+ providers: [ provide: BASE_PATH, useValue: 'https://your-web-service.com' ],
181
+ bootstrap: [ AppComponent ]
182
+ })
183
+ export class AppModule {}
184
+ ```
185
+
186
+ ### Using @angular/cli
187
+
188
+ First extend your `src/environments/*.ts` files by adding the corresponding base path:
189
+
190
+ ```typescript
191
+ export const environment = {
192
+ production: false,
193
+ API_BASE_PATH: 'http://127.0.0.1:8080'
194
+ };
195
+ ```
196
+
197
+ In the src/app/app.module.ts:
198
+
199
+ ```typescript
200
+ import { BASE_PATH } from 'karibu-api-client';
201
+ import { environment } from '../environments/environment';
202
+
203
+ @NgModule({
204
+ declarations: [
205
+ AppComponent
206
+ ],
207
+ imports: [ ],
208
+ providers: [{ provide: BASE_PATH, useValue: environment.API_BASE_PATH }],
209
+ bootstrap: [ AppComponent ]
210
+ })
211
+ export class AppModule { }
212
+ ```
213
+
214
+ ### Customizing path parameter encoding
215
+
216
+ Without further customization, only [path-parameters][parameter-locations-url] of [style][style-values-url] 'simple'
217
+ and Dates for format 'date-time' are encoded correctly.
218
+
219
+ Other styles (e.g. "matrix") are not that easy to encode
220
+ and thus are best delegated to other libraries (e.g.: [@honoluluhenk/http-param-expander]).
221
+
222
+ To implement your own parameter encoding (or call another library),
223
+ pass an arrow-function or method-reference to the `encodeParam` property of the Configuration-object
224
+ (see [General Usage](#general-usage) above).
225
+
226
+ Example value for use in your Configuration-Provider:
227
+
228
+ ```typescript
229
+ new Configuration({
230
+ encodeParam: (param: Param) => myFancyParamEncoder(param),
231
+ })
232
+ ```
233
+
234
+ [parameter-locations-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-locations
235
+ [style-values-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values
236
+ [@honoluluhenk/http-param-expander]: https://www.npmjs.com/package/@honoluluhenk/http-param-expander
package/api/api.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ export * from './authentication.service';
2
+ import { AuthenticationService } from './authentication.service';
3
+ export * from './board.service';
4
+ import { BoardService } from './board.service';
5
+ export * from './establishment.service';
6
+ import { EstablishmentService } from './establishment.service';
7
+ export * from './establishmentAccessor.service';
8
+ import { EstablishmentAccessorService } from './establishmentAccessor.service';
9
+ export * from './invoice.service';
10
+ import { InvoiceService } from './invoice.service';
11
+ export * from './order.service';
12
+ import { OrderService } from './order.service';
13
+ export * from './orderItem.service';
14
+ import { OrderItemService } from './orderItem.service';
15
+ export * from './payment.service';
16
+ import { PaymentService } from './payment.service';
17
+ export * from './product.service';
18
+ import { ProductService } from './product.service';
19
+ export * from './role.service';
20
+ import { RoleService } from './role.service';
21
+ export * from './user.service';
22
+ import { UserService } from './user.service';
23
+ export declare const APIS: (typeof AuthenticationService | typeof BoardService | typeof EstablishmentService | typeof EstablishmentAccessorService | typeof InvoiceService | typeof OrderService | typeof OrderItemService | typeof PaymentService | typeof ProductService | typeof RoleService | typeof UserService)[];
@@ -0,0 +1,143 @@
1
+ import { HttpClient, HttpResponse, HttpEvent, HttpContext } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { LoginRequestDTO } from '../model/loginRequestDTO';
4
+ import { LoginResponseDTO } from '../model/loginResponseDTO';
5
+ import { TokenRequest } from '../model/tokenRequest';
6
+ import { TokenResponse } from '../model/tokenResponse';
7
+ import { Configuration } from '../configuration';
8
+ import { BaseService } from '../api.base.service';
9
+ import * as i0 from "@angular/core";
10
+ export declare class AuthenticationService extends BaseService {
11
+ protected httpClient: HttpClient;
12
+ constructor(httpClient: HttpClient, basePath: string | string[], configuration?: Configuration);
13
+ /**
14
+ * Authentification dédiée pour les administrateurs
15
+ * @param loginRequestDTO
16
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
17
+ * @param reportProgress flag to report request and response progress.
18
+ */
19
+ adminLogin(loginRequestDTO: LoginRequestDTO, observe?: 'body', reportProgress?: boolean, options?: {
20
+ httpHeaderAccept?: 'application/json';
21
+ context?: HttpContext;
22
+ transferCache?: boolean;
23
+ }): Observable<LoginResponseDTO>;
24
+ adminLogin(loginRequestDTO: LoginRequestDTO, observe?: 'response', reportProgress?: boolean, options?: {
25
+ httpHeaderAccept?: 'application/json';
26
+ context?: HttpContext;
27
+ transferCache?: boolean;
28
+ }): Observable<HttpResponse<LoginResponseDTO>>;
29
+ adminLogin(loginRequestDTO: LoginRequestDTO, observe?: 'events', reportProgress?: boolean, options?: {
30
+ httpHeaderAccept?: 'application/json';
31
+ context?: HttpContext;
32
+ transferCache?: boolean;
33
+ }): Observable<HttpEvent<LoginResponseDTO>>;
34
+ /**
35
+ * Génère un token avec droits admin (protégé)
36
+ * @param tokenRequest
37
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
38
+ * @param reportProgress flag to report request and response progress.
39
+ */
40
+ generateAdminToken(tokenRequest: TokenRequest, observe?: 'body', reportProgress?: boolean, options?: {
41
+ httpHeaderAccept?: 'application/json';
42
+ context?: HttpContext;
43
+ transferCache?: boolean;
44
+ }): Observable<TokenResponse>;
45
+ generateAdminToken(tokenRequest: TokenRequest, observe?: 'response', reportProgress?: boolean, options?: {
46
+ httpHeaderAccept?: 'application/json';
47
+ context?: HttpContext;
48
+ transferCache?: boolean;
49
+ }): Observable<HttpResponse<TokenResponse>>;
50
+ generateAdminToken(tokenRequest: TokenRequest, observe?: 'events', reportProgress?: boolean, options?: {
51
+ httpHeaderAccept?: 'application/json';
52
+ context?: HttpContext;
53
+ transferCache?: boolean;
54
+ }): Observable<HttpEvent<TokenResponse>>;
55
+ /**
56
+ * Génère un token personnalisé pour un utilisateur
57
+ * @param tokenRequest
58
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
59
+ * @param reportProgress flag to report request and response progress.
60
+ */
61
+ generateCustomToken(tokenRequest: TokenRequest, observe?: 'body', reportProgress?: boolean, options?: {
62
+ httpHeaderAccept?: 'application/json';
63
+ context?: HttpContext;
64
+ transferCache?: boolean;
65
+ }): Observable<TokenResponse>;
66
+ generateCustomToken(tokenRequest: TokenRequest, observe?: 'response', reportProgress?: boolean, options?: {
67
+ httpHeaderAccept?: 'application/json';
68
+ context?: HttpContext;
69
+ transferCache?: boolean;
70
+ }): Observable<HttpResponse<TokenResponse>>;
71
+ generateCustomToken(tokenRequest: TokenRequest, observe?: 'events', reportProgress?: boolean, options?: {
72
+ httpHeaderAccept?: 'application/json';
73
+ context?: HttpContext;
74
+ transferCache?: boolean;
75
+ }): Observable<HttpEvent<TokenResponse>>;
76
+ /**
77
+ * Génère un token avec des claims personnalisés
78
+ * @param tokenRequest
79
+ * @param role
80
+ * @param establishmentAccess
81
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
82
+ * @param reportProgress flag to report request and response progress.
83
+ */
84
+ generateTokenWithClaims(tokenRequest: TokenRequest, role?: string, establishmentAccess?: boolean, observe?: 'body', reportProgress?: boolean, options?: {
85
+ httpHeaderAccept?: 'application/json';
86
+ context?: HttpContext;
87
+ transferCache?: boolean;
88
+ }): Observable<TokenResponse>;
89
+ generateTokenWithClaims(tokenRequest: TokenRequest, role?: string, establishmentAccess?: boolean, observe?: 'response', reportProgress?: boolean, options?: {
90
+ httpHeaderAccept?: 'application/json';
91
+ context?: HttpContext;
92
+ transferCache?: boolean;
93
+ }): Observable<HttpResponse<TokenResponse>>;
94
+ generateTokenWithClaims(tokenRequest: TokenRequest, role?: string, establishmentAccess?: boolean, observe?: 'events', reportProgress?: boolean, options?: {
95
+ httpHeaderAccept?: 'application/json';
96
+ context?: HttpContext;
97
+ transferCache?: boolean;
98
+ }): Observable<HttpEvent<TokenResponse>>;
99
+ /**
100
+ * Authentification et génération d\&#39;un token selon le rôle
101
+ * @param loginRequestDTO
102
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
103
+ * @param reportProgress flag to report request and response progress.
104
+ */
105
+ login(loginRequestDTO: LoginRequestDTO, observe?: 'body', reportProgress?: boolean, options?: {
106
+ httpHeaderAccept?: 'application/json';
107
+ context?: HttpContext;
108
+ transferCache?: boolean;
109
+ }): Observable<LoginResponseDTO>;
110
+ login(loginRequestDTO: LoginRequestDTO, observe?: 'response', reportProgress?: boolean, options?: {
111
+ httpHeaderAccept?: 'application/json';
112
+ context?: HttpContext;
113
+ transferCache?: boolean;
114
+ }): Observable<HttpResponse<LoginResponseDTO>>;
115
+ login(loginRequestDTO: LoginRequestDTO, observe?: 'events', reportProgress?: boolean, options?: {
116
+ httpHeaderAccept?: 'application/json';
117
+ context?: HttpContext;
118
+ transferCache?: boolean;
119
+ }): Observable<HttpEvent<LoginResponseDTO>>;
120
+ /**
121
+ * Révoque tous les tokens d\&#39;un utilisateur (déconnexion forcée)
122
+ * @param uid
123
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
124
+ * @param reportProgress flag to report request and response progress.
125
+ */
126
+ revokeTokens(uid: string, observe?: 'body', reportProgress?: boolean, options?: {
127
+ httpHeaderAccept?: undefined;
128
+ context?: HttpContext;
129
+ transferCache?: boolean;
130
+ }): Observable<any>;
131
+ revokeTokens(uid: string, observe?: 'response', reportProgress?: boolean, options?: {
132
+ httpHeaderAccept?: undefined;
133
+ context?: HttpContext;
134
+ transferCache?: boolean;
135
+ }): Observable<HttpResponse<any>>;
136
+ revokeTokens(uid: string, observe?: 'events', reportProgress?: boolean, options?: {
137
+ httpHeaderAccept?: undefined;
138
+ context?: HttpContext;
139
+ transferCache?: boolean;
140
+ }): Observable<HttpEvent<any>>;
141
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticationService, [null, { optional: true; }, { optional: true; }]>;
142
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthenticationService>;
143
+ }
@@ -0,0 +1,267 @@
1
+ import { HttpClient, HttpResponse, HttpEvent, HttpContext } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { BoardRequestDTO } from '../model/boardRequestDTO';
4
+ import { BoardResponseDTO } from '../model/boardResponseDTO';
5
+ import { Configuration } from '../configuration';
6
+ import { BaseService } from '../api.base.service';
7
+ import * as i0 from "@angular/core";
8
+ export declare class BoardService extends BaseService {
9
+ protected httpClient: HttpClient;
10
+ constructor(httpClient: HttpClient, basePath: string | string[], configuration?: Configuration);
11
+ /**
12
+ * Créer une nouvelle table
13
+ * @param boardRequestDTO
14
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
15
+ * @param reportProgress flag to report request and response progress.
16
+ */
17
+ createBoard(boardRequestDTO: BoardRequestDTO, observe?: 'body', reportProgress?: boolean, options?: {
18
+ httpHeaderAccept?: 'application/json';
19
+ context?: HttpContext;
20
+ transferCache?: boolean;
21
+ }): Observable<BoardResponseDTO>;
22
+ createBoard(boardRequestDTO: BoardRequestDTO, observe?: 'response', reportProgress?: boolean, options?: {
23
+ httpHeaderAccept?: 'application/json';
24
+ context?: HttpContext;
25
+ transferCache?: boolean;
26
+ }): Observable<HttpResponse<BoardResponseDTO>>;
27
+ createBoard(boardRequestDTO: BoardRequestDTO, observe?: 'events', reportProgress?: boolean, options?: {
28
+ httpHeaderAccept?: 'application/json';
29
+ context?: HttpContext;
30
+ transferCache?: boolean;
31
+ }): Observable<HttpEvent<BoardResponseDTO>>;
32
+ /**
33
+ * Supprimer une table
34
+ * @param id
35
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
36
+ * @param reportProgress flag to report request and response progress.
37
+ */
38
+ removeBoard(id: number, observe?: 'body', reportProgress?: boolean, options?: {
39
+ httpHeaderAccept?: undefined;
40
+ context?: HttpContext;
41
+ transferCache?: boolean;
42
+ }): Observable<any>;
43
+ removeBoard(id: number, observe?: 'response', reportProgress?: boolean, options?: {
44
+ httpHeaderAccept?: undefined;
45
+ context?: HttpContext;
46
+ transferCache?: boolean;
47
+ }): Observable<HttpResponse<any>>;
48
+ removeBoard(id: number, observe?: 'events', reportProgress?: boolean, options?: {
49
+ httpHeaderAccept?: undefined;
50
+ context?: HttpContext;
51
+ transferCache?: boolean;
52
+ }): Observable<HttpEvent<any>>;
53
+ /**
54
+ * Récupérer toutes les tables
55
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
56
+ * @param reportProgress flag to report request and response progress.
57
+ */
58
+ retrieveAllBoard(observe?: 'body', reportProgress?: boolean, options?: {
59
+ httpHeaderAccept?: 'application/json';
60
+ context?: HttpContext;
61
+ transferCache?: boolean;
62
+ }): Observable<Array<BoardResponseDTO>>;
63
+ retrieveAllBoard(observe?: 'response', reportProgress?: boolean, options?: {
64
+ httpHeaderAccept?: 'application/json';
65
+ context?: HttpContext;
66
+ transferCache?: boolean;
67
+ }): Observable<HttpResponse<Array<BoardResponseDTO>>>;
68
+ retrieveAllBoard(observe?: 'events', reportProgress?: boolean, options?: {
69
+ httpHeaderAccept?: 'application/json';
70
+ context?: HttpContext;
71
+ transferCache?: boolean;
72
+ }): Observable<HttpEvent<Array<BoardResponseDTO>>>;
73
+ /**
74
+ * Récupérer une table par ID
75
+ * @param id
76
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
77
+ * @param reportProgress flag to report request and response progress.
78
+ */
79
+ retrieveBoard(id: number, observe?: 'body', reportProgress?: boolean, options?: {
80
+ httpHeaderAccept?: 'application/json';
81
+ context?: HttpContext;
82
+ transferCache?: boolean;
83
+ }): Observable<BoardResponseDTO>;
84
+ retrieveBoard(id: number, observe?: 'response', reportProgress?: boolean, options?: {
85
+ httpHeaderAccept?: 'application/json';
86
+ context?: HttpContext;
87
+ transferCache?: boolean;
88
+ }): Observable<HttpResponse<BoardResponseDTO>>;
89
+ retrieveBoard(id: number, observe?: 'events', reportProgress?: boolean, options?: {
90
+ httpHeaderAccept?: 'application/json';
91
+ context?: HttpContext;
92
+ transferCache?: boolean;
93
+ }): Observable<HttpEvent<BoardResponseDTO>>;
94
+ /**
95
+ * Récupérer les tables par établissement
96
+ * @param establishmentId
97
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
98
+ * @param reportProgress flag to report request and response progress.
99
+ */
100
+ retrieveBoardByEstablishmentId(establishmentId: number, observe?: 'body', reportProgress?: boolean, options?: {
101
+ httpHeaderAccept?: 'application/json';
102
+ context?: HttpContext;
103
+ transferCache?: boolean;
104
+ }): Observable<Array<BoardResponseDTO>>;
105
+ retrieveBoardByEstablishmentId(establishmentId: number, observe?: 'response', reportProgress?: boolean, options?: {
106
+ httpHeaderAccept?: 'application/json';
107
+ context?: HttpContext;
108
+ transferCache?: boolean;
109
+ }): Observable<HttpResponse<Array<BoardResponseDTO>>>;
110
+ retrieveBoardByEstablishmentId(establishmentId: number, observe?: 'events', reportProgress?: boolean, options?: {
111
+ httpHeaderAccept?: 'application/json';
112
+ context?: HttpContext;
113
+ transferCache?: boolean;
114
+ }): Observable<HttpEvent<Array<BoardResponseDTO>>>;
115
+ /**
116
+ * Récupérer les tables par établissement et statut
117
+ * @param establishmentId
118
+ * @param status
119
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
120
+ * @param reportProgress flag to report request and response progress.
121
+ */
122
+ retrieveBoardByEstablishmentIdAndStatus(establishmentId: number, status: 'OPEN' | 'CLOSED', observe?: 'body', reportProgress?: boolean, options?: {
123
+ httpHeaderAccept?: 'application/json';
124
+ context?: HttpContext;
125
+ transferCache?: boolean;
126
+ }): Observable<Array<BoardResponseDTO>>;
127
+ retrieveBoardByEstablishmentIdAndStatus(establishmentId: number, status: 'OPEN' | 'CLOSED', observe?: 'response', reportProgress?: boolean, options?: {
128
+ httpHeaderAccept?: 'application/json';
129
+ context?: HttpContext;
130
+ transferCache?: boolean;
131
+ }): Observable<HttpResponse<Array<BoardResponseDTO>>>;
132
+ retrieveBoardByEstablishmentIdAndStatus(establishmentId: number, status: 'OPEN' | 'CLOSED', observe?: 'events', reportProgress?: boolean, options?: {
133
+ httpHeaderAccept?: 'application/json';
134
+ context?: HttpContext;
135
+ transferCache?: boolean;
136
+ }): Observable<HttpEvent<Array<BoardResponseDTO>>>;
137
+ /**
138
+ * Récupérer les tables par numéro
139
+ * @param number
140
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
141
+ * @param reportProgress flag to report request and response progress.
142
+ */
143
+ retrieveBoardByNumber(number: number, observe?: 'body', reportProgress?: boolean, options?: {
144
+ httpHeaderAccept?: 'application/json';
145
+ context?: HttpContext;
146
+ transferCache?: boolean;
147
+ }): Observable<Array<BoardResponseDTO>>;
148
+ retrieveBoardByNumber(number: number, observe?: 'response', reportProgress?: boolean, options?: {
149
+ httpHeaderAccept?: 'application/json';
150
+ context?: HttpContext;
151
+ transferCache?: boolean;
152
+ }): Observable<HttpResponse<Array<BoardResponseDTO>>>;
153
+ retrieveBoardByNumber(number: number, observe?: 'events', reportProgress?: boolean, options?: {
154
+ httpHeaderAccept?: 'application/json';
155
+ context?: HttpContext;
156
+ transferCache?: boolean;
157
+ }): Observable<HttpEvent<Array<BoardResponseDTO>>>;
158
+ /**
159
+ * Récupérer les tables par statut de réservation
160
+ * @param reserved
161
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
162
+ * @param reportProgress flag to report request and response progress.
163
+ */
164
+ retrieveBoardByReserved(reserved: boolean, observe?: 'body', reportProgress?: boolean, options?: {
165
+ httpHeaderAccept?: 'application/json';
166
+ context?: HttpContext;
167
+ transferCache?: boolean;
168
+ }): Observable<Array<BoardResponseDTO>>;
169
+ retrieveBoardByReserved(reserved: boolean, observe?: 'response', reportProgress?: boolean, options?: {
170
+ httpHeaderAccept?: 'application/json';
171
+ context?: HttpContext;
172
+ transferCache?: boolean;
173
+ }): Observable<HttpResponse<Array<BoardResponseDTO>>>;
174
+ retrieveBoardByReserved(reserved: boolean, observe?: 'events', reportProgress?: boolean, options?: {
175
+ httpHeaderAccept?: 'application/json';
176
+ context?: HttpContext;
177
+ transferCache?: boolean;
178
+ }): Observable<HttpEvent<Array<BoardResponseDTO>>>;
179
+ /**
180
+ * Récupérer les tables par statut
181
+ * @param status
182
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
183
+ * @param reportProgress flag to report request and response progress.
184
+ */
185
+ retrieveBoardByStatus(status: 'OPEN' | 'CLOSED', observe?: 'body', reportProgress?: boolean, options?: {
186
+ httpHeaderAccept?: 'application/json';
187
+ context?: HttpContext;
188
+ transferCache?: boolean;
189
+ }): Observable<Array<BoardResponseDTO>>;
190
+ retrieveBoardByStatus(status: 'OPEN' | 'CLOSED', observe?: 'response', reportProgress?: boolean, options?: {
191
+ httpHeaderAccept?: 'application/json';
192
+ context?: HttpContext;
193
+ transferCache?: boolean;
194
+ }): Observable<HttpResponse<Array<BoardResponseDTO>>>;
195
+ retrieveBoardByStatus(status: 'OPEN' | 'CLOSED', observe?: 'events', reportProgress?: boolean, options?: {
196
+ httpHeaderAccept?: 'application/json';
197
+ context?: HttpContext;
198
+ transferCache?: boolean;
199
+ }): Observable<HttpEvent<Array<BoardResponseDTO>>>;
200
+ /**
201
+ * Basculer le statut de réservation d\&#39;une table
202
+ * @param id
203
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
204
+ * @param reportProgress flag to report request and response progress.
205
+ */
206
+ toggleReservation(id: number, observe?: 'body', reportProgress?: boolean, options?: {
207
+ httpHeaderAccept?: 'application/json';
208
+ context?: HttpContext;
209
+ transferCache?: boolean;
210
+ }): Observable<BoardResponseDTO>;
211
+ toggleReservation(id: number, observe?: 'response', reportProgress?: boolean, options?: {
212
+ httpHeaderAccept?: 'application/json';
213
+ context?: HttpContext;
214
+ transferCache?: boolean;
215
+ }): Observable<HttpResponse<BoardResponseDTO>>;
216
+ toggleReservation(id: number, observe?: 'events', reportProgress?: boolean, options?: {
217
+ httpHeaderAccept?: 'application/json';
218
+ context?: HttpContext;
219
+ transferCache?: boolean;
220
+ }): Observable<HttpEvent<BoardResponseDTO>>;
221
+ /**
222
+ * Mettre à jour une table
223
+ * @param id
224
+ * @param boardRequestDTO
225
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
226
+ * @param reportProgress flag to report request and response progress.
227
+ */
228
+ updateBoard(id: number, boardRequestDTO: BoardRequestDTO, observe?: 'body', reportProgress?: boolean, options?: {
229
+ httpHeaderAccept?: 'application/json';
230
+ context?: HttpContext;
231
+ transferCache?: boolean;
232
+ }): Observable<BoardResponseDTO>;
233
+ updateBoard(id: number, boardRequestDTO: BoardRequestDTO, observe?: 'response', reportProgress?: boolean, options?: {
234
+ httpHeaderAccept?: 'application/json';
235
+ context?: HttpContext;
236
+ transferCache?: boolean;
237
+ }): Observable<HttpResponse<BoardResponseDTO>>;
238
+ updateBoard(id: number, boardRequestDTO: BoardRequestDTO, observe?: 'events', reportProgress?: boolean, options?: {
239
+ httpHeaderAccept?: 'application/json';
240
+ context?: HttpContext;
241
+ transferCache?: boolean;
242
+ }): Observable<HttpEvent<BoardResponseDTO>>;
243
+ /**
244
+ * Changer le statut d\&#39;une table
245
+ * @param id
246
+ * @param status
247
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
248
+ * @param reportProgress flag to report request and response progress.
249
+ */
250
+ updateBoardStatus(id: number, status: 'OPEN' | 'CLOSED', observe?: 'body', reportProgress?: boolean, options?: {
251
+ httpHeaderAccept?: 'application/json';
252
+ context?: HttpContext;
253
+ transferCache?: boolean;
254
+ }): Observable<BoardResponseDTO>;
255
+ updateBoardStatus(id: number, status: 'OPEN' | 'CLOSED', observe?: 'response', reportProgress?: boolean, options?: {
256
+ httpHeaderAccept?: 'application/json';
257
+ context?: HttpContext;
258
+ transferCache?: boolean;
259
+ }): Observable<HttpResponse<BoardResponseDTO>>;
260
+ updateBoardStatus(id: number, status: 'OPEN' | 'CLOSED', observe?: 'events', reportProgress?: boolean, options?: {
261
+ httpHeaderAccept?: 'application/json';
262
+ context?: HttpContext;
263
+ transferCache?: boolean;
264
+ }): Observable<HttpEvent<BoardResponseDTO>>;
265
+ static ɵfac: i0.ɵɵFactoryDeclaration<BoardService, [null, { optional: true; }, { optional: true; }]>;
266
+ static ɵprov: i0.ɵɵInjectableDeclaration<BoardService>;
267
+ }