diff --git a/src/client.ts b/src/client.ts index 4986dc2..4925232 100644 --- a/src/client.ts +++ b/src/client.ts @@ -23,12 +23,10 @@ export default class Paradym { projectProfile: typeof ProjectProfileService webhooks: typeof WebhooksService templates: { - sdJwtVc: { - credentials: typeof SdJwtVcCredentialTemplatesService - presentations: typeof PresentationTemplatesService - } - anoncreds: { - credentials: typeof AnoncredsCredentialTemplatesService + presentations: typeof PresentationTemplatesService + credentials: { + sdJwtVc: typeof SdJwtVcCredentialTemplatesService + anoncreds: typeof AnoncredsCredentialTemplatesService } } @@ -61,14 +59,13 @@ export default class Paradym { this.webhooks = WebhooksService this.templates = { - sdJwtVc: { - credentials: SdJwtVcCredentialTemplatesService, - presentations: PresentationTemplatesService, - }, - anoncreds: { - credentials: AnoncredsCredentialTemplatesService, + presentations: PresentationTemplatesService, + credentials: { + sdJwtVc: SdJwtVcCredentialTemplatesService, + anoncreds: AnoncredsCredentialTemplatesService, }, } + this.openId4Vc = { issuance: OpenId4VcIssuanceService, verification: OpenId4VcVerificationService, diff --git a/test/credentialTemplate.test.ts b/test/credentialTemplate.test.ts index 97f008e..21319c9 100644 --- a/test/credentialTemplate.test.ts +++ b/test/credentialTemplate.test.ts @@ -7,7 +7,7 @@ dotenv.config() describe('Credential Template', () => { it('should return all SdJwtVc credential templates', async () => { const client = new Paradym({ apiKey: process.env.X_ACCESS_TOKEN as string }) - const sdJwtCredentialTemplates = await client.templates.credentials.getAllSdJwtVcTemplates({ + const sdJwtCredentialTemplates = await client.templates.credentials.sdJwtVc.getAllCredentialTemplates({ projectId: 'clwt6e610000101s69ubga6lk', }) @@ -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.getSdJwtVcTemplate({ + const sdJwtCredentialTemplate = await client.templates.credentials.sdJwtVc.getSdJwtVcTemplate({ projectId: 'clwt6e610000101s69ubga6lk', credentialTemplateId: 'clwyt70o50021yylmethefm27', }) diff --git a/test/presentationTemplate.test.ts b/test/presentationTemplate.test.ts index 2b2aeb2..3a50741 100644 --- a/test/presentationTemplate.test.ts +++ b/test/presentationTemplate.test.ts @@ -7,7 +7,7 @@ dotenv.config() describe('Presentation Template', () => { it('should return all SdJwtVc presentation templates', async () => { const client = new Paradym({ apiKey: process.env.X_ACCESS_TOKEN as string }) - const sdJwtPresentationTemplates = await client.templates.presentations.getAllPresentationTemplatesPaginated({ + const sdJwtPresentationTemplates = await client.templates.presentations.getAllPresentationTemplates({ projectId: 'clwt6e610000101s69ubga6lk', })