-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First integration steps for LensClient
- Loading branch information
1 parent
7983116
commit 08c86cf
Showing
37 changed files
with
253 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import * as GatedEnvironments from '@lens-protocol/gated-content/environments'; | ||
import { invariant } from '@lens-protocol/shared-kernel'; | ||
import * as dotenv from 'dotenv'; | ||
|
||
import { Environment } from '../consts/environments'; | ||
import { Environment } from '../environments'; | ||
|
||
dotenv.config(); | ||
|
||
export const buildTestEnvironment = (): Environment => { | ||
invariant(process.env.TESTING_ENV_URL, 'TESTING_ENV_URL is not defined in .env file'); | ||
|
||
return new Environment('testing', process.env.TESTING_ENV_URL); | ||
return new Environment('testing', process.env.TESTING_ENV_URL, GatedEnvironments.sandbox); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { IStorageProvider } from '@lens-protocol/storage'; | ||
|
||
import { Environment } from './environments'; | ||
import { ImageTransform } from './graphql/types.generated'; | ||
|
||
/** | ||
* The media transforms configuration. | ||
*/ | ||
export type MediaTransformsConfig = { | ||
/** | ||
* The transforms for the publication images. | ||
*/ | ||
publication?: ImageTransform; | ||
|
||
/** | ||
* The transforms for the profile images. | ||
*/ | ||
profilePicture?: ImageTransform; | ||
|
||
/** | ||
* The transforms for the profile cover images. | ||
*/ | ||
profileCover?: ImageTransform; | ||
}; | ||
|
||
export type LensContext = { | ||
environment: Environment; | ||
|
||
storage: IStorageProvider; | ||
|
||
mediaTransforms: MediaTransformsConfig; | ||
|
||
forApps: string[]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import * as GatedEnvironments from '@lens-protocol/gated-content/environments'; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export class Environment { | ||
constructor( | ||
public readonly name: string, | ||
private url: string, | ||
public readonly gated: GatedEnvironments.EnvironmentConfig, | ||
) {} | ||
|
||
get gqlEndpoint() { | ||
return this.url; | ||
} | ||
} | ||
|
||
export const production = new Environment( | ||
'production', | ||
'https://api.lens.dev', | ||
GatedEnvironments.production, | ||
); | ||
|
||
export const development = new Environment( | ||
'development', | ||
'https://api-mumbai.lens.dev', | ||
GatedEnvironments.development, | ||
); | ||
|
||
export const sandbox = new Environment( | ||
'sandbox', | ||
'https://api-sandbox-mumbai.lens.dev', | ||
GatedEnvironments.sandbox, | ||
); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.