type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
async () => { const progress = new Array<ICherryPickProgress>() result = await cherryPick(repository, 'INVALID REF', p => progress.push(p) ) expect(result).toBe(CherryPickResult.Error) }
BlackyYen/desktop
app/test/unit/git/cherry-pick-test.ts
TypeScript
ArrowFunction
p => progress.push(p)
BlackyYen/desktop
app/test/unit/git/cherry-pick-test.ts
TypeScript
ArrowFunction
async () => { result = await cherryPick(repository, featureBranch.tip.sha, p => progress.push(p) ) // commit summary set up in before each is "Cherry Picked Feature" expect(progress).toEqual([ { currentCommitSummary: 'Cherry Picked Feature!', kind: 'cherryPi...
BlackyYen/desktop
app/test/unit/git/cherry-pick-test.ts
TypeScript
ArrowFunction
async () => { const firstCommitSha = featureBranch.tip.sha await addThreeMoreCommitsOntoFeatureBranch(repository) featureBranch = await getBranchOrError(repository, featureBranchName) await switchTo(repository, targetBranchName) const commitRange = revRangeInclusive( firstCommit...
BlackyYen/desktop
app/test/unit/git/cherry-pick-test.ts
TypeScript
ArrowFunction
p => progress.push(p)
BlackyYen/desktop
app/test/unit/git/cherry-pick-test.ts
TypeScript
ArrowFunction
async () => { const firstCommitSha = featureBranch.tip.sha await addThreeMoreCommitsOntoFeatureBranch(repository) featureBranch = await getBranchOrError(repository, featureBranchName) await switchTo(repository, targetBranchName) // Add a commit to the target branch to conflict with the ...
BlackyYen/desktop
app/test/unit/git/cherry-pick-test.ts
TypeScript
ArrowFunction
(hash: string) => { newUser.passwordHash = hash }
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
ArrowFunction
async (user) => { //hash the password in dto await bcrypt.hash(user.passwordHash, 10).then((hash: string) => { user.passwordHash = hash; usersWithHashedPasswords.push(user); }) }
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
ArrowFunction
(hash: string) => { user.passwordHash = hash; usersWithHashedPasswords.push(user); }
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
ArrowFunction
(user) => { this.confirmEmailRequest(user.primaryEmailAddress, null, true, req) }
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
ArrowFunction
(hash: string) => { user.passwordHash = hash }
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
ArrowFunction
async entityManager => { const newRole = this.roleRepository.create(createRoleDto); const role = await entityManager.save(newRole); await entityManager.createQueryBuilder() .relation(User, "roles") .of(userId) ....
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
ArrowFunction
async entityManager => { const newTenant = this.tenantRepository.create(createTenantDto); const tenant = await entityManager.save(newTenant); await entityManager.createQueryBuilder() .relation(User, "primaryContactForWhichTenants") ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
ArrowFunction
async entityManager => { //create a new tenant with data sent with dto const newTenant = this.tenantRepository.create(createTenantTeamDto.tenant); const tenant = await entityManager.save(newTenant); //create a new tenant team with roles sent in Dto ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
ArrowFunction
async entityManager => { //create a new tenant team with roles sent in Dto const newTenantTeam = this.tenantTeamRepository.create({ roles: createTenantTeamRolesDto.roles }); const tenantTeam = await entityManager.save(newTenantTeam); //Associate the new ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
ArrowFunction
async entityManager => { //first get tenant with the unique name const tenant: Tenant = await this.tenantRepository.createQueryBuilder('tenant') .where("tenant.uniqueName = :uniqueName", { uniqueName: uniqueName }) .getOne(); if ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
ArrowFunction
async entityManager => { //create a new tenant with data sent with dto const newTenant = this.tenantRepository.create(createTenantAccountOfficerDto.tenant); const tenant = await entityManager.save(newTenant); //create a new tenant account officer with ro...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
ArrowFunction
async entityManager => { //create a new tenant account officer with roles sent in Dto const newTenantAccountOfficer = this.tenantAccountOfficerRepository.create({ roles: createTenantAccountOfficerDto.roles }); const tenantAccountOfficer = await entityManager.save(newTena...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
ArrowFunction
(hash: string) => { password = hash }
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
ArrowFunction
async (error, buf) => { if (error) throw error; //strange. the catch part below will handle it const token = buf.toString('hex'); //console.log(token); //success. Continue with email containing reset message with t...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
ArrowFunction
async (error: Error) => { //if (error) // throw error; //throw error that will be caught at the end? if (error) console.log(error); }
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
ArrowFunction
(hash: string) => { user.passwordHash = hash; }
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
ArrowFunction
async (error, buf) => { if (error) throw error; //strange. the catch part below will handle it const token = buf.toString('hex'); //success. Continue with email containing reset message with token primary ? user.pr...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
ArrowFunction
async (error: Error) => { //if (error) // throw error; //throw error that will be caught at the end? if (error) console.log(error) }
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
/*CREATE section*/ /** * * @param createUserDto */ async create(createUserDto: CreateUserDto, req: Request): Promise<User> { try { const newUser = this.userRepository.create(createUserDto); //hash the password in dto await bcrypt.hash(newUser.passwordHash, 10...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async createFromFacebookProfile(facebookProfileDto: FacebookProfileDto): Promise<User> { const createUserDto: CreateUserDto = { landlord: false, firstName: facebookProfileDto.name.givenName, lastName: facebookProfileDto.name.familyName, commonName: facebookProf...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
//insert using query builder - more efficient than save. Can be used for single or bulk save. See https://github.com/typeorm/typeorm/blob/master/docs/insert-query-builder.md async insertUsers(users: CreateUserDto[], req: Request): Promise<InsertResult> {//users is an array of objects try { //iterati...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
//Below is not necessary. It is only for the purpose of explaining transactions. /**If the query to be executed is expected to be involved in a transaction * at the controller level for example, the function here should be used to return the raw sql instead * of an execute(), getOne() or getMany() call that ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
/*UPDATE section*/ async update(id: number, user: UpdateUserDto): Promise<UpdateResult> { try { /* if (user.passwordHash != '') { //new password was sent. Not ideal though. There should be a different process for updating password await bcrypt.hash(user.passwordHash, 10)....
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
/** * * @param user * No partial update allowed here. Saves the user object supplied */ async save(user: User): Promise<User> { try { /* if (user.passwordHash && user.passwordHash != '') { //new password was sent. Not ideal though. There should be a different proce...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
//Let's also do partial update using query builder. Also more efficient async updateUser(userId: number, updateUserDto: UpdateUserDto): Promise<UpdateResult> { try { /* if (updateUserDto.passwordHash != '') { //new password was sent. Not ideal though. There should be a different process ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
/* DELETE section */ async delete(id: number): Promise<void> { try { await this.userRepository.delete(id); } catch (error) { throw new HttpException({ status: HttpStatus.INTERNAL_SERVER_ERROR, error: `There was a problem deleting user data: ${error...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
//query builder equivalent of delete shown above async deleteUser(userId: number): Promise<DeleteResult> { try { return await this.userRepository.createQueryBuilder() .delete() .from(User) .where("id = :id", { id: userId }) .execute(); ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
/** * * @param user * Remove the User specifed. Returns User removed. */ async remove(user: User): Promise<User> { try { return await this.userRepository.remove(user); } catch (error) { throw new HttpException({ status: HttpStatus.INTERNAL_SE...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
/** READ section */ /** * You can set options e.g. fields, relations to be returned etc. See https://typeorm.io/#/find-options */ async findAllWithOptions(findOptions: string): Promise<[User[], number]> { try { return await this.userRepository.findAndCount(JSON.parse(findOptions)); ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async findAll(): Promise<[User[], number]> { try { return await this.userRepository.findAndCount(); } catch (error) { throw new HttpException({ status: HttpStatus.INTERNAL_SERVER_ERROR, error: `There was a problem accessing users data: ${error.mes...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
/** * * @param id * find one by id */ async findOne(id: number): Promise<User> { try { return await this.userRepository.findOne(id); } catch (error) { throw new HttpException({ status: HttpStatus.INTERNAL_SERVER_ERROR, error: ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
/*Let's work on functions to set/add and unset/remove relations. set/unset applies to x-to-one and add/remove applies to x-to-many */ //1. Roles async createAndAddRole(userId: number, createRoleDto: CreateRoleDto): Promise<void> { try { await this.connection.manager.transaction(async entityManager =...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async addRoleById(userId: number, roleId: number): Promise<void> { try { return await this.userRepository.createQueryBuilder() .relation(User, "roles") .of(userId) .add(roleId) } catch (error) { if (error && error.code === PG_UNIQU...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async addRolesById(userId: number, roleIds: number[]): Promise<Role[]> { try { await this.userRepository.createQueryBuilder() .relation(User, "roles") .of(userId) .add(roleIds) //return the user roles modified for redisplay con...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async removeRoleById(userId: number, roleId: number): Promise<Role[]> { try { await this.userRepository.createQueryBuilder() .relation(User, "roles") .of(userId) .remove(roleId) //return the user roles modified for redisplay co...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async removeRolesById(userId: number, roleIds: number[]): Promise<Role[]> { try { await this.userRepository.createQueryBuilder() .relation(User, "roles") .of(userId) .remove(roleIds) //return the user roles modified for redisplay ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
/*Let's work on functions to set/add and unset/remove relations. set/unset applies to x-to-one and add/remove applies to x-to-many */ //1. Tenant Primary Contact async createAndSetTenantForPrimaryContact(userId: number, createTenantDto: CreateTenantDto): Promise<void> { try { await this.connection.m...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async setAsPrimaryContactForATenantByTenantId(userId: number, tenantId: number): Promise<Tenant[]> { try { await this.tenantRepository.createQueryBuilder() //going through the tenant side, the to-one side, to avoid multiple add .relation(Tenant, "primaryContact") .of...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async setAsPrimaryContactForATenantByTenantUniqueName(userId: number, uniqueName: string): Promise<Tenant[]> { try { //first get tenant with the unique name const tenant: Tenant = await this.tenantRepository.createQueryBuilder('tenant') .where("tenant.uniqueName = :uniq...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async removeAsPrimaryContactForATenantsById(userId: number, tenantId: number): Promise<Tenant[]> { try { await this.userRepository.createQueryBuilder() .relation(User, "primaryContactForWhichTenants") .of(userId) .remove(tenantId) const u...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
//3. tenantTeamMemberships. Special case of many-to-many split into two one-to-manys async createTenantAndSetTeamMembership(userId: number, createTenantTeamDto: CreateTenantTeamDto): Promise<void> { try { await this.connection.manager.transaction(async entityManager => { //create a n...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async setTeamMembershipById(userId: number, tenantId: number, createTenantTeamRolesDto: CreateTenantTeamRolesDto): Promise<void> { try { await this.connection.manager.transaction(async entityManager => { //create a new tenant team with roles sent in Dto const newTena...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async setTeamMembershipByTenantUniqueName(userId: number, uniqueName: string, roles: TenantTeamRole[]): Promise<TenantTeam[]> { try { await this.connection.manager.transaction(async entityManager => { //first get tenant with the unique name const tenant: Tenant = aw...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async deleteTeamMemberShipById(userId: number, tenantId: number): Promise<TenantTeam[]> { console.log('inside delete') try { await this.tenantTeamRepository.createQueryBuilder() .delete() .from(TenantTeam) .where("tenant = :tenantId and user =...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async updateTeamMemberShipRolesById(userId: number, tenantId: number, updateTenantTeamRolesDto: UpdateTenantTeamRolesDto): Promise<UpdateResult> { try { return await this.tenantTeamRepository.createQueryBuilder() .update() .set({ roles: updateTenantTeamRolesDto.roles...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
//4. TenantAccountOfficers. Also a case of many-to-many split into two one-to-manys async createAndSetAccountOfficerForWhichTenant(userId: number, createTenantAccountOfficerDto: CreateTenantAccountOfficerDto): Promise<void> { try { await this.connection.manager.transaction(async entityManager => { ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async setTenantAccountOfficerForWhichTenantById(userId: number, tenantId: number, createTenantAccountOfficerDto: CreateTenantAccountOfficerDto): Promise<void> { try { await this.connection.manager.transaction(async entityManager => { //create a new tenant account officer with roles...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async deleteTenantAccountOfficerForWhichTenantById(userId: number, tenantId: number): Promise<DeleteResult> { try { return await this.tenantAccountOfficerRepository.createQueryBuilder() .delete() .from(TenantAccountOfficer) .where("tenantId = :tenantI...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async updateTenantAccountOfficerForWhichTenantById(userId: number, tenantId: number, updateTenantAccountOfficerRolesDto: UpdateTenantAccountOfficerRolesDto): Promise<UpdateResult> { try { return await this.tenantAccountOfficerRepository.createQueryBuilder() .update() ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
/*Some user perculiarities*/ async setUserPassword(userId: number, password: string): Promise<UpdateResult> { try { await bcrypt.hash(password, 10).then((hash: string) => { password = hash }) return await this.userRepository.createQueryBuilder() ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async setUserPhoto(userId: number, req: Request, reply: Reply): Promise<any> { /*This is a special case. References: https://github.com/fastify/fastify-multipart; https://medium.com/@427anuragsharma/upload-files-using-multipart-with-fastify-and-nestjs-3f74aafef331, For ideas...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
/** * Get information about user photo * @param userId */ async getPhotoInfo(userId: number): Promise<{ fileName: string, mimeType: string }> { try { /* Below is not working. .select has a problem with case sensitivity return await this.userRepository.createQueryBuilder("...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async getUserPhoto(userId: number, reply: Reply) { const photoInfo = await this.getPhotoInfo(userId); let { fileName, mimeType } = photoInfo; //if fileName is not found, it means that there was no previous upload. Use generic avatar if (fileName == null || undefined) { file...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async findByPrimaryEmailAddress(primaryEmailAddress: string): Promise<User> { try { return await this.userRepository.createQueryBuilder("user") .leftJoinAndSelect("user.roles", "roles") .addSelect("user.passwordHash") .where("user.primaryEmailAddress ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async findByConfirmedPrimaryEmailAddress(primaryEmailAddress: string): Promise<User> { try { return await this.userRepository.createQueryBuilder("user") .where("user.primaryEmailAddress = :primaryEmailAddress", { primaryEmailAddress }) .andWhere("user.isPrimaryEmailA...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async findByResetPasswordToken(resetPasswordToken: string): Promise<User> { try { return await this.userRepository.createQueryBuilder("user") .where("user.resetPasswordToken = :resetPasswordToken", { resetPasswordToken }) .getOne(); } catch (error) { ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async findByPrimaryEmailVerificationToken(primaryEmailVerificationToken: string): Promise<User> { try { return await this.userRepository.createQueryBuilder("user") .where("user.primaryEmailVerificationToken = :primaryEmailVerificationToken", { primaryEmailVerificationToken }) ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async findByBackupEmailVerificationToken(backupEmailVerificationToken: string): Promise<User> { try { return await this.userRepository.createQueryBuilder("user") .where("user.backupEmailVerificationToken = :backupEmailVerificationToken", { backupEmailVerificationToken }) ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async findById(id: number): Promise<User> { try { return await this.userRepository.createQueryBuilder("user") .addSelect("user.refreshTokenHash") .leftJoinAndSelect("user.roles", "roles") .where("user.id = :id", { id }) .getOne(); ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async findByFacebookId(id: number): Promise<User> { try { return await this.userRepository.createQueryBuilder("user") .addSelect("user.refreshTokenHash") .leftJoinAndSelect("user.roles", "roles") .leftJoinAndSelect("user.facebookProfile", "facebookPro...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
/** * This service is for handling password reset requests. * In principle, it should be called via the user controller endpoint reset-password-request, from the login page under auth module * The login page should handle the notification response as well, via ajax, just like reset-password handles its n...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
/** * Called to reset password from email sent with token * @param token * @param newPassword * @param reply */ /* Had problem with combining reply.view and return. Using only reply.view for now. See below async resetPassword(token: string, newPassword: string, reply: Reply): Promise<any...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
/** * * @param email This may be sent if called after user has just been added in usersService * @param userId This may be sent from controller * @param primary * @param backup */ async confirmEmailRequest(email: string = null, userId: number = null, primary: boolean, req: Request) { ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async confirmEmail(token: string, primary: boolean, reply: Reply) { try { //find user by token (primary or backup) let user: User = null; primary ? user = await this.findByPrimaryEmailVerificationToken(token) : await this.findByBackupEmailVerificationToken(token); ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
/** * Invoked to setRefreshTokenHash after successful login. * @param refreshToken * @param userId */ async setRefreshTokenHash(refreshToken: string, userId: number) { const refreshTokenHash = await bcrypt.hash(refreshToken, 10); await this.userRepository.update(userId, { ...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
MethodDeclaration
async addFacebookProfile(userId: number, facebookProfile: FacebookProfileDto): Promise<User> { try { await this.userRepository.createQueryBuilder() .relation(User, "facebookProfile") .of(userId) .set(facebookProfile) //return the user mo...
NG-Joseph/nest-cms
src/users/users.service.ts
TypeScript
InterfaceDeclaration
export interface TextFieldOptions extends FieldProps, FlexContainerStyleProps { /** * Component(s) to show after input */ outerEndComponent?: React.ReactNode; /** * Component(s) to show before input */ outerStartComponent?: React.ReactNode; /** * FieldGroupIconButton component to show inside...
AbhishekDesai99/amplify-ui
packages/react/src/primitives/types/textField.ts
TypeScript
InterfaceDeclaration
export interface TextInputFieldProps extends TextFieldOptions, InputProps {}
AbhishekDesai99/amplify-ui
packages/react/src/primitives/types/textField.ts
TypeScript
InterfaceDeclaration
export interface TextAreaFieldProps extends TextFieldOptions, TextAreaProps {}
AbhishekDesai99/amplify-ui
packages/react/src/primitives/types/textField.ts
TypeScript
TypeAliasDeclaration
export type TextFieldProps<Multiline extends boolean> = (Multiline extends true ? TextAreaFieldProps : TextInputFieldProps) & { isMultiline?: Multiline; };
AbhishekDesai99/amplify-ui
packages/react/src/primitives/types/textField.ts
TypeScript
FunctionDeclaration
function SvgComponent(props: React.SVGProps<SVGSVGElement>) { return ( <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" focusable={false} aria-hidden={true} {...pr...
AGenal/semi-design
packages/semi-icons/src/icons/IconArrowUpRight.tsx
TypeScript
FunctionDeclaration
/** * __useGetOfferQuery__ * * To run a query within a React component, call `useGetOfferQuery` and pass it any options that fit your needs. * When your component renders, `useGetOfferQuery` returns an object from Apollo Client that contains loading, error, and data properties * you can use to render your UI. * ...
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
FunctionDeclaration
export function useGetOfferLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<GetOfferQuery, GetOfferQueryVariables>) { return ApolloReactHooks.useLazyQuery<GetOfferQuery, GetOfferQueryVariables>(GetOfferDocument, baseOptions); }
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
FunctionDeclaration
/** * __useGetProductQuery__ * * To run a query within a React component, call `useGetProductQuery` and pass it any options that fit your needs. * When your component renders, `useGetProductQuery` returns an object from Apollo Client that contains loading, error, and data properties * you can use to render your U...
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
FunctionDeclaration
export function useGetProductLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<GetProductQuery, GetProductQueryVariables>) { return ApolloReactHooks.useLazyQuery<GetProductQuery, GetProductQueryVariables>(GetProductDocument, baseOptions); }
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
FunctionDeclaration
/** * __useGetProductsQuery__ * * To run a query within a React component, call `useGetProductsQuery` and pass it any options that fit your needs. * When your component renders, `useGetProductsQuery` returns an object from Apollo Client that contains loading, error, and data properties * you can use to render you...
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
FunctionDeclaration
export function useGetProductsLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<GetProductsQuery, GetProductsQueryVariables>) { return ApolloReactHooks.useLazyQuery<GetProductsQuery, GetProductsQueryVariables>(GetProductsDocument, baseOptions); }
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
EnumDeclaration
export enum CacheControlScope { Public = 'PUBLIC', Private = 'PRIVATE' }
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
TypeAliasDeclaration
/** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: string, String: string, Boolean: boolean, Int: number, Float: number, };
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
TypeAliasDeclaration
/** Show Offer for a Product */ export type Offer = { __typename?: 'Offer', id: Scalars['String'], condition: Scalars['String'], price: Scalars['Float'], availabilityCode: Scalars['String'], availabilityDescription: Scalars['String'], seller: OfferSeller, };
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
TypeAliasDeclaration
export type OfferSeller = { __typename?: 'OfferSeller', id: Scalars['String'], sellerType: Scalars['String'], displayName: Scalars['String'], };
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
TypeAliasDeclaration
export type Product = { __typename?: 'Product', offer?: Maybe<Offer>, id: Scalars['String'], ean?: Maybe<Scalars['String']>, title: Scalars['String'], specsTag?: Maybe<Scalars['String']>, summary?: Maybe<Scalars['String']>, rating?: Maybe<Scalars['Int']>, shortDescription?: Maybe<Scalars['String']>,...
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
TypeAliasDeclaration
export type ProductImage = { __typename?: 'ProductImage', type?: Maybe<Scalars['String']>, key?: Maybe<Scalars['String']>, url?: Maybe<Scalars['String']>, };
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
TypeAliasDeclaration
export type ProductOfferData = { __typename?: 'ProductOfferData', bolCom?: Maybe<Scalars['Int']>, nonProfessionalSellers?: Maybe<Scalars['Int']>, professionalSellers?: Maybe<Scalars['Int']>, offers?: Maybe<Array<Maybe<ProductOfferDataOffer>>>, };
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
TypeAliasDeclaration
/** TODO: is this Offer? Schema usage validator should pick this up */ export type ProductOfferDataOffer = { __typename?: 'ProductOfferDataOffer', id: Scalars['String'], condition: Scalars['String'], price: Scalars['Float'], listPrice?: Maybe<Scalars['Float']>, availabilityCode: Scalars['String'], availa...
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
TypeAliasDeclaration
export type ProductParentCategory = { __typename?: 'ProductParentCategory', id?: Maybe<Scalars['String']>, name?: Maybe<Scalars['String']>, };
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
TypeAliasDeclaration
export type ProductParentCategoryPaths = { __typename?: 'ProductParentCategoryPaths', parentCategories?: Maybe<ProductParentCategory>, };
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
TypeAliasDeclaration
/** Products for a specific category, model is taken as is from bol.com */ export type Products = { __typename?: 'Products', products?: Maybe<Array<Maybe<Product>>>, schemaVersion?: Maybe<Scalars['String']>, totalResultSize?: Maybe<Scalars['Int']>, originalRequest?: Maybe<ProductsOriginalRequest>, };
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
TypeAliasDeclaration
export type ProductSeller = { __typename?: 'ProductSeller', id: Scalars['String'], sellerType: Scalars['String'], displayName: Scalars['String'], url?: Maybe<Scalars['String']>, topSeller: Scalars['Boolean'], useWarrantyRepairConditions: Scalars['Boolean'], };
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
TypeAliasDeclaration
export type ProductsOriginalRequest = { __typename?: 'ProductsOriginalRequest', category?: Maybe<Array<Maybe<ProductsOriginalRequestCategory>>>, };
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
TypeAliasDeclaration
export type ProductsOriginalRequestCategory = { __typename?: 'ProductsOriginalRequestCategory', id?: Maybe<Scalars['Int']>, name?: Maybe<Scalars['String']>, productCount?: Maybe<Scalars['Int']>, };
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
TypeAliasDeclaration
export type ProductUrls = { __typename?: 'ProductUrls', key?: Maybe<Scalars['String']>, value?: Maybe<Scalars['String']>, };
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
TypeAliasDeclaration
export type Query = { __typename?: 'Query', /** Get best offer for specific product */ getOffer?: Maybe<Offer>, /** Get all products for a specific list */ getProducts?: Maybe<Products>, /** Get single product */ getProduct?: Maybe<Product>, };
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript
TypeAliasDeclaration
export type QueryGetOfferArgs = { id: Scalars['String'] };
maapteh/graphql-modules-app
packages/app/src/graphql/_generated-hooks.tsx
TypeScript