Build stripe integration on backend side (#5246)

Adding stripe integration by making the server logic independent of the
input fields:
- query factories (remote server, foreign data wrapper, foreign table)
to loop on fields and values without hardcoding the names of the fields
- adding stripe input and type
- add the logic to handle static schema. Simply creating a big object to
store into the server

Additional work:
- rename username field to user. This is the input intended for postgres
user mapping and we now need a matching by name

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
This commit is contained in:
Thomas Trompette
2024-05-02 17:13:15 +02:00
committed by GitHub
parent 5128ea3ffb
commit f9c19c839b
30 changed files with 396 additions and 283 deletions

View File

@ -7,7 +7,7 @@ import {
ForeignDataWrapperOptions,
RemoteServerType,
} from 'src/engine/metadata-modules/remote-server/remote-server.entity';
import { UserMappingOptions } from 'src/engine/metadata-modules/remote-server/utils/user-mapping-options.utils';
import { UserMappingOptions } from 'src/engine/metadata-modules/remote-server/types/user-mapping-options';
@InputType()
export class CreateRemoteServerInput<T extends RemoteServerType> {

View File

@ -10,7 +10,7 @@ import {
import {
UserMappingOptions,
UserMappingOptionsUpdateInput,
} from 'src/engine/metadata-modules/remote-server/utils/user-mapping-options.utils';
} from 'src/engine/metadata-modules/remote-server/types/user-mapping-options';
@InputType()
export class UpdateRemoteServerInput<T extends RemoteServerType> {

View File

@ -2,9 +2,9 @@ import { ObjectType, Field } from '@nestjs/graphql';
import { IsOptional } from 'class-validator';
@ObjectType('UserMappingOptionsUsername')
@ObjectType('UserMappingOptionsUser')
export class UserMappingOptionsDTO {
@IsOptional()
@Field(() => String, { nullable: true })
username: string;
user: string;
}