Skip to content

Commit a660ba4

Browse files
authored
Merge branch 'main' into feature/ArticleViewMobileAnsicht#27
2 parents 127c16a + a746e35 commit a660ba4

63 files changed

Lines changed: 1081 additions & 178 deletions

File tree

Some content is hidden

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

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"discord.enabled": true
3+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The first one uses the local Swagger.json file
4545
#### `npm run generate-api-client-File`
4646

4747
The second one downloads the Swagger.json file from the local Swagger instance and runs then the generate api-client-File Command.
48-
48+
4949
#### `npm run generate-api-client-Swagger`
5050

5151
## Generate Component, Pipes, Services, Directives ...

openApi/swagger.json

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,54 @@
6565
}
6666
}
6767
},
68+
"/UBorrow/Borrow": {
69+
"post": {
70+
"tags": [
71+
"UBorrow"
72+
],
73+
"requestBody": {
74+
"content": {
75+
"application/json": {
76+
"schema": {
77+
"$ref": "#/components/schemas/BorrowDataDto"
78+
}
79+
},
80+
"text/json": {
81+
"schema": {
82+
"$ref": "#/components/schemas/BorrowDataDto"
83+
}
84+
},
85+
"application/*+json": {
86+
"schema": {
87+
"$ref": "#/components/schemas/BorrowDataDto"
88+
}
89+
}
90+
}
91+
},
92+
"responses": {
93+
"200": {
94+
"description": "Success",
95+
"content": {
96+
"text/plain": {
97+
"schema": {
98+
"$ref": "#/components/schemas/BorrowResponseDto"
99+
}
100+
},
101+
"application/json": {
102+
"schema": {
103+
"$ref": "#/components/schemas/BorrowResponseDto"
104+
}
105+
},
106+
"text/json": {
107+
"schema": {
108+
"$ref": "#/components/schemas/BorrowResponseDto"
109+
}
110+
}
111+
}
112+
}
113+
}
114+
}
115+
},
68116
"/UItem/getAllItems": {
69117
"get": {
70118
"tags": [
@@ -179,13 +227,147 @@
179227
}
180228
}
181229
}
230+
},
231+
"/UQrCode/ActiveQrCodes": {
232+
"get": {
233+
"tags": [
234+
"UQrCode"
235+
],
236+
"responses": {
237+
"200": {
238+
"description": "Success",
239+
"content": {
240+
"text/plain": {
241+
"schema": {
242+
"type": "array",
243+
"items": {
244+
"$ref": "#/components/schemas/BorrowDto"
245+
}
246+
}
247+
},
248+
"application/json": {
249+
"schema": {
250+
"type": "array",
251+
"items": {
252+
"$ref": "#/components/schemas/BorrowDto"
253+
}
254+
}
255+
},
256+
"text/json": {
257+
"schema": {
258+
"type": "array",
259+
"items": {
260+
"$ref": "#/components/schemas/BorrowDto"
261+
}
262+
}
263+
}
264+
}
265+
}
266+
}
267+
}
268+
},
269+
"/UQrCode/ActiveQrCodesCount": {
270+
"get": {
271+
"tags": [
272+
"UQrCode"
273+
],
274+
"responses": {
275+
"200": {
276+
"description": "Success",
277+
"content": {
278+
"text/plain": {
279+
"schema": {
280+
"type": "integer",
281+
"format": "int32"
282+
}
283+
},
284+
"application/json": {
285+
"schema": {
286+
"type": "integer",
287+
"format": "int32"
288+
}
289+
},
290+
"text/json": {
291+
"schema": {
292+
"type": "integer",
293+
"format": "int32"
294+
}
295+
}
296+
}
297+
}
298+
}
299+
}
182300
}
183301
},
184302
"components": {
185303
"schemas": {
304+
"BorrowDataDto": {
305+
"type": "object",
306+
"properties": {
307+
"dueTime": {
308+
"type": "string",
309+
"format": "date-time"
310+
},
311+
"itemId": {
312+
"type": "integer",
313+
"format": "int32"
314+
}
315+
},
316+
"additionalProperties": false
317+
},
318+
"BorrowDto": {
319+
"type": "object",
320+
"properties": {
321+
"itemId": {
322+
"type": "integer",
323+
"format": "int32"
324+
},
325+
"itemInstanceId": {
326+
"type": "integer",
327+
"format": "int32"
328+
},
329+
"borrowDate": {
330+
"type": "string",
331+
"format": "date-time"
332+
},
333+
"dueDate": {
334+
"type": "string",
335+
"format": "date-time"
336+
},
337+
"returnDate": {
338+
"type": "string",
339+
"format": "date-time",
340+
"nullable": true
341+
},
342+
"collectDate": {
343+
"type": "string",
344+
"format": "date-time",
345+
"nullable": true
346+
},
347+
"itemName": {
348+
"type": "string",
349+
"nullable": true
350+
}
351+
},
352+
"additionalProperties": false
353+
},
354+
"BorrowResponseDto": {
355+
"type": "object",
356+
"properties": {
357+
"qrCode": {
358+
"type": "string",
359+
"nullable": true
360+
}
361+
},
362+
"additionalProperties": false
363+
},
186364
"ItemDetailedDto": {
187365
"type": "object",
188366
"properties": {
367+
"id": {
368+
"type": "integer",
369+
"format": "int32"
370+
},
189371
"name": {
190372
"type": "string",
191373
"nullable": true
@@ -219,6 +401,10 @@
219401
"ItemDisplayDto": {
220402
"type": "object",
221403
"properties": {
404+
"id": {
405+
"type": "integer",
406+
"format": "int32"
407+
},
222408
"name": {
223409
"type": "string",
224410
"nullable": true

projects/automat-api/src/API/api.module.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import { ApiConfiguration, ApiConfigurationParams } from './api-configuration';
66

77
import { AuthentificationService } from './services/authentification.service';
88
import { DebugService } from './services/debug.service';
9+
import { UBorrowService } from './services/u-borrow.service';
910
import { UItemService } from './services/u-item.service';
11+
import { UQrCodeService } from './services/u-qr-code.service';
1012

1113
/**
1214
* Module that provides all services and configuration.
@@ -18,7 +20,9 @@ import { UItemService } from './services/u-item.service';
1820
providers: [
1921
AuthentificationService,
2022
DebugService,
23+
UBorrowService,
2124
UItemService,
25+
UQrCodeService,
2226
ApiConfiguration
2327
],
2428
})
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
export { BorrowDataDto } from './models/borrow-data-dto';
2+
export { BorrowDto } from './models/borrow-dto';
3+
export { BorrowResponseDto } from './models/borrow-response-dto';
14
export { ItemDetailedDto } from './models/item-detailed-dto';
25
export { ItemDisplayDto } from './models/item-display-dto';
36
export { UserLoginDto } from './models/user-login-dto';
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
export interface BorrowDataDto {
4+
dueTime?: string;
5+
itemId?: number;
6+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
export interface BorrowDto {
4+
borrowDate?: string;
5+
collectDate?: null | string;
6+
dueDate?: string;
7+
itemId?: number;
8+
itemInstanceId?: number;
9+
itemName?: null | string;
10+
returnDate?: null | string;
11+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
export interface BorrowResponseDto {
4+
qrCode?: null | string;
5+
}

projects/automat-api/src/API/models/item-detailed-dto.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export interface ItemDetailedDto {
44
available?: boolean;
55
categorie?: null | string;
66
description?: null | string;
7+
id?: number;
78
image?: null | string;
89
name?: null | string;
910
price?: number;

projects/automat-api/src/API/models/item-display-dto.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
export interface ItemDisplayDto {
44
available?: boolean;
55
description?: null | string;
6+
id?: number;
67
image?: null | string;
78
name?: null | string;
89
subName?: null | string;

0 commit comments

Comments
 (0)