Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  JavaScript PSDK 258.1.0 has bugs in index.d.ts

    Posted 11 hours ago

    Hello,

    I tried to update our libraries for our integrations from PSDK 258.0.0 to PSDK 258.1.0 - and encountered lots of compilation errors for code in the PSDK


    ✘ [ERROR] TS2300: Duplicate identifier 'target'. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:83:1:
          83 │   target?: string;
             ╵   ~~~~~~


    ✘ [ERROR] TS1005: ';' expected. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:129:43:
          129 │ ...ridePopupUrlParameters?: [key: string]: string | number | object;
              ╵                                          ^


    ✘ [ERROR] TS1005: ';' expected. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:129:43:
          129 │ ...ridePopupUrlParameters?: [key: string]: string | number | object;
              ╵                                          ^


    ✘ [ERROR] TS1131: Property or signature expected. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:129:45:
          129 │ ...ridePopupUrlParameters?: [key: string]: string | number | object;
              ╵                                            ~~~~~~


    ✘ [ERROR] TS1131: Property or signature expected. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:129:45:
          129 │ ...ridePopupUrlParameters?: [key: string]: string | number | object;
              ╵                                            ~~~~~~


    ✘ [ERROR] TS2693: 'string' only refers to a type, but is being used as a value here. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:129:45:
          129 │ ...ridePopupUrlParameters?: [key: string]: string | number | object;
              ╵                                            ~~~~~~


    ✘ [ERROR] TS2693: 'number' only refers to a type, but is being used as a value here. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:129:54:
          129 │ ...ridePopupUrlParameters?: [key: string]: string | number | object;
              ╵                                                     ~~~~~~


    ✘ [ERROR] TS2552: Cannot find name 'object'. Did you mean 'Object'? [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:129:63:
          129 │ ...ridePopupUrlParameters?: [key: string]: string | number | object;
              ╵                                                              ~~~~~~

      'Object' is declared here.

        node_modules/typescript/lib/lib.es5.d.ts:270:12:
          270 │ declare var Object: ObjectConstructor;
              ╵             ~~~~~~


    ✘ [ERROR] TS2304: Cannot find name 'overridePopupUrlAuthParameters'. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:130:1:
          130 │   overridePopupUrlAuthParameters?: boolean;
              ╵   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


    ✘ [ERROR] TS1109: Expression expected. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:130:32:
          130 │   overridePopupUrlAuthParameters?: boolean;
              ╵                                  ^


    ✘ [ERROR] TS1109: Expression expected. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:130:32:
          130 │   overridePopupUrlAuthParameters?: boolean;
              ╵                                  ^


    ✘ [ERROR] TS2693: 'boolean' only refers to a type, but is being used as a value here. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:130:34:
          130 │   overridePopupUrlAuthParameters?: boolean;
              ╵                                    ~~~~~~~


    ✘ [ERROR] TS2304: Cannot find name 'useWindowReplace'. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:131:1:
          131 │   useWindowReplace?: boolean;
              ╵   ~~~~~~~~~~~~~~~~


    ✘ [ERROR] TS1109: Expression expected. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:131:18:
          131 │   useWindowReplace?: boolean;
              ╵                    ^


    ✘ [ERROR] TS1109: Expression expected. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:131:18:
          131 │   useWindowReplace?: boolean;
              ╵                    ^


    ✘ [ERROR] TS2693: 'boolean' only refers to a type, but is being used as a value here. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:131:20:
          131 │   useWindowReplace?: boolean;
              ╵                      ~~~~~~~


    ✘ [ERROR] TS2304: Cannot find name 'overrideWindowReplaceUri'. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:132:1:
          132 │   overrideWindowReplaceUri?: string;
              ╵   ~~~~~~~~~~~~~~~~~~~~~~~~


    ✘ [ERROR] TS1109: Expression expected. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:132:26:
          132 │   overrideWindowReplaceUri?: string;
              ╵                            ^


    ✘ [ERROR] TS1109: Expression expected. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:132:26:
          132 │   overrideWindowReplaceUri?: string;
              ╵                            ^


    ✘ [ERROR] TS2693: 'string' only refers to a type, but is being used as a value here. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:132:28:
          132 │   overrideWindowReplaceUri?: string;
              ╵                              ~~~~~~


    ✘ [ERROR] TS2304: Cannot find name 'waitForLoginPromise'. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:133:1:
          133 │   waitForLoginPromise?: boolean;
              ╵   ~~~~~~~~~~~~~~~~~~~


    ✘ [ERROR] TS1109: Expression expected. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:133:21:
          133 │   waitForLoginPromise?: boolean;
              ╵                       ^


    ✘ [ERROR] TS1109: Expression expected. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:133:21:
          133 │   waitForLoginPromise?: boolean;
              ╵                       ^


    ✘ [ERROR] TS2693: 'boolean' only refers to a type, but is being used as a value here. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:133:23:
          133 │   waitForLoginPromise?: boolean;
              ╵                         ~~~~~~~


    ✘ [ERROR] TS2304: Cannot find name 'usePopupIdentifier'. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:134:1:
          134 │   usePopupIdentifier?: boolean;
              ╵   ~~~~~~~~~~~~~~~~~~


    ✘ [ERROR] TS1109: Expression expected. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:134:20:
          134 │   usePopupIdentifier?: boolean;
              ╵                      ^


    ✘ [ERROR] TS1109: Expression expected. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:134:20:
          134 │   usePopupIdentifier?: boolean;
              ╵                      ^


    ✘ [ERROR] TS2693: 'boolean' only refers to a type, but is being used as a value here. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:134:22:
          134 │   usePopupIdentifier?: boolean;
              ╵                        ~~~~~~~


    ✘ [ERROR] TS1128: Declaration or statement expected. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:135:0:
          135 │ }
              ╵ ^


    ✘ [ERROR] TS1128: Declaration or statement expected. [plugin angular-compiler]

        node_modules/purecloud-platform-client-v2/index.d.ts:135:0:
          135 │ }

    I verified for example the first error message - this TypeScript interface (LoginImplicitGrantOptions) really has two members named target - which is of course forbidden.

    This needs a quick fix...

    Regards,

    Wolfgang Liebich


    #Integrations
    #PlatformSDK

    ------------------------------
    Wolfgang Liebich
    ------------------------------


  • 2.  RE: JavaScript PSDK 258.1.0 has bugs in index.d.ts

    Posted 8 hours ago

    Thanks for the report. Could you please try with version 258.2.0?

    Regards,



    ------------------------------
    Jerome Saint-Marc
    Senior Development Support Engineer
    ------------------------------



  • 3.  RE: JavaScript PSDK 258.1.0 has bugs in index.d.ts

    Posted 7 hours ago

    Hi,

    with this Version I could compile everything, so that looks better.



    ------------------------------
    Wolfgang Liebich
    ------------------------------



  • 4.  RE: JavaScript PSDK 258.1.0 has bugs in index.d.ts

    Posted 8 hours ago

    Hello,

    Thank you for bringing this to our attention and for the detailed error report. We truly appreciate you taking the time to test the update and share your findings with us.

    We've reviewed the issues you've encountered, and you're absolutely right there are indeed some duplicate identifiers and syntax issues in the TypeScript definitions that need to be addressed. The LoginImplicitGrantOptions interface appears to have been incorrectly generated in this version.

    We're actively working on a fix for these compilation errors and will have an update available shortly. In the meantime, as a gentle suggestion for testing purposes, you might want to check if temporarily reverting to version 258.0.0 or manually patching the affected interfaces in your local node_modules could help unblock your work while we prepare the official fix.

    Again, thank you for your thorough testing and prompt reporting it's extremely helpful for maintaining the quality of the SDK.

    Best regards,



    ------------------------------
    Camila Meneghini
    ------------------------------