diff --git a/packages/connections/package.json b/packages/connections/package.json index 3404a34..2078230 100644 --- a/packages/connections/package.json +++ b/packages/connections/package.json @@ -1,6 +1,6 @@ { "name": "@integrationos/authkit-node", - "version": "1.2.0", + "version": "1.2.2", "description": "Secure token generation for IntegrationOS AuthKit", "main": "dist/index.js", "scripts": { diff --git a/packages/connections/src/apis/link.api.ts b/packages/connections/src/apis/link.api.ts index 42bd241..54ec76f 100644 --- a/packages/connections/src/apis/link.api.ts +++ b/packages/connections/src/apis/link.api.ts @@ -28,8 +28,8 @@ export const generateId = async (prefix: string) => { export const createEventLinkTokenApi = async ( headers: Record, url: string, - payload: CreateEventLinkPayload, - secret: string + secret: string, + payload?: CreateEventLinkPayload, ) => { try { const settings = await axios.post( diff --git a/packages/connections/src/client/index.ts b/packages/connections/src/client/index.ts index 140052a..47030b0 100644 --- a/packages/connections/src/client/index.ts +++ b/packages/connections/src/client/index.ts @@ -32,7 +32,7 @@ export class AuthKitToken { return 'https://api.integrationos.com/internal'; } - async create(payload: { + async create(payload?: { ttl?: number; /** * Unique identifier for the token. @@ -49,7 +49,7 @@ export class AuthKitToken { const url = this._url; const headers = getHeaders(secret); - const result = await createEventLinkTokenApi(headers, url, payload, secret); + const result = await createEventLinkTokenApi(headers, url, secret, payload); return result; } }