IdentityNow SaaS connector Error

Hi Everyone,

I am building a SaaS connector and getting below error:

Type 'SearchDocument | undefined' is not assignable to type 'IdentityDocument | undefined'.
  Type 'AccessProfileDocument' is not assignable to type 'IdentityDocument'.
    Types of property ''synced'' are incompatible.
      Type 'string | null | undefined' is not assignable to type 'string | undefined'.
        Type 'null' is not assignable to type 'string | undefined'

I have one method which will return SearchDocument | undefined

InowClient.getIdentityAttributeByAdLogin(adLogin: string, employee_id: string, excludeTermed?: boolean): Promise<SearchDocument | undefined>

the above method being called in index.ts file and storing it in below:

const oldSomIdentity: IdentityDocument | undefined

This code worked previously but not sure why it is now throwing error.

Please suggest!

Maybe I’m misunderstanding, but wouldn’t calling a function that returns one type of object (SearchDocument) and attempting to assign it to an object of a different type (IdentityDocument) cause this issue?

thanks @mcheek for your response.

The above issue is resolved there was some incorrect code uncommented.

I have one query, what if I do not have a code package that we pack-zip and upload to the connector? can we download the package from anywhere else in IDN? Is there any possibility?

There is an existing connector for which I do not have code package, I want to enhance the existing connector code.