diff --git a/scripts/generateSDK/generateArtificats.js b/scripts/generateSDK/generateArtificats.js index 678471e..66e7a4b 100644 --- a/scripts/generateSDK/generateArtificats.js +++ b/scripts/generateSDK/generateArtificats.js @@ -39,12 +39,8 @@ async function generateTypesForApi(options) { }); const namespace = `${options.name}Types`; - const codeAst = ` - - -export namespace ${namespace} { + const codeAst = `\n ${baseTypes} - } `; return { @@ -158,7 +154,6 @@ async function generateTsArtifacts({ content, ); } - return { identifier, codeAst, diff --git a/src/helpers/helper.ts b/src/helpers/helper.ts index ed3bfb4..d54414d 100644 --- a/src/helpers/helper.ts +++ b/src/helpers/helper.ts @@ -54,7 +54,10 @@ export const parameterChecker = ( if (!url) throw new Error('No url found!.Use either sandbox or production url'); - const urls = ['https://v3-dev.protocol.mygateway.xyz/graphql']; + const urls = [ + 'https://v3-dev.protocol.mygateway.xyz/graphql', + 'https://v3-stg.protocol.mygateway.xyz/graphql', + ]; if (urls.includes(url)) return true; else throw new Error('No valid url found!. Use sandbox or production url');