| @@ -500,20 +500,20 @@ paths: | |||
| required: true | |||
| deprecated: false | |||
| parameters: [] | |||
| /api/media_objects: | |||
| /api/medias: | |||
| get: | |||
| operationId: api_media_objects_get_collection | |||
| operationId: api_medias_get_collection | |||
| tags: | |||
| - MediaObject | |||
| - Media | |||
| responses: | |||
| 200: | |||
| description: 'MediaObject collection' | |||
| description: 'Media collection' | |||
| content: | |||
| application/ld+json: | |||
| schema: | |||
| type: object | |||
| properties: | |||
| 'hydra:member': { type: array, items: { $ref: '#/components/schemas/MediaObject.jsonld-media_object.read' } } | |||
| 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Media.jsonld-media_object.read' } } | |||
| 'hydra:totalItems': { type: integer, minimum: 0 } | |||
| 'hydra:view': { type: object, properties: { '@id': { type: string, format: iri-reference }, '@type': { type: string }, 'hydra:first': { type: string, format: iri-reference }, 'hydra:last': { type: string, format: iri-reference }, 'hydra:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } } | |||
| 'hydra:search': { type: object, properties: { '@type': { type: string }, 'hydra:template': { type: string }, 'hydra:variableRepresentation': { type: string }, 'hydra:mapping': { type: array, items: { type: object, properties: { '@type': { type: string }, variable: { type: string }, property: { type: [string, 'null'] }, required: { type: boolean } } } } } } | |||
| @@ -523,25 +523,25 @@ paths: | |||
| schema: | |||
| type: array | |||
| items: | |||
| $ref: '#/components/schemas/MediaObject-media_object.read' | |||
| $ref: '#/components/schemas/Media-media_object.read' | |||
| text/html: | |||
| schema: | |||
| type: array | |||
| items: | |||
| $ref: '#/components/schemas/MediaObject-media_object.read' | |||
| $ref: '#/components/schemas/Media-media_object.read' | |||
| application/hal+json: | |||
| schema: | |||
| type: object | |||
| properties: | |||
| _embedded: { type: array, items: { $ref: '#/components/schemas/MediaObject.jsonhal-media_object.read' } } | |||
| _embedded: { type: array, items: { $ref: '#/components/schemas/Media.jsonhal-media_object.read' } } | |||
| totalItems: { type: integer, minimum: 0 } | |||
| itemsPerPage: { type: integer, minimum: 0 } | |||
| _links: { type: object, properties: { self: { type: object, properties: { href: { type: string, format: iri-reference } } }, first: { type: object, properties: { href: { type: string, format: iri-reference } } }, last: { type: object, properties: { href: { type: string, format: iri-reference } } }, next: { type: object, properties: { href: { type: string, format: iri-reference } } }, previous: { type: object, properties: { href: { type: string, format: iri-reference } } } } } | |||
| required: | |||
| - _links | |||
| - _embedded | |||
| summary: 'Retrieves the collection of MediaObject resources.' | |||
| description: 'Retrieves the collection of MediaObject resources.' | |||
| summary: 'Retrieves the collection of Media resources.' | |||
| description: 'Retrieves the collection of Media resources.' | |||
| parameters: | |||
| - | |||
| name: page | |||
| @@ -573,32 +573,32 @@ paths: | |||
| allowReserved: false | |||
| deprecated: false | |||
| post: | |||
| operationId: api_media_objects_post | |||
| operationId: api_medias_post | |||
| tags: | |||
| - MediaObject | |||
| - Media | |||
| responses: | |||
| 201: | |||
| description: 'MediaObject resource created' | |||
| description: 'Media resource created' | |||
| content: | |||
| application/ld+json: | |||
| schema: | |||
| $ref: '#/components/schemas/MediaObject.jsonld-media_object.read' | |||
| $ref: '#/components/schemas/Media.jsonld-media_object.read' | |||
| application/json: | |||
| schema: | |||
| $ref: '#/components/schemas/MediaObject-media_object.read' | |||
| $ref: '#/components/schemas/Media-media_object.read' | |||
| text/html: | |||
| schema: | |||
| $ref: '#/components/schemas/MediaObject-media_object.read' | |||
| $ref: '#/components/schemas/Media-media_object.read' | |||
| application/hal+json: | |||
| schema: | |||
| $ref: '#/components/schemas/MediaObject.jsonhal-media_object.read' | |||
| $ref: '#/components/schemas/Media.jsonhal-media_object.read' | |||
| links: { } | |||
| 400: | |||
| description: 'Invalid input' | |||
| 422: | |||
| description: 'Unprocessable entity' | |||
| summary: 'Creates a MediaObject resource.' | |||
| description: 'Creates a MediaObject resource.' | |||
| summary: 'Creates a Media resource.' | |||
| description: 'Creates a Media resource.' | |||
| parameters: [] | |||
| requestBody: | |||
| description: '' | |||
| @@ -613,31 +613,31 @@ paths: | |||
| required: false | |||
| deprecated: false | |||
| parameters: [] | |||
| '/api/media_objects/{id}': | |||
| '/api/medias/{id}': | |||
| get: | |||
| operationId: api_media_objects_id_get | |||
| operationId: api_medias_id_get | |||
| tags: | |||
| - MediaObject | |||
| - Media | |||
| responses: | |||
| 200: | |||
| description: 'MediaObject resource' | |||
| description: 'Media resource' | |||
| content: | |||
| application/ld+json: | |||
| schema: | |||
| $ref: '#/components/schemas/MediaObject.jsonld-media_object.read' | |||
| $ref: '#/components/schemas/Media.jsonld-media_object.read' | |||
| application/json: | |||
| schema: | |||
| $ref: '#/components/schemas/MediaObject-media_object.read' | |||
| $ref: '#/components/schemas/Media-media_object.read' | |||
| text/html: | |||
| schema: | |||
| $ref: '#/components/schemas/MediaObject-media_object.read' | |||
| $ref: '#/components/schemas/Media-media_object.read' | |||
| application/hal+json: | |||
| schema: | |||
| $ref: '#/components/schemas/MediaObject.jsonhal-media_object.read' | |||
| $ref: '#/components/schemas/Media.jsonhal-media_object.read' | |||
| 404: | |||
| description: 'Resource not found' | |||
| summary: 'Retrieves a MediaObject resource.' | |||
| description: 'Retrieves a MediaObject resource.' | |||
| summary: 'Retrieves a Media resource.' | |||
| description: 'Retrieves a Media resource.' | |||
| parameters: | |||
| - | |||
| name: id | |||
| @@ -1114,16 +1114,16 @@ paths: | |||
| content: | |||
| application/ld+json: | |||
| schema: | |||
| $ref: '#/components/schemas/Post.jsonld' | |||
| $ref: '#/components/schemas/Post.jsonld-posting_create' | |||
| application/json: | |||
| schema: | |||
| $ref: '#/components/schemas/Post' | |||
| $ref: '#/components/schemas/Post-posting_create' | |||
| text/html: | |||
| schema: | |||
| $ref: '#/components/schemas/Post' | |||
| $ref: '#/components/schemas/Post-posting_create' | |||
| application/hal+json: | |||
| schema: | |||
| $ref: '#/components/schemas/Post.jsonhal' | |||
| $ref: '#/components/schemas/Post.jsonhal-posting_create' | |||
| required: true | |||
| deprecated: false | |||
| parameters: [] | |||
| @@ -1238,7 +1238,7 @@ paths: | |||
| content: | |||
| application/merge-patch+json: | |||
| schema: | |||
| $ref: '#/components/schemas/Post' | |||
| $ref: '#/components/schemas/Post-posting_patch' | |||
| required: true | |||
| deprecated: false | |||
| parameters: [] | |||
| @@ -1500,6 +1500,7 @@ components: | |||
| - string | |||
| - 'null' | |||
| owner: | |||
| readOnly: true | |||
| 'owl:maxCardinality': 1 | |||
| type: | |||
| - string | |||
| @@ -1511,7 +1512,7 @@ components: | |||
| type: | |||
| - string | |||
| - 'null' | |||
| posting: | |||
| post: | |||
| 'owl:maxCardinality': 1 | |||
| type: | |||
| - string | |||
| @@ -1545,6 +1546,7 @@ components: | |||
| - string | |||
| - 'null' | |||
| owner: | |||
| readOnly: true | |||
| 'owl:maxCardinality': 1 | |||
| type: | |||
| - string | |||
| @@ -1556,7 +1558,7 @@ components: | |||
| type: | |||
| - string | |||
| - 'null' | |||
| posting: | |||
| post: | |||
| 'owl:maxCardinality': 1 | |||
| type: | |||
| - string | |||
| @@ -1604,6 +1606,7 @@ components: | |||
| - string | |||
| - 'null' | |||
| owner: | |||
| readOnly: true | |||
| 'owl:maxCardinality': 1 | |||
| type: | |||
| - string | |||
| @@ -1615,7 +1618,7 @@ components: | |||
| type: | |||
| - string | |||
| - 'null' | |||
| posting: | |||
| post: | |||
| 'owl:maxCardinality': 1 | |||
| type: | |||
| - string | |||
| @@ -1635,6 +1638,7 @@ components: | |||
| required: | |||
| - firstName | |||
| - lastName | |||
| - partner | |||
| properties: | |||
| firstName: | |||
| type: | |||
| @@ -1683,13 +1687,15 @@ components: | |||
| type: | |||
| - string | |||
| - 'null' | |||
| postings: | |||
| posts: | |||
| readOnly: true | |||
| type: array | |||
| items: | |||
| type: string | |||
| format: iri-reference | |||
| example: 'https://example.com/' | |||
| createdAt: | |||
| readOnly: true | |||
| type: | |||
| - string | |||
| - 'null' | |||
| @@ -1701,6 +1707,7 @@ components: | |||
| required: | |||
| - firstName | |||
| - lastName | |||
| - partner | |||
| properties: | |||
| _links: | |||
| type: object | |||
| @@ -1758,13 +1765,15 @@ components: | |||
| type: | |||
| - string | |||
| - 'null' | |||
| postings: | |||
| posts: | |||
| readOnly: true | |||
| type: array | |||
| items: | |||
| type: string | |||
| format: iri-reference | |||
| example: 'https://example.com/' | |||
| createdAt: | |||
| readOnly: true | |||
| type: | |||
| - string | |||
| - 'null' | |||
| @@ -1776,6 +1785,7 @@ components: | |||
| required: | |||
| - firstName | |||
| - lastName | |||
| - partner | |||
| properties: | |||
| '@context': | |||
| readOnly: true | |||
| @@ -1847,18 +1857,20 @@ components: | |||
| type: | |||
| - string | |||
| - 'null' | |||
| postings: | |||
| posts: | |||
| readOnly: true | |||
| type: array | |||
| items: | |||
| type: string | |||
| format: iri-reference | |||
| example: 'https://example.com/' | |||
| createdAt: | |||
| readOnly: true | |||
| type: | |||
| - string | |||
| - 'null' | |||
| format: date-time | |||
| MediaObject-media_object.read: | |||
| Media-media_object.read: | |||
| type: object | |||
| description: '' | |||
| deprecated: false | |||
| @@ -1871,7 +1883,7 @@ components: | |||
| type: | |||
| - string | |||
| - 'null' | |||
| MediaObject.jsonhal-media_object.read: | |||
| Media.jsonhal-media_object.read: | |||
| type: object | |||
| description: '' | |||
| deprecated: false | |||
| @@ -1893,7 +1905,7 @@ components: | |||
| type: | |||
| - string | |||
| - 'null' | |||
| MediaObject.jsonld-media_object.read: | |||
| Media.jsonld-media_object.read: | |||
| type: object | |||
| description: '' | |||
| deprecated: false | |||
| @@ -1987,6 +1999,7 @@ components: | |||
| - 'null' | |||
| format: date-time | |||
| contacts: | |||
| readOnly: true | |||
| type: array | |||
| items: | |||
| type: string | |||
| @@ -2059,6 +2072,7 @@ components: | |||
| - 'null' | |||
| format: date-time | |||
| contacts: | |||
| readOnly: true | |||
| type: array | |||
| items: | |||
| type: string | |||
| @@ -2145,6 +2159,7 @@ components: | |||
| - 'null' | |||
| format: date-time | |||
| contacts: | |||
| readOnly: true | |||
| type: array | |||
| items: | |||
| type: string | |||
| @@ -2167,6 +2182,7 @@ components: | |||
| - string | |||
| - 'null' | |||
| owner: | |||
| readOnly: true | |||
| 'owl:maxCardinality': 1 | |||
| type: | |||
| - string | |||
| @@ -2193,6 +2209,7 @@ components: | |||
| format: iri-reference | |||
| example: 'https://example.com/' | |||
| comments: | |||
| readOnly: true | |||
| type: array | |||
| items: | |||
| $ref: '#/components/schemas/Comment' | |||
| @@ -2202,6 +2219,52 @@ components: | |||
| - string | |||
| - 'null' | |||
| format: date-time | |||
| Post-posting_create: | |||
| type: object | |||
| description: '' | |||
| deprecated: false | |||
| required: | |||
| - headline | |||
| - message | |||
| properties: | |||
| headline: | |||
| type: | |||
| - string | |||
| - 'null' | |||
| message: | |||
| type: | |||
| - string | |||
| - 'null' | |||
| partner: | |||
| 'owl:maxCardinality': 1 | |||
| type: | |||
| - string | |||
| - 'null' | |||
| format: iri-reference | |||
| example: 'https://example.com/' | |||
| contact: | |||
| 'owl:maxCardinality': 1 | |||
| type: | |||
| - string | |||
| - 'null' | |||
| format: iri-reference | |||
| example: 'https://example.com/' | |||
| Post-posting_patch: | |||
| type: object | |||
| description: '' | |||
| deprecated: false | |||
| required: | |||
| - headline | |||
| - message | |||
| properties: | |||
| headline: | |||
| type: | |||
| - string | |||
| - 'null' | |||
| message: | |||
| type: | |||
| - string | |||
| - 'null' | |||
| Post.jsonhal: | |||
| type: object | |||
| description: '' | |||
| @@ -2228,6 +2291,7 @@ components: | |||
| - string | |||
| - 'null' | |||
| owner: | |||
| readOnly: true | |||
| 'owl:maxCardinality': 1 | |||
| type: | |||
| - string | |||
| @@ -2254,6 +2318,7 @@ components: | |||
| format: iri-reference | |||
| example: 'https://example.com/' | |||
| comments: | |||
| readOnly: true | |||
| type: array | |||
| items: | |||
| $ref: '#/components/schemas/Comment.jsonhal' | |||
| @@ -2263,6 +2328,45 @@ components: | |||
| - string | |||
| - 'null' | |||
| format: date-time | |||
| Post.jsonhal-posting_create: | |||
| type: object | |||
| description: '' | |||
| deprecated: false | |||
| required: | |||
| - headline | |||
| - message | |||
| properties: | |||
| _links: | |||
| type: object | |||
| properties: | |||
| self: | |||
| type: object | |||
| properties: | |||
| href: | |||
| type: string | |||
| format: iri-reference | |||
| headline: | |||
| type: | |||
| - string | |||
| - 'null' | |||
| message: | |||
| type: | |||
| - string | |||
| - 'null' | |||
| partner: | |||
| 'owl:maxCardinality': 1 | |||
| type: | |||
| - string | |||
| - 'null' | |||
| format: iri-reference | |||
| example: 'https://example.com/' | |||
| contact: | |||
| 'owl:maxCardinality': 1 | |||
| type: | |||
| - string | |||
| - 'null' | |||
| format: iri-reference | |||
| example: 'https://example.com/' | |||
| Post.jsonld: | |||
| type: object | |||
| description: '' | |||
| @@ -2303,6 +2407,7 @@ components: | |||
| - string | |||
| - 'null' | |||
| owner: | |||
| readOnly: true | |||
| 'owl:maxCardinality': 1 | |||
| type: | |||
| - string | |||
| @@ -2329,6 +2434,7 @@ components: | |||
| format: iri-reference | |||
| example: 'https://example.com/' | |||
| comments: | |||
| readOnly: true | |||
| type: array | |||
| items: | |||
| $ref: '#/components/schemas/Comment.jsonld' | |||
| @@ -2338,6 +2444,36 @@ components: | |||
| - string | |||
| - 'null' | |||
| format: date-time | |||
| Post.jsonld-posting_create: | |||
| type: object | |||
| description: '' | |||
| deprecated: false | |||
| required: | |||
| - headline | |||
| - message | |||
| properties: | |||
| headline: | |||
| type: | |||
| - string | |||
| - 'null' | |||
| message: | |||
| type: | |||
| - string | |||
| - 'null' | |||
| partner: | |||
| 'owl:maxCardinality': 1 | |||
| type: | |||
| - string | |||
| - 'null' | |||
| format: iri-reference | |||
| example: 'https://example.com/' | |||
| contact: | |||
| 'owl:maxCardinality': 1 | |||
| type: | |||
| - string | |||
| - 'null' | |||
| format: iri-reference | |||
| example: 'https://example.com/' | |||
| User: | |||
| type: object | |||
| description: '' | |||
| @@ -2370,7 +2506,8 @@ components: | |||
| - 'null' | |||
| active: | |||
| type: boolean | |||
| postings: | |||
| posts: | |||
| readOnly: true | |||
| type: array | |||
| items: | |||
| type: string | |||
| @@ -2423,7 +2560,8 @@ components: | |||
| - 'null' | |||
| active: | |||
| type: boolean | |||
| postings: | |||
| posts: | |||
| readOnly: true | |||
| type: array | |||
| items: | |||
| type: string | |||
| @@ -2490,7 +2628,8 @@ components: | |||
| - 'null' | |||
| active: | |||
| type: boolean | |||
| postings: | |||
| posts: | |||
| readOnly: true | |||
| type: array | |||
| items: | |||
| type: string | |||
| @@ -1,4 +1,4 @@ | |||
| import {Component, Input, OnInit} from '@angular/core'; | |||
| import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; | |||
| import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap"; | |||
| import {ModalContent} from "@app/_interfaces/modalContent"; | |||
| @@ -10,13 +10,26 @@ import {ModalContent} from "@app/_interfaces/modalContent"; | |||
| export class ModalComponent implements OnInit { | |||
| @Input() dynamicComponent: any; | |||
| @Input() inputData: any; | |||
| @Output() public submit: EventEmitter<any> = new EventEmitter<any>(); | |||
| constructor(public activeModal: NgbActiveModal) { | |||
| } | |||
| ngOnInit(): void { | |||
| // this.submit.emit("flo is toll"); | |||
| // this.dynamicComponent.submit.subscribe(() => { | |||
| // console.log('Ereignis von dynamischer Komponente empfangen'); | |||
| // // Hier kannst du die Logik für das Abfangen des Ereignisses implementieren | |||
| // }); | |||
| } | |||
| onSubmit() { | |||
| console.log("FLOR"); | |||
| } | |||
| onChildSubmit($event: any) { | |||
| this.submit.emit($event); | |||
| } | |||
| public static createInputData(inputData: any) { | |||
| @@ -4,7 +4,7 @@ export const commentForm = new FormGroup({ | |||
| message: new FormControl(null, [Validators.required]), | |||
| owner: new FormControl(null, []), | |||
| ownerName: new FormControl(null, []), | |||
| posting: new FormControl(null, []), | |||
| post: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| @@ -13,7 +13,7 @@ export const commentJsonhalForm = new FormGroup({ | |||
| message: new FormControl(null, [Validators.required]), | |||
| owner: new FormControl(null, []), | |||
| ownerName: new FormControl(null, []), | |||
| posting: new FormControl(null, []), | |||
| post: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| @@ -21,21 +21,21 @@ export const commentJsonldForm = new FormGroup({ | |||
| message: new FormControl(null, [Validators.required]), | |||
| owner: new FormControl(null, []), | |||
| ownerName: new FormControl(null, []), | |||
| posting: new FormControl(null, []), | |||
| post: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| export const contactForm = new FormGroup({ | |||
| firstName: new FormControl(null, [Validators.required]), | |||
| lastName: new FormControl(null, [Validators.required]), | |||
| partner: new FormControl(null, []), | |||
| partner: new FormControl(null, [Validators.required]), | |||
| birthday: new FormControl(null, []), | |||
| image: new FormControl(null, []), | |||
| imageUrl: new FormControl(null, []), | |||
| position: new FormControl(null, []), | |||
| phone: new FormControl(null, []), | |||
| email: new FormControl(null, [Validators.email]), | |||
| postings: new FormControl(null, []), | |||
| posts: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| @@ -43,41 +43,41 @@ export const contactJsonhalForm = new FormGroup({ | |||
| _links: new FormControl(null, []), | |||
| firstName: new FormControl(null, [Validators.required]), | |||
| lastName: new FormControl(null, [Validators.required]), | |||
| partner: new FormControl(null, []), | |||
| partner: new FormControl(null, [Validators.required]), | |||
| birthday: new FormControl(null, []), | |||
| image: new FormControl(null, []), | |||
| imageUrl: new FormControl(null, []), | |||
| position: new FormControl(null, []), | |||
| phone: new FormControl(null, []), | |||
| email: new FormControl(null, [Validators.email]), | |||
| postings: new FormControl(null, []), | |||
| posts: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| export const contactJsonldForm = new FormGroup({ | |||
| firstName: new FormControl(null, [Validators.required]), | |||
| lastName: new FormControl(null, [Validators.required]), | |||
| partner: new FormControl(null, []), | |||
| partner: new FormControl(null, [Validators.required]), | |||
| birthday: new FormControl(null, []), | |||
| image: new FormControl(null, []), | |||
| imageUrl: new FormControl(null, []), | |||
| position: new FormControl(null, []), | |||
| phone: new FormControl(null, []), | |||
| email: new FormControl(null, [Validators.email]), | |||
| postings: new FormControl(null, []), | |||
| posts: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| export const mediaObjectMediaObjectReadForm = new FormGroup({ | |||
| export const mediaMediaObjectReadForm = new FormGroup({ | |||
| contentUrl: new FormControl(null, []) | |||
| }); | |||
| export const mediaObjectJsonhalMediaObjectReadForm = new FormGroup({ | |||
| export const mediaJsonhalMediaObjectReadForm = new FormGroup({ | |||
| _links: new FormControl(null, []), | |||
| contentUrl: new FormControl(null, []) | |||
| }); | |||
| export const mediaObjectJsonldMediaObjectReadForm = new FormGroup({ | |||
| export const mediaJsonldMediaObjectReadForm = new FormGroup({ | |||
| contentUrl: new FormControl(null, []) | |||
| }); | |||
| @@ -138,6 +138,18 @@ export const postForm = new FormGroup({ | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| export const postPostingCreateForm = new FormGroup({ | |||
| headline: new FormControl(null, [Validators.required]), | |||
| message: new FormControl(null, [Validators.required]), | |||
| partner: new FormControl(null, []), | |||
| contact: new FormControl(null, []) | |||
| }); | |||
| export const postPostingPatchForm = new FormGroup({ | |||
| headline: new FormControl(null, [Validators.required]), | |||
| message: new FormControl(null, [Validators.required]) | |||
| }); | |||
| export const postJsonhalForm = new FormGroup({ | |||
| _links: new FormControl(null, []), | |||
| headline: new FormControl(null, [Validators.required]), | |||
| @@ -150,6 +162,14 @@ export const postJsonhalForm = new FormGroup({ | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| export const postJsonhalPostingCreateForm = new FormGroup({ | |||
| _links: new FormControl(null, []), | |||
| headline: new FormControl(null, [Validators.required]), | |||
| message: new FormControl(null, [Validators.required]), | |||
| partner: new FormControl(null, []), | |||
| contact: new FormControl(null, []) | |||
| }); | |||
| export const postJsonldForm = new FormGroup({ | |||
| headline: new FormControl(null, [Validators.required]), | |||
| message: new FormControl(null, [Validators.required]), | |||
| @@ -161,13 +181,20 @@ export const postJsonldForm = new FormGroup({ | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| export const postJsonldPostingCreateForm = new FormGroup({ | |||
| headline: new FormControl(null, [Validators.required]), | |||
| message: new FormControl(null, [Validators.required]), | |||
| partner: new FormControl(null, []), | |||
| contact: new FormControl(null, []) | |||
| }); | |||
| export const userForm = new FormGroup({ | |||
| email: new FormControl(null, [Validators.required, Validators.email]), | |||
| firstName: new FormControl(null, [Validators.required]), | |||
| lastName: new FormControl(null, [Validators.required]), | |||
| password: new FormControl(null, []), | |||
| active: new FormControl(null, []), | |||
| postings: new FormControl(null, []), | |||
| posts: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| @@ -178,7 +205,7 @@ export const userJsonhalForm = new FormGroup({ | |||
| lastName: new FormControl(null, [Validators.required]), | |||
| password: new FormControl(null, []), | |||
| active: new FormControl(null, []), | |||
| postings: new FormControl(null, []), | |||
| posts: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| @@ -188,6 +215,6 @@ export const userJsonldForm = new FormGroup({ | |||
| lastName: new FormControl(null, [Validators.required]), | |||
| password: new FormControl(null, []), | |||
| active: new FormControl(null, []), | |||
| postings: new FormControl(null, []), | |||
| posts: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| @@ -1,4 +1,4 @@ | |||
| import {Component, Input, OnInit} from '@angular/core'; | |||
| import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; | |||
| import {FormGroup} from "@angular/forms"; | |||
| import {contactForm} from "@app/_forms/apiForms"; | |||
| import {ContactJsonld, ContactService} from "@app/core/api/v1"; | |||
| @@ -14,6 +14,7 @@ import {ModalContent} from "@app/_interfaces/modalContent"; | |||
| export class NewContactComponent implements ModalContent, OnInit { | |||
| @Input() public inputData: any; | |||
| @Output() public submit: EventEmitter<any> = new EventEmitter<any>(); | |||
| protected contactForm: FormGroup; | |||
| protected selectedImage: File | null; | |||
| @@ -30,6 +31,7 @@ export class NewContactComponent implements ModalContent, OnInit { | |||
| ngOnInit(): void { | |||
| console.log(this.inputData); | |||
| this.contactForm.patchValue({"partner": this.inputData}); | |||
| } | |||
| onSubmit() { | |||
| @@ -40,15 +42,18 @@ export class NewContactComponent implements ModalContent, OnInit { | |||
| console.log('Formular wurde gesendet:', this.contactForm.value); | |||
| let newContact: ContactJsonld = this.contactForm.value as ContactJsonld; | |||
| newContact.postings = []; | |||
| this.contactSub = this.contactService.contactsPost( | |||
| this.contactForm.value as ContactJsonld | |||
| ).subscribe( | |||
| data => { | |||
| console.log(data); | |||
| } | |||
| ); | |||
| newContact.posts = []; | |||
| this.submit.emit("HALLO DANIEL"); | |||
| // this.contactSub = this.contactService.contactsPost( | |||
| // this.contactForm.value as ContactJsonld | |||
| // ).subscribe( | |||
| // data => { | |||
| // console.log(data); | |||
| // this.submit.emit("HALLO DANIEL"); | |||
| // } | |||
| // ); | |||
| } | |||
| } | |||
| @@ -5,7 +5,7 @@ api/api.ts | |||
| api/comment.service.ts | |||
| api/contact.service.ts | |||
| api/loginCheck.service.ts | |||
| api/mediaObject.service.ts | |||
| api/media.service.ts | |||
| api/partner.service.ts | |||
| api/post.service.ts | |||
| api/user.service.ts | |||
| @@ -22,8 +22,8 @@ model/apiCommentsGetCollection200ResponseHydraSearchHydraMappingInner.ts | |||
| model/apiCommentsGetCollection200ResponseHydraView.ts | |||
| model/apiContactsGetCollection200Response.ts | |||
| model/apiContactsGetCollection200Response1.ts | |||
| model/apiMediaObjectsGetCollection200Response.ts | |||
| model/apiMediaObjectsGetCollection200Response1.ts | |||
| model/apiMediasGetCollection200Response.ts | |||
| model/apiMediasGetCollection200Response1.ts | |||
| model/apiPartnersGetCollection200Response.ts | |||
| model/apiPartnersGetCollection200Response1.ts | |||
| model/apiPostsGetCollection200Response.ts | |||
| @@ -41,16 +41,20 @@ model/contactJsonhal.ts | |||
| model/contactJsonld.ts | |||
| model/loginCheckPost200Response.ts | |||
| model/loginCheckPostRequest.ts | |||
| model/mediaObjectJsonhalMediaObjectRead.ts | |||
| model/mediaObjectJsonldMediaObjectRead.ts | |||
| model/mediaObjectMediaObjectRead.ts | |||
| model/mediaJsonhalMediaObjectRead.ts | |||
| model/mediaJsonldMediaObjectRead.ts | |||
| model/mediaMediaObjectRead.ts | |||
| model/models.ts | |||
| model/partner.ts | |||
| model/partnerJsonhal.ts | |||
| model/partnerJsonld.ts | |||
| model/post.ts | |||
| model/postJsonhal.ts | |||
| model/postJsonhalPostingCreate.ts | |||
| model/postJsonld.ts | |||
| model/postJsonldPostingCreate.ts | |||
| model/postPostingCreate.ts | |||
| model/postPostingPatch.ts | |||
| model/user.ts | |||
| model/userJsonhal.ts | |||
| model/userJsonld.ts | |||
| @@ -4,12 +4,12 @@ export * from './contact.service'; | |||
| import { ContactService } from './contact.service'; | |||
| export * from './loginCheck.service'; | |||
| import { LoginCheckService } from './loginCheck.service'; | |||
| export * from './mediaObject.service'; | |||
| import { MediaObjectService } from './mediaObject.service'; | |||
| export * from './media.service'; | |||
| import { MediaService } from './media.service'; | |||
| export * from './partner.service'; | |||
| import { PartnerService } from './partner.service'; | |||
| export * from './post.service'; | |||
| import { PostService } from './post.service'; | |||
| export * from './user.service'; | |||
| import { UserService } from './user.service'; | |||
| export const APIS = [CommentService, ContactService, LoginCheckService, MediaObjectService, PartnerService, PostService, UserService]; | |||
| export const APIS = [CommentService, ContactService, LoginCheckService, MediaService, PartnerService, PostService, UserService]; | |||
| @@ -0,0 +1,369 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | |||
| * https://openapi-generator.tech | |||
| * Do not edit the class manually. | |||
| */ | |||
| /* tslint:disable:no-unused-variable member-ordering */ | |||
| import { Inject, Injectable, Optional } from '@angular/core'; | |||
| import { HttpClient, HttpHeaders, HttpParams, | |||
| HttpResponse, HttpEvent, HttpParameterCodec, HttpContext | |||
| } from '@angular/common/http'; | |||
| import { CustomHttpParameterCodec } from '../encoder'; | |||
| import { Observable } from 'rxjs'; | |||
| // @ts-ignore | |||
| import { ApiMediasGetCollection200Response } from '../model/apiMediasGetCollection200Response'; | |||
| // @ts-ignore | |||
| import { ApiMediasGetCollection200Response1 } from '../model/apiMediasGetCollection200Response1'; | |||
| // @ts-ignore | |||
| import { MediaJsonhalMediaObjectRead } from '../model/mediaJsonhalMediaObjectRead'; | |||
| // @ts-ignore | |||
| import { MediaJsonldMediaObjectRead } from '../model/mediaJsonldMediaObjectRead'; | |||
| // @ts-ignore | |||
| import { MediaMediaObjectRead } from '../model/mediaMediaObjectRead'; | |||
| // @ts-ignore | |||
| import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; | |||
| import { Configuration } from '../configuration'; | |||
| @Injectable({ | |||
| providedIn: 'root' | |||
| }) | |||
| export class MediaService { | |||
| protected basePath = 'http://localhost'; | |||
| public defaultHeaders = new HttpHeaders(); | |||
| public configuration = new Configuration(); | |||
| public encoder: HttpParameterCodec; | |||
| constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { | |||
| if (configuration) { | |||
| this.configuration = configuration; | |||
| } | |||
| if (typeof this.configuration.basePath !== 'string') { | |||
| if (Array.isArray(basePath) && basePath.length > 0) { | |||
| basePath = basePath[0]; | |||
| } | |||
| if (typeof basePath !== 'string') { | |||
| basePath = this.basePath; | |||
| } | |||
| this.configuration.basePath = basePath; | |||
| } | |||
| this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); | |||
| } | |||
| /** | |||
| * @param consumes string[] mime-types | |||
| * @return true: consumes contains 'multipart/form-data', false: otherwise | |||
| */ | |||
| private canConsumeForm(consumes: string[]): boolean { | |||
| const form = 'multipart/form-data'; | |||
| for (const consume of consumes) { | |||
| if (form === consume) { | |||
| return true; | |||
| } | |||
| } | |||
| return false; | |||
| } | |||
| // @ts-ignore | |||
| private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { | |||
| if (typeof value === "object" && value instanceof Date === false) { | |||
| httpParams = this.addToHttpParamsRecursive(httpParams, value); | |||
| } else { | |||
| httpParams = this.addToHttpParamsRecursive(httpParams, value, key); | |||
| } | |||
| return httpParams; | |||
| } | |||
| private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { | |||
| if (value == null) { | |||
| return httpParams; | |||
| } | |||
| if (typeof value === "object") { | |||
| if (Array.isArray(value)) { | |||
| (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); | |||
| } else if (value instanceof Date) { | |||
| if (key != null) { | |||
| httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10)); | |||
| } else { | |||
| throw Error("key may not be null if value is Date"); | |||
| } | |||
| } else { | |||
| Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( | |||
| httpParams, value[k], key != null ? `${key}.${k}` : k)); | |||
| } | |||
| } else if (key != null) { | |||
| httpParams = httpParams.append(key, value); | |||
| } else { | |||
| throw Error("key may not be null if value is not object or array"); | |||
| } | |||
| return httpParams; | |||
| } | |||
| /** | |||
| * Retrieves the collection of Media resources. | |||
| * Retrieves the collection of Media resources. | |||
| * @param page The collection page number | |||
| * @param itemsPerPage The number of items per page | |||
| * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. | |||
| * @param reportProgress flag to report request and response progress. | |||
| */ | |||
| public mediasGetCollection(page?: number, itemsPerPage?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiMediasGetCollection200Response>; | |||
| public mediasGetCollection(page?: number, itemsPerPage?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiMediasGetCollection200Response>>; | |||
| public mediasGetCollection(page?: number, itemsPerPage?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiMediasGetCollection200Response>>; | |||
| public mediasGetCollection(page?: number, itemsPerPage?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| let localVarQueryParameters = new HttpParams({encoder: this.encoder}); | |||
| if (page !== undefined && page !== null) { | |||
| localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, | |||
| <any>page, 'page'); | |||
| } | |||
| if (itemsPerPage !== undefined && itemsPerPage !== null) { | |||
| localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, | |||
| <any>itemsPerPage, 'itemsPerPage'); | |||
| } | |||
| let localVarHeaders = this.defaultHeaders; | |||
| let localVarCredential: string | undefined; | |||
| // authentication (JWT) required | |||
| localVarCredential = this.configuration.lookupCredential('JWT'); | |||
| if (localVarCredential) { | |||
| localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); | |||
| } | |||
| let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; | |||
| if (localVarHttpHeaderAcceptSelected === undefined) { | |||
| // to determine the Accept header | |||
| const httpHeaderAccepts: string[] = [ | |||
| 'application/ld+json', | |||
| 'application/json', | |||
| 'text/html', | |||
| 'application/hal+json' | |||
| ]; | |||
| localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); | |||
| } | |||
| if (localVarHttpHeaderAcceptSelected !== undefined) { | |||
| localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); | |||
| } | |||
| let localVarHttpContext: HttpContext | undefined = options && options.context; | |||
| if (localVarHttpContext === undefined) { | |||
| localVarHttpContext = new HttpContext(); | |||
| } | |||
| let localVarTransferCache: boolean | undefined = options && options.transferCache; | |||
| if (localVarTransferCache === undefined) { | |||
| localVarTransferCache = true; | |||
| } | |||
| let responseType_: 'text' | 'json' | 'blob' = 'json'; | |||
| if (localVarHttpHeaderAcceptSelected) { | |||
| if (localVarHttpHeaderAcceptSelected.startsWith('text')) { | |||
| responseType_ = 'text'; | |||
| } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { | |||
| responseType_ = 'json'; | |||
| } else { | |||
| responseType_ = 'blob'; | |||
| } | |||
| } | |||
| let localVarPath = `/api/medias`; | |||
| return this.httpClient.request<ApiMediasGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`, | |||
| { | |||
| context: localVarHttpContext, | |||
| params: localVarQueryParameters, | |||
| responseType: <any>responseType_, | |||
| withCredentials: this.configuration.withCredentials, | |||
| headers: localVarHeaders, | |||
| observe: observe, | |||
| transferCache: localVarTransferCache, | |||
| reportProgress: reportProgress | |||
| } | |||
| ); | |||
| } | |||
| /** | |||
| * Retrieves a Media resource. | |||
| * Retrieves a Media resource. | |||
| * @param id MediaObject identifier | |||
| * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. | |||
| * @param reportProgress flag to report request and response progress. | |||
| */ | |||
| public mediasIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<MediaJsonldMediaObjectRead>; | |||
| public mediasIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<MediaJsonldMediaObjectRead>>; | |||
| public mediasIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<MediaJsonldMediaObjectRead>>; | |||
| public mediasIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| if (id === null || id === undefined) { | |||
| throw new Error('Required parameter id was null or undefined when calling mediasIdGet.'); | |||
| } | |||
| let localVarHeaders = this.defaultHeaders; | |||
| let localVarCredential: string | undefined; | |||
| // authentication (JWT) required | |||
| localVarCredential = this.configuration.lookupCredential('JWT'); | |||
| if (localVarCredential) { | |||
| localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); | |||
| } | |||
| let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; | |||
| if (localVarHttpHeaderAcceptSelected === undefined) { | |||
| // to determine the Accept header | |||
| const httpHeaderAccepts: string[] = [ | |||
| 'application/ld+json', | |||
| 'application/json', | |||
| 'text/html', | |||
| 'application/hal+json' | |||
| ]; | |||
| localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); | |||
| } | |||
| if (localVarHttpHeaderAcceptSelected !== undefined) { | |||
| localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); | |||
| } | |||
| let localVarHttpContext: HttpContext | undefined = options && options.context; | |||
| if (localVarHttpContext === undefined) { | |||
| localVarHttpContext = new HttpContext(); | |||
| } | |||
| let localVarTransferCache: boolean | undefined = options && options.transferCache; | |||
| if (localVarTransferCache === undefined) { | |||
| localVarTransferCache = true; | |||
| } | |||
| let responseType_: 'text' | 'json' | 'blob' = 'json'; | |||
| if (localVarHttpHeaderAcceptSelected) { | |||
| if (localVarHttpHeaderAcceptSelected.startsWith('text')) { | |||
| responseType_ = 'text'; | |||
| } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { | |||
| responseType_ = 'json'; | |||
| } else { | |||
| responseType_ = 'blob'; | |||
| } | |||
| } | |||
| let localVarPath = `/api/medias/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; | |||
| return this.httpClient.request<MediaJsonldMediaObjectRead>('get', `${this.configuration.basePath}${localVarPath}`, | |||
| { | |||
| context: localVarHttpContext, | |||
| responseType: <any>responseType_, | |||
| withCredentials: this.configuration.withCredentials, | |||
| headers: localVarHeaders, | |||
| observe: observe, | |||
| transferCache: localVarTransferCache, | |||
| reportProgress: reportProgress | |||
| } | |||
| ); | |||
| } | |||
| /** | |||
| * Creates a Media resource. | |||
| * Creates a Media resource. | |||
| * @param file | |||
| * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. | |||
| * @param reportProgress flag to report request and response progress. | |||
| */ | |||
| public mediasPost(file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<MediaJsonldMediaObjectRead>; | |||
| public mediasPost(file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<MediaJsonldMediaObjectRead>>; | |||
| public mediasPost(file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<MediaJsonldMediaObjectRead>>; | |||
| public mediasPost(file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| let localVarHeaders = this.defaultHeaders; | |||
| let localVarCredential: string | undefined; | |||
| // authentication (JWT) required | |||
| localVarCredential = this.configuration.lookupCredential('JWT'); | |||
| if (localVarCredential) { | |||
| localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); | |||
| } | |||
| let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; | |||
| if (localVarHttpHeaderAcceptSelected === undefined) { | |||
| // to determine the Accept header | |||
| const httpHeaderAccepts: string[] = [ | |||
| 'application/ld+json', | |||
| 'application/json', | |||
| 'text/html', | |||
| 'application/hal+json' | |||
| ]; | |||
| localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); | |||
| } | |||
| if (localVarHttpHeaderAcceptSelected !== undefined) { | |||
| localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); | |||
| } | |||
| let localVarHttpContext: HttpContext | undefined = options && options.context; | |||
| if (localVarHttpContext === undefined) { | |||
| localVarHttpContext = new HttpContext(); | |||
| } | |||
| let localVarTransferCache: boolean | undefined = options && options.transferCache; | |||
| if (localVarTransferCache === undefined) { | |||
| localVarTransferCache = true; | |||
| } | |||
| // to determine the Content-Type header | |||
| const consumes: string[] = [ | |||
| 'multipart/form-data' | |||
| ]; | |||
| const canConsumeForm = this.canConsumeForm(consumes); | |||
| let localVarFormParams: { append(param: string, value: any): any; }; | |||
| let localVarUseForm = false; | |||
| let localVarConvertFormParamsToString = false; | |||
| // use FormData to transmit files using content-type "multipart/form-data" | |||
| // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data | |||
| localVarUseForm = canConsumeForm; | |||
| if (localVarUseForm) { | |||
| localVarFormParams = new FormData(); | |||
| } else { | |||
| localVarFormParams = new HttpParams({encoder: this.encoder}); | |||
| } | |||
| if (file !== undefined) { | |||
| localVarFormParams = localVarFormParams.append('file', <any>file) as any || localVarFormParams; | |||
| } | |||
| let responseType_: 'text' | 'json' | 'blob' = 'json'; | |||
| if (localVarHttpHeaderAcceptSelected) { | |||
| if (localVarHttpHeaderAcceptSelected.startsWith('text')) { | |||
| responseType_ = 'text'; | |||
| } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { | |||
| responseType_ = 'json'; | |||
| } else { | |||
| responseType_ = 'blob'; | |||
| } | |||
| } | |||
| let localVarPath = `/api/medias`; | |||
| return this.httpClient.request<MediaJsonldMediaObjectRead>('post', `${this.configuration.basePath}${localVarPath}`, | |||
| { | |||
| context: localVarHttpContext, | |||
| body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, | |||
| responseType: <any>responseType_, | |||
| withCredentials: this.configuration.withCredentials, | |||
| headers: localVarHeaders, | |||
| observe: observe, | |||
| transferCache: localVarTransferCache, | |||
| reportProgress: reportProgress | |||
| } | |||
| ); | |||
| } | |||
| } | |||
| @@ -27,7 +27,15 @@ import { Post } from '../model/post'; | |||
| // @ts-ignore | |||
| import { PostJsonhal } from '../model/postJsonhal'; | |||
| // @ts-ignore | |||
| import { PostJsonhalPostingCreate } from '../model/postJsonhalPostingCreate'; | |||
| // @ts-ignore | |||
| import { PostJsonld } from '../model/postJsonld'; | |||
| // @ts-ignore | |||
| import { PostJsonldPostingCreate } from '../model/postJsonldPostingCreate'; | |||
| // @ts-ignore | |||
| import { PostPostingCreate } from '../model/postPostingCreate'; | |||
| // @ts-ignore | |||
| import { PostPostingPatch } from '../model/postPostingPatch'; | |||
| // @ts-ignore | |||
| import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; | |||
| @@ -357,19 +365,19 @@ export class PostService { | |||
| * Updates the Post resource. | |||
| * Updates the Post resource. | |||
| * @param id PostingApi identifier | |||
| * @param post The updated Post resource | |||
| * @param postPostingPatch The updated Post resource | |||
| * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. | |||
| * @param reportProgress flag to report request and response progress. | |||
| */ | |||
| public postsIdPatch(id: string, post: Post, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<PostJsonld>; | |||
| public postsIdPatch(id: string, post: Post, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<PostJsonld>>; | |||
| public postsIdPatch(id: string, post: Post, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<PostJsonld>>; | |||
| public postsIdPatch(id: string, post: Post, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| public postsIdPatch(id: string, postPostingPatch: PostPostingPatch, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<PostJsonld>; | |||
| public postsIdPatch(id: string, postPostingPatch: PostPostingPatch, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<PostJsonld>>; | |||
| public postsIdPatch(id: string, postPostingPatch: PostPostingPatch, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<PostJsonld>>; | |||
| public postsIdPatch(id: string, postPostingPatch: PostPostingPatch, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| if (id === null || id === undefined) { | |||
| throw new Error('Required parameter id was null or undefined when calling postsIdPatch.'); | |||
| } | |||
| if (post === null || post === undefined) { | |||
| throw new Error('Required parameter post was null or undefined when calling postsIdPatch.'); | |||
| if (postPostingPatch === null || postPostingPatch === undefined) { | |||
| throw new Error('Required parameter postPostingPatch was null or undefined when calling postsIdPatch.'); | |||
| } | |||
| let localVarHeaders = this.defaultHeaders; | |||
| @@ -431,7 +439,7 @@ export class PostService { | |||
| return this.httpClient.request<PostJsonld>('patch', `${this.configuration.basePath}${localVarPath}`, | |||
| { | |||
| context: localVarHttpContext, | |||
| body: post, | |||
| body: postPostingPatch, | |||
| responseType: <any>responseType_, | |||
| withCredentials: this.configuration.withCredentials, | |||
| headers: localVarHeaders, | |||
| @@ -445,16 +453,16 @@ export class PostService { | |||
| /** | |||
| * Creates a Post resource. | |||
| * Creates a Post resource. | |||
| * @param postJsonld The new Post resource | |||
| * @param postJsonldPostingCreate The new Post resource | |||
| * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. | |||
| * @param reportProgress flag to report request and response progress. | |||
| */ | |||
| public postsPost(postJsonld: PostJsonld, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<PostJsonld>; | |||
| public postsPost(postJsonld: PostJsonld, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<PostJsonld>>; | |||
| public postsPost(postJsonld: PostJsonld, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<PostJsonld>>; | |||
| public postsPost(postJsonld: PostJsonld, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| if (postJsonld === null || postJsonld === undefined) { | |||
| throw new Error('Required parameter postJsonld was null or undefined when calling postsPost.'); | |||
| public postsPost(postJsonldPostingCreate: PostJsonldPostingCreate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<PostJsonld>; | |||
| public postsPost(postJsonldPostingCreate: PostJsonldPostingCreate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<PostJsonld>>; | |||
| public postsPost(postJsonldPostingCreate: PostJsonldPostingCreate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<PostJsonld>>; | |||
| public postsPost(postJsonldPostingCreate: PostJsonldPostingCreate, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| if (postJsonldPostingCreate === null || postJsonldPostingCreate === undefined) { | |||
| throw new Error('Required parameter postJsonldPostingCreate was null or undefined when calling postsPost.'); | |||
| } | |||
| let localVarHeaders = this.defaultHeaders; | |||
| @@ -519,7 +527,7 @@ export class PostService { | |||
| return this.httpClient.request<PostJsonld>('post', `${this.configuration.basePath}${localVarPath}`, | |||
| { | |||
| context: localVarHttpContext, | |||
| body: postJsonld, | |||
| body: postJsonldPostingCreate, | |||
| responseType: <any>responseType_, | |||
| withCredentials: this.configuration.withCredentials, | |||
| headers: localVarHeaders, | |||
| @@ -0,0 +1,23 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.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 { MediaJsonldMediaObjectRead } from './mediaJsonldMediaObjectRead'; | |||
| import { ApiCommentsGetCollection200ResponseHydraSearch } from './apiCommentsGetCollection200ResponseHydraSearch'; | |||
| import { ApiCommentsGetCollection200ResponseHydraView } from './apiCommentsGetCollection200ResponseHydraView'; | |||
| export interface ApiMediasGetCollection200Response { | |||
| 'hydra:member': Array<MediaJsonldMediaObjectRead>; | |||
| 'hydra:totalItems'?: number; | |||
| 'hydra:view'?: ApiCommentsGetCollection200ResponseHydraView; | |||
| 'hydra:search'?: ApiCommentsGetCollection200ResponseHydraSearch; | |||
| } | |||
| @@ -0,0 +1,22 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.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 { MediaJsonhalMediaObjectRead } from './mediaJsonhalMediaObjectRead'; | |||
| import { ApiCommentsGetCollection200Response1Links } from './apiCommentsGetCollection200Response1Links'; | |||
| export interface ApiMediasGetCollection200Response1 { | |||
| _embedded: Array<MediaJsonhalMediaObjectRead>; | |||
| totalItems?: number; | |||
| itemsPerPage?: number; | |||
| _links: ApiCommentsGetCollection200Response1Links; | |||
| } | |||
| @@ -16,9 +16,9 @@ | |||
| */ | |||
| export interface Comment { | |||
| message: string | null; | |||
| owner?: string | null; | |||
| readonly owner?: string | null; | |||
| readonly ownerName?: string | null; | |||
| posting?: string | null; | |||
| post?: string | null; | |||
| readonly createdAt?: string | null; | |||
| } | |||
| @@ -18,9 +18,9 @@ import { CommentJsonhalLinks } from './commentJsonhalLinks'; | |||
| export interface CommentJsonhal { | |||
| _links?: CommentJsonhalLinks; | |||
| message: string | null; | |||
| owner?: string | null; | |||
| readonly owner?: string | null; | |||
| readonly ownerName?: string | null; | |||
| posting?: string | null; | |||
| post?: string | null; | |||
| readonly createdAt?: string | null; | |||
| } | |||
| @@ -20,9 +20,9 @@ export interface CommentJsonld { | |||
| readonly id?: string; | |||
| readonly type?: string; | |||
| message: string | null; | |||
| owner?: string | null; | |||
| readonly owner?: string | null; | |||
| readonly ownerName?: string | null; | |||
| posting?: string | null; | |||
| post?: string | null; | |||
| readonly createdAt?: string | null; | |||
| } | |||
| @@ -17,14 +17,14 @@ | |||
| export interface Contact { | |||
| firstName: string | null; | |||
| lastName: string | null; | |||
| partner?: string | null; | |||
| partner: string | null; | |||
| birthday?: string | null; | |||
| image?: string | null; | |||
| readonly imageUrl?: string | null; | |||
| position?: string | null; | |||
| phone?: string | null; | |||
| email?: string | null; | |||
| postings?: Array<string>; | |||
| createdAt?: string | null; | |||
| posts?: Array<string>; | |||
| readonly createdAt?: string | null; | |||
| } | |||
| @@ -19,14 +19,14 @@ export interface ContactJsonhal { | |||
| _links?: CommentJsonhalLinks; | |||
| firstName: string | null; | |||
| lastName: string | null; | |||
| partner?: string | null; | |||
| partner: string | null; | |||
| birthday?: string | null; | |||
| image?: string | null; | |||
| readonly imageUrl?: string | null; | |||
| position?: string | null; | |||
| phone?: string | null; | |||
| email?: string | null; | |||
| postings?: Array<string>; | |||
| createdAt?: string | null; | |||
| posts?: Array<string>; | |||
| readonly createdAt?: string | null; | |||
| } | |||
| @@ -21,14 +21,14 @@ export interface ContactJsonld { | |||
| readonly type?: string; | |||
| firstName: string | null; | |||
| lastName: string | null; | |||
| partner?: string | null; | |||
| partner: string | null; | |||
| birthday?: string | null; | |||
| image?: string | null; | |||
| readonly imageUrl?: string | null; | |||
| position?: string | null; | |||
| phone?: string | null; | |||
| email?: string | null; | |||
| postings?: Array<string>; | |||
| createdAt?: string | null; | |||
| posts?: Array<string>; | |||
| readonly createdAt?: string | null; | |||
| } | |||
| @@ -0,0 +1,22 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.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 { CommentJsonhalLinks } from './commentJsonhalLinks'; | |||
| /** | |||
| * | |||
| */ | |||
| export interface MediaJsonhalMediaObjectRead { | |||
| _links?: CommentJsonhalLinks; | |||
| contentUrl?: string | null; | |||
| } | |||
| @@ -0,0 +1,24 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.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 { CommentJsonldContext } from './commentJsonldContext'; | |||
| /** | |||
| * | |||
| */ | |||
| export interface MediaJsonldMediaObjectRead { | |||
| context?: CommentJsonldContext; | |||
| readonly id?: string; | |||
| readonly type?: string; | |||
| contentUrl?: string | null; | |||
| } | |||
| @@ -0,0 +1,20 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.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 MediaMediaObjectRead { | |||
| contentUrl?: string | null; | |||
| } | |||
| @@ -7,8 +7,8 @@ export * from './apiCommentsGetCollection200ResponseHydraSearchHydraMappingInner | |||
| export * from './apiCommentsGetCollection200ResponseHydraView'; | |||
| export * from './apiContactsGetCollection200Response'; | |||
| export * from './apiContactsGetCollection200Response1'; | |||
| export * from './apiMediaObjectsGetCollection200Response'; | |||
| export * from './apiMediaObjectsGetCollection200Response1'; | |||
| export * from './apiMediasGetCollection200Response'; | |||
| export * from './apiMediasGetCollection200Response1'; | |||
| export * from './apiPartnersGetCollection200Response'; | |||
| export * from './apiPartnersGetCollection200Response1'; | |||
| export * from './apiPostsGetCollection200Response'; | |||
| @@ -26,15 +26,19 @@ export * from './contactJsonhal'; | |||
| export * from './contactJsonld'; | |||
| export * from './loginCheckPost200Response'; | |||
| export * from './loginCheckPostRequest'; | |||
| export * from './mediaObjectJsonhalMediaObjectRead'; | |||
| export * from './mediaObjectJsonldMediaObjectRead'; | |||
| export * from './mediaObjectMediaObjectRead'; | |||
| export * from './mediaJsonhalMediaObjectRead'; | |||
| export * from './mediaJsonldMediaObjectRead'; | |||
| export * from './mediaMediaObjectRead'; | |||
| export * from './partner'; | |||
| export * from './partnerJsonhal'; | |||
| export * from './partnerJsonld'; | |||
| export * from './post'; | |||
| export * from './postJsonhal'; | |||
| export * from './postJsonhalPostingCreate'; | |||
| export * from './postJsonld'; | |||
| export * from './postJsonldPostingCreate'; | |||
| export * from './postPostingCreate'; | |||
| export * from './postPostingPatch'; | |||
| export * from './user'; | |||
| export * from './userJsonhal'; | |||
| export * from './userJsonld'; | |||
| @@ -18,7 +18,7 @@ import { Comment } from './comment'; | |||
| export interface Post { | |||
| headline: string | null; | |||
| message: string | null; | |||
| owner?: string | null; | |||
| readonly owner?: string | null; | |||
| readonly ownerName?: string | null; | |||
| partner?: string | null; | |||
| contact?: string | null; | |||
| @@ -20,7 +20,7 @@ export interface PostJsonhal { | |||
| _links?: CommentJsonhalLinks; | |||
| headline: string | null; | |||
| message: string | null; | |||
| owner?: string | null; | |||
| readonly owner?: string | null; | |||
| readonly ownerName?: string | null; | |||
| partner?: string | null; | |||
| contact?: string | null; | |||
| @@ -0,0 +1,25 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.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 { CommentJsonhalLinks } from './commentJsonhalLinks'; | |||
| /** | |||
| * | |||
| */ | |||
| export interface PostJsonhalPostingCreate { | |||
| _links?: CommentJsonhalLinks; | |||
| headline: string | null; | |||
| message: string | null; | |||
| partner?: string | null; | |||
| contact?: string | null; | |||
| } | |||
| @@ -22,7 +22,7 @@ export interface PostJsonld { | |||
| readonly type?: string; | |||
| headline: string | null; | |||
| message: string | null; | |||
| owner?: string | null; | |||
| readonly owner?: string | null; | |||
| readonly ownerName?: string | null; | |||
| partner?: string | null; | |||
| contact?: string | null; | |||
| @@ -0,0 +1,23 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.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 PostJsonldPostingCreate { | |||
| headline: string | null; | |||
| message: string | null; | |||
| partner?: string | null; | |||
| contact?: string | null; | |||
| } | |||
| @@ -0,0 +1,23 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.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 PostPostingCreate { | |||
| headline: string | null; | |||
| message: string | null; | |||
| partner?: string | null; | |||
| contact?: string | null; | |||
| } | |||
| @@ -0,0 +1,21 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.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 PostPostingPatch { | |||
| headline: string | null; | |||
| message: string | null; | |||
| } | |||
| @@ -23,7 +23,7 @@ export interface User { | |||
| */ | |||
| password?: string | null; | |||
| active?: boolean; | |||
| postings?: Array<string>; | |||
| posts?: Array<string>; | |||
| readonly createdAt?: string | null; | |||
| } | |||
| @@ -25,7 +25,7 @@ export interface UserJsonhal { | |||
| */ | |||
| password?: string | null; | |||
| active?: boolean; | |||
| postings?: Array<string>; | |||
| posts?: Array<string>; | |||
| readonly createdAt?: string | null; | |||
| } | |||
| @@ -27,7 +27,7 @@ export interface UserJsonld { | |||
| */ | |||
| password?: string | null; | |||
| active?: boolean; | |||
| postings?: Array<string>; | |||
| posts?: Array<string>; | |||
| readonly createdAt?: string | null; | |||
| } | |||
| @@ -4,7 +4,7 @@ import {ModalComponent} from "@app/_components/modal/modal.component"; | |||
| import {NewContactComponent} from "@app/contacts/new-contact/new-contact.component"; | |||
| import {ActivatedRoute, Router} from "@angular/router"; | |||
| import {ContactJsonld, ContactService, PartnerJsonld, PartnerService, PostJsonld, PostService} from "@app/core/api/v1"; | |||
| import {Subscription} from "rxjs"; | |||
| import {Subject, Subscription} from "rxjs"; | |||
| import {environment} from "@environments/environment"; | |||
| import {ApiConverter} from "@app/_helpers/api.converter"; | |||
| import {MatPaginator, MatPaginatorIntl, PageEvent} from "@angular/material/paginator"; | |||