浏览代码

apijson

master
Florian Eisenmenger 2 年前
父节点
当前提交
e911c81a2e
共有 24 个文件被更改,包括 1234 次插入518 次删除
  1. +1
    -1
      matsen-tool/openapi.json
  2. +533
    -25
      matsen-tool/openapi.yaml
  3. +9
    -2
      matsen-tool/src/app/core/api/v1/.openapi-generator/FILES
  4. +3
    -1
      matsen-tool/src/app/core/api/v1/api/api.ts
  5. +3
    -3
      matsen-tool/src/app/core/api/v1/api/comment.service.ts
  6. +3
    -3
      matsen-tool/src/app/core/api/v1/api/contact.service.ts
  7. +27
    -27
      matsen-tool/src/app/core/api/v1/api/media.service.ts
  8. +0
    -369
      matsen-tool/src/app/core/api/v1/api/mediaObject.service.ts
  9. +3
    -3
      matsen-tool/src/app/core/api/v1/api/partner.service.ts
  10. +3
    -3
      matsen-tool/src/app/core/api/v1/api/post.service.ts
  11. +3
    -3
      matsen-tool/src/app/core/api/v1/api/product.service.ts
  12. +509
    -0
      matsen-tool/src/app/core/api/v1/api/task.service.ts
  13. +2
    -2
      matsen-tool/src/app/core/api/v1/api/user.service.ts
  14. +1
    -1
      matsen-tool/src/app/core/api/v1/model/apiMediaGetCollection200Response.ts
  15. +1
    -1
      matsen-tool/src/app/core/api/v1/model/apiMediaGetCollection200Response1.ts
  16. +3
    -3
      matsen-tool/src/app/core/api/v1/model/apiTasksGetCollection200Response.ts
  17. +3
    -3
      matsen-tool/src/app/core/api/v1/model/apiTasksGetCollection200Response1.ts
  18. +0
    -22
      matsen-tool/src/app/core/api/v1/model/mediaObjectJsonhalMediaObjectRead.ts
  19. +0
    -24
      matsen-tool/src/app/core/api/v1/model/mediaObjectJsonldMediaObjectRead.ts
  20. +0
    -20
      matsen-tool/src/app/core/api/v1/model/mediaObjectMediaObjectRead.ts
  21. +7
    -2
      matsen-tool/src/app/core/api/v1/model/models.ts
  22. +38
    -0
      matsen-tool/src/app/core/api/v1/model/task.ts
  23. +40
    -0
      matsen-tool/src/app/core/api/v1/model/taskJsonhal.ts
  24. +42
    -0
      matsen-tool/src/app/core/api/v1/model/taskJsonld.ts

+ 1
- 1
matsen-tool/openapi.json
文件差异内容过多而无法显示
查看文件


+ 533
- 25
matsen-tool/openapi.yaml 查看文件

@@ -155,7 +155,7 @@ paths:
-
name: id
in: path
description: 'Comment identifier'
description: 'CommentApi identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -180,7 +180,7 @@ paths:
-
name: id
in: path
description: 'Comment identifier'
description: 'CommentApi identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -223,7 +223,7 @@ paths:
-
name: id
in: path
description: 'Comment identifier'
description: 'CommentApi identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -414,7 +414,7 @@ paths:
-
name: id
in: path
description: 'Contact identifier'
description: 'ContactApi identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -439,7 +439,7 @@ paths:
-
name: id
in: path
description: 'Contact identifier'
description: 'ContactApi identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -482,7 +482,7 @@ paths:
-
name: id
in: path
description: 'Contact identifier'
description: 'ContactApi identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -500,9 +500,9 @@ paths:
required: true
deprecated: false
parameters: []
/api/medias:
/api/media:
get:
operationId: api_medias_get_collection
operationId: api_media_get_collection
tags:
- Media
responses:
@@ -573,7 +573,7 @@ paths:
allowReserved: false
deprecated: false
post:
operationId: api_medias_post
operationId: api_media_post
tags:
- Media
responses:
@@ -613,9 +613,9 @@ paths:
required: false
deprecated: false
parameters: []
'/api/medias/{id}':
'/api/media/{id}':
get:
operationId: api_medias_id_get
operationId: api_media_id_get
tags:
- Media
responses:
@@ -642,7 +642,7 @@ paths:
-
name: id
in: path
description: 'Media identifier'
description: 'MediaObject identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -653,7 +653,7 @@ paths:
allowReserved: false
deprecated: false
delete:
operationId: api_medias_id_delete
operationId: api_media_id_delete
tags:
- Media
responses:
@@ -667,7 +667,7 @@ paths:
-
name: id
in: path
description: 'Media identifier'
description: 'MediaObject identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -896,7 +896,7 @@ paths:
-
name: id
in: path
description: 'Partner identifier'
description: 'PartnerApi identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -921,7 +921,7 @@ paths:
-
name: id
in: path
description: 'Partner identifier'
description: 'PartnerApi identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -964,7 +964,7 @@ paths:
-
name: id
in: path
description: 'Partner identifier'
description: 'PartnerApi identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1181,7 +1181,7 @@ paths:
-
name: id
in: path
description: 'Post identifier'
description: 'PostingApi identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1206,7 +1206,7 @@ paths:
-
name: id
in: path
description: 'Post identifier'
description: 'PostingApi identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1249,7 +1249,7 @@ paths:
-
name: id
in: path
description: 'Post identifier'
description: 'PostingApi identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1429,7 +1429,7 @@ paths:
-
name: id
in: path
description: 'Product identifier'
description: 'ProductApi identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1454,7 +1454,7 @@ paths:
-
name: id
in: path
description: 'Product identifier'
description: 'ProductApi identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1497,7 +1497,7 @@ paths:
-
name: id
in: path
description: 'Product identifier'
description: 'ProductApi identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1515,6 +1515,239 @@ paths:
required: true
deprecated: false
parameters: []
/api/tasks:
get:
operationId: api_tasks_get_collection
tags:
- Task
responses:
200:
description: 'Task collection'
content:
application/ld+json:
schema:
type: object
properties:
'hydra:member': { type: array, items: { $ref: '#/components/schemas/Task.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/Task'
text/html:
schema:
type: array
items:
$ref: '#/components/schemas/Task'
application/hal+json:
schema:
type: object
properties:
_embedded: { type: array, items: { $ref: '#/components/schemas/Task.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 Task resources.'
description: 'Retrieves the collection of Task 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
-
name: itemsPerPage
in: query
description: 'The number of items per page'
required: false
deprecated: false
allowEmptyValue: true
schema:
type: integer
default: 10
minimum: 0
maximum: 50
style: form
explode: false
allowReserved: false
deprecated: false
post:
operationId: api_tasks_post
tags:
- Task
responses:
201:
description: 'Task resource created'
content:
application/ld+json:
schema:
$ref: '#/components/schemas/Task.jsonld'
application/json:
schema:
$ref: '#/components/schemas/Task'
text/html:
schema:
$ref: '#/components/schemas/Task'
application/hal+json:
schema:
$ref: '#/components/schemas/Task.jsonhal'
links: { }
400:
description: 'Invalid input'
422:
description: 'Unprocessable entity'
summary: 'Creates a Task resource.'
description: 'Creates a Task resource.'
parameters: []
requestBody:
description: 'The new Task resource'
content:
application/ld+json:
schema:
$ref: '#/components/schemas/Task.jsonld'
application/json:
schema:
$ref: '#/components/schemas/Task'
text/html:
schema:
$ref: '#/components/schemas/Task'
application/hal+json:
schema:
$ref: '#/components/schemas/Task.jsonhal'
required: true
deprecated: false
parameters: []
'/api/tasks/{id}':
get:
operationId: api_tasks_id_get
tags:
- Task
responses:
200:
description: 'Task resource'
content:
application/ld+json:
schema:
$ref: '#/components/schemas/Task.jsonld'
application/json:
schema:
$ref: '#/components/schemas/Task'
text/html:
schema:
$ref: '#/components/schemas/Task'
application/hal+json:
schema:
$ref: '#/components/schemas/Task.jsonhal'
404:
description: 'Resource not found'
summary: 'Retrieves a Task resource.'
description: 'Retrieves a Task resource.'
parameters:
-
name: id
in: path
description: 'TaskApi identifier'
required: true
deprecated: false
allowEmptyValue: false
schema:
type: string
style: simple
explode: false
allowReserved: false
deprecated: false
delete:
operationId: api_tasks_id_delete
tags:
- Task
responses:
204:
description: 'Task resource deleted'
404:
description: 'Resource not found'
summary: 'Removes the Task resource.'
description: 'Removes the Task resource.'
parameters:
-
name: id
in: path
description: 'TaskApi identifier'
required: true
deprecated: false
allowEmptyValue: false
schema:
type: string
style: simple
explode: false
allowReserved: false
deprecated: false
patch:
operationId: api_tasks_id_patch
tags:
- Task
responses:
200:
description: 'Task resource updated'
content:
application/ld+json:
schema:
$ref: '#/components/schemas/Task.jsonld'
application/json:
schema:
$ref: '#/components/schemas/Task'
text/html:
schema:
$ref: '#/components/schemas/Task'
application/hal+json:
schema:
$ref: '#/components/schemas/Task.jsonhal'
links: { }
400:
description: 'Invalid input'
422:
description: 'Unprocessable entity'
404:
description: 'Resource not found'
summary: 'Updates the Task resource.'
description: 'Updates the Task resource.'
parameters:
-
name: id
in: path
description: 'TaskApi identifier'
required: true
deprecated: false
allowEmptyValue: false
schema:
type: string
style: simple
explode: false
allowReserved: false
requestBody:
description: 'The updated Task resource'
content:
application/merge-patch+json:
schema:
$ref: '#/components/schemas/Task'
required: true
deprecated: false
parameters: []
/api/users:
get:
operationId: api_users_get_collection
@@ -1662,7 +1895,7 @@ paths:
-
name: id
in: path
description: 'User identifier'
description: 'UserApi identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1705,7 +1938,7 @@ paths:
-
name: id
in: path
description: 'User identifier'
description: 'UserApi identifier'
required: true
deprecated: false
allowEmptyValue: false
@@ -1774,6 +2007,7 @@ components:
- 'null'
owner:
readOnly: true
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1785,6 +2019,7 @@ components:
- string
- 'null'
post:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1818,6 +2053,7 @@ components:
- 'null'
owner:
readOnly: true
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1829,6 +2065,7 @@ components:
- string
- 'null'
post:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1876,6 +2113,7 @@ components:
- 'null'
owner:
readOnly: true
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1887,6 +2125,7 @@ components:
- string
- 'null'
post:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1916,6 +2155,7 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1926,6 +2166,7 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1991,6 +2232,7 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2001,6 +2243,7 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2080,6 +2323,7 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2090,6 +2334,7 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2240,6 +2485,7 @@ components:
- string
- 'null'
logo:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2313,6 +2559,7 @@ components:
- string
- 'null'
logo:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2400,6 +2647,7 @@ components:
- string
- 'null'
logo:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2441,6 +2689,7 @@ components:
- 'null'
owner:
readOnly: true
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2452,12 +2701,14 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2491,12 +2742,14 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2545,6 +2798,7 @@ components:
- 'null'
owner:
readOnly: true
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2556,12 +2810,14 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2604,12 +2860,14 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2656,6 +2914,7 @@ components:
- 'null'
owner:
readOnly: true
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2667,12 +2926,14 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2706,12 +2967,14 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2731,6 +2994,7 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2769,6 +3033,7 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2821,6 +3086,7 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2836,6 +3102,245 @@ components:
- string
- 'null'
format: date-time
Task:
type: object
description: ''
deprecated: false
required:
- headline
- description
- assignedTo
- dueAt
- prio
properties:
headline:
type:
- string
- 'null'
description:
type:
- string
- 'null'
createdBy:
readOnly: true
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
assignedTo:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
dueAt:
type:
- string
- 'null'
format: date-time
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
prio:
type: string
enum:
- low
- medium
- high
completed:
type:
- boolean
- 'null'
createdAt:
readOnly: true
type:
- string
- 'null'
format: date-time
Task.jsonhal:
type: object
description: ''
deprecated: false
required:
- headline
- description
- assignedTo
- dueAt
- prio
properties:
_links:
type: object
properties:
self:
type: object
properties:
href:
type: string
format: iri-reference
headline:
type:
- string
- 'null'
description:
type:
- string
- 'null'
createdBy:
readOnly: true
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
assignedTo:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
dueAt:
type:
- string
- 'null'
format: date-time
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
prio:
type: string
enum:
- low
- medium
- high
completed:
type:
- boolean
- 'null'
createdAt:
readOnly: true
type:
- string
- 'null'
format: date-time
Task.jsonld:
type: object
description: ''
deprecated: false
required:
- headline
- description
- assignedTo
- dueAt
- prio
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
headline:
type:
- string
- 'null'
description:
type:
- string
- 'null'
createdBy:
readOnly: true
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
assignedTo:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
dueAt:
type:
- string
- 'null'
format: date-time
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
prio:
type: string
enum:
- low
- medium
- high
completed:
type:
- boolean
- 'null'
createdAt:
readOnly: true
type:
- string
- 'null'
format: date-time
User:
type: object
description: ''
@@ -2861,6 +3366,7 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2914,6 +3420,7 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2981,6 +3488,7 @@ components:
- string
- 'null'
image:
'owl:maxCardinality': 1
type:
- string
- 'null'


+ 9
- 2
matsen-tool/src/app/core/api/v1/.openapi-generator/FILES 查看文件

@@ -1,4 +1,5 @@
.gitignore
.openapi-generator-ignore
README.md
api.module.ts
api/api.ts
@@ -9,6 +10,7 @@ api/media.service.ts
api/partner.service.ts
api/post.service.ts
api/product.service.ts
api/task.service.ts
api/user.service.ts
configuration.ts
encoder.ts
@@ -23,14 +25,16 @@ model/apiCommentsGetCollection200ResponseHydraSearchHydraMappingInner.ts
model/apiCommentsGetCollection200ResponseHydraView.ts
model/apiContactsGetCollection200Response.ts
model/apiContactsGetCollection200Response1.ts
model/apiMediasGetCollection200Response.ts
model/apiMediasGetCollection200Response1.ts
model/apiMediaGetCollection200Response.ts
model/apiMediaGetCollection200Response1.ts
model/apiPartnersGetCollection200Response.ts
model/apiPartnersGetCollection200Response1.ts
model/apiPostsGetCollection200Response.ts
model/apiPostsGetCollection200Response1.ts
model/apiProductsGetCollection200Response.ts
model/apiProductsGetCollection200Response1.ts
model/apiTasksGetCollection200Response.ts
model/apiTasksGetCollection200Response1.ts
model/apiUsersGetCollection200Response.ts
model/apiUsersGetCollection200Response1.ts
model/comment.ts
@@ -61,6 +65,9 @@ model/postPostingPatch.ts
model/product.ts
model/productJsonhal.ts
model/productJsonld.ts
model/task.ts
model/taskJsonhal.ts
model/taskJsonld.ts
model/user.ts
model/userJsonhal.ts
model/userJsonld.ts


+ 3
- 1
matsen-tool/src/app/core/api/v1/api/api.ts 查看文件

@@ -12,6 +12,8 @@ export * from './post.service';
import { PostService } from './post.service';
export * from './product.service';
import { ProductService } from './product.service';
export * from './task.service';
import { TaskService } from './task.service';
export * from './user.service';
import { UserService } from './user.service';
export const APIS = [CommentService, ContactService, LoginCheckService, MediaService, PartnerService, PostService, ProductService, UserService];
export const APIS = [CommentService, ContactService, LoginCheckService, MediaService, PartnerService, PostService, ProductService, TaskService, UserService];

+ 3
- 3
matsen-tool/src/app/core/api/v1/api/comment.service.ts 查看文件

@@ -186,7 +186,7 @@ export class CommentService {
/**
* Removes the Comment resource.
* Removes the Comment resource.
* @param id Comment identifier
* @param id CommentApi 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.
*/
@@ -257,7 +257,7 @@ export class CommentService {
/**
* Retrieves a Comment resource.
* Retrieves a Comment resource.
* @param id Comment identifier
* @param id CommentApi 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.
*/
@@ -332,7 +332,7 @@ export class CommentService {
/**
* Updates the Comment resource.
* Updates the Comment resource.
* @param id Comment identifier
* @param id CommentApi identifier
* @param comment The updated Comment 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.


+ 3
- 3
matsen-tool/src/app/core/api/v1/api/contact.service.ts 查看文件

@@ -198,7 +198,7 @@ export class ContactService {
/**
* Removes the Contact resource.
* Removes the Contact resource.
* @param id Contact identifier
* @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.
*/
@@ -269,7 +269,7 @@ export class ContactService {
/**
* Retrieves a Contact resource.
* Retrieves a Contact resource.
* @param id Contact identifier
* @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.
*/
@@ -344,7 +344,7 @@ export class ContactService {
/**
* Updates the Contact resource.
* Updates the Contact resource.
* @param id Contact identifier
* @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.


+ 27
- 27
matsen-tool/src/app/core/api/v1/api/media.service.ts 查看文件

@@ -19,9 +19,9 @@ import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';

// @ts-ignore
import { ApiMediasGetCollection200Response } from '../model/apiMediasGetCollection200Response';
import { ApiMediaGetCollection200Response } from '../model/apiMediaGetCollection200Response';
// @ts-ignore
import { ApiMediasGetCollection200Response1 } from '../model/apiMediasGetCollection200Response1';
import { ApiMediaGetCollection200Response1 } from '../model/apiMediaGetCollection200Response1';
// @ts-ignore
import { MediaJsonhalMediaObjectRead } from '../model/mediaJsonhalMediaObjectRead';
// @ts-ignore
@@ -120,10 +120,10 @@ export class MediaService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public mediasGetCollection(page?: number, itemsPerPage?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiMediasGetCollection200Response>;
public mediasGetCollection(page?: number, itemsPerPage?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiMediasGetCollection200Response>>;
public mediasGetCollection(page?: number, itemsPerPage?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiMediasGetCollection200Response>>;
public mediasGetCollection(page?: number, itemsPerPage?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
public mediaGetCollection(page?: number, itemsPerPage?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiMediaGetCollection200Response>;
public mediaGetCollection(page?: number, itemsPerPage?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiMediaGetCollection200Response>>;
public mediaGetCollection(page?: number, itemsPerPage?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiMediaGetCollection200Response>>;
public mediaGetCollection(page?: number, itemsPerPage?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (page !== undefined && page !== null) {
@@ -181,8 +181,8 @@ export class MediaService {
}
}

let localVarPath = `/api/medias`;
return this.httpClient.request<ApiMediasGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`,
let localVarPath = `/api/media`;
return this.httpClient.request<ApiMediaGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
@@ -199,16 +199,16 @@ export class MediaService {
/**
* Removes the Media resource.
* Removes the Media resource.
* @param id Media identifier
* @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 mediasIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
public mediasIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
public mediasIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
public mediasIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
public mediaIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
public mediaIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
public mediaIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
public mediaIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling mediasIdDelete.');
throw new Error('Required parameter id was null or undefined when calling mediaIdDelete.');
}

let localVarHeaders = this.defaultHeaders;
@@ -253,7 +253,7 @@ export class MediaService {
}
}

let localVarPath = `/api/medias/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
let localVarPath = `/api/media/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
@@ -270,16 +270,16 @@ export class MediaService {
/**
* Retrieves a Media resource.
* Retrieves a Media resource.
* @param id Media identifier
* @param id MediaObject identifier
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public mediasIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<MediaJsonldMediaObjectRead>;
public mediasIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<MediaJsonldMediaObjectRead>>;
public mediasIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<MediaJsonldMediaObjectRead>>;
public mediasIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
public mediaIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<MediaJsonldMediaObjectRead>;
public mediaIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<MediaJsonldMediaObjectRead>>;
public mediaIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<MediaJsonldMediaObjectRead>>;
public mediaIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling mediasIdGet.');
throw new Error('Required parameter id was null or undefined when calling mediaIdGet.');
}

let localVarHeaders = this.defaultHeaders;
@@ -328,7 +328,7 @@ export class MediaService {
}
}

let localVarPath = `/api/medias/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
let localVarPath = `/api/media/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<MediaJsonldMediaObjectRead>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
@@ -349,10 +349,10 @@ export class MediaService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public mediasPost(file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<MediaJsonldMediaObjectRead>;
public mediasPost(file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<MediaJsonldMediaObjectRead>>;
public mediasPost(file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<MediaJsonldMediaObjectRead>>;
public mediasPost(file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
public mediaPost(file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<MediaJsonldMediaObjectRead>;
public mediaPost(file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<MediaJsonldMediaObjectRead>>;
public mediaPost(file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<MediaJsonldMediaObjectRead>>;
public mediaPost(file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarHeaders = this.defaultHeaders;

@@ -422,7 +422,7 @@ export class MediaService {
}
}

let localVarPath = `/api/medias`;
let localVarPath = `/api/media`;
return this.httpClient.request<MediaJsonldMediaObjectRead>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,


+ 0
- 369
matsen-tool/src/app/core/api/v1/api/mediaObject.service.ts 查看文件

@@ -1,369 +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.
*/
/* 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 itemsPerPage The number of items per page
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public mediaObjectsGetCollection(page?: number, itemsPerPage?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiMediaObjectsGetCollection200Response>;
public mediaObjectsGetCollection(page?: number, itemsPerPage?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiMediaObjectsGetCollection200Response>>;
public mediaObjectsGetCollection(page?: number, itemsPerPage?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiMediaObjectsGetCollection200Response>>;
public mediaObjectsGetCollection(page?: number, itemsPerPage?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>page, 'page');
}
if (itemsPerPage !== undefined && itemsPerPage !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>itemsPerPage, 'itemsPerPage');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json',
'application/json',
'text/html',
'application/hal+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/media_objects`;
return this.httpClient.request<ApiMediaObjectsGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Retrieves a 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, transferCache?: boolean}): Observable<MediaObjectJsonldMediaObjectRead>;
public mediaObjectsIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<MediaObjectJsonldMediaObjectRead>>;
public mediaObjectsIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<MediaObjectJsonldMediaObjectRead>>;
public mediaObjectsIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling 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 localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/media_objects/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<MediaObjectJsonldMediaObjectRead>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
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, transferCache?: boolean}): Observable<MediaObjectJsonldMediaObjectRead>;
public mediaObjectsPost(file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<MediaObjectJsonldMediaObjectRead>>;
public mediaObjectsPost(file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<MediaObjectJsonldMediaObjectRead>>;
public mediaObjectsPost(file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json',
'application/json',
'text/html',
'application/hal+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}

// to determine the Content-Type header
const consumes: string[] = [
'multipart/form-data'
];

const canConsumeForm = this.canConsumeForm(consumes);

let localVarFormParams: { append(param: string, value: any): any; };
let localVarUseForm = false;
let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data"
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
localVarUseForm = canConsumeForm;
if (localVarUseForm) {
localVarFormParams = new FormData();
} else {
localVarFormParams = new HttpParams({encoder: this.encoder});
}

if (file !== undefined) {
localVarFormParams = localVarFormParams.append('file', <any>file) as any || localVarFormParams;
}

let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/media_objects`;
return this.httpClient.request<MediaObjectJsonldMediaObjectRead>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

}

+ 3
- 3
matsen-tool/src/app/core/api/v1/api/partner.service.ts 查看文件

@@ -213,7 +213,7 @@ export class PartnerService {
/**
* Removes the Partner resource.
* Removes the Partner resource.
* @param id Partner identifier
* @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.
*/
@@ -284,7 +284,7 @@ export class PartnerService {
/**
* Retrieves a Partner resource.
* Retrieves a Partner resource.
* @param id Partner identifier
* @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.
*/
@@ -359,7 +359,7 @@ export class PartnerService {
/**
* Updates the Partner resource.
* Updates the Partner resource.
* @param id Partner identifier
* @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.


+ 3
- 3
matsen-tool/src/app/core/api/v1/api/post.service.ts 查看文件

@@ -218,7 +218,7 @@ export class PostService {
/**
* Removes the Post resource.
* Removes the Post resource.
* @param id Post identifier
* @param id PostingApi 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.
*/
@@ -289,7 +289,7 @@ export class PostService {
/**
* Retrieves a Post resource.
* Retrieves a Post resource.
* @param id Post identifier
* @param id PostingApi 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.
*/
@@ -364,7 +364,7 @@ export class PostService {
/**
* Updates the Post resource.
* Updates the Post resource.
* @param id Post identifier
* @param id PostingApi identifier
* @param postPostingPatch The updated Post resource
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.


+ 3
- 3
matsen-tool/src/app/core/api/v1/api/product.service.ts 查看文件

@@ -191,7 +191,7 @@ export class ProductService {
/**
* Removes the Product resource.
* Removes the Product resource.
* @param id Product identifier
* @param id ProductApi 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.
*/
@@ -262,7 +262,7 @@ export class ProductService {
/**
* Retrieves a Product resource.
* Retrieves a Product resource.
* @param id Product identifier
* @param id ProductApi 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.
*/
@@ -337,7 +337,7 @@ export class ProductService {
/**
* Updates the Product resource.
* Updates the Product resource.
* @param id Product identifier
* @param id ProductApi identifier
* @param product The updated Product 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.


+ 509
- 0
matsen-tool/src/app/core/api/v1/api/task.service.ts 查看文件

@@ -0,0 +1,509 @@
/**
* 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 { ApiTasksGetCollection200Response } from '../model/apiTasksGetCollection200Response';
// @ts-ignore
import { ApiTasksGetCollection200Response1 } from '../model/apiTasksGetCollection200Response1';
// @ts-ignore
import { Task } from '../model/task';
// @ts-ignore
import { TaskJsonhal } from '../model/taskJsonhal';
// @ts-ignore
import { TaskJsonld } from '../model/taskJsonld';

// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';



@Injectable({
providedIn: 'root'
})
export class TaskService {

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 Task resources.
* Retrieves the collection of Task resources.
* @param page The collection page number
* @param itemsPerPage The number of items per page
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public tasksGetCollection(page?: number, itemsPerPage?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiTasksGetCollection200Response>;
public tasksGetCollection(page?: number, itemsPerPage?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiTasksGetCollection200Response>>;
public tasksGetCollection(page?: number, itemsPerPage?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiTasksGetCollection200Response>>;
public tasksGetCollection(page?: number, itemsPerPage?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {

let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>page, 'page');
}
if (itemsPerPage !== undefined && itemsPerPage !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>itemsPerPage, 'itemsPerPage');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json',
'application/json',
'text/html',
'application/hal+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/tasks`;
return this.httpClient.request<ApiTasksGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Removes the Task resource.
* Removes the Task resource.
* @param id TaskApi 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 tasksIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
public tasksIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
public tasksIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
public tasksIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling tasksIdDelete.');
}

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 localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/tasks/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Retrieves a Task resource.
* Retrieves a Task resource.
* @param id TaskApi 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 tasksIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<TaskJsonld>;
public tasksIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<TaskJsonld>>;
public tasksIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<TaskJsonld>>;
public tasksIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling tasksIdGet.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json',
'application/json',
'text/html',
'application/hal+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}

let localVarPath = `/api/tasks/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<TaskJsonld>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Updates the Task resource.
* Updates the Task resource.
* @param id TaskApi identifier
* @param task The updated Task 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 tasksIdPatch(id: string, task: Task, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<TaskJsonld>;
public tasksIdPatch(id: string, task: Task, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<TaskJsonld>>;
public tasksIdPatch(id: string, task: Task, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<TaskJsonld>>;
public tasksIdPatch(id: string, task: Task, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling tasksIdPatch.');
}
if (task === null || task === undefined) {
throw new Error('Required parameter task was null or undefined when calling tasksIdPatch.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json',
'application/json',
'text/html',
'application/hal+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


// to determine the Content-Type header
const consumes: string[] = [
'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/tasks/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<TaskJsonld>('patch', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: task,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

/**
* Creates a Task resource.
* Creates a Task resource.
* @param taskJsonld The new Task 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 tasksPost(taskJsonld: TaskJsonld, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<TaskJsonld>;
public tasksPost(taskJsonld: TaskJsonld, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<TaskJsonld>>;
public tasksPost(taskJsonld: TaskJsonld, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<TaskJsonld>>;
public tasksPost(taskJsonld: TaskJsonld, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (taskJsonld === null || taskJsonld === undefined) {
throw new Error('Required parameter taskJsonld was null or undefined when calling tasksPost.');
}

let localVarHeaders = this.defaultHeaders;

let localVarCredential: string | undefined;
// authentication (JWT) required
localVarCredential = this.configuration.lookupCredential('JWT');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}

let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/ld+json',
'application/json',
'text/html',
'application/hal+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}

let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}

let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}


// to determine the Content-Type header
const consumes: string[] = [
'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/tasks`;
return this.httpClient.request<TaskJsonld>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: taskJsonld,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}

}

+ 2
- 2
matsen-tool/src/app/core/api/v1/api/user.service.ts 查看文件

@@ -186,7 +186,7 @@ export class UserService {
/**
* Retrieves a User resource.
* Retrieves a User resource.
* @param id User identifier
* @param id UserApi 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.
*/
@@ -261,7 +261,7 @@ export class UserService {
/**
* Updates the User resource.
* Updates the User resource.
* @param id User identifier
* @param id UserApi identifier
* @param user The updated User 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.


matsen-tool/src/app/core/api/v1/model/apiMediasGetCollection200Response.ts → matsen-tool/src/app/core/api/v1/model/apiMediaGetCollection200Response.ts 查看文件

@@ -14,7 +14,7 @@ import { ApiCommentsGetCollection200ResponseHydraSearch } from './apiCommentsGet
import { ApiCommentsGetCollection200ResponseHydraView } from './apiCommentsGetCollection200ResponseHydraView';


export interface ApiMediasGetCollection200Response {
export interface ApiMediaGetCollection200Response {
'hydra:member': Array<MediaJsonldMediaObjectRead>;
'hydra:totalItems'?: number;
'hydra:view'?: ApiCommentsGetCollection200ResponseHydraView;

matsen-tool/src/app/core/api/v1/model/apiMediasGetCollection200Response1.ts → matsen-tool/src/app/core/api/v1/model/apiMediaGetCollection200Response1.ts 查看文件

@@ -13,7 +13,7 @@ import { MediaJsonhalMediaObjectRead } from './mediaJsonhalMediaObjectRead';
import { ApiCommentsGetCollection200Response1Links } from './apiCommentsGetCollection200Response1Links';


export interface ApiMediasGetCollection200Response1 {
export interface ApiMediaGetCollection200Response1 {
_embedded: Array<MediaJsonhalMediaObjectRead>;
totalItems?: number;
itemsPerPage?: number;

matsen-tool/src/app/core/api/v1/model/apiMediaObjectsGetCollection200Response.ts → matsen-tool/src/app/core/api/v1/model/apiTasksGetCollection200Response.ts 查看文件

@@ -11,11 +11,11 @@
*/
import { ApiCommentsGetCollection200ResponseHydraSearch } from './apiCommentsGetCollection200ResponseHydraSearch';
import { ApiCommentsGetCollection200ResponseHydraView } from './apiCommentsGetCollection200ResponseHydraView';
import { MediaObjectJsonldMediaObjectRead } from './mediaObjectJsonldMediaObjectRead';
import { TaskJsonld } from './taskJsonld';


export interface ApiMediaObjectsGetCollection200Response {
'hydra:member': Array<MediaObjectJsonldMediaObjectRead>;
export interface ApiTasksGetCollection200Response {
'hydra:member': Array<TaskJsonld>;
'hydra:totalItems'?: number;
'hydra:view'?: ApiCommentsGetCollection200ResponseHydraView;
'hydra:search'?: ApiCommentsGetCollection200ResponseHydraSearch;

matsen-tool/src/app/core/api/v1/model/apiMediaObjectsGetCollection200Response1.ts → matsen-tool/src/app/core/api/v1/model/apiTasksGetCollection200Response1.ts 查看文件

@@ -9,12 +9,12 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { MediaObjectJsonhalMediaObjectRead } from './mediaObjectJsonhalMediaObjectRead';
import { TaskJsonhal } from './taskJsonhal';
import { ApiCommentsGetCollection200Response1Links } from './apiCommentsGetCollection200Response1Links';


export interface ApiMediaObjectsGetCollection200Response1 {
_embedded: Array<MediaObjectJsonhalMediaObjectRead>;
export interface ApiTasksGetCollection200Response1 {
_embedded: Array<TaskJsonhal>;
totalItems?: number;
itemsPerPage?: number;
_links: ApiCommentsGetCollection200Response1Links;

+ 0
- 22
matsen-tool/src/app/core/api/v1/model/mediaObjectJsonhalMediaObjectRead.ts 查看文件

@@ -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 { CommentJsonhalLinks } from './commentJsonhalLinks';


/**
*
*/
export interface MediaObjectJsonhalMediaObjectRead {
_links?: CommentJsonhalLinks;
contentUrl?: string | null;
}


+ 0
- 24
matsen-tool/src/app/core/api/v1/model/mediaObjectJsonldMediaObjectRead.ts 查看文件

@@ -1,24 +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 { CommentJsonldContext } from './commentJsonldContext';


/**
*
*/
export interface MediaObjectJsonldMediaObjectRead {
context?: CommentJsonldContext;
readonly id?: string;
readonly type?: string;
contentUrl?: string | null;
}


+ 0
- 20
matsen-tool/src/app/core/api/v1/model/mediaObjectMediaObjectRead.ts 查看文件

@@ -1,20 +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.
*/


/**
*
*/
export interface MediaObjectMediaObjectRead {
contentUrl?: string | null;
}


+ 7
- 2
matsen-tool/src/app/core/api/v1/model/models.ts 查看文件

@@ -7,14 +7,16 @@ export * from './apiCommentsGetCollection200ResponseHydraSearchHydraMappingInner
export * from './apiCommentsGetCollection200ResponseHydraView';
export * from './apiContactsGetCollection200Response';
export * from './apiContactsGetCollection200Response1';
export * from './apiMediasGetCollection200Response';
export * from './apiMediasGetCollection200Response1';
export * from './apiMediaGetCollection200Response';
export * from './apiMediaGetCollection200Response1';
export * from './apiPartnersGetCollection200Response';
export * from './apiPartnersGetCollection200Response1';
export * from './apiPostsGetCollection200Response';
export * from './apiPostsGetCollection200Response1';
export * from './apiProductsGetCollection200Response';
export * from './apiProductsGetCollection200Response1';
export * from './apiTasksGetCollection200Response';
export * from './apiTasksGetCollection200Response1';
export * from './apiUsersGetCollection200Response';
export * from './apiUsersGetCollection200Response1';
export * from './comment';
@@ -44,6 +46,9 @@ export * from './postPostingPatch';
export * from './product';
export * from './productJsonhal';
export * from './productJsonld';
export * from './task';
export * from './taskJsonhal';
export * from './taskJsonld';
export * from './user';
export * from './userJsonhal';
export * from './userJsonld';

+ 38
- 0
matsen-tool/src/app/core/api/v1/model/task.ts 查看文件

@@ -0,0 +1,38 @@
/**
* 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 Task {
headline: string | null;
description: string | null;
readonly createdBy?: string | null;
assignedTo: string | null;
dueAt: string | null;
partner?: string | null;
contact?: string | null;
prio: Task.PrioEnum;
completed?: boolean | null;
readonly createdAt?: string | null;
}
export namespace Task {
export type PrioEnum = 'low' | 'medium' | 'high';
export const PrioEnum = {
Low: 'low' as PrioEnum,
Medium: 'medium' as PrioEnum,
High: 'high' as PrioEnum
};
}



+ 40
- 0
matsen-tool/src/app/core/api/v1/model/taskJsonhal.ts 查看文件

@@ -0,0 +1,40 @@
/**
* Matsen API Platform
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { CommentJsonhalLinks } from './commentJsonhalLinks';


/**
*
*/
export interface TaskJsonhal {
_links?: CommentJsonhalLinks;
headline: string | null;
description: string | null;
readonly createdBy?: string | null;
assignedTo: string | null;
dueAt: string | null;
partner?: string | null;
contact?: string | null;
prio: TaskJsonhal.PrioEnum;
completed?: boolean | null;
readonly createdAt?: string | null;
}
export namespace TaskJsonhal {
export type PrioEnum = 'low' | 'medium' | 'high';
export const PrioEnum = {
Low: 'low' as PrioEnum,
Medium: 'medium' as PrioEnum,
High: 'high' as PrioEnum
};
}



+ 42
- 0
matsen-tool/src/app/core/api/v1/model/taskJsonld.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 { CommentJsonldContext } from './commentJsonldContext';


/**
*
*/
export interface TaskJsonld {
context?: CommentJsonldContext;
readonly id?: string;
readonly type?: string;
headline: string | null;
description: string | null;
readonly createdBy?: string | null;
assignedTo: string | null;
dueAt: string | null;
partner?: string | null;
contact?: string | null;
prio: TaskJsonld.PrioEnum;
completed?: boolean | null;
readonly createdAt?: string | null;
}
export namespace TaskJsonld {
export type PrioEnum = 'low' | 'medium' | 'high';
export const PrioEnum = {
Low: 'low' as PrioEnum,
Medium: 'medium' as PrioEnum,
High: 'high' as PrioEnum
};
}



正在加载...
取消
保存