From 642bb761a1c766b356dc337d60ae10e32b2dc631 Mon Sep 17 00:00:00 2001 From: Ilias Elbarnoussi <90471760+IliasElbarnoussi@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:37:42 +0200 Subject: [PATCH] fix type conflicts (#18) * fix type conflicts Signed-off-by: Ilias Elbarnoussi * fix styling Signed-off-by: Ilias Elbarnoussi --------- Signed-off-by: Ilias Elbarnoussi Co-authored-by: Ilias Elbarnoussi --- index.ts | 1 + openapi-ts.config.ts | 12 ++++++++++++ package.json | 4 +++- pnpm-lock.yaml | 30 ++++++++---------------------- src/index.ts | 1 - test/credentialTemplate.test.ts | 2 +- test/issuanceSession.test.ts | 2 +- test/verificationSession.test.ts | 2 +- 8 files changed, 27 insertions(+), 27 deletions(-) create mode 100644 index.ts delete mode 100644 src/index.ts diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..9c0858e --- /dev/null +++ b/index.ts @@ -0,0 +1 @@ +export * from './src/client' diff --git a/openapi-ts.config.ts b/openapi-ts.config.ts index ae67f71..2671382 100644 --- a/openapi-ts.config.ts +++ b/openapi-ts.config.ts @@ -16,6 +16,18 @@ const config: UserConfig = { output: 'generated', services: { asClass: true, + methodNameBuilder(service, operationId) { + const lowerService = service.toLowerCase() + const lowerOperationId = operationId.toLowerCase() + + let methodName = operationId + if (lowerOperationId.startsWith(lowerService)) { + methodName = operationId.slice(service.length) + } + + return methodName.charAt(0).toLowerCase() + methodName.slice(1) + }, + operationId: true, }, } diff --git a/package.json b/package.json index c1fd9d6..296b5d8 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,8 @@ "name": "@paradym/sdk", "version": "0.0.0", "type": "module", + "main": "build/index.js", + "types": "build/index.d.ts", "license": "Apache-2.0", "private": false, "publishConfig": { @@ -21,7 +23,7 @@ }, "devDependencies": { "@biomejs/biome": "1.7.3", - "@hey-api/openapi-ts": "^0.46.3", + "@hey-api/openapi-ts": "^0.47.0", "@types/node": "^20.12.6", "dotenv": "^16.4.5", "release-it": "^17.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ed8ce53..48fa077 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,8 +14,8 @@ devDependencies: specifier: 1.7.3 version: 1.7.3 '@hey-api/openapi-ts': - specifier: ^0.46.3 - version: 0.46.3(typescript@5.4.5) + specifier: ^0.47.0 + version: 0.47.0(typescript@5.4.5) '@types/node': specifier: ^20.12.6 version: 20.12.6 @@ -34,8 +34,8 @@ devDependencies: packages: - /@apidevtools/json-schema-ref-parser@11.6.2: - resolution: {integrity: sha512-ENUdLLT04aDbbHCRwfKf8gR67AhV0CdFrOAtk+FcakBAgaq6ds3HLK9X0BCyiFUz8pK9uP+k6YZyJaGG7Mt7vQ==} + /@apidevtools/json-schema-ref-parser@11.6.4: + resolution: {integrity: sha512-9K6xOqeevacvweLGik6LnZCb1fBtCOSIWQs8d096XGeqoLKC33UVMGz9+77Gw44KvbH4pKcQPWo4ZpxkXYj05w==} engines: {node: '>= 16'} dependencies: '@jsdevtools/ono': 7.1.3 @@ -361,14 +361,14 @@ packages: dev: true optional: true - /@hey-api/openapi-ts@0.46.3(typescript@5.4.5): - resolution: {integrity: sha512-2C0tmzUq6m9518uDMHBooqiS7wvWy9UD6SepudWU+9fB6lZvC+yxbK/viaMfwvCv4l1hKuBZZZQNP0xrNcyRsQ==} + /@hey-api/openapi-ts@0.47.0(typescript@5.4.5): + resolution: {integrity: sha512-dppZcULGVkTBNT4FrRRIPYS5oo1lHMkp0P6/qqW0A1tP+l5jXwkOlyeahJs6Kq0mbyoYmv2gK8BKbvDq/3yyNQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: typescript: ^5.x dependencies: - '@apidevtools/json-schema-ref-parser': 11.6.2 + '@apidevtools/json-schema-ref-parser': 11.6.4 c12: 1.10.0 camelcase: 8.0.0 commander: 12.1.0 @@ -755,13 +755,6 @@ packages: concat-map: 0.0.1 dev: true - /braces@3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - dependencies: - fill-range: 7.0.1 - dev: true - /braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -875,7 +868,7 @@ packages: engines: {node: '>= 8.10.0'} dependencies: anymatch: 3.1.3 - braces: 3.0.2 + braces: 3.0.3 glob-parent: 5.1.2 is-binary-path: 2.1.0 is-glob: 4.0.3 @@ -1432,13 +1425,6 @@ packages: web-streams-polyfill: 3.3.3 dev: true - /fill-range@7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} - dependencies: - to-regex-range: 5.0.1 - dev: true - /fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index 83dae76..0000000 --- a/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './client' diff --git a/test/credentialTemplate.test.ts b/test/credentialTemplate.test.ts index 21319c9..6436df9 100644 --- a/test/credentialTemplate.test.ts +++ b/test/credentialTemplate.test.ts @@ -17,7 +17,7 @@ describe('Credential Template', () => { it('should return a SdJwtVc credential template', async () => { const client = new Paradym({ apiKey: process.env.X_ACCESS_TOKEN as string }) - const sdJwtCredentialTemplate = await client.templates.credentials.sdJwtVc.getSdJwtVcTemplate({ + const sdJwtCredentialTemplate = await client.templates.credentials.sdJwtVc.getCredentialTemplate({ projectId: 'clwt6e610000101s69ubga6lk', credentialTemplateId: 'clwyt70o50021yylmethefm27', }) diff --git a/test/issuanceSession.test.ts b/test/issuanceSession.test.ts index 24c5d3f..b181622 100644 --- a/test/issuanceSession.test.ts +++ b/test/issuanceSession.test.ts @@ -7,7 +7,7 @@ dotenv.config() describe('Issuance Session', () => { it('should return all issuance sessions', async () => { const client = new Paradym({ apiKey: process.env.X_ACCESS_TOKEN as string }) - const issuanceSessions = await client.openId4Vc.issuance.getAllOpenId4VcIssuanceSessions({ + const issuanceSessions = await client.openId4Vc.issuance.getAllIssuanceSessions({ projectId: 'clwt6e610000101s69ubga6lk', }) diff --git a/test/verificationSession.test.ts b/test/verificationSession.test.ts index 640e0de..0ebf18e 100644 --- a/test/verificationSession.test.ts +++ b/test/verificationSession.test.ts @@ -7,7 +7,7 @@ dotenv.config() describe('Verification Session', () => { it('should return all issuance sessions', async () => { const client = new Paradym({ apiKey: process.env.X_ACCESS_TOKEN as string }) - const verificationSessions = await client.openId4Vc.verification.getAllOpenId4VcVerificationSessions({ + const verificationSessions = await client.openId4Vc.verification.getAllVerificationSessions({ projectId: 'clwt6e610000101s69ubga6lk', })