diff --git a/backend/app/api/static/docs/docs.go b/backend/app/api/static/docs/docs.go index e8c89a1..0fcf591 100644 --- a/backend/app/api/static/docs/docs.go +++ b/backend/app/api/static/docs/docs.go @@ -383,6 +383,60 @@ const docTemplate = `{ } } }, + "/v1/items/fields": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "Items" + ], + "summary": "imports items into the database", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "/v1/items/fields/values": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "Items" + ], + "summary": "imports items into the database", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, "/v1/items/import": { "post": { "security": [ diff --git a/backend/app/api/static/docs/swagger.json b/backend/app/api/static/docs/swagger.json index 499f83f..74bfeaa 100644 --- a/backend/app/api/static/docs/swagger.json +++ b/backend/app/api/static/docs/swagger.json @@ -375,6 +375,60 @@ } } }, + "/v1/items/fields": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "Items" + ], + "summary": "imports items into the database", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "/v1/items/fields/values": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "Items" + ], + "summary": "imports items into the database", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, "/v1/items/import": { "post": { "security": [ diff --git a/backend/app/api/static/docs/swagger.yaml b/backend/app/api/static/docs/swagger.yaml index 1781f32..fc3b9c1 100644 --- a/backend/app/api/static/docs/swagger.yaml +++ b/backend/app/api/static/docs/swagger.yaml @@ -1094,6 +1094,38 @@ paths: summary: Update Maintenance Entry tags: - Maintenance + /v1/items/fields: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + type: string + type: array + security: + - Bearer: [] + summary: imports items into the database + tags: + - Items + /v1/items/fields/values: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + type: string + type: array + security: + - Bearer: [] + summary: imports items into the database + tags: + - Items /v1/items/import: post: parameters: diff --git a/frontend/lib/api/types/data-contracts.ts b/frontend/lib/api/types/data-contracts.ts index b4f688c..e461e89 100644 --- a/frontend/lib/api/types/data-contracts.ts +++ b/frontend/lib/api/types/data-contracts.ts @@ -17,11 +17,11 @@ export interface DocumentOut { } export interface Group { - createdAt: Date; + createdAt: string; currency: string; id: string; name: string; - updatedAt: Date; + updatedAt: string; } export interface GroupStatistics { @@ -39,11 +39,11 @@ export interface GroupUpdate { } export interface ItemAttachment { - createdAt: Date; + createdAt: string; document: DocumentOut; id: string; type: string; - updatedAt: Date; + updatedAt: string; } export interface ItemAttachmentUpdate { @@ -76,7 +76,7 @@ export interface ItemOut { assetId: string; attachments: ItemAttachment[]; children: ItemSummary[]; - createdAt: Date; + createdAt: string; description: string; fields: ItemField[]; id: string; @@ -103,16 +103,16 @@ export interface ItemOut { /** @example "0" */ soldPrice: string; /** Sold */ - soldTime: Date; + soldTime: string; soldTo: string; - updatedAt: Date; + updatedAt: string; warrantyDetails: string; - warrantyExpires: Date; + warrantyExpires: string; } export interface ItemSummary { archived: boolean; - createdAt: Date; + createdAt: string; description: string; id: string; insured: boolean; @@ -123,7 +123,7 @@ export interface ItemSummary { /** @example "0" */ purchasePrice: string; quantity: number; - updatedAt: Date; + updatedAt: string; } export interface ItemUpdate { @@ -156,10 +156,10 @@ export interface ItemUpdate { /** @example "0" */ soldPrice: string; /** Sold */ - soldTime: Date; + soldTime: string; soldTo: string; warrantyDetails: string; - warrantyExpires: Date; + warrantyExpires: string; } export interface LabelCreate { @@ -169,20 +169,20 @@ export interface LabelCreate { } export interface LabelOut { - createdAt: Date; + createdAt: string; description: string; id: string; items: ItemSummary[]; name: string; - updatedAt: Date; + updatedAt: string; } export interface LabelSummary { - createdAt: Date; + createdAt: string; description: string; id: string; name: string; - updatedAt: Date; + updatedAt: string; } export interface LocationCreate { @@ -193,30 +193,30 @@ export interface LocationCreate { export interface LocationOut { children: LocationSummary[]; - createdAt: Date; + createdAt: string; description: string; id: string; items: ItemSummary[]; name: string; parent: LocationSummary; - updatedAt: Date; + updatedAt: string; } export interface LocationOutCount { - createdAt: Date; + createdAt: string; description: string; id: string; itemCount: number; name: string; - updatedAt: Date; + updatedAt: string; } export interface LocationSummary { - createdAt: Date; + createdAt: string; description: string; id: string; name: string; - updatedAt: Date; + updatedAt: string; } export interface LocationUpdate {