diff --git a/matsen-tool/openapi.yaml b/matsen-tool/openapi.yaml index e20b269..1af3dc3 100644 --- a/matsen-tool/openapi.yaml +++ b/matsen-tool/openapi.yaml @@ -8,20 +8,20 @@ servers: url: / description: '' paths: - /api/posts: + /api/contacts: get: - operationId: api_posts_get_collection + operationId: api_contacts_get_collection tags: - - Post + - Contact responses: 200: - description: 'Post collection' + description: 'Contact collection' content: application/ld+json: schema: type: object properties: - 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Post.jsonld' } } + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Contact.jsonld' } } '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 } } } } } } @@ -31,25 +31,25 @@ paths: schema: type: array items: - $ref: '#/components/schemas/Post' + $ref: '#/components/schemas/Contact' text/html: schema: type: array items: - $ref: '#/components/schemas/Post' + $ref: '#/components/schemas/Contact' application/hal+json: schema: type: object properties: - _embedded: { type: array, items: { $ref: '#/components/schemas/Post.jsonhal' } } + _embedded: { type: array, items: { $ref: '#/components/schemas/Contact.jsonhal' } } 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 Post resources.' - description: 'Retrieves the collection of Post resources.' + summary: 'Retrieves the collection of Contact resources.' + description: 'Retrieves the collection of Contact resources.' parameters: - name: page @@ -66,81 +66,81 @@ paths: allowReserved: false deprecated: false post: - operationId: api_posts_post + operationId: api_contacts_post tags: - - Post + - Contact responses: 201: - description: 'Post resource created' + description: 'Contact resource created' content: application/ld+json: schema: - $ref: '#/components/schemas/Post.jsonld' + $ref: '#/components/schemas/Contact.jsonld' application/json: schema: - $ref: '#/components/schemas/Post' + $ref: '#/components/schemas/Contact' text/html: schema: - $ref: '#/components/schemas/Post' + $ref: '#/components/schemas/Contact' application/hal+json: schema: - $ref: '#/components/schemas/Post.jsonhal' + $ref: '#/components/schemas/Contact.jsonhal' links: { } 400: description: 'Invalid input' 422: description: 'Unprocessable entity' - summary: 'Creates a Post resource.' - description: 'Creates a Post resource.' + summary: 'Creates a Contact resource.' + description: 'Creates a Contact resource.' parameters: [] requestBody: - description: 'The new Post resource' + description: 'The new Contact resource' content: application/ld+json: schema: - $ref: '#/components/schemas/Post.jsonld' + $ref: '#/components/schemas/Contact.jsonld' application/json: schema: - $ref: '#/components/schemas/Post' + $ref: '#/components/schemas/Contact' text/html: schema: - $ref: '#/components/schemas/Post' + $ref: '#/components/schemas/Contact' application/hal+json: schema: - $ref: '#/components/schemas/Post.jsonhal' + $ref: '#/components/schemas/Contact.jsonhal' required: true deprecated: false parameters: [] - '/api/posts/{id}': + '/api/contacts/{id}': get: - operationId: api_posts_id_get + operationId: api_contacts_id_get tags: - - Post + - Contact responses: 200: - description: 'Post resource' + description: 'Contact resource' content: application/ld+json: schema: - $ref: '#/components/schemas/Post.jsonld' + $ref: '#/components/schemas/Contact.jsonld' application/json: schema: - $ref: '#/components/schemas/Post' + $ref: '#/components/schemas/Contact' text/html: schema: - $ref: '#/components/schemas/Post' + $ref: '#/components/schemas/Contact' application/hal+json: schema: - $ref: '#/components/schemas/Post.jsonhal' + $ref: '#/components/schemas/Contact.jsonhal' 404: description: 'Resource not found' - summary: 'Retrieves a Post resource.' - description: 'Retrieves a Post resource.' + summary: 'Retrieves a Contact resource.' + description: 'Retrieves a Contact resource.' parameters: - name: id in: path - description: 'PostingApi identifier' + description: 'ContactApi identifier' required: true deprecated: false allowEmptyValue: false @@ -151,21 +151,21 @@ paths: allowReserved: false deprecated: false delete: - operationId: api_posts_id_delete + operationId: api_contacts_id_delete tags: - - Post + - Contact responses: 204: - description: 'Post resource deleted' + description: 'Contact resource deleted' 404: description: 'Resource not found' - summary: 'Removes the Post resource.' - description: 'Removes the Post resource.' + summary: 'Removes the Contact resource.' + description: 'Removes the Contact resource.' parameters: - name: id in: path - description: 'PostingApi identifier' + description: 'ContactApi identifier' required: true deprecated: false allowEmptyValue: false @@ -176,25 +176,25 @@ paths: allowReserved: false deprecated: false patch: - operationId: api_posts_id_patch + operationId: api_contacts_id_patch tags: - - Post + - Contact responses: 200: - description: 'Post resource updated' + description: 'Contact resource updated' content: application/ld+json: schema: - $ref: '#/components/schemas/Post.jsonld' + $ref: '#/components/schemas/Contact.jsonld' application/json: schema: - $ref: '#/components/schemas/Post' + $ref: '#/components/schemas/Contact' text/html: schema: - $ref: '#/components/schemas/Post' + $ref: '#/components/schemas/Contact' application/hal+json: schema: - $ref: '#/components/schemas/Post.jsonhal' + $ref: '#/components/schemas/Contact.jsonhal' links: { } 400: description: 'Invalid input' @@ -202,13 +202,13 @@ paths: description: 'Unprocessable entity' 404: description: 'Resource not found' - summary: 'Updates the Post resource.' - description: 'Updates the Post resource.' + summary: 'Updates the Contact resource.' + description: 'Updates the Contact resource.' parameters: - name: id in: path - description: 'PostingApi identifier' + description: 'ContactApi identifier' required: true deprecated: false allowEmptyValue: false @@ -218,28 +218,28 @@ paths: explode: false allowReserved: false requestBody: - description: 'The updated Post resource' + description: 'The updated Contact resource' content: application/merge-patch+json: schema: - $ref: '#/components/schemas/Post' + $ref: '#/components/schemas/Contact' required: true deprecated: false parameters: [] - /api/users: + /api/media_objects: get: - operationId: api_users_get_collection + operationId: api_media_objects_get_collection tags: - - User + - MediaObject responses: 200: - description: 'User collection' + description: 'MediaObject collection' content: application/ld+json: schema: type: object properties: - 'hydra:member': { type: array, items: { $ref: '#/components/schemas/User.jsonld' } } + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/MediaObject.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 } } } } } } @@ -249,25 +249,25 @@ paths: schema: type: array items: - $ref: '#/components/schemas/User' + $ref: '#/components/schemas/MediaObject-media_object.read' text/html: schema: type: array items: - $ref: '#/components/schemas/User' + $ref: '#/components/schemas/MediaObject-media_object.read' application/hal+json: schema: type: object properties: - _embedded: { type: array, items: { $ref: '#/components/schemas/User.jsonhal' } } + _embedded: { type: array, items: { $ref: '#/components/schemas/MediaObject.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 User resources.' - description: 'Retrieves the collection of User resources.' + summary: 'Retrieves the collection of MediaObject resources.' + description: 'Retrieves the collection of MediaObject resources.' parameters: - name: page @@ -284,81 +284,244 @@ paths: allowReserved: false deprecated: false post: - operationId: api_users_post + operationId: api_media_objects_post tags: - - User + - MediaObject responses: 201: - description: 'User resource created' + description: 'MediaObject resource created' content: application/ld+json: schema: - $ref: '#/components/schemas/User.jsonld' + $ref: '#/components/schemas/MediaObject.jsonld-media_object.read' application/json: schema: - $ref: '#/components/schemas/User' + $ref: '#/components/schemas/MediaObject-media_object.read' text/html: schema: - $ref: '#/components/schemas/User' + $ref: '#/components/schemas/MediaObject-media_object.read' application/hal+json: schema: - $ref: '#/components/schemas/User.jsonhal' + $ref: '#/components/schemas/MediaObject.jsonhal-media_object.read' links: { } 400: description: 'Invalid input' 422: description: 'Unprocessable entity' - summary: 'Creates a User resource.' - description: 'Creates a User resource.' + summary: 'Creates a MediaObject resource.' + description: 'Creates a MediaObject resource.' parameters: [] requestBody: - description: 'The new User resource' + description: '' + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + required: false + deprecated: false + parameters: [] + '/api/media_objects/{id}': + get: + operationId: api_media_objects_id_get + tags: + - MediaObject + responses: + 200: + description: 'MediaObject resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/MediaObject.jsonld-media_object.read' + application/json: + schema: + $ref: '#/components/schemas/MediaObject-media_object.read' + text/html: + schema: + $ref: '#/components/schemas/MediaObject-media_object.read' + application/hal+json: + schema: + $ref: '#/components/schemas/MediaObject.jsonhal-media_object.read' + 404: + description: 'Resource not found' + summary: 'Retrieves a MediaObject resource.' + description: 'Retrieves a MediaObject resource.' + parameters: + - + name: id + in: path + description: 'MediaObject identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + parameters: [] + /api/partners: + get: + operationId: api_partners_get_collection + tags: + - Partner + responses: + 200: + description: 'Partner collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Partner.jsonld' } } + '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 } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Partner' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Partner' + application/hal+json: + schema: + type: object + properties: + _embedded: { type: array, items: { $ref: '#/components/schemas/Partner.jsonhal' } } + 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 Partner resources.' + description: 'Retrieves the collection of Partner resources.' + parameters: + - + name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_partners_post + tags: + - Partner + responses: + 201: + description: 'Partner resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Partner.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Partner' + text/html: + schema: + $ref: '#/components/schemas/Partner' + application/hal+json: + schema: + $ref: '#/components/schemas/Partner.jsonhal' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Partner resource.' + description: 'Creates a Partner resource.' + parameters: [] + requestBody: + description: 'The new Partner resource' content: application/ld+json: schema: - $ref: '#/components/schemas/User.jsonld' + $ref: '#/components/schemas/Partner.jsonld' application/json: schema: - $ref: '#/components/schemas/User' + $ref: '#/components/schemas/Partner' text/html: schema: - $ref: '#/components/schemas/User' + $ref: '#/components/schemas/Partner' application/hal+json: schema: - $ref: '#/components/schemas/User.jsonhal' + $ref: '#/components/schemas/Partner.jsonhal' required: true deprecated: false parameters: [] - '/api/users/{id}': + '/api/partners/{id}': get: - operationId: api_users_id_get + operationId: api_partners_id_get tags: - - User + - Partner responses: 200: - description: 'User resource' + description: 'Partner resource' content: application/ld+json: schema: - $ref: '#/components/schemas/User.jsonld' + $ref: '#/components/schemas/Partner.jsonld' application/json: schema: - $ref: '#/components/schemas/User' + $ref: '#/components/schemas/Partner' text/html: schema: - $ref: '#/components/schemas/User' + $ref: '#/components/schemas/Partner' application/hal+json: schema: - $ref: '#/components/schemas/User.jsonhal' + $ref: '#/components/schemas/Partner.jsonhal' 404: description: 'Resource not found' - summary: 'Retrieves a User resource.' - description: 'Retrieves a User resource.' + summary: 'Retrieves a Partner resource.' + description: 'Retrieves a Partner resource.' parameters: - name: id in: path - description: 'UserApi identifier' + description: 'PartnerApi identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + delete: + operationId: api_partners_id_delete + tags: + - Partner + responses: + 204: + description: 'Partner resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Partner resource.' + description: 'Removes the Partner resource.' + parameters: + - + name: id + in: path + description: 'PartnerApi identifier' required: true deprecated: false allowEmptyValue: false @@ -369,25 +532,25 @@ paths: allowReserved: false deprecated: false patch: - operationId: api_users_id_patch + operationId: api_partners_id_patch tags: - - User + - Partner responses: 200: - description: 'User resource updated' + description: 'Partner resource updated' content: application/ld+json: schema: - $ref: '#/components/schemas/User.jsonld' + $ref: '#/components/schemas/Partner.jsonld' application/json: schema: - $ref: '#/components/schemas/User' + $ref: '#/components/schemas/Partner' text/html: schema: - $ref: '#/components/schemas/User' + $ref: '#/components/schemas/Partner' application/hal+json: schema: - $ref: '#/components/schemas/User.jsonhal' + $ref: '#/components/schemas/Partner.jsonhal' links: { } 400: description: 'Invalid input' @@ -395,13 +558,13 @@ paths: description: 'Unprocessable entity' 404: description: 'Resource not found' - summary: 'Updates the User resource.' - description: 'Updates the User resource.' + summary: 'Updates the Partner resource.' + description: 'Updates the Partner resource.' parameters: - name: id in: path - description: 'UserApi identifier' + description: 'PartnerApi identifier' required: true deprecated: false allowEmptyValue: false @@ -411,52 +574,913 @@ paths: explode: false allowReserved: false requestBody: - description: 'The updated User resource' + description: 'The updated Partner resource' content: application/merge-patch+json: schema: - $ref: '#/components/schemas/User' + $ref: '#/components/schemas/Partner' required: true deprecated: false parameters: [] - /auth: - post: - operationId: login_check_post + /api/posts: + get: + operationId: api_posts_get_collection tags: - - 'Login Check' + - Post responses: 200: - description: 'User token created' + description: 'Post collection' content: - application/json: + application/ld+json: schema: type: object properties: - token: { readOnly: true, type: string, nullable: false } + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Post.jsonld' } } + '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 } } } } } } required: - - token - summary: 'Creates a user token.' - description: 'Creates a user token.' - requestBody: - description: 'The login data' - content: - application/json: - schema: - type: object - properties: - email: - type: string - nullable: false - password: - type: string - nullable: false - required: - - email - - password + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Post' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/Post' + application/hal+json: + schema: + type: object + properties: + _embedded: { type: array, items: { $ref: '#/components/schemas/Post.jsonhal' } } + 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 Post resources.' + description: 'Retrieves the collection of Post resources.' + parameters: + - + name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_posts_post + tags: + - Post + responses: + 201: + description: 'Post resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Post.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Post' + text/html: + schema: + $ref: '#/components/schemas/Post' + application/hal+json: + schema: + $ref: '#/components/schemas/Post.jsonhal' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a Post resource.' + description: 'Creates a Post resource.' + parameters: [] + requestBody: + description: 'The new Post resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Post.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Post' + text/html: + schema: + $ref: '#/components/schemas/Post' + application/hal+json: + schema: + $ref: '#/components/schemas/Post.jsonhal' required: true + deprecated: false parameters: [] -components: - schemas: + '/api/posts/{id}': + get: + operationId: api_posts_id_get + tags: + - Post + responses: + 200: + description: 'Post resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Post.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Post' + text/html: + schema: + $ref: '#/components/schemas/Post' + application/hal+json: + schema: + $ref: '#/components/schemas/Post.jsonhal' + 404: + description: 'Resource not found' + summary: 'Retrieves a Post resource.' + description: 'Retrieves a Post resource.' + parameters: + - + name: id + in: path + description: 'PostingApi identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + delete: + operationId: api_posts_id_delete + tags: + - Post + responses: + 204: + description: 'Post resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Post resource.' + description: 'Removes the Post resource.' + parameters: + - + name: id + in: path + description: 'PostingApi identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_posts_id_patch + tags: + - Post + responses: + 200: + description: 'Post resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Post.jsonld' + application/json: + schema: + $ref: '#/components/schemas/Post' + text/html: + schema: + $ref: '#/components/schemas/Post' + application/hal+json: + schema: + $ref: '#/components/schemas/Post.jsonhal' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the Post resource.' + description: 'Updates the Post resource.' + parameters: + - + name: id + in: path + description: 'PostingApi identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated Post resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/Post' + required: true + deprecated: false + parameters: [] + /api/users: + get: + operationId: api_users_get_collection + tags: + - User + responses: + 200: + description: 'User collection' + content: + application/ld+json: + schema: + type: object + properties: + 'hydra:member': { type: array, items: { $ref: '#/components/schemas/User.jsonld' } } + '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 } } } } } } + required: + - 'hydra:member' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + text/html: + schema: + type: array + items: + $ref: '#/components/schemas/User' + application/hal+json: + schema: + type: object + properties: + _embedded: { type: array, items: { $ref: '#/components/schemas/User.jsonhal' } } + 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 User resources.' + description: 'Retrieves the collection of User resources.' + parameters: + - + name: page + in: query + description: 'The collection page number' + required: false + deprecated: false + allowEmptyValue: true + schema: + type: integer + default: 1 + style: form + explode: false + allowReserved: false + deprecated: false + post: + operationId: api_users_post + tags: + - User + responses: + 201: + description: 'User resource created' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/User.jsonld' + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + application/hal+json: + schema: + $ref: '#/components/schemas/User.jsonhal' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + summary: 'Creates a User resource.' + description: 'Creates a User resource.' + parameters: [] + requestBody: + description: 'The new User resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/User.jsonld' + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + application/hal+json: + schema: + $ref: '#/components/schemas/User.jsonhal' + required: true + deprecated: false + parameters: [] + '/api/users/{id}': + get: + operationId: api_users_id_get + tags: + - User + responses: + 200: + description: 'User resource' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/User.jsonld' + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + application/hal+json: + schema: + $ref: '#/components/schemas/User.jsonhal' + 404: + description: 'Resource not found' + summary: 'Retrieves a User resource.' + description: 'Retrieves a User resource.' + parameters: + - + name: id + in: path + description: 'UserApi identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false + patch: + operationId: api_users_id_patch + tags: + - User + responses: + 200: + description: 'User resource updated' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/User.jsonld' + application/json: + schema: + $ref: '#/components/schemas/User' + text/html: + schema: + $ref: '#/components/schemas/User' + application/hal+json: + schema: + $ref: '#/components/schemas/User.jsonhal' + links: { } + 400: + description: 'Invalid input' + 422: + description: 'Unprocessable entity' + 404: + description: 'Resource not found' + summary: 'Updates the User resource.' + description: 'Updates the User resource.' + parameters: + - + name: id + in: path + description: 'UserApi identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + requestBody: + description: 'The updated User resource' + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/User' + required: true + deprecated: false + parameters: [] + /auth: + post: + operationId: login_check_post + tags: + - 'Login Check' + responses: + 200: + description: 'User token created' + content: + application/json: + schema: + type: object + properties: + token: { readOnly: true, type: string, nullable: false } + required: + - token + summary: 'Creates a user token.' + description: 'Creates a user token.' + requestBody: + description: 'The login data' + content: + application/json: + schema: + type: object + properties: + email: + type: string + nullable: false + password: + type: string + nullable: false + required: + - email + - password + required: true + parameters: [] +components: + schemas: + Contact: + type: object + description: '' + deprecated: false + required: + - firstName + - lastName + properties: + firstName: + type: + - string + - 'null' + lastName: + type: + - string + - 'null' + partner: + anyOf: + - + $ref: '#/components/schemas/Partner' + - + type: 'null' + birthday: + type: + - string + - 'null' + format: date-time + image: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + position: + type: + - string + - 'null' + phone: + type: + - string + - 'null' + email: + type: + - string + - 'null' + createdAt: + type: + - string + - 'null' + format: date-time + Contact.jsonhal: + type: object + description: '' + deprecated: false + required: + - firstName + - lastName + properties: + _links: + type: object + properties: + self: + type: object + properties: + href: + type: string + format: iri-reference + firstName: + type: + - string + - 'null' + lastName: + type: + - string + - 'null' + partner: + anyOf: + - + $ref: '#/components/schemas/Partner.jsonhal' + - + type: 'null' + birthday: + type: + - string + - 'null' + format: date-time + image: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + position: + type: + - string + - 'null' + phone: + type: + - string + - 'null' + email: + type: + - string + - 'null' + createdAt: + type: + - string + - 'null' + format: date-time + Contact.jsonld: + type: object + description: '' + deprecated: false + required: + - firstName + - lastName + properties: + '@context': + readOnly: true + oneOf: + - + type: string + - + type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: ['http://www.w3.org/ns/hydra/core#'] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + firstName: + type: + - string + - 'null' + lastName: + type: + - string + - 'null' + partner: + anyOf: + - + $ref: '#/components/schemas/Partner.jsonld' + - + type: 'null' + birthday: + type: + - string + - 'null' + format: date-time + image: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + position: + type: + - string + - 'null' + phone: + type: + - string + - 'null' + email: + type: + - string + - 'null' + createdAt: + type: + - string + - 'null' + format: date-time + MediaObject-media_object.read: + type: object + description: '' + deprecated: false + externalDocs: + url: 'https://schema.org/MediaObject' + properties: + contentUrl: + externalDocs: + url: 'https://schema.org/contentUrl' + type: + - string + - 'null' + MediaObject.jsonhal-media_object.read: + type: object + description: '' + deprecated: false + externalDocs: + url: 'https://schema.org/MediaObject' + properties: + _links: + type: object + properties: + self: + type: object + properties: + href: + type: string + format: iri-reference + contentUrl: + externalDocs: + url: 'https://schema.org/contentUrl' + type: + - string + - 'null' + MediaObject.jsonld-media_object.read: + type: object + description: '' + deprecated: false + externalDocs: + url: 'https://schema.org/MediaObject' + properties: + '@context': + readOnly: true + oneOf: + - + type: string + - + type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: ['http://www.w3.org/ns/hydra/core#'] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + contentUrl: + externalDocs: + url: 'https://schema.org/contentUrl' + type: + - string + - 'null' + Partner: + type: object + description: '' + deprecated: false + properties: + id: + readOnly: true + type: integer + name: + type: string + type: + type: string + enum: + - customer + - supplier + - service + street: + type: + - string + - 'null' + streetNo: + type: + - string + - 'null' + zip: + type: + - string + - 'null' + city: + type: + - string + - 'null' + country: + type: + - string + - 'null' + website: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + contacts: + type: array + items: + $ref: '#/components/schemas/Contact' + logo: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + Partner.jsonhal: + type: object + description: '' + deprecated: false + properties: + _links: + type: object + properties: + self: + type: object + properties: + href: + type: string + format: iri-reference + id: + readOnly: true + type: integer + name: + type: string + type: + type: string + enum: + - customer + - supplier + - service + street: + type: + - string + - 'null' + streetNo: + type: + - string + - 'null' + zip: + type: + - string + - 'null' + city: + type: + - string + - 'null' + country: + type: + - string + - 'null' + website: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + contacts: + type: array + items: + $ref: '#/components/schemas/Contact.jsonhal' + logo: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' + Partner.jsonld: + type: object + description: '' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - + type: string + - + type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: ['http://www.w3.org/ns/hydra/core#'] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + id: + readOnly: true + type: integer + name: + type: string + type: + type: string + enum: + - customer + - supplier + - service + street: + type: + - string + - 'null' + streetNo: + type: + - string + - 'null' + zip: + type: + - string + - 'null' + city: + type: + - string + - 'null' + country: + type: + - string + - 'null' + website: + type: + - string + - 'null' + createdAt: + type: string + format: date-time + contacts: + type: array + items: + $ref: '#/components/schemas/Contact.jsonld' + logo: + 'owl:maxCardinality': 1 + type: + - string + - 'null' + format: iri-reference + example: 'https://example.com/' Post: type: object description: '' @@ -599,7 +1623,7 @@ components: - string - 'null' format: date-time - userPosts: + postings: type: array items: type: string @@ -652,7 +1676,7 @@ components: - string - 'null' format: date-time - userPosts: + postings: type: array items: type: string @@ -719,7 +1743,7 @@ components: - string - 'null' format: date-time - userPosts: + postings: type: array items: type: string diff --git a/matsen-tool/src/app/core/api/v1/.openapi-generator/FILES b/matsen-tool/src/app/core/api/v1/.openapi-generator/FILES index 3d669f3..1c2dc22 100644 --- a/matsen-tool/src/app/core/api/v1/.openapi-generator/FILES +++ b/matsen-tool/src/app/core/api/v1/.openapi-generator/FILES @@ -1,29 +1,48 @@ .gitignore +.openapi-generator-ignore README.md api.module.ts api/api.ts +api/contact.service.ts api/loginCheck.service.ts +api/mediaObject.service.ts +api/partner.service.ts api/post.service.ts api/user.service.ts configuration.ts encoder.ts git_push.sh index.ts +model/apiContactsGetCollection200Response.ts +model/apiContactsGetCollection200Response1.ts +model/apiContactsGetCollection200Response1Links.ts +model/apiContactsGetCollection200Response1LinksSelf.ts +model/apiContactsGetCollection200ResponseHydraSearch.ts +model/apiContactsGetCollection200ResponseHydraSearchHydraMappingInner.ts +model/apiContactsGetCollection200ResponseHydraView.ts +model/apiMediaObjectsGetCollection200Response.ts +model/apiMediaObjectsGetCollection200Response1.ts +model/apiPartnersGetCollection200Response.ts +model/apiPartnersGetCollection200Response1.ts model/apiPostsGetCollection200Response.ts model/apiPostsGetCollection200Response1.ts -model/apiPostsGetCollection200Response1Links.ts -model/apiPostsGetCollection200Response1LinksSelf.ts -model/apiPostsGetCollection200ResponseHydraSearch.ts -model/apiPostsGetCollection200ResponseHydraSearchHydraMappingInner.ts -model/apiPostsGetCollection200ResponseHydraView.ts model/apiUsersGetCollection200Response.ts model/apiUsersGetCollection200Response1.ts +model/contact.ts +model/contactJsonhal.ts +model/contactJsonhalLinks.ts +model/contactJsonld.ts model/loginCheckPost200Response.ts model/loginCheckPostRequest.ts +model/mediaObjectJsonhalMediaObjectRead.ts +model/mediaObjectJsonldMediaObjectRead.ts +model/mediaObjectMediaObjectRead.ts model/models.ts +model/partner.ts +model/partnerJsonhal.ts +model/partnerJsonld.ts model/post.ts model/postJsonhal.ts -model/postJsonhalLinks.ts model/postJsonld.ts model/user.ts model/userJsonhal.ts diff --git a/matsen-tool/src/app/core/api/v1/api/api.ts b/matsen-tool/src/app/core/api/v1/api/api.ts index 47e1613..5f6864b 100644 --- a/matsen-tool/src/app/core/api/v1/api/api.ts +++ b/matsen-tool/src/app/core/api/v1/api/api.ts @@ -1,7 +1,13 @@ +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 './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 = [LoginCheckService, PostService, UserService]; +export const APIS = [ContactService, LoginCheckService, MediaObjectService, PartnerService, PostService, UserService]; diff --git a/matsen-tool/src/app/core/api/v1/api/contact.service.ts b/matsen-tool/src/app/core/api/v1/api/contact.service.ts new file mode 100644 index 0000000..6d8e9f3 --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/api/contact.service.ts @@ -0,0 +1,474 @@ +/** + * 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 { ApiContactsGetCollection200Response } from '../model/apiContactsGetCollection200Response'; +// @ts-ignore +import { ApiContactsGetCollection200Response1 } from '../model/apiContactsGetCollection200Response1'; +// @ts-ignore +import { Contact } from '../model/contact'; +// @ts-ignore +import { ContactJsonhal } from '../model/contactJsonhal'; +// @ts-ignore +import { ContactJsonld } from '../model/contactJsonld'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + + +@Injectable({ + providedIn: 'root' +}) +export class ContactService { + + 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(); + } + + + // @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 Contact resources. + * Retrieves the collection of Contact resources. + * @param page The collection page number + * @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 contactsGetCollection(page?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable; + public contactsGetCollection(page?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public contactsGetCollection(page?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public contactsGetCollection(page?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (page !== undefined && page !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + } + + 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 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/contacts`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes the Contact resource. + * Removes the Contact resource. + * @param id ContactApi 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 contactsIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public contactsIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public contactsIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public contactsIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling contactsIdDelete.'); + } + + 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[] = [ + ]; + 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 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/contacts/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Retrieves a Contact resource. + * Retrieves a Contact resource. + * @param id ContactApi 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 contactsIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable; + public contactsIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public contactsIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public contactsIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling contactsIdGet.'); + } + + 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 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/contacts/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates the Contact resource. + * Updates the Contact resource. + * @param id ContactApi identifier + * @param contact The updated Contact 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 contactsIdPatch(id: string, contact: Contact, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable; + public contactsIdPatch(id: string, contact: Contact, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public contactsIdPatch(id: string, contact: Contact, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public contactsIdPatch(id: string, contact: Contact, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling contactsIdPatch.'); + } + if (contact === null || contact === undefined) { + throw new Error('Required parameter contact was null or undefined when calling contactsIdPatch.'); + } + + 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(); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/merge-patch+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + 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/contacts/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('patch', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: contact, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a Contact resource. + * Creates a Contact resource. + * @param contactJsonld The new Contact 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 contactsPost(contactJsonld: ContactJsonld, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable; + public contactsPost(contactJsonld: ContactJsonld, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public contactsPost(contactJsonld: ContactJsonld, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public contactsPost(contactJsonld: ContactJsonld, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable { + if (contactJsonld === null || contactJsonld === undefined) { + throw new Error('Required parameter contactJsonld was null or undefined when calling contactsPost.'); + } + + 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(); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/ld+json', + 'application/json', + 'text/html', + 'application/hal+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + 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/contacts`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: contactJsonld, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + +} diff --git a/matsen-tool/src/app/core/api/v1/api/mediaObject.service.ts b/matsen-tool/src/app/core/api/v1/api/mediaObject.service.ts new file mode 100644 index 0000000..0257530 --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/api/mediaObject.service.ts @@ -0,0 +1,346 @@ +/** + * 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 { ApiMediaObjectsGetCollection200Response } from '../model/apiMediaObjectsGetCollection200Response'; +// @ts-ignore +import { ApiMediaObjectsGetCollection200Response1 } from '../model/apiMediaObjectsGetCollection200Response1'; +// @ts-ignore +import { MediaObjectJsonhalMediaObjectRead } from '../model/mediaObjectJsonhalMediaObjectRead'; +// @ts-ignore +import { MediaObjectJsonldMediaObjectRead } from '../model/mediaObjectJsonldMediaObjectRead'; +// @ts-ignore +import { MediaObjectMediaObjectRead } from '../model/mediaObjectMediaObjectRead'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + + +@Injectable({ + providedIn: 'root' +}) +export class MediaObjectService { + + 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 MediaObject resources. + * Retrieves the collection of MediaObject resources. + * @param page The collection page number + * @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 mediaObjectsGetCollection(page?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable; + public mediaObjectsGetCollection(page?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public mediaObjectsGetCollection(page?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public mediaObjectsGetCollection(page?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (page !== undefined && page !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + } + + 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 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/media_objects`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Retrieves a MediaObject resource. + * Retrieves a MediaObject 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 mediaObjectsIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable; + public mediaObjectsIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public mediaObjectsIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public mediaObjectsIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling mediaObjectsIdGet.'); + } + + 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 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/media_objects/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a MediaObject resource. + * Creates a MediaObject 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 mediaObjectsPost(file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable; + public mediaObjectsPost(file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public mediaObjectsPost(file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public mediaObjectsPost(file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable { + + 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(); + } + + // 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', 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/media_objects`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + +} diff --git a/matsen-tool/src/app/core/api/v1/api/partner.service.ts b/matsen-tool/src/app/core/api/v1/api/partner.service.ts new file mode 100644 index 0000000..6d7b5c6 --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/api/partner.service.ts @@ -0,0 +1,474 @@ +/** + * 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 { ApiPartnersGetCollection200Response } from '../model/apiPartnersGetCollection200Response'; +// @ts-ignore +import { ApiPartnersGetCollection200Response1 } from '../model/apiPartnersGetCollection200Response1'; +// @ts-ignore +import { Partner } from '../model/partner'; +// @ts-ignore +import { PartnerJsonhal } from '../model/partnerJsonhal'; +// @ts-ignore +import { PartnerJsonld } from '../model/partnerJsonld'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + + +@Injectable({ + providedIn: 'root' +}) +export class PartnerService { + + 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(); + } + + + // @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 Partner resources. + * Retrieves the collection of Partner resources. + * @param page The collection page number + * @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 partnersGetCollection(page?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable; + public partnersGetCollection(page?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public partnersGetCollection(page?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public partnersGetCollection(page?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (page !== undefined && page !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + } + + 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 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/partners`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes the Partner resource. + * Removes the Partner resource. + * @param id PartnerApi 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 partnersIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public partnersIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public partnersIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public partnersIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling partnersIdDelete.'); + } + + 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[] = [ + ]; + 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 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/partners/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Retrieves a Partner resource. + * Retrieves a Partner resource. + * @param id PartnerApi 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 partnersIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable; + public partnersIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public partnersIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public partnersIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling partnersIdGet.'); + } + + 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 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/partners/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates the Partner resource. + * Updates the Partner resource. + * @param id PartnerApi identifier + * @param partner The updated Partner 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 partnersIdPatch(id: string, partner: Partner, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable; + public partnersIdPatch(id: string, partner: Partner, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public partnersIdPatch(id: string, partner: Partner, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public partnersIdPatch(id: string, partner: Partner, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling partnersIdPatch.'); + } + if (partner === null || partner === undefined) { + throw new Error('Required parameter partner was null or undefined when calling partnersIdPatch.'); + } + + 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(); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/merge-patch+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + 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/partners/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('patch', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: partner, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates a Partner resource. + * Creates a Partner resource. + * @param partnerJsonld The new Partner 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 partnersPost(partnerJsonld: PartnerJsonld, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable; + public partnersPost(partnerJsonld: PartnerJsonld, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public partnersPost(partnerJsonld: PartnerJsonld, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable>; + public partnersPost(partnerJsonld: PartnerJsonld, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext}): Observable { + if (partnerJsonld === null || partnerJsonld === undefined) { + throw new Error('Required parameter partnerJsonld was null or undefined when calling partnersPost.'); + } + + 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(); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/ld+json', + 'application/json', + 'text/html', + 'application/hal+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + 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/partners`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: partnerJsonld, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + +} diff --git a/matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200Response.ts b/matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200Response.ts new file mode 100644 index 0000000..b414aa9 --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200Response.ts @@ -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 { ContactJsonld } from './contactJsonld'; +import { ApiContactsGetCollection200ResponseHydraSearch } from './apiContactsGetCollection200ResponseHydraSearch'; +import { ApiContactsGetCollection200ResponseHydraView } from './apiContactsGetCollection200ResponseHydraView'; + + +export interface ApiContactsGetCollection200Response { + 'hydra:member': Array; + 'hydra:totalItems'?: number; + 'hydra:view'?: ApiContactsGetCollection200ResponseHydraView; + 'hydra:search'?: ApiContactsGetCollection200ResponseHydraSearch; +} + diff --git a/matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200Response1.ts b/matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200Response1.ts new file mode 100644 index 0000000..b5eff5f --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200Response1.ts @@ -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 { ApiContactsGetCollection200Response1Links } from './apiContactsGetCollection200Response1Links'; +import { ContactJsonhal } from './contactJsonhal'; + + +export interface ApiContactsGetCollection200Response1 { + _embedded: Array; + totalItems?: number; + itemsPerPage?: number; + _links: ApiContactsGetCollection200Response1Links; +} + diff --git a/matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200Response1Links.ts b/matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200Response1Links.ts new file mode 100644 index 0000000..a3752a2 --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200Response1Links.ts @@ -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 { ApiContactsGetCollection200Response1LinksSelf } from './apiContactsGetCollection200Response1LinksSelf'; + + +export interface ApiContactsGetCollection200Response1Links { + self?: ApiContactsGetCollection200Response1LinksSelf; + first?: ApiContactsGetCollection200Response1LinksSelf; + last?: ApiContactsGetCollection200Response1LinksSelf; + next?: ApiContactsGetCollection200Response1LinksSelf; + previous?: ApiContactsGetCollection200Response1LinksSelf; +} + diff --git a/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200Response1LinksSelf.ts b/matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200Response1LinksSelf.ts similarity index 85% rename from matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200Response1LinksSelf.ts rename to matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200Response1LinksSelf.ts index c8718e1..1a2f0aa 100644 --- a/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200Response1LinksSelf.ts +++ b/matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200Response1LinksSelf.ts @@ -11,7 +11,7 @@ */ -export interface ApiPostsGetCollection200Response1LinksSelf { +export interface ApiContactsGetCollection200Response1LinksSelf { href?: string; } diff --git a/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200ResponseHydraSearch.ts b/matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200ResponseHydraSearch.ts similarity index 59% rename from matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200ResponseHydraSearch.ts rename to matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200ResponseHydraSearch.ts index 0bc3364..65ea3c4 100644 --- a/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200ResponseHydraSearch.ts +++ b/matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200ResponseHydraSearch.ts @@ -9,13 +9,13 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { ApiPostsGetCollection200ResponseHydraSearchHydraMappingInner } from './apiPostsGetCollection200ResponseHydraSearchHydraMappingInner'; +import { ApiContactsGetCollection200ResponseHydraSearchHydraMappingInner } from './apiContactsGetCollection200ResponseHydraSearchHydraMappingInner'; -export interface ApiPostsGetCollection200ResponseHydraSearch { +export interface ApiContactsGetCollection200ResponseHydraSearch { type?: string; 'hydra:template'?: string; 'hydra:variableRepresentation'?: string; - 'hydra:mapping'?: Array; + 'hydra:mapping'?: Array; } diff --git a/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200ResponseHydraSearchHydraMappingInner.ts b/matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200ResponseHydraSearchHydraMappingInner.ts similarity index 84% rename from matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200ResponseHydraSearchHydraMappingInner.ts rename to matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200ResponseHydraSearchHydraMappingInner.ts index 2912064..a0339bc 100644 --- a/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200ResponseHydraSearchHydraMappingInner.ts +++ b/matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200ResponseHydraSearchHydraMappingInner.ts @@ -11,7 +11,7 @@ */ -export interface ApiPostsGetCollection200ResponseHydraSearchHydraMappingInner { +export interface ApiContactsGetCollection200ResponseHydraSearchHydraMappingInner { type?: string; variable?: string; property?: string | null; diff --git a/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200ResponseHydraView.ts b/matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200ResponseHydraView.ts similarity index 88% rename from matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200ResponseHydraView.ts rename to matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200ResponseHydraView.ts index 2828047..b473217 100644 --- a/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200ResponseHydraView.ts +++ b/matsen-tool/src/app/core/api/v1/model/apiContactsGetCollection200ResponseHydraView.ts @@ -11,7 +11,7 @@ */ -export interface ApiPostsGetCollection200ResponseHydraView { +export interface ApiContactsGetCollection200ResponseHydraView { id?: string; type?: string; 'hydra:first'?: string; diff --git a/matsen-tool/src/app/core/api/v1/model/apiMediaObjectsGetCollection200Response.ts b/matsen-tool/src/app/core/api/v1/model/apiMediaObjectsGetCollection200Response.ts new file mode 100644 index 0000000..8acdc2d --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/model/apiMediaObjectsGetCollection200Response.ts @@ -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 { ApiContactsGetCollection200ResponseHydraSearch } from './apiContactsGetCollection200ResponseHydraSearch'; +import { MediaObjectJsonldMediaObjectRead } from './mediaObjectJsonldMediaObjectRead'; +import { ApiContactsGetCollection200ResponseHydraView } from './apiContactsGetCollection200ResponseHydraView'; + + +export interface ApiMediaObjectsGetCollection200Response { + 'hydra:member': Array; + 'hydra:totalItems'?: number; + 'hydra:view'?: ApiContactsGetCollection200ResponseHydraView; + 'hydra:search'?: ApiContactsGetCollection200ResponseHydraSearch; +} + diff --git a/matsen-tool/src/app/core/api/v1/model/apiMediaObjectsGetCollection200Response1.ts b/matsen-tool/src/app/core/api/v1/model/apiMediaObjectsGetCollection200Response1.ts new file mode 100644 index 0000000..040210a --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/model/apiMediaObjectsGetCollection200Response1.ts @@ -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 { ApiContactsGetCollection200Response1Links } from './apiContactsGetCollection200Response1Links'; +import { MediaObjectJsonhalMediaObjectRead } from './mediaObjectJsonhalMediaObjectRead'; + + +export interface ApiMediaObjectsGetCollection200Response1 { + _embedded: Array; + totalItems?: number; + itemsPerPage?: number; + _links: ApiContactsGetCollection200Response1Links; +} + diff --git a/matsen-tool/src/app/core/api/v1/model/apiPartnersGetCollection200Response.ts b/matsen-tool/src/app/core/api/v1/model/apiPartnersGetCollection200Response.ts new file mode 100644 index 0000000..a7056f6 --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/model/apiPartnersGetCollection200Response.ts @@ -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 { ApiContactsGetCollection200ResponseHydraSearch } from './apiContactsGetCollection200ResponseHydraSearch'; +import { PartnerJsonld } from './partnerJsonld'; +import { ApiContactsGetCollection200ResponseHydraView } from './apiContactsGetCollection200ResponseHydraView'; + + +export interface ApiPartnersGetCollection200Response { + 'hydra:member': Array; + 'hydra:totalItems'?: number; + 'hydra:view'?: ApiContactsGetCollection200ResponseHydraView; + 'hydra:search'?: ApiContactsGetCollection200ResponseHydraSearch; +} + diff --git a/matsen-tool/src/app/core/api/v1/model/apiPartnersGetCollection200Response1.ts b/matsen-tool/src/app/core/api/v1/model/apiPartnersGetCollection200Response1.ts new file mode 100644 index 0000000..3345f23 --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/model/apiPartnersGetCollection200Response1.ts @@ -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 { ApiContactsGetCollection200Response1Links } from './apiContactsGetCollection200Response1Links'; +import { PartnerJsonhal } from './partnerJsonhal'; + + +export interface ApiPartnersGetCollection200Response1 { + _embedded: Array; + totalItems?: number; + itemsPerPage?: number; + _links: ApiContactsGetCollection200Response1Links; +} + diff --git a/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200Response.ts b/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200Response.ts index 47f9272..a18c8b7 100644 --- a/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200Response.ts +++ b/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200Response.ts @@ -9,15 +9,15 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { ApiPostsGetCollection200ResponseHydraSearch } from './apiPostsGetCollection200ResponseHydraSearch'; import { PostJsonld } from './postJsonld'; -import { ApiPostsGetCollection200ResponseHydraView } from './apiPostsGetCollection200ResponseHydraView'; +import { ApiContactsGetCollection200ResponseHydraSearch } from './apiContactsGetCollection200ResponseHydraSearch'; +import { ApiContactsGetCollection200ResponseHydraView } from './apiContactsGetCollection200ResponseHydraView'; export interface ApiPostsGetCollection200Response { 'hydra:member': Array; 'hydra:totalItems'?: number; - 'hydra:view'?: ApiPostsGetCollection200ResponseHydraView; - 'hydra:search'?: ApiPostsGetCollection200ResponseHydraSearch; + 'hydra:view'?: ApiContactsGetCollection200ResponseHydraView; + 'hydra:search'?: ApiContactsGetCollection200ResponseHydraSearch; } diff --git a/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200Response1.ts b/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200Response1.ts index 9e6a4f3..a7894e7 100644 --- a/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200Response1.ts +++ b/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200Response1.ts @@ -9,14 +9,14 @@ * https://openapi-generator.tech * Do not edit the class manually. */ +import { ApiContactsGetCollection200Response1Links } from './apiContactsGetCollection200Response1Links'; import { PostJsonhal } from './postJsonhal'; -import { ApiPostsGetCollection200Response1Links } from './apiPostsGetCollection200Response1Links'; export interface ApiPostsGetCollection200Response1 { _embedded: Array; totalItems?: number; itemsPerPage?: number; - _links: ApiPostsGetCollection200Response1Links; + _links: ApiContactsGetCollection200Response1Links; } diff --git a/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200Response1Links.ts b/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200Response1Links.ts deleted file mode 100644 index 9a537ff..0000000 --- a/matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200Response1Links.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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 { ApiPostsGetCollection200Response1LinksSelf } from './apiPostsGetCollection200Response1LinksSelf'; - - -export interface ApiPostsGetCollection200Response1Links { - self?: ApiPostsGetCollection200Response1LinksSelf; - first?: ApiPostsGetCollection200Response1LinksSelf; - last?: ApiPostsGetCollection200Response1LinksSelf; - next?: ApiPostsGetCollection200Response1LinksSelf; - previous?: ApiPostsGetCollection200Response1LinksSelf; -} - diff --git a/matsen-tool/src/app/core/api/v1/model/apiUsersGetCollection200Response.ts b/matsen-tool/src/app/core/api/v1/model/apiUsersGetCollection200Response.ts index 1fcb7ed..c617226 100644 --- a/matsen-tool/src/app/core/api/v1/model/apiUsersGetCollection200Response.ts +++ b/matsen-tool/src/app/core/api/v1/model/apiUsersGetCollection200Response.ts @@ -9,15 +9,15 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { ApiPostsGetCollection200ResponseHydraSearch } from './apiPostsGetCollection200ResponseHydraSearch'; import { UserJsonld } from './userJsonld'; -import { ApiPostsGetCollection200ResponseHydraView } from './apiPostsGetCollection200ResponseHydraView'; +import { ApiContactsGetCollection200ResponseHydraSearch } from './apiContactsGetCollection200ResponseHydraSearch'; +import { ApiContactsGetCollection200ResponseHydraView } from './apiContactsGetCollection200ResponseHydraView'; export interface ApiUsersGetCollection200Response { 'hydra:member': Array; 'hydra:totalItems'?: number; - 'hydra:view'?: ApiPostsGetCollection200ResponseHydraView; - 'hydra:search'?: ApiPostsGetCollection200ResponseHydraSearch; + 'hydra:view'?: ApiContactsGetCollection200ResponseHydraView; + 'hydra:search'?: ApiContactsGetCollection200ResponseHydraSearch; } diff --git a/matsen-tool/src/app/core/api/v1/model/apiUsersGetCollection200Response1.ts b/matsen-tool/src/app/core/api/v1/model/apiUsersGetCollection200Response1.ts index 15f4c6b..501e965 100644 --- a/matsen-tool/src/app/core/api/v1/model/apiUsersGetCollection200Response1.ts +++ b/matsen-tool/src/app/core/api/v1/model/apiUsersGetCollection200Response1.ts @@ -9,14 +9,14 @@ * https://openapi-generator.tech * Do not edit the class manually. */ +import { ApiContactsGetCollection200Response1Links } from './apiContactsGetCollection200Response1Links'; import { UserJsonhal } from './userJsonhal'; -import { ApiPostsGetCollection200Response1Links } from './apiPostsGetCollection200Response1Links'; export interface ApiUsersGetCollection200Response1 { _embedded: Array; totalItems?: number; itemsPerPage?: number; - _links: ApiPostsGetCollection200Response1Links; + _links: ApiContactsGetCollection200Response1Links; } diff --git a/matsen-tool/src/app/core/api/v1/model/contact.ts b/matsen-tool/src/app/core/api/v1/model/contact.ts new file mode 100644 index 0000000..fea5b3b --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/model/contact.ts @@ -0,0 +1,29 @@ +/** + * 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 { Partner } from './partner'; + + +/** + * + */ +export interface Contact { + firstName: string | null; + lastName: string | null; + partner?: Partner | null; + birthday?: string | null; + image?: string | null; + position?: string | null; + phone?: string | null; + email?: string | null; + createdAt?: string | null; +} + diff --git a/matsen-tool/src/app/core/api/v1/model/contactJsonhal.ts b/matsen-tool/src/app/core/api/v1/model/contactJsonhal.ts new file mode 100644 index 0000000..35cac2b --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/model/contactJsonhal.ts @@ -0,0 +1,31 @@ +/** + * 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 { ContactJsonhalLinks } from './contactJsonhalLinks'; +import { PartnerJsonhal } from './partnerJsonhal'; + + +/** + * + */ +export interface ContactJsonhal { + _links?: ContactJsonhalLinks; + firstName: string | null; + lastName: string | null; + partner?: PartnerJsonhal | null; + birthday?: string | null; + image?: string | null; + position?: string | null; + phone?: string | null; + email?: string | null; + createdAt?: string | null; +} + diff --git a/matsen-tool/src/app/core/api/v1/model/contactJsonhalLinks.ts b/matsen-tool/src/app/core/api/v1/model/contactJsonhalLinks.ts new file mode 100644 index 0000000..df9e79d --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/model/contactJsonhalLinks.ts @@ -0,0 +1,18 @@ +/** + * 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 { ApiContactsGetCollection200Response1LinksSelf } from './apiContactsGetCollection200Response1LinksSelf'; + + +export interface ContactJsonhalLinks { + self?: ApiContactsGetCollection200Response1LinksSelf; +} + diff --git a/matsen-tool/src/app/core/api/v1/model/contactJsonld.ts b/matsen-tool/src/app/core/api/v1/model/contactJsonld.ts new file mode 100644 index 0000000..fffb681 --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/model/contactJsonld.ts @@ -0,0 +1,32 @@ +/** + * 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 { PartnerJsonld } from './partnerJsonld'; + + +/** + * + */ +export interface ContactJsonld { + context?: string | null; + readonly id?: string; + readonly type?: string; + firstName: string | null; + lastName: string | null; + partner?: PartnerJsonld | null; + birthday?: string | null; + image?: string | null; + position?: string | null; + phone?: string | null; + email?: string | null; + createdAt?: string | null; +} + diff --git a/matsen-tool/src/app/core/api/v1/model/postJsonhalLinks.ts b/matsen-tool/src/app/core/api/v1/model/mediaObjectJsonhalMediaObjectRead.ts similarity index 64% rename from matsen-tool/src/app/core/api/v1/model/postJsonhalLinks.ts rename to matsen-tool/src/app/core/api/v1/model/mediaObjectJsonhalMediaObjectRead.ts index 780cc14..051f09a 100644 --- a/matsen-tool/src/app/core/api/v1/model/postJsonhalLinks.ts +++ b/matsen-tool/src/app/core/api/v1/model/mediaObjectJsonhalMediaObjectRead.ts @@ -9,10 +9,14 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { ApiPostsGetCollection200Response1LinksSelf } from './apiPostsGetCollection200Response1LinksSelf'; +import { ContactJsonhalLinks } from './contactJsonhalLinks'; -export interface PostJsonhalLinks { - self?: ApiPostsGetCollection200Response1LinksSelf; +/** + * + */ +export interface MediaObjectJsonhalMediaObjectRead { + _links?: ContactJsonhalLinks; + contentUrl?: string | null; } diff --git a/matsen-tool/src/app/core/api/v1/model/mediaObjectJsonldMediaObjectRead.ts b/matsen-tool/src/app/core/api/v1/model/mediaObjectJsonldMediaObjectRead.ts new file mode 100644 index 0000000..3c77f45 --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/model/mediaObjectJsonldMediaObjectRead.ts @@ -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 MediaObjectJsonldMediaObjectRead { + context?: string | null; + readonly id?: string; + readonly type?: string; + contentUrl?: string | null; +} + diff --git a/matsen-tool/src/app/core/api/v1/model/mediaObjectMediaObjectRead.ts b/matsen-tool/src/app/core/api/v1/model/mediaObjectMediaObjectRead.ts new file mode 100644 index 0000000..90435c1 --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/model/mediaObjectMediaObjectRead.ts @@ -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 MediaObjectMediaObjectRead { + contentUrl?: string | null; +} + diff --git a/matsen-tool/src/app/core/api/v1/model/models.ts b/matsen-tool/src/app/core/api/v1/model/models.ts index ba1b8a3..c32fd04 100644 --- a/matsen-tool/src/app/core/api/v1/model/models.ts +++ b/matsen-tool/src/app/core/api/v1/model/models.ts @@ -1,17 +1,32 @@ +export * from './apiContactsGetCollection200Response'; +export * from './apiContactsGetCollection200Response1'; +export * from './apiContactsGetCollection200Response1Links'; +export * from './apiContactsGetCollection200Response1LinksSelf'; +export * from './apiContactsGetCollection200ResponseHydraSearch'; +export * from './apiContactsGetCollection200ResponseHydraSearchHydraMappingInner'; +export * from './apiContactsGetCollection200ResponseHydraView'; +export * from './apiMediaObjectsGetCollection200Response'; +export * from './apiMediaObjectsGetCollection200Response1'; +export * from './apiPartnersGetCollection200Response'; +export * from './apiPartnersGetCollection200Response1'; export * from './apiPostsGetCollection200Response'; export * from './apiPostsGetCollection200Response1'; -export * from './apiPostsGetCollection200Response1Links'; -export * from './apiPostsGetCollection200Response1LinksSelf'; -export * from './apiPostsGetCollection200ResponseHydraSearch'; -export * from './apiPostsGetCollection200ResponseHydraSearchHydraMappingInner'; -export * from './apiPostsGetCollection200ResponseHydraView'; export * from './apiUsersGetCollection200Response'; export * from './apiUsersGetCollection200Response1'; +export * from './contact'; +export * from './contactJsonhal'; +export * from './contactJsonhalLinks'; +export * from './contactJsonld'; export * from './loginCheckPost200Response'; export * from './loginCheckPostRequest'; +export * from './mediaObjectJsonhalMediaObjectRead'; +export * from './mediaObjectJsonldMediaObjectRead'; +export * from './mediaObjectMediaObjectRead'; +export * from './partner'; +export * from './partnerJsonhal'; +export * from './partnerJsonld'; export * from './post'; export * from './postJsonhal'; -export * from './postJsonhalLinks'; export * from './postJsonld'; export * from './user'; export * from './userJsonhal'; diff --git a/matsen-tool/src/app/core/api/v1/model/partner.ts b/matsen-tool/src/app/core/api/v1/model/partner.ts new file mode 100644 index 0000000..db11498 --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/model/partner.ts @@ -0,0 +1,41 @@ +/** + * 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 { Contact } from './contact'; + + +/** + * + */ +export interface Partner { + readonly id?: number; + name?: string; + type?: Partner.TypeEnum; + street?: string | null; + streetNo?: string | null; + zip?: string | null; + city?: string | null; + country?: string | null; + website?: string | null; + createdAt?: string; + contacts?: Array; + logo?: string | null; +} +export namespace Partner { + export type TypeEnum = 'customer' | 'supplier' | 'service'; + export const TypeEnum = { + Customer: 'customer' as TypeEnum, + Supplier: 'supplier' as TypeEnum, + Service: 'service' as TypeEnum + }; +} + + diff --git a/matsen-tool/src/app/core/api/v1/model/partnerJsonhal.ts b/matsen-tool/src/app/core/api/v1/model/partnerJsonhal.ts new file mode 100644 index 0000000..0d25c18 --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/model/partnerJsonhal.ts @@ -0,0 +1,43 @@ +/** + * 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 { ContactJsonhalLinks } from './contactJsonhalLinks'; +import { ContactJsonhal } from './contactJsonhal'; + + +/** + * + */ +export interface PartnerJsonhal { + _links?: ContactJsonhalLinks; + readonly id?: number; + name?: string; + type?: PartnerJsonhal.TypeEnum; + street?: string | null; + streetNo?: string | null; + zip?: string | null; + city?: string | null; + country?: string | null; + website?: string | null; + createdAt?: string; + contacts?: Array; + logo?: string | null; +} +export namespace PartnerJsonhal { + export type TypeEnum = 'customer' | 'supplier' | 'service'; + export const TypeEnum = { + Customer: 'customer' as TypeEnum, + Supplier: 'supplier' as TypeEnum, + Service: 'service' as TypeEnum + }; +} + + diff --git a/matsen-tool/src/app/core/api/v1/model/partnerJsonld.ts b/matsen-tool/src/app/core/api/v1/model/partnerJsonld.ts new file mode 100644 index 0000000..d14a9de --- /dev/null +++ b/matsen-tool/src/app/core/api/v1/model/partnerJsonld.ts @@ -0,0 +1,42 @@ +/** + * 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 { ContactJsonld } from './contactJsonld'; + + +/** + * + */ +export interface PartnerJsonld { + context?: string | null; + readonly id?: number; + name?: string; + type?: PartnerJsonld.TypeEnum; + street?: string | null; + streetNo?: string | null; + zip?: string | null; + city?: string | null; + country?: string | null; + website?: string | null; + createdAt?: string; + contacts?: Array; + logo?: string | null; +} +export namespace PartnerJsonld { + export type TypeEnum = 'customer' | 'supplier' | 'service'; + export const TypeEnum = { + Customer: 'customer' as TypeEnum, + Supplier: 'supplier' as TypeEnum, + Service: 'service' as TypeEnum + }; +} + + diff --git a/matsen-tool/src/app/core/api/v1/model/postJsonhal.ts b/matsen-tool/src/app/core/api/v1/model/postJsonhal.ts index 3b112e1..cd1d6a4 100644 --- a/matsen-tool/src/app/core/api/v1/model/postJsonhal.ts +++ b/matsen-tool/src/app/core/api/v1/model/postJsonhal.ts @@ -9,14 +9,14 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { PostJsonhalLinks } from './postJsonhalLinks'; +import { ContactJsonhalLinks } from './contactJsonhalLinks'; /** * */ export interface PostJsonhal { - _links?: PostJsonhalLinks; + _links?: ContactJsonhalLinks; message: string | null; owner?: string | null; readonly createdAt?: string | null; diff --git a/matsen-tool/src/app/core/api/v1/model/user.ts b/matsen-tool/src/app/core/api/v1/model/user.ts index b5d1c79..b4a65c3 100644 --- a/matsen-tool/src/app/core/api/v1/model/user.ts +++ b/matsen-tool/src/app/core/api/v1/model/user.ts @@ -24,6 +24,6 @@ export interface User { password?: string | null; active?: boolean; readonly createdAt?: string | null; - userPosts?: Array; + postings?: Array; } diff --git a/matsen-tool/src/app/core/api/v1/model/userJsonhal.ts b/matsen-tool/src/app/core/api/v1/model/userJsonhal.ts index a6f93af..3f9b13e 100644 --- a/matsen-tool/src/app/core/api/v1/model/userJsonhal.ts +++ b/matsen-tool/src/app/core/api/v1/model/userJsonhal.ts @@ -9,14 +9,14 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { PostJsonhalLinks } from './postJsonhalLinks'; +import { ContactJsonhalLinks } from './contactJsonhalLinks'; /** * */ export interface UserJsonhal { - _links?: PostJsonhalLinks; + _links?: ContactJsonhalLinks; email: string | null; firstName: string | null; lastName: string | null; @@ -26,6 +26,6 @@ export interface UserJsonhal { password?: string | null; active?: boolean; readonly createdAt?: string | null; - userPosts?: Array; + postings?: Array; } diff --git a/matsen-tool/src/app/core/api/v1/model/userJsonld.ts b/matsen-tool/src/app/core/api/v1/model/userJsonld.ts index 8473b98..28109b9 100644 --- a/matsen-tool/src/app/core/api/v1/model/userJsonld.ts +++ b/matsen-tool/src/app/core/api/v1/model/userJsonld.ts @@ -27,6 +27,6 @@ export interface UserJsonld { password?: string | null; active?: boolean; readonly createdAt?: string | null; - userPosts?: Array; + postings?: Array; }