Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix type conflicts #18

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './src/client'
12 changes: 12 additions & 0 deletions openapi-ts.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
}

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
30 changes: 8 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion test/credentialTemplate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
})
Expand Down
2 changes: 1 addition & 1 deletion test/issuanceSession.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
})

Expand Down
2 changes: 1 addition & 1 deletion test/verificationSession.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
})

Expand Down