From a5d452b42f9dad43d6826288823f6f52af707f0d Mon Sep 17 00:00:00 2001 From: Siddharth9890 Date: Tue, 9 Jul 2024 09:47:32 +0530 Subject: [PATCH] fix: removed namespace from build script --- scripts/generateSDK/generateArtificats.js | 7 +------ src/helpers/helper.ts | 5 ++++- 2 files changed, 5 insertions(+), 7 deletions(-) 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');