From 7233fdc4e296dfbb0878632e889e021a4a37064a Mon Sep 17 00:00:00 2001 From: Tom Lebreux Date: Wed, 20 Nov 2024 09:01:03 -0500 Subject: [PATCH] Remove a bunch few more operations (#5) * Remove deleteStack * Remove updateStack * Remove createTag * Remote deleteTag * Remove upsertTags * Remove updateTag --- open-api/immich-openapi-specs.json | 249 -------------------- open-api/typescript-sdk/src/fetch-client.ts | 80 ------- 2 files changed, 329 deletions(-) diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json index a516e22..e5f0def 100644 --- a/open-api/immich-openapi-specs.json +++ b/open-api/immich-openapi-specs.json @@ -649,39 +649,6 @@ } }, "/stacks/{id}": { - "delete": { - "operationId": "deleteStack", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "format": "uuid", - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "" - } - }, - "security": [ - { - "bearer": [] - }, - { - "cookie": [] - }, - { - "api_key": [] - } - ], - "tags": [ - "Stacks" - ] - }, "get": { "operationId": "getStack", "parameters": [ @@ -721,56 +688,6 @@ "tags": [ "Stacks" ] - }, - "put": { - "operationId": "updateStack", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "format": "uuid", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StackUpdateDto" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StackResponseDto" - } - } - }, - "description": "" - } - }, - "security": [ - { - "bearer": [] - }, - { - "cookie": [] - }, - { - "api_key": [] - } - ], - "tags": [ - "Stacks" - ] } }, "/tags": { @@ -806,125 +723,9 @@ "tags": [ "Tags" ] - }, - "post": { - "operationId": "createTag", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TagCreateDto" - } - } - }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TagResponseDto" - } - } - }, - "description": "" - } - }, - "security": [ - { - "bearer": [] - }, - { - "cookie": [] - }, - { - "api_key": [] - } - ], - "tags": [ - "Tags" - ] - }, - "put": { - "operationId": "upsertTags", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TagUpsertDto" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/TagResponseDto" - }, - "type": "array" - } - } - }, - "description": "" - } - }, - "security": [ - { - "bearer": [] - }, - { - "cookie": [] - }, - { - "api_key": [] - } - ], - "tags": [ - "Tags" - ] } }, "/tags/{id}": { - "delete": { - "operationId": "deleteTag", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "format": "uuid", - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "" - } - }, - "security": [ - { - "bearer": [] - }, - { - "cookie": [] - }, - { - "api_key": [] - } - ], - "tags": [ - "Tags" - ] - }, "get": { "operationId": "getTagById", "parameters": [ @@ -964,56 +765,6 @@ "tags": [ "Tags" ] - }, - "put": { - "operationId": "updateTag", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "format": "uuid", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TagUpdateDto" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TagResponseDto" - } - } - }, - "description": "" - } - }, - "security": [ - { - "bearer": [] - }, - { - "cookie": [] - }, - { - "api_key": [] - } - ], - "tags": [ - "Tags" - ] } }, "/timeline/bucket": { diff --git a/open-api/typescript-sdk/src/fetch-client.ts b/open-api/typescript-sdk/src/fetch-client.ts index 97c3c7b..cae66c5 100644 --- a/open-api/typescript-sdk/src/fetch-client.ts +++ b/open-api/typescript-sdk/src/fetch-client.ts @@ -197,20 +197,6 @@ export type StackResponseDto = { id: string; primaryAssetId: string; }; -export type StackUpdateDto = { - primaryAssetId?: string; -}; -export type TagCreateDto = { - color?: string; - name: string; - parentId?: string | null; -}; -export type TagUpsertDto = { - tags: string[]; -}; -export type TagUpdateDto = { - color?: string | null; -}; export type TimeBucketResponseDto = { count: number; timeBucket: string; @@ -390,14 +376,6 @@ export function searchStacks({ primaryAssetId }: { ...opts })); } -export function deleteStack({ id }: { - id: string; -}, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchText(`/stacks/${encodeURIComponent(id)}`, { - ...opts, - method: "DELETE" - })); -} export function getStack({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -408,19 +386,6 @@ export function getStack({ id }: { ...opts })); } -export function updateStack({ id, stackUpdateDto }: { - id: string; - stackUpdateDto: StackUpdateDto; -}, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: StackResponseDto; - }>(`/stacks/${encodeURIComponent(id)}`, oazapfts.json({ - ...opts, - method: "PUT", - body: stackUpdateDto - }))); -} export function getAllTags(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -429,38 +394,6 @@ export function getAllTags(opts?: Oazapfts.RequestOpts) { ...opts })); } -export function createTag({ tagCreateDto }: { - tagCreateDto: TagCreateDto; -}, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: TagResponseDto; - }>("/tags", oazapfts.json({ - ...opts, - method: "POST", - body: tagCreateDto - }))); -} -export function upsertTags({ tagUpsertDto }: { - tagUpsertDto: TagUpsertDto; -}, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: TagResponseDto[]; - }>("/tags", oazapfts.json({ - ...opts, - method: "PUT", - body: tagUpsertDto - }))); -} -export function deleteTag({ id }: { - id: string; -}, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchText(`/tags/${encodeURIComponent(id)}`, { - ...opts, - method: "DELETE" - })); -} export function getTagById({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -471,19 +404,6 @@ export function getTagById({ id }: { ...opts })); } -export function updateTag({ id, tagUpdateDto }: { - id: string; - tagUpdateDto: TagUpdateDto; -}, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: TagResponseDto; - }>(`/tags/${encodeURIComponent(id)}`, oazapfts.json({ - ...opts, - method: "PUT", - body: tagUpdateDto - }))); -} export function getTimeBucket({ albumId, isArchived, isFavorite, isTrashed, key, order, personId, size, tagId, timeBucket, userId, withPartners, withStacked }: { albumId?: string; isArchived?: boolean;