From 30b4f16f95d4b2dcab3a8817b78cc1a8299edd2b Mon Sep 17 00:00:00 2001 From: Eren Date: Wed, 25 Dec 2024 09:17:27 +0300 Subject: [PATCH] chore: add missing actions to identity --- apps/web/package.json | 2 +- apps/web/src/actions/api-requests.ts | 23 --- .../actions/core/IdentityService/actions.ts | 16 +- packages/ayasofyazilim-ui | 2 +- packages/ui/package.json | 2 +- pnpm-lock.yaml | 168 ++++++++++++++---- 6 files changed, 151 insertions(+), 62 deletions(-) diff --git a/apps/web/package.json b/apps/web/package.json index d9004b201..b2dbea63f 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -26,7 +26,7 @@ }, "dependencies": { "@auth/core": "^0.30.0", - "@ayasofyazilim/saas": "0.0.90", + "@ayasofyazilim/saas": "0.0.95", "@formatjs/intl-localematcher": "^0.5.4", "@radix-ui/react-icons": "^1.3.0", "@repo/ayasofyazilim-ui": "workspace:^", diff --git a/apps/web/src/actions/api-requests.ts b/apps/web/src/actions/api-requests.ts index ca824c52c..d42aaf403 100644 --- a/apps/web/src/actions/api-requests.ts +++ b/apps/web/src/actions/api-requests.ts @@ -68,11 +68,6 @@ import type { PostApiExportValidationServiceExportValidationData, PutApiExportValidationServiceExportValidationByIdData, } from "@ayasofyazilim/saas/ExportValidationService"; -import type { - GetApiFinanceServiceBillingsData, - PostApiFinanceServiceBillingsData, - PutApiFinanceServiceBillingsByIdData, -} from "@ayasofyazilim/saas/FinanceService"; import type { GetApiIdentityClaimTypesData, GetApiIdentityRolesByIdClaimsData, @@ -116,7 +111,6 @@ import { getContractServiceClient, getCRMServiceClient, getExportValidationServiceClient, - getFinanceServiceClient, getIdentityServiceClient, getLocationServiceClient, getRefundServiceClient, @@ -180,7 +174,6 @@ export async function getApiRequests() { const exportValidationClient = await getExportValidationServiceClient(session); const tagClient = await getTagServiceClient(session); - const financeClient = await getFinanceServiceClient(session); const refundClient = await getRefundServiceClient(session); const administrationClient = await getAdministrationServiceClient(session); const tableRequests = { @@ -896,22 +889,6 @@ export async function getApiRequests() { get: async (data: GetApiTagServiceTagData) => await tagClient.tag.getApiTagServiceTag(data), }, - billing: { - get: async (data: GetApiFinanceServiceBillingsData) => - await financeClient.billing.getApiFinanceServiceBillings(data), - getDetail: async (id: string) => - await financeClient.billing.getApiFinanceServiceBillingsById({ - id, - }), - post: async (data: PostApiFinanceServiceBillingsData) => - await financeClient.billing.postApiFinanceServiceBillings(data), - put: async (data: PutApiFinanceServiceBillingsByIdData) => - await financeClient.billing.putApiFinanceServiceBillingsById(data), - deleteRow: async (id: string) => - await financeClient.billing.deleteApiFinanceServiceBillings({ - id, - }), - }, applications: { getTokenLifetime: async ( data: GetApiOpeniddictApplicationsByIdTokenLifetimeData, diff --git a/apps/web/src/actions/core/IdentityService/actions.ts b/apps/web/src/actions/core/IdentityService/actions.ts index 21185f4ae..7b4480784 100644 --- a/apps/web/src/actions/core/IdentityService/actions.ts +++ b/apps/web/src/actions/core/IdentityService/actions.ts @@ -148,15 +148,25 @@ export async function deleteUserSessionsApi(id: string) { } } -export async function getAssignableRolesApi(id: string) { +export async function getAssignableRolesApi(roleId: string) { try { const client = await getIdentityServiceClient(); const dataResponse = - await client.assignableRole.getApiIdentityAssignableRolesAllRolesWithAssignableById( - { id }, + await client.assignableRole.getApiIdentityAssignableRolesAllRolesWithAssignableByRoleId( + { roleId }, ); return structuredResponse(dataResponse); } catch (error) { return structuredError(error); } } +export async function getAssignableRolesByCurrentUserApi() { + try { + const client = await getIdentityServiceClient(); + const dataResponse = + await client.role.getApiIdentityRolesAssignableRolesByCurrentUser(); + return structuredResponse(dataResponse); + } catch (error) { + return structuredError(error); + } +} diff --git a/packages/ayasofyazilim-ui b/packages/ayasofyazilim-ui index 39a09dbbe..06f1b4c8f 160000 --- a/packages/ayasofyazilim-ui +++ b/packages/ayasofyazilim-ui @@ -1 +1 @@ -Subproject commit 39a09dbbec0a36e4f8f2a39c032861f0bc68dcbc +Subproject commit 06f1b4c8fac60af68dd58e69976593e4e1eeb70f diff --git a/packages/ui/package.json b/packages/ui/package.json index b9b141255..33d30095b 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -13,7 +13,7 @@ "type-check": "tsc --noEmit" }, "peerDependencies": { - "@ayasofyazilim/saas": "0.0.87", + "@ayasofyazilim/saas": "0.0.95", "@repo/ayasofyazilim-ui": "workspace:*", "next": "14.1.1", "react": "18.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ee5051314..609cb85c3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -40,8 +40,8 @@ importers: specifier: ^0.30.0 version: 0.30.0 '@ayasofyazilim/saas': - specifier: 0.0.90 - version: 0.0.90(openapi-types@12.1.3) + specifier: 0.0.95 + version: 0.0.95(openapi-types@12.1.3) '@formatjs/intl-localematcher': specifier: ^0.5.4 version: 0.5.4 @@ -135,7 +135,7 @@ importers: version: 8.4.35 tailwindcss: specifier: 3.4.1 - version: 3.4.1(ts-node@10.9.2(typescript@5.3.3)) + version: 3.4.1(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@20.11.24)(typescript@5.3.3)) typescript: specifier: 5.3.3 version: 5.3.3 @@ -664,15 +664,15 @@ importers: version: link:../config-typescript tailwindcss: specifier: ^3.4.1 - version: 3.4.1(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@20.11.25)(typescript@5.6.2)) + version: 3.4.1(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@22.5.5)(typescript@5.7.2)) packages/config-typescript: {} packages/ui: dependencies: '@ayasofyazilim/saas': - specifier: 0.0.87 - version: 0.0.87(openapi-types@12.1.3) + specifier: 0.0.95 + version: 0.0.95(openapi-types@12.1.3) '@dnd-kit/core': specifier: ^6.1.0 version: 6.1.0(react-dom@18.3.0(react@18.3.0))(react@18.3.0) @@ -745,7 +745,7 @@ importers: version: 2.2.2 tailwindcss: specifier: 3.4.1 - version: 3.4.1(ts-node@10.9.2(typescript@5.3.3)) + version: 3.4.1(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@22.5.5)(typescript@5.3.3)) typescript: specifier: 5.3.3 version: 5.3.3 @@ -810,12 +810,8 @@ packages: nodemailer: optional: true - '@ayasofyazilim/saas@0.0.87': - resolution: {integrity: sha512-JbIpL5eoSOWqCoXvuc4WXoq7PKaIEC30p0d+Ue1r1XX8TdMzPyhCd/Y0D65ETN1kPaQAaC2Sft6vFR7rzUL1uw==} - hasBin: true - - '@ayasofyazilim/saas@0.0.90': - resolution: {integrity: sha512-HVIij7QXikZfbzq2wYlO9E7KTmw/YWnW7zmJXfRD6Qb0D+sLFTuEKo5VBxG6GpW46hMQQdNbR1T0zXDAbuFH7g==} + '@ayasofyazilim/saas@0.0.95': + resolution: {integrity: sha512-EQWTVr3OFcmJe+L6dOBBW+a/6kCR4PMgnsBEmkAhvpwn8Lz8Ht2AZhM0tPaSnfZK/zOzQ+O8Kwx2KWuBeMlDbQ==} hasBin: true '@babel/code-frame@7.24.7': @@ -9681,15 +9677,7 @@ snapshots: preact: 10.11.3 preact-render-to-string: 5.2.3(preact@10.11.3) - '@ayasofyazilim/saas@0.0.87(openapi-types@12.1.3)': - dependencies: - '@apidevtools/swagger-parser': 10.1.0(openapi-types@12.1.3) - '@hey-api/openapi-ts': 0.45.1(typescript@5.7.2) - typescript: 5.7.2 - transitivePeerDependencies: - - openapi-types - - '@ayasofyazilim/saas@0.0.90(openapi-types@12.1.3)': + '@ayasofyazilim/saas@0.0.95(openapi-types@12.1.3)': dependencies: '@apidevtools/swagger-parser': 10.1.0(openapi-types@12.1.3) '@hey-api/openapi-ts': 0.45.1(typescript@5.7.2) @@ -13448,7 +13436,7 @@ snapshots: '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint@8.57.0)(typescript@5.7.2) '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.7.2) eslint-config-prettier: 9.1.0(eslint@8.57.0) - eslint-import-resolver-alias: 1.1.2(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0)) + eslint-import-resolver-alias: 1.1.2(eslint-plugin-import@2.30.0) eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-plugin-import@2.30.0)(eslint@8.57.0) eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.0) eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0) @@ -15085,7 +15073,7 @@ snapshots: eslint: 8.57.0 eslint-plugin-turbo: 2.1.2(eslint@8.57.0) - eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0)): + eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.30.0): dependencies: eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0) @@ -15103,7 +15091,7 @@ snapshots: debug: 4.3.7 enhanced-resolve: 5.17.1 eslint: 8.57.0 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-plugin-import@2.30.0)(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.8.1 is-bun-module: 1.2.1 @@ -15116,7 +15104,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-plugin-import@2.30.0)(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: @@ -15154,7 +15142,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-plugin-import@2.30.0)(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -17391,6 +17379,14 @@ snapshots: camelcase-css: 2.0.1 postcss: 8.4.47 + postcss-load-config@4.0.2(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@20.11.24)(typescript@5.3.3)): + dependencies: + lilconfig: 3.1.2 + yaml: 2.5.1 + optionalDependencies: + postcss: 8.4.47 + ts-node: 10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@20.11.24)(typescript@5.3.3) + postcss-load-config@4.0.2(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@20.11.25)(typescript@5.6.2)): dependencies: lilconfig: 3.1.2 @@ -17399,13 +17395,21 @@ snapshots: postcss: 8.4.47 ts-node: 10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@20.11.25)(typescript@5.6.2) - postcss-load-config@4.0.2(postcss@8.4.47)(ts-node@10.9.2(typescript@5.3.3)): + postcss-load-config@4.0.2(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@22.5.5)(typescript@5.3.3)): + dependencies: + lilconfig: 3.1.2 + yaml: 2.5.1 + optionalDependencies: + postcss: 8.4.47 + ts-node: 10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@22.5.5)(typescript@5.3.3) + + postcss-load-config@4.0.2(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@22.5.5)(typescript@5.7.2)): dependencies: lilconfig: 3.1.2 yaml: 2.5.1 optionalDependencies: postcss: 8.4.47 - ts-node: 10.9.2(@types/node@20.11.24)(typescript@5.3.3) + ts-node: 10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@22.5.5)(typescript@5.7.2) postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1): dependencies: @@ -18673,6 +18677,33 @@ snapshots: dependencies: tailwindcss: 3.4.1(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@20.11.25)(typescript@5.6.2)) + tailwindcss@3.4.1(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@20.11.24)(typescript@5.3.3)): + dependencies: + '@alloc/quick-lru': 5.2.0 + arg: 5.0.2 + chokidar: 3.6.0 + didyoumean: 1.2.2 + dlv: 1.1.3 + fast-glob: 3.3.2 + glob-parent: 6.0.2 + is-glob: 4.0.3 + jiti: 1.21.6 + lilconfig: 2.1.0 + micromatch: 4.0.8 + normalize-path: 3.0.0 + object-hash: 3.0.0 + picocolors: 1.1.0 + postcss: 8.4.47 + postcss-import: 15.1.0(postcss@8.4.47) + postcss-js: 4.0.1(postcss@8.4.47) + postcss-load-config: 4.0.2(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@20.11.24)(typescript@5.3.3)) + postcss-nested: 6.2.0(postcss@8.4.47) + postcss-selector-parser: 6.1.2 + resolve: 1.22.8 + sucrase: 3.35.0 + transitivePeerDependencies: + - ts-node + tailwindcss@3.4.1(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@20.11.25)(typescript@5.6.2)): dependencies: '@alloc/quick-lru': 5.2.0 @@ -18700,7 +18731,34 @@ snapshots: transitivePeerDependencies: - ts-node - tailwindcss@3.4.1(ts-node@10.9.2(typescript@5.3.3)): + tailwindcss@3.4.1(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@22.5.5)(typescript@5.3.3)): + dependencies: + '@alloc/quick-lru': 5.2.0 + arg: 5.0.2 + chokidar: 3.6.0 + didyoumean: 1.2.2 + dlv: 1.1.3 + fast-glob: 3.3.2 + glob-parent: 6.0.2 + is-glob: 4.0.3 + jiti: 1.21.6 + lilconfig: 2.1.0 + micromatch: 4.0.8 + normalize-path: 3.0.0 + object-hash: 3.0.0 + picocolors: 1.1.0 + postcss: 8.4.47 + postcss-import: 15.1.0(postcss@8.4.47) + postcss-js: 4.0.1(postcss@8.4.47) + postcss-load-config: 4.0.2(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@22.5.5)(typescript@5.3.3)) + postcss-nested: 6.2.0(postcss@8.4.47) + postcss-selector-parser: 6.1.2 + resolve: 1.22.8 + sucrase: 3.35.0 + transitivePeerDependencies: + - ts-node + + tailwindcss@3.4.1(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@22.5.5)(typescript@5.7.2)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -18719,7 +18777,7 @@ snapshots: postcss: 8.4.47 postcss-import: 15.1.0(postcss@8.4.47) postcss-js: 4.0.1(postcss@8.4.47) - postcss-load-config: 4.0.2(postcss@8.4.47)(ts-node@10.9.2(typescript@5.3.3)) + postcss-load-config: 4.0.2(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@22.5.5)(typescript@5.7.2)) postcss-nested: 6.2.0(postcss@8.4.47) postcss-selector-parser: 6.1.2 resolve: 1.22.8 @@ -18840,6 +18898,27 @@ snapshots: ts-interface-checker@0.1.13: {} + ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@20.11.24)(typescript@5.3.3): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.11.24 + acorn: 8.12.1 + acorn-walk: 8.3.4 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.3.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + optionalDependencies: + '@swc/core': 1.7.26(@swc/helpers@0.5.5) + optional: true + ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@20.11.25)(typescript@5.6.2): dependencies: '@cspotcode/source-map-support': 0.8.1 @@ -18860,14 +18939,14 @@ snapshots: optionalDependencies: '@swc/core': 1.7.26(@swc/helpers@0.5.5) - ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3): + ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@22.5.5)(typescript@5.3.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.11.24 + '@types/node': 22.5.5 acorn: 8.12.1 acorn-walk: 8.3.4 arg: 4.1.3 @@ -18877,6 +18956,29 @@ snapshots: typescript: 5.3.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + optionalDependencies: + '@swc/core': 1.7.26(@swc/helpers@0.5.5) + optional: true + + ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.5))(@types/node@22.5.5)(typescript@5.7.2): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 22.5.5 + acorn: 8.12.1 + acorn-walk: 8.3.4 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.7.2 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + optionalDependencies: + '@swc/core': 1.7.26(@swc/helpers@0.5.5) optional: true ts-pnp@1.2.0(typescript@5.6.2):