diff --git a/graphql/codegen/SPEC.md b/graphql/codegen/SPEC.md index 64f6296b0..cf73b4d8a 100644 --- a/graphql/codegen/SPEC.md +++ b/graphql/codegen/SPEC.md @@ -326,8 +326,8 @@ export class UserModel { } findFirst( - args?: FindFirstArgs, UserFilter> - ): QueryBuilder<{ users: { nodes: InferSelectResult[] } }> { + args?: FindFirstArgs, UserFilter, UsersOrderBy> + ): QueryBuilder<{ user: InferSelectResult | null }> { // ... } diff --git a/graphql/codegen/src/__tests__/codegen/__snapshots__/cli-generator.test.ts.snap b/graphql/codegen/src/__tests__/codegen/__snapshots__/cli-generator.test.ts.snap index ddb5f51ad..0d98fc96c 100644 --- a/graphql/codegen/src/__tests__/codegen/__snapshots__/cli-generator.test.ts.snap +++ b/graphql/codegen/src/__tests__/codegen/__snapshots__/cli-generator.test.ts.snap @@ -707,7 +707,7 @@ const fieldSchema: FieldSchema = { isElectric: "boolean", createdAt: "string" }; -const usage = "\\ncar \\n\\nCommands:\\n list List car records\\n find-first Find first matching car record\\n get Get a car by ID\\n create Create a new car\\n update Update an existing car\\n delete Delete a car\\n\\nList Options:\\n --limit Max number of records to return (forward pagination)\\n --last Number of records from the end (backward pagination)\\n --after Cursor for forward pagination\\n --before Cursor for backward pagination\\n --offset Number of records to skip\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\\n --condition.. Condition filter (dot-notation)\\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\\n\\nFind-First Options:\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\\n --condition.. Condition filter (dot-notation)\\n\\n --help, -h Show this help message\\n"; +const usage = "\\ncar \\n\\nCommands:\\n list List car records\\n find-first Find first matching car record\\n get Get a car by ID\\n create Create a new car\\n update Update an existing car\\n delete Delete a car\\n\\nList Options:\\n --limit Max number of records to return (forward pagination)\\n --last Number of records from the end (backward pagination)\\n --after Cursor for forward pagination\\n --before Cursor for backward pagination\\n --offset Number of records to skip\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\\n --condition.. Condition filter (dot-notation)\\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\\n\\nFind-First Options:\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\\n --condition.. Condition filter (dot-notation)\\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\\n\\n --help, -h Show this help message\\n"; export default async (argv: Partial>, prompter: Inquirerer, _options: CLIOptions) => { if (argv.help || argv.h) { console.log(usage); @@ -781,7 +781,7 @@ async function handleFindFirst(argv: Partial>, _prompter isElectric: true, createdAt: true }; - const findFirstArgs = parseFindFirstArgs & { + const findFirstArgs = parseFindFirstArgs & { select: CarSelect; }>(argv, defaultSelect); const client = getClient(); @@ -1172,7 +1172,7 @@ const fieldSchema: FieldSchema = { name: "string", licenseNumber: "string" }; -const usage = "\\ndriver \\n\\nCommands:\\n list List driver records\\n find-first Find first matching driver record\\n get Get a driver by ID\\n create Create a new driver\\n update Update an existing driver\\n delete Delete a driver\\n\\nList Options:\\n --limit Max number of records to return (forward pagination)\\n --last Number of records from the end (backward pagination)\\n --after Cursor for forward pagination\\n --before Cursor for backward pagination\\n --offset Number of records to skip\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\\n --condition.. Condition filter (dot-notation)\\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\\n\\nFind-First Options:\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\\n --condition.. Condition filter (dot-notation)\\n\\n --help, -h Show this help message\\n"; +const usage = "\\ndriver \\n\\nCommands:\\n list List driver records\\n find-first Find first matching driver record\\n get Get a driver by ID\\n create Create a new driver\\n update Update an existing driver\\n delete Delete a driver\\n\\nList Options:\\n --limit Max number of records to return (forward pagination)\\n --last Number of records from the end (backward pagination)\\n --after Cursor for forward pagination\\n --before Cursor for backward pagination\\n --offset Number of records to skip\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\\n --condition.. Condition filter (dot-notation)\\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\\n\\nFind-First Options:\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\\n --condition.. Condition filter (dot-notation)\\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\\n\\n --help, -h Show this help message\\n"; export default async (argv: Partial>, prompter: Inquirerer, _options: CLIOptions) => { if (argv.help || argv.h) { console.log(usage); @@ -1240,7 +1240,7 @@ async function handleFindFirst(argv: Partial>, _prompter name: true, licenseNumber: true }; - const findFirstArgs = parseFindFirstArgs & { + const findFirstArgs = parseFindFirstArgs & { select: DriverSelect; }>(argv, defaultSelect); const client = getClient(); @@ -3208,7 +3208,7 @@ const fieldSchema: FieldSchema = { email: "string", name: "string" }; -const usage = "\\nuser \\n\\nCommands:\\n list List user records\\n find-first Find first matching user record\\n get Get a user by ID\\n create Create a new user\\n update Update an existing user\\n delete Delete a user\\n\\nList Options:\\n --limit Max number of records to return (forward pagination)\\n --last Number of records from the end (backward pagination)\\n --after Cursor for forward pagination\\n --before Cursor for backward pagination\\n --offset Number of records to skip\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\\n --condition.. Condition filter (dot-notation)\\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\\n\\nFind-First Options:\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\\n --condition.. Condition filter (dot-notation)\\n\\n --help, -h Show this help message\\n"; +const usage = "\\nuser \\n\\nCommands:\\n list List user records\\n find-first Find first matching user record\\n get Get a user by ID\\n create Create a new user\\n update Update an existing user\\n delete Delete a user\\n\\nList Options:\\n --limit Max number of records to return (forward pagination)\\n --last Number of records from the end (backward pagination)\\n --after Cursor for forward pagination\\n --before Cursor for backward pagination\\n --offset Number of records to skip\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\\n --condition.. Condition filter (dot-notation)\\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\\n\\nFind-First Options:\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\\n --condition.. Condition filter (dot-notation)\\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\\n\\n --help, -h Show this help message\\n"; export default async (argv: Partial>, prompter: Inquirerer, _options: CLIOptions) => { if (argv.help || argv.h) { console.log(usage); @@ -3276,7 +3276,7 @@ async function handleFindFirst(argv: Partial>, _prompter email: true, name: true }; - const findFirstArgs = parseFindFirstArgs & { + const findFirstArgs = parseFindFirstArgs & { select: UserSelect; }>(argv, defaultSelect); const client = getClient("auth"); @@ -3441,7 +3441,7 @@ const fieldSchema: FieldSchema = { id: "uuid", role: "string" }; -const usage = "\\nmember \\n\\nCommands:\\n list List member records\\n find-first Find first matching member record\\n get Get a member by ID\\n create Create a new member\\n update Update an existing member\\n delete Delete a member\\n\\nList Options:\\n --limit Max number of records to return (forward pagination)\\n --last Number of records from the end (backward pagination)\\n --after Cursor for forward pagination\\n --before Cursor for backward pagination\\n --offset Number of records to skip\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\\n --condition.. Condition filter (dot-notation)\\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\\n\\nFind-First Options:\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\\n --condition.. Condition filter (dot-notation)\\n\\n --help, -h Show this help message\\n"; +const usage = "\\nmember \\n\\nCommands:\\n list List member records\\n find-first Find first matching member record\\n get Get a member by ID\\n create Create a new member\\n update Update an existing member\\n delete Delete a member\\n\\nList Options:\\n --limit Max number of records to return (forward pagination)\\n --last Number of records from the end (backward pagination)\\n --after Cursor for forward pagination\\n --before Cursor for backward pagination\\n --offset Number of records to skip\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\\n --condition.. Condition filter (dot-notation)\\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\\n\\nFind-First Options:\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\\n --condition.. Condition filter (dot-notation)\\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\\n\\n --help, -h Show this help message\\n"; export default async (argv: Partial>, prompter: Inquirerer, _options: CLIOptions) => { if (argv.help || argv.h) { console.log(usage); @@ -3507,7 +3507,7 @@ async function handleFindFirst(argv: Partial>, _prompter id: true, role: true }; - const findFirstArgs = parseFindFirstArgs & { + const findFirstArgs = parseFindFirstArgs & { select: MemberSelect; }>(argv, defaultSelect); const client = getClient("members"); @@ -3661,7 +3661,7 @@ const fieldSchema: FieldSchema = { isElectric: "boolean", createdAt: "string" }; -const usage = "\\ncar \\n\\nCommands:\\n list List car records\\n find-first Find first matching car record\\n get Get a car by ID\\n create Create a new car\\n update Update an existing car\\n delete Delete a car\\n\\nList Options:\\n --limit Max number of records to return (forward pagination)\\n --last Number of records from the end (backward pagination)\\n --after Cursor for forward pagination\\n --before Cursor for backward pagination\\n --offset Number of records to skip\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\\n --condition.. Condition filter (dot-notation)\\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\\n\\nFind-First Options:\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\\n --condition.. Condition filter (dot-notation)\\n\\n --help, -h Show this help message\\n"; +const usage = "\\ncar \\n\\nCommands:\\n list List car records\\n find-first Find first matching car record\\n get Get a car by ID\\n create Create a new car\\n update Update an existing car\\n delete Delete a car\\n\\nList Options:\\n --limit Max number of records to return (forward pagination)\\n --last Number of records from the end (backward pagination)\\n --after Cursor for forward pagination\\n --before Cursor for backward pagination\\n --offset Number of records to skip\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\\n --condition.. Condition filter (dot-notation)\\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\\n\\nFind-First Options:\\n --select Comma-separated list of fields to return\\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\\n --condition.. Condition filter (dot-notation)\\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\\n\\n --help, -h Show this help message\\n"; export default async (argv: Partial>, prompter: Inquirerer, _options: CLIOptions) => { if (argv.help || argv.h) { console.log(usage); @@ -3735,7 +3735,7 @@ async function handleFindFirst(argv: Partial>, _prompter isElectric: true, createdAt: true }; - const findFirstArgs = parseFindFirstArgs & { + const findFirstArgs = parseFindFirstArgs & { select: CarSelect; }>(argv, defaultSelect); const client = getClient("app"); diff --git a/graphql/codegen/src/__tests__/codegen/__snapshots__/client-generator.test.ts.snap b/graphql/codegen/src/__tests__/codegen/__snapshots__/client-generator.test.ts.snap index 96047e142..70ac7d414 100644 --- a/graphql/codegen/src/__tests__/codegen/__snapshots__/client-generator.test.ts.snap +++ b/graphql/codegen/src/__tests__/codegen/__snapshots__/client-generator.test.ts.snap @@ -306,9 +306,10 @@ export interface FindManyArgs { offset?: number; } -export interface FindFirstArgs { +export interface FindFirstArgs { select?: TSelect; where?: TWhere; + orderBy?: TOrderBy[]; } export interface CreateArgs { diff --git a/graphql/codegen/src/__tests__/codegen/__snapshots__/model-generator.test.ts.snap b/graphql/codegen/src/__tests__/codegen/__snapshots__/model-generator.test.ts.snap index def0b8704..675da3af8 100644 --- a/graphql/codegen/src/__tests__/codegen/__snapshots__/model-generator.test.ts.snap +++ b/graphql/codegen/src/__tests__/codegen/__snapshots__/model-generator.test.ts.snap @@ -39,26 +39,32 @@ export class UserModel { variables }); } - findFirst(args: FindFirstArgs & { + findFirst(args: FindFirstArgs & { select: S; } & StrictSelect): QueryBuilder<{ - users: { - nodes: InferSelectResult[]; - }; + user: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument("User", "users", args.select, { - where: args?.where - }, "UserFilter", connectionFieldsMap); + where: args?.where, + orderBy: args?.orderBy as string[] | undefined + }, "UserFilter", "UsersOrderBy", connectionFieldsMap); return new QueryBuilder({ client: this.client, operation: "query", operationName: "User", - fieldName: "users", + fieldName: "user", document, - variables + variables, + transform: (data: { + users?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + "user": data.users?.nodes?.[0] ?? null + }) }); } findOne(args: { @@ -188,26 +194,32 @@ export class AuditLogModel { variables }); } - findFirst(args: FindFirstArgs & { + findFirst(args: FindFirstArgs & { select: S; } & StrictSelect): QueryBuilder<{ - auditLogs: { - nodes: InferSelectResult[]; - }; + auditLog: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument("AuditLog", "auditLogs", args.select, { - where: args?.where - }, "AuditLogFilter", connectionFieldsMap); + where: args?.where, + orderBy: args?.orderBy as string[] | undefined + }, "AuditLogFilter", "AuditLogsOrderBy", connectionFieldsMap); return new QueryBuilder({ client: this.client, operation: "query", operationName: "AuditLog", - fieldName: "auditLogs", + fieldName: "auditLog", document, - variables + variables, + transform: (data: { + auditLogs?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + "auditLog": data.auditLogs?.nodes?.[0] ?? null + }) }); } findOne(args: { @@ -291,33 +303,39 @@ export class OrganizationModel { variables }); } - findFirst(args: FindFirstArgs & { + findFirst(args: FindFirstArgs & { select: S; } & StrictSelect): QueryBuilder<{ - allOrganizations: { - nodes: InferSelectResult[]; - }; + organization: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument("Organization", "allOrganizations", args.select, { - where: args?.where - }, "OrganizationFilter", connectionFieldsMap); + where: args?.where, + orderBy: args?.orderBy as string[] | undefined + }, "OrganizationFilter", "OrganizationsOrderBy", connectionFieldsMap); return new QueryBuilder({ client: this.client, operation: "query", operationName: "Organization", - fieldName: "allOrganizations", - document, - variables + fieldName: "organization", + document, + variables, + transform: (data: { + allOrganizations?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + "organization": data.allOrganizations?.nodes?.[0] ?? null + }) }); } findOne(args: { id: string; select: S; } & StrictSelect): QueryBuilder<{ - organizationById: InferSelectResult | null; + organization: InferSelectResult | null; }> { const { document, @@ -327,7 +345,7 @@ export class OrganizationModel { client: this.client, operation: "query", operationName: "Organization", - fieldName: "organizationById", + fieldName: "organization", document, variables }); diff --git a/graphql/codegen/src/__tests__/codegen/__snapshots__/react-query-hooks.test.ts.snap b/graphql/codegen/src/__tests__/codegen/__snapshots__/react-query-hooks.test.ts.snap index 89631177b..6bc1c8651 100644 --- a/graphql/codegen/src/__tests__/codegen/__snapshots__/react-query-hooks.test.ts.snap +++ b/graphql/codegen/src/__tests__/codegen/__snapshots__/react-query-hooks.test.ts.snap @@ -1843,7 +1843,7 @@ export async function fetchUserQuery(params: { export async function fetchUserQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient().user.findOne({ id: params.id, @@ -1975,7 +1975,7 @@ export async function fetchPostQuery(params: { export async function fetchPostQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient().post.findOne({ id: params.id, @@ -2094,7 +2094,7 @@ export async function fetchUserQuery(params: { export async function fetchUserQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient().user.findOne({ id: params.id, diff --git a/graphql/codegen/src/core/codegen/cli/table-command-generator.ts b/graphql/codegen/src/core/codegen/cli/table-command-generator.ts index 89d26a3d6..aa6fa5260 100644 --- a/graphql/codegen/src/core/codegen/cli/table-command-generator.ts +++ b/graphql/codegen/src/core/codegen/cli/table-command-generator.ts @@ -520,7 +520,7 @@ function buildFindManyArgsType(table: Table): t.TSType { /** * Build the FindFirstArgs type instantiation for a table: - * FindFirstArgs & { select: SelectType } + * FindFirstArgs & { select: SelectType } * * The intersection with { select: SelectType } makes select required, * matching what the ORM's findFirst method expects. @@ -529,11 +529,13 @@ function buildFindFirstArgsType(table: Table): t.TSType { const { typeName } = getTableNames(table); const selectTypeName = `${typeName}Select`; const whereTypeName = getFilterTypeName(table); + const orderByTypeName = getOrderByTypeName(table); const findFirstType = t.tsTypeReference( t.identifier('FindFirstArgs'), t.tsTypeParameterInstantiation([ t.tsTypeReference(t.identifier(selectTypeName)), t.tsTypeReference(t.identifier(whereTypeName)), + t.tsTypeReference(t.identifier(orderByTypeName)), ]), ); // Intersect with { select: SelectType } to make select required @@ -1483,6 +1485,7 @@ export function generateTableCommand(table: Table, options?: TableCommandOptions ' --select Comma-separated list of fields to return', ' --where.. Filter (dot-notation, e.g. --where.status.equalTo active)', ' --condition.. Condition filter (dot-notation)', + ' --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)', '', ); if (hasSearchFields) { diff --git a/graphql/codegen/src/core/codegen/orm/client-generator.ts b/graphql/codegen/src/core/codegen/orm/client-generator.ts index 9148cd13b..4a20e12a6 100644 --- a/graphql/codegen/src/core/codegen/orm/client-generator.ts +++ b/graphql/codegen/src/core/codegen/orm/client-generator.ts @@ -216,22 +216,6 @@ export function generateCreateClientFile( // Re-export all models statements.push(t.exportAllDeclaration(t.stringLiteral('./models'))); - // Re-export NodeHttpAdapter when enabled (for use in any Node.js application) - if (options?.nodeHttpAdapter) { - statements.push( - t.exportNamedDeclaration( - null, - [ - t.exportSpecifier( - t.identifier('NodeHttpAdapter'), - t.identifier('NodeHttpAdapter'), - ), - ], - t.stringLiteral('./node-fetch'), - ), - ); - } - // Re-export custom operations if (hasCustomQueries) { statements.push( diff --git a/graphql/codegen/src/core/codegen/orm/model-generator.ts b/graphql/codegen/src/core/codegen/orm/model-generator.ts index 8346c97b2..74af15d0d 100644 --- a/graphql/codegen/src/core/codegen/orm/model-generator.ts +++ b/graphql/codegen/src/core/codegen/orm/model-generator.ts @@ -19,7 +19,6 @@ import { getGeneratedFileHeader, getOrderByTypeName, getPrimaryKeyInfo, - getSingleRowQueryName, getTableNames, hasValidPrimaryKey, lcFirst, @@ -193,7 +192,10 @@ export function generateModelFile( const pkField = pkFields[0]; const pluralQueryName = table.query?.all ?? pluralName; const singleQueryName = table.query?.one; - const singleResultFieldName = getSingleRowQueryName(table); + // The unwrapped result key for findFirst/findOne — must be the friendly + // singular noun (e.g. "animal"), NOT the GraphQL by-id query name (e.g. + // "animalById"), so the surface aligns with the rest of the SDK. + const singleResultFieldName = singularName; const createMutationName = table.query?.create ?? `create${typeName}`; const updateMutationName = table.query?.update; const deleteMutationName = table.query?.delete; @@ -440,6 +442,7 @@ export function generateModelFile( const findFirstTypeArgs: Array<(sel: t.TSType) => t.TSType> = [ (sel: t.TSType) => sel, () => t.tsTypeReference(t.identifier(whereTypeName)), + () => t.tsTypeReference(t.identifier(orderByTypeName)), ]; const argsType = (sel: t.TSType) => t.tsTypeReference( @@ -455,23 +458,17 @@ export function generateModelFile( t.tsTypeParameterInstantiation([ t.tsTypeLiteral([ t.tsPropertySignature( - t.identifier(pluralQueryName), + t.identifier(singleResultFieldName), t.tsTypeAnnotation( - t.tsTypeLiteral([ - t.tsPropertySignature( - t.identifier('nodes'), - t.tsTypeAnnotation( - t.tsArrayType( - t.tsTypeReference( - t.identifier('InferSelectResult'), - t.tsTypeParameterInstantiation([ - t.tsTypeReference(t.identifier(relationTypeName)), - sel, - ]), - ), - ), - ), + t.tsUnionType([ + t.tsTypeReference( + t.identifier('InferSelectResult'), + t.tsTypeParameterInstantiation([ + t.tsTypeReference(t.identifier(relationTypeName)), + sel, + ]), ), + t.tsNullKeyword(), ]), ), ), @@ -502,6 +499,21 @@ export function generateModelFile( true, ), ), + t.objectProperty( + t.identifier('orderBy'), + t.tsAsExpression( + t.optionalMemberExpression( + t.identifier('args'), + t.identifier('orderBy'), + false, + true, + ), + t.tsUnionType([ + t.tsArrayType(t.tsStringKeyword()), + t.tsUndefinedKeyword(), + ]), + ), + ), ]; const bodyArgs = [ t.stringLiteral(typeName), @@ -509,8 +521,53 @@ export function generateModelFile( selectExpr, t.objectExpression(findFirstObjProps), t.stringLiteral(whereTypeName), + t.stringLiteral(orderByTypeName), t.identifier('connectionFieldsMap'), ]; + const transformDataParam = t.identifier('data'); + const transformedNodesProp = t.tsPropertySignature( + t.identifier('nodes'), + t.tsTypeAnnotation( + t.tsArrayType( + t.tsTypeReference( + t.identifier('InferSelectResult'), + t.tsTypeParameterInstantiation([ + t.tsTypeReference(t.identifier(relationTypeName)), + sRef(), + ]), + ), + ), + ), + ); + transformedNodesProp.optional = true; + const transformedCollectionProp = t.tsPropertySignature( + t.identifier(pluralQueryName), + t.tsTypeAnnotation(t.tsTypeLiteral([transformedNodesProp])), + ); + transformedCollectionProp.optional = true; + transformDataParam.typeAnnotation = t.tsTypeAnnotation( + t.tsTypeLiteral([transformedCollectionProp]), + ); + const firstNodeExpr = t.optionalMemberExpression( + t.optionalMemberExpression( + t.memberExpression(t.identifier('data'), t.identifier(pluralQueryName)), + t.identifier('nodes'), + false, + true, + ), + t.numericLiteral(0), + true, + true, + ); + const transformFn = t.arrowFunctionExpression( + [transformDataParam], + t.objectExpression([ + t.objectProperty( + t.stringLiteral(singleResultFieldName), + t.logicalExpression('??', firstNodeExpr, t.nullLiteral()), + ), + ]), + ); classBody.push( createClassMethod( 'findFirst', @@ -522,7 +579,8 @@ export function generateModelFile( bodyArgs, 'query', typeName, - pluralQueryName, + singleResultFieldName, + [t.objectProperty(t.identifier('transform'), transformFn)], ), ), ); diff --git a/graphql/codegen/src/core/codegen/orm/select-types.ts b/graphql/codegen/src/core/codegen/orm/select-types.ts index 7bc20bad9..cd75c991e 100644 --- a/graphql/codegen/src/core/codegen/orm/select-types.ts +++ b/graphql/codegen/src/core/codegen/orm/select-types.ts @@ -215,9 +215,10 @@ export interface FindManyArgs { /** * Arguments for findFirst/findUnique operations */ -export interface FindFirstArgs { +export interface FindFirstArgs { select?: TSelect; where?: TWhere; + orderBy?: TOrderBy[]; } /** diff --git a/graphql/codegen/src/core/codegen/queries.ts b/graphql/codegen/src/core/codegen/queries.ts index 58d0a1514..b4d8460c6 100644 --- a/graphql/codegen/src/core/codegen/queries.ts +++ b/graphql/codegen/src/core/codegen/queries.ts @@ -890,6 +890,7 @@ export function generateSingleQueryHook( null, [createFunctionParam('params', t.tsTypeLiteral(fImplProps))], fBody, + typeRef('Promise', [t.tsAnyKeyword()]), ), ); } diff --git a/graphql/codegen/src/core/codegen/templates/cli-utils.ts b/graphql/codegen/src/core/codegen/templates/cli-utils.ts index 933bea690..25e1388f2 100644 --- a/graphql/codegen/src/core/codegen/templates/cli-utils.ts +++ b/graphql/codegen/src/core/codegen/templates/cli-utils.ts @@ -283,8 +283,8 @@ export function parseFindManyArgs>( /** * Build findFirst args from CLI argv. - * Like parseFindManyArgs but only includes select and where - * (no pagination flags — findFirst returns the first matching record). + * Like parseFindManyArgs but without pagination flags (no limit/offset/after/before/last) + * — findFirst returns the first matching record. Supports select, where, and orderBy. */ export function parseFindFirstArgs>( argv: Record, @@ -293,10 +293,12 @@ export function parseFindFirstArgs>( const select = parseSelectFlag(argv, defaultSelect); const parsed = unflattenDotNotation(argv); const where = parsed.where; + const orderBy = parseOrderByFlag(argv); return { select, ...(where !== undefined ? { where } : {}), + ...(orderBy !== undefined ? { orderBy } : {}), } as unknown as T; } diff --git a/graphql/codegen/src/core/codegen/templates/query-builder.ts b/graphql/codegen/src/core/codegen/templates/query-builder.ts index 870013628..956c51af1 100644 --- a/graphql/codegen/src/core/codegen/templates/query-builder.ts +++ b/graphql/codegen/src/core/codegen/templates/query-builder.ts @@ -311,8 +311,9 @@ export function buildFindFirstDocument( operationName: string, queryField: string, select: TSelect, - args: { where?: TWhere }, + args: { where?: TWhere; orderBy?: string[] }, filterTypeName: string, + orderByTypeName: string, connectionFieldsMap?: Record>, ): { document: string; variables: Record } { const selections = select @@ -344,6 +345,16 @@ export function buildFindFirstDocument( queryArgs, variables, ); + addVariable( + { + varName: 'orderBy', + typeName: '[' + orderByTypeName + '!]', + value: args.orderBy?.length ? args.orderBy : undefined, + }, + variableDefinitions, + queryArgs, + variables, + ); const document = t.document({ definitions: [ diff --git a/graphql/codegen/src/core/codegen/templates/select-types.ts b/graphql/codegen/src/core/codegen/templates/select-types.ts index be6375b2f..8ffce8219 100644 --- a/graphql/codegen/src/core/codegen/templates/select-types.ts +++ b/graphql/codegen/src/core/codegen/templates/select-types.ts @@ -32,9 +32,10 @@ export interface FindManyArgs { offset?: number; } -export interface FindFirstArgs { +export interface FindFirstArgs { select?: TSelect; where?: TWhere; + orderBy?: TOrderBy[]; } export interface CreateArgs { diff --git a/graphql/query/package.json b/graphql/query/package.json index ef1abf794..ef80b73f8 100644 --- a/graphql/query/package.json +++ b/graphql/query/package.json @@ -6,6 +6,18 @@ "main": "index.js", "module": "esm/index.js", "types": "index.d.ts", + "exports": { + ".": { + "types": "./index.d.ts", + "import": "./esm/index.js", + "require": "./index.js" + }, + "./runtime": { + "types": "./runtime/index.d.ts", + "import": "./esm/runtime/index.js", + "require": "./runtime/index.js" + } + }, "homepage": "https://github.com/constructive-io/constructive", "license": "MIT", "publishConfig": { diff --git a/graphql/query/src/runtime/index.ts b/graphql/query/src/runtime/index.ts index eab541a94..abdcb9ae0 100644 --- a/graphql/query/src/runtime/index.ts +++ b/graphql/query/src/runtime/index.ts @@ -24,5 +24,5 @@ export { parseType, print } from '@0no-co/graphql.web'; export type { GraphQLAdapter, GraphQLError, QueryResult } from '@constructive-io/graphql-types'; // Isomorphic fetch with *.localhost DNS + Host header fix for Node.js -export { createFetch } from './localhost-fetch'; -export type { FetchFunction } from './localhost-fetch'; +export { createFetch } from './localhost-fetch.js'; +export type { FetchFunction } from './localhost-fetch.js'; diff --git a/graphql/query/src/runtime/localhost-fetch.ts b/graphql/query/src/runtime/localhost-fetch.ts index 7ef883842..5c8f9aa16 100644 --- a/graphql/query/src/runtime/localhost-fetch.ts +++ b/graphql/query/src/runtime/localhost-fetch.ts @@ -13,6 +13,7 @@ */ export type FetchFunction = typeof globalThis.fetch; +type NodeModuleLoader = (id: string) => unknown; export function isLocalhostSubdomain(hostname: string): boolean { return hostname.endsWith('.localhost') && hostname !== 'localhost'; @@ -106,6 +107,17 @@ function buildNodeFetch( let _fetch: FetchFunction | undefined; +function getNodeModuleLoader(): NodeModuleLoader | undefined { + try { + // Keep node:http / node:https out of browser bundle static analysis. + return Function( + 'return typeof require !== "undefined" ? require : undefined', + )() as NodeModuleLoader | undefined; + } catch { + return undefined; + } +} + /** * Create an isomorphic fetch function. * @@ -122,12 +134,13 @@ export function createFetch(): FetchFunction { if (typeof process !== 'undefined' && process.versions?.node) { try { - // eslint-disable-next-line @typescript-eslint/no-require-imports - const http = require('node:http'); - // eslint-disable-next-line @typescript-eslint/no-require-imports - const https = require('node:https'); - _fetch = buildNodeFetch(http, https); - return _fetch; + const nodeRequire = getNodeModuleLoader(); + if (nodeRequire) { + const http = nodeRequire('node:' + 'http') as typeof import('node:http'); + const https = nodeRequire('node:' + 'https') as typeof import('node:https'); + _fetch = buildNodeFetch(http, https); + return _fetch; + } } catch { // node:http unavailable — fall through } diff --git a/graphql/server-test/__tests__/cli-e2e.test.ts b/graphql/server-test/__tests__/cli-e2e.test.ts index d4af18a7f..9a26611ad 100644 --- a/graphql/server-test/__tests__/cli-e2e.test.ts +++ b/graphql/server-test/__tests__/cli-e2e.test.ts @@ -542,9 +542,8 @@ describe('CLI E2E — generated CLI against real DB', () => { ); const raw = JSON.parse(output); - // find-first returns the connection result; extract first node - const result = raw.data?.animals ?? raw; - const node = result.nodes?.[0] ?? result; + // find-first returns a single record (or null) under the singular field name + const node = raw.data?.animal; expect(node.name).toBe('Buddy'); expect(node.species).toBe('Dog'); diff --git a/graphql/test-app/tests/orm.live.test.ts b/graphql/test-app/tests/orm.live.test.ts index 9683ab2c4..15577d6f0 100644 --- a/graphql/test-app/tests/orm.live.test.ts +++ b/graphql/test-app/tests/orm.live.test.ts @@ -175,7 +175,24 @@ if (!liveEnv) { }, }) .unwrap(); - assert.ok(Array.isArray(firstResult.users.nodes), 'findFirst should return users.nodes array'); + assert.ok( + firstResult.user === null || typeof firstResult.user === 'object', + 'findFirst should return a single user object (or null), not an array' + ); + if (firstResult.user) { + assert.equal(typeof firstResult.user.id, 'string', 'findFirst result should expose scalar id'); + } + + const orderedResult = await client.user + .findFirst({ + select: { id: true, username: true }, + orderBy: ['CREATED_AT_DESC'], + }) + .unwrap(); + assert.ok( + orderedResult.user === null || typeof orderedResult.user === 'object', + 'findFirst with orderBy should return a single user object (or null)' + ); const currentUserResult = await client.query .currentUser({ diff --git a/sdk/constructive-cli/src/admin/cli/commands/app-achievement.ts b/sdk/constructive-cli/src/admin/cli/commands/app-achievement.ts index 040c863a9..abba21410 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/app-achievement.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/app-achievement.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-achievement \n\nCommands:\n list List appAchievement records\n find-first Find first matching appAchievement record\n get Get a appAchievement by ID\n create Create a new appAchievement\n update Update an existing appAchievement\n delete Delete a appAchievement\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-achievement \n\nCommands:\n list List appAchievement records\n find-first Find first matching appAchievement record\n get Get a appAchievement by ID\n create Create a new appAchievement\n update Update an existing appAchievement\n delete Delete a appAchievement\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -108,7 +108,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppAchievementSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/app-admin-grant.ts b/sdk/constructive-cli/src/admin/cli/commands/app-admin-grant.ts index e30b63954..3003d188c 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/app-admin-grant.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/app-admin-grant.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-admin-grant \n\nCommands:\n list List appAdminGrant records\n find-first Find first matching appAdminGrant record\n get Get a appAdminGrant by ID\n create Create a new appAdminGrant\n update Update an existing appAdminGrant\n delete Delete a appAdminGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-admin-grant \n\nCommands:\n list List appAdminGrant records\n find-first Find first matching appAdminGrant record\n get Get a appAdminGrant by ID\n create Create a new appAdminGrant\n update Update an existing appAdminGrant\n delete Delete a appAdminGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -108,7 +108,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppAdminGrantSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/app-claimed-invite.ts b/sdk/constructive-cli/src/admin/cli/commands/app-claimed-invite.ts index ee5d83bd9..8aa351cfd 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/app-claimed-invite.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/app-claimed-invite.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-claimed-invite \n\nCommands:\n list List appClaimedInvite records\n find-first Find first matching appClaimedInvite record\n get Get a appClaimedInvite by ID\n create Create a new appClaimedInvite\n update Update an existing appClaimedInvite\n delete Delete a appClaimedInvite\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-claimed-invite \n\nCommands:\n list List appClaimedInvite records\n find-first Find first matching appClaimedInvite record\n get Get a appClaimedInvite by ID\n create Create a new appClaimedInvite\n update Update an existing appClaimedInvite\n delete Delete a appClaimedInvite\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -108,7 +108,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppClaimedInviteSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/app-grant.ts b/sdk/constructive-cli/src/admin/cli/commands/app-grant.ts index 961288ffa..ea2461614 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/app-grant.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/app-grant.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-grant \n\nCommands:\n list List appGrant records\n find-first Find first matching appGrant record\n get Get a appGrant by ID\n create Create a new appGrant\n update Update an existing appGrant\n delete Delete a appGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-grant \n\nCommands:\n list List appGrant records\n find-first Find first matching appGrant record\n get Get a appGrant by ID\n create Create a new appGrant\n update Update an existing appGrant\n delete Delete a appGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppGrantSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/app-invite.ts b/sdk/constructive-cli/src/admin/cli/commands/app-invite.ts index 79bf0a111..46ada6b22 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/app-invite.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/app-invite.ts @@ -31,7 +31,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-invite \n\nCommands:\n list List appInvite records\n find-first Find first matching appInvite record\n get Get a appInvite by ID\n create Create a new appInvite\n update Update an existing appInvite\n delete Delete a appInvite\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-invite \n\nCommands:\n list List appInvite records\n find-first Find first matching appInvite record\n get Get a appInvite by ID\n create Create a new appInvite\n update Update an existing appInvite\n delete Delete a appInvite\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -129,7 +129,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppInviteSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/app-level-requirement.ts b/sdk/constructive-cli/src/admin/cli/commands/app-level-requirement.ts index dcad1ad7c..c81e9af6f 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/app-level-requirement.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/app-level-requirement.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-level-requirement \n\nCommands:\n list List appLevelRequirement records\n find-first Find first matching appLevelRequirement record\n get Get a appLevelRequirement by ID\n create Create a new appLevelRequirement\n update Update an existing appLevelRequirement\n delete Delete a appLevelRequirement\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-level-requirement \n\nCommands:\n list List appLevelRequirement records\n find-first Find first matching appLevelRequirement record\n get Get a appLevelRequirement by ID\n create Create a new appLevelRequirement\n update Update an existing appLevelRequirement\n delete Delete a appLevelRequirement\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -118,7 +118,11 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + AppLevelRequirementSelect, + AppLevelRequirementFilter, + AppLevelRequirementOrderBy + > & { select: AppLevelRequirementSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/app-level.ts b/sdk/constructive-cli/src/admin/cli/commands/app-level.ts index fd5b9d9e6..2395536ea 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/app-level.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/app-level.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-level \n\nCommands:\n list List appLevel records\n find-first Find first matching appLevel record\n get Get a appLevel by ID\n create Create a new appLevel\n update Update an existing appLevel\n delete Delete a appLevel\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-level \n\nCommands:\n list List appLevel records\n find-first Find first matching appLevel record\n get Get a appLevel by ID\n create Create a new appLevel\n update Update an existing appLevel\n delete Delete a appLevel\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppLevelSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/app-limit-default.ts b/sdk/constructive-cli/src/admin/cli/commands/app-limit-default.ts index 315bb1e77..55e697e1b 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/app-limit-default.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/app-limit-default.ts @@ -22,7 +22,7 @@ const fieldSchema: FieldSchema = { softMax: 'int', }; const usage = - '\napp-limit-default \n\nCommands:\n list List appLimitDefault records\n find-first Find first matching appLimitDefault record\n get Get a appLimitDefault by ID\n create Create a new appLimitDefault\n update Update an existing appLimitDefault\n delete Delete a appLimitDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-limit-default \n\nCommands:\n list List appLimitDefault records\n find-first Find first matching appLimitDefault record\n get Get a appLimitDefault by ID\n create Create a new appLimitDefault\n update Update an existing appLimitDefault\n delete Delete a appLimitDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -102,7 +102,7 @@ async function handleFindFirst(argv: Partial>, _prompter softMax: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppLimitDefaultSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/app-limit-event.ts b/sdk/constructive-cli/src/admin/cli/commands/app-limit-event.ts index c66482251..0e8be421d 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/app-limit-event.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/app-limit-event.ts @@ -27,7 +27,7 @@ const fieldSchema: FieldSchema = { reason: 'string', }; const usage = - '\napp-limit-event \n\nCommands:\n list List appLimitEvent records\n find-first Find first matching appLimitEvent record\n create Create a new appLimitEvent\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-limit-event \n\nCommands:\n list List appLimitEvent records\n find-first Find first matching appLimitEvent record\n create Create a new appLimitEvent\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter reason: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppLimitEventSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/app-limit.ts b/sdk/constructive-cli/src/admin/cli/commands/app-limit.ts index 66293d320..46eb05b64 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/app-limit.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/app-limit.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { windowDuration: 'string', }; const usage = - '\napp-limit \n\nCommands:\n list List appLimit records\n find-first Find first matching appLimit record\n get Get a appLimit by ID\n create Create a new appLimit\n update Update an existing appLimit\n delete Delete a appLimit\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-limit \n\nCommands:\n list List appLimit records\n find-first Find first matching appLimit record\n get Get a appLimit by ID\n create Create a new appLimit\n update Update an existing appLimit\n delete Delete a appLimit\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -114,7 +114,7 @@ async function handleFindFirst(argv: Partial>, _prompter windowDuration: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppLimitSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/app-membership-default.ts b/sdk/constructive-cli/src/admin/cli/commands/app-membership-default.ts index 31b53fded..0d15b7564 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/app-membership-default.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/app-membership-default.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { isVerified: 'boolean', }; const usage = - '\napp-membership-default \n\nCommands:\n list List appMembershipDefault records\n find-first Find first matching appMembershipDefault record\n get Get a appMembershipDefault by ID\n create Create a new appMembershipDefault\n update Update an existing appMembershipDefault\n delete Delete a appMembershipDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-membership-default \n\nCommands:\n list List appMembershipDefault records\n find-first Find first matching appMembershipDefault record\n get Get a appMembershipDefault by ID\n create Create a new appMembershipDefault\n update Update an existing appMembershipDefault\n delete Delete a appMembershipDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -115,7 +115,11 @@ async function handleFindFirst(argv: Partial>, _prompter isVerified: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + AppMembershipDefaultSelect, + AppMembershipDefaultFilter, + AppMembershipDefaultOrderBy + > & { select: AppMembershipDefaultSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/app-membership.ts b/sdk/constructive-cli/src/admin/cli/commands/app-membership.ts index d463fd934..0d4a7fac2 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/app-membership.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/app-membership.ts @@ -34,7 +34,7 @@ const fieldSchema: FieldSchema = { profileId: 'uuid', }; const usage = - '\napp-membership \n\nCommands:\n list List appMembership records\n find-first Find first matching appMembership record\n get Get a appMembership by ID\n create Create a new appMembership\n update Update an existing appMembership\n delete Delete a appMembership\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-membership \n\nCommands:\n list List appMembership records\n find-first Find first matching appMembership record\n get Get a appMembership by ID\n create Create a new appMembership\n update Update an existing appMembership\n delete Delete a appMembership\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -138,7 +138,7 @@ async function handleFindFirst(argv: Partial>, _prompter profileId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppMembershipSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/app-owner-grant.ts b/sdk/constructive-cli/src/admin/cli/commands/app-owner-grant.ts index b8189a180..991b3093e 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/app-owner-grant.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/app-owner-grant.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-owner-grant \n\nCommands:\n list List appOwnerGrant records\n find-first Find first matching appOwnerGrant record\n get Get a appOwnerGrant by ID\n create Create a new appOwnerGrant\n update Update an existing appOwnerGrant\n delete Delete a appOwnerGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-owner-grant \n\nCommands:\n list List appOwnerGrant records\n find-first Find first matching appOwnerGrant record\n get Get a appOwnerGrant by ID\n create Create a new appOwnerGrant\n update Update an existing appOwnerGrant\n delete Delete a appOwnerGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -108,7 +108,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppOwnerGrantSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/app-permission-default.ts b/sdk/constructive-cli/src/admin/cli/commands/app-permission-default.ts index 02ba19499..3a03ac6c8 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/app-permission-default.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/app-permission-default.ts @@ -20,7 +20,7 @@ const fieldSchema: FieldSchema = { permissions: 'string', }; const usage = - '\napp-permission-default \n\nCommands:\n list List appPermissionDefault records\n find-first Find first matching appPermissionDefault record\n get Get a appPermissionDefault by ID\n create Create a new appPermissionDefault\n update Update an existing appPermissionDefault\n delete Delete a appPermissionDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-permission-default \n\nCommands:\n list List appPermissionDefault records\n find-first Find first matching appPermissionDefault record\n get Get a appPermissionDefault by ID\n create Create a new appPermissionDefault\n update Update an existing appPermissionDefault\n delete Delete a appPermissionDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -100,7 +100,11 @@ async function handleFindFirst(argv: Partial>, _prompter permissions: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + AppPermissionDefaultSelect, + AppPermissionDefaultFilter, + AppPermissionDefaultOrderBy + > & { select: AppPermissionDefaultSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/app-permission.ts b/sdk/constructive-cli/src/admin/cli/commands/app-permission.ts index db2d37c76..1eed93330 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/app-permission.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/app-permission.ts @@ -23,7 +23,7 @@ const fieldSchema: FieldSchema = { description: 'string', }; const usage = - '\napp-permission \n\nCommands:\n list List appPermission records\n find-first Find first matching appPermission record\n get Get a appPermission by ID\n create Create a new appPermission\n update Update an existing appPermission\n delete Delete a appPermission\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-permission \n\nCommands:\n list List appPermission records\n find-first Find first matching appPermission record\n get Get a appPermission by ID\n create Create a new appPermission\n update Update an existing appPermission\n delete Delete a appPermission\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -105,7 +105,7 @@ async function handleFindFirst(argv: Partial>, _prompter description: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppPermissionSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/app-step.ts b/sdk/constructive-cli/src/admin/cli/commands/app-step.ts index 537dbd7bf..8f56b4d6a 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/app-step.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/app-step.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-step \n\nCommands:\n list List appStep records\n find-first Find first matching appStep record\n get Get a appStep by ID\n create Create a new appStep\n update Update an existing appStep\n delete Delete a appStep\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-step \n\nCommands:\n list List appStep records\n find-first Find first matching appStep record\n get Get a appStep by ID\n create Create a new appStep\n update Update an existing appStep\n delete Delete a appStep\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -108,7 +108,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppStepSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/membership-type.ts b/sdk/constructive-cli/src/admin/cli/commands/membership-type.ts index cc1ba7915..ab07b93cd 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/membership-type.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/membership-type.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { hasUsersTableEntry: 'boolean', }; const usage = - '\nmembership-type \n\nCommands:\n list List membershipType records\n find-first Find first matching membershipType record\n get Get a membershipType by ID\n create Create a new membershipType\n update Update an existing membershipType\n delete Delete a membershipType\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nmembership-type \n\nCommands:\n list List membershipType records\n find-first Find first matching membershipType record\n get Get a membershipType by ID\n create Create a new membershipType\n update Update an existing membershipType\n delete Delete a membershipType\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -108,7 +108,7 @@ async function handleFindFirst(argv: Partial>, _prompter hasUsersTableEntry: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: MembershipTypeSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-admin-grant.ts b/sdk/constructive-cli/src/admin/cli/commands/org-admin-grant.ts index 22e11bc2f..8f04cd1b1 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-admin-grant.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-admin-grant.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\norg-admin-grant \n\nCommands:\n list List orgAdminGrant records\n find-first Find first matching orgAdminGrant record\n get Get a orgAdminGrant by ID\n create Create a new orgAdminGrant\n update Update an existing orgAdminGrant\n delete Delete a orgAdminGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-admin-grant \n\nCommands:\n list List orgAdminGrant records\n find-first Find first matching orgAdminGrant record\n get Get a orgAdminGrant by ID\n create Create a new orgAdminGrant\n update Update an existing orgAdminGrant\n delete Delete a orgAdminGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgAdminGrantSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-chart-edge-grant.ts b/sdk/constructive-cli/src/admin/cli/commands/org-chart-edge-grant.ts index 095cf055f..c55ac9075 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-chart-edge-grant.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-chart-edge-grant.ts @@ -27,7 +27,7 @@ const fieldSchema: FieldSchema = { createdAt: 'string', }; const usage = - '\norg-chart-edge-grant \n\nCommands:\n list List orgChartEdgeGrant records\n find-first Find first matching orgChartEdgeGrant record\n get Get a orgChartEdgeGrant by ID\n create Create a new orgChartEdgeGrant\n update Update an existing orgChartEdgeGrant\n delete Delete a orgChartEdgeGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-chart-edge-grant \n\nCommands:\n list List orgChartEdgeGrant records\n find-first Find first matching orgChartEdgeGrant record\n get Get a orgChartEdgeGrant by ID\n create Create a new orgChartEdgeGrant\n update Update an existing orgChartEdgeGrant\n delete Delete a orgChartEdgeGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -117,7 +117,7 @@ async function handleFindFirst(argv: Partial>, _prompter createdAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgChartEdgeGrantSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-chart-edge.ts b/sdk/constructive-cli/src/admin/cli/commands/org-chart-edge.ts index d6c0839a5..8650e6152 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-chart-edge.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-chart-edge.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { positionLevel: 'int', }; const usage = - '\norg-chart-edge \n\nCommands:\n list List orgChartEdge records\n find-first Find first matching orgChartEdge record\n get Get a orgChartEdge by ID\n create Create a new orgChartEdge\n update Update an existing orgChartEdge\n delete Delete a orgChartEdge\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-chart-edge \n\nCommands:\n list List orgChartEdge records\n find-first Find first matching orgChartEdge record\n get Get a orgChartEdge by ID\n create Create a new orgChartEdge\n update Update an existing orgChartEdge\n delete Delete a orgChartEdge\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -114,7 +114,7 @@ async function handleFindFirst(argv: Partial>, _prompter positionLevel: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgChartEdgeSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-claimed-invite.ts b/sdk/constructive-cli/src/admin/cli/commands/org-claimed-invite.ts index 8a7be4ccc..6d0881138 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-claimed-invite.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-claimed-invite.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { entityId: 'uuid', }; const usage = - '\norg-claimed-invite \n\nCommands:\n list List orgClaimedInvite records\n find-first Find first matching orgClaimedInvite record\n get Get a orgClaimedInvite by ID\n create Create a new orgClaimedInvite\n update Update an existing orgClaimedInvite\n delete Delete a orgClaimedInvite\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-claimed-invite \n\nCommands:\n list List orgClaimedInvite records\n find-first Find first matching orgClaimedInvite record\n get Get a orgClaimedInvite by ID\n create Create a new orgClaimedInvite\n update Update an existing orgClaimedInvite\n delete Delete a orgClaimedInvite\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter entityId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgClaimedInviteSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-get-managers-record.ts b/sdk/constructive-cli/src/admin/cli/commands/org-get-managers-record.ts index 6808fc470..380f3aedc 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-get-managers-record.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-get-managers-record.ts @@ -20,7 +20,7 @@ const fieldSchema: FieldSchema = { depth: 'int', }; const usage = - '\norg-get-managers-record \n\nCommands:\n list List orgGetManagersRecord records\n find-first Find first matching orgGetManagersRecord record\n create Create a new orgGetManagersRecord\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-get-managers-record \n\nCommands:\n list List orgGetManagersRecord records\n find-first Find first matching orgGetManagersRecord record\n create Create a new orgGetManagersRecord\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -94,7 +94,11 @@ async function handleFindFirst(argv: Partial>, _prompter depth: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + OrgGetManagersRecordSelect, + OrgGetManagersRecordFilter, + OrgGetManagersRecordsOrderBy + > & { select: OrgGetManagersRecordSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-get-subordinates-record.ts b/sdk/constructive-cli/src/admin/cli/commands/org-get-subordinates-record.ts index 0d1eb8e5f..0fe97c399 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-get-subordinates-record.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-get-subordinates-record.ts @@ -20,7 +20,7 @@ const fieldSchema: FieldSchema = { depth: 'int', }; const usage = - '\norg-get-subordinates-record \n\nCommands:\n list List orgGetSubordinatesRecord records\n find-first Find first matching orgGetSubordinatesRecord record\n create Create a new orgGetSubordinatesRecord\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-get-subordinates-record \n\nCommands:\n list List orgGetSubordinatesRecord records\n find-first Find first matching orgGetSubordinatesRecord record\n create Create a new orgGetSubordinatesRecord\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -94,7 +94,11 @@ async function handleFindFirst(argv: Partial>, _prompter depth: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + OrgGetSubordinatesRecordSelect, + OrgGetSubordinatesRecordFilter, + OrgGetSubordinatesRecordsOrderBy + > & { select: OrgGetSubordinatesRecordSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-grant.ts b/sdk/constructive-cli/src/admin/cli/commands/org-grant.ts index 634c7d588..2c0b87d49 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-grant.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-grant.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\norg-grant \n\nCommands:\n list List orgGrant records\n find-first Find first matching orgGrant record\n get Get a orgGrant by ID\n create Create a new orgGrant\n update Update an existing orgGrant\n delete Delete a orgGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-grant \n\nCommands:\n list List orgGrant records\n find-first Find first matching orgGrant record\n get Get a orgGrant by ID\n create Create a new orgGrant\n update Update an existing orgGrant\n delete Delete a orgGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -114,7 +114,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgGrantSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-invite.ts b/sdk/constructive-cli/src/admin/cli/commands/org-invite.ts index 50b0411d4..82798a278 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-invite.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-invite.ts @@ -33,7 +33,7 @@ const fieldSchema: FieldSchema = { entityId: 'uuid', }; const usage = - '\norg-invite \n\nCommands:\n list List orgInvite records\n find-first Find first matching orgInvite record\n get Get a orgInvite by ID\n create Create a new orgInvite\n update Update an existing orgInvite\n delete Delete a orgInvite\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-invite \n\nCommands:\n list List orgInvite records\n find-first Find first matching orgInvite record\n get Get a orgInvite by ID\n create Create a new orgInvite\n update Update an existing orgInvite\n delete Delete a orgInvite\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -135,7 +135,7 @@ async function handleFindFirst(argv: Partial>, _prompter entityId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgInviteSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-limit-aggregate.ts b/sdk/constructive-cli/src/admin/cli/commands/org-limit-aggregate.ts index 8b50e450b..31de519eb 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-limit-aggregate.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-limit-aggregate.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { windowDuration: 'string', }; const usage = - '\norg-limit-aggregate \n\nCommands:\n list List orgLimitAggregate records\n find-first Find first matching orgLimitAggregate record\n get Get a orgLimitAggregate by ID\n create Create a new orgLimitAggregate\n update Update an existing orgLimitAggregate\n delete Delete a orgLimitAggregate\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-limit-aggregate \n\nCommands:\n list List orgLimitAggregate records\n find-first Find first matching orgLimitAggregate record\n get Get a orgLimitAggregate by ID\n create Create a new orgLimitAggregate\n update Update an existing orgLimitAggregate\n delete Delete a orgLimitAggregate\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -114,7 +114,7 @@ async function handleFindFirst(argv: Partial>, _prompter windowDuration: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgLimitAggregateSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-limit-default.ts b/sdk/constructive-cli/src/admin/cli/commands/org-limit-default.ts index 9a35893f2..65383bec0 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-limit-default.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-limit-default.ts @@ -22,7 +22,7 @@ const fieldSchema: FieldSchema = { softMax: 'int', }; const usage = - '\norg-limit-default \n\nCommands:\n list List orgLimitDefault records\n find-first Find first matching orgLimitDefault record\n get Get a orgLimitDefault by ID\n create Create a new orgLimitDefault\n update Update an existing orgLimitDefault\n delete Delete a orgLimitDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-limit-default \n\nCommands:\n list List orgLimitDefault records\n find-first Find first matching orgLimitDefault record\n get Get a orgLimitDefault by ID\n create Create a new orgLimitDefault\n update Update an existing orgLimitDefault\n delete Delete a orgLimitDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -102,7 +102,7 @@ async function handleFindFirst(argv: Partial>, _prompter softMax: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgLimitDefaultSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-limit-event.ts b/sdk/constructive-cli/src/admin/cli/commands/org-limit-event.ts index 9867db17b..c8ef656d6 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-limit-event.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-limit-event.ts @@ -27,7 +27,7 @@ const fieldSchema: FieldSchema = { reason: 'string', }; const usage = - '\norg-limit-event \n\nCommands:\n list List orgLimitEvent records\n find-first Find first matching orgLimitEvent record\n create Create a new orgLimitEvent\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-limit-event \n\nCommands:\n list List orgLimitEvent records\n find-first Find first matching orgLimitEvent record\n create Create a new orgLimitEvent\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter reason: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgLimitEventSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-limit.ts b/sdk/constructive-cli/src/admin/cli/commands/org-limit.ts index dda64514d..53a014bc9 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-limit.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-limit.ts @@ -27,7 +27,7 @@ const fieldSchema: FieldSchema = { entityId: 'uuid', }; const usage = - '\norg-limit \n\nCommands:\n list List orgLimit records\n find-first Find first matching orgLimit record\n get Get a orgLimit by ID\n create Create a new orgLimit\n update Update an existing orgLimit\n delete Delete a orgLimit\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-limit \n\nCommands:\n list List orgLimit records\n find-first Find first matching orgLimit record\n get Get a orgLimit by ID\n create Create a new orgLimit\n update Update an existing orgLimit\n delete Delete a orgLimit\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -117,7 +117,7 @@ async function handleFindFirst(argv: Partial>, _prompter entityId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgLimitSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-member-profile.ts b/sdk/constructive-cli/src/admin/cli/commands/org-member-profile.ts index eddfe0d5f..87d0c9ab0 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-member-profile.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-member-profile.ts @@ -29,7 +29,7 @@ const fieldSchema: FieldSchema = { profilePicture: 'string', }; const usage = - '\norg-member-profile \n\nCommands:\n list List orgMemberProfile records\n find-first Find first matching orgMemberProfile record\n get Get a orgMemberProfile by ID\n create Create a new orgMemberProfile\n update Update an existing orgMemberProfile\n delete Delete a orgMemberProfile\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-member-profile \n\nCommands:\n list List orgMemberProfile records\n find-first Find first matching orgMemberProfile record\n get Get a orgMemberProfile by ID\n create Create a new orgMemberProfile\n update Update an existing orgMemberProfile\n delete Delete a orgMemberProfile\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -123,7 +123,7 @@ async function handleFindFirst(argv: Partial>, _prompter profilePicture: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgMemberProfileSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-member.ts b/sdk/constructive-cli/src/admin/cli/commands/org-member.ts index cc7a7087a..5c4a95fb7 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-member.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-member.ts @@ -22,7 +22,7 @@ const fieldSchema: FieldSchema = { entityId: 'uuid', }; const usage = - '\norg-member \n\nCommands:\n list List orgMember records\n find-first Find first matching orgMember record\n get Get a orgMember by ID\n create Create a new orgMember\n update Update an existing orgMember\n delete Delete a orgMember\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-member \n\nCommands:\n list List orgMember records\n find-first Find first matching orgMember record\n get Get a orgMember by ID\n create Create a new orgMember\n update Update an existing orgMember\n delete Delete a orgMember\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -102,7 +102,7 @@ async function handleFindFirst(argv: Partial>, _prompter entityId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgMemberSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-membership-default.ts b/sdk/constructive-cli/src/admin/cli/commands/org-membership-default.ts index 9a5015416..c2283c61d 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-membership-default.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-membership-default.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { entityId: 'uuid', }; const usage = - '\norg-membership-default \n\nCommands:\n list List orgMembershipDefault records\n find-first Find first matching orgMembershipDefault record\n get Get a orgMembershipDefault by ID\n create Create a new orgMembershipDefault\n update Update an existing orgMembershipDefault\n delete Delete a orgMembershipDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-membership-default \n\nCommands:\n list List orgMembershipDefault records\n find-first Find first matching orgMembershipDefault record\n get Get a orgMembershipDefault by ID\n create Create a new orgMembershipDefault\n update Update an existing orgMembershipDefault\n delete Delete a orgMembershipDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -115,7 +115,11 @@ async function handleFindFirst(argv: Partial>, _prompter entityId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + OrgMembershipDefaultSelect, + OrgMembershipDefaultFilter, + OrgMembershipDefaultOrderBy + > & { select: OrgMembershipDefaultSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-membership-setting.ts b/sdk/constructive-cli/src/admin/cli/commands/org-membership-setting.ts index 1ac517828..ec4100c9c 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-membership-setting.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-membership-setting.ts @@ -32,7 +32,7 @@ const fieldSchema: FieldSchema = { limitAllocationMode: 'string', }; const usage = - '\norg-membership-setting \n\nCommands:\n list List orgMembershipSetting records\n find-first Find first matching orgMembershipSetting record\n get Get a orgMembershipSetting by ID\n create Create a new orgMembershipSetting\n update Update an existing orgMembershipSetting\n delete Delete a orgMembershipSetting\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-membership-setting \n\nCommands:\n list List orgMembershipSetting records\n find-first Find first matching orgMembershipSetting record\n get Get a orgMembershipSetting by ID\n create Create a new orgMembershipSetting\n update Update an existing orgMembershipSetting\n delete Delete a orgMembershipSetting\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -136,7 +136,11 @@ async function handleFindFirst(argv: Partial>, _prompter limitAllocationMode: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + OrgMembershipSettingSelect, + OrgMembershipSettingFilter, + OrgMembershipSettingOrderBy + > & { select: OrgMembershipSettingSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-membership.ts b/sdk/constructive-cli/src/admin/cli/commands/org-membership.ts index a1bb84dcd..9ff6c3724 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-membership.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-membership.ts @@ -36,7 +36,7 @@ const fieldSchema: FieldSchema = { profileId: 'uuid', }; const usage = - '\norg-membership \n\nCommands:\n list List orgMembership records\n find-first Find first matching orgMembership record\n get Get a orgMembership by ID\n create Create a new orgMembership\n update Update an existing orgMembership\n delete Delete a orgMembership\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-membership \n\nCommands:\n list List orgMembership records\n find-first Find first matching orgMembership record\n get Get a orgMembership by ID\n create Create a new orgMembership\n update Update an existing orgMembership\n delete Delete a orgMembership\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -144,7 +144,7 @@ async function handleFindFirst(argv: Partial>, _prompter profileId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgMembershipSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-owner-grant.ts b/sdk/constructive-cli/src/admin/cli/commands/org-owner-grant.ts index 99dc9ac3c..2d7d763e3 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-owner-grant.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-owner-grant.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\norg-owner-grant \n\nCommands:\n list List orgOwnerGrant records\n find-first Find first matching orgOwnerGrant record\n get Get a orgOwnerGrant by ID\n create Create a new orgOwnerGrant\n update Update an existing orgOwnerGrant\n delete Delete a orgOwnerGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-owner-grant \n\nCommands:\n list List orgOwnerGrant records\n find-first Find first matching orgOwnerGrant record\n get Get a orgOwnerGrant by ID\n create Create a new orgOwnerGrant\n update Update an existing orgOwnerGrant\n delete Delete a orgOwnerGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgOwnerGrantSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-permission-default.ts b/sdk/constructive-cli/src/admin/cli/commands/org-permission-default.ts index 2448918b6..dbb2fb7b4 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-permission-default.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-permission-default.ts @@ -21,7 +21,7 @@ const fieldSchema: FieldSchema = { entityId: 'uuid', }; const usage = - '\norg-permission-default \n\nCommands:\n list List orgPermissionDefault records\n find-first Find first matching orgPermissionDefault record\n get Get a orgPermissionDefault by ID\n create Create a new orgPermissionDefault\n update Update an existing orgPermissionDefault\n delete Delete a orgPermissionDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-permission-default \n\nCommands:\n list List orgPermissionDefault records\n find-first Find first matching orgPermissionDefault record\n get Get a orgPermissionDefault by ID\n create Create a new orgPermissionDefault\n update Update an existing orgPermissionDefault\n delete Delete a orgPermissionDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -103,7 +103,11 @@ async function handleFindFirst(argv: Partial>, _prompter entityId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + OrgPermissionDefaultSelect, + OrgPermissionDefaultFilter, + OrgPermissionDefaultOrderBy + > & { select: OrgPermissionDefaultSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-permission.ts b/sdk/constructive-cli/src/admin/cli/commands/org-permission.ts index ed92cabc7..b48ebea78 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-permission.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-permission.ts @@ -23,7 +23,7 @@ const fieldSchema: FieldSchema = { description: 'string', }; const usage = - '\norg-permission \n\nCommands:\n list List orgPermission records\n find-first Find first matching orgPermission record\n get Get a orgPermission by ID\n create Create a new orgPermission\n update Update an existing orgPermission\n delete Delete a orgPermission\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-permission \n\nCommands:\n list List orgPermission records\n find-first Find first matching orgPermission record\n get Get a orgPermission by ID\n create Create a new orgPermission\n update Update an existing orgPermission\n delete Delete a orgPermission\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -105,7 +105,7 @@ async function handleFindFirst(argv: Partial>, _prompter description: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgPermissionSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/admin/cli/utils.ts b/sdk/constructive-cli/src/admin/cli/utils.ts index 1a3f288db..78a7defb6 100644 --- a/sdk/constructive-cli/src/admin/cli/utils.ts +++ b/sdk/constructive-cli/src/admin/cli/utils.ts @@ -255,8 +255,8 @@ export function parseFindManyArgs>( /** * Build findFirst args from CLI argv. - * Like parseFindManyArgs but only includes select and where - * (no pagination flags — findFirst returns the first matching record). + * Like parseFindManyArgs but without pagination flags (no limit/offset/after/before/last) + * — findFirst returns the first matching record. Supports select, where, and orderBy. */ export function parseFindFirstArgs>( argv: Record, @@ -265,10 +265,12 @@ export function parseFindFirstArgs>( const select = parseSelectFlag(argv, defaultSelect); const parsed = unflattenDotNotation(argv); const where = parsed.where; + const orderBy = parseOrderByFlag(argv); return { select, ...(where !== undefined ? { where } : {}), + ...(orderBy !== undefined ? { orderBy } : {}), } as unknown as T; } diff --git a/sdk/constructive-cli/src/admin/orm/models/appAchievement.ts b/sdk/constructive-cli/src/admin/orm/models/appAchievement.ts index f24447777..545b5e5f7 100644 --- a/sdk/constructive-cli/src/admin/orm/models/appAchievement.ts +++ b/sdk/constructive-cli/src/admin/orm/models/appAchievement.ts @@ -70,13 +70,11 @@ export class AppAchievementModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appAchievements: { - nodes: InferSelectResult[]; - }; + appAchievement: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppAchievement', @@ -84,17 +82,26 @@ export class AppAchievementModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppAchievementFilter', + 'AppAchievementOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppAchievement', - fieldName: 'appAchievements', + fieldName: 'appAchievement', document, variables, + transform: (data: { + appAchievements?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appAchievement: data.appAchievements?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/appAdminGrant.ts b/sdk/constructive-cli/src/admin/orm/models/appAdminGrant.ts index 6a2a59893..fd80edc23 100644 --- a/sdk/constructive-cli/src/admin/orm/models/appAdminGrant.ts +++ b/sdk/constructive-cli/src/admin/orm/models/appAdminGrant.ts @@ -70,13 +70,11 @@ export class AppAdminGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appAdminGrants: { - nodes: InferSelectResult[]; - }; + appAdminGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppAdminGrant', @@ -84,17 +82,26 @@ export class AppAdminGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppAdminGrantFilter', + 'AppAdminGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppAdminGrant', - fieldName: 'appAdminGrants', + fieldName: 'appAdminGrant', document, variables, + transform: (data: { + appAdminGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appAdminGrant: data.appAdminGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/appClaimedInvite.ts b/sdk/constructive-cli/src/admin/orm/models/appClaimedInvite.ts index 2a4c41dec..c9e66ec9c 100644 --- a/sdk/constructive-cli/src/admin/orm/models/appClaimedInvite.ts +++ b/sdk/constructive-cli/src/admin/orm/models/appClaimedInvite.ts @@ -70,13 +70,11 @@ export class AppClaimedInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appClaimedInvites: { - nodes: InferSelectResult[]; - }; + appClaimedInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppClaimedInvite', @@ -84,17 +82,26 @@ export class AppClaimedInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppClaimedInviteFilter', + 'AppClaimedInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppClaimedInvite', - fieldName: 'appClaimedInvites', + fieldName: 'appClaimedInvite', document, variables, + transform: (data: { + appClaimedInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appClaimedInvite: data.appClaimedInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/appGrant.ts b/sdk/constructive-cli/src/admin/orm/models/appGrant.ts index 2cb4f429a..4481fb3d8 100644 --- a/sdk/constructive-cli/src/admin/orm/models/appGrant.ts +++ b/sdk/constructive-cli/src/admin/orm/models/appGrant.ts @@ -70,13 +70,11 @@ export class AppGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appGrants: { - nodes: InferSelectResult[]; - }; + appGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppGrant', @@ -84,17 +82,26 @@ export class AppGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppGrantFilter', + 'AppGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppGrant', - fieldName: 'appGrants', + fieldName: 'appGrant', document, variables, + transform: (data: { + appGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appGrant: data.appGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/appInvite.ts b/sdk/constructive-cli/src/admin/orm/models/appInvite.ts index fe4a1c4e4..5fcbff936 100644 --- a/sdk/constructive-cli/src/admin/orm/models/appInvite.ts +++ b/sdk/constructive-cli/src/admin/orm/models/appInvite.ts @@ -70,13 +70,11 @@ export class AppInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appInvites: { - nodes: InferSelectResult[]; - }; + appInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppInvite', @@ -84,17 +82,26 @@ export class AppInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppInviteFilter', + 'AppInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppInvite', - fieldName: 'appInvites', + fieldName: 'appInvite', document, variables, + transform: (data: { + appInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appInvite: data.appInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/appLevel.ts b/sdk/constructive-cli/src/admin/orm/models/appLevel.ts index f9abef512..cd182a18c 100644 --- a/sdk/constructive-cli/src/admin/orm/models/appLevel.ts +++ b/sdk/constructive-cli/src/admin/orm/models/appLevel.ts @@ -70,13 +70,11 @@ export class AppLevelModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLevels: { - nodes: InferSelectResult[]; - }; + appLevel: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLevel', @@ -84,17 +82,26 @@ export class AppLevelModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLevelFilter', + 'AppLevelOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLevel', - fieldName: 'appLevels', + fieldName: 'appLevel', document, variables, + transform: (data: { + appLevels?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevel: data.appLevels?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/appLevelRequirement.ts b/sdk/constructive-cli/src/admin/orm/models/appLevelRequirement.ts index 54baeb7dc..c3f9d89f1 100644 --- a/sdk/constructive-cli/src/admin/orm/models/appLevelRequirement.ts +++ b/sdk/constructive-cli/src/admin/orm/models/appLevelRequirement.ts @@ -70,13 +70,11 @@ export class AppLevelRequirementModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLevelRequirements: { - nodes: InferSelectResult[]; - }; + appLevelRequirement: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLevelRequirement', @@ -84,17 +82,26 @@ export class AppLevelRequirementModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLevelRequirementFilter', + 'AppLevelRequirementOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLevelRequirement', - fieldName: 'appLevelRequirements', + fieldName: 'appLevelRequirement', document, variables, + transform: (data: { + appLevelRequirements?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevelRequirement: data.appLevelRequirements?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/appLimit.ts b/sdk/constructive-cli/src/admin/orm/models/appLimit.ts index dea896420..2e109cb07 100644 --- a/sdk/constructive-cli/src/admin/orm/models/appLimit.ts +++ b/sdk/constructive-cli/src/admin/orm/models/appLimit.ts @@ -70,13 +70,11 @@ export class AppLimitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimits: { - nodes: InferSelectResult[]; - }; + appLimit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimit', @@ -84,17 +82,26 @@ export class AppLimitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitFilter', + 'AppLimitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimit', - fieldName: 'appLimits', + fieldName: 'appLimit', document, variables, + transform: (data: { + appLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimit: data.appLimits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/appLimitDefault.ts b/sdk/constructive-cli/src/admin/orm/models/appLimitDefault.ts index dfec3cdd9..f9df6376e 100644 --- a/sdk/constructive-cli/src/admin/orm/models/appLimitDefault.ts +++ b/sdk/constructive-cli/src/admin/orm/models/appLimitDefault.ts @@ -70,13 +70,11 @@ export class AppLimitDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimitDefaults: { - nodes: InferSelectResult[]; - }; + appLimitDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimitDefault', @@ -84,17 +82,26 @@ export class AppLimitDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitDefaultFilter', + 'AppLimitDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimitDefault', - fieldName: 'appLimitDefaults', + fieldName: 'appLimitDefault', document, variables, + transform: (data: { + appLimitDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimitDefault: data.appLimitDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/appLimitEvent.ts b/sdk/constructive-cli/src/admin/orm/models/appLimitEvent.ts index 8f367e889..b8e0c98e1 100644 --- a/sdk/constructive-cli/src/admin/orm/models/appLimitEvent.ts +++ b/sdk/constructive-cli/src/admin/orm/models/appLimitEvent.ts @@ -70,13 +70,11 @@ export class AppLimitEventModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimitEvents: { - nodes: InferSelectResult[]; - }; + appLimitEvent: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimitEvent', @@ -84,17 +82,26 @@ export class AppLimitEventModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitEventFilter', + 'AppLimitEventOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimitEvent', - fieldName: 'appLimitEvents', + fieldName: 'appLimitEvent', document, variables, + transform: (data: { + appLimitEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimitEvent: data.appLimitEvents?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-cli/src/admin/orm/models/appMembership.ts b/sdk/constructive-cli/src/admin/orm/models/appMembership.ts index a830192e6..a4011c41a 100644 --- a/sdk/constructive-cli/src/admin/orm/models/appMembership.ts +++ b/sdk/constructive-cli/src/admin/orm/models/appMembership.ts @@ -70,13 +70,11 @@ export class AppMembershipModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appMemberships: { - nodes: InferSelectResult[]; - }; + appMembership: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppMembership', @@ -84,17 +82,26 @@ export class AppMembershipModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppMembershipFilter', + 'AppMembershipOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppMembership', - fieldName: 'appMemberships', + fieldName: 'appMembership', document, variables, + transform: (data: { + appMemberships?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appMembership: data.appMemberships?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/appMembershipDefault.ts b/sdk/constructive-cli/src/admin/orm/models/appMembershipDefault.ts index 8b1a54c01..f69f1aca6 100644 --- a/sdk/constructive-cli/src/admin/orm/models/appMembershipDefault.ts +++ b/sdk/constructive-cli/src/admin/orm/models/appMembershipDefault.ts @@ -72,13 +72,11 @@ export class AppMembershipDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appMembershipDefaults: { - nodes: InferSelectResult[]; - }; + appMembershipDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppMembershipDefault', @@ -86,17 +84,26 @@ export class AppMembershipDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppMembershipDefaultFilter', + 'AppMembershipDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppMembershipDefault', - fieldName: 'appMembershipDefaults', + fieldName: 'appMembershipDefault', document, variables, + transform: (data: { + appMembershipDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appMembershipDefault: data.appMembershipDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/appOwnerGrant.ts b/sdk/constructive-cli/src/admin/orm/models/appOwnerGrant.ts index a8695557e..eeb815d84 100644 --- a/sdk/constructive-cli/src/admin/orm/models/appOwnerGrant.ts +++ b/sdk/constructive-cli/src/admin/orm/models/appOwnerGrant.ts @@ -70,13 +70,11 @@ export class AppOwnerGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appOwnerGrants: { - nodes: InferSelectResult[]; - }; + appOwnerGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppOwnerGrant', @@ -84,17 +82,26 @@ export class AppOwnerGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppOwnerGrantFilter', + 'AppOwnerGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppOwnerGrant', - fieldName: 'appOwnerGrants', + fieldName: 'appOwnerGrant', document, variables, + transform: (data: { + appOwnerGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appOwnerGrant: data.appOwnerGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/appPermission.ts b/sdk/constructive-cli/src/admin/orm/models/appPermission.ts index 2575c5de2..e71adea65 100644 --- a/sdk/constructive-cli/src/admin/orm/models/appPermission.ts +++ b/sdk/constructive-cli/src/admin/orm/models/appPermission.ts @@ -70,13 +70,11 @@ export class AppPermissionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appPermissions: { - nodes: InferSelectResult[]; - }; + appPermission: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppPermission', @@ -84,17 +82,26 @@ export class AppPermissionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppPermissionFilter', + 'AppPermissionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppPermission', - fieldName: 'appPermissions', + fieldName: 'appPermission', document, variables, + transform: (data: { + appPermissions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appPermission: data.appPermissions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/appPermissionDefault.ts b/sdk/constructive-cli/src/admin/orm/models/appPermissionDefault.ts index 427272883..d5511aed0 100644 --- a/sdk/constructive-cli/src/admin/orm/models/appPermissionDefault.ts +++ b/sdk/constructive-cli/src/admin/orm/models/appPermissionDefault.ts @@ -72,13 +72,11 @@ export class AppPermissionDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appPermissionDefaults: { - nodes: InferSelectResult[]; - }; + appPermissionDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppPermissionDefault', @@ -86,17 +84,26 @@ export class AppPermissionDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppPermissionDefaultFilter', + 'AppPermissionDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppPermissionDefault', - fieldName: 'appPermissionDefaults', + fieldName: 'appPermissionDefault', document, variables, + transform: (data: { + appPermissionDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appPermissionDefault: data.appPermissionDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/appStep.ts b/sdk/constructive-cli/src/admin/orm/models/appStep.ts index 29dae0d6c..7ebb44fa1 100644 --- a/sdk/constructive-cli/src/admin/orm/models/appStep.ts +++ b/sdk/constructive-cli/src/admin/orm/models/appStep.ts @@ -70,13 +70,11 @@ export class AppStepModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appSteps: { - nodes: InferSelectResult[]; - }; + appStep: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppStep', @@ -84,17 +82,26 @@ export class AppStepModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppStepFilter', + 'AppStepOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppStep', - fieldName: 'appSteps', + fieldName: 'appStep', document, variables, + transform: (data: { + appSteps?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appStep: data.appSteps?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/membershipType.ts b/sdk/constructive-cli/src/admin/orm/models/membershipType.ts index 40fac5490..ee7ed596c 100644 --- a/sdk/constructive-cli/src/admin/orm/models/membershipType.ts +++ b/sdk/constructive-cli/src/admin/orm/models/membershipType.ts @@ -70,13 +70,11 @@ export class MembershipTypeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - membershipTypes: { - nodes: InferSelectResult[]; - }; + membershipType: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'MembershipType', @@ -84,17 +82,26 @@ export class MembershipTypeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'MembershipTypeFilter', + 'MembershipTypeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'MembershipType', - fieldName: 'membershipTypes', + fieldName: 'membershipType', document, variables, + transform: (data: { + membershipTypes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + membershipType: data.membershipTypes?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgAdminGrant.ts b/sdk/constructive-cli/src/admin/orm/models/orgAdminGrant.ts index e611a8578..7b1337731 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgAdminGrant.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgAdminGrant.ts @@ -70,13 +70,11 @@ export class OrgAdminGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgAdminGrants: { - nodes: InferSelectResult[]; - }; + orgAdminGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgAdminGrant', @@ -84,17 +82,26 @@ export class OrgAdminGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgAdminGrantFilter', + 'OrgAdminGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgAdminGrant', - fieldName: 'orgAdminGrants', + fieldName: 'orgAdminGrant', document, variables, + transform: (data: { + orgAdminGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgAdminGrant: data.orgAdminGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgChartEdge.ts b/sdk/constructive-cli/src/admin/orm/models/orgChartEdge.ts index 6c6fc84cc..8a43b83a9 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgChartEdge.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgChartEdge.ts @@ -70,13 +70,11 @@ export class OrgChartEdgeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgChartEdges: { - nodes: InferSelectResult[]; - }; + orgChartEdge: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgChartEdge', @@ -84,17 +82,26 @@ export class OrgChartEdgeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgChartEdgeFilter', + 'OrgChartEdgeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgChartEdge', - fieldName: 'orgChartEdges', + fieldName: 'orgChartEdge', document, variables, + transform: (data: { + orgChartEdges?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgChartEdge: data.orgChartEdges?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgChartEdgeGrant.ts b/sdk/constructive-cli/src/admin/orm/models/orgChartEdgeGrant.ts index 58345c78d..168a6fe3d 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgChartEdgeGrant.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgChartEdgeGrant.ts @@ -70,13 +70,11 @@ export class OrgChartEdgeGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgChartEdgeGrants: { - nodes: InferSelectResult[]; - }; + orgChartEdgeGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgChartEdgeGrant', @@ -84,17 +82,26 @@ export class OrgChartEdgeGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgChartEdgeGrantFilter', + 'OrgChartEdgeGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgChartEdgeGrant', - fieldName: 'orgChartEdgeGrants', + fieldName: 'orgChartEdgeGrant', document, variables, + transform: (data: { + orgChartEdgeGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgChartEdgeGrant: data.orgChartEdgeGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgClaimedInvite.ts b/sdk/constructive-cli/src/admin/orm/models/orgClaimedInvite.ts index 475de7291..e1a3aecaf 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgClaimedInvite.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgClaimedInvite.ts @@ -70,13 +70,11 @@ export class OrgClaimedInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgClaimedInvites: { - nodes: InferSelectResult[]; - }; + orgClaimedInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgClaimedInvite', @@ -84,17 +82,26 @@ export class OrgClaimedInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgClaimedInviteFilter', + 'OrgClaimedInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgClaimedInvite', - fieldName: 'orgClaimedInvites', + fieldName: 'orgClaimedInvite', document, variables, + transform: (data: { + orgClaimedInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgClaimedInvite: data.orgClaimedInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgGetManagersRecord.ts b/sdk/constructive-cli/src/admin/orm/models/orgGetManagersRecord.ts index 9a0cefa8a..7c333b76d 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgGetManagersRecord.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgGetManagersRecord.ts @@ -70,13 +70,11 @@ export class OrgGetManagersRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGetManagers: { - nodes: InferSelectResult[]; - }; + orgGetManagersRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGetManagersRecord', @@ -84,17 +82,26 @@ export class OrgGetManagersRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGetManagersRecordFilter', + 'OrgGetManagersRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGetManagersRecord', - fieldName: 'orgGetManagers', + fieldName: 'orgGetManagersRecord', document, variables, + transform: (data: { + orgGetManagers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGetManagersRecord: data.orgGetManagers?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgGetSubordinatesRecord.ts b/sdk/constructive-cli/src/admin/orm/models/orgGetSubordinatesRecord.ts index 5eeec50ca..f259e1043 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgGetSubordinatesRecord.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgGetSubordinatesRecord.ts @@ -72,13 +72,11 @@ export class OrgGetSubordinatesRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGetSubordinates: { - nodes: InferSelectResult[]; - }; + orgGetSubordinatesRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGetSubordinatesRecord', @@ -86,17 +84,26 @@ export class OrgGetSubordinatesRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGetSubordinatesRecordFilter', + 'OrgGetSubordinatesRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGetSubordinatesRecord', - fieldName: 'orgGetSubordinates', + fieldName: 'orgGetSubordinatesRecord', document, variables, + transform: (data: { + orgGetSubordinates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGetSubordinatesRecord: data.orgGetSubordinates?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgGrant.ts b/sdk/constructive-cli/src/admin/orm/models/orgGrant.ts index 291264ec5..c8e74f5cc 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgGrant.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgGrant.ts @@ -70,13 +70,11 @@ export class OrgGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGrants: { - nodes: InferSelectResult[]; - }; + orgGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGrant', @@ -84,17 +82,26 @@ export class OrgGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGrantFilter', + 'OrgGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGrant', - fieldName: 'orgGrants', + fieldName: 'orgGrant', document, variables, + transform: (data: { + orgGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGrant: data.orgGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgInvite.ts b/sdk/constructive-cli/src/admin/orm/models/orgInvite.ts index 639cb8dd5..8d7931f07 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgInvite.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgInvite.ts @@ -70,13 +70,11 @@ export class OrgInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgInvites: { - nodes: InferSelectResult[]; - }; + orgInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgInvite', @@ -84,17 +82,26 @@ export class OrgInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgInviteFilter', + 'OrgInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgInvite', - fieldName: 'orgInvites', + fieldName: 'orgInvite', document, variables, + transform: (data: { + orgInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgInvite: data.orgInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgLimit.ts b/sdk/constructive-cli/src/admin/orm/models/orgLimit.ts index 2d7937963..48a3932f2 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgLimit.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgLimit.ts @@ -70,13 +70,11 @@ export class OrgLimitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimits: { - nodes: InferSelectResult[]; - }; + orgLimit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimit', @@ -84,17 +82,26 @@ export class OrgLimitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitFilter', + 'OrgLimitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimit', - fieldName: 'orgLimits', + fieldName: 'orgLimit', document, variables, + transform: (data: { + orgLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimit: data.orgLimits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgLimitAggregate.ts b/sdk/constructive-cli/src/admin/orm/models/orgLimitAggregate.ts index daee50aee..d74b9e7d9 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgLimitAggregate.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgLimitAggregate.ts @@ -70,13 +70,11 @@ export class OrgLimitAggregateModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitAggregates: { - nodes: InferSelectResult[]; - }; + orgLimitAggregate: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitAggregate', @@ -84,17 +82,26 @@ export class OrgLimitAggregateModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitAggregateFilter', + 'OrgLimitAggregateOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitAggregate', - fieldName: 'orgLimitAggregates', + fieldName: 'orgLimitAggregate', document, variables, + transform: (data: { + orgLimitAggregates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitAggregate: data.orgLimitAggregates?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgLimitDefault.ts b/sdk/constructive-cli/src/admin/orm/models/orgLimitDefault.ts index bf0cfcf5e..7e55bfd1f 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgLimitDefault.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgLimitDefault.ts @@ -70,13 +70,11 @@ export class OrgLimitDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitDefaults: { - nodes: InferSelectResult[]; - }; + orgLimitDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitDefault', @@ -84,17 +82,26 @@ export class OrgLimitDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitDefaultFilter', + 'OrgLimitDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitDefault', - fieldName: 'orgLimitDefaults', + fieldName: 'orgLimitDefault', document, variables, + transform: (data: { + orgLimitDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitDefault: data.orgLimitDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgLimitEvent.ts b/sdk/constructive-cli/src/admin/orm/models/orgLimitEvent.ts index 6414ba0ed..c259e325f 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgLimitEvent.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgLimitEvent.ts @@ -70,13 +70,11 @@ export class OrgLimitEventModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitEvents: { - nodes: InferSelectResult[]; - }; + orgLimitEvent: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitEvent', @@ -84,17 +82,26 @@ export class OrgLimitEventModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitEventFilter', + 'OrgLimitEventOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitEvent', - fieldName: 'orgLimitEvents', + fieldName: 'orgLimitEvent', document, variables, + transform: (data: { + orgLimitEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitEvent: data.orgLimitEvents?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgMember.ts b/sdk/constructive-cli/src/admin/orm/models/orgMember.ts index dd1d20e45..44f5608f4 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgMember.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgMember.ts @@ -70,13 +70,11 @@ export class OrgMemberModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembers: { - nodes: InferSelectResult[]; - }; + orgMember: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMember', @@ -84,17 +82,26 @@ export class OrgMemberModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMemberFilter', + 'OrgMemberOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMember', - fieldName: 'orgMembers', + fieldName: 'orgMember', document, variables, + transform: (data: { + orgMembers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMember: data.orgMembers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgMemberProfile.ts b/sdk/constructive-cli/src/admin/orm/models/orgMemberProfile.ts index de551ba79..77357e174 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgMemberProfile.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgMemberProfile.ts @@ -70,13 +70,11 @@ export class OrgMemberProfileModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMemberProfiles: { - nodes: InferSelectResult[]; - }; + orgMemberProfile: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMemberProfile', @@ -84,17 +82,26 @@ export class OrgMemberProfileModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMemberProfile', - fieldName: 'orgMemberProfiles', + fieldName: 'orgMemberProfile', document, variables, + transform: (data: { + orgMemberProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMemberProfile: data.orgMemberProfiles?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgMembership.ts b/sdk/constructive-cli/src/admin/orm/models/orgMembership.ts index c0173b3e1..623ec08fe 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgMembership.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgMembership.ts @@ -70,13 +70,11 @@ export class OrgMembershipModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMemberships: { - nodes: InferSelectResult[]; - }; + orgMembership: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembership', @@ -84,17 +82,26 @@ export class OrgMembershipModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipFilter', + 'OrgMembershipOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembership', - fieldName: 'orgMemberships', + fieldName: 'orgMembership', document, variables, + transform: (data: { + orgMemberships?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembership: data.orgMemberships?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgMembershipDefault.ts b/sdk/constructive-cli/src/admin/orm/models/orgMembershipDefault.ts index 09d525bec..344131505 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgMembershipDefault.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgMembershipDefault.ts @@ -72,13 +72,11 @@ export class OrgMembershipDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembershipDefaults: { - nodes: InferSelectResult[]; - }; + orgMembershipDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembershipDefault', @@ -86,17 +84,26 @@ export class OrgMembershipDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipDefaultFilter', + 'OrgMembershipDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembershipDefault', - fieldName: 'orgMembershipDefaults', + fieldName: 'orgMembershipDefault', document, variables, + transform: (data: { + orgMembershipDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembershipDefault: data.orgMembershipDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgMembershipSetting.ts b/sdk/constructive-cli/src/admin/orm/models/orgMembershipSetting.ts index 1efc26410..46801fc91 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgMembershipSetting.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgMembershipSetting.ts @@ -72,13 +72,11 @@ export class OrgMembershipSettingModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembershipSettings: { - nodes: InferSelectResult[]; - }; + orgMembershipSetting: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembershipSetting', @@ -86,17 +84,26 @@ export class OrgMembershipSettingModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipSettingFilter', + 'OrgMembershipSettingOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembershipSetting', - fieldName: 'orgMembershipSettings', + fieldName: 'orgMembershipSetting', document, variables, + transform: (data: { + orgMembershipSettings?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembershipSetting: data.orgMembershipSettings?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgOwnerGrant.ts b/sdk/constructive-cli/src/admin/orm/models/orgOwnerGrant.ts index bdf045511..9614dce8f 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgOwnerGrant.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgOwnerGrant.ts @@ -70,13 +70,11 @@ export class OrgOwnerGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgOwnerGrants: { - nodes: InferSelectResult[]; - }; + orgOwnerGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgOwnerGrant', @@ -84,17 +82,26 @@ export class OrgOwnerGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgOwnerGrantFilter', + 'OrgOwnerGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgOwnerGrant', - fieldName: 'orgOwnerGrants', + fieldName: 'orgOwnerGrant', document, variables, + transform: (data: { + orgOwnerGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgOwnerGrant: data.orgOwnerGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgPermission.ts b/sdk/constructive-cli/src/admin/orm/models/orgPermission.ts index c5910be63..7bdc90632 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgPermission.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgPermission.ts @@ -70,13 +70,11 @@ export class OrgPermissionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgPermissions: { - nodes: InferSelectResult[]; - }; + orgPermission: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgPermission', @@ -84,17 +82,26 @@ export class OrgPermissionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgPermissionFilter', + 'OrgPermissionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgPermission', - fieldName: 'orgPermissions', + fieldName: 'orgPermission', document, variables, + transform: (data: { + orgPermissions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgPermission: data.orgPermissions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/models/orgPermissionDefault.ts b/sdk/constructive-cli/src/admin/orm/models/orgPermissionDefault.ts index 40389a11b..8d00b9932 100644 --- a/sdk/constructive-cli/src/admin/orm/models/orgPermissionDefault.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgPermissionDefault.ts @@ -72,13 +72,11 @@ export class OrgPermissionDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgPermissionDefaults: { - nodes: InferSelectResult[]; - }; + orgPermissionDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgPermissionDefault', @@ -86,17 +84,26 @@ export class OrgPermissionDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgPermissionDefaultFilter', + 'OrgPermissionDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgPermissionDefault', - fieldName: 'orgPermissionDefaults', + fieldName: 'orgPermissionDefault', document, variables, + transform: (data: { + orgPermissionDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgPermissionDefault: data.orgPermissionDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/admin/orm/query-builder.ts b/sdk/constructive-cli/src/admin/orm/query-builder.ts index f2fd4566f..5abdd3372 100644 --- a/sdk/constructive-cli/src/admin/orm/query-builder.ts +++ b/sdk/constructive-cli/src/admin/orm/query-builder.ts @@ -293,8 +293,9 @@ export function buildFindFirstDocument( operationName: string, queryField: string, select: TSelect, - args: { where?: TWhere }, + args: { where?: TWhere; orderBy?: string[] }, filterTypeName: string, + orderByTypeName: string, connectionFieldsMap?: Record> ): { document: string; variables: Record } { const selections = select @@ -322,6 +323,16 @@ export function buildFindFirstDocument( queryArgs, variables ); + addVariable( + { + varName: 'orderBy', + typeName: '[' + orderByTypeName + '!]', + value: args.orderBy?.length ? args.orderBy : undefined, + }, + variableDefinitions, + queryArgs, + variables + ); const document = t.document({ definitions: [ diff --git a/sdk/constructive-cli/src/admin/orm/select-types.ts b/sdk/constructive-cli/src/admin/orm/select-types.ts index 2621b3570..9c1ec1ad2 100644 --- a/sdk/constructive-cli/src/admin/orm/select-types.ts +++ b/sdk/constructive-cli/src/admin/orm/select-types.ts @@ -27,9 +27,10 @@ export interface FindManyArgs { offset?: number; } -export interface FindFirstArgs { +export interface FindFirstArgs { select?: TSelect; where?: TWhere; + orderBy?: TOrderBy[]; } export interface CreateArgs { diff --git a/sdk/constructive-cli/src/auth/cli/commands/audit-log.ts b/sdk/constructive-cli/src/auth/cli/commands/audit-log.ts index 5c7263710..97194c6a6 100644 --- a/sdk/constructive-cli/src/auth/cli/commands/audit-log.ts +++ b/sdk/constructive-cli/src/auth/cli/commands/audit-log.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { createdAt: 'string', }; const usage = - '\naudit-log \n\nCommands:\n list List auditLog records\n find-first Find first matching auditLog record\n get Get a auditLog by ID\n create Create a new auditLog\n update Update an existing auditLog\n delete Delete a auditLog\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\naudit-log \n\nCommands:\n list List auditLog records\n find-first Find first matching auditLog record\n get Get a auditLog by ID\n create Create a new auditLog\n update Update an existing auditLog\n delete Delete a auditLog\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -114,7 +114,7 @@ async function handleFindFirst(argv: Partial>, _prompter createdAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AuditLogSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/auth/cli/commands/crypto-address.ts b/sdk/constructive-cli/src/auth/cli/commands/crypto-address.ts index 0ea18cc8b..7702adb84 100644 --- a/sdk/constructive-cli/src/auth/cli/commands/crypto-address.ts +++ b/sdk/constructive-cli/src/auth/cli/commands/crypto-address.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\ncrypto-address \n\nCommands:\n list List cryptoAddress records\n find-first Find first matching cryptoAddress record\n get Get a cryptoAddress by ID\n create Create a new cryptoAddress\n update Update an existing cryptoAddress\n delete Delete a cryptoAddress\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ncrypto-address \n\nCommands:\n list List cryptoAddress records\n find-first Find first matching cryptoAddress record\n get Get a cryptoAddress by ID\n create Create a new cryptoAddress\n update Update an existing cryptoAddress\n delete Delete a cryptoAddress\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -114,7 +114,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: CryptoAddressSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/auth/cli/commands/email.ts b/sdk/constructive-cli/src/auth/cli/commands/email.ts index fc42e6a23..fb0e10048 100644 --- a/sdk/constructive-cli/src/auth/cli/commands/email.ts +++ b/sdk/constructive-cli/src/auth/cli/commands/email.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nemail \n\nCommands:\n list List email records\n find-first Find first matching email record\n get Get a email by ID\n create Create a new email\n update Update an existing email\n delete Delete a email\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nemail \n\nCommands:\n list List email records\n find-first Find first matching email record\n get Get a email by ID\n create Create a new email\n update Update an existing email\n delete Delete a email\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -114,7 +114,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: EmailSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/auth/cli/commands/identity-provider.ts b/sdk/constructive-cli/src/auth/cli/commands/identity-provider.ts index 726ba76dd..01bb037de 100644 --- a/sdk/constructive-cli/src/auth/cli/commands/identity-provider.ts +++ b/sdk/constructive-cli/src/auth/cli/commands/identity-provider.ts @@ -23,7 +23,7 @@ const fieldSchema: FieldSchema = { isBuiltIn: 'boolean', }; const usage = - '\nidentity-provider \n\nCommands:\n list List identityProvider records\n find-first Find first matching identityProvider record\n create Create a new identityProvider\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nidentity-provider \n\nCommands:\n list List identityProvider records\n find-first Find first matching identityProvider record\n create Create a new identityProvider\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -99,7 +99,7 @@ async function handleFindFirst(argv: Partial>, _prompter isBuiltIn: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: IdentityProviderSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/auth/cli/commands/phone-number.ts b/sdk/constructive-cli/src/auth/cli/commands/phone-number.ts index c2d6537eb..26c1459ce 100644 --- a/sdk/constructive-cli/src/auth/cli/commands/phone-number.ts +++ b/sdk/constructive-cli/src/auth/cli/commands/phone-number.ts @@ -27,7 +27,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nphone-number \n\nCommands:\n list List phoneNumber records\n find-first Find first matching phoneNumber record\n get Get a phoneNumber by ID\n create Create a new phoneNumber\n update Update an existing phoneNumber\n delete Delete a phoneNumber\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nphone-number \n\nCommands:\n list List phoneNumber records\n find-first Find first matching phoneNumber record\n get Get a phoneNumber by ID\n create Create a new phoneNumber\n update Update an existing phoneNumber\n delete Delete a phoneNumber\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -117,7 +117,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: PhoneNumberSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/auth/cli/commands/role-type.ts b/sdk/constructive-cli/src/auth/cli/commands/role-type.ts index b29048ae9..565ef8219 100644 --- a/sdk/constructive-cli/src/auth/cli/commands/role-type.ts +++ b/sdk/constructive-cli/src/auth/cli/commands/role-type.ts @@ -20,7 +20,7 @@ const fieldSchema: FieldSchema = { name: 'string', }; const usage = - '\nrole-type \n\nCommands:\n list List roleType records\n find-first Find first matching roleType record\n get Get a roleType by ID\n create Create a new roleType\n update Update an existing roleType\n delete Delete a roleType\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nrole-type \n\nCommands:\n list List roleType records\n find-first Find first matching roleType record\n get Get a roleType by ID\n create Create a new roleType\n update Update an existing roleType\n delete Delete a roleType\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -96,7 +96,7 @@ async function handleFindFirst(argv: Partial>, _prompter name: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: RoleTypeSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/auth/cli/commands/user-connected-account.ts b/sdk/constructive-cli/src/auth/cli/commands/user-connected-account.ts index 26fd78bcf..a73861ea4 100644 --- a/sdk/constructive-cli/src/auth/cli/commands/user-connected-account.ts +++ b/sdk/constructive-cli/src/auth/cli/commands/user-connected-account.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nuser-connected-account \n\nCommands:\n list List userConnectedAccount records\n find-first Find first matching userConnectedAccount record\n create Create a new userConnectedAccount\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nuser-connected-account \n\nCommands:\n list List userConnectedAccount records\n find-first Find first matching userConnectedAccount record\n create Create a new userConnectedAccount\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -112,7 +112,11 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy + > & { select: UserConnectedAccountSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/auth/cli/commands/user.ts b/sdk/constructive-cli/src/auth/cli/commands/user.ts index 7bf4feb16..afbb1aba9 100644 --- a/sdk/constructive-cli/src/auth/cli/commands/user.ts +++ b/sdk/constructive-cli/src/auth/cli/commands/user.ts @@ -29,7 +29,7 @@ const fieldSchema: FieldSchema = { searchScore: 'float', }; const usage = - '\nuser \n\nCommands:\n list List user records\n find-first Find first matching user record\n search Search user records\n get Get a user by ID\n create Create a new user\n update Update an existing user\n delete Delete a user\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\nSearch Options:\n Search query string (required)\n --limit Max number of records to return\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --orderBy Comma-separated list of ordering values\n\n --help, -h Show this help message\n'; + '\nuser \n\nCommands:\n list List user records\n find-first Find first matching user record\n search Search user records\n get Get a user by ID\n create Create a new user\n update Update an existing user\n delete Delete a user\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nSearch Options:\n Search query string (required)\n --limit Max number of records to return\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --orderBy Comma-separated list of ordering values\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -117,7 +117,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: UserSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/auth/cli/commands/webauthn-credential.ts b/sdk/constructive-cli/src/auth/cli/commands/webauthn-credential.ts index b3890c2a5..db01a43f3 100644 --- a/sdk/constructive-cli/src/auth/cli/commands/webauthn-credential.ts +++ b/sdk/constructive-cli/src/auth/cli/commands/webauthn-credential.ts @@ -32,7 +32,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nwebauthn-credential \n\nCommands:\n list List webauthnCredential records\n find-first Find first matching webauthnCredential record\n get Get a webauthnCredential by ID\n create Create a new webauthnCredential\n update Update an existing webauthnCredential\n delete Delete a webauthnCredential\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nwebauthn-credential \n\nCommands:\n list List webauthnCredential records\n find-first Find first matching webauthnCredential record\n get Get a webauthnCredential by ID\n create Create a new webauthnCredential\n update Update an existing webauthnCredential\n delete Delete a webauthnCredential\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -136,7 +136,11 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + WebauthnCredentialSelect, + WebauthnCredentialFilter, + WebauthnCredentialOrderBy + > & { select: WebauthnCredentialSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/auth/cli/utils.ts b/sdk/constructive-cli/src/auth/cli/utils.ts index 1a3f288db..78a7defb6 100644 --- a/sdk/constructive-cli/src/auth/cli/utils.ts +++ b/sdk/constructive-cli/src/auth/cli/utils.ts @@ -255,8 +255,8 @@ export function parseFindManyArgs>( /** * Build findFirst args from CLI argv. - * Like parseFindManyArgs but only includes select and where - * (no pagination flags — findFirst returns the first matching record). + * Like parseFindManyArgs but without pagination flags (no limit/offset/after/before/last) + * — findFirst returns the first matching record. Supports select, where, and orderBy. */ export function parseFindFirstArgs>( argv: Record, @@ -265,10 +265,12 @@ export function parseFindFirstArgs>( const select = parseSelectFlag(argv, defaultSelect); const parsed = unflattenDotNotation(argv); const where = parsed.where; + const orderBy = parseOrderByFlag(argv); return { select, ...(where !== undefined ? { where } : {}), + ...(orderBy !== undefined ? { orderBy } : {}), } as unknown as T; } diff --git a/sdk/constructive-cli/src/auth/orm/models/auditLog.ts b/sdk/constructive-cli/src/auth/orm/models/auditLog.ts index 2d388026d..8d8abc012 100644 --- a/sdk/constructive-cli/src/auth/orm/models/auditLog.ts +++ b/sdk/constructive-cli/src/auth/orm/models/auditLog.ts @@ -70,13 +70,11 @@ export class AuditLogModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - auditLogs: { - nodes: InferSelectResult[]; - }; + auditLog: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AuditLog', @@ -84,17 +82,26 @@ export class AuditLogModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AuditLogFilter', + 'AuditLogOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AuditLog', - fieldName: 'auditLogs', + fieldName: 'auditLog', document, variables, + transform: (data: { + auditLogs?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + auditLog: data.auditLogs?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/auth/orm/models/cryptoAddress.ts b/sdk/constructive-cli/src/auth/orm/models/cryptoAddress.ts index 7357c0126..11914bd9d 100644 --- a/sdk/constructive-cli/src/auth/orm/models/cryptoAddress.ts +++ b/sdk/constructive-cli/src/auth/orm/models/cryptoAddress.ts @@ -70,13 +70,11 @@ export class CryptoAddressModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - cryptoAddresses: { - nodes: InferSelectResult[]; - }; + cryptoAddress: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'CryptoAddress', @@ -84,17 +82,26 @@ export class CryptoAddressModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CryptoAddressFilter', + 'CryptoAddressOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'CryptoAddress', - fieldName: 'cryptoAddresses', + fieldName: 'cryptoAddress', document, variables, + transform: (data: { + cryptoAddresses?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + cryptoAddress: data.cryptoAddresses?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/auth/orm/models/email.ts b/sdk/constructive-cli/src/auth/orm/models/email.ts index aa83efc07..325475b9c 100644 --- a/sdk/constructive-cli/src/auth/orm/models/email.ts +++ b/sdk/constructive-cli/src/auth/orm/models/email.ts @@ -70,13 +70,11 @@ export class EmailModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - emails: { - nodes: InferSelectResult[]; - }; + email: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Email', @@ -84,17 +82,26 @@ export class EmailModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EmailFilter', + 'EmailOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Email', - fieldName: 'emails', + fieldName: 'email', document, variables, + transform: (data: { + emails?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + email: data.emails?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/auth/orm/models/identityProvider.ts b/sdk/constructive-cli/src/auth/orm/models/identityProvider.ts index 9c9cfc0d9..cdc672145 100644 --- a/sdk/constructive-cli/src/auth/orm/models/identityProvider.ts +++ b/sdk/constructive-cli/src/auth/orm/models/identityProvider.ts @@ -70,13 +70,11 @@ export class IdentityProviderModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - identityProviders: { - nodes: InferSelectResult[]; - }; + identityProvider: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'IdentityProvider', @@ -84,17 +82,26 @@ export class IdentityProviderModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'IdentityProviderFilter', + 'IdentityProviderOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'IdentityProvider', - fieldName: 'identityProviders', + fieldName: 'identityProvider', document, variables, + transform: (data: { + identityProviders?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + identityProvider: data.identityProviders?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-cli/src/auth/orm/models/phoneNumber.ts b/sdk/constructive-cli/src/auth/orm/models/phoneNumber.ts index a711db272..0803908e2 100644 --- a/sdk/constructive-cli/src/auth/orm/models/phoneNumber.ts +++ b/sdk/constructive-cli/src/auth/orm/models/phoneNumber.ts @@ -70,13 +70,11 @@ export class PhoneNumberModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - phoneNumbers: { - nodes: InferSelectResult[]; - }; + phoneNumber: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PhoneNumber', @@ -84,17 +82,26 @@ export class PhoneNumberModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PhoneNumberFilter', + 'PhoneNumberOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PhoneNumber', - fieldName: 'phoneNumbers', + fieldName: 'phoneNumber', document, variables, + transform: (data: { + phoneNumbers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + phoneNumber: data.phoneNumbers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/auth/orm/models/roleType.ts b/sdk/constructive-cli/src/auth/orm/models/roleType.ts index 5b258dc9a..8b256a0dc 100644 --- a/sdk/constructive-cli/src/auth/orm/models/roleType.ts +++ b/sdk/constructive-cli/src/auth/orm/models/roleType.ts @@ -70,13 +70,11 @@ export class RoleTypeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - roleTypes: { - nodes: InferSelectResult[]; - }; + roleType: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'RoleType', @@ -84,17 +82,26 @@ export class RoleTypeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RoleTypeFilter', + 'RoleTypeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'RoleType', - fieldName: 'roleTypes', + fieldName: 'roleType', document, variables, + transform: (data: { + roleTypes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + roleType: data.roleTypes?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/auth/orm/models/user.ts b/sdk/constructive-cli/src/auth/orm/models/user.ts index aedd4fcc8..893581835 100644 --- a/sdk/constructive-cli/src/auth/orm/models/user.ts +++ b/sdk/constructive-cli/src/auth/orm/models/user.ts @@ -70,13 +70,11 @@ export class UserModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - users: { - nodes: InferSelectResult[]; - }; + user: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'User', @@ -84,17 +82,26 @@ export class UserModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UserFilter', + 'UserOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'User', - fieldName: 'users', + fieldName: 'user', document, variables, + transform: (data: { + users?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + user: data.users?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/auth/orm/models/userConnectedAccount.ts b/sdk/constructive-cli/src/auth/orm/models/userConnectedAccount.ts index 45bbea7f4..a2344afdf 100644 --- a/sdk/constructive-cli/src/auth/orm/models/userConnectedAccount.ts +++ b/sdk/constructive-cli/src/auth/orm/models/userConnectedAccount.ts @@ -72,13 +72,11 @@ export class UserConnectedAccountModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - userConnectedAccounts: { - nodes: InferSelectResult[]; - }; + userConnectedAccount: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'UserConnectedAccount', @@ -86,17 +84,26 @@ export class UserConnectedAccountModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'UserConnectedAccount', - fieldName: 'userConnectedAccounts', + fieldName: 'userConnectedAccount', document, variables, + transform: (data: { + userConnectedAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userConnectedAccount: data.userConnectedAccounts?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/auth/orm/models/webauthnCredential.ts b/sdk/constructive-cli/src/auth/orm/models/webauthnCredential.ts index f02cf10bc..cca4c75cf 100644 --- a/sdk/constructive-cli/src/auth/orm/models/webauthnCredential.ts +++ b/sdk/constructive-cli/src/auth/orm/models/webauthnCredential.ts @@ -70,13 +70,11 @@ export class WebauthnCredentialModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - webauthnCredentials: { - nodes: InferSelectResult[]; - }; + webauthnCredential: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'WebauthnCredential', @@ -84,17 +82,26 @@ export class WebauthnCredentialModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'WebauthnCredentialFilter', + 'WebauthnCredentialOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'WebauthnCredential', - fieldName: 'webauthnCredentials', + fieldName: 'webauthnCredential', document, variables, + transform: (data: { + webauthnCredentials?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + webauthnCredential: data.webauthnCredentials?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/auth/orm/query-builder.ts b/sdk/constructive-cli/src/auth/orm/query-builder.ts index f2fd4566f..5abdd3372 100644 --- a/sdk/constructive-cli/src/auth/orm/query-builder.ts +++ b/sdk/constructive-cli/src/auth/orm/query-builder.ts @@ -293,8 +293,9 @@ export function buildFindFirstDocument( operationName: string, queryField: string, select: TSelect, - args: { where?: TWhere }, + args: { where?: TWhere; orderBy?: string[] }, filterTypeName: string, + orderByTypeName: string, connectionFieldsMap?: Record> ): { document: string; variables: Record } { const selections = select @@ -322,6 +323,16 @@ export function buildFindFirstDocument( queryArgs, variables ); + addVariable( + { + varName: 'orderBy', + typeName: '[' + orderByTypeName + '!]', + value: args.orderBy?.length ? args.orderBy : undefined, + }, + variableDefinitions, + queryArgs, + variables + ); const document = t.document({ definitions: [ diff --git a/sdk/constructive-cli/src/auth/orm/select-types.ts b/sdk/constructive-cli/src/auth/orm/select-types.ts index 2621b3570..9c1ec1ad2 100644 --- a/sdk/constructive-cli/src/auth/orm/select-types.ts +++ b/sdk/constructive-cli/src/auth/orm/select-types.ts @@ -27,9 +27,10 @@ export interface FindManyArgs { offset?: number; } -export interface FindFirstArgs { +export interface FindFirstArgs { select?: TSelect; where?: TWhere; + orderBy?: TOrderBy[]; } export interface CreateArgs { diff --git a/sdk/constructive-cli/src/objects/cli/commands/commit.ts b/sdk/constructive-cli/src/objects/cli/commands/commit.ts index 45ab130b7..02b4952ad 100644 --- a/sdk/constructive-cli/src/objects/cli/commands/commit.ts +++ b/sdk/constructive-cli/src/objects/cli/commands/commit.ts @@ -27,7 +27,7 @@ const fieldSchema: FieldSchema = { date: 'string', }; const usage = - '\ncommit \n\nCommands:\n list List commit records\n find-first Find first matching commit record\n get Get a commit by ID\n create Create a new commit\n update Update an existing commit\n delete Delete a commit\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ncommit \n\nCommands:\n list List commit records\n find-first Find first matching commit record\n get Get a commit by ID\n create Create a new commit\n update Update an existing commit\n delete Delete a commit\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -117,7 +117,7 @@ async function handleFindFirst(argv: Partial>, _prompter date: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: CommitSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/objects/cli/commands/get-all-record.ts b/sdk/constructive-cli/src/objects/cli/commands/get-all-record.ts index 2e18efa39..bb72aac01 100644 --- a/sdk/constructive-cli/src/objects/cli/commands/get-all-record.ts +++ b/sdk/constructive-cli/src/objects/cli/commands/get-all-record.ts @@ -20,7 +20,7 @@ const fieldSchema: FieldSchema = { data: 'json', }; const usage = - '\nget-all-record \n\nCommands:\n list List getAllRecord records\n find-first Find first matching getAllRecord record\n create Create a new getAllRecord\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nget-all-record \n\nCommands:\n list List getAllRecord records\n find-first Find first matching getAllRecord record\n create Create a new getAllRecord\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -90,7 +90,7 @@ async function handleFindFirst(argv: Partial>, _prompter data: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: GetAllRecordSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/objects/cli/commands/object.ts b/sdk/constructive-cli/src/objects/cli/commands/object.ts index a731ea2dd..d99526a4e 100644 --- a/sdk/constructive-cli/src/objects/cli/commands/object.ts +++ b/sdk/constructive-cli/src/objects/cli/commands/object.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { createdAt: 'string', }; const usage = - '\nobject \n\nCommands:\n list List object records\n find-first Find first matching object record\n get Get a object by ID\n create Create a new object\n update Update an existing object\n delete Delete a object\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nobject \n\nCommands:\n list List object records\n find-first Find first matching object record\n get Get a object by ID\n create Create a new object\n update Update an existing object\n delete Delete a object\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -112,7 +112,7 @@ async function handleFindFirst(argv: Partial>, _prompter createdAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: ObjectSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/objects/cli/commands/ref.ts b/sdk/constructive-cli/src/objects/cli/commands/ref.ts index 8595f4926..cc4ef6922 100644 --- a/sdk/constructive-cli/src/objects/cli/commands/ref.ts +++ b/sdk/constructive-cli/src/objects/cli/commands/ref.ts @@ -23,7 +23,7 @@ const fieldSchema: FieldSchema = { commitId: 'uuid', }; const usage = - '\nref \n\nCommands:\n list List ref records\n find-first Find first matching ref record\n get Get a ref by ID\n create Create a new ref\n update Update an existing ref\n delete Delete a ref\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nref \n\nCommands:\n list List ref records\n find-first Find first matching ref record\n get Get a ref by ID\n create Create a new ref\n update Update an existing ref\n delete Delete a ref\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -105,7 +105,7 @@ async function handleFindFirst(argv: Partial>, _prompter commitId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: RefSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/objects/cli/commands/store.ts b/sdk/constructive-cli/src/objects/cli/commands/store.ts index cb3879c59..eba292c2f 100644 --- a/sdk/constructive-cli/src/objects/cli/commands/store.ts +++ b/sdk/constructive-cli/src/objects/cli/commands/store.ts @@ -23,7 +23,7 @@ const fieldSchema: FieldSchema = { createdAt: 'string', }; const usage = - '\nstore \n\nCommands:\n list List store records\n find-first Find first matching store record\n get Get a store by ID\n create Create a new store\n update Update an existing store\n delete Delete a store\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nstore \n\nCommands:\n list List store records\n find-first Find first matching store record\n get Get a store by ID\n create Create a new store\n update Update an existing store\n delete Delete a store\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -105,7 +105,7 @@ async function handleFindFirst(argv: Partial>, _prompter createdAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: StoreSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/objects/cli/utils.ts b/sdk/constructive-cli/src/objects/cli/utils.ts index 1a3f288db..78a7defb6 100644 --- a/sdk/constructive-cli/src/objects/cli/utils.ts +++ b/sdk/constructive-cli/src/objects/cli/utils.ts @@ -255,8 +255,8 @@ export function parseFindManyArgs>( /** * Build findFirst args from CLI argv. - * Like parseFindManyArgs but only includes select and where - * (no pagination flags — findFirst returns the first matching record). + * Like parseFindManyArgs but without pagination flags (no limit/offset/after/before/last) + * — findFirst returns the first matching record. Supports select, where, and orderBy. */ export function parseFindFirstArgs>( argv: Record, @@ -265,10 +265,12 @@ export function parseFindFirstArgs>( const select = parseSelectFlag(argv, defaultSelect); const parsed = unflattenDotNotation(argv); const where = parsed.where; + const orderBy = parseOrderByFlag(argv); return { select, ...(where !== undefined ? { where } : {}), + ...(orderBy !== undefined ? { orderBy } : {}), } as unknown as T; } diff --git a/sdk/constructive-cli/src/objects/orm/models/commit.ts b/sdk/constructive-cli/src/objects/orm/models/commit.ts index de0e94710..70f5c5960 100644 --- a/sdk/constructive-cli/src/objects/orm/models/commit.ts +++ b/sdk/constructive-cli/src/objects/orm/models/commit.ts @@ -70,13 +70,11 @@ export class CommitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - commits: { - nodes: InferSelectResult[]; - }; + commit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Commit', @@ -84,17 +82,26 @@ export class CommitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CommitFilter', + 'CommitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Commit', - fieldName: 'commits', + fieldName: 'commit', document, variables, + transform: (data: { + commits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + commit: data.commits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/objects/orm/models/getAllRecord.ts b/sdk/constructive-cli/src/objects/orm/models/getAllRecord.ts index 53873a0f3..39a82fbbb 100644 --- a/sdk/constructive-cli/src/objects/orm/models/getAllRecord.ts +++ b/sdk/constructive-cli/src/objects/orm/models/getAllRecord.ts @@ -70,13 +70,11 @@ export class GetAllRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - getAll: { - nodes: InferSelectResult[]; - }; + getAllRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'GetAllRecord', @@ -84,17 +82,26 @@ export class GetAllRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'GetAllRecordFilter', + 'GetAllRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'GetAllRecord', - fieldName: 'getAll', + fieldName: 'getAllRecord', document, variables, + transform: (data: { + getAll?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + getAllRecord: data.getAll?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-cli/src/objects/orm/models/object.ts b/sdk/constructive-cli/src/objects/orm/models/object.ts index 085bdd4df..8a685b1df 100644 --- a/sdk/constructive-cli/src/objects/orm/models/object.ts +++ b/sdk/constructive-cli/src/objects/orm/models/object.ts @@ -70,13 +70,11 @@ export class ObjectModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - objects: { - nodes: InferSelectResult[]; - }; + object: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Object', @@ -84,17 +82,26 @@ export class ObjectModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ObjectFilter', + 'ObjectOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Object', - fieldName: 'objects', + fieldName: 'object', document, variables, + transform: (data: { + objects?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + object: data.objects?.nodes?.[0] ?? null, + }), }); } findOne( @@ -103,7 +110,7 @@ export class ObjectModel { select: S; } & StrictSelect ): QueryBuilder<{ - getNodeAtPath: InferSelectResult | null; + object: InferSelectResult | null; }> { const { document, variables } = buildFindOneDocument( 'Object', @@ -118,7 +125,7 @@ export class ObjectModel { client: this.client, operation: 'query', operationName: 'Object', - fieldName: 'getNodeAtPath', + fieldName: 'object', document, variables, }); diff --git a/sdk/constructive-cli/src/objects/orm/models/ref.ts b/sdk/constructive-cli/src/objects/orm/models/ref.ts index 016c70644..5c3419d89 100644 --- a/sdk/constructive-cli/src/objects/orm/models/ref.ts +++ b/sdk/constructive-cli/src/objects/orm/models/ref.ts @@ -70,13 +70,11 @@ export class RefModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - refs: { - nodes: InferSelectResult[]; - }; + ref: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Ref', @@ -84,17 +82,26 @@ export class RefModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RefFilter', + 'RefOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Ref', - fieldName: 'refs', + fieldName: 'ref', document, variables, + transform: (data: { + refs?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + ref: data.refs?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/objects/orm/models/store.ts b/sdk/constructive-cli/src/objects/orm/models/store.ts index f249ee921..f80e63890 100644 --- a/sdk/constructive-cli/src/objects/orm/models/store.ts +++ b/sdk/constructive-cli/src/objects/orm/models/store.ts @@ -70,13 +70,11 @@ export class StoreModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - stores: { - nodes: InferSelectResult[]; - }; + store: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Store', @@ -84,17 +82,26 @@ export class StoreModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'StoreFilter', + 'StoreOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Store', - fieldName: 'stores', + fieldName: 'store', document, variables, + transform: (data: { + stores?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + store: data.stores?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/objects/orm/query-builder.ts b/sdk/constructive-cli/src/objects/orm/query-builder.ts index f2fd4566f..5abdd3372 100644 --- a/sdk/constructive-cli/src/objects/orm/query-builder.ts +++ b/sdk/constructive-cli/src/objects/orm/query-builder.ts @@ -293,8 +293,9 @@ export function buildFindFirstDocument( operationName: string, queryField: string, select: TSelect, - args: { where?: TWhere }, + args: { where?: TWhere; orderBy?: string[] }, filterTypeName: string, + orderByTypeName: string, connectionFieldsMap?: Record> ): { document: string; variables: Record } { const selections = select @@ -322,6 +323,16 @@ export function buildFindFirstDocument( queryArgs, variables ); + addVariable( + { + varName: 'orderBy', + typeName: '[' + orderByTypeName + '!]', + value: args.orderBy?.length ? args.orderBy : undefined, + }, + variableDefinitions, + queryArgs, + variables + ); const document = t.document({ definitions: [ diff --git a/sdk/constructive-cli/src/objects/orm/select-types.ts b/sdk/constructive-cli/src/objects/orm/select-types.ts index 2621b3570..9c1ec1ad2 100644 --- a/sdk/constructive-cli/src/objects/orm/select-types.ts +++ b/sdk/constructive-cli/src/objects/orm/select-types.ts @@ -27,9 +27,10 @@ export interface FindManyArgs { offset?: number; } -export interface FindFirstArgs { +export interface FindFirstArgs { select?: TSelect; where?: TWhere; + orderBy?: TOrderBy[]; } export interface CreateArgs { diff --git a/sdk/constructive-cli/src/public/cli/commands/agent-message.ts b/sdk/constructive-cli/src/public/cli/commands/agent-message.ts index 4abb81a2f..b30f34c4e 100644 --- a/sdk/constructive-cli/src/public/cli/commands/agent-message.ts +++ b/sdk/constructive-cli/src/public/cli/commands/agent-message.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { parts: 'json', }; const usage = - '\nagent-message \n\nCommands:\n list List agentMessage records\n find-first Find first matching agentMessage record\n get Get a agentMessage by ID\n create Create a new agentMessage\n update Update an existing agentMessage\n delete Delete a agentMessage\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nagent-message \n\nCommands:\n list List agentMessage records\n find-first Find first matching agentMessage record\n get Get a agentMessage by ID\n create Create a new agentMessage\n update Update an existing agentMessage\n delete Delete a agentMessage\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -114,7 +114,7 @@ async function handleFindFirst(argv: Partial>, _prompter parts: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AgentMessageSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/agent-task.ts b/sdk/constructive-cli/src/public/cli/commands/agent-task.ts index 95ba3f583..db48a19fd 100644 --- a/sdk/constructive-cli/src/public/cli/commands/agent-task.ts +++ b/sdk/constructive-cli/src/public/cli/commands/agent-task.ts @@ -28,7 +28,7 @@ const fieldSchema: FieldSchema = { status: 'string', }; const usage = - '\nagent-task \n\nCommands:\n list List agentTask records\n find-first Find first matching agentTask record\n get Get a agentTask by ID\n create Create a new agentTask\n update Update an existing agentTask\n delete Delete a agentTask\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nagent-task \n\nCommands:\n list List agentTask records\n find-first Find first matching agentTask record\n get Get a agentTask by ID\n create Create a new agentTask\n update Update an existing agentTask\n delete Delete a agentTask\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -120,7 +120,7 @@ async function handleFindFirst(argv: Partial>, _prompter status: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AgentTaskSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/agent-thread.ts b/sdk/constructive-cli/src/public/cli/commands/agent-thread.ts index 0c8712767..23b81fd7d 100644 --- a/sdk/constructive-cli/src/public/cli/commands/agent-thread.ts +++ b/sdk/constructive-cli/src/public/cli/commands/agent-thread.ts @@ -28,7 +28,7 @@ const fieldSchema: FieldSchema = { status: 'string', }; const usage = - '\nagent-thread \n\nCommands:\n list List agentThread records\n find-first Find first matching agentThread record\n get Get a agentThread by ID\n create Create a new agentThread\n update Update an existing agentThread\n delete Delete a agentThread\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nagent-thread \n\nCommands:\n list List agentThread records\n find-first Find first matching agentThread record\n get Get a agentThread by ID\n create Create a new agentThread\n update Update an existing agentThread\n delete Delete a agentThread\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -120,7 +120,7 @@ async function handleFindFirst(argv: Partial>, _prompter status: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AgentThreadSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/api-module.ts b/sdk/constructive-cli/src/public/cli/commands/api-module.ts index 8cc1460b1..590ecf075 100644 --- a/sdk/constructive-cli/src/public/cli/commands/api-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/api-module.ts @@ -23,7 +23,7 @@ const fieldSchema: FieldSchema = { data: 'json', }; const usage = - '\napi-module \n\nCommands:\n list List apiModule records\n find-first Find first matching apiModule record\n get Get a apiModule by ID\n create Create a new apiModule\n update Update an existing apiModule\n delete Delete a apiModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napi-module \n\nCommands:\n list List apiModule records\n find-first Find first matching apiModule record\n get Get a apiModule by ID\n create Create a new apiModule\n update Update an existing apiModule\n delete Delete a apiModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -105,7 +105,7 @@ async function handleFindFirst(argv: Partial>, _prompter data: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: ApiModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/api-schema.ts b/sdk/constructive-cli/src/public/cli/commands/api-schema.ts index bad7dec89..b1713e0b3 100644 --- a/sdk/constructive-cli/src/public/cli/commands/api-schema.ts +++ b/sdk/constructive-cli/src/public/cli/commands/api-schema.ts @@ -22,7 +22,7 @@ const fieldSchema: FieldSchema = { apiId: 'uuid', }; const usage = - '\napi-schema \n\nCommands:\n list List apiSchema records\n find-first Find first matching apiSchema record\n get Get a apiSchema by ID\n create Create a new apiSchema\n update Update an existing apiSchema\n delete Delete a apiSchema\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napi-schema \n\nCommands:\n list List apiSchema records\n find-first Find first matching apiSchema record\n get Get a apiSchema by ID\n create Create a new apiSchema\n update Update an existing apiSchema\n delete Delete a apiSchema\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -102,7 +102,7 @@ async function handleFindFirst(argv: Partial>, _prompter apiId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: ApiSchemaSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/api.ts b/sdk/constructive-cli/src/public/cli/commands/api.ts index 80a41ba0e..b10fa5f7e 100644 --- a/sdk/constructive-cli/src/public/cli/commands/api.ts +++ b/sdk/constructive-cli/src/public/cli/commands/api.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { isPublic: 'boolean', }; const usage = - '\napi \n\nCommands:\n list List api records\n find-first Find first matching api record\n get Get a api by ID\n create Create a new api\n update Update an existing api\n delete Delete a api\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napi \n\nCommands:\n list List api records\n find-first Find first matching api record\n get Get a api by ID\n create Create a new api\n update Update an existing api\n delete Delete a api\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter isPublic: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: ApiSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/app-achievement.ts b/sdk/constructive-cli/src/public/cli/commands/app-achievement.ts index 040c863a9..abba21410 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app-achievement.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app-achievement.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-achievement \n\nCommands:\n list List appAchievement records\n find-first Find first matching appAchievement record\n get Get a appAchievement by ID\n create Create a new appAchievement\n update Update an existing appAchievement\n delete Delete a appAchievement\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-achievement \n\nCommands:\n list List appAchievement records\n find-first Find first matching appAchievement record\n get Get a appAchievement by ID\n create Create a new appAchievement\n update Update an existing appAchievement\n delete Delete a appAchievement\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -108,7 +108,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppAchievementSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/app-admin-grant.ts b/sdk/constructive-cli/src/public/cli/commands/app-admin-grant.ts index e30b63954..3003d188c 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app-admin-grant.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app-admin-grant.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-admin-grant \n\nCommands:\n list List appAdminGrant records\n find-first Find first matching appAdminGrant record\n get Get a appAdminGrant by ID\n create Create a new appAdminGrant\n update Update an existing appAdminGrant\n delete Delete a appAdminGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-admin-grant \n\nCommands:\n list List appAdminGrant records\n find-first Find first matching appAdminGrant record\n get Get a appAdminGrant by ID\n create Create a new appAdminGrant\n update Update an existing appAdminGrant\n delete Delete a appAdminGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -108,7 +108,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppAdminGrantSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/app-claimed-invite.ts b/sdk/constructive-cli/src/public/cli/commands/app-claimed-invite.ts index ee5d83bd9..8aa351cfd 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app-claimed-invite.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app-claimed-invite.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-claimed-invite \n\nCommands:\n list List appClaimedInvite records\n find-first Find first matching appClaimedInvite record\n get Get a appClaimedInvite by ID\n create Create a new appClaimedInvite\n update Update an existing appClaimedInvite\n delete Delete a appClaimedInvite\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-claimed-invite \n\nCommands:\n list List appClaimedInvite records\n find-first Find first matching appClaimedInvite record\n get Get a appClaimedInvite by ID\n create Create a new appClaimedInvite\n update Update an existing appClaimedInvite\n delete Delete a appClaimedInvite\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -108,7 +108,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppClaimedInviteSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/app-grant.ts b/sdk/constructive-cli/src/public/cli/commands/app-grant.ts index 961288ffa..ea2461614 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app-grant.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app-grant.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-grant \n\nCommands:\n list List appGrant records\n find-first Find first matching appGrant record\n get Get a appGrant by ID\n create Create a new appGrant\n update Update an existing appGrant\n delete Delete a appGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-grant \n\nCommands:\n list List appGrant records\n find-first Find first matching appGrant record\n get Get a appGrant by ID\n create Create a new appGrant\n update Update an existing appGrant\n delete Delete a appGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppGrantSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/app-invite.ts b/sdk/constructive-cli/src/public/cli/commands/app-invite.ts index 79bf0a111..46ada6b22 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app-invite.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app-invite.ts @@ -31,7 +31,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-invite \n\nCommands:\n list List appInvite records\n find-first Find first matching appInvite record\n get Get a appInvite by ID\n create Create a new appInvite\n update Update an existing appInvite\n delete Delete a appInvite\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-invite \n\nCommands:\n list List appInvite records\n find-first Find first matching appInvite record\n get Get a appInvite by ID\n create Create a new appInvite\n update Update an existing appInvite\n delete Delete a appInvite\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -129,7 +129,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppInviteSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/app-level-requirement.ts b/sdk/constructive-cli/src/public/cli/commands/app-level-requirement.ts index dcad1ad7c..c81e9af6f 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app-level-requirement.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app-level-requirement.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-level-requirement \n\nCommands:\n list List appLevelRequirement records\n find-first Find first matching appLevelRequirement record\n get Get a appLevelRequirement by ID\n create Create a new appLevelRequirement\n update Update an existing appLevelRequirement\n delete Delete a appLevelRequirement\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-level-requirement \n\nCommands:\n list List appLevelRequirement records\n find-first Find first matching appLevelRequirement record\n get Get a appLevelRequirement by ID\n create Create a new appLevelRequirement\n update Update an existing appLevelRequirement\n delete Delete a appLevelRequirement\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -118,7 +118,11 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + AppLevelRequirementSelect, + AppLevelRequirementFilter, + AppLevelRequirementOrderBy + > & { select: AppLevelRequirementSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/app-level.ts b/sdk/constructive-cli/src/public/cli/commands/app-level.ts index fd5b9d9e6..2395536ea 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app-level.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app-level.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-level \n\nCommands:\n list List appLevel records\n find-first Find first matching appLevel record\n get Get a appLevel by ID\n create Create a new appLevel\n update Update an existing appLevel\n delete Delete a appLevel\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-level \n\nCommands:\n list List appLevel records\n find-first Find first matching appLevel record\n get Get a appLevel by ID\n create Create a new appLevel\n update Update an existing appLevel\n delete Delete a appLevel\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppLevelSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/app-limit-default.ts b/sdk/constructive-cli/src/public/cli/commands/app-limit-default.ts index 315bb1e77..55e697e1b 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app-limit-default.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app-limit-default.ts @@ -22,7 +22,7 @@ const fieldSchema: FieldSchema = { softMax: 'int', }; const usage = - '\napp-limit-default \n\nCommands:\n list List appLimitDefault records\n find-first Find first matching appLimitDefault record\n get Get a appLimitDefault by ID\n create Create a new appLimitDefault\n update Update an existing appLimitDefault\n delete Delete a appLimitDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-limit-default \n\nCommands:\n list List appLimitDefault records\n find-first Find first matching appLimitDefault record\n get Get a appLimitDefault by ID\n create Create a new appLimitDefault\n update Update an existing appLimitDefault\n delete Delete a appLimitDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -102,7 +102,7 @@ async function handleFindFirst(argv: Partial>, _prompter softMax: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppLimitDefaultSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/app-limit-event.ts b/sdk/constructive-cli/src/public/cli/commands/app-limit-event.ts index c66482251..0e8be421d 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app-limit-event.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app-limit-event.ts @@ -27,7 +27,7 @@ const fieldSchema: FieldSchema = { reason: 'string', }; const usage = - '\napp-limit-event \n\nCommands:\n list List appLimitEvent records\n find-first Find first matching appLimitEvent record\n create Create a new appLimitEvent\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-limit-event \n\nCommands:\n list List appLimitEvent records\n find-first Find first matching appLimitEvent record\n create Create a new appLimitEvent\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter reason: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppLimitEventSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/app-limit.ts b/sdk/constructive-cli/src/public/cli/commands/app-limit.ts index 66293d320..46eb05b64 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app-limit.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app-limit.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { windowDuration: 'string', }; const usage = - '\napp-limit \n\nCommands:\n list List appLimit records\n find-first Find first matching appLimit record\n get Get a appLimit by ID\n create Create a new appLimit\n update Update an existing appLimit\n delete Delete a appLimit\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-limit \n\nCommands:\n list List appLimit records\n find-first Find first matching appLimit record\n get Get a appLimit by ID\n create Create a new appLimit\n update Update an existing appLimit\n delete Delete a appLimit\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -114,7 +114,7 @@ async function handleFindFirst(argv: Partial>, _prompter windowDuration: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppLimitSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/app-membership-default.ts b/sdk/constructive-cli/src/public/cli/commands/app-membership-default.ts index 31b53fded..0d15b7564 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app-membership-default.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app-membership-default.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { isVerified: 'boolean', }; const usage = - '\napp-membership-default \n\nCommands:\n list List appMembershipDefault records\n find-first Find first matching appMembershipDefault record\n get Get a appMembershipDefault by ID\n create Create a new appMembershipDefault\n update Update an existing appMembershipDefault\n delete Delete a appMembershipDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-membership-default \n\nCommands:\n list List appMembershipDefault records\n find-first Find first matching appMembershipDefault record\n get Get a appMembershipDefault by ID\n create Create a new appMembershipDefault\n update Update an existing appMembershipDefault\n delete Delete a appMembershipDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -115,7 +115,11 @@ async function handleFindFirst(argv: Partial>, _prompter isVerified: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + AppMembershipDefaultSelect, + AppMembershipDefaultFilter, + AppMembershipDefaultOrderBy + > & { select: AppMembershipDefaultSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/app-membership.ts b/sdk/constructive-cli/src/public/cli/commands/app-membership.ts index d463fd934..0d4a7fac2 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app-membership.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app-membership.ts @@ -34,7 +34,7 @@ const fieldSchema: FieldSchema = { profileId: 'uuid', }; const usage = - '\napp-membership \n\nCommands:\n list List appMembership records\n find-first Find first matching appMembership record\n get Get a appMembership by ID\n create Create a new appMembership\n update Update an existing appMembership\n delete Delete a appMembership\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-membership \n\nCommands:\n list List appMembership records\n find-first Find first matching appMembership record\n get Get a appMembership by ID\n create Create a new appMembership\n update Update an existing appMembership\n delete Delete a appMembership\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -138,7 +138,7 @@ async function handleFindFirst(argv: Partial>, _prompter profileId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppMembershipSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/app-owner-grant.ts b/sdk/constructive-cli/src/public/cli/commands/app-owner-grant.ts index b8189a180..991b3093e 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app-owner-grant.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app-owner-grant.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-owner-grant \n\nCommands:\n list List appOwnerGrant records\n find-first Find first matching appOwnerGrant record\n get Get a appOwnerGrant by ID\n create Create a new appOwnerGrant\n update Update an existing appOwnerGrant\n delete Delete a appOwnerGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-owner-grant \n\nCommands:\n list List appOwnerGrant records\n find-first Find first matching appOwnerGrant record\n get Get a appOwnerGrant by ID\n create Create a new appOwnerGrant\n update Update an existing appOwnerGrant\n delete Delete a appOwnerGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -108,7 +108,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppOwnerGrantSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/app-permission-default.ts b/sdk/constructive-cli/src/public/cli/commands/app-permission-default.ts index 02ba19499..3a03ac6c8 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app-permission-default.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app-permission-default.ts @@ -20,7 +20,7 @@ const fieldSchema: FieldSchema = { permissions: 'string', }; const usage = - '\napp-permission-default \n\nCommands:\n list List appPermissionDefault records\n find-first Find first matching appPermissionDefault record\n get Get a appPermissionDefault by ID\n create Create a new appPermissionDefault\n update Update an existing appPermissionDefault\n delete Delete a appPermissionDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-permission-default \n\nCommands:\n list List appPermissionDefault records\n find-first Find first matching appPermissionDefault record\n get Get a appPermissionDefault by ID\n create Create a new appPermissionDefault\n update Update an existing appPermissionDefault\n delete Delete a appPermissionDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -100,7 +100,11 @@ async function handleFindFirst(argv: Partial>, _prompter permissions: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + AppPermissionDefaultSelect, + AppPermissionDefaultFilter, + AppPermissionDefaultOrderBy + > & { select: AppPermissionDefaultSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/app-permission.ts b/sdk/constructive-cli/src/public/cli/commands/app-permission.ts index db2d37c76..1eed93330 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app-permission.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app-permission.ts @@ -23,7 +23,7 @@ const fieldSchema: FieldSchema = { description: 'string', }; const usage = - '\napp-permission \n\nCommands:\n list List appPermission records\n find-first Find first matching appPermission record\n get Get a appPermission by ID\n create Create a new appPermission\n update Update an existing appPermission\n delete Delete a appPermission\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-permission \n\nCommands:\n list List appPermission records\n find-first Find first matching appPermission record\n get Get a appPermission by ID\n create Create a new appPermission\n update Update an existing appPermission\n delete Delete a appPermission\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -105,7 +105,7 @@ async function handleFindFirst(argv: Partial>, _prompter description: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppPermissionSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/app-step.ts b/sdk/constructive-cli/src/public/cli/commands/app-step.ts index 537dbd7bf..8f56b4d6a 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app-step.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app-step.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napp-step \n\nCommands:\n list List appStep records\n find-first Find first matching appStep record\n get Get a appStep by ID\n create Create a new appStep\n update Update an existing appStep\n delete Delete a appStep\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp-step \n\nCommands:\n list List appStep records\n find-first Find first matching appStep record\n get Get a appStep by ID\n create Create a new appStep\n update Update an existing appStep\n delete Delete a appStep\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -108,7 +108,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppStepSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/app.ts b/sdk/constructive-cli/src/public/cli/commands/app.ts index 652af53f1..25c42a599 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app.ts @@ -27,7 +27,7 @@ const fieldSchema: FieldSchema = { playStoreLink: 'string', }; const usage = - '\napp \n\nCommands:\n list List app records\n find-first Find first matching app record\n get Get a app by ID\n create Create a new app\n update Update an existing app\n delete Delete a app\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\napp \n\nCommands:\n list List app records\n find-first Find first matching app record\n get Get a app by ID\n create Create a new app\n update Update an existing app\n delete Delete a app\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -117,7 +117,7 @@ async function handleFindFirst(argv: Partial>, _prompter playStoreLink: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AppSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/ast-migration.ts b/sdk/constructive-cli/src/public/cli/commands/ast-migration.ts index d84210241..78afad69f 100644 --- a/sdk/constructive-cli/src/public/cli/commands/ast-migration.ts +++ b/sdk/constructive-cli/src/public/cli/commands/ast-migration.ts @@ -31,7 +31,7 @@ const fieldSchema: FieldSchema = { actorId: 'uuid', }; const usage = - '\nast-migration \n\nCommands:\n list List astMigration records\n find-first Find first matching astMigration record\n create Create a new astMigration\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nast-migration \n\nCommands:\n list List astMigration records\n find-first Find first matching astMigration record\n create Create a new astMigration\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -123,7 +123,7 @@ async function handleFindFirst(argv: Partial>, _prompter actorId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AstMigrationSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/audit-log.ts b/sdk/constructive-cli/src/public/cli/commands/audit-log.ts index 5c7263710..97194c6a6 100644 --- a/sdk/constructive-cli/src/public/cli/commands/audit-log.ts +++ b/sdk/constructive-cli/src/public/cli/commands/audit-log.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { createdAt: 'string', }; const usage = - '\naudit-log \n\nCommands:\n list List auditLog records\n find-first Find first matching auditLog record\n get Get a auditLog by ID\n create Create a new auditLog\n update Update an existing auditLog\n delete Delete a auditLog\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\naudit-log \n\nCommands:\n list List auditLog records\n find-first Find first matching auditLog record\n get Get a auditLog by ID\n create Create a new auditLog\n update Update an existing auditLog\n delete Delete a auditLog\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -114,7 +114,7 @@ async function handleFindFirst(argv: Partial>, _prompter createdAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: AuditLogSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/billing-module.ts b/sdk/constructive-cli/src/public/cli/commands/billing-module.ts index f3de76a19..2d33a7c67 100644 --- a/sdk/constructive-cli/src/public/cli/commands/billing-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/billing-module.ts @@ -32,7 +32,7 @@ const fieldSchema: FieldSchema = { prefix: 'string', }; const usage = - '\nbilling-module \n\nCommands:\n list List billingModule records\n find-first Find first matching billingModule record\n get Get a billingModule by ID\n create Create a new billingModule\n update Update an existing billingModule\n delete Delete a billingModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nbilling-module \n\nCommands:\n list List billingModule records\n find-first Find first matching billingModule record\n get Get a billingModule by ID\n create Create a new billingModule\n update Update an existing billingModule\n delete Delete a billingModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -132,7 +132,7 @@ async function handleFindFirst(argv: Partial>, _prompter prefix: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: BillingModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/blueprint-construction.ts b/sdk/constructive-cli/src/public/cli/commands/blueprint-construction.ts index 364488633..23830b73a 100644 --- a/sdk/constructive-cli/src/public/cli/commands/blueprint-construction.ts +++ b/sdk/constructive-cli/src/public/cli/commands/blueprint-construction.ts @@ -29,7 +29,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nblueprint-construction \n\nCommands:\n list List blueprintConstruction records\n find-first Find first matching blueprintConstruction record\n get Get a blueprintConstruction by ID\n create Create a new blueprintConstruction\n update Update an existing blueprintConstruction\n delete Delete a blueprintConstruction\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nblueprint-construction \n\nCommands:\n list List blueprintConstruction records\n find-first Find first matching blueprintConstruction record\n get Get a blueprintConstruction by ID\n create Create a new blueprintConstruction\n update Update an existing blueprintConstruction\n delete Delete a blueprintConstruction\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -127,7 +127,11 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + BlueprintConstructionSelect, + BlueprintConstructionFilter, + BlueprintConstructionOrderBy + > & { select: BlueprintConstructionSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/blueprint-template.ts b/sdk/constructive-cli/src/public/cli/commands/blueprint-template.ts index 82a909626..56f6768ab 100644 --- a/sdk/constructive-cli/src/public/cli/commands/blueprint-template.ts +++ b/sdk/constructive-cli/src/public/cli/commands/blueprint-template.ts @@ -38,7 +38,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nblueprint-template \n\nCommands:\n list List blueprintTemplate records\n find-first Find first matching blueprintTemplate record\n get Get a blueprintTemplate by ID\n create Create a new blueprintTemplate\n update Update an existing blueprintTemplate\n delete Delete a blueprintTemplate\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nblueprint-template \n\nCommands:\n list List blueprintTemplate records\n find-first Find first matching blueprintTemplate record\n get Get a blueprintTemplate by ID\n create Create a new blueprintTemplate\n update Update an existing blueprintTemplate\n delete Delete a blueprintTemplate\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -150,7 +150,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: BlueprintTemplateSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/blueprint.ts b/sdk/constructive-cli/src/public/cli/commands/blueprint.ts index 3af8c2513..5a92651ae 100644 --- a/sdk/constructive-cli/src/public/cli/commands/blueprint.ts +++ b/sdk/constructive-cli/src/public/cli/commands/blueprint.ts @@ -30,7 +30,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nblueprint \n\nCommands:\n list List blueprint records\n find-first Find first matching blueprint record\n get Get a blueprint by ID\n create Create a new blueprint\n update Update an existing blueprint\n delete Delete a blueprint\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nblueprint \n\nCommands:\n list List blueprint records\n find-first Find first matching blueprint record\n get Get a blueprint by ID\n create Create a new blueprint\n update Update an existing blueprint\n delete Delete a blueprint\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -126,7 +126,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: BlueprintSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/check-constraint.ts b/sdk/constructive-cli/src/public/cli/commands/check-constraint.ts index 6ed36f378..b5fa67aa3 100644 --- a/sdk/constructive-cli/src/public/cli/commands/check-constraint.ts +++ b/sdk/constructive-cli/src/public/cli/commands/check-constraint.ts @@ -32,7 +32,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\ncheck-constraint \n\nCommands:\n list List checkConstraint records\n find-first Find first matching checkConstraint record\n get Get a checkConstraint by ID\n create Create a new checkConstraint\n update Update an existing checkConstraint\n delete Delete a checkConstraint\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ncheck-constraint \n\nCommands:\n list List checkConstraint records\n find-first Find first matching checkConstraint record\n get Get a checkConstraint by ID\n create Create a new checkConstraint\n update Update an existing checkConstraint\n delete Delete a checkConstraint\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -132,7 +132,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: CheckConstraintSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/commit.ts b/sdk/constructive-cli/src/public/cli/commands/commit.ts index 45ab130b7..02b4952ad 100644 --- a/sdk/constructive-cli/src/public/cli/commands/commit.ts +++ b/sdk/constructive-cli/src/public/cli/commands/commit.ts @@ -27,7 +27,7 @@ const fieldSchema: FieldSchema = { date: 'string', }; const usage = - '\ncommit \n\nCommands:\n list List commit records\n find-first Find first matching commit record\n get Get a commit by ID\n create Create a new commit\n update Update an existing commit\n delete Delete a commit\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ncommit \n\nCommands:\n list List commit records\n find-first Find first matching commit record\n get Get a commit by ID\n create Create a new commit\n update Update an existing commit\n delete Delete a commit\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -117,7 +117,7 @@ async function handleFindFirst(argv: Partial>, _prompter date: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: CommitSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/connected-accounts-module.ts b/sdk/constructive-cli/src/public/cli/commands/connected-accounts-module.ts index 4ce5c1114..07adcffb9 100644 --- a/sdk/constructive-cli/src/public/cli/commands/connected-accounts-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/connected-accounts-module.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { tableName: 'string', }; const usage = - '\nconnected-accounts-module \n\nCommands:\n list List connectedAccountsModule records\n find-first Find first matching connectedAccountsModule record\n get Get a connectedAccountsModule by ID\n create Create a new connectedAccountsModule\n update Update an existing connectedAccountsModule\n delete Delete a connectedAccountsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nconnected-accounts-module \n\nCommands:\n list List connectedAccountsModule records\n find-first Find first matching connectedAccountsModule record\n get Get a connectedAccountsModule by ID\n create Create a new connectedAccountsModule\n update Update an existing connectedAccountsModule\n delete Delete a connectedAccountsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -115,7 +115,11 @@ async function handleFindFirst(argv: Partial>, _prompter tableName: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + ConnectedAccountsModuleSelect, + ConnectedAccountsModuleFilter, + ConnectedAccountsModuleOrderBy + > & { select: ConnectedAccountsModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/crypto-address.ts b/sdk/constructive-cli/src/public/cli/commands/crypto-address.ts index 0ea18cc8b..7702adb84 100644 --- a/sdk/constructive-cli/src/public/cli/commands/crypto-address.ts +++ b/sdk/constructive-cli/src/public/cli/commands/crypto-address.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\ncrypto-address \n\nCommands:\n list List cryptoAddress records\n find-first Find first matching cryptoAddress record\n get Get a cryptoAddress by ID\n create Create a new cryptoAddress\n update Update an existing cryptoAddress\n delete Delete a cryptoAddress\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ncrypto-address \n\nCommands:\n list List cryptoAddress records\n find-first Find first matching cryptoAddress record\n get Get a cryptoAddress by ID\n create Create a new cryptoAddress\n update Update an existing cryptoAddress\n delete Delete a cryptoAddress\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -114,7 +114,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: CryptoAddressSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/crypto-addresses-module.ts b/sdk/constructive-cli/src/public/cli/commands/crypto-addresses-module.ts index 3b0ce17cc..7ae7ba2ca 100644 --- a/sdk/constructive-cli/src/public/cli/commands/crypto-addresses-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/crypto-addresses-module.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { cryptoNetwork: 'string', }; const usage = - '\ncrypto-addresses-module \n\nCommands:\n list List cryptoAddressesModule records\n find-first Find first matching cryptoAddressesModule record\n get Get a cryptoAddressesModule by ID\n create Create a new cryptoAddressesModule\n update Update an existing cryptoAddressesModule\n delete Delete a cryptoAddressesModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ncrypto-addresses-module \n\nCommands:\n list List cryptoAddressesModule records\n find-first Find first matching cryptoAddressesModule record\n get Get a cryptoAddressesModule by ID\n create Create a new cryptoAddressesModule\n update Update an existing cryptoAddressesModule\n delete Delete a cryptoAddressesModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -118,7 +118,11 @@ async function handleFindFirst(argv: Partial>, _prompter cryptoNetwork: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + CryptoAddressesModuleSelect, + CryptoAddressesModuleFilter, + CryptoAddressesModuleOrderBy + > & { select: CryptoAddressesModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/crypto-auth-module.ts b/sdk/constructive-cli/src/public/cli/commands/crypto-auth-module.ts index b1940005b..aff762431 100644 --- a/sdk/constructive-cli/src/public/cli/commands/crypto-auth-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/crypto-auth-module.ts @@ -32,7 +32,7 @@ const fieldSchema: FieldSchema = { signInWithChallenge: 'string', }; const usage = - '\ncrypto-auth-module \n\nCommands:\n list List cryptoAuthModule records\n find-first Find first matching cryptoAuthModule record\n get Get a cryptoAuthModule by ID\n create Create a new cryptoAuthModule\n update Update an existing cryptoAuthModule\n delete Delete a cryptoAuthModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ncrypto-auth-module \n\nCommands:\n list List cryptoAuthModule records\n find-first Find first matching cryptoAuthModule record\n get Get a cryptoAuthModule by ID\n create Create a new cryptoAuthModule\n update Update an existing cryptoAuthModule\n delete Delete a cryptoAuthModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -132,7 +132,7 @@ async function handleFindFirst(argv: Partial>, _prompter signInWithChallenge: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: CryptoAuthModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/database-provision-module.ts b/sdk/constructive-cli/src/public/cli/commands/database-provision-module.ts index 1c398dd09..4fbd83d99 100644 --- a/sdk/constructive-cli/src/public/cli/commands/database-provision-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/database-provision-module.ts @@ -32,7 +32,7 @@ const fieldSchema: FieldSchema = { completedAt: 'string', }; const usage = - '\ndatabase-provision-module \n\nCommands:\n list List databaseProvisionModule records\n find-first Find first matching databaseProvisionModule record\n get Get a databaseProvisionModule by ID\n create Create a new databaseProvisionModule\n update Update an existing databaseProvisionModule\n delete Delete a databaseProvisionModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ndatabase-provision-module \n\nCommands:\n list List databaseProvisionModule records\n find-first Find first matching databaseProvisionModule record\n get Get a databaseProvisionModule by ID\n create Create a new databaseProvisionModule\n update Update an existing databaseProvisionModule\n delete Delete a databaseProvisionModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -136,7 +136,11 @@ async function handleFindFirst(argv: Partial>, _prompter completedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + DatabaseProvisionModuleSelect, + DatabaseProvisionModuleFilter, + DatabaseProvisionModuleOrderBy + > & { select: DatabaseProvisionModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/database-transfer.ts b/sdk/constructive-cli/src/public/cli/commands/database-transfer.ts index 5f8115b60..07712448b 100644 --- a/sdk/constructive-cli/src/public/cli/commands/database-transfer.ts +++ b/sdk/constructive-cli/src/public/cli/commands/database-transfer.ts @@ -32,7 +32,7 @@ const fieldSchema: FieldSchema = { completedAt: 'string', }; const usage = - '\ndatabase-transfer \n\nCommands:\n list List databaseTransfer records\n find-first Find first matching databaseTransfer record\n get Get a databaseTransfer by ID\n create Create a new databaseTransfer\n update Update an existing databaseTransfer\n delete Delete a databaseTransfer\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ndatabase-transfer \n\nCommands:\n list List databaseTransfer records\n find-first Find first matching databaseTransfer record\n get Get a databaseTransfer by ID\n create Create a new databaseTransfer\n update Update an existing databaseTransfer\n delete Delete a databaseTransfer\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -132,7 +132,7 @@ async function handleFindFirst(argv: Partial>, _prompter completedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: DatabaseTransferSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/database.ts b/sdk/constructive-cli/src/public/cli/commands/database.ts index fef127018..59dda272f 100644 --- a/sdk/constructive-cli/src/public/cli/commands/database.ts +++ b/sdk/constructive-cli/src/public/cli/commands/database.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\ndatabase \n\nCommands:\n list List database records\n find-first Find first matching database record\n get Get a database by ID\n create Create a new database\n update Update an existing database\n delete Delete a database\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ndatabase \n\nCommands:\n list List database records\n find-first Find first matching database record\n get Get a database by ID\n create Create a new database\n update Update an existing database\n delete Delete a database\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -114,7 +114,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: DatabaseSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/default-ids-module.ts b/sdk/constructive-cli/src/public/cli/commands/default-ids-module.ts index 65799bbf9..23024940b 100644 --- a/sdk/constructive-cli/src/public/cli/commands/default-ids-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/default-ids-module.ts @@ -20,7 +20,7 @@ const fieldSchema: FieldSchema = { databaseId: 'uuid', }; const usage = - '\ndefault-ids-module \n\nCommands:\n list List defaultIdsModule records\n find-first Find first matching defaultIdsModule record\n get Get a defaultIdsModule by ID\n create Create a new defaultIdsModule\n update Update an existing defaultIdsModule\n delete Delete a defaultIdsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ndefault-ids-module \n\nCommands:\n list List defaultIdsModule records\n find-first Find first matching defaultIdsModule record\n get Get a defaultIdsModule by ID\n create Create a new defaultIdsModule\n update Update an existing defaultIdsModule\n delete Delete a defaultIdsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -96,7 +96,7 @@ async function handleFindFirst(argv: Partial>, _prompter databaseId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: DefaultIdsModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/default-privilege.ts b/sdk/constructive-cli/src/public/cli/commands/default-privilege.ts index b46d0716f..11298bf8e 100644 --- a/sdk/constructive-cli/src/public/cli/commands/default-privilege.ts +++ b/sdk/constructive-cli/src/public/cli/commands/default-privilege.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { isGrant: 'boolean', }; const usage = - '\ndefault-privilege \n\nCommands:\n list List defaultPrivilege records\n find-first Find first matching defaultPrivilege record\n get Get a defaultPrivilege by ID\n create Create a new defaultPrivilege\n update Update an existing defaultPrivilege\n delete Delete a defaultPrivilege\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ndefault-privilege \n\nCommands:\n list List defaultPrivilege records\n find-first Find first matching defaultPrivilege record\n get Get a defaultPrivilege by ID\n create Create a new defaultPrivilege\n update Update an existing defaultPrivilege\n delete Delete a defaultPrivilege\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter isGrant: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: DefaultPrivilegeSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/denormalized-table-field.ts b/sdk/constructive-cli/src/public/cli/commands/denormalized-table-field.ts index d479e3508..84c9a764e 100644 --- a/sdk/constructive-cli/src/public/cli/commands/denormalized-table-field.ts +++ b/sdk/constructive-cli/src/public/cli/commands/denormalized-table-field.ts @@ -30,7 +30,7 @@ const fieldSchema: FieldSchema = { funcOrder: 'int', }; const usage = - '\ndenormalized-table-field \n\nCommands:\n list List denormalizedTableField records\n find-first Find first matching denormalizedTableField record\n get Get a denormalizedTableField by ID\n create Create a new denormalizedTableField\n update Update an existing denormalizedTableField\n delete Delete a denormalizedTableField\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ndenormalized-table-field \n\nCommands:\n list List denormalizedTableField records\n find-first Find first matching denormalizedTableField record\n get Get a denormalizedTableField by ID\n create Create a new denormalizedTableField\n update Update an existing denormalizedTableField\n delete Delete a denormalizedTableField\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -130,7 +130,11 @@ async function handleFindFirst(argv: Partial>, _prompter funcOrder: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + DenormalizedTableFieldSelect, + DenormalizedTableFieldFilter, + DenormalizedTableFieldOrderBy + > & { select: DenormalizedTableFieldSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/devices-module.ts b/sdk/constructive-cli/src/public/cli/commands/devices-module.ts index a8f42cbe1..bd47585b4 100644 --- a/sdk/constructive-cli/src/public/cli/commands/devices-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/devices-module.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { deviceSettingsTable: 'string', }; const usage = - '\ndevices-module \n\nCommands:\n list List devicesModule records\n find-first Find first matching devicesModule record\n get Get a devicesModule by ID\n create Create a new devicesModule\n update Update an existing devicesModule\n delete Delete a devicesModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ndevices-module \n\nCommands:\n list List devicesModule records\n find-first Find first matching devicesModule record\n get Get a devicesModule by ID\n create Create a new devicesModule\n update Update an existing devicesModule\n delete Delete a devicesModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter deviceSettingsTable: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: DevicesModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/domain.ts b/sdk/constructive-cli/src/public/cli/commands/domain.ts index 03bab8892..de88ab779 100644 --- a/sdk/constructive-cli/src/public/cli/commands/domain.ts +++ b/sdk/constructive-cli/src/public/cli/commands/domain.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { domain: 'string', }; const usage = - '\ndomain \n\nCommands:\n list List domain records\n find-first Find first matching domain record\n get Get a domain by ID\n create Create a new domain\n update Update an existing domain\n delete Delete a domain\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ndomain \n\nCommands:\n list List domain records\n find-first Find first matching domain record\n get Get a domain by ID\n create Create a new domain\n update Update an existing domain\n delete Delete a domain\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -108,7 +108,7 @@ async function handleFindFirst(argv: Partial>, _prompter domain: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: DomainSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/email.ts b/sdk/constructive-cli/src/public/cli/commands/email.ts index fc42e6a23..fb0e10048 100644 --- a/sdk/constructive-cli/src/public/cli/commands/email.ts +++ b/sdk/constructive-cli/src/public/cli/commands/email.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nemail \n\nCommands:\n list List email records\n find-first Find first matching email record\n get Get a email by ID\n create Create a new email\n update Update an existing email\n delete Delete a email\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nemail \n\nCommands:\n list List email records\n find-first Find first matching email record\n get Get a email by ID\n create Create a new email\n update Update an existing email\n delete Delete a email\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -114,7 +114,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: EmailSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/emails-module.ts b/sdk/constructive-cli/src/public/cli/commands/emails-module.ts index c841c5eff..9adb7f35d 100644 --- a/sdk/constructive-cli/src/public/cli/commands/emails-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/emails-module.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { tableName: 'string', }; const usage = - '\nemails-module \n\nCommands:\n list List emailsModule records\n find-first Find first matching emailsModule record\n get Get a emailsModule by ID\n create Create a new emailsModule\n update Update an existing emailsModule\n delete Delete a emailsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nemails-module \n\nCommands:\n list List emailsModule records\n find-first Find first matching emailsModule record\n get Get a emailsModule by ID\n create Create a new emailsModule\n update Update an existing emailsModule\n delete Delete a emailsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter tableName: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: EmailsModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/embedding-chunk.ts b/sdk/constructive-cli/src/public/cli/commands/embedding-chunk.ts index 425f6a121..73ad4f422 100644 --- a/sdk/constructive-cli/src/public/cli/commands/embedding-chunk.ts +++ b/sdk/constructive-cli/src/public/cli/commands/embedding-chunk.ts @@ -36,7 +36,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nembedding-chunk \n\nCommands:\n list List embeddingChunk records\n find-first Find first matching embeddingChunk record\n get Get a embeddingChunk by ID\n create Create a new embeddingChunk\n update Update an existing embeddingChunk\n delete Delete a embeddingChunk\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nembedding-chunk \n\nCommands:\n list List embeddingChunk records\n find-first Find first matching embeddingChunk record\n get Get a embeddingChunk by ID\n create Create a new embeddingChunk\n update Update an existing embeddingChunk\n delete Delete a embeddingChunk\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -144,7 +144,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: EmbeddingChunkSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/encrypted-secrets-module.ts b/sdk/constructive-cli/src/public/cli/commands/encrypted-secrets-module.ts index 35d446e19..653e90cd5 100644 --- a/sdk/constructive-cli/src/public/cli/commands/encrypted-secrets-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/encrypted-secrets-module.ts @@ -23,7 +23,7 @@ const fieldSchema: FieldSchema = { tableName: 'string', }; const usage = - '\nencrypted-secrets-module \n\nCommands:\n list List encryptedSecretsModule records\n find-first Find first matching encryptedSecretsModule record\n get Get a encryptedSecretsModule by ID\n create Create a new encryptedSecretsModule\n update Update an existing encryptedSecretsModule\n delete Delete a encryptedSecretsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nencrypted-secrets-module \n\nCommands:\n list List encryptedSecretsModule records\n find-first Find first matching encryptedSecretsModule record\n get Get a encryptedSecretsModule by ID\n create Create a new encryptedSecretsModule\n update Update an existing encryptedSecretsModule\n delete Delete a encryptedSecretsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -109,7 +109,11 @@ async function handleFindFirst(argv: Partial>, _prompter tableName: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + EncryptedSecretsModuleSelect, + EncryptedSecretsModuleFilter, + EncryptedSecretsModuleOrderBy + > & { select: EncryptedSecretsModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/entity-type-provision.ts b/sdk/constructive-cli/src/public/cli/commands/entity-type-provision.ts index 409659ddd..cdf219605 100644 --- a/sdk/constructive-cli/src/public/cli/commands/entity-type-provision.ts +++ b/sdk/constructive-cli/src/public/cli/commands/entity-type-provision.ts @@ -42,7 +42,7 @@ const fieldSchema: FieldSchema = { outInvitesModuleId: 'uuid', }; const usage = - '\nentity-type-provision \n\nCommands:\n list List entityTypeProvision records\n find-first Find first matching entityTypeProvision record\n get Get a entityTypeProvision by ID\n create Create a new entityTypeProvision\n update Update an existing entityTypeProvision\n delete Delete a entityTypeProvision\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nentity-type-provision \n\nCommands:\n list List entityTypeProvision records\n find-first Find first matching entityTypeProvision record\n get Get a entityTypeProvision by ID\n create Create a new entityTypeProvision\n update Update an existing entityTypeProvision\n delete Delete a entityTypeProvision\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -166,7 +166,11 @@ async function handleFindFirst(argv: Partial>, _prompter outInvitesModuleId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + EntityTypeProvisionSelect, + EntityTypeProvisionFilter, + EntityTypeProvisionOrderBy + > & { select: EntityTypeProvisionSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/enum.ts b/sdk/constructive-cli/src/public/cli/commands/enum.ts index f396dabcd..c7614fbc6 100644 --- a/sdk/constructive-cli/src/public/cli/commands/enum.ts +++ b/sdk/constructive-cli/src/public/cli/commands/enum.ts @@ -30,7 +30,7 @@ const fieldSchema: FieldSchema = { tags: 'string', }; const usage = - '\nenum \n\nCommands:\n list List enum records\n find-first Find first matching enum record\n get Get a enum by ID\n create Create a new enum\n update Update an existing enum\n delete Delete a enum\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nenum \n\nCommands:\n list List enum records\n find-first Find first matching enum record\n get Get a enum by ID\n create Create a new enum\n update Update an existing enum\n delete Delete a enum\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -126,7 +126,7 @@ async function handleFindFirst(argv: Partial>, _prompter tags: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: EnumSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/field.ts b/sdk/constructive-cli/src/public/cli/commands/field.ts index e16a4c3f1..e08e81c7d 100644 --- a/sdk/constructive-cli/src/public/cli/commands/field.ts +++ b/sdk/constructive-cli/src/public/cli/commands/field.ts @@ -42,7 +42,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nfield \n\nCommands:\n list List field records\n find-first Find first matching field record\n get Get a field by ID\n create Create a new field\n update Update an existing field\n delete Delete a field\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nfield \n\nCommands:\n list List field records\n find-first Find first matching field record\n get Get a field by ID\n create Create a new field\n update Update an existing field\n delete Delete a field\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -162,7 +162,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: FieldSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/foreign-key-constraint.ts b/sdk/constructive-cli/src/public/cli/commands/foreign-key-constraint.ts index c6e5a65c4..20a0932b9 100644 --- a/sdk/constructive-cli/src/public/cli/commands/foreign-key-constraint.ts +++ b/sdk/constructive-cli/src/public/cli/commands/foreign-key-constraint.ts @@ -36,7 +36,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nforeign-key-constraint \n\nCommands:\n list List foreignKeyConstraint records\n find-first Find first matching foreignKeyConstraint record\n get Get a foreignKeyConstraint by ID\n create Create a new foreignKeyConstraint\n update Update an existing foreignKeyConstraint\n delete Delete a foreignKeyConstraint\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nforeign-key-constraint \n\nCommands:\n list List foreignKeyConstraint records\n find-first Find first matching foreignKeyConstraint record\n get Get a foreignKeyConstraint by ID\n create Create a new foreignKeyConstraint\n update Update an existing foreignKeyConstraint\n delete Delete a foreignKeyConstraint\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -148,7 +148,11 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + ForeignKeyConstraintSelect, + ForeignKeyConstraintFilter, + ForeignKeyConstraintOrderBy + > & { select: ForeignKeyConstraintSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/full-text-search.ts b/sdk/constructive-cli/src/public/cli/commands/full-text-search.ts index 267c1b6d1..dda885e16 100644 --- a/sdk/constructive-cli/src/public/cli/commands/full-text-search.ts +++ b/sdk/constructive-cli/src/public/cli/commands/full-text-search.ts @@ -27,7 +27,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nfull-text-search \n\nCommands:\n list List fullTextSearch records\n find-first Find first matching fullTextSearch record\n get Get a fullTextSearch by ID\n create Create a new fullTextSearch\n update Update an existing fullTextSearch\n delete Delete a fullTextSearch\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nfull-text-search \n\nCommands:\n list List fullTextSearch records\n find-first Find first matching fullTextSearch record\n get Get a fullTextSearch by ID\n create Create a new fullTextSearch\n update Update an existing fullTextSearch\n delete Delete a fullTextSearch\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -117,7 +117,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: FullTextSearchSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/get-all-record.ts b/sdk/constructive-cli/src/public/cli/commands/get-all-record.ts index 2e18efa39..bb72aac01 100644 --- a/sdk/constructive-cli/src/public/cli/commands/get-all-record.ts +++ b/sdk/constructive-cli/src/public/cli/commands/get-all-record.ts @@ -20,7 +20,7 @@ const fieldSchema: FieldSchema = { data: 'json', }; const usage = - '\nget-all-record \n\nCommands:\n list List getAllRecord records\n find-first Find first matching getAllRecord record\n create Create a new getAllRecord\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nget-all-record \n\nCommands:\n list List getAllRecord records\n find-first Find first matching getAllRecord record\n create Create a new getAllRecord\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -90,7 +90,7 @@ async function handleFindFirst(argv: Partial>, _prompter data: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: GetAllRecordSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/hierarchy-module.ts b/sdk/constructive-cli/src/public/cli/commands/hierarchy-module.ts index c78492e89..f3f22ed0a 100644 --- a/sdk/constructive-cli/src/public/cli/commands/hierarchy-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/hierarchy-module.ts @@ -38,7 +38,7 @@ const fieldSchema: FieldSchema = { createdAt: 'string', }; const usage = - '\nhierarchy-module \n\nCommands:\n list List hierarchyModule records\n find-first Find first matching hierarchyModule record\n get Get a hierarchyModule by ID\n create Create a new hierarchyModule\n update Update an existing hierarchyModule\n delete Delete a hierarchyModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nhierarchy-module \n\nCommands:\n list List hierarchyModule records\n find-first Find first matching hierarchyModule record\n get Get a hierarchyModule by ID\n create Create a new hierarchyModule\n update Update an existing hierarchyModule\n delete Delete a hierarchyModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -150,7 +150,7 @@ async function handleFindFirst(argv: Partial>, _prompter createdAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: HierarchyModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/identity-provider.ts b/sdk/constructive-cli/src/public/cli/commands/identity-provider.ts index 726ba76dd..01bb037de 100644 --- a/sdk/constructive-cli/src/public/cli/commands/identity-provider.ts +++ b/sdk/constructive-cli/src/public/cli/commands/identity-provider.ts @@ -23,7 +23,7 @@ const fieldSchema: FieldSchema = { isBuiltIn: 'boolean', }; const usage = - '\nidentity-provider \n\nCommands:\n list List identityProvider records\n find-first Find first matching identityProvider record\n create Create a new identityProvider\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nidentity-provider \n\nCommands:\n list List identityProvider records\n find-first Find first matching identityProvider record\n create Create a new identityProvider\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -99,7 +99,7 @@ async function handleFindFirst(argv: Partial>, _prompter isBuiltIn: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: IdentityProviderSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/identity-providers-module.ts b/sdk/constructive-cli/src/public/cli/commands/identity-providers-module.ts index 9cea27c74..5e79d4894 100644 --- a/sdk/constructive-cli/src/public/cli/commands/identity-providers-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/identity-providers-module.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { tableName: 'string', }; const usage = - '\nidentity-providers-module \n\nCommands:\n list List identityProvidersModule records\n find-first Find first matching identityProvidersModule record\n get Get a identityProvidersModule by ID\n create Create a new identityProvidersModule\n update Update an existing identityProvidersModule\n delete Delete a identityProvidersModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nidentity-providers-module \n\nCommands:\n list List identityProvidersModule records\n find-first Find first matching identityProvidersModule record\n get Get a identityProvidersModule by ID\n create Create a new identityProvidersModule\n update Update an existing identityProvidersModule\n delete Delete a identityProvidersModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -112,7 +112,11 @@ async function handleFindFirst(argv: Partial>, _prompter tableName: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + IdentityProvidersModuleSelect, + IdentityProvidersModuleFilter, + IdentityProvidersModuleOrderBy + > & { select: IdentityProvidersModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/index.ts b/sdk/constructive-cli/src/public/cli/commands/index.ts index e42be5f9e..498bd6aa2 100644 --- a/sdk/constructive-cli/src/public/cli/commands/index.ts +++ b/sdk/constructive-cli/src/public/cli/commands/index.ts @@ -37,7 +37,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nindex \n\nCommands:\n list List index records\n find-first Find first matching index record\n get Get a index by ID\n create Create a new index\n update Update an existing index\n delete Delete a index\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nindex \n\nCommands:\n list List index records\n find-first Find first matching index record\n get Get a index by ID\n create Create a new index\n update Update an existing index\n delete Delete a index\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -147,7 +147,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: IndexSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/invites-module.ts b/sdk/constructive-cli/src/public/cli/commands/invites-module.ts index df3542ed8..efdd0e488 100644 --- a/sdk/constructive-cli/src/public/cli/commands/invites-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/invites-module.ts @@ -32,7 +32,7 @@ const fieldSchema: FieldSchema = { entityTableId: 'uuid', }; const usage = - '\ninvites-module \n\nCommands:\n list List invitesModule records\n find-first Find first matching invitesModule record\n get Get a invitesModule by ID\n create Create a new invitesModule\n update Update an existing invitesModule\n delete Delete a invitesModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ninvites-module \n\nCommands:\n list List invitesModule records\n find-first Find first matching invitesModule record\n get Get a invitesModule by ID\n create Create a new invitesModule\n update Update an existing invitesModule\n delete Delete a invitesModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -132,7 +132,7 @@ async function handleFindFirst(argv: Partial>, _prompter entityTableId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: InvitesModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/levels-module.ts b/sdk/constructive-cli/src/public/cli/commands/levels-module.ts index d326e931f..12da14500 100644 --- a/sdk/constructive-cli/src/public/cli/commands/levels-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/levels-module.ts @@ -44,7 +44,7 @@ const fieldSchema: FieldSchema = { actorTableId: 'uuid', }; const usage = - '\nlevels-module \n\nCommands:\n list List levelsModule records\n find-first Find first matching levelsModule record\n get Get a levelsModule by ID\n create Create a new levelsModule\n update Update an existing levelsModule\n delete Delete a levelsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nlevels-module \n\nCommands:\n list List levelsModule records\n find-first Find first matching levelsModule record\n get Get a levelsModule by ID\n create Create a new levelsModule\n update Update an existing levelsModule\n delete Delete a levelsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -168,7 +168,7 @@ async function handleFindFirst(argv: Partial>, _prompter actorTableId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: LevelsModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/limits-module.ts b/sdk/constructive-cli/src/public/cli/commands/limits-module.ts index 90be29afd..192bcfe61 100644 --- a/sdk/constructive-cli/src/public/cli/commands/limits-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/limits-module.ts @@ -37,7 +37,7 @@ const fieldSchema: FieldSchema = { actorTableId: 'uuid', }; const usage = - '\nlimits-module \n\nCommands:\n list List limitsModule records\n find-first Find first matching limitsModule record\n get Get a limitsModule by ID\n create Create a new limitsModule\n update Update an existing limitsModule\n delete Delete a limitsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nlimits-module \n\nCommands:\n list List limitsModule records\n find-first Find first matching limitsModule record\n get Get a limitsModule by ID\n create Create a new limitsModule\n update Update an existing limitsModule\n delete Delete a limitsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -147,7 +147,7 @@ async function handleFindFirst(argv: Partial>, _prompter actorTableId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: LimitsModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/membership-type.ts b/sdk/constructive-cli/src/public/cli/commands/membership-type.ts index cc1ba7915..ab07b93cd 100644 --- a/sdk/constructive-cli/src/public/cli/commands/membership-type.ts +++ b/sdk/constructive-cli/src/public/cli/commands/membership-type.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { hasUsersTableEntry: 'boolean', }; const usage = - '\nmembership-type \n\nCommands:\n list List membershipType records\n find-first Find first matching membershipType record\n get Get a membershipType by ID\n create Create a new membershipType\n update Update an existing membershipType\n delete Delete a membershipType\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nmembership-type \n\nCommands:\n list List membershipType records\n find-first Find first matching membershipType record\n get Get a membershipType by ID\n create Create a new membershipType\n update Update an existing membershipType\n delete Delete a membershipType\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -108,7 +108,7 @@ async function handleFindFirst(argv: Partial>, _prompter hasUsersTableEntry: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: MembershipTypeSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/membership-types-module.ts b/sdk/constructive-cli/src/public/cli/commands/membership-types-module.ts index 6593e9518..de7bd2968 100644 --- a/sdk/constructive-cli/src/public/cli/commands/membership-types-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/membership-types-module.ts @@ -23,7 +23,7 @@ const fieldSchema: FieldSchema = { tableName: 'string', }; const usage = - '\nmembership-types-module \n\nCommands:\n list List membershipTypesModule records\n find-first Find first matching membershipTypesModule record\n get Get a membershipTypesModule by ID\n create Create a new membershipTypesModule\n update Update an existing membershipTypesModule\n delete Delete a membershipTypesModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nmembership-types-module \n\nCommands:\n list List membershipTypesModule records\n find-first Find first matching membershipTypesModule record\n get Get a membershipTypesModule by ID\n create Create a new membershipTypesModule\n update Update an existing membershipTypesModule\n delete Delete a membershipTypesModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -109,7 +109,11 @@ async function handleFindFirst(argv: Partial>, _prompter tableName: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + MembershipTypesModuleSelect, + MembershipTypesModuleFilter, + MembershipTypesModuleOrderBy + > & { select: MembershipTypesModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/memberships-module.ts b/sdk/constructive-cli/src/public/cli/commands/memberships-module.ts index ac52d8ee0..c3d4219db 100644 --- a/sdk/constructive-cli/src/public/cli/commands/memberships-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/memberships-module.ts @@ -52,7 +52,7 @@ const fieldSchema: FieldSchema = { memberProfilesTableId: 'uuid', }; const usage = - '\nmemberships-module \n\nCommands:\n list List membershipsModule records\n find-first Find first matching membershipsModule record\n get Get a membershipsModule by ID\n create Create a new membershipsModule\n update Update an existing membershipsModule\n delete Delete a membershipsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nmemberships-module \n\nCommands:\n list List membershipsModule records\n find-first Find first matching membershipsModule record\n get Get a membershipsModule by ID\n create Create a new membershipsModule\n update Update an existing membershipsModule\n delete Delete a membershipsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -192,7 +192,7 @@ async function handleFindFirst(argv: Partial>, _prompter memberProfilesTableId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: MembershipsModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/migrate-file.ts b/sdk/constructive-cli/src/public/cli/commands/migrate-file.ts index 857850eb3..051148966 100644 --- a/sdk/constructive-cli/src/public/cli/commands/migrate-file.ts +++ b/sdk/constructive-cli/src/public/cli/commands/migrate-file.ts @@ -21,7 +21,7 @@ const fieldSchema: FieldSchema = { upload: 'string', }; const usage = - '\nmigrate-file \n\nCommands:\n list List migrateFile records\n find-first Find first matching migrateFile record\n create Create a new migrateFile\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nmigrate-file \n\nCommands:\n list List migrateFile records\n find-first Find first matching migrateFile record\n create Create a new migrateFile\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -93,7 +93,7 @@ async function handleFindFirst(argv: Partial>, _prompter upload: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: MigrateFileSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/node-type-registry.ts b/sdk/constructive-cli/src/public/cli/commands/node-type-registry.ts index 83d245d1b..5ed959f57 100644 --- a/sdk/constructive-cli/src/public/cli/commands/node-type-registry.ts +++ b/sdk/constructive-cli/src/public/cli/commands/node-type-registry.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { tags: 'string', }; const usage = - '\nnode-type-registry \n\nCommands:\n list List nodeTypeRegistry records\n find-first Find first matching nodeTypeRegistry record\n get Get a nodeTypeRegistry by ID\n create Create a new nodeTypeRegistry\n update Update an existing nodeTypeRegistry\n delete Delete a nodeTypeRegistry\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nnode-type-registry \n\nCommands:\n list List nodeTypeRegistry records\n find-first Find first matching nodeTypeRegistry record\n get Get a nodeTypeRegistry by ID\n create Create a new nodeTypeRegistry\n update Update an existing nodeTypeRegistry\n delete Delete a nodeTypeRegistry\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter tags: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: NodeTypeRegistrySelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/notifications-module.ts b/sdk/constructive-cli/src/public/cli/commands/notifications-module.ts index ad2c236e9..8f48e08ca 100644 --- a/sdk/constructive-cli/src/public/cli/commands/notifications-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/notifications-module.ts @@ -35,7 +35,7 @@ const fieldSchema: FieldSchema = { hasSubscriptions: 'boolean', }; const usage = - '\nnotifications-module \n\nCommands:\n list List notificationsModule records\n find-first Find first matching notificationsModule record\n get Get a notificationsModule by ID\n create Create a new notificationsModule\n update Update an existing notificationsModule\n delete Delete a notificationsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nnotifications-module \n\nCommands:\n list List notificationsModule records\n find-first Find first matching notificationsModule record\n get Get a notificationsModule by ID\n create Create a new notificationsModule\n update Update an existing notificationsModule\n delete Delete a notificationsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -145,7 +145,11 @@ async function handleFindFirst(argv: Partial>, _prompter hasSubscriptions: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + NotificationsModuleSelect, + NotificationsModuleFilter, + NotificationsModuleOrderBy + > & { select: NotificationsModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/object.ts b/sdk/constructive-cli/src/public/cli/commands/object.ts index a731ea2dd..d99526a4e 100644 --- a/sdk/constructive-cli/src/public/cli/commands/object.ts +++ b/sdk/constructive-cli/src/public/cli/commands/object.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { createdAt: 'string', }; const usage = - '\nobject \n\nCommands:\n list List object records\n find-first Find first matching object record\n get Get a object by ID\n create Create a new object\n update Update an existing object\n delete Delete a object\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nobject \n\nCommands:\n list List object records\n find-first Find first matching object record\n get Get a object by ID\n create Create a new object\n update Update an existing object\n delete Delete a object\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -112,7 +112,7 @@ async function handleFindFirst(argv: Partial>, _prompter createdAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: ObjectSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-admin-grant.ts b/sdk/constructive-cli/src/public/cli/commands/org-admin-grant.ts index 22e11bc2f..8f04cd1b1 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-admin-grant.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-admin-grant.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\norg-admin-grant \n\nCommands:\n list List orgAdminGrant records\n find-first Find first matching orgAdminGrant record\n get Get a orgAdminGrant by ID\n create Create a new orgAdminGrant\n update Update an existing orgAdminGrant\n delete Delete a orgAdminGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-admin-grant \n\nCommands:\n list List orgAdminGrant records\n find-first Find first matching orgAdminGrant record\n get Get a orgAdminGrant by ID\n create Create a new orgAdminGrant\n update Update an existing orgAdminGrant\n delete Delete a orgAdminGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgAdminGrantSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-chart-edge-grant.ts b/sdk/constructive-cli/src/public/cli/commands/org-chart-edge-grant.ts index 095cf055f..c55ac9075 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-chart-edge-grant.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-chart-edge-grant.ts @@ -27,7 +27,7 @@ const fieldSchema: FieldSchema = { createdAt: 'string', }; const usage = - '\norg-chart-edge-grant \n\nCommands:\n list List orgChartEdgeGrant records\n find-first Find first matching orgChartEdgeGrant record\n get Get a orgChartEdgeGrant by ID\n create Create a new orgChartEdgeGrant\n update Update an existing orgChartEdgeGrant\n delete Delete a orgChartEdgeGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-chart-edge-grant \n\nCommands:\n list List orgChartEdgeGrant records\n find-first Find first matching orgChartEdgeGrant record\n get Get a orgChartEdgeGrant by ID\n create Create a new orgChartEdgeGrant\n update Update an existing orgChartEdgeGrant\n delete Delete a orgChartEdgeGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -117,7 +117,7 @@ async function handleFindFirst(argv: Partial>, _prompter createdAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgChartEdgeGrantSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-chart-edge.ts b/sdk/constructive-cli/src/public/cli/commands/org-chart-edge.ts index d6c0839a5..8650e6152 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-chart-edge.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-chart-edge.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { positionLevel: 'int', }; const usage = - '\norg-chart-edge \n\nCommands:\n list List orgChartEdge records\n find-first Find first matching orgChartEdge record\n get Get a orgChartEdge by ID\n create Create a new orgChartEdge\n update Update an existing orgChartEdge\n delete Delete a orgChartEdge\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-chart-edge \n\nCommands:\n list List orgChartEdge records\n find-first Find first matching orgChartEdge record\n get Get a orgChartEdge by ID\n create Create a new orgChartEdge\n update Update an existing orgChartEdge\n delete Delete a orgChartEdge\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -114,7 +114,7 @@ async function handleFindFirst(argv: Partial>, _prompter positionLevel: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgChartEdgeSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-claimed-invite.ts b/sdk/constructive-cli/src/public/cli/commands/org-claimed-invite.ts index 8a7be4ccc..6d0881138 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-claimed-invite.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-claimed-invite.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { entityId: 'uuid', }; const usage = - '\norg-claimed-invite \n\nCommands:\n list List orgClaimedInvite records\n find-first Find first matching orgClaimedInvite record\n get Get a orgClaimedInvite by ID\n create Create a new orgClaimedInvite\n update Update an existing orgClaimedInvite\n delete Delete a orgClaimedInvite\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-claimed-invite \n\nCommands:\n list List orgClaimedInvite records\n find-first Find first matching orgClaimedInvite record\n get Get a orgClaimedInvite by ID\n create Create a new orgClaimedInvite\n update Update an existing orgClaimedInvite\n delete Delete a orgClaimedInvite\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter entityId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgClaimedInviteSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-get-managers-record.ts b/sdk/constructive-cli/src/public/cli/commands/org-get-managers-record.ts index 6808fc470..380f3aedc 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-get-managers-record.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-get-managers-record.ts @@ -20,7 +20,7 @@ const fieldSchema: FieldSchema = { depth: 'int', }; const usage = - '\norg-get-managers-record \n\nCommands:\n list List orgGetManagersRecord records\n find-first Find first matching orgGetManagersRecord record\n create Create a new orgGetManagersRecord\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-get-managers-record \n\nCommands:\n list List orgGetManagersRecord records\n find-first Find first matching orgGetManagersRecord record\n create Create a new orgGetManagersRecord\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -94,7 +94,11 @@ async function handleFindFirst(argv: Partial>, _prompter depth: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + OrgGetManagersRecordSelect, + OrgGetManagersRecordFilter, + OrgGetManagersRecordsOrderBy + > & { select: OrgGetManagersRecordSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-get-subordinates-record.ts b/sdk/constructive-cli/src/public/cli/commands/org-get-subordinates-record.ts index 0d1eb8e5f..0fe97c399 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-get-subordinates-record.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-get-subordinates-record.ts @@ -20,7 +20,7 @@ const fieldSchema: FieldSchema = { depth: 'int', }; const usage = - '\norg-get-subordinates-record \n\nCommands:\n list List orgGetSubordinatesRecord records\n find-first Find first matching orgGetSubordinatesRecord record\n create Create a new orgGetSubordinatesRecord\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-get-subordinates-record \n\nCommands:\n list List orgGetSubordinatesRecord records\n find-first Find first matching orgGetSubordinatesRecord record\n create Create a new orgGetSubordinatesRecord\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -94,7 +94,11 @@ async function handleFindFirst(argv: Partial>, _prompter depth: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + OrgGetSubordinatesRecordSelect, + OrgGetSubordinatesRecordFilter, + OrgGetSubordinatesRecordsOrderBy + > & { select: OrgGetSubordinatesRecordSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-grant.ts b/sdk/constructive-cli/src/public/cli/commands/org-grant.ts index 634c7d588..2c0b87d49 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-grant.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-grant.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\norg-grant \n\nCommands:\n list List orgGrant records\n find-first Find first matching orgGrant record\n get Get a orgGrant by ID\n create Create a new orgGrant\n update Update an existing orgGrant\n delete Delete a orgGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-grant \n\nCommands:\n list List orgGrant records\n find-first Find first matching orgGrant record\n get Get a orgGrant by ID\n create Create a new orgGrant\n update Update an existing orgGrant\n delete Delete a orgGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -114,7 +114,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgGrantSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-invite.ts b/sdk/constructive-cli/src/public/cli/commands/org-invite.ts index 50b0411d4..82798a278 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-invite.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-invite.ts @@ -33,7 +33,7 @@ const fieldSchema: FieldSchema = { entityId: 'uuid', }; const usage = - '\norg-invite \n\nCommands:\n list List orgInvite records\n find-first Find first matching orgInvite record\n get Get a orgInvite by ID\n create Create a new orgInvite\n update Update an existing orgInvite\n delete Delete a orgInvite\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-invite \n\nCommands:\n list List orgInvite records\n find-first Find first matching orgInvite record\n get Get a orgInvite by ID\n create Create a new orgInvite\n update Update an existing orgInvite\n delete Delete a orgInvite\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -135,7 +135,7 @@ async function handleFindFirst(argv: Partial>, _prompter entityId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgInviteSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-limit-aggregate.ts b/sdk/constructive-cli/src/public/cli/commands/org-limit-aggregate.ts index 8b50e450b..31de519eb 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-limit-aggregate.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-limit-aggregate.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { windowDuration: 'string', }; const usage = - '\norg-limit-aggregate \n\nCommands:\n list List orgLimitAggregate records\n find-first Find first matching orgLimitAggregate record\n get Get a orgLimitAggregate by ID\n create Create a new orgLimitAggregate\n update Update an existing orgLimitAggregate\n delete Delete a orgLimitAggregate\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-limit-aggregate \n\nCommands:\n list List orgLimitAggregate records\n find-first Find first matching orgLimitAggregate record\n get Get a orgLimitAggregate by ID\n create Create a new orgLimitAggregate\n update Update an existing orgLimitAggregate\n delete Delete a orgLimitAggregate\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -114,7 +114,7 @@ async function handleFindFirst(argv: Partial>, _prompter windowDuration: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgLimitAggregateSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-limit-default.ts b/sdk/constructive-cli/src/public/cli/commands/org-limit-default.ts index 9a35893f2..65383bec0 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-limit-default.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-limit-default.ts @@ -22,7 +22,7 @@ const fieldSchema: FieldSchema = { softMax: 'int', }; const usage = - '\norg-limit-default \n\nCommands:\n list List orgLimitDefault records\n find-first Find first matching orgLimitDefault record\n get Get a orgLimitDefault by ID\n create Create a new orgLimitDefault\n update Update an existing orgLimitDefault\n delete Delete a orgLimitDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-limit-default \n\nCommands:\n list List orgLimitDefault records\n find-first Find first matching orgLimitDefault record\n get Get a orgLimitDefault by ID\n create Create a new orgLimitDefault\n update Update an existing orgLimitDefault\n delete Delete a orgLimitDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -102,7 +102,7 @@ async function handleFindFirst(argv: Partial>, _prompter softMax: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgLimitDefaultSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-limit-event.ts b/sdk/constructive-cli/src/public/cli/commands/org-limit-event.ts index 9867db17b..c8ef656d6 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-limit-event.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-limit-event.ts @@ -27,7 +27,7 @@ const fieldSchema: FieldSchema = { reason: 'string', }; const usage = - '\norg-limit-event \n\nCommands:\n list List orgLimitEvent records\n find-first Find first matching orgLimitEvent record\n create Create a new orgLimitEvent\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-limit-event \n\nCommands:\n list List orgLimitEvent records\n find-first Find first matching orgLimitEvent record\n create Create a new orgLimitEvent\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter reason: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgLimitEventSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-limit.ts b/sdk/constructive-cli/src/public/cli/commands/org-limit.ts index dda64514d..53a014bc9 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-limit.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-limit.ts @@ -27,7 +27,7 @@ const fieldSchema: FieldSchema = { entityId: 'uuid', }; const usage = - '\norg-limit \n\nCommands:\n list List orgLimit records\n find-first Find first matching orgLimit record\n get Get a orgLimit by ID\n create Create a new orgLimit\n update Update an existing orgLimit\n delete Delete a orgLimit\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-limit \n\nCommands:\n list List orgLimit records\n find-first Find first matching orgLimit record\n get Get a orgLimit by ID\n create Create a new orgLimit\n update Update an existing orgLimit\n delete Delete a orgLimit\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -117,7 +117,7 @@ async function handleFindFirst(argv: Partial>, _prompter entityId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgLimitSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-member-profile.ts b/sdk/constructive-cli/src/public/cli/commands/org-member-profile.ts index eddfe0d5f..87d0c9ab0 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-member-profile.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-member-profile.ts @@ -29,7 +29,7 @@ const fieldSchema: FieldSchema = { profilePicture: 'string', }; const usage = - '\norg-member-profile \n\nCommands:\n list List orgMemberProfile records\n find-first Find first matching orgMemberProfile record\n get Get a orgMemberProfile by ID\n create Create a new orgMemberProfile\n update Update an existing orgMemberProfile\n delete Delete a orgMemberProfile\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-member-profile \n\nCommands:\n list List orgMemberProfile records\n find-first Find first matching orgMemberProfile record\n get Get a orgMemberProfile by ID\n create Create a new orgMemberProfile\n update Update an existing orgMemberProfile\n delete Delete a orgMemberProfile\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -123,7 +123,7 @@ async function handleFindFirst(argv: Partial>, _prompter profilePicture: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgMemberProfileSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-member.ts b/sdk/constructive-cli/src/public/cli/commands/org-member.ts index cc7a7087a..5c4a95fb7 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-member.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-member.ts @@ -22,7 +22,7 @@ const fieldSchema: FieldSchema = { entityId: 'uuid', }; const usage = - '\norg-member \n\nCommands:\n list List orgMember records\n find-first Find first matching orgMember record\n get Get a orgMember by ID\n create Create a new orgMember\n update Update an existing orgMember\n delete Delete a orgMember\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-member \n\nCommands:\n list List orgMember records\n find-first Find first matching orgMember record\n get Get a orgMember by ID\n create Create a new orgMember\n update Update an existing orgMember\n delete Delete a orgMember\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -102,7 +102,7 @@ async function handleFindFirst(argv: Partial>, _prompter entityId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgMemberSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-membership-default.ts b/sdk/constructive-cli/src/public/cli/commands/org-membership-default.ts index 9a5015416..c2283c61d 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-membership-default.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-membership-default.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { entityId: 'uuid', }; const usage = - '\norg-membership-default \n\nCommands:\n list List orgMembershipDefault records\n find-first Find first matching orgMembershipDefault record\n get Get a orgMembershipDefault by ID\n create Create a new orgMembershipDefault\n update Update an existing orgMembershipDefault\n delete Delete a orgMembershipDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-membership-default \n\nCommands:\n list List orgMembershipDefault records\n find-first Find first matching orgMembershipDefault record\n get Get a orgMembershipDefault by ID\n create Create a new orgMembershipDefault\n update Update an existing orgMembershipDefault\n delete Delete a orgMembershipDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -115,7 +115,11 @@ async function handleFindFirst(argv: Partial>, _prompter entityId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + OrgMembershipDefaultSelect, + OrgMembershipDefaultFilter, + OrgMembershipDefaultOrderBy + > & { select: OrgMembershipDefaultSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-membership-setting.ts b/sdk/constructive-cli/src/public/cli/commands/org-membership-setting.ts index 1ac517828..ec4100c9c 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-membership-setting.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-membership-setting.ts @@ -32,7 +32,7 @@ const fieldSchema: FieldSchema = { limitAllocationMode: 'string', }; const usage = - '\norg-membership-setting \n\nCommands:\n list List orgMembershipSetting records\n find-first Find first matching orgMembershipSetting record\n get Get a orgMembershipSetting by ID\n create Create a new orgMembershipSetting\n update Update an existing orgMembershipSetting\n delete Delete a orgMembershipSetting\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-membership-setting \n\nCommands:\n list List orgMembershipSetting records\n find-first Find first matching orgMembershipSetting record\n get Get a orgMembershipSetting by ID\n create Create a new orgMembershipSetting\n update Update an existing orgMembershipSetting\n delete Delete a orgMembershipSetting\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -136,7 +136,11 @@ async function handleFindFirst(argv: Partial>, _prompter limitAllocationMode: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + OrgMembershipSettingSelect, + OrgMembershipSettingFilter, + OrgMembershipSettingOrderBy + > & { select: OrgMembershipSettingSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-membership.ts b/sdk/constructive-cli/src/public/cli/commands/org-membership.ts index a1bb84dcd..9ff6c3724 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-membership.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-membership.ts @@ -36,7 +36,7 @@ const fieldSchema: FieldSchema = { profileId: 'uuid', }; const usage = - '\norg-membership \n\nCommands:\n list List orgMembership records\n find-first Find first matching orgMembership record\n get Get a orgMembership by ID\n create Create a new orgMembership\n update Update an existing orgMembership\n delete Delete a orgMembership\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-membership \n\nCommands:\n list List orgMembership records\n find-first Find first matching orgMembership record\n get Get a orgMembership by ID\n create Create a new orgMembership\n update Update an existing orgMembership\n delete Delete a orgMembership\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -144,7 +144,7 @@ async function handleFindFirst(argv: Partial>, _prompter profileId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgMembershipSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-owner-grant.ts b/sdk/constructive-cli/src/public/cli/commands/org-owner-grant.ts index 99dc9ac3c..2d7d763e3 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-owner-grant.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-owner-grant.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\norg-owner-grant \n\nCommands:\n list List orgOwnerGrant records\n find-first Find first matching orgOwnerGrant record\n get Get a orgOwnerGrant by ID\n create Create a new orgOwnerGrant\n update Update an existing orgOwnerGrant\n delete Delete a orgOwnerGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-owner-grant \n\nCommands:\n list List orgOwnerGrant records\n find-first Find first matching orgOwnerGrant record\n get Get a orgOwnerGrant by ID\n create Create a new orgOwnerGrant\n update Update an existing orgOwnerGrant\n delete Delete a orgOwnerGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgOwnerGrantSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-permission-default.ts b/sdk/constructive-cli/src/public/cli/commands/org-permission-default.ts index 2448918b6..dbb2fb7b4 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-permission-default.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-permission-default.ts @@ -21,7 +21,7 @@ const fieldSchema: FieldSchema = { entityId: 'uuid', }; const usage = - '\norg-permission-default \n\nCommands:\n list List orgPermissionDefault records\n find-first Find first matching orgPermissionDefault record\n get Get a orgPermissionDefault by ID\n create Create a new orgPermissionDefault\n update Update an existing orgPermissionDefault\n delete Delete a orgPermissionDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-permission-default \n\nCommands:\n list List orgPermissionDefault records\n find-first Find first matching orgPermissionDefault record\n get Get a orgPermissionDefault by ID\n create Create a new orgPermissionDefault\n update Update an existing orgPermissionDefault\n delete Delete a orgPermissionDefault\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -103,7 +103,11 @@ async function handleFindFirst(argv: Partial>, _prompter entityId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + OrgPermissionDefaultSelect, + OrgPermissionDefaultFilter, + OrgPermissionDefaultOrderBy + > & { select: OrgPermissionDefaultSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-permission.ts b/sdk/constructive-cli/src/public/cli/commands/org-permission.ts index ed92cabc7..b48ebea78 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-permission.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-permission.ts @@ -23,7 +23,7 @@ const fieldSchema: FieldSchema = { description: 'string', }; const usage = - '\norg-permission \n\nCommands:\n list List orgPermission records\n find-first Find first matching orgPermission record\n get Get a orgPermission by ID\n create Create a new orgPermission\n update Update an existing orgPermission\n delete Delete a orgPermission\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-permission \n\nCommands:\n list List orgPermission records\n find-first Find first matching orgPermission record\n get Get a orgPermission by ID\n create Create a new orgPermission\n update Update an existing orgPermission\n delete Delete a orgPermission\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -105,7 +105,7 @@ async function handleFindFirst(argv: Partial>, _prompter description: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: OrgPermissionSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/permissions-module.ts b/sdk/constructive-cli/src/public/cli/commands/permissions-module.ts index cfa9e60b2..d0ad6b1b7 100644 --- a/sdk/constructive-cli/src/public/cli/commands/permissions-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/permissions-module.ts @@ -35,7 +35,7 @@ const fieldSchema: FieldSchema = { getMaskByName: 'string', }; const usage = - '\npermissions-module \n\nCommands:\n list List permissionsModule records\n find-first Find first matching permissionsModule record\n get Get a permissionsModule by ID\n create Create a new permissionsModule\n update Update an existing permissionsModule\n delete Delete a permissionsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\npermissions-module \n\nCommands:\n list List permissionsModule records\n find-first Find first matching permissionsModule record\n get Get a permissionsModule by ID\n create Create a new permissionsModule\n update Update an existing permissionsModule\n delete Delete a permissionsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -141,7 +141,7 @@ async function handleFindFirst(argv: Partial>, _prompter getMaskByName: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: PermissionsModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/phone-number.ts b/sdk/constructive-cli/src/public/cli/commands/phone-number.ts index c2d6537eb..26c1459ce 100644 --- a/sdk/constructive-cli/src/public/cli/commands/phone-number.ts +++ b/sdk/constructive-cli/src/public/cli/commands/phone-number.ts @@ -27,7 +27,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nphone-number \n\nCommands:\n list List phoneNumber records\n find-first Find first matching phoneNumber record\n get Get a phoneNumber by ID\n create Create a new phoneNumber\n update Update an existing phoneNumber\n delete Delete a phoneNumber\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nphone-number \n\nCommands:\n list List phoneNumber records\n find-first Find first matching phoneNumber record\n get Get a phoneNumber by ID\n create Create a new phoneNumber\n update Update an existing phoneNumber\n delete Delete a phoneNumber\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -117,7 +117,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: PhoneNumberSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/phone-numbers-module.ts b/sdk/constructive-cli/src/public/cli/commands/phone-numbers-module.ts index 7ba7112fa..dd922e7f9 100644 --- a/sdk/constructive-cli/src/public/cli/commands/phone-numbers-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/phone-numbers-module.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { tableName: 'string', }; const usage = - '\nphone-numbers-module \n\nCommands:\n list List phoneNumbersModule records\n find-first Find first matching phoneNumbersModule record\n get Get a phoneNumbersModule by ID\n create Create a new phoneNumbersModule\n update Update an existing phoneNumbersModule\n delete Delete a phoneNumbersModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nphone-numbers-module \n\nCommands:\n list List phoneNumbersModule records\n find-first Find first matching phoneNumbersModule record\n get Get a phoneNumbersModule by ID\n create Create a new phoneNumbersModule\n update Update an existing phoneNumbersModule\n delete Delete a phoneNumbersModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -115,7 +115,11 @@ async function handleFindFirst(argv: Partial>, _prompter tableName: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + PhoneNumbersModuleSelect, + PhoneNumbersModuleFilter, + PhoneNumbersModuleOrderBy + > & { select: PhoneNumbersModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/plans-module.ts b/sdk/constructive-cli/src/public/cli/commands/plans-module.ts index d30dec6ce..b149564f5 100644 --- a/sdk/constructive-cli/src/public/cli/commands/plans-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/plans-module.ts @@ -29,7 +29,7 @@ const fieldSchema: FieldSchema = { prefix: 'string', }; const usage = - '\nplans-module \n\nCommands:\n list List plansModule records\n find-first Find first matching plansModule record\n get Get a plansModule by ID\n create Create a new plansModule\n update Update an existing plansModule\n delete Delete a plansModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nplans-module \n\nCommands:\n list List plansModule records\n find-first Find first matching plansModule record\n get Get a plansModule by ID\n create Create a new plansModule\n update Update an existing plansModule\n delete Delete a plansModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -123,7 +123,7 @@ async function handleFindFirst(argv: Partial>, _prompter prefix: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: PlansModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/policy.ts b/sdk/constructive-cli/src/public/cli/commands/policy.ts index 7ff8ee5e2..4bdbfa11d 100644 --- a/sdk/constructive-cli/src/public/cli/commands/policy.ts +++ b/sdk/constructive-cli/src/public/cli/commands/policy.ts @@ -35,7 +35,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\npolicy \n\nCommands:\n list List policy records\n find-first Find first matching policy record\n get Get a policy by ID\n create Create a new policy\n update Update an existing policy\n delete Delete a policy\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\npolicy \n\nCommands:\n list List policy records\n find-first Find first matching policy record\n get Get a policy by ID\n create Create a new policy\n update Update an existing policy\n delete Delete a policy\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -141,7 +141,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: PolicySelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/primary-key-constraint.ts b/sdk/constructive-cli/src/public/cli/commands/primary-key-constraint.ts index 4b402e2c8..49b1f7b55 100644 --- a/sdk/constructive-cli/src/public/cli/commands/primary-key-constraint.ts +++ b/sdk/constructive-cli/src/public/cli/commands/primary-key-constraint.ts @@ -31,7 +31,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nprimary-key-constraint \n\nCommands:\n list List primaryKeyConstraint records\n find-first Find first matching primaryKeyConstraint record\n get Get a primaryKeyConstraint by ID\n create Create a new primaryKeyConstraint\n update Update an existing primaryKeyConstraint\n delete Delete a primaryKeyConstraint\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nprimary-key-constraint \n\nCommands:\n list List primaryKeyConstraint records\n find-first Find first matching primaryKeyConstraint record\n get Get a primaryKeyConstraint by ID\n create Create a new primaryKeyConstraint\n update Update an existing primaryKeyConstraint\n delete Delete a primaryKeyConstraint\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -133,7 +133,11 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + PrimaryKeyConstraintSelect, + PrimaryKeyConstraintFilter, + PrimaryKeyConstraintOrderBy + > & { select: PrimaryKeyConstraintSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/profiles-module.ts b/sdk/constructive-cli/src/public/cli/commands/profiles-module.ts index 12a490bcf..f132c0bc2 100644 --- a/sdk/constructive-cli/src/public/cli/commands/profiles-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/profiles-module.ts @@ -38,7 +38,7 @@ const fieldSchema: FieldSchema = { prefix: 'string', }; const usage = - '\nprofiles-module \n\nCommands:\n list List profilesModule records\n find-first Find first matching profilesModule record\n get Get a profilesModule by ID\n create Create a new profilesModule\n update Update an existing profilesModule\n delete Delete a profilesModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nprofiles-module \n\nCommands:\n list List profilesModule records\n find-first Find first matching profilesModule record\n get Get a profilesModule by ID\n create Create a new profilesModule\n update Update an existing profilesModule\n delete Delete a profilesModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -150,7 +150,7 @@ async function handleFindFirst(argv: Partial>, _prompter prefix: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: ProfilesModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/rate-limits-module.ts b/sdk/constructive-cli/src/public/cli/commands/rate-limits-module.ts index 455a8f059..2d2e34dee 100644 --- a/sdk/constructive-cli/src/public/cli/commands/rate-limits-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/rate-limits-module.ts @@ -27,7 +27,7 @@ const fieldSchema: FieldSchema = { rateLimitsTable: 'string', }; const usage = - '\nrate-limits-module \n\nCommands:\n list List rateLimitsModule records\n find-first Find first matching rateLimitsModule record\n get Get a rateLimitsModule by ID\n create Create a new rateLimitsModule\n update Update an existing rateLimitsModule\n delete Delete a rateLimitsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nrate-limits-module \n\nCommands:\n list List rateLimitsModule records\n find-first Find first matching rateLimitsModule record\n get Get a rateLimitsModule by ID\n create Create a new rateLimitsModule\n update Update an existing rateLimitsModule\n delete Delete a rateLimitsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -117,7 +117,7 @@ async function handleFindFirst(argv: Partial>, _prompter rateLimitsTable: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: RateLimitsModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/ref.ts b/sdk/constructive-cli/src/public/cli/commands/ref.ts index 8595f4926..cc4ef6922 100644 --- a/sdk/constructive-cli/src/public/cli/commands/ref.ts +++ b/sdk/constructive-cli/src/public/cli/commands/ref.ts @@ -23,7 +23,7 @@ const fieldSchema: FieldSchema = { commitId: 'uuid', }; const usage = - '\nref \n\nCommands:\n list List ref records\n find-first Find first matching ref record\n get Get a ref by ID\n create Create a new ref\n update Update an existing ref\n delete Delete a ref\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nref \n\nCommands:\n list List ref records\n find-first Find first matching ref record\n get Get a ref by ID\n create Create a new ref\n update Update an existing ref\n delete Delete a ref\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -105,7 +105,7 @@ async function handleFindFirst(argv: Partial>, _prompter commitId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: RefSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/relation-provision.ts b/sdk/constructive-cli/src/public/cli/commands/relation-provision.ts index da481c56c..9cfa01842 100644 --- a/sdk/constructive-cli/src/public/cli/commands/relation-provision.ts +++ b/sdk/constructive-cli/src/public/cli/commands/relation-provision.ts @@ -42,7 +42,7 @@ const fieldSchema: FieldSchema = { outTargetFieldId: 'uuid', }; const usage = - '\nrelation-provision \n\nCommands:\n list List relationProvision records\n find-first Find first matching relationProvision record\n get Get a relationProvision by ID\n create Create a new relationProvision\n update Update an existing relationProvision\n delete Delete a relationProvision\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nrelation-provision \n\nCommands:\n list List relationProvision records\n find-first Find first matching relationProvision record\n get Get a relationProvision by ID\n create Create a new relationProvision\n update Update an existing relationProvision\n delete Delete a relationProvision\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -162,7 +162,7 @@ async function handleFindFirst(argv: Partial>, _prompter outTargetFieldId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: RelationProvisionSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/rls-module.ts b/sdk/constructive-cli/src/public/cli/commands/rls-module.ts index 3756fea19..d0dc6a98b 100644 --- a/sdk/constructive-cli/src/public/cli/commands/rls-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/rls-module.ts @@ -29,7 +29,7 @@ const fieldSchema: FieldSchema = { currentRoleId: 'string', }; const usage = - '\nrls-module \n\nCommands:\n list List rlsModule records\n find-first Find first matching rlsModule record\n get Get a rlsModule by ID\n create Create a new rlsModule\n update Update an existing rlsModule\n delete Delete a rlsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nrls-module \n\nCommands:\n list List rlsModule records\n find-first Find first matching rlsModule record\n get Get a rlsModule by ID\n create Create a new rlsModule\n update Update an existing rlsModule\n delete Delete a rlsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -123,7 +123,7 @@ async function handleFindFirst(argv: Partial>, _prompter currentRoleId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: RlsModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/role-type.ts b/sdk/constructive-cli/src/public/cli/commands/role-type.ts index b29048ae9..565ef8219 100644 --- a/sdk/constructive-cli/src/public/cli/commands/role-type.ts +++ b/sdk/constructive-cli/src/public/cli/commands/role-type.ts @@ -20,7 +20,7 @@ const fieldSchema: FieldSchema = { name: 'string', }; const usage = - '\nrole-type \n\nCommands:\n list List roleType records\n find-first Find first matching roleType record\n get Get a roleType by ID\n create Create a new roleType\n update Update an existing roleType\n delete Delete a roleType\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nrole-type \n\nCommands:\n list List roleType records\n find-first Find first matching roleType record\n get Get a roleType by ID\n create Create a new roleType\n update Update an existing roleType\n delete Delete a roleType\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -96,7 +96,7 @@ async function handleFindFirst(argv: Partial>, _prompter name: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: RoleTypeSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/schema-grant.ts b/sdk/constructive-cli/src/public/cli/commands/schema-grant.ts index 6bb27927a..7ebfd02b0 100644 --- a/sdk/constructive-cli/src/public/cli/commands/schema-grant.ts +++ b/sdk/constructive-cli/src/public/cli/commands/schema-grant.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nschema-grant \n\nCommands:\n list List schemaGrant records\n find-first Find first matching schemaGrant record\n get Get a schemaGrant by ID\n create Create a new schemaGrant\n update Update an existing schemaGrant\n delete Delete a schemaGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nschema-grant \n\nCommands:\n list List schemaGrant records\n find-first Find first matching schemaGrant record\n get Get a schemaGrant by ID\n create Create a new schemaGrant\n update Update an existing schemaGrant\n delete Delete a schemaGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -108,7 +108,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: SchemaGrantSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/schema.ts b/sdk/constructive-cli/src/public/cli/commands/schema.ts index e7b6b8f78..00baad8f9 100644 --- a/sdk/constructive-cli/src/public/cli/commands/schema.ts +++ b/sdk/constructive-cli/src/public/cli/commands/schema.ts @@ -32,7 +32,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nschema \n\nCommands:\n list List schema records\n find-first Find first matching schema record\n get Get a schema by ID\n create Create a new schema\n update Update an existing schema\n delete Delete a schema\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nschema \n\nCommands:\n list List schema records\n find-first Find first matching schema record\n get Get a schema by ID\n create Create a new schema\n update Update an existing schema\n delete Delete a schema\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -132,7 +132,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: SchemaSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/secrets-module.ts b/sdk/constructive-cli/src/public/cli/commands/secrets-module.ts index 28373201c..cda58249c 100644 --- a/sdk/constructive-cli/src/public/cli/commands/secrets-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/secrets-module.ts @@ -23,7 +23,7 @@ const fieldSchema: FieldSchema = { tableName: 'string', }; const usage = - '\nsecrets-module \n\nCommands:\n list List secretsModule records\n find-first Find first matching secretsModule record\n get Get a secretsModule by ID\n create Create a new secretsModule\n update Update an existing secretsModule\n delete Delete a secretsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nsecrets-module \n\nCommands:\n list List secretsModule records\n find-first Find first matching secretsModule record\n get Get a secretsModule by ID\n create Create a new secretsModule\n update Update an existing secretsModule\n delete Delete a secretsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -105,7 +105,7 @@ async function handleFindFirst(argv: Partial>, _prompter tableName: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: SecretsModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/secure-table-provision.ts b/sdk/constructive-cli/src/public/cli/commands/secure-table-provision.ts index 761efa18e..14f3f2d67 100644 --- a/sdk/constructive-cli/src/public/cli/commands/secure-table-provision.ts +++ b/sdk/constructive-cli/src/public/cli/commands/secure-table-provision.ts @@ -29,7 +29,7 @@ const fieldSchema: FieldSchema = { outFields: 'uuid', }; const usage = - '\nsecure-table-provision \n\nCommands:\n list List secureTableProvision records\n find-first Find first matching secureTableProvision record\n get Get a secureTableProvision by ID\n create Create a new secureTableProvision\n update Update an existing secureTableProvision\n delete Delete a secureTableProvision\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nsecure-table-provision \n\nCommands:\n list List secureTableProvision records\n find-first Find first matching secureTableProvision record\n get Get a secureTableProvision by ID\n create Create a new secureTableProvision\n update Update an existing secureTableProvision\n delete Delete a secureTableProvision\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -127,7 +127,11 @@ async function handleFindFirst(argv: Partial>, _prompter outFields: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + SecureTableProvisionSelect, + SecureTableProvisionFilter, + SecureTableProvisionOrderBy + > & { select: SecureTableProvisionSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/session-secrets-module.ts b/sdk/constructive-cli/src/public/cli/commands/session-secrets-module.ts index d161b2b4c..af5c01ded 100644 --- a/sdk/constructive-cli/src/public/cli/commands/session-secrets-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/session-secrets-module.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { sessionsTableId: 'uuid', }; const usage = - '\nsession-secrets-module \n\nCommands:\n list List sessionSecretsModule records\n find-first Find first matching sessionSecretsModule record\n get Get a sessionSecretsModule by ID\n create Create a new sessionSecretsModule\n update Update an existing sessionSecretsModule\n delete Delete a sessionSecretsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nsession-secrets-module \n\nCommands:\n list List sessionSecretsModule records\n find-first Find first matching sessionSecretsModule record\n get Get a sessionSecretsModule by ID\n create Create a new sessionSecretsModule\n update Update an existing sessionSecretsModule\n delete Delete a sessionSecretsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -112,7 +112,11 @@ async function handleFindFirst(argv: Partial>, _prompter sessionsTableId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + SessionSecretsModuleSelect, + SessionSecretsModuleFilter, + SessionSecretsModuleOrderBy + > & { select: SessionSecretsModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/sessions-module.ts b/sdk/constructive-cli/src/public/cli/commands/sessions-module.ts index e8982391d..d50c19f56 100644 --- a/sdk/constructive-cli/src/public/cli/commands/sessions-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/sessions-module.ts @@ -29,7 +29,7 @@ const fieldSchema: FieldSchema = { authSettingsTable: 'string', }; const usage = - '\nsessions-module \n\nCommands:\n list List sessionsModule records\n find-first Find first matching sessionsModule record\n get Get a sessionsModule by ID\n create Create a new sessionsModule\n update Update an existing sessionsModule\n delete Delete a sessionsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nsessions-module \n\nCommands:\n list List sessionsModule records\n find-first Find first matching sessionsModule record\n get Get a sessionsModule by ID\n create Create a new sessionsModule\n update Update an existing sessionsModule\n delete Delete a sessionsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -123,7 +123,7 @@ async function handleFindFirst(argv: Partial>, _prompter authSettingsTable: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: SessionsModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/site-metadatum.ts b/sdk/constructive-cli/src/public/cli/commands/site-metadatum.ts index 52aac2825..5d2b8e587 100644 --- a/sdk/constructive-cli/src/public/cli/commands/site-metadatum.ts +++ b/sdk/constructive-cli/src/public/cli/commands/site-metadatum.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { ogImage: 'string', }; const usage = - '\nsite-metadatum \n\nCommands:\n list List siteMetadatum records\n find-first Find first matching siteMetadatum record\n get Get a siteMetadatum by ID\n create Create a new siteMetadatum\n update Update an existing siteMetadatum\n delete Delete a siteMetadatum\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nsite-metadatum \n\nCommands:\n list List siteMetadatum records\n find-first Find first matching siteMetadatum record\n get Get a siteMetadatum by ID\n create Create a new siteMetadatum\n update Update an existing siteMetadatum\n delete Delete a siteMetadatum\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -108,7 +108,7 @@ async function handleFindFirst(argv: Partial>, _prompter ogImage: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: SiteMetadatumSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/site-module.ts b/sdk/constructive-cli/src/public/cli/commands/site-module.ts index f9565cbad..df614f02b 100644 --- a/sdk/constructive-cli/src/public/cli/commands/site-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/site-module.ts @@ -23,7 +23,7 @@ const fieldSchema: FieldSchema = { data: 'json', }; const usage = - '\nsite-module \n\nCommands:\n list List siteModule records\n find-first Find first matching siteModule record\n get Get a siteModule by ID\n create Create a new siteModule\n update Update an existing siteModule\n delete Delete a siteModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nsite-module \n\nCommands:\n list List siteModule records\n find-first Find first matching siteModule record\n get Get a siteModule by ID\n create Create a new siteModule\n update Update an existing siteModule\n delete Delete a siteModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -105,7 +105,7 @@ async function handleFindFirst(argv: Partial>, _prompter data: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: SiteModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/site-theme.ts b/sdk/constructive-cli/src/public/cli/commands/site-theme.ts index e972f3d3d..b1f521cf5 100644 --- a/sdk/constructive-cli/src/public/cli/commands/site-theme.ts +++ b/sdk/constructive-cli/src/public/cli/commands/site-theme.ts @@ -22,7 +22,7 @@ const fieldSchema: FieldSchema = { theme: 'json', }; const usage = - '\nsite-theme \n\nCommands:\n list List siteTheme records\n find-first Find first matching siteTheme record\n get Get a siteTheme by ID\n create Create a new siteTheme\n update Update an existing siteTheme\n delete Delete a siteTheme\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nsite-theme \n\nCommands:\n list List siteTheme records\n find-first Find first matching siteTheme record\n get Get a siteTheme by ID\n create Create a new siteTheme\n update Update an existing siteTheme\n delete Delete a siteTheme\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -102,7 +102,7 @@ async function handleFindFirst(argv: Partial>, _prompter theme: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: SiteThemeSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/site.ts b/sdk/constructive-cli/src/public/cli/commands/site.ts index bed665eda..85190f6fe 100644 --- a/sdk/constructive-cli/src/public/cli/commands/site.ts +++ b/sdk/constructive-cli/src/public/cli/commands/site.ts @@ -27,7 +27,7 @@ const fieldSchema: FieldSchema = { dbname: 'string', }; const usage = - '\nsite \n\nCommands:\n list List site records\n find-first Find first matching site record\n get Get a site by ID\n create Create a new site\n update Update an existing site\n delete Delete a site\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nsite \n\nCommands:\n list List site records\n find-first Find first matching site record\n get Get a site by ID\n create Create a new site\n update Update an existing site\n delete Delete a site\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -117,7 +117,7 @@ async function handleFindFirst(argv: Partial>, _prompter dbname: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: SiteSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/spatial-relation.ts b/sdk/constructive-cli/src/public/cli/commands/spatial-relation.ts index ea7555555..7b3339f45 100644 --- a/sdk/constructive-cli/src/public/cli/commands/spatial-relation.ts +++ b/sdk/constructive-cli/src/public/cli/commands/spatial-relation.ts @@ -33,7 +33,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nspatial-relation \n\nCommands:\n list List spatialRelation records\n find-first Find first matching spatialRelation record\n get Get a spatialRelation by ID\n create Create a new spatialRelation\n update Update an existing spatialRelation\n delete Delete a spatialRelation\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nspatial-relation \n\nCommands:\n list List spatialRelation records\n find-first Find first matching spatialRelation record\n get Get a spatialRelation by ID\n create Create a new spatialRelation\n update Update an existing spatialRelation\n delete Delete a spatialRelation\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -135,7 +135,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: SpatialRelationSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/sql-action.ts b/sdk/constructive-cli/src/public/cli/commands/sql-action.ts index de0075b14..7b7972533 100644 --- a/sdk/constructive-cli/src/public/cli/commands/sql-action.ts +++ b/sdk/constructive-cli/src/public/cli/commands/sql-action.ts @@ -31,7 +31,7 @@ const fieldSchema: FieldSchema = { actorId: 'uuid', }; const usage = - '\nsql-action \n\nCommands:\n list List sqlAction records\n find-first Find first matching sqlAction record\n create Create a new sqlAction\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nsql-action \n\nCommands:\n list List sqlAction records\n find-first Find first matching sqlAction record\n create Create a new sqlAction\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -123,7 +123,7 @@ async function handleFindFirst(argv: Partial>, _prompter actorId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: SqlActionSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/storage-module.ts b/sdk/constructive-cli/src/public/cli/commands/storage-module.ts index 0b97baf06..d86b2559b 100644 --- a/sdk/constructive-cli/src/public/cli/commands/storage-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/storage-module.ts @@ -40,7 +40,7 @@ const fieldSchema: FieldSchema = { cacheTtlSeconds: 'int', }; const usage = - '\nstorage-module \n\nCommands:\n list List storageModule records\n find-first Find first matching storageModule record\n get Get a storageModule by ID\n create Create a new storageModule\n update Update an existing storageModule\n delete Delete a storageModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nstorage-module \n\nCommands:\n list List storageModule records\n find-first Find first matching storageModule record\n get Get a storageModule by ID\n create Create a new storageModule\n update Update an existing storageModule\n delete Delete a storageModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -156,7 +156,7 @@ async function handleFindFirst(argv: Partial>, _prompter cacheTtlSeconds: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: StorageModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/store.ts b/sdk/constructive-cli/src/public/cli/commands/store.ts index cb3879c59..eba292c2f 100644 --- a/sdk/constructive-cli/src/public/cli/commands/store.ts +++ b/sdk/constructive-cli/src/public/cli/commands/store.ts @@ -23,7 +23,7 @@ const fieldSchema: FieldSchema = { createdAt: 'string', }; const usage = - '\nstore \n\nCommands:\n list List store records\n find-first Find first matching store record\n get Get a store by ID\n create Create a new store\n update Update an existing store\n delete Delete a store\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nstore \n\nCommands:\n list List store records\n find-first Find first matching store record\n get Get a store by ID\n create Create a new store\n update Update an existing store\n delete Delete a store\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -105,7 +105,7 @@ async function handleFindFirst(argv: Partial>, _prompter createdAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: StoreSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/table-grant.ts b/sdk/constructive-cli/src/public/cli/commands/table-grant.ts index c5e4011db..d3e01bdc7 100644 --- a/sdk/constructive-cli/src/public/cli/commands/table-grant.ts +++ b/sdk/constructive-cli/src/public/cli/commands/table-grant.ts @@ -27,7 +27,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\ntable-grant \n\nCommands:\n list List tableGrant records\n find-first Find first matching tableGrant record\n get Get a tableGrant by ID\n create Create a new tableGrant\n update Update an existing tableGrant\n delete Delete a tableGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ntable-grant \n\nCommands:\n list List tableGrant records\n find-first Find first matching tableGrant record\n get Get a tableGrant by ID\n create Create a new tableGrant\n update Update an existing tableGrant\n delete Delete a tableGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -117,7 +117,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: TableGrantSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/table.ts b/sdk/constructive-cli/src/public/cli/commands/table.ts index 58152c860..8f414d60a 100644 --- a/sdk/constructive-cli/src/public/cli/commands/table.ts +++ b/sdk/constructive-cli/src/public/cli/commands/table.ts @@ -37,7 +37,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\ntable \n\nCommands:\n list List table records\n find-first Find first matching table record\n get Get a table by ID\n create Create a new table\n update Update an existing table\n delete Delete a table\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ntable \n\nCommands:\n list List table records\n find-first Find first matching table record\n get Get a table by ID\n create Create a new table\n update Update an existing table\n delete Delete a table\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -147,7 +147,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: TableSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/trigger-function.ts b/sdk/constructive-cli/src/public/cli/commands/trigger-function.ts index f9bab2f62..f6888a720 100644 --- a/sdk/constructive-cli/src/public/cli/commands/trigger-function.ts +++ b/sdk/constructive-cli/src/public/cli/commands/trigger-function.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\ntrigger-function \n\nCommands:\n list List triggerFunction records\n find-first Find first matching triggerFunction record\n get Get a triggerFunction by ID\n create Create a new triggerFunction\n update Update an existing triggerFunction\n delete Delete a triggerFunction\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ntrigger-function \n\nCommands:\n list List triggerFunction records\n find-first Find first matching triggerFunction record\n get Get a triggerFunction by ID\n create Create a new triggerFunction\n update Update an existing triggerFunction\n delete Delete a triggerFunction\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -108,7 +108,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: TriggerFunctionSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/trigger.ts b/sdk/constructive-cli/src/public/cli/commands/trigger.ts index 056b75efe..5292e2a2b 100644 --- a/sdk/constructive-cli/src/public/cli/commands/trigger.ts +++ b/sdk/constructive-cli/src/public/cli/commands/trigger.ts @@ -31,7 +31,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\ntrigger \n\nCommands:\n list List trigger records\n find-first Find first matching trigger record\n get Get a trigger by ID\n create Create a new trigger\n update Update an existing trigger\n delete Delete a trigger\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\ntrigger \n\nCommands:\n list List trigger records\n find-first Find first matching trigger record\n get Get a trigger by ID\n create Create a new trigger\n update Update an existing trigger\n delete Delete a trigger\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -129,7 +129,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: TriggerSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/unique-constraint.ts b/sdk/constructive-cli/src/public/cli/commands/unique-constraint.ts index 65f69f8f7..0c105d5db 100644 --- a/sdk/constructive-cli/src/public/cli/commands/unique-constraint.ts +++ b/sdk/constructive-cli/src/public/cli/commands/unique-constraint.ts @@ -32,7 +32,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nunique-constraint \n\nCommands:\n list List uniqueConstraint records\n find-first Find first matching uniqueConstraint record\n get Get a uniqueConstraint by ID\n create Create a new uniqueConstraint\n update Update an existing uniqueConstraint\n delete Delete a uniqueConstraint\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nunique-constraint \n\nCommands:\n list List uniqueConstraint records\n find-first Find first matching uniqueConstraint record\n get Get a uniqueConstraint by ID\n create Create a new uniqueConstraint\n update Update an existing uniqueConstraint\n delete Delete a uniqueConstraint\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -132,7 +132,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: UniqueConstraintSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/user-auth-module.ts b/sdk/constructive-cli/src/public/cli/commands/user-auth-module.ts index 1450ac267..15734bbc8 100644 --- a/sdk/constructive-cli/src/public/cli/commands/user-auth-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/user-auth-module.ts @@ -44,7 +44,7 @@ const fieldSchema: FieldSchema = { extendTokenExpires: 'string', }; const usage = - '\nuser-auth-module \n\nCommands:\n list List userAuthModule records\n find-first Find first matching userAuthModule record\n get Get a userAuthModule by ID\n create Create a new userAuthModule\n update Update an existing userAuthModule\n delete Delete a userAuthModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nuser-auth-module \n\nCommands:\n list List userAuthModule records\n find-first Find first matching userAuthModule record\n get Get a userAuthModule by ID\n create Create a new userAuthModule\n update Update an existing userAuthModule\n delete Delete a userAuthModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -168,7 +168,7 @@ async function handleFindFirst(argv: Partial>, _prompter extendTokenExpires: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: UserAuthModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/user-connected-account.ts b/sdk/constructive-cli/src/public/cli/commands/user-connected-account.ts index 26fd78bcf..a73861ea4 100644 --- a/sdk/constructive-cli/src/public/cli/commands/user-connected-account.ts +++ b/sdk/constructive-cli/src/public/cli/commands/user-connected-account.ts @@ -26,7 +26,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nuser-connected-account \n\nCommands:\n list List userConnectedAccount records\n find-first Find first matching userConnectedAccount record\n create Create a new userConnectedAccount\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nuser-connected-account \n\nCommands:\n list List userConnectedAccount records\n find-first Find first matching userConnectedAccount record\n create Create a new userConnectedAccount\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -112,7 +112,11 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy + > & { select: UserConnectedAccountSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/user.ts b/sdk/constructive-cli/src/public/cli/commands/user.ts index 7bf4feb16..afbb1aba9 100644 --- a/sdk/constructive-cli/src/public/cli/commands/user.ts +++ b/sdk/constructive-cli/src/public/cli/commands/user.ts @@ -29,7 +29,7 @@ const fieldSchema: FieldSchema = { searchScore: 'float', }; const usage = - '\nuser \n\nCommands:\n list List user records\n find-first Find first matching user record\n search Search user records\n get Get a user by ID\n create Create a new user\n update Update an existing user\n delete Delete a user\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\nSearch Options:\n Search query string (required)\n --limit Max number of records to return\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --orderBy Comma-separated list of ordering values\n\n --help, -h Show this help message\n'; + '\nuser \n\nCommands:\n list List user records\n find-first Find first matching user record\n search Search user records\n get Get a user by ID\n create Create a new user\n update Update an existing user\n delete Delete a user\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nSearch Options:\n Search query string (required)\n --limit Max number of records to return\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --orderBy Comma-separated list of ordering values\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -117,7 +117,7 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: UserSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/users-module.ts b/sdk/constructive-cli/src/public/cli/commands/users-module.ts index 5e063f56a..7c6d4cfff 100644 --- a/sdk/constructive-cli/src/public/cli/commands/users-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/users-module.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { typeTableName: 'string', }; const usage = - '\nusers-module \n\nCommands:\n list List usersModule records\n find-first Find first matching usersModule record\n get Get a usersModule by ID\n create Create a new usersModule\n update Update an existing usersModule\n delete Delete a usersModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nusers-module \n\nCommands:\n list List usersModule records\n find-first Find first matching usersModule record\n get Get a usersModule by ID\n create Create a new usersModule\n update Update an existing usersModule\n delete Delete a usersModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter typeTableName: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: UsersModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/view-grant.ts b/sdk/constructive-cli/src/public/cli/commands/view-grant.ts index 8e2da565e..e942776dc 100644 --- a/sdk/constructive-cli/src/public/cli/commands/view-grant.ts +++ b/sdk/constructive-cli/src/public/cli/commands/view-grant.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { isGrant: 'boolean', }; const usage = - '\nview-grant \n\nCommands:\n list List viewGrant records\n find-first Find first matching viewGrant record\n get Get a viewGrant by ID\n create Create a new viewGrant\n update Update an existing viewGrant\n delete Delete a viewGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nview-grant \n\nCommands:\n list List viewGrant records\n find-first Find first matching viewGrant record\n get Get a viewGrant by ID\n create Create a new viewGrant\n update Update an existing viewGrant\n delete Delete a viewGrant\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -111,7 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter isGrant: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: ViewGrantSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/view-rule.ts b/sdk/constructive-cli/src/public/cli/commands/view-rule.ts index 332a62dd5..353f9c86c 100644 --- a/sdk/constructive-cli/src/public/cli/commands/view-rule.ts +++ b/sdk/constructive-cli/src/public/cli/commands/view-rule.ts @@ -24,7 +24,7 @@ const fieldSchema: FieldSchema = { action: 'string', }; const usage = - '\nview-rule \n\nCommands:\n list List viewRule records\n find-first Find first matching viewRule record\n get Get a viewRule by ID\n create Create a new viewRule\n update Update an existing viewRule\n delete Delete a viewRule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nview-rule \n\nCommands:\n list List viewRule records\n find-first Find first matching viewRule record\n get Get a viewRule by ID\n create Create a new viewRule\n update Update an existing viewRule\n delete Delete a viewRule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -108,7 +108,7 @@ async function handleFindFirst(argv: Partial>, _prompter action: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: ViewRuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/view-table.ts b/sdk/constructive-cli/src/public/cli/commands/view-table.ts index 000e73739..f40e91046 100644 --- a/sdk/constructive-cli/src/public/cli/commands/view-table.ts +++ b/sdk/constructive-cli/src/public/cli/commands/view-table.ts @@ -22,7 +22,7 @@ const fieldSchema: FieldSchema = { joinOrder: 'int', }; const usage = - '\nview-table \n\nCommands:\n list List viewTable records\n find-first Find first matching viewTable record\n get Get a viewTable by ID\n create Create a new viewTable\n update Update an existing viewTable\n delete Delete a viewTable\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nview-table \n\nCommands:\n list List viewTable records\n find-first Find first matching viewTable record\n get Get a viewTable by ID\n create Create a new viewTable\n update Update an existing viewTable\n delete Delete a viewTable\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -102,7 +102,7 @@ async function handleFindFirst(argv: Partial>, _prompter joinOrder: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: ViewTableSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/view.ts b/sdk/constructive-cli/src/public/cli/commands/view.ts index d05334504..779de11c7 100644 --- a/sdk/constructive-cli/src/public/cli/commands/view.ts +++ b/sdk/constructive-cli/src/public/cli/commands/view.ts @@ -34,7 +34,7 @@ const fieldSchema: FieldSchema = { tags: 'string', }; const usage = - '\nview \n\nCommands:\n list List view records\n find-first Find first matching view record\n get Get a view by ID\n create Create a new view\n update Update an existing view\n delete Delete a view\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nview \n\nCommands:\n list List view records\n find-first Find first matching view record\n get Get a view by ID\n create Create a new view\n update Update an existing view\n delete Delete a view\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -138,7 +138,7 @@ async function handleFindFirst(argv: Partial>, _prompter tags: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs & { select: ViewSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/webauthn-auth-module.ts b/sdk/constructive-cli/src/public/cli/commands/webauthn-auth-module.ts index 468587582..587bf2236 100644 --- a/sdk/constructive-cli/src/public/cli/commands/webauthn-auth-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/webauthn-auth-module.ts @@ -34,7 +34,7 @@ const fieldSchema: FieldSchema = { challengeExpiry: 'string', }; const usage = - '\nwebauthn-auth-module \n\nCommands:\n list List webauthnAuthModule records\n find-first Find first matching webauthnAuthModule record\n get Get a webauthnAuthModule by ID\n create Create a new webauthnAuthModule\n update Update an existing webauthnAuthModule\n delete Delete a webauthnAuthModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nwebauthn-auth-module \n\nCommands:\n list List webauthnAuthModule records\n find-first Find first matching webauthnAuthModule record\n get Get a webauthnAuthModule by ID\n create Create a new webauthnAuthModule\n update Update an existing webauthnAuthModule\n delete Delete a webauthnAuthModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -142,7 +142,11 @@ async function handleFindFirst(argv: Partial>, _prompter challengeExpiry: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + WebauthnAuthModuleSelect, + WebauthnAuthModuleFilter, + WebauthnAuthModuleOrderBy + > & { select: WebauthnAuthModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/webauthn-credential.ts b/sdk/constructive-cli/src/public/cli/commands/webauthn-credential.ts index b3890c2a5..db01a43f3 100644 --- a/sdk/constructive-cli/src/public/cli/commands/webauthn-credential.ts +++ b/sdk/constructive-cli/src/public/cli/commands/webauthn-credential.ts @@ -32,7 +32,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nwebauthn-credential \n\nCommands:\n list List webauthnCredential records\n find-first Find first matching webauthnCredential record\n get Get a webauthnCredential by ID\n create Create a new webauthnCredential\n update Update an existing webauthnCredential\n delete Delete a webauthnCredential\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nwebauthn-credential \n\nCommands:\n list List webauthnCredential records\n find-first Find first matching webauthnCredential record\n get Get a webauthnCredential by ID\n create Create a new webauthnCredential\n update Update an existing webauthnCredential\n delete Delete a webauthnCredential\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -136,7 +136,11 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + WebauthnCredentialSelect, + WebauthnCredentialFilter, + WebauthnCredentialOrderBy + > & { select: WebauthnCredentialSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/commands/webauthn-credentials-module.ts b/sdk/constructive-cli/src/public/cli/commands/webauthn-credentials-module.ts index 087e5a19d..bcc7905b1 100644 --- a/sdk/constructive-cli/src/public/cli/commands/webauthn-credentials-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/webauthn-credentials-module.ts @@ -25,7 +25,7 @@ const fieldSchema: FieldSchema = { tableName: 'string', }; const usage = - '\nwebauthn-credentials-module \n\nCommands:\n list List webauthnCredentialsModule records\n find-first Find first matching webauthnCredentialsModule record\n get Get a webauthnCredentialsModule by ID\n create Create a new webauthnCredentialsModule\n update Update an existing webauthnCredentialsModule\n delete Delete a webauthnCredentialsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nwebauthn-credentials-module \n\nCommands:\n list List webauthnCredentialsModule records\n find-first Find first matching webauthnCredentialsModule record\n get Get a webauthnCredentialsModule by ID\n create Create a new webauthnCredentialsModule\n update Update an existing webauthnCredentialsModule\n delete Delete a webauthnCredentialsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -115,7 +115,11 @@ async function handleFindFirst(argv: Partial>, _prompter tableName: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { + FindFirstArgs< + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleFilter, + WebauthnCredentialsModuleOrderBy + > & { select: WebauthnCredentialsModuleSelect; } >(argv, defaultSelect); diff --git a/sdk/constructive-cli/src/public/cli/utils.ts b/sdk/constructive-cli/src/public/cli/utils.ts index 1a3f288db..78a7defb6 100644 --- a/sdk/constructive-cli/src/public/cli/utils.ts +++ b/sdk/constructive-cli/src/public/cli/utils.ts @@ -255,8 +255,8 @@ export function parseFindManyArgs>( /** * Build findFirst args from CLI argv. - * Like parseFindManyArgs but only includes select and where - * (no pagination flags — findFirst returns the first matching record). + * Like parseFindManyArgs but without pagination flags (no limit/offset/after/before/last) + * — findFirst returns the first matching record. Supports select, where, and orderBy. */ export function parseFindFirstArgs>( argv: Record, @@ -265,10 +265,12 @@ export function parseFindFirstArgs>( const select = parseSelectFlag(argv, defaultSelect); const parsed = unflattenDotNotation(argv); const where = parsed.where; + const orderBy = parseOrderByFlag(argv); return { select, ...(where !== undefined ? { where } : {}), + ...(orderBy !== undefined ? { orderBy } : {}), } as unknown as T; } diff --git a/sdk/constructive-cli/src/public/orm/models/agentMessage.ts b/sdk/constructive-cli/src/public/orm/models/agentMessage.ts index dd3434345..d128641c8 100644 --- a/sdk/constructive-cli/src/public/orm/models/agentMessage.ts +++ b/sdk/constructive-cli/src/public/orm/models/agentMessage.ts @@ -70,13 +70,11 @@ export class AgentMessageModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - agentMessages: { - nodes: InferSelectResult[]; - }; + agentMessage: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AgentMessage', @@ -84,17 +82,26 @@ export class AgentMessageModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AgentMessageFilter', + 'AgentMessageOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AgentMessage', - fieldName: 'agentMessages', + fieldName: 'agentMessage', document, variables, + transform: (data: { + agentMessages?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + agentMessage: data.agentMessages?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/agentTask.ts b/sdk/constructive-cli/src/public/orm/models/agentTask.ts index 7f837b699..3bbc609f1 100644 --- a/sdk/constructive-cli/src/public/orm/models/agentTask.ts +++ b/sdk/constructive-cli/src/public/orm/models/agentTask.ts @@ -70,13 +70,11 @@ export class AgentTaskModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - agentTasks: { - nodes: InferSelectResult[]; - }; + agentTask: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AgentTask', @@ -84,17 +82,26 @@ export class AgentTaskModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AgentTaskFilter', + 'AgentTaskOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AgentTask', - fieldName: 'agentTasks', + fieldName: 'agentTask', document, variables, + transform: (data: { + agentTasks?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + agentTask: data.agentTasks?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/agentThread.ts b/sdk/constructive-cli/src/public/orm/models/agentThread.ts index beb795fd1..7bbd14abe 100644 --- a/sdk/constructive-cli/src/public/orm/models/agentThread.ts +++ b/sdk/constructive-cli/src/public/orm/models/agentThread.ts @@ -70,13 +70,11 @@ export class AgentThreadModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - agentThreads: { - nodes: InferSelectResult[]; - }; + agentThread: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AgentThread', @@ -84,17 +82,26 @@ export class AgentThreadModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AgentThreadFilter', + 'AgentThreadOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AgentThread', - fieldName: 'agentThreads', + fieldName: 'agentThread', document, variables, + transform: (data: { + agentThreads?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + agentThread: data.agentThreads?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/api.ts b/sdk/constructive-cli/src/public/orm/models/api.ts index 295ccbb65..5e2e04bd3 100644 --- a/sdk/constructive-cli/src/public/orm/models/api.ts +++ b/sdk/constructive-cli/src/public/orm/models/api.ts @@ -70,13 +70,11 @@ export class ApiModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - apis: { - nodes: InferSelectResult[]; - }; + api: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Api', @@ -84,17 +82,26 @@ export class ApiModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Api', - fieldName: 'apis', + fieldName: 'api', document, variables, + transform: (data: { + apis?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + api: data.apis?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/apiModule.ts b/sdk/constructive-cli/src/public/orm/models/apiModule.ts index d90c9f9e9..d98c67c6e 100644 --- a/sdk/constructive-cli/src/public/orm/models/apiModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/apiModule.ts @@ -70,13 +70,11 @@ export class ApiModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - apiModules: { - nodes: InferSelectResult[]; - }; + apiModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ApiModule', @@ -84,17 +82,26 @@ export class ApiModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ApiModuleFilter', + 'ApiModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ApiModule', - fieldName: 'apiModules', + fieldName: 'apiModule', document, variables, + transform: (data: { + apiModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + apiModule: data.apiModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/apiSchema.ts b/sdk/constructive-cli/src/public/orm/models/apiSchema.ts index f9288041c..9ef99da8c 100644 --- a/sdk/constructive-cli/src/public/orm/models/apiSchema.ts +++ b/sdk/constructive-cli/src/public/orm/models/apiSchema.ts @@ -70,13 +70,11 @@ export class ApiSchemaModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - apiSchemas: { - nodes: InferSelectResult[]; - }; + apiSchema: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ApiSchema', @@ -84,17 +82,26 @@ export class ApiSchemaModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ApiSchemaFilter', + 'ApiSchemaOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ApiSchema', - fieldName: 'apiSchemas', + fieldName: 'apiSchema', document, variables, + transform: (data: { + apiSchemas?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + apiSchema: data.apiSchemas?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/app.ts b/sdk/constructive-cli/src/public/orm/models/app.ts index f6a45b422..73ac9831b 100644 --- a/sdk/constructive-cli/src/public/orm/models/app.ts +++ b/sdk/constructive-cli/src/public/orm/models/app.ts @@ -70,13 +70,11 @@ export class AppModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - apps: { - nodes: InferSelectResult[]; - }; + app: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'App', @@ -84,17 +82,26 @@ export class AppModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppFilter', + 'AppOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'App', - fieldName: 'apps', + fieldName: 'app', document, variables, + transform: (data: { + apps?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + app: data.apps?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/appAchievement.ts b/sdk/constructive-cli/src/public/orm/models/appAchievement.ts index f24447777..545b5e5f7 100644 --- a/sdk/constructive-cli/src/public/orm/models/appAchievement.ts +++ b/sdk/constructive-cli/src/public/orm/models/appAchievement.ts @@ -70,13 +70,11 @@ export class AppAchievementModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appAchievements: { - nodes: InferSelectResult[]; - }; + appAchievement: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppAchievement', @@ -84,17 +82,26 @@ export class AppAchievementModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppAchievementFilter', + 'AppAchievementOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppAchievement', - fieldName: 'appAchievements', + fieldName: 'appAchievement', document, variables, + transform: (data: { + appAchievements?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appAchievement: data.appAchievements?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/appAdminGrant.ts b/sdk/constructive-cli/src/public/orm/models/appAdminGrant.ts index 6a2a59893..fd80edc23 100644 --- a/sdk/constructive-cli/src/public/orm/models/appAdminGrant.ts +++ b/sdk/constructive-cli/src/public/orm/models/appAdminGrant.ts @@ -70,13 +70,11 @@ export class AppAdminGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appAdminGrants: { - nodes: InferSelectResult[]; - }; + appAdminGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppAdminGrant', @@ -84,17 +82,26 @@ export class AppAdminGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppAdminGrantFilter', + 'AppAdminGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppAdminGrant', - fieldName: 'appAdminGrants', + fieldName: 'appAdminGrant', document, variables, + transform: (data: { + appAdminGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appAdminGrant: data.appAdminGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/appClaimedInvite.ts b/sdk/constructive-cli/src/public/orm/models/appClaimedInvite.ts index 2a4c41dec..c9e66ec9c 100644 --- a/sdk/constructive-cli/src/public/orm/models/appClaimedInvite.ts +++ b/sdk/constructive-cli/src/public/orm/models/appClaimedInvite.ts @@ -70,13 +70,11 @@ export class AppClaimedInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appClaimedInvites: { - nodes: InferSelectResult[]; - }; + appClaimedInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppClaimedInvite', @@ -84,17 +82,26 @@ export class AppClaimedInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppClaimedInviteFilter', + 'AppClaimedInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppClaimedInvite', - fieldName: 'appClaimedInvites', + fieldName: 'appClaimedInvite', document, variables, + transform: (data: { + appClaimedInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appClaimedInvite: data.appClaimedInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/appGrant.ts b/sdk/constructive-cli/src/public/orm/models/appGrant.ts index 2cb4f429a..4481fb3d8 100644 --- a/sdk/constructive-cli/src/public/orm/models/appGrant.ts +++ b/sdk/constructive-cli/src/public/orm/models/appGrant.ts @@ -70,13 +70,11 @@ export class AppGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appGrants: { - nodes: InferSelectResult[]; - }; + appGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppGrant', @@ -84,17 +82,26 @@ export class AppGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppGrantFilter', + 'AppGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppGrant', - fieldName: 'appGrants', + fieldName: 'appGrant', document, variables, + transform: (data: { + appGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appGrant: data.appGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/appInvite.ts b/sdk/constructive-cli/src/public/orm/models/appInvite.ts index fe4a1c4e4..5fcbff936 100644 --- a/sdk/constructive-cli/src/public/orm/models/appInvite.ts +++ b/sdk/constructive-cli/src/public/orm/models/appInvite.ts @@ -70,13 +70,11 @@ export class AppInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appInvites: { - nodes: InferSelectResult[]; - }; + appInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppInvite', @@ -84,17 +82,26 @@ export class AppInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppInviteFilter', + 'AppInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppInvite', - fieldName: 'appInvites', + fieldName: 'appInvite', document, variables, + transform: (data: { + appInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appInvite: data.appInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/appLevel.ts b/sdk/constructive-cli/src/public/orm/models/appLevel.ts index f9abef512..cd182a18c 100644 --- a/sdk/constructive-cli/src/public/orm/models/appLevel.ts +++ b/sdk/constructive-cli/src/public/orm/models/appLevel.ts @@ -70,13 +70,11 @@ export class AppLevelModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLevels: { - nodes: InferSelectResult[]; - }; + appLevel: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLevel', @@ -84,17 +82,26 @@ export class AppLevelModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLevelFilter', + 'AppLevelOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLevel', - fieldName: 'appLevels', + fieldName: 'appLevel', document, variables, + transform: (data: { + appLevels?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevel: data.appLevels?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/appLevelRequirement.ts b/sdk/constructive-cli/src/public/orm/models/appLevelRequirement.ts index 54baeb7dc..c3f9d89f1 100644 --- a/sdk/constructive-cli/src/public/orm/models/appLevelRequirement.ts +++ b/sdk/constructive-cli/src/public/orm/models/appLevelRequirement.ts @@ -70,13 +70,11 @@ export class AppLevelRequirementModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLevelRequirements: { - nodes: InferSelectResult[]; - }; + appLevelRequirement: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLevelRequirement', @@ -84,17 +82,26 @@ export class AppLevelRequirementModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLevelRequirementFilter', + 'AppLevelRequirementOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLevelRequirement', - fieldName: 'appLevelRequirements', + fieldName: 'appLevelRequirement', document, variables, + transform: (data: { + appLevelRequirements?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevelRequirement: data.appLevelRequirements?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/appLimit.ts b/sdk/constructive-cli/src/public/orm/models/appLimit.ts index dea896420..2e109cb07 100644 --- a/sdk/constructive-cli/src/public/orm/models/appLimit.ts +++ b/sdk/constructive-cli/src/public/orm/models/appLimit.ts @@ -70,13 +70,11 @@ export class AppLimitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimits: { - nodes: InferSelectResult[]; - }; + appLimit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimit', @@ -84,17 +82,26 @@ export class AppLimitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitFilter', + 'AppLimitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimit', - fieldName: 'appLimits', + fieldName: 'appLimit', document, variables, + transform: (data: { + appLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimit: data.appLimits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/appLimitDefault.ts b/sdk/constructive-cli/src/public/orm/models/appLimitDefault.ts index dfec3cdd9..f9df6376e 100644 --- a/sdk/constructive-cli/src/public/orm/models/appLimitDefault.ts +++ b/sdk/constructive-cli/src/public/orm/models/appLimitDefault.ts @@ -70,13 +70,11 @@ export class AppLimitDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimitDefaults: { - nodes: InferSelectResult[]; - }; + appLimitDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimitDefault', @@ -84,17 +82,26 @@ export class AppLimitDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitDefaultFilter', + 'AppLimitDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimitDefault', - fieldName: 'appLimitDefaults', + fieldName: 'appLimitDefault', document, variables, + transform: (data: { + appLimitDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimitDefault: data.appLimitDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/appLimitEvent.ts b/sdk/constructive-cli/src/public/orm/models/appLimitEvent.ts index 8f367e889..b8e0c98e1 100644 --- a/sdk/constructive-cli/src/public/orm/models/appLimitEvent.ts +++ b/sdk/constructive-cli/src/public/orm/models/appLimitEvent.ts @@ -70,13 +70,11 @@ export class AppLimitEventModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimitEvents: { - nodes: InferSelectResult[]; - }; + appLimitEvent: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimitEvent', @@ -84,17 +82,26 @@ export class AppLimitEventModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitEventFilter', + 'AppLimitEventOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimitEvent', - fieldName: 'appLimitEvents', + fieldName: 'appLimitEvent', document, variables, + transform: (data: { + appLimitEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimitEvent: data.appLimitEvents?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-cli/src/public/orm/models/appMembership.ts b/sdk/constructive-cli/src/public/orm/models/appMembership.ts index a830192e6..a4011c41a 100644 --- a/sdk/constructive-cli/src/public/orm/models/appMembership.ts +++ b/sdk/constructive-cli/src/public/orm/models/appMembership.ts @@ -70,13 +70,11 @@ export class AppMembershipModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appMemberships: { - nodes: InferSelectResult[]; - }; + appMembership: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppMembership', @@ -84,17 +82,26 @@ export class AppMembershipModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppMembershipFilter', + 'AppMembershipOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppMembership', - fieldName: 'appMemberships', + fieldName: 'appMembership', document, variables, + transform: (data: { + appMemberships?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appMembership: data.appMemberships?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/appMembershipDefault.ts b/sdk/constructive-cli/src/public/orm/models/appMembershipDefault.ts index 8b1a54c01..f69f1aca6 100644 --- a/sdk/constructive-cli/src/public/orm/models/appMembershipDefault.ts +++ b/sdk/constructive-cli/src/public/orm/models/appMembershipDefault.ts @@ -72,13 +72,11 @@ export class AppMembershipDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appMembershipDefaults: { - nodes: InferSelectResult[]; - }; + appMembershipDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppMembershipDefault', @@ -86,17 +84,26 @@ export class AppMembershipDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppMembershipDefaultFilter', + 'AppMembershipDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppMembershipDefault', - fieldName: 'appMembershipDefaults', + fieldName: 'appMembershipDefault', document, variables, + transform: (data: { + appMembershipDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appMembershipDefault: data.appMembershipDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/appOwnerGrant.ts b/sdk/constructive-cli/src/public/orm/models/appOwnerGrant.ts index a8695557e..eeb815d84 100644 --- a/sdk/constructive-cli/src/public/orm/models/appOwnerGrant.ts +++ b/sdk/constructive-cli/src/public/orm/models/appOwnerGrant.ts @@ -70,13 +70,11 @@ export class AppOwnerGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appOwnerGrants: { - nodes: InferSelectResult[]; - }; + appOwnerGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppOwnerGrant', @@ -84,17 +82,26 @@ export class AppOwnerGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppOwnerGrantFilter', + 'AppOwnerGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppOwnerGrant', - fieldName: 'appOwnerGrants', + fieldName: 'appOwnerGrant', document, variables, + transform: (data: { + appOwnerGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appOwnerGrant: data.appOwnerGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/appPermission.ts b/sdk/constructive-cli/src/public/orm/models/appPermission.ts index 2575c5de2..e71adea65 100644 --- a/sdk/constructive-cli/src/public/orm/models/appPermission.ts +++ b/sdk/constructive-cli/src/public/orm/models/appPermission.ts @@ -70,13 +70,11 @@ export class AppPermissionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appPermissions: { - nodes: InferSelectResult[]; - }; + appPermission: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppPermission', @@ -84,17 +82,26 @@ export class AppPermissionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppPermissionFilter', + 'AppPermissionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppPermission', - fieldName: 'appPermissions', + fieldName: 'appPermission', document, variables, + transform: (data: { + appPermissions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appPermission: data.appPermissions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/appPermissionDefault.ts b/sdk/constructive-cli/src/public/orm/models/appPermissionDefault.ts index 427272883..d5511aed0 100644 --- a/sdk/constructive-cli/src/public/orm/models/appPermissionDefault.ts +++ b/sdk/constructive-cli/src/public/orm/models/appPermissionDefault.ts @@ -72,13 +72,11 @@ export class AppPermissionDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appPermissionDefaults: { - nodes: InferSelectResult[]; - }; + appPermissionDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppPermissionDefault', @@ -86,17 +84,26 @@ export class AppPermissionDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppPermissionDefaultFilter', + 'AppPermissionDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppPermissionDefault', - fieldName: 'appPermissionDefaults', + fieldName: 'appPermissionDefault', document, variables, + transform: (data: { + appPermissionDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appPermissionDefault: data.appPermissionDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/appStep.ts b/sdk/constructive-cli/src/public/orm/models/appStep.ts index 29dae0d6c..7ebb44fa1 100644 --- a/sdk/constructive-cli/src/public/orm/models/appStep.ts +++ b/sdk/constructive-cli/src/public/orm/models/appStep.ts @@ -70,13 +70,11 @@ export class AppStepModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appSteps: { - nodes: InferSelectResult[]; - }; + appStep: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppStep', @@ -84,17 +82,26 @@ export class AppStepModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppStepFilter', + 'AppStepOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppStep', - fieldName: 'appSteps', + fieldName: 'appStep', document, variables, + transform: (data: { + appSteps?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appStep: data.appSteps?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/astMigration.ts b/sdk/constructive-cli/src/public/orm/models/astMigration.ts index 8bab8cfd0..bfcc5f455 100644 --- a/sdk/constructive-cli/src/public/orm/models/astMigration.ts +++ b/sdk/constructive-cli/src/public/orm/models/astMigration.ts @@ -70,13 +70,11 @@ export class AstMigrationModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - astMigrations: { - nodes: InferSelectResult[]; - }; + astMigration: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AstMigration', @@ -84,17 +82,26 @@ export class AstMigrationModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AstMigrationFilter', + 'AstMigrationOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AstMigration', - fieldName: 'astMigrations', + fieldName: 'astMigration', document, variables, + transform: (data: { + astMigrations?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + astMigration: data.astMigrations?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/auditLog.ts b/sdk/constructive-cli/src/public/orm/models/auditLog.ts index 2d388026d..8d8abc012 100644 --- a/sdk/constructive-cli/src/public/orm/models/auditLog.ts +++ b/sdk/constructive-cli/src/public/orm/models/auditLog.ts @@ -70,13 +70,11 @@ export class AuditLogModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - auditLogs: { - nodes: InferSelectResult[]; - }; + auditLog: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AuditLog', @@ -84,17 +82,26 @@ export class AuditLogModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AuditLogFilter', + 'AuditLogOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AuditLog', - fieldName: 'auditLogs', + fieldName: 'auditLog', document, variables, + transform: (data: { + auditLogs?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + auditLog: data.auditLogs?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/billingModule.ts b/sdk/constructive-cli/src/public/orm/models/billingModule.ts index 73e7928ed..712d75ae7 100644 --- a/sdk/constructive-cli/src/public/orm/models/billingModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/billingModule.ts @@ -70,13 +70,11 @@ export class BillingModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - billingModules: { - nodes: InferSelectResult[]; - }; + billingModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'BillingModule', @@ -84,17 +82,26 @@ export class BillingModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'BillingModuleFilter', + 'BillingModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'BillingModule', - fieldName: 'billingModules', + fieldName: 'billingModule', document, variables, + transform: (data: { + billingModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + billingModule: data.billingModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/blueprint.ts b/sdk/constructive-cli/src/public/orm/models/blueprint.ts index fa1ea0286..239c50eb9 100644 --- a/sdk/constructive-cli/src/public/orm/models/blueprint.ts +++ b/sdk/constructive-cli/src/public/orm/models/blueprint.ts @@ -70,13 +70,11 @@ export class BlueprintModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - blueprints: { - nodes: InferSelectResult[]; - }; + blueprint: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Blueprint', @@ -84,17 +82,26 @@ export class BlueprintModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'BlueprintFilter', + 'BlueprintOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Blueprint', - fieldName: 'blueprints', + fieldName: 'blueprint', document, variables, + transform: (data: { + blueprints?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + blueprint: data.blueprints?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/blueprintConstruction.ts b/sdk/constructive-cli/src/public/orm/models/blueprintConstruction.ts index 3f7a8657d..dad6db0bf 100644 --- a/sdk/constructive-cli/src/public/orm/models/blueprintConstruction.ts +++ b/sdk/constructive-cli/src/public/orm/models/blueprintConstruction.ts @@ -72,13 +72,11 @@ export class BlueprintConstructionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - blueprintConstructions: { - nodes: InferSelectResult[]; - }; + blueprintConstruction: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'BlueprintConstruction', @@ -86,17 +84,26 @@ export class BlueprintConstructionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'BlueprintConstructionFilter', + 'BlueprintConstructionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'BlueprintConstruction', - fieldName: 'blueprintConstructions', + fieldName: 'blueprintConstruction', document, variables, + transform: (data: { + blueprintConstructions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + blueprintConstruction: data.blueprintConstructions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/blueprintTemplate.ts b/sdk/constructive-cli/src/public/orm/models/blueprintTemplate.ts index 31d7824e5..1f957cded 100644 --- a/sdk/constructive-cli/src/public/orm/models/blueprintTemplate.ts +++ b/sdk/constructive-cli/src/public/orm/models/blueprintTemplate.ts @@ -70,13 +70,11 @@ export class BlueprintTemplateModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - blueprintTemplates: { - nodes: InferSelectResult[]; - }; + blueprintTemplate: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'BlueprintTemplate', @@ -84,17 +82,26 @@ export class BlueprintTemplateModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'BlueprintTemplateFilter', + 'BlueprintTemplateOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'BlueprintTemplate', - fieldName: 'blueprintTemplates', + fieldName: 'blueprintTemplate', document, variables, + transform: (data: { + blueprintTemplates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + blueprintTemplate: data.blueprintTemplates?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/checkConstraint.ts b/sdk/constructive-cli/src/public/orm/models/checkConstraint.ts index 323b64b6c..5c052886f 100644 --- a/sdk/constructive-cli/src/public/orm/models/checkConstraint.ts +++ b/sdk/constructive-cli/src/public/orm/models/checkConstraint.ts @@ -70,13 +70,11 @@ export class CheckConstraintModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - checkConstraints: { - nodes: InferSelectResult[]; - }; + checkConstraint: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'CheckConstraint', @@ -84,17 +82,26 @@ export class CheckConstraintModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CheckConstraintFilter', + 'CheckConstraintOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'CheckConstraint', - fieldName: 'checkConstraints', + fieldName: 'checkConstraint', document, variables, + transform: (data: { + checkConstraints?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + checkConstraint: data.checkConstraints?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/commit.ts b/sdk/constructive-cli/src/public/orm/models/commit.ts index de0e94710..70f5c5960 100644 --- a/sdk/constructive-cli/src/public/orm/models/commit.ts +++ b/sdk/constructive-cli/src/public/orm/models/commit.ts @@ -70,13 +70,11 @@ export class CommitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - commits: { - nodes: InferSelectResult[]; - }; + commit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Commit', @@ -84,17 +82,26 @@ export class CommitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CommitFilter', + 'CommitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Commit', - fieldName: 'commits', + fieldName: 'commit', document, variables, + transform: (data: { + commits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + commit: data.commits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/connectedAccountsModule.ts b/sdk/constructive-cli/src/public/orm/models/connectedAccountsModule.ts index 408aec32a..226307b4b 100644 --- a/sdk/constructive-cli/src/public/orm/models/connectedAccountsModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/connectedAccountsModule.ts @@ -72,13 +72,11 @@ export class ConnectedAccountsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - connectedAccountsModules: { - nodes: InferSelectResult[]; - }; + connectedAccountsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ConnectedAccountsModule', @@ -86,17 +84,26 @@ export class ConnectedAccountsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ConnectedAccountsModuleFilter', + 'ConnectedAccountsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ConnectedAccountsModule', - fieldName: 'connectedAccountsModules', + fieldName: 'connectedAccountsModule', document, variables, + transform: (data: { + connectedAccountsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + connectedAccountsModule: data.connectedAccountsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/cryptoAddress.ts b/sdk/constructive-cli/src/public/orm/models/cryptoAddress.ts index 7357c0126..11914bd9d 100644 --- a/sdk/constructive-cli/src/public/orm/models/cryptoAddress.ts +++ b/sdk/constructive-cli/src/public/orm/models/cryptoAddress.ts @@ -70,13 +70,11 @@ export class CryptoAddressModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - cryptoAddresses: { - nodes: InferSelectResult[]; - }; + cryptoAddress: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'CryptoAddress', @@ -84,17 +82,26 @@ export class CryptoAddressModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CryptoAddressFilter', + 'CryptoAddressOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'CryptoAddress', - fieldName: 'cryptoAddresses', + fieldName: 'cryptoAddress', document, variables, + transform: (data: { + cryptoAddresses?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + cryptoAddress: data.cryptoAddresses?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/cryptoAddressesModule.ts b/sdk/constructive-cli/src/public/orm/models/cryptoAddressesModule.ts index 25af5781a..6618ae4e9 100644 --- a/sdk/constructive-cli/src/public/orm/models/cryptoAddressesModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/cryptoAddressesModule.ts @@ -72,13 +72,11 @@ export class CryptoAddressesModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - cryptoAddressesModules: { - nodes: InferSelectResult[]; - }; + cryptoAddressesModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'CryptoAddressesModule', @@ -86,17 +84,26 @@ export class CryptoAddressesModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CryptoAddressesModuleFilter', + 'CryptoAddressesModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'CryptoAddressesModule', - fieldName: 'cryptoAddressesModules', + fieldName: 'cryptoAddressesModule', document, variables, + transform: (data: { + cryptoAddressesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + cryptoAddressesModule: data.cryptoAddressesModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/cryptoAuthModule.ts b/sdk/constructive-cli/src/public/orm/models/cryptoAuthModule.ts index c654aa3f7..c90349b9d 100644 --- a/sdk/constructive-cli/src/public/orm/models/cryptoAuthModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/cryptoAuthModule.ts @@ -70,13 +70,11 @@ export class CryptoAuthModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - cryptoAuthModules: { - nodes: InferSelectResult[]; - }; + cryptoAuthModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'CryptoAuthModule', @@ -84,17 +82,26 @@ export class CryptoAuthModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CryptoAuthModuleFilter', + 'CryptoAuthModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'CryptoAuthModule', - fieldName: 'cryptoAuthModules', + fieldName: 'cryptoAuthModule', document, variables, + transform: (data: { + cryptoAuthModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + cryptoAuthModule: data.cryptoAuthModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/database.ts b/sdk/constructive-cli/src/public/orm/models/database.ts index 6a4293010..57b350548 100644 --- a/sdk/constructive-cli/src/public/orm/models/database.ts +++ b/sdk/constructive-cli/src/public/orm/models/database.ts @@ -70,13 +70,11 @@ export class DatabaseModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - databases: { - nodes: InferSelectResult[]; - }; + database: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Database', @@ -84,17 +82,26 @@ export class DatabaseModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DatabaseFilter', + 'DatabaseOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Database', - fieldName: 'databases', + fieldName: 'database', document, variables, + transform: (data: { + databases?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + database: data.databases?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/databaseProvisionModule.ts b/sdk/constructive-cli/src/public/orm/models/databaseProvisionModule.ts index 4d6c37645..4cf322de6 100644 --- a/sdk/constructive-cli/src/public/orm/models/databaseProvisionModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/databaseProvisionModule.ts @@ -72,13 +72,11 @@ export class DatabaseProvisionModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - databaseProvisionModules: { - nodes: InferSelectResult[]; - }; + databaseProvisionModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DatabaseProvisionModule', @@ -86,17 +84,26 @@ export class DatabaseProvisionModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DatabaseProvisionModuleFilter', + 'DatabaseProvisionModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DatabaseProvisionModule', - fieldName: 'databaseProvisionModules', + fieldName: 'databaseProvisionModule', document, variables, + transform: (data: { + databaseProvisionModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + databaseProvisionModule: data.databaseProvisionModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/databaseTransfer.ts b/sdk/constructive-cli/src/public/orm/models/databaseTransfer.ts index e5d347907..dd22777cd 100644 --- a/sdk/constructive-cli/src/public/orm/models/databaseTransfer.ts +++ b/sdk/constructive-cli/src/public/orm/models/databaseTransfer.ts @@ -70,13 +70,11 @@ export class DatabaseTransferModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - databaseTransfers: { - nodes: InferSelectResult[]; - }; + databaseTransfer: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DatabaseTransfer', @@ -84,17 +82,26 @@ export class DatabaseTransferModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DatabaseTransferFilter', + 'DatabaseTransferOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DatabaseTransfer', - fieldName: 'databaseTransfers', + fieldName: 'databaseTransfer', document, variables, + transform: (data: { + databaseTransfers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + databaseTransfer: data.databaseTransfers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/defaultIdsModule.ts b/sdk/constructive-cli/src/public/orm/models/defaultIdsModule.ts index aa235bd39..9553db8ed 100644 --- a/sdk/constructive-cli/src/public/orm/models/defaultIdsModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/defaultIdsModule.ts @@ -70,13 +70,11 @@ export class DefaultIdsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - defaultIdsModules: { - nodes: InferSelectResult[]; - }; + defaultIdsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DefaultIdsModule', @@ -84,17 +82,26 @@ export class DefaultIdsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DefaultIdsModuleFilter', + 'DefaultIdsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DefaultIdsModule', - fieldName: 'defaultIdsModules', + fieldName: 'defaultIdsModule', document, variables, + transform: (data: { + defaultIdsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + defaultIdsModule: data.defaultIdsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/defaultPrivilege.ts b/sdk/constructive-cli/src/public/orm/models/defaultPrivilege.ts index 7041b7b55..36414357b 100644 --- a/sdk/constructive-cli/src/public/orm/models/defaultPrivilege.ts +++ b/sdk/constructive-cli/src/public/orm/models/defaultPrivilege.ts @@ -70,13 +70,11 @@ export class DefaultPrivilegeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - defaultPrivileges: { - nodes: InferSelectResult[]; - }; + defaultPrivilege: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DefaultPrivilege', @@ -84,17 +82,26 @@ export class DefaultPrivilegeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DefaultPrivilegeFilter', + 'DefaultPrivilegeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DefaultPrivilege', - fieldName: 'defaultPrivileges', + fieldName: 'defaultPrivilege', document, variables, + transform: (data: { + defaultPrivileges?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + defaultPrivilege: data.defaultPrivileges?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/denormalizedTableField.ts b/sdk/constructive-cli/src/public/orm/models/denormalizedTableField.ts index d94b84104..881f2ffdb 100644 --- a/sdk/constructive-cli/src/public/orm/models/denormalizedTableField.ts +++ b/sdk/constructive-cli/src/public/orm/models/denormalizedTableField.ts @@ -72,13 +72,11 @@ export class DenormalizedTableFieldModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - denormalizedTableFields: { - nodes: InferSelectResult[]; - }; + denormalizedTableField: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DenormalizedTableField', @@ -86,17 +84,26 @@ export class DenormalizedTableFieldModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DenormalizedTableFieldFilter', + 'DenormalizedTableFieldOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DenormalizedTableField', - fieldName: 'denormalizedTableFields', + fieldName: 'denormalizedTableField', document, variables, + transform: (data: { + denormalizedTableFields?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + denormalizedTableField: data.denormalizedTableFields?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/devicesModule.ts b/sdk/constructive-cli/src/public/orm/models/devicesModule.ts index 11386e4fe..8c9a7e06e 100644 --- a/sdk/constructive-cli/src/public/orm/models/devicesModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/devicesModule.ts @@ -70,13 +70,11 @@ export class DevicesModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - devicesModules: { - nodes: InferSelectResult[]; - }; + devicesModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DevicesModule', @@ -84,17 +82,26 @@ export class DevicesModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DevicesModuleFilter', + 'DevicesModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DevicesModule', - fieldName: 'devicesModules', + fieldName: 'devicesModule', document, variables, + transform: (data: { + devicesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + devicesModule: data.devicesModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/domain.ts b/sdk/constructive-cli/src/public/orm/models/domain.ts index acf05455c..ab0016ec4 100644 --- a/sdk/constructive-cli/src/public/orm/models/domain.ts +++ b/sdk/constructive-cli/src/public/orm/models/domain.ts @@ -70,13 +70,11 @@ export class DomainModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - domains: { - nodes: InferSelectResult[]; - }; + domain: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Domain', @@ -84,17 +82,26 @@ export class DomainModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DomainFilter', + 'DomainOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Domain', - fieldName: 'domains', + fieldName: 'domain', document, variables, + transform: (data: { + domains?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + domain: data.domains?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/email.ts b/sdk/constructive-cli/src/public/orm/models/email.ts index aa83efc07..325475b9c 100644 --- a/sdk/constructive-cli/src/public/orm/models/email.ts +++ b/sdk/constructive-cli/src/public/orm/models/email.ts @@ -70,13 +70,11 @@ export class EmailModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - emails: { - nodes: InferSelectResult[]; - }; + email: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Email', @@ -84,17 +82,26 @@ export class EmailModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EmailFilter', + 'EmailOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Email', - fieldName: 'emails', + fieldName: 'email', document, variables, + transform: (data: { + emails?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + email: data.emails?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/emailsModule.ts b/sdk/constructive-cli/src/public/orm/models/emailsModule.ts index 984018c0c..e95985b85 100644 --- a/sdk/constructive-cli/src/public/orm/models/emailsModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/emailsModule.ts @@ -70,13 +70,11 @@ export class EmailsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - emailsModules: { - nodes: InferSelectResult[]; - }; + emailsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'EmailsModule', @@ -84,17 +82,26 @@ export class EmailsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EmailsModuleFilter', + 'EmailsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'EmailsModule', - fieldName: 'emailsModules', + fieldName: 'emailsModule', document, variables, + transform: (data: { + emailsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + emailsModule: data.emailsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/embeddingChunk.ts b/sdk/constructive-cli/src/public/orm/models/embeddingChunk.ts index 6c175145d..a5c7feb75 100644 --- a/sdk/constructive-cli/src/public/orm/models/embeddingChunk.ts +++ b/sdk/constructive-cli/src/public/orm/models/embeddingChunk.ts @@ -70,13 +70,11 @@ export class EmbeddingChunkModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - embeddingChunks: { - nodes: InferSelectResult[]; - }; + embeddingChunk: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'EmbeddingChunk', @@ -84,17 +82,26 @@ export class EmbeddingChunkModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EmbeddingChunkFilter', + 'EmbeddingChunkOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'EmbeddingChunk', - fieldName: 'embeddingChunks', + fieldName: 'embeddingChunk', document, variables, + transform: (data: { + embeddingChunks?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + embeddingChunk: data.embeddingChunks?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/encryptedSecretsModule.ts b/sdk/constructive-cli/src/public/orm/models/encryptedSecretsModule.ts index 8656f0937..754ec7e78 100644 --- a/sdk/constructive-cli/src/public/orm/models/encryptedSecretsModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/encryptedSecretsModule.ts @@ -72,13 +72,11 @@ export class EncryptedSecretsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - encryptedSecretsModules: { - nodes: InferSelectResult[]; - }; + encryptedSecretsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'EncryptedSecretsModule', @@ -86,17 +84,26 @@ export class EncryptedSecretsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EncryptedSecretsModuleFilter', + 'EncryptedSecretsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'EncryptedSecretsModule', - fieldName: 'encryptedSecretsModules', + fieldName: 'encryptedSecretsModule', document, variables, + transform: (data: { + encryptedSecretsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + encryptedSecretsModule: data.encryptedSecretsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/entityTypeProvision.ts b/sdk/constructive-cli/src/public/orm/models/entityTypeProvision.ts index 00ae9ebbc..93373a3dd 100644 --- a/sdk/constructive-cli/src/public/orm/models/entityTypeProvision.ts +++ b/sdk/constructive-cli/src/public/orm/models/entityTypeProvision.ts @@ -70,13 +70,11 @@ export class EntityTypeProvisionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - entityTypeProvisions: { - nodes: InferSelectResult[]; - }; + entityTypeProvision: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'EntityTypeProvision', @@ -84,17 +82,26 @@ export class EntityTypeProvisionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EntityTypeProvisionFilter', + 'EntityTypeProvisionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'EntityTypeProvision', - fieldName: 'entityTypeProvisions', + fieldName: 'entityTypeProvision', document, variables, + transform: (data: { + entityTypeProvisions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + entityTypeProvision: data.entityTypeProvisions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/enum.ts b/sdk/constructive-cli/src/public/orm/models/enum.ts index 1e0e12ee3..58495e155 100644 --- a/sdk/constructive-cli/src/public/orm/models/enum.ts +++ b/sdk/constructive-cli/src/public/orm/models/enum.ts @@ -70,13 +70,11 @@ export class EnumModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - enums: { - nodes: InferSelectResult[]; - }; + enum: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Enum', @@ -84,17 +82,26 @@ export class EnumModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EnumFilter', + 'EnumOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Enum', - fieldName: 'enums', + fieldName: 'enum', document, variables, + transform: (data: { + enums?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + enum: data.enums?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/field.ts b/sdk/constructive-cli/src/public/orm/models/field.ts index d8e8fc4ee..7664e791c 100644 --- a/sdk/constructive-cli/src/public/orm/models/field.ts +++ b/sdk/constructive-cli/src/public/orm/models/field.ts @@ -70,13 +70,11 @@ export class FieldModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - fields: { - nodes: InferSelectResult[]; - }; + field: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Field', @@ -84,17 +82,26 @@ export class FieldModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'FieldFilter', + 'FieldOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Field', - fieldName: 'fields', + fieldName: 'field', document, variables, + transform: (data: { + fields?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + field: data.fields?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/foreignKeyConstraint.ts b/sdk/constructive-cli/src/public/orm/models/foreignKeyConstraint.ts index 951dc4fe2..36e80496f 100644 --- a/sdk/constructive-cli/src/public/orm/models/foreignKeyConstraint.ts +++ b/sdk/constructive-cli/src/public/orm/models/foreignKeyConstraint.ts @@ -72,13 +72,11 @@ export class ForeignKeyConstraintModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - foreignKeyConstraints: { - nodes: InferSelectResult[]; - }; + foreignKeyConstraint: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ForeignKeyConstraint', @@ -86,17 +84,26 @@ export class ForeignKeyConstraintModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ForeignKeyConstraintFilter', + 'ForeignKeyConstraintOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ForeignKeyConstraint', - fieldName: 'foreignKeyConstraints', + fieldName: 'foreignKeyConstraint', document, variables, + transform: (data: { + foreignKeyConstraints?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + foreignKeyConstraint: data.foreignKeyConstraints?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/fullTextSearch.ts b/sdk/constructive-cli/src/public/orm/models/fullTextSearch.ts index a0a592138..2135f8447 100644 --- a/sdk/constructive-cli/src/public/orm/models/fullTextSearch.ts +++ b/sdk/constructive-cli/src/public/orm/models/fullTextSearch.ts @@ -70,13 +70,11 @@ export class FullTextSearchModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - fullTextSearches: { - nodes: InferSelectResult[]; - }; + fullTextSearch: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'FullTextSearch', @@ -84,17 +82,26 @@ export class FullTextSearchModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'FullTextSearchFilter', + 'FullTextSearchOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'FullTextSearch', - fieldName: 'fullTextSearches', + fieldName: 'fullTextSearch', document, variables, + transform: (data: { + fullTextSearches?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + fullTextSearch: data.fullTextSearches?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/getAllRecord.ts b/sdk/constructive-cli/src/public/orm/models/getAllRecord.ts index 53873a0f3..39a82fbbb 100644 --- a/sdk/constructive-cli/src/public/orm/models/getAllRecord.ts +++ b/sdk/constructive-cli/src/public/orm/models/getAllRecord.ts @@ -70,13 +70,11 @@ export class GetAllRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - getAll: { - nodes: InferSelectResult[]; - }; + getAllRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'GetAllRecord', @@ -84,17 +82,26 @@ export class GetAllRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'GetAllRecordFilter', + 'GetAllRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'GetAllRecord', - fieldName: 'getAll', + fieldName: 'getAllRecord', document, variables, + transform: (data: { + getAll?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + getAllRecord: data.getAll?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-cli/src/public/orm/models/hierarchyModule.ts b/sdk/constructive-cli/src/public/orm/models/hierarchyModule.ts index 325927bd5..e1eca248c 100644 --- a/sdk/constructive-cli/src/public/orm/models/hierarchyModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/hierarchyModule.ts @@ -70,13 +70,11 @@ export class HierarchyModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - hierarchyModules: { - nodes: InferSelectResult[]; - }; + hierarchyModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'HierarchyModule', @@ -84,17 +82,26 @@ export class HierarchyModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'HierarchyModuleFilter', + 'HierarchyModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'HierarchyModule', - fieldName: 'hierarchyModules', + fieldName: 'hierarchyModule', document, variables, + transform: (data: { + hierarchyModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + hierarchyModule: data.hierarchyModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/identityProvider.ts b/sdk/constructive-cli/src/public/orm/models/identityProvider.ts index 9c9cfc0d9..cdc672145 100644 --- a/sdk/constructive-cli/src/public/orm/models/identityProvider.ts +++ b/sdk/constructive-cli/src/public/orm/models/identityProvider.ts @@ -70,13 +70,11 @@ export class IdentityProviderModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - identityProviders: { - nodes: InferSelectResult[]; - }; + identityProvider: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'IdentityProvider', @@ -84,17 +82,26 @@ export class IdentityProviderModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'IdentityProviderFilter', + 'IdentityProviderOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'IdentityProvider', - fieldName: 'identityProviders', + fieldName: 'identityProvider', document, variables, + transform: (data: { + identityProviders?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + identityProvider: data.identityProviders?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-cli/src/public/orm/models/identityProvidersModule.ts b/sdk/constructive-cli/src/public/orm/models/identityProvidersModule.ts index 151bd7aa6..86a507559 100644 --- a/sdk/constructive-cli/src/public/orm/models/identityProvidersModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/identityProvidersModule.ts @@ -72,13 +72,11 @@ export class IdentityProvidersModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - identityProvidersModules: { - nodes: InferSelectResult[]; - }; + identityProvidersModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'IdentityProvidersModule', @@ -86,17 +84,26 @@ export class IdentityProvidersModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'IdentityProvidersModuleFilter', + 'IdentityProvidersModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'IdentityProvidersModule', - fieldName: 'identityProvidersModules', + fieldName: 'identityProvidersModule', document, variables, + transform: (data: { + identityProvidersModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + identityProvidersModule: data.identityProvidersModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/indexModel.ts b/sdk/constructive-cli/src/public/orm/models/indexModel.ts index 052334e57..1c7eb1e96 100644 --- a/sdk/constructive-cli/src/public/orm/models/indexModel.ts +++ b/sdk/constructive-cli/src/public/orm/models/indexModel.ts @@ -70,13 +70,11 @@ export class IndexModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - indices: { - nodes: InferSelectResult[]; - }; + index: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Index', @@ -84,17 +82,26 @@ export class IndexModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'IndexFilter', + 'IndexOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Index', - fieldName: 'indices', + fieldName: 'index', document, variables, + transform: (data: { + indices?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + index: data.indices?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/invitesModule.ts b/sdk/constructive-cli/src/public/orm/models/invitesModule.ts index f7999f502..b31e122a0 100644 --- a/sdk/constructive-cli/src/public/orm/models/invitesModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/invitesModule.ts @@ -70,13 +70,11 @@ export class InvitesModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - invitesModules: { - nodes: InferSelectResult[]; - }; + invitesModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'InvitesModule', @@ -84,17 +82,26 @@ export class InvitesModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'InvitesModuleFilter', + 'InvitesModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'InvitesModule', - fieldName: 'invitesModules', + fieldName: 'invitesModule', document, variables, + transform: (data: { + invitesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + invitesModule: data.invitesModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/levelsModule.ts b/sdk/constructive-cli/src/public/orm/models/levelsModule.ts index 0c758ad86..3cd4aa3cb 100644 --- a/sdk/constructive-cli/src/public/orm/models/levelsModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/levelsModule.ts @@ -70,13 +70,11 @@ export class LevelsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - levelsModules: { - nodes: InferSelectResult[]; - }; + levelsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'LevelsModule', @@ -84,17 +82,26 @@ export class LevelsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'LevelsModuleFilter', + 'LevelsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'LevelsModule', - fieldName: 'levelsModules', + fieldName: 'levelsModule', document, variables, + transform: (data: { + levelsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + levelsModule: data.levelsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/limitsModule.ts b/sdk/constructive-cli/src/public/orm/models/limitsModule.ts index 10e89be1d..60dec7814 100644 --- a/sdk/constructive-cli/src/public/orm/models/limitsModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/limitsModule.ts @@ -70,13 +70,11 @@ export class LimitsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - limitsModules: { - nodes: InferSelectResult[]; - }; + limitsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'LimitsModule', @@ -84,17 +82,26 @@ export class LimitsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'LimitsModuleFilter', + 'LimitsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'LimitsModule', - fieldName: 'limitsModules', + fieldName: 'limitsModule', document, variables, + transform: (data: { + limitsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + limitsModule: data.limitsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/membershipType.ts b/sdk/constructive-cli/src/public/orm/models/membershipType.ts index 40fac5490..ee7ed596c 100644 --- a/sdk/constructive-cli/src/public/orm/models/membershipType.ts +++ b/sdk/constructive-cli/src/public/orm/models/membershipType.ts @@ -70,13 +70,11 @@ export class MembershipTypeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - membershipTypes: { - nodes: InferSelectResult[]; - }; + membershipType: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'MembershipType', @@ -84,17 +82,26 @@ export class MembershipTypeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'MembershipTypeFilter', + 'MembershipTypeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'MembershipType', - fieldName: 'membershipTypes', + fieldName: 'membershipType', document, variables, + transform: (data: { + membershipTypes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + membershipType: data.membershipTypes?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/membershipTypesModule.ts b/sdk/constructive-cli/src/public/orm/models/membershipTypesModule.ts index 31807c914..cf72c91fa 100644 --- a/sdk/constructive-cli/src/public/orm/models/membershipTypesModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/membershipTypesModule.ts @@ -72,13 +72,11 @@ export class MembershipTypesModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - membershipTypesModules: { - nodes: InferSelectResult[]; - }; + membershipTypesModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'MembershipTypesModule', @@ -86,17 +84,26 @@ export class MembershipTypesModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'MembershipTypesModuleFilter', + 'MembershipTypesModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'MembershipTypesModule', - fieldName: 'membershipTypesModules', + fieldName: 'membershipTypesModule', document, variables, + transform: (data: { + membershipTypesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + membershipTypesModule: data.membershipTypesModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/membershipsModule.ts b/sdk/constructive-cli/src/public/orm/models/membershipsModule.ts index b1ce2f836..5709ac904 100644 --- a/sdk/constructive-cli/src/public/orm/models/membershipsModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/membershipsModule.ts @@ -70,13 +70,11 @@ export class MembershipsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - membershipsModules: { - nodes: InferSelectResult[]; - }; + membershipsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'MembershipsModule', @@ -84,17 +82,26 @@ export class MembershipsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'MembershipsModuleFilter', + 'MembershipsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'MembershipsModule', - fieldName: 'membershipsModules', + fieldName: 'membershipsModule', document, variables, + transform: (data: { + membershipsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + membershipsModule: data.membershipsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/migrateFile.ts b/sdk/constructive-cli/src/public/orm/models/migrateFile.ts index 35bfa715e..9bc8b9baa 100644 --- a/sdk/constructive-cli/src/public/orm/models/migrateFile.ts +++ b/sdk/constructive-cli/src/public/orm/models/migrateFile.ts @@ -70,13 +70,11 @@ export class MigrateFileModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - migrateFiles: { - nodes: InferSelectResult[]; - }; + migrateFile: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'MigrateFile', @@ -84,17 +82,26 @@ export class MigrateFileModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'MigrateFileFilter', + 'MigrateFileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'MigrateFile', - fieldName: 'migrateFiles', + fieldName: 'migrateFile', document, variables, + transform: (data: { + migrateFiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + migrateFile: data.migrateFiles?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/nodeTypeRegistry.ts b/sdk/constructive-cli/src/public/orm/models/nodeTypeRegistry.ts index 6e640c1c6..83cb41250 100644 --- a/sdk/constructive-cli/src/public/orm/models/nodeTypeRegistry.ts +++ b/sdk/constructive-cli/src/public/orm/models/nodeTypeRegistry.ts @@ -70,13 +70,11 @@ export class NodeTypeRegistryModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - nodeTypeRegistries: { - nodes: InferSelectResult[]; - }; + nodeTypeRegistry: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'NodeTypeRegistry', @@ -84,17 +82,26 @@ export class NodeTypeRegistryModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'NodeTypeRegistryFilter', + 'NodeTypeRegistryOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'NodeTypeRegistry', - fieldName: 'nodeTypeRegistries', + fieldName: 'nodeTypeRegistry', document, variables, + transform: (data: { + nodeTypeRegistries?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + nodeTypeRegistry: data.nodeTypeRegistries?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/notificationsModule.ts b/sdk/constructive-cli/src/public/orm/models/notificationsModule.ts index 58bf0f2c4..dc44d0d69 100644 --- a/sdk/constructive-cli/src/public/orm/models/notificationsModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/notificationsModule.ts @@ -70,13 +70,11 @@ export class NotificationsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - notificationsModules: { - nodes: InferSelectResult[]; - }; + notificationsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'NotificationsModule', @@ -84,17 +82,26 @@ export class NotificationsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'NotificationsModuleFilter', + 'NotificationsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'NotificationsModule', - fieldName: 'notificationsModules', + fieldName: 'notificationsModule', document, variables, + transform: (data: { + notificationsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + notificationsModule: data.notificationsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/object.ts b/sdk/constructive-cli/src/public/orm/models/object.ts index 085bdd4df..8a685b1df 100644 --- a/sdk/constructive-cli/src/public/orm/models/object.ts +++ b/sdk/constructive-cli/src/public/orm/models/object.ts @@ -70,13 +70,11 @@ export class ObjectModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - objects: { - nodes: InferSelectResult[]; - }; + object: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Object', @@ -84,17 +82,26 @@ export class ObjectModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ObjectFilter', + 'ObjectOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Object', - fieldName: 'objects', + fieldName: 'object', document, variables, + transform: (data: { + objects?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + object: data.objects?.nodes?.[0] ?? null, + }), }); } findOne( @@ -103,7 +110,7 @@ export class ObjectModel { select: S; } & StrictSelect ): QueryBuilder<{ - getNodeAtPath: InferSelectResult | null; + object: InferSelectResult | null; }> { const { document, variables } = buildFindOneDocument( 'Object', @@ -118,7 +125,7 @@ export class ObjectModel { client: this.client, operation: 'query', operationName: 'Object', - fieldName: 'getNodeAtPath', + fieldName: 'object', document, variables, }); diff --git a/sdk/constructive-cli/src/public/orm/models/orgAdminGrant.ts b/sdk/constructive-cli/src/public/orm/models/orgAdminGrant.ts index e611a8578..7b1337731 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgAdminGrant.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgAdminGrant.ts @@ -70,13 +70,11 @@ export class OrgAdminGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgAdminGrants: { - nodes: InferSelectResult[]; - }; + orgAdminGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgAdminGrant', @@ -84,17 +82,26 @@ export class OrgAdminGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgAdminGrantFilter', + 'OrgAdminGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgAdminGrant', - fieldName: 'orgAdminGrants', + fieldName: 'orgAdminGrant', document, variables, + transform: (data: { + orgAdminGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgAdminGrant: data.orgAdminGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/orgChartEdge.ts b/sdk/constructive-cli/src/public/orm/models/orgChartEdge.ts index 6c6fc84cc..8a43b83a9 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgChartEdge.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgChartEdge.ts @@ -70,13 +70,11 @@ export class OrgChartEdgeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgChartEdges: { - nodes: InferSelectResult[]; - }; + orgChartEdge: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgChartEdge', @@ -84,17 +82,26 @@ export class OrgChartEdgeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgChartEdgeFilter', + 'OrgChartEdgeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgChartEdge', - fieldName: 'orgChartEdges', + fieldName: 'orgChartEdge', document, variables, + transform: (data: { + orgChartEdges?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgChartEdge: data.orgChartEdges?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/orgChartEdgeGrant.ts b/sdk/constructive-cli/src/public/orm/models/orgChartEdgeGrant.ts index 58345c78d..168a6fe3d 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgChartEdgeGrant.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgChartEdgeGrant.ts @@ -70,13 +70,11 @@ export class OrgChartEdgeGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgChartEdgeGrants: { - nodes: InferSelectResult[]; - }; + orgChartEdgeGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgChartEdgeGrant', @@ -84,17 +82,26 @@ export class OrgChartEdgeGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgChartEdgeGrantFilter', + 'OrgChartEdgeGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgChartEdgeGrant', - fieldName: 'orgChartEdgeGrants', + fieldName: 'orgChartEdgeGrant', document, variables, + transform: (data: { + orgChartEdgeGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgChartEdgeGrant: data.orgChartEdgeGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/orgClaimedInvite.ts b/sdk/constructive-cli/src/public/orm/models/orgClaimedInvite.ts index 475de7291..e1a3aecaf 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgClaimedInvite.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgClaimedInvite.ts @@ -70,13 +70,11 @@ export class OrgClaimedInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgClaimedInvites: { - nodes: InferSelectResult[]; - }; + orgClaimedInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgClaimedInvite', @@ -84,17 +82,26 @@ export class OrgClaimedInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgClaimedInviteFilter', + 'OrgClaimedInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgClaimedInvite', - fieldName: 'orgClaimedInvites', + fieldName: 'orgClaimedInvite', document, variables, + transform: (data: { + orgClaimedInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgClaimedInvite: data.orgClaimedInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/orgGetManagersRecord.ts b/sdk/constructive-cli/src/public/orm/models/orgGetManagersRecord.ts index 9a0cefa8a..7c333b76d 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgGetManagersRecord.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgGetManagersRecord.ts @@ -70,13 +70,11 @@ export class OrgGetManagersRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGetManagers: { - nodes: InferSelectResult[]; - }; + orgGetManagersRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGetManagersRecord', @@ -84,17 +82,26 @@ export class OrgGetManagersRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGetManagersRecordFilter', + 'OrgGetManagersRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGetManagersRecord', - fieldName: 'orgGetManagers', + fieldName: 'orgGetManagersRecord', document, variables, + transform: (data: { + orgGetManagers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGetManagersRecord: data.orgGetManagers?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-cli/src/public/orm/models/orgGetSubordinatesRecord.ts b/sdk/constructive-cli/src/public/orm/models/orgGetSubordinatesRecord.ts index 5eeec50ca..f259e1043 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgGetSubordinatesRecord.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgGetSubordinatesRecord.ts @@ -72,13 +72,11 @@ export class OrgGetSubordinatesRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGetSubordinates: { - nodes: InferSelectResult[]; - }; + orgGetSubordinatesRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGetSubordinatesRecord', @@ -86,17 +84,26 @@ export class OrgGetSubordinatesRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGetSubordinatesRecordFilter', + 'OrgGetSubordinatesRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGetSubordinatesRecord', - fieldName: 'orgGetSubordinates', + fieldName: 'orgGetSubordinatesRecord', document, variables, + transform: (data: { + orgGetSubordinates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGetSubordinatesRecord: data.orgGetSubordinates?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-cli/src/public/orm/models/orgGrant.ts b/sdk/constructive-cli/src/public/orm/models/orgGrant.ts index 291264ec5..c8e74f5cc 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgGrant.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgGrant.ts @@ -70,13 +70,11 @@ export class OrgGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGrants: { - nodes: InferSelectResult[]; - }; + orgGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGrant', @@ -84,17 +82,26 @@ export class OrgGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGrantFilter', + 'OrgGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGrant', - fieldName: 'orgGrants', + fieldName: 'orgGrant', document, variables, + transform: (data: { + orgGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGrant: data.orgGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/orgInvite.ts b/sdk/constructive-cli/src/public/orm/models/orgInvite.ts index 639cb8dd5..8d7931f07 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgInvite.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgInvite.ts @@ -70,13 +70,11 @@ export class OrgInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgInvites: { - nodes: InferSelectResult[]; - }; + orgInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgInvite', @@ -84,17 +82,26 @@ export class OrgInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgInviteFilter', + 'OrgInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgInvite', - fieldName: 'orgInvites', + fieldName: 'orgInvite', document, variables, + transform: (data: { + orgInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgInvite: data.orgInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/orgLimit.ts b/sdk/constructive-cli/src/public/orm/models/orgLimit.ts index 2d7937963..48a3932f2 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgLimit.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgLimit.ts @@ -70,13 +70,11 @@ export class OrgLimitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimits: { - nodes: InferSelectResult[]; - }; + orgLimit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimit', @@ -84,17 +82,26 @@ export class OrgLimitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitFilter', + 'OrgLimitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimit', - fieldName: 'orgLimits', + fieldName: 'orgLimit', document, variables, + transform: (data: { + orgLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimit: data.orgLimits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/orgLimitAggregate.ts b/sdk/constructive-cli/src/public/orm/models/orgLimitAggregate.ts index daee50aee..d74b9e7d9 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgLimitAggregate.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgLimitAggregate.ts @@ -70,13 +70,11 @@ export class OrgLimitAggregateModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitAggregates: { - nodes: InferSelectResult[]; - }; + orgLimitAggregate: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitAggregate', @@ -84,17 +82,26 @@ export class OrgLimitAggregateModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitAggregateFilter', + 'OrgLimitAggregateOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitAggregate', - fieldName: 'orgLimitAggregates', + fieldName: 'orgLimitAggregate', document, variables, + transform: (data: { + orgLimitAggregates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitAggregate: data.orgLimitAggregates?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/orgLimitDefault.ts b/sdk/constructive-cli/src/public/orm/models/orgLimitDefault.ts index bf0cfcf5e..7e55bfd1f 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgLimitDefault.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgLimitDefault.ts @@ -70,13 +70,11 @@ export class OrgLimitDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitDefaults: { - nodes: InferSelectResult[]; - }; + orgLimitDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitDefault', @@ -84,17 +82,26 @@ export class OrgLimitDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitDefaultFilter', + 'OrgLimitDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitDefault', - fieldName: 'orgLimitDefaults', + fieldName: 'orgLimitDefault', document, variables, + transform: (data: { + orgLimitDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitDefault: data.orgLimitDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/orgLimitEvent.ts b/sdk/constructive-cli/src/public/orm/models/orgLimitEvent.ts index 6414ba0ed..c259e325f 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgLimitEvent.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgLimitEvent.ts @@ -70,13 +70,11 @@ export class OrgLimitEventModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitEvents: { - nodes: InferSelectResult[]; - }; + orgLimitEvent: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitEvent', @@ -84,17 +82,26 @@ export class OrgLimitEventModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitEventFilter', + 'OrgLimitEventOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitEvent', - fieldName: 'orgLimitEvents', + fieldName: 'orgLimitEvent', document, variables, + transform: (data: { + orgLimitEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitEvent: data.orgLimitEvents?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-cli/src/public/orm/models/orgMember.ts b/sdk/constructive-cli/src/public/orm/models/orgMember.ts index dd1d20e45..44f5608f4 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgMember.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgMember.ts @@ -70,13 +70,11 @@ export class OrgMemberModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembers: { - nodes: InferSelectResult[]; - }; + orgMember: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMember', @@ -84,17 +82,26 @@ export class OrgMemberModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMemberFilter', + 'OrgMemberOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMember', - fieldName: 'orgMembers', + fieldName: 'orgMember', document, variables, + transform: (data: { + orgMembers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMember: data.orgMembers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/orgMemberProfile.ts b/sdk/constructive-cli/src/public/orm/models/orgMemberProfile.ts index de551ba79..77357e174 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgMemberProfile.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgMemberProfile.ts @@ -70,13 +70,11 @@ export class OrgMemberProfileModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMemberProfiles: { - nodes: InferSelectResult[]; - }; + orgMemberProfile: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMemberProfile', @@ -84,17 +82,26 @@ export class OrgMemberProfileModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMemberProfile', - fieldName: 'orgMemberProfiles', + fieldName: 'orgMemberProfile', document, variables, + transform: (data: { + orgMemberProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMemberProfile: data.orgMemberProfiles?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/orgMembership.ts b/sdk/constructive-cli/src/public/orm/models/orgMembership.ts index c0173b3e1..623ec08fe 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgMembership.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgMembership.ts @@ -70,13 +70,11 @@ export class OrgMembershipModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMemberships: { - nodes: InferSelectResult[]; - }; + orgMembership: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembership', @@ -84,17 +82,26 @@ export class OrgMembershipModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipFilter', + 'OrgMembershipOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembership', - fieldName: 'orgMemberships', + fieldName: 'orgMembership', document, variables, + transform: (data: { + orgMemberships?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembership: data.orgMemberships?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/orgMembershipDefault.ts b/sdk/constructive-cli/src/public/orm/models/orgMembershipDefault.ts index 09d525bec..344131505 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgMembershipDefault.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgMembershipDefault.ts @@ -72,13 +72,11 @@ export class OrgMembershipDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembershipDefaults: { - nodes: InferSelectResult[]; - }; + orgMembershipDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembershipDefault', @@ -86,17 +84,26 @@ export class OrgMembershipDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipDefaultFilter', + 'OrgMembershipDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembershipDefault', - fieldName: 'orgMembershipDefaults', + fieldName: 'orgMembershipDefault', document, variables, + transform: (data: { + orgMembershipDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembershipDefault: data.orgMembershipDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/orgMembershipSetting.ts b/sdk/constructive-cli/src/public/orm/models/orgMembershipSetting.ts index 1efc26410..46801fc91 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgMembershipSetting.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgMembershipSetting.ts @@ -72,13 +72,11 @@ export class OrgMembershipSettingModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembershipSettings: { - nodes: InferSelectResult[]; - }; + orgMembershipSetting: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembershipSetting', @@ -86,17 +84,26 @@ export class OrgMembershipSettingModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipSettingFilter', + 'OrgMembershipSettingOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembershipSetting', - fieldName: 'orgMembershipSettings', + fieldName: 'orgMembershipSetting', document, variables, + transform: (data: { + orgMembershipSettings?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembershipSetting: data.orgMembershipSettings?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/orgOwnerGrant.ts b/sdk/constructive-cli/src/public/orm/models/orgOwnerGrant.ts index bdf045511..9614dce8f 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgOwnerGrant.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgOwnerGrant.ts @@ -70,13 +70,11 @@ export class OrgOwnerGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgOwnerGrants: { - nodes: InferSelectResult[]; - }; + orgOwnerGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgOwnerGrant', @@ -84,17 +82,26 @@ export class OrgOwnerGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgOwnerGrantFilter', + 'OrgOwnerGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgOwnerGrant', - fieldName: 'orgOwnerGrants', + fieldName: 'orgOwnerGrant', document, variables, + transform: (data: { + orgOwnerGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgOwnerGrant: data.orgOwnerGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/orgPermission.ts b/sdk/constructive-cli/src/public/orm/models/orgPermission.ts index c5910be63..7bdc90632 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgPermission.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgPermission.ts @@ -70,13 +70,11 @@ export class OrgPermissionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgPermissions: { - nodes: InferSelectResult[]; - }; + orgPermission: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgPermission', @@ -84,17 +82,26 @@ export class OrgPermissionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgPermissionFilter', + 'OrgPermissionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgPermission', - fieldName: 'orgPermissions', + fieldName: 'orgPermission', document, variables, + transform: (data: { + orgPermissions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgPermission: data.orgPermissions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/orgPermissionDefault.ts b/sdk/constructive-cli/src/public/orm/models/orgPermissionDefault.ts index 40389a11b..8d00b9932 100644 --- a/sdk/constructive-cli/src/public/orm/models/orgPermissionDefault.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgPermissionDefault.ts @@ -72,13 +72,11 @@ export class OrgPermissionDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgPermissionDefaults: { - nodes: InferSelectResult[]; - }; + orgPermissionDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgPermissionDefault', @@ -86,17 +84,26 @@ export class OrgPermissionDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgPermissionDefaultFilter', + 'OrgPermissionDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgPermissionDefault', - fieldName: 'orgPermissionDefaults', + fieldName: 'orgPermissionDefault', document, variables, + transform: (data: { + orgPermissionDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgPermissionDefault: data.orgPermissionDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/permissionsModule.ts b/sdk/constructive-cli/src/public/orm/models/permissionsModule.ts index 6066e6218..5fb22b44d 100644 --- a/sdk/constructive-cli/src/public/orm/models/permissionsModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/permissionsModule.ts @@ -70,13 +70,11 @@ export class PermissionsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - permissionsModules: { - nodes: InferSelectResult[]; - }; + permissionsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PermissionsModule', @@ -84,17 +82,26 @@ export class PermissionsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PermissionsModuleFilter', + 'PermissionsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PermissionsModule', - fieldName: 'permissionsModules', + fieldName: 'permissionsModule', document, variables, + transform: (data: { + permissionsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + permissionsModule: data.permissionsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/phoneNumber.ts b/sdk/constructive-cli/src/public/orm/models/phoneNumber.ts index a711db272..0803908e2 100644 --- a/sdk/constructive-cli/src/public/orm/models/phoneNumber.ts +++ b/sdk/constructive-cli/src/public/orm/models/phoneNumber.ts @@ -70,13 +70,11 @@ export class PhoneNumberModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - phoneNumbers: { - nodes: InferSelectResult[]; - }; + phoneNumber: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PhoneNumber', @@ -84,17 +82,26 @@ export class PhoneNumberModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PhoneNumberFilter', + 'PhoneNumberOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PhoneNumber', - fieldName: 'phoneNumbers', + fieldName: 'phoneNumber', document, variables, + transform: (data: { + phoneNumbers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + phoneNumber: data.phoneNumbers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/phoneNumbersModule.ts b/sdk/constructive-cli/src/public/orm/models/phoneNumbersModule.ts index 9b3da81ae..55f64339e 100644 --- a/sdk/constructive-cli/src/public/orm/models/phoneNumbersModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/phoneNumbersModule.ts @@ -70,13 +70,11 @@ export class PhoneNumbersModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - phoneNumbersModules: { - nodes: InferSelectResult[]; - }; + phoneNumbersModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PhoneNumbersModule', @@ -84,17 +82,26 @@ export class PhoneNumbersModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PhoneNumbersModuleFilter', + 'PhoneNumbersModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PhoneNumbersModule', - fieldName: 'phoneNumbersModules', + fieldName: 'phoneNumbersModule', document, variables, + transform: (data: { + phoneNumbersModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + phoneNumbersModule: data.phoneNumbersModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/plansModule.ts b/sdk/constructive-cli/src/public/orm/models/plansModule.ts index e310fa581..f13f1849b 100644 --- a/sdk/constructive-cli/src/public/orm/models/plansModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/plansModule.ts @@ -70,13 +70,11 @@ export class PlansModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - plansModules: { - nodes: InferSelectResult[]; - }; + plansModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PlansModule', @@ -84,17 +82,26 @@ export class PlansModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PlansModuleFilter', + 'PlansModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PlansModule', - fieldName: 'plansModules', + fieldName: 'plansModule', document, variables, + transform: (data: { + plansModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + plansModule: data.plansModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/policy.ts b/sdk/constructive-cli/src/public/orm/models/policy.ts index c76c4a3ad..c60088703 100644 --- a/sdk/constructive-cli/src/public/orm/models/policy.ts +++ b/sdk/constructive-cli/src/public/orm/models/policy.ts @@ -70,13 +70,11 @@ export class PolicyModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - policies: { - nodes: InferSelectResult[]; - }; + policy: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Policy', @@ -84,17 +82,26 @@ export class PolicyModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PolicyFilter', + 'PolicyOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Policy', - fieldName: 'policies', + fieldName: 'policy', document, variables, + transform: (data: { + policies?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + policy: data.policies?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/primaryKeyConstraint.ts b/sdk/constructive-cli/src/public/orm/models/primaryKeyConstraint.ts index f1d79e61c..e73aca57d 100644 --- a/sdk/constructive-cli/src/public/orm/models/primaryKeyConstraint.ts +++ b/sdk/constructive-cli/src/public/orm/models/primaryKeyConstraint.ts @@ -72,13 +72,11 @@ export class PrimaryKeyConstraintModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - primaryKeyConstraints: { - nodes: InferSelectResult[]; - }; + primaryKeyConstraint: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PrimaryKeyConstraint', @@ -86,17 +84,26 @@ export class PrimaryKeyConstraintModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PrimaryKeyConstraintFilter', + 'PrimaryKeyConstraintOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PrimaryKeyConstraint', - fieldName: 'primaryKeyConstraints', + fieldName: 'primaryKeyConstraint', document, variables, + transform: (data: { + primaryKeyConstraints?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + primaryKeyConstraint: data.primaryKeyConstraints?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/profilesModule.ts b/sdk/constructive-cli/src/public/orm/models/profilesModule.ts index 7841e9222..f1c152e77 100644 --- a/sdk/constructive-cli/src/public/orm/models/profilesModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/profilesModule.ts @@ -70,13 +70,11 @@ export class ProfilesModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - profilesModules: { - nodes: InferSelectResult[]; - }; + profilesModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ProfilesModule', @@ -84,17 +82,26 @@ export class ProfilesModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ProfilesModuleFilter', + 'ProfilesModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ProfilesModule', - fieldName: 'profilesModules', + fieldName: 'profilesModule', document, variables, + transform: (data: { + profilesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + profilesModule: data.profilesModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/rateLimitsModule.ts b/sdk/constructive-cli/src/public/orm/models/rateLimitsModule.ts index b541082db..9567ccaa2 100644 --- a/sdk/constructive-cli/src/public/orm/models/rateLimitsModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/rateLimitsModule.ts @@ -70,13 +70,11 @@ export class RateLimitsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - rateLimitsModules: { - nodes: InferSelectResult[]; - }; + rateLimitsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'RateLimitsModule', @@ -84,17 +82,26 @@ export class RateLimitsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RateLimitsModuleFilter', + 'RateLimitsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'RateLimitsModule', - fieldName: 'rateLimitsModules', + fieldName: 'rateLimitsModule', document, variables, + transform: (data: { + rateLimitsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + rateLimitsModule: data.rateLimitsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/ref.ts b/sdk/constructive-cli/src/public/orm/models/ref.ts index 016c70644..5c3419d89 100644 --- a/sdk/constructive-cli/src/public/orm/models/ref.ts +++ b/sdk/constructive-cli/src/public/orm/models/ref.ts @@ -70,13 +70,11 @@ export class RefModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - refs: { - nodes: InferSelectResult[]; - }; + ref: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Ref', @@ -84,17 +82,26 @@ export class RefModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RefFilter', + 'RefOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Ref', - fieldName: 'refs', + fieldName: 'ref', document, variables, + transform: (data: { + refs?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + ref: data.refs?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/relationProvision.ts b/sdk/constructive-cli/src/public/orm/models/relationProvision.ts index 5d27d5872..eea0a0101 100644 --- a/sdk/constructive-cli/src/public/orm/models/relationProvision.ts +++ b/sdk/constructive-cli/src/public/orm/models/relationProvision.ts @@ -70,13 +70,11 @@ export class RelationProvisionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - relationProvisions: { - nodes: InferSelectResult[]; - }; + relationProvision: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'RelationProvision', @@ -84,17 +82,26 @@ export class RelationProvisionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RelationProvisionFilter', + 'RelationProvisionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'RelationProvision', - fieldName: 'relationProvisions', + fieldName: 'relationProvision', document, variables, + transform: (data: { + relationProvisions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + relationProvision: data.relationProvisions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/rlsModule.ts b/sdk/constructive-cli/src/public/orm/models/rlsModule.ts index 750815c7b..5e1ed1afc 100644 --- a/sdk/constructive-cli/src/public/orm/models/rlsModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/rlsModule.ts @@ -70,13 +70,11 @@ export class RlsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - rlsModules: { - nodes: InferSelectResult[]; - }; + rlsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'RlsModule', @@ -84,17 +82,26 @@ export class RlsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RlsModuleFilter', + 'RlsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'RlsModule', - fieldName: 'rlsModules', + fieldName: 'rlsModule', document, variables, + transform: (data: { + rlsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + rlsModule: data.rlsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/roleType.ts b/sdk/constructive-cli/src/public/orm/models/roleType.ts index 5b258dc9a..8b256a0dc 100644 --- a/sdk/constructive-cli/src/public/orm/models/roleType.ts +++ b/sdk/constructive-cli/src/public/orm/models/roleType.ts @@ -70,13 +70,11 @@ export class RoleTypeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - roleTypes: { - nodes: InferSelectResult[]; - }; + roleType: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'RoleType', @@ -84,17 +82,26 @@ export class RoleTypeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RoleTypeFilter', + 'RoleTypeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'RoleType', - fieldName: 'roleTypes', + fieldName: 'roleType', document, variables, + transform: (data: { + roleTypes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + roleType: data.roleTypes?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/schema.ts b/sdk/constructive-cli/src/public/orm/models/schema.ts index 5bc546943..3d0af9820 100644 --- a/sdk/constructive-cli/src/public/orm/models/schema.ts +++ b/sdk/constructive-cli/src/public/orm/models/schema.ts @@ -70,13 +70,11 @@ export class SchemaModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - schemas: { - nodes: InferSelectResult[]; - }; + schema: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Schema', @@ -84,17 +82,26 @@ export class SchemaModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SchemaFilter', + 'SchemaOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Schema', - fieldName: 'schemas', + fieldName: 'schema', document, variables, + transform: (data: { + schemas?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + schema: data.schemas?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/schemaGrant.ts b/sdk/constructive-cli/src/public/orm/models/schemaGrant.ts index 97671a523..dfe756975 100644 --- a/sdk/constructive-cli/src/public/orm/models/schemaGrant.ts +++ b/sdk/constructive-cli/src/public/orm/models/schemaGrant.ts @@ -70,13 +70,11 @@ export class SchemaGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - schemaGrants: { - nodes: InferSelectResult[]; - }; + schemaGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SchemaGrant', @@ -84,17 +82,26 @@ export class SchemaGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SchemaGrantFilter', + 'SchemaGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SchemaGrant', - fieldName: 'schemaGrants', + fieldName: 'schemaGrant', document, variables, + transform: (data: { + schemaGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + schemaGrant: data.schemaGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/secretsModule.ts b/sdk/constructive-cli/src/public/orm/models/secretsModule.ts index 808b0154d..1e91d4823 100644 --- a/sdk/constructive-cli/src/public/orm/models/secretsModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/secretsModule.ts @@ -70,13 +70,11 @@ export class SecretsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - secretsModules: { - nodes: InferSelectResult[]; - }; + secretsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SecretsModule', @@ -84,17 +82,26 @@ export class SecretsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SecretsModuleFilter', + 'SecretsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SecretsModule', - fieldName: 'secretsModules', + fieldName: 'secretsModule', document, variables, + transform: (data: { + secretsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + secretsModule: data.secretsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/secureTableProvision.ts b/sdk/constructive-cli/src/public/orm/models/secureTableProvision.ts index 585ea33c9..ca0ef2a68 100644 --- a/sdk/constructive-cli/src/public/orm/models/secureTableProvision.ts +++ b/sdk/constructive-cli/src/public/orm/models/secureTableProvision.ts @@ -72,13 +72,11 @@ export class SecureTableProvisionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - secureTableProvisions: { - nodes: InferSelectResult[]; - }; + secureTableProvision: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SecureTableProvision', @@ -86,17 +84,26 @@ export class SecureTableProvisionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SecureTableProvisionFilter', + 'SecureTableProvisionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SecureTableProvision', - fieldName: 'secureTableProvisions', + fieldName: 'secureTableProvision', document, variables, + transform: (data: { + secureTableProvisions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + secureTableProvision: data.secureTableProvisions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/sessionSecretsModule.ts b/sdk/constructive-cli/src/public/orm/models/sessionSecretsModule.ts index b333c87f0..474a95320 100644 --- a/sdk/constructive-cli/src/public/orm/models/sessionSecretsModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/sessionSecretsModule.ts @@ -72,13 +72,11 @@ export class SessionSecretsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - sessionSecretsModules: { - nodes: InferSelectResult[]; - }; + sessionSecretsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SessionSecretsModule', @@ -86,17 +84,26 @@ export class SessionSecretsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SessionSecretsModuleFilter', + 'SessionSecretsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SessionSecretsModule', - fieldName: 'sessionSecretsModules', + fieldName: 'sessionSecretsModule', document, variables, + transform: (data: { + sessionSecretsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + sessionSecretsModule: data.sessionSecretsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/sessionsModule.ts b/sdk/constructive-cli/src/public/orm/models/sessionsModule.ts index 01cf5198a..b66cc7be3 100644 --- a/sdk/constructive-cli/src/public/orm/models/sessionsModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/sessionsModule.ts @@ -70,13 +70,11 @@ export class SessionsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - sessionsModules: { - nodes: InferSelectResult[]; - }; + sessionsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SessionsModule', @@ -84,17 +82,26 @@ export class SessionsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SessionsModuleFilter', + 'SessionsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SessionsModule', - fieldName: 'sessionsModules', + fieldName: 'sessionsModule', document, variables, + transform: (data: { + sessionsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + sessionsModule: data.sessionsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/site.ts b/sdk/constructive-cli/src/public/orm/models/site.ts index fa790b4d1..070a32b24 100644 --- a/sdk/constructive-cli/src/public/orm/models/site.ts +++ b/sdk/constructive-cli/src/public/orm/models/site.ts @@ -70,13 +70,11 @@ export class SiteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - sites: { - nodes: InferSelectResult[]; - }; + site: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Site', @@ -84,17 +82,26 @@ export class SiteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SiteFilter', + 'SiteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Site', - fieldName: 'sites', + fieldName: 'site', document, variables, + transform: (data: { + sites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + site: data.sites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/siteMetadatum.ts b/sdk/constructive-cli/src/public/orm/models/siteMetadatum.ts index 629c19725..de85238e4 100644 --- a/sdk/constructive-cli/src/public/orm/models/siteMetadatum.ts +++ b/sdk/constructive-cli/src/public/orm/models/siteMetadatum.ts @@ -70,13 +70,11 @@ export class SiteMetadatumModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - siteMetadata: { - nodes: InferSelectResult[]; - }; + siteMetadatum: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SiteMetadatum', @@ -84,17 +82,26 @@ export class SiteMetadatumModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SiteMetadatumFilter', + 'SiteMetadatumOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SiteMetadatum', - fieldName: 'siteMetadata', + fieldName: 'siteMetadatum', document, variables, + transform: (data: { + siteMetadata?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + siteMetadatum: data.siteMetadata?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/siteModule.ts b/sdk/constructive-cli/src/public/orm/models/siteModule.ts index 943a6d7ae..b890423fe 100644 --- a/sdk/constructive-cli/src/public/orm/models/siteModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/siteModule.ts @@ -70,13 +70,11 @@ export class SiteModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - siteModules: { - nodes: InferSelectResult[]; - }; + siteModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SiteModule', @@ -84,17 +82,26 @@ export class SiteModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SiteModuleFilter', + 'SiteModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SiteModule', - fieldName: 'siteModules', + fieldName: 'siteModule', document, variables, + transform: (data: { + siteModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + siteModule: data.siteModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/siteTheme.ts b/sdk/constructive-cli/src/public/orm/models/siteTheme.ts index da7e85ab8..57b9cadc5 100644 --- a/sdk/constructive-cli/src/public/orm/models/siteTheme.ts +++ b/sdk/constructive-cli/src/public/orm/models/siteTheme.ts @@ -70,13 +70,11 @@ export class SiteThemeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - siteThemes: { - nodes: InferSelectResult[]; - }; + siteTheme: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SiteTheme', @@ -84,17 +82,26 @@ export class SiteThemeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SiteThemeFilter', + 'SiteThemeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SiteTheme', - fieldName: 'siteThemes', + fieldName: 'siteTheme', document, variables, + transform: (data: { + siteThemes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + siteTheme: data.siteThemes?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/spatialRelation.ts b/sdk/constructive-cli/src/public/orm/models/spatialRelation.ts index c1d09c31a..fe266c9d3 100644 --- a/sdk/constructive-cli/src/public/orm/models/spatialRelation.ts +++ b/sdk/constructive-cli/src/public/orm/models/spatialRelation.ts @@ -70,13 +70,11 @@ export class SpatialRelationModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - spatialRelations: { - nodes: InferSelectResult[]; - }; + spatialRelation: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SpatialRelation', @@ -84,17 +82,26 @@ export class SpatialRelationModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SpatialRelationFilter', + 'SpatialRelationOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SpatialRelation', - fieldName: 'spatialRelations', + fieldName: 'spatialRelation', document, variables, + transform: (data: { + spatialRelations?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + spatialRelation: data.spatialRelations?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/sqlAction.ts b/sdk/constructive-cli/src/public/orm/models/sqlAction.ts index 449f16020..74b441868 100644 --- a/sdk/constructive-cli/src/public/orm/models/sqlAction.ts +++ b/sdk/constructive-cli/src/public/orm/models/sqlAction.ts @@ -70,13 +70,11 @@ export class SqlActionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - sqlActions: { - nodes: InferSelectResult[]; - }; + sqlAction: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SqlAction', @@ -84,17 +82,26 @@ export class SqlActionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SqlActionFilter', + 'SqlActionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SqlAction', - fieldName: 'sqlActions', + fieldName: 'sqlAction', document, variables, + transform: (data: { + sqlActions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + sqlAction: data.sqlActions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/storageModule.ts b/sdk/constructive-cli/src/public/orm/models/storageModule.ts index cbfeb5b1e..e359f6471 100644 --- a/sdk/constructive-cli/src/public/orm/models/storageModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/storageModule.ts @@ -70,13 +70,11 @@ export class StorageModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - storageModules: { - nodes: InferSelectResult[]; - }; + storageModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'StorageModule', @@ -84,17 +82,26 @@ export class StorageModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'StorageModuleFilter', + 'StorageModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'StorageModule', - fieldName: 'storageModules', + fieldName: 'storageModule', document, variables, + transform: (data: { + storageModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + storageModule: data.storageModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/store.ts b/sdk/constructive-cli/src/public/orm/models/store.ts index f249ee921..f80e63890 100644 --- a/sdk/constructive-cli/src/public/orm/models/store.ts +++ b/sdk/constructive-cli/src/public/orm/models/store.ts @@ -70,13 +70,11 @@ export class StoreModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - stores: { - nodes: InferSelectResult[]; - }; + store: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Store', @@ -84,17 +82,26 @@ export class StoreModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'StoreFilter', + 'StoreOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Store', - fieldName: 'stores', + fieldName: 'store', document, variables, + transform: (data: { + stores?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + store: data.stores?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/table.ts b/sdk/constructive-cli/src/public/orm/models/table.ts index c10b604a3..db1c5d3a9 100644 --- a/sdk/constructive-cli/src/public/orm/models/table.ts +++ b/sdk/constructive-cli/src/public/orm/models/table.ts @@ -70,13 +70,11 @@ export class TableModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - tables: { - nodes: InferSelectResult[]; - }; + table: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Table', @@ -84,17 +82,26 @@ export class TableModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'TableFilter', + 'TableOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Table', - fieldName: 'tables', + fieldName: 'table', document, variables, + transform: (data: { + tables?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + table: data.tables?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/tableGrant.ts b/sdk/constructive-cli/src/public/orm/models/tableGrant.ts index 02d19136c..e05b44f2b 100644 --- a/sdk/constructive-cli/src/public/orm/models/tableGrant.ts +++ b/sdk/constructive-cli/src/public/orm/models/tableGrant.ts @@ -70,13 +70,11 @@ export class TableGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - tableGrants: { - nodes: InferSelectResult[]; - }; + tableGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'TableGrant', @@ -84,17 +82,26 @@ export class TableGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'TableGrantFilter', + 'TableGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'TableGrant', - fieldName: 'tableGrants', + fieldName: 'tableGrant', document, variables, + transform: (data: { + tableGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + tableGrant: data.tableGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/trigger.ts b/sdk/constructive-cli/src/public/orm/models/trigger.ts index 3e2404f0e..f4812bc6e 100644 --- a/sdk/constructive-cli/src/public/orm/models/trigger.ts +++ b/sdk/constructive-cli/src/public/orm/models/trigger.ts @@ -70,13 +70,11 @@ export class TriggerModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - triggers: { - nodes: InferSelectResult[]; - }; + trigger: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Trigger', @@ -84,17 +82,26 @@ export class TriggerModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'TriggerFilter', + 'TriggerOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Trigger', - fieldName: 'triggers', + fieldName: 'trigger', document, variables, + transform: (data: { + triggers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + trigger: data.triggers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/triggerFunction.ts b/sdk/constructive-cli/src/public/orm/models/triggerFunction.ts index 999438070..d2bd543aa 100644 --- a/sdk/constructive-cli/src/public/orm/models/triggerFunction.ts +++ b/sdk/constructive-cli/src/public/orm/models/triggerFunction.ts @@ -70,13 +70,11 @@ export class TriggerFunctionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - triggerFunctions: { - nodes: InferSelectResult[]; - }; + triggerFunction: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'TriggerFunction', @@ -84,17 +82,26 @@ export class TriggerFunctionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'TriggerFunctionFilter', + 'TriggerFunctionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'TriggerFunction', - fieldName: 'triggerFunctions', + fieldName: 'triggerFunction', document, variables, + transform: (data: { + triggerFunctions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + triggerFunction: data.triggerFunctions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/uniqueConstraint.ts b/sdk/constructive-cli/src/public/orm/models/uniqueConstraint.ts index de5ba6f76..3c1dad93d 100644 --- a/sdk/constructive-cli/src/public/orm/models/uniqueConstraint.ts +++ b/sdk/constructive-cli/src/public/orm/models/uniqueConstraint.ts @@ -70,13 +70,11 @@ export class UniqueConstraintModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - uniqueConstraints: { - nodes: InferSelectResult[]; - }; + uniqueConstraint: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'UniqueConstraint', @@ -84,17 +82,26 @@ export class UniqueConstraintModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UniqueConstraintFilter', + 'UniqueConstraintOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'UniqueConstraint', - fieldName: 'uniqueConstraints', + fieldName: 'uniqueConstraint', document, variables, + transform: (data: { + uniqueConstraints?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + uniqueConstraint: data.uniqueConstraints?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/user.ts b/sdk/constructive-cli/src/public/orm/models/user.ts index aedd4fcc8..893581835 100644 --- a/sdk/constructive-cli/src/public/orm/models/user.ts +++ b/sdk/constructive-cli/src/public/orm/models/user.ts @@ -70,13 +70,11 @@ export class UserModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - users: { - nodes: InferSelectResult[]; - }; + user: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'User', @@ -84,17 +82,26 @@ export class UserModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UserFilter', + 'UserOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'User', - fieldName: 'users', + fieldName: 'user', document, variables, + transform: (data: { + users?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + user: data.users?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/userAuthModule.ts b/sdk/constructive-cli/src/public/orm/models/userAuthModule.ts index 431026d87..15fe6a854 100644 --- a/sdk/constructive-cli/src/public/orm/models/userAuthModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/userAuthModule.ts @@ -70,13 +70,11 @@ export class UserAuthModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - userAuthModules: { - nodes: InferSelectResult[]; - }; + userAuthModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'UserAuthModule', @@ -84,17 +82,26 @@ export class UserAuthModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UserAuthModuleFilter', + 'UserAuthModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'UserAuthModule', - fieldName: 'userAuthModules', + fieldName: 'userAuthModule', document, variables, + transform: (data: { + userAuthModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userAuthModule: data.userAuthModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/userConnectedAccount.ts b/sdk/constructive-cli/src/public/orm/models/userConnectedAccount.ts index 45bbea7f4..a2344afdf 100644 --- a/sdk/constructive-cli/src/public/orm/models/userConnectedAccount.ts +++ b/sdk/constructive-cli/src/public/orm/models/userConnectedAccount.ts @@ -72,13 +72,11 @@ export class UserConnectedAccountModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - userConnectedAccounts: { - nodes: InferSelectResult[]; - }; + userConnectedAccount: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'UserConnectedAccount', @@ -86,17 +84,26 @@ export class UserConnectedAccountModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'UserConnectedAccount', - fieldName: 'userConnectedAccounts', + fieldName: 'userConnectedAccount', document, variables, + transform: (data: { + userConnectedAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userConnectedAccount: data.userConnectedAccounts?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/usersModule.ts b/sdk/constructive-cli/src/public/orm/models/usersModule.ts index c5b6d361b..de86bbbfb 100644 --- a/sdk/constructive-cli/src/public/orm/models/usersModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/usersModule.ts @@ -70,13 +70,11 @@ export class UsersModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - usersModules: { - nodes: InferSelectResult[]; - }; + usersModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'UsersModule', @@ -84,17 +82,26 @@ export class UsersModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UsersModuleFilter', + 'UsersModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'UsersModule', - fieldName: 'usersModules', + fieldName: 'usersModule', document, variables, + transform: (data: { + usersModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + usersModule: data.usersModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/view.ts b/sdk/constructive-cli/src/public/orm/models/view.ts index 5e7fa5f74..75acdcbcf 100644 --- a/sdk/constructive-cli/src/public/orm/models/view.ts +++ b/sdk/constructive-cli/src/public/orm/models/view.ts @@ -70,13 +70,11 @@ export class ViewModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - views: { - nodes: InferSelectResult[]; - }; + view: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'View', @@ -84,17 +82,26 @@ export class ViewModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ViewFilter', + 'ViewOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'View', - fieldName: 'views', + fieldName: 'view', document, variables, + transform: (data: { + views?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + view: data.views?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/viewGrant.ts b/sdk/constructive-cli/src/public/orm/models/viewGrant.ts index 1023b5f7f..bd4eddaef 100644 --- a/sdk/constructive-cli/src/public/orm/models/viewGrant.ts +++ b/sdk/constructive-cli/src/public/orm/models/viewGrant.ts @@ -70,13 +70,11 @@ export class ViewGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - viewGrants: { - nodes: InferSelectResult[]; - }; + viewGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ViewGrant', @@ -84,17 +82,26 @@ export class ViewGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ViewGrantFilter', + 'ViewGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ViewGrant', - fieldName: 'viewGrants', + fieldName: 'viewGrant', document, variables, + transform: (data: { + viewGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + viewGrant: data.viewGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/viewRule.ts b/sdk/constructive-cli/src/public/orm/models/viewRule.ts index 101bd199a..cdec5ad12 100644 --- a/sdk/constructive-cli/src/public/orm/models/viewRule.ts +++ b/sdk/constructive-cli/src/public/orm/models/viewRule.ts @@ -70,13 +70,11 @@ export class ViewRuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - viewRules: { - nodes: InferSelectResult[]; - }; + viewRule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ViewRule', @@ -84,17 +82,26 @@ export class ViewRuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ViewRuleFilter', + 'ViewRuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ViewRule', - fieldName: 'viewRules', + fieldName: 'viewRule', document, variables, + transform: (data: { + viewRules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + viewRule: data.viewRules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/viewTable.ts b/sdk/constructive-cli/src/public/orm/models/viewTable.ts index a37e7137b..83362317e 100644 --- a/sdk/constructive-cli/src/public/orm/models/viewTable.ts +++ b/sdk/constructive-cli/src/public/orm/models/viewTable.ts @@ -70,13 +70,11 @@ export class ViewTableModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - viewTables: { - nodes: InferSelectResult[]; - }; + viewTable: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ViewTable', @@ -84,17 +82,26 @@ export class ViewTableModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ViewTableFilter', + 'ViewTableOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ViewTable', - fieldName: 'viewTables', + fieldName: 'viewTable', document, variables, + transform: (data: { + viewTables?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + viewTable: data.viewTables?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/webauthnAuthModule.ts b/sdk/constructive-cli/src/public/orm/models/webauthnAuthModule.ts index 3267077b3..14ebdd6f2 100644 --- a/sdk/constructive-cli/src/public/orm/models/webauthnAuthModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/webauthnAuthModule.ts @@ -70,13 +70,11 @@ export class WebauthnAuthModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - webauthnAuthModules: { - nodes: InferSelectResult[]; - }; + webauthnAuthModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'WebauthnAuthModule', @@ -84,17 +82,26 @@ export class WebauthnAuthModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'WebauthnAuthModuleFilter', + 'WebauthnAuthModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'WebauthnAuthModule', - fieldName: 'webauthnAuthModules', + fieldName: 'webauthnAuthModule', document, variables, + transform: (data: { + webauthnAuthModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + webauthnAuthModule: data.webauthnAuthModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/webauthnCredential.ts b/sdk/constructive-cli/src/public/orm/models/webauthnCredential.ts index f02cf10bc..cca4c75cf 100644 --- a/sdk/constructive-cli/src/public/orm/models/webauthnCredential.ts +++ b/sdk/constructive-cli/src/public/orm/models/webauthnCredential.ts @@ -70,13 +70,11 @@ export class WebauthnCredentialModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - webauthnCredentials: { - nodes: InferSelectResult[]; - }; + webauthnCredential: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'WebauthnCredential', @@ -84,17 +82,26 @@ export class WebauthnCredentialModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'WebauthnCredentialFilter', + 'WebauthnCredentialOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'WebauthnCredential', - fieldName: 'webauthnCredentials', + fieldName: 'webauthnCredential', document, variables, + transform: (data: { + webauthnCredentials?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + webauthnCredential: data.webauthnCredentials?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/models/webauthnCredentialsModule.ts b/sdk/constructive-cli/src/public/orm/models/webauthnCredentialsModule.ts index 78e687c34..ee66831a7 100644 --- a/sdk/constructive-cli/src/public/orm/models/webauthnCredentialsModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/webauthnCredentialsModule.ts @@ -72,13 +72,11 @@ export class WebauthnCredentialsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - webauthnCredentialsModules: { - nodes: InferSelectResult[]; - }; + webauthnCredentialsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'WebauthnCredentialsModule', @@ -86,17 +84,26 @@ export class WebauthnCredentialsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'WebauthnCredentialsModuleFilter', + 'WebauthnCredentialsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'WebauthnCredentialsModule', - fieldName: 'webauthnCredentialsModules', + fieldName: 'webauthnCredentialsModule', document, variables, + transform: (data: { + webauthnCredentialsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + webauthnCredentialsModule: data.webauthnCredentialsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-cli/src/public/orm/query-builder.ts b/sdk/constructive-cli/src/public/orm/query-builder.ts index f2fd4566f..5abdd3372 100644 --- a/sdk/constructive-cli/src/public/orm/query-builder.ts +++ b/sdk/constructive-cli/src/public/orm/query-builder.ts @@ -293,8 +293,9 @@ export function buildFindFirstDocument( operationName: string, queryField: string, select: TSelect, - args: { where?: TWhere }, + args: { where?: TWhere; orderBy?: string[] }, filterTypeName: string, + orderByTypeName: string, connectionFieldsMap?: Record> ): { document: string; variables: Record } { const selections = select @@ -322,6 +323,16 @@ export function buildFindFirstDocument( queryArgs, variables ); + addVariable( + { + varName: 'orderBy', + typeName: '[' + orderByTypeName + '!]', + value: args.orderBy?.length ? args.orderBy : undefined, + }, + variableDefinitions, + queryArgs, + variables + ); const document = t.document({ definitions: [ diff --git a/sdk/constructive-cli/src/public/orm/select-types.ts b/sdk/constructive-cli/src/public/orm/select-types.ts index 2621b3570..9c1ec1ad2 100644 --- a/sdk/constructive-cli/src/public/orm/select-types.ts +++ b/sdk/constructive-cli/src/public/orm/select-types.ts @@ -27,9 +27,10 @@ export interface FindManyArgs { offset?: number; } -export interface FindFirstArgs { +export interface FindFirstArgs { select?: TSelect; where?: TWhere; + orderBy?: TOrderBy[]; } export interface CreateArgs { diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppAchievementQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppAchievementQuery.ts index c7750c259..891db94c4 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppAchievementQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppAchievementQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppAchievementQuery(p export async function fetchAppAchievementQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appAchievement.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppAdminGrantQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppAdminGrantQuery.ts index dab440873..8cf929a7e 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppAdminGrantQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppAdminGrantQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppAdminGrantQuery(par export async function fetchAppAdminGrantQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appAdminGrant.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppClaimedInviteQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppClaimedInviteQuery.ts index d639d7374..51d1c60d2 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppClaimedInviteQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppClaimedInviteQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppClaimedInviteQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appClaimedInvite.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppGrantQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppGrantQuery.ts index 41777becd..a7a5d3304 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppGrantQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppGrantQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppGrantQuery(params: { export async function fetchAppGrantQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appGrant.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppInviteQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppInviteQuery.ts index 366128495..3a9293c3e 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppInviteQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppInviteQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppInviteQuery(params: { export async function fetchAppInviteQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appInvite.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppLevelQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppLevelQuery.ts index 2d947f33f..7458afb09 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppLevelQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppLevelQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppLevelQuery(params: { export async function fetchAppLevelQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appLevel.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppLevelRequirementQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppLevelRequirementQuery.ts index c446092be..1ff58327f 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppLevelRequirementQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppLevelRequirementQuery.ts @@ -97,7 +97,7 @@ export async function fetchAppLevelRequirementQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appLevelRequirement.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppLimitDefaultQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppLimitDefaultQuery.ts index 3f9e92b4c..4f4786638 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppLimitDefaultQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppLimitDefaultQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppLimitDefaultQuery export async function fetchAppLimitDefaultQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appLimitDefault.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppLimitQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppLimitQuery.ts index 92f7ca2ab..178e4553a 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppLimitQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppLimitQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppLimitQuery(params: { export async function fetchAppLimitQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appLimit.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipDefaultQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipDefaultQuery.ts index 7cf34e91a..85b8b0dcb 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipDefaultQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipDefaultQuery.ts @@ -97,7 +97,7 @@ export async function fetchAppMembershipDefaultQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appMembershipDefault.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipQuery.ts index 47a401be2..53a941d1a 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppMembershipQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppMembershipQuery(par export async function fetchAppMembershipQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appMembership.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppOwnerGrantQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppOwnerGrantQuery.ts index 98a75b276..a26148bca 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppOwnerGrantQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppOwnerGrantQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppOwnerGrantQuery(par export async function fetchAppOwnerGrantQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appOwnerGrant.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultQuery.ts index 27e973c84..d7c76c2a3 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionDefaultQuery.ts @@ -97,7 +97,7 @@ export async function fetchAppPermissionDefaultQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appPermissionDefault.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionQuery.ts index a71c93422..b89353ec6 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppPermissionQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppPermissionQuery(par export async function fetchAppPermissionQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appPermission.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useAppStepQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useAppStepQuery.ts index 5d3ebbbd0..c24230f27 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useAppStepQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useAppStepQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppStepQuery(params: { export async function fetchAppStepQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appStep.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useMembershipTypeQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useMembershipTypeQuery.ts index 71fdd8b77..e41a27d95 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useMembershipTypeQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useMembershipTypeQuery.ts @@ -91,7 +91,7 @@ export async function fetchMembershipTypeQuery(p export async function fetchMembershipTypeQuery(params: { id: number; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .membershipType.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgAdminGrantQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgAdminGrantQuery.ts index 04901b7da..468412a98 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgAdminGrantQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgAdminGrantQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgAdminGrantQuery(par export async function fetchOrgAdminGrantQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgAdminGrant.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgChartEdgeGrantQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgChartEdgeGrantQuery.ts index 576725d54..c367a5c77 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgChartEdgeGrantQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgChartEdgeGrantQuery.ts @@ -97,7 +97,7 @@ export async function fetchOrgChartEdgeGrantQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgChartEdgeGrant.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgChartEdgeQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgChartEdgeQuery.ts index 9087f1620..fac39e2eb 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgChartEdgeQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgChartEdgeQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgChartEdgeQuery(param export async function fetchOrgChartEdgeQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgChartEdge.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgClaimedInviteQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgClaimedInviteQuery.ts index 19223fbe3..bd0fcdb37 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgClaimedInviteQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgClaimedInviteQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgClaimedInviteQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgClaimedInvite.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgGrantQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgGrantQuery.ts index cd04f290e..3d02f5cd4 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgGrantQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgGrantQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgGrantQuery(params: { export async function fetchOrgGrantQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgGrant.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgInviteQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgInviteQuery.ts index 244288aa7..bf720507b 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgInviteQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgInviteQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgInviteQuery(params: { export async function fetchOrgInviteQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgInvite.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgLimitAggregateQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgLimitAggregateQuery.ts index c2b56b3d0..efe5a4a53 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgLimitAggregateQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgLimitAggregateQuery.ts @@ -97,7 +97,7 @@ export async function fetchOrgLimitAggregateQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgLimitAggregate.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgLimitDefaultQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgLimitDefaultQuery.ts index 4c0eff29a..4e9bd8585 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgLimitDefaultQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgLimitDefaultQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgLimitDefaultQuery export async function fetchOrgLimitDefaultQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgLimitDefault.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgLimitQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgLimitQuery.ts index a63b11f53..6c03f817f 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgLimitQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgLimitQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgLimitQuery(params: { export async function fetchOrgLimitQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgLimit.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgMemberProfileQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgMemberProfileQuery.ts index 6ad525e09..591bab676 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgMemberProfileQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgMemberProfileQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgMemberProfileQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgMemberProfile.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgMemberQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgMemberQuery.ts index e8cbfeaa0..d222cf6e2 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgMemberQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgMemberQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgMemberQuery(params: { export async function fetchOrgMemberQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgMember.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipDefaultQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipDefaultQuery.ts index bff51e2a0..b142d79be 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipDefaultQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipDefaultQuery.ts @@ -97,7 +97,7 @@ export async function fetchOrgMembershipDefaultQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgMembershipDefault.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipQuery.ts index 945adf98d..c251c5b23 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgMembershipQuery(par export async function fetchOrgMembershipQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgMembership.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipSettingQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipSettingQuery.ts index 7e74cc9c1..1e3f0d167 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipSettingQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgMembershipSettingQuery.ts @@ -97,7 +97,7 @@ export async function fetchOrgMembershipSettingQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgMembershipSetting.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgOwnerGrantQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgOwnerGrantQuery.ts index ad6a4b4ba..a7c0bc4dd 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgOwnerGrantQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgOwnerGrantQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgOwnerGrantQuery(par export async function fetchOrgOwnerGrantQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgOwnerGrant.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultQuery.ts index e1e71f5fc..9dc118fc7 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionDefaultQuery.ts @@ -97,7 +97,7 @@ export async function fetchOrgPermissionDefaultQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgPermissionDefault.findOne({ diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionQuery.ts index fcee408e9..4407aaedd 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionQuery.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgPermissionQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgPermissionQuery(par export async function fetchOrgPermissionQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgPermission.findOne({ diff --git a/sdk/constructive-react/src/admin/orm/models/appAchievement.ts b/sdk/constructive-react/src/admin/orm/models/appAchievement.ts index f24447777..545b5e5f7 100644 --- a/sdk/constructive-react/src/admin/orm/models/appAchievement.ts +++ b/sdk/constructive-react/src/admin/orm/models/appAchievement.ts @@ -70,13 +70,11 @@ export class AppAchievementModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appAchievements: { - nodes: InferSelectResult[]; - }; + appAchievement: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppAchievement', @@ -84,17 +82,26 @@ export class AppAchievementModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppAchievementFilter', + 'AppAchievementOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppAchievement', - fieldName: 'appAchievements', + fieldName: 'appAchievement', document, variables, + transform: (data: { + appAchievements?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appAchievement: data.appAchievements?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/appAdminGrant.ts b/sdk/constructive-react/src/admin/orm/models/appAdminGrant.ts index 6a2a59893..fd80edc23 100644 --- a/sdk/constructive-react/src/admin/orm/models/appAdminGrant.ts +++ b/sdk/constructive-react/src/admin/orm/models/appAdminGrant.ts @@ -70,13 +70,11 @@ export class AppAdminGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appAdminGrants: { - nodes: InferSelectResult[]; - }; + appAdminGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppAdminGrant', @@ -84,17 +82,26 @@ export class AppAdminGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppAdminGrantFilter', + 'AppAdminGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppAdminGrant', - fieldName: 'appAdminGrants', + fieldName: 'appAdminGrant', document, variables, + transform: (data: { + appAdminGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appAdminGrant: data.appAdminGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/appClaimedInvite.ts b/sdk/constructive-react/src/admin/orm/models/appClaimedInvite.ts index 2a4c41dec..c9e66ec9c 100644 --- a/sdk/constructive-react/src/admin/orm/models/appClaimedInvite.ts +++ b/sdk/constructive-react/src/admin/orm/models/appClaimedInvite.ts @@ -70,13 +70,11 @@ export class AppClaimedInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appClaimedInvites: { - nodes: InferSelectResult[]; - }; + appClaimedInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppClaimedInvite', @@ -84,17 +82,26 @@ export class AppClaimedInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppClaimedInviteFilter', + 'AppClaimedInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppClaimedInvite', - fieldName: 'appClaimedInvites', + fieldName: 'appClaimedInvite', document, variables, + transform: (data: { + appClaimedInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appClaimedInvite: data.appClaimedInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/appGrant.ts b/sdk/constructive-react/src/admin/orm/models/appGrant.ts index 2cb4f429a..4481fb3d8 100644 --- a/sdk/constructive-react/src/admin/orm/models/appGrant.ts +++ b/sdk/constructive-react/src/admin/orm/models/appGrant.ts @@ -70,13 +70,11 @@ export class AppGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appGrants: { - nodes: InferSelectResult[]; - }; + appGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppGrant', @@ -84,17 +82,26 @@ export class AppGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppGrantFilter', + 'AppGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppGrant', - fieldName: 'appGrants', + fieldName: 'appGrant', document, variables, + transform: (data: { + appGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appGrant: data.appGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/appInvite.ts b/sdk/constructive-react/src/admin/orm/models/appInvite.ts index fe4a1c4e4..5fcbff936 100644 --- a/sdk/constructive-react/src/admin/orm/models/appInvite.ts +++ b/sdk/constructive-react/src/admin/orm/models/appInvite.ts @@ -70,13 +70,11 @@ export class AppInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appInvites: { - nodes: InferSelectResult[]; - }; + appInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppInvite', @@ -84,17 +82,26 @@ export class AppInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppInviteFilter', + 'AppInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppInvite', - fieldName: 'appInvites', + fieldName: 'appInvite', document, variables, + transform: (data: { + appInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appInvite: data.appInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/appLevel.ts b/sdk/constructive-react/src/admin/orm/models/appLevel.ts index f9abef512..cd182a18c 100644 --- a/sdk/constructive-react/src/admin/orm/models/appLevel.ts +++ b/sdk/constructive-react/src/admin/orm/models/appLevel.ts @@ -70,13 +70,11 @@ export class AppLevelModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLevels: { - nodes: InferSelectResult[]; - }; + appLevel: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLevel', @@ -84,17 +82,26 @@ export class AppLevelModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLevelFilter', + 'AppLevelOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLevel', - fieldName: 'appLevels', + fieldName: 'appLevel', document, variables, + transform: (data: { + appLevels?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevel: data.appLevels?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/appLevelRequirement.ts b/sdk/constructive-react/src/admin/orm/models/appLevelRequirement.ts index 54baeb7dc..c3f9d89f1 100644 --- a/sdk/constructive-react/src/admin/orm/models/appLevelRequirement.ts +++ b/sdk/constructive-react/src/admin/orm/models/appLevelRequirement.ts @@ -70,13 +70,11 @@ export class AppLevelRequirementModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLevelRequirements: { - nodes: InferSelectResult[]; - }; + appLevelRequirement: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLevelRequirement', @@ -84,17 +82,26 @@ export class AppLevelRequirementModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLevelRequirementFilter', + 'AppLevelRequirementOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLevelRequirement', - fieldName: 'appLevelRequirements', + fieldName: 'appLevelRequirement', document, variables, + transform: (data: { + appLevelRequirements?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevelRequirement: data.appLevelRequirements?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/appLimit.ts b/sdk/constructive-react/src/admin/orm/models/appLimit.ts index dea896420..2e109cb07 100644 --- a/sdk/constructive-react/src/admin/orm/models/appLimit.ts +++ b/sdk/constructive-react/src/admin/orm/models/appLimit.ts @@ -70,13 +70,11 @@ export class AppLimitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimits: { - nodes: InferSelectResult[]; - }; + appLimit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimit', @@ -84,17 +82,26 @@ export class AppLimitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitFilter', + 'AppLimitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimit', - fieldName: 'appLimits', + fieldName: 'appLimit', document, variables, + transform: (data: { + appLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimit: data.appLimits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/appLimitDefault.ts b/sdk/constructive-react/src/admin/orm/models/appLimitDefault.ts index dfec3cdd9..f9df6376e 100644 --- a/sdk/constructive-react/src/admin/orm/models/appLimitDefault.ts +++ b/sdk/constructive-react/src/admin/orm/models/appLimitDefault.ts @@ -70,13 +70,11 @@ export class AppLimitDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimitDefaults: { - nodes: InferSelectResult[]; - }; + appLimitDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimitDefault', @@ -84,17 +82,26 @@ export class AppLimitDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitDefaultFilter', + 'AppLimitDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimitDefault', - fieldName: 'appLimitDefaults', + fieldName: 'appLimitDefault', document, variables, + transform: (data: { + appLimitDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimitDefault: data.appLimitDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/appLimitEvent.ts b/sdk/constructive-react/src/admin/orm/models/appLimitEvent.ts index 8f367e889..b8e0c98e1 100644 --- a/sdk/constructive-react/src/admin/orm/models/appLimitEvent.ts +++ b/sdk/constructive-react/src/admin/orm/models/appLimitEvent.ts @@ -70,13 +70,11 @@ export class AppLimitEventModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimitEvents: { - nodes: InferSelectResult[]; - }; + appLimitEvent: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimitEvent', @@ -84,17 +82,26 @@ export class AppLimitEventModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitEventFilter', + 'AppLimitEventOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimitEvent', - fieldName: 'appLimitEvents', + fieldName: 'appLimitEvent', document, variables, + transform: (data: { + appLimitEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimitEvent: data.appLimitEvents?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-react/src/admin/orm/models/appMembership.ts b/sdk/constructive-react/src/admin/orm/models/appMembership.ts index a830192e6..a4011c41a 100644 --- a/sdk/constructive-react/src/admin/orm/models/appMembership.ts +++ b/sdk/constructive-react/src/admin/orm/models/appMembership.ts @@ -70,13 +70,11 @@ export class AppMembershipModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appMemberships: { - nodes: InferSelectResult[]; - }; + appMembership: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppMembership', @@ -84,17 +82,26 @@ export class AppMembershipModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppMembershipFilter', + 'AppMembershipOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppMembership', - fieldName: 'appMemberships', + fieldName: 'appMembership', document, variables, + transform: (data: { + appMemberships?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appMembership: data.appMemberships?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/appMembershipDefault.ts b/sdk/constructive-react/src/admin/orm/models/appMembershipDefault.ts index 8b1a54c01..f69f1aca6 100644 --- a/sdk/constructive-react/src/admin/orm/models/appMembershipDefault.ts +++ b/sdk/constructive-react/src/admin/orm/models/appMembershipDefault.ts @@ -72,13 +72,11 @@ export class AppMembershipDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appMembershipDefaults: { - nodes: InferSelectResult[]; - }; + appMembershipDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppMembershipDefault', @@ -86,17 +84,26 @@ export class AppMembershipDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppMembershipDefaultFilter', + 'AppMembershipDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppMembershipDefault', - fieldName: 'appMembershipDefaults', + fieldName: 'appMembershipDefault', document, variables, + transform: (data: { + appMembershipDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appMembershipDefault: data.appMembershipDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/appOwnerGrant.ts b/sdk/constructive-react/src/admin/orm/models/appOwnerGrant.ts index a8695557e..eeb815d84 100644 --- a/sdk/constructive-react/src/admin/orm/models/appOwnerGrant.ts +++ b/sdk/constructive-react/src/admin/orm/models/appOwnerGrant.ts @@ -70,13 +70,11 @@ export class AppOwnerGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appOwnerGrants: { - nodes: InferSelectResult[]; - }; + appOwnerGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppOwnerGrant', @@ -84,17 +82,26 @@ export class AppOwnerGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppOwnerGrantFilter', + 'AppOwnerGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppOwnerGrant', - fieldName: 'appOwnerGrants', + fieldName: 'appOwnerGrant', document, variables, + transform: (data: { + appOwnerGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appOwnerGrant: data.appOwnerGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/appPermission.ts b/sdk/constructive-react/src/admin/orm/models/appPermission.ts index 2575c5de2..e71adea65 100644 --- a/sdk/constructive-react/src/admin/orm/models/appPermission.ts +++ b/sdk/constructive-react/src/admin/orm/models/appPermission.ts @@ -70,13 +70,11 @@ export class AppPermissionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appPermissions: { - nodes: InferSelectResult[]; - }; + appPermission: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppPermission', @@ -84,17 +82,26 @@ export class AppPermissionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppPermissionFilter', + 'AppPermissionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppPermission', - fieldName: 'appPermissions', + fieldName: 'appPermission', document, variables, + transform: (data: { + appPermissions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appPermission: data.appPermissions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/appPermissionDefault.ts b/sdk/constructive-react/src/admin/orm/models/appPermissionDefault.ts index 427272883..d5511aed0 100644 --- a/sdk/constructive-react/src/admin/orm/models/appPermissionDefault.ts +++ b/sdk/constructive-react/src/admin/orm/models/appPermissionDefault.ts @@ -72,13 +72,11 @@ export class AppPermissionDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appPermissionDefaults: { - nodes: InferSelectResult[]; - }; + appPermissionDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppPermissionDefault', @@ -86,17 +84,26 @@ export class AppPermissionDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppPermissionDefaultFilter', + 'AppPermissionDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppPermissionDefault', - fieldName: 'appPermissionDefaults', + fieldName: 'appPermissionDefault', document, variables, + transform: (data: { + appPermissionDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appPermissionDefault: data.appPermissionDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/appStep.ts b/sdk/constructive-react/src/admin/orm/models/appStep.ts index 29dae0d6c..7ebb44fa1 100644 --- a/sdk/constructive-react/src/admin/orm/models/appStep.ts +++ b/sdk/constructive-react/src/admin/orm/models/appStep.ts @@ -70,13 +70,11 @@ export class AppStepModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appSteps: { - nodes: InferSelectResult[]; - }; + appStep: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppStep', @@ -84,17 +82,26 @@ export class AppStepModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppStepFilter', + 'AppStepOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppStep', - fieldName: 'appSteps', + fieldName: 'appStep', document, variables, + transform: (data: { + appSteps?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appStep: data.appSteps?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/membershipType.ts b/sdk/constructive-react/src/admin/orm/models/membershipType.ts index 40fac5490..ee7ed596c 100644 --- a/sdk/constructive-react/src/admin/orm/models/membershipType.ts +++ b/sdk/constructive-react/src/admin/orm/models/membershipType.ts @@ -70,13 +70,11 @@ export class MembershipTypeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - membershipTypes: { - nodes: InferSelectResult[]; - }; + membershipType: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'MembershipType', @@ -84,17 +82,26 @@ export class MembershipTypeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'MembershipTypeFilter', + 'MembershipTypeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'MembershipType', - fieldName: 'membershipTypes', + fieldName: 'membershipType', document, variables, + transform: (data: { + membershipTypes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + membershipType: data.membershipTypes?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/orgAdminGrant.ts b/sdk/constructive-react/src/admin/orm/models/orgAdminGrant.ts index e611a8578..7b1337731 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgAdminGrant.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgAdminGrant.ts @@ -70,13 +70,11 @@ export class OrgAdminGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgAdminGrants: { - nodes: InferSelectResult[]; - }; + orgAdminGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgAdminGrant', @@ -84,17 +82,26 @@ export class OrgAdminGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgAdminGrantFilter', + 'OrgAdminGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgAdminGrant', - fieldName: 'orgAdminGrants', + fieldName: 'orgAdminGrant', document, variables, + transform: (data: { + orgAdminGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgAdminGrant: data.orgAdminGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/orgChartEdge.ts b/sdk/constructive-react/src/admin/orm/models/orgChartEdge.ts index 6c6fc84cc..8a43b83a9 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgChartEdge.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgChartEdge.ts @@ -70,13 +70,11 @@ export class OrgChartEdgeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgChartEdges: { - nodes: InferSelectResult[]; - }; + orgChartEdge: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgChartEdge', @@ -84,17 +82,26 @@ export class OrgChartEdgeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgChartEdgeFilter', + 'OrgChartEdgeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgChartEdge', - fieldName: 'orgChartEdges', + fieldName: 'orgChartEdge', document, variables, + transform: (data: { + orgChartEdges?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgChartEdge: data.orgChartEdges?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/orgChartEdgeGrant.ts b/sdk/constructive-react/src/admin/orm/models/orgChartEdgeGrant.ts index 58345c78d..168a6fe3d 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgChartEdgeGrant.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgChartEdgeGrant.ts @@ -70,13 +70,11 @@ export class OrgChartEdgeGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgChartEdgeGrants: { - nodes: InferSelectResult[]; - }; + orgChartEdgeGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgChartEdgeGrant', @@ -84,17 +82,26 @@ export class OrgChartEdgeGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgChartEdgeGrantFilter', + 'OrgChartEdgeGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgChartEdgeGrant', - fieldName: 'orgChartEdgeGrants', + fieldName: 'orgChartEdgeGrant', document, variables, + transform: (data: { + orgChartEdgeGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgChartEdgeGrant: data.orgChartEdgeGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/orgClaimedInvite.ts b/sdk/constructive-react/src/admin/orm/models/orgClaimedInvite.ts index 475de7291..e1a3aecaf 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgClaimedInvite.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgClaimedInvite.ts @@ -70,13 +70,11 @@ export class OrgClaimedInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgClaimedInvites: { - nodes: InferSelectResult[]; - }; + orgClaimedInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgClaimedInvite', @@ -84,17 +82,26 @@ export class OrgClaimedInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgClaimedInviteFilter', + 'OrgClaimedInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgClaimedInvite', - fieldName: 'orgClaimedInvites', + fieldName: 'orgClaimedInvite', document, variables, + transform: (data: { + orgClaimedInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgClaimedInvite: data.orgClaimedInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/orgGetManagersRecord.ts b/sdk/constructive-react/src/admin/orm/models/orgGetManagersRecord.ts index 9a0cefa8a..7c333b76d 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgGetManagersRecord.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgGetManagersRecord.ts @@ -70,13 +70,11 @@ export class OrgGetManagersRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGetManagers: { - nodes: InferSelectResult[]; - }; + orgGetManagersRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGetManagersRecord', @@ -84,17 +82,26 @@ export class OrgGetManagersRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGetManagersRecordFilter', + 'OrgGetManagersRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGetManagersRecord', - fieldName: 'orgGetManagers', + fieldName: 'orgGetManagersRecord', document, variables, + transform: (data: { + orgGetManagers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGetManagersRecord: data.orgGetManagers?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-react/src/admin/orm/models/orgGetSubordinatesRecord.ts b/sdk/constructive-react/src/admin/orm/models/orgGetSubordinatesRecord.ts index 5eeec50ca..f259e1043 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgGetSubordinatesRecord.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgGetSubordinatesRecord.ts @@ -72,13 +72,11 @@ export class OrgGetSubordinatesRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGetSubordinates: { - nodes: InferSelectResult[]; - }; + orgGetSubordinatesRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGetSubordinatesRecord', @@ -86,17 +84,26 @@ export class OrgGetSubordinatesRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGetSubordinatesRecordFilter', + 'OrgGetSubordinatesRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGetSubordinatesRecord', - fieldName: 'orgGetSubordinates', + fieldName: 'orgGetSubordinatesRecord', document, variables, + transform: (data: { + orgGetSubordinates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGetSubordinatesRecord: data.orgGetSubordinates?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-react/src/admin/orm/models/orgGrant.ts b/sdk/constructive-react/src/admin/orm/models/orgGrant.ts index 291264ec5..c8e74f5cc 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgGrant.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgGrant.ts @@ -70,13 +70,11 @@ export class OrgGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGrants: { - nodes: InferSelectResult[]; - }; + orgGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGrant', @@ -84,17 +82,26 @@ export class OrgGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGrantFilter', + 'OrgGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGrant', - fieldName: 'orgGrants', + fieldName: 'orgGrant', document, variables, + transform: (data: { + orgGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGrant: data.orgGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/orgInvite.ts b/sdk/constructive-react/src/admin/orm/models/orgInvite.ts index 639cb8dd5..8d7931f07 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgInvite.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgInvite.ts @@ -70,13 +70,11 @@ export class OrgInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgInvites: { - nodes: InferSelectResult[]; - }; + orgInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgInvite', @@ -84,17 +82,26 @@ export class OrgInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgInviteFilter', + 'OrgInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgInvite', - fieldName: 'orgInvites', + fieldName: 'orgInvite', document, variables, + transform: (data: { + orgInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgInvite: data.orgInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/orgLimit.ts b/sdk/constructive-react/src/admin/orm/models/orgLimit.ts index 2d7937963..48a3932f2 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgLimit.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgLimit.ts @@ -70,13 +70,11 @@ export class OrgLimitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimits: { - nodes: InferSelectResult[]; - }; + orgLimit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimit', @@ -84,17 +82,26 @@ export class OrgLimitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitFilter', + 'OrgLimitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimit', - fieldName: 'orgLimits', + fieldName: 'orgLimit', document, variables, + transform: (data: { + orgLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimit: data.orgLimits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/orgLimitAggregate.ts b/sdk/constructive-react/src/admin/orm/models/orgLimitAggregate.ts index daee50aee..d74b9e7d9 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgLimitAggregate.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgLimitAggregate.ts @@ -70,13 +70,11 @@ export class OrgLimitAggregateModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitAggregates: { - nodes: InferSelectResult[]; - }; + orgLimitAggregate: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitAggregate', @@ -84,17 +82,26 @@ export class OrgLimitAggregateModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitAggregateFilter', + 'OrgLimitAggregateOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitAggregate', - fieldName: 'orgLimitAggregates', + fieldName: 'orgLimitAggregate', document, variables, + transform: (data: { + orgLimitAggregates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitAggregate: data.orgLimitAggregates?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/orgLimitDefault.ts b/sdk/constructive-react/src/admin/orm/models/orgLimitDefault.ts index bf0cfcf5e..7e55bfd1f 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgLimitDefault.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgLimitDefault.ts @@ -70,13 +70,11 @@ export class OrgLimitDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitDefaults: { - nodes: InferSelectResult[]; - }; + orgLimitDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitDefault', @@ -84,17 +82,26 @@ export class OrgLimitDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitDefaultFilter', + 'OrgLimitDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitDefault', - fieldName: 'orgLimitDefaults', + fieldName: 'orgLimitDefault', document, variables, + transform: (data: { + orgLimitDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitDefault: data.orgLimitDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/orgLimitEvent.ts b/sdk/constructive-react/src/admin/orm/models/orgLimitEvent.ts index 6414ba0ed..c259e325f 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgLimitEvent.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgLimitEvent.ts @@ -70,13 +70,11 @@ export class OrgLimitEventModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitEvents: { - nodes: InferSelectResult[]; - }; + orgLimitEvent: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitEvent', @@ -84,17 +82,26 @@ export class OrgLimitEventModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitEventFilter', + 'OrgLimitEventOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitEvent', - fieldName: 'orgLimitEvents', + fieldName: 'orgLimitEvent', document, variables, + transform: (data: { + orgLimitEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitEvent: data.orgLimitEvents?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-react/src/admin/orm/models/orgMember.ts b/sdk/constructive-react/src/admin/orm/models/orgMember.ts index dd1d20e45..44f5608f4 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgMember.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgMember.ts @@ -70,13 +70,11 @@ export class OrgMemberModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembers: { - nodes: InferSelectResult[]; - }; + orgMember: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMember', @@ -84,17 +82,26 @@ export class OrgMemberModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMemberFilter', + 'OrgMemberOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMember', - fieldName: 'orgMembers', + fieldName: 'orgMember', document, variables, + transform: (data: { + orgMembers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMember: data.orgMembers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/orgMemberProfile.ts b/sdk/constructive-react/src/admin/orm/models/orgMemberProfile.ts index de551ba79..77357e174 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgMemberProfile.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgMemberProfile.ts @@ -70,13 +70,11 @@ export class OrgMemberProfileModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMemberProfiles: { - nodes: InferSelectResult[]; - }; + orgMemberProfile: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMemberProfile', @@ -84,17 +82,26 @@ export class OrgMemberProfileModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMemberProfile', - fieldName: 'orgMemberProfiles', + fieldName: 'orgMemberProfile', document, variables, + transform: (data: { + orgMemberProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMemberProfile: data.orgMemberProfiles?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/orgMembership.ts b/sdk/constructive-react/src/admin/orm/models/orgMembership.ts index c0173b3e1..623ec08fe 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgMembership.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgMembership.ts @@ -70,13 +70,11 @@ export class OrgMembershipModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMemberships: { - nodes: InferSelectResult[]; - }; + orgMembership: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembership', @@ -84,17 +82,26 @@ export class OrgMembershipModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipFilter', + 'OrgMembershipOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembership', - fieldName: 'orgMemberships', + fieldName: 'orgMembership', document, variables, + transform: (data: { + orgMemberships?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembership: data.orgMemberships?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/orgMembershipDefault.ts b/sdk/constructive-react/src/admin/orm/models/orgMembershipDefault.ts index 09d525bec..344131505 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgMembershipDefault.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgMembershipDefault.ts @@ -72,13 +72,11 @@ export class OrgMembershipDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembershipDefaults: { - nodes: InferSelectResult[]; - }; + orgMembershipDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembershipDefault', @@ -86,17 +84,26 @@ export class OrgMembershipDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipDefaultFilter', + 'OrgMembershipDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembershipDefault', - fieldName: 'orgMembershipDefaults', + fieldName: 'orgMembershipDefault', document, variables, + transform: (data: { + orgMembershipDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembershipDefault: data.orgMembershipDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/orgMembershipSetting.ts b/sdk/constructive-react/src/admin/orm/models/orgMembershipSetting.ts index 1efc26410..46801fc91 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgMembershipSetting.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgMembershipSetting.ts @@ -72,13 +72,11 @@ export class OrgMembershipSettingModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembershipSettings: { - nodes: InferSelectResult[]; - }; + orgMembershipSetting: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembershipSetting', @@ -86,17 +84,26 @@ export class OrgMembershipSettingModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipSettingFilter', + 'OrgMembershipSettingOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembershipSetting', - fieldName: 'orgMembershipSettings', + fieldName: 'orgMembershipSetting', document, variables, + transform: (data: { + orgMembershipSettings?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembershipSetting: data.orgMembershipSettings?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/orgOwnerGrant.ts b/sdk/constructive-react/src/admin/orm/models/orgOwnerGrant.ts index bdf045511..9614dce8f 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgOwnerGrant.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgOwnerGrant.ts @@ -70,13 +70,11 @@ export class OrgOwnerGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgOwnerGrants: { - nodes: InferSelectResult[]; - }; + orgOwnerGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgOwnerGrant', @@ -84,17 +82,26 @@ export class OrgOwnerGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgOwnerGrantFilter', + 'OrgOwnerGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgOwnerGrant', - fieldName: 'orgOwnerGrants', + fieldName: 'orgOwnerGrant', document, variables, + transform: (data: { + orgOwnerGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgOwnerGrant: data.orgOwnerGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/orgPermission.ts b/sdk/constructive-react/src/admin/orm/models/orgPermission.ts index c5910be63..7bdc90632 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgPermission.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgPermission.ts @@ -70,13 +70,11 @@ export class OrgPermissionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgPermissions: { - nodes: InferSelectResult[]; - }; + orgPermission: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgPermission', @@ -84,17 +82,26 @@ export class OrgPermissionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgPermissionFilter', + 'OrgPermissionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgPermission', - fieldName: 'orgPermissions', + fieldName: 'orgPermission', document, variables, + transform: (data: { + orgPermissions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgPermission: data.orgPermissions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/models/orgPermissionDefault.ts b/sdk/constructive-react/src/admin/orm/models/orgPermissionDefault.ts index 40389a11b..8d00b9932 100644 --- a/sdk/constructive-react/src/admin/orm/models/orgPermissionDefault.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgPermissionDefault.ts @@ -72,13 +72,11 @@ export class OrgPermissionDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgPermissionDefaults: { - nodes: InferSelectResult[]; - }; + orgPermissionDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgPermissionDefault', @@ -86,17 +84,26 @@ export class OrgPermissionDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgPermissionDefaultFilter', + 'OrgPermissionDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgPermissionDefault', - fieldName: 'orgPermissionDefaults', + fieldName: 'orgPermissionDefault', document, variables, + transform: (data: { + orgPermissionDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgPermissionDefault: data.orgPermissionDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/admin/orm/query-builder.ts b/sdk/constructive-react/src/admin/orm/query-builder.ts index f2fd4566f..5abdd3372 100644 --- a/sdk/constructive-react/src/admin/orm/query-builder.ts +++ b/sdk/constructive-react/src/admin/orm/query-builder.ts @@ -293,8 +293,9 @@ export function buildFindFirstDocument( operationName: string, queryField: string, select: TSelect, - args: { where?: TWhere }, + args: { where?: TWhere; orderBy?: string[] }, filterTypeName: string, + orderByTypeName: string, connectionFieldsMap?: Record> ): { document: string; variables: Record } { const selections = select @@ -322,6 +323,16 @@ export function buildFindFirstDocument( queryArgs, variables ); + addVariable( + { + varName: 'orderBy', + typeName: '[' + orderByTypeName + '!]', + value: args.orderBy?.length ? args.orderBy : undefined, + }, + variableDefinitions, + queryArgs, + variables + ); const document = t.document({ definitions: [ diff --git a/sdk/constructive-react/src/admin/orm/select-types.ts b/sdk/constructive-react/src/admin/orm/select-types.ts index 2621b3570..9c1ec1ad2 100644 --- a/sdk/constructive-react/src/admin/orm/select-types.ts +++ b/sdk/constructive-react/src/admin/orm/select-types.ts @@ -27,9 +27,10 @@ export interface FindManyArgs { offset?: number; } -export interface FindFirstArgs { +export interface FindFirstArgs { select?: TSelect; where?: TWhere; + orderBy?: TOrderBy[]; } export interface CreateArgs { diff --git a/sdk/constructive-react/src/auth/hooks/queries/useAuditLogQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/useAuditLogQuery.ts index ccfe6231a..0fe853659 100644 --- a/sdk/constructive-react/src/auth/hooks/queries/useAuditLogQuery.ts +++ b/sdk/constructive-react/src/auth/hooks/queries/useAuditLogQuery.ts @@ -91,7 +91,7 @@ export async function fetchAuditLogQuery(params: { export async function fetchAuditLogQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .auditLog.findOne({ diff --git a/sdk/constructive-react/src/auth/hooks/queries/useCryptoAddressQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/useCryptoAddressQuery.ts index 71a5ea067..71147292e 100644 --- a/sdk/constructive-react/src/auth/hooks/queries/useCryptoAddressQuery.ts +++ b/sdk/constructive-react/src/auth/hooks/queries/useCryptoAddressQuery.ts @@ -91,7 +91,7 @@ export async function fetchCryptoAddressQuery(par export async function fetchCryptoAddressQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .cryptoAddress.findOne({ diff --git a/sdk/constructive-react/src/auth/hooks/queries/useEmailQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/useEmailQuery.ts index c8e881673..8b2b35334 100644 --- a/sdk/constructive-react/src/auth/hooks/queries/useEmailQuery.ts +++ b/sdk/constructive-react/src/auth/hooks/queries/useEmailQuery.ts @@ -91,7 +91,7 @@ export async function fetchEmailQuery(params: { export async function fetchEmailQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .email.findOne({ diff --git a/sdk/constructive-react/src/auth/hooks/queries/usePhoneNumberQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/usePhoneNumberQuery.ts index 80a507f4f..5e71658d7 100644 --- a/sdk/constructive-react/src/auth/hooks/queries/usePhoneNumberQuery.ts +++ b/sdk/constructive-react/src/auth/hooks/queries/usePhoneNumberQuery.ts @@ -91,7 +91,7 @@ export async function fetchPhoneNumberQuery(params: export async function fetchPhoneNumberQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .phoneNumber.findOne({ diff --git a/sdk/constructive-react/src/auth/hooks/queries/useRoleTypeQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/useRoleTypeQuery.ts index 6320e76b4..314085b87 100644 --- a/sdk/constructive-react/src/auth/hooks/queries/useRoleTypeQuery.ts +++ b/sdk/constructive-react/src/auth/hooks/queries/useRoleTypeQuery.ts @@ -91,7 +91,7 @@ export async function fetchRoleTypeQuery(params: { export async function fetchRoleTypeQuery(params: { id: number; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .roleType.findOne({ diff --git a/sdk/constructive-react/src/auth/hooks/queries/useUserConnectedAccountQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/useUserConnectedAccountQuery.ts index 1008f06ca..c904d6886 100644 --- a/sdk/constructive-react/src/auth/hooks/queries/useUserConnectedAccountQuery.ts +++ b/sdk/constructive-react/src/auth/hooks/queries/useUserConnectedAccountQuery.ts @@ -97,7 +97,7 @@ export async function fetchUserConnectedAccountQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .userConnectedAccount.findOne({ diff --git a/sdk/constructive-react/src/auth/hooks/queries/useUserQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/useUserQuery.ts index c6ca9d01b..03a7bb6bc 100644 --- a/sdk/constructive-react/src/auth/hooks/queries/useUserQuery.ts +++ b/sdk/constructive-react/src/auth/hooks/queries/useUserQuery.ts @@ -91,7 +91,7 @@ export async function fetchUserQuery(params: { export async function fetchUserQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .user.findOne({ diff --git a/sdk/constructive-react/src/auth/hooks/queries/useWebauthnCredentialQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/useWebauthnCredentialQuery.ts index 8041e139a..f1d55d52f 100644 --- a/sdk/constructive-react/src/auth/hooks/queries/useWebauthnCredentialQuery.ts +++ b/sdk/constructive-react/src/auth/hooks/queries/useWebauthnCredentialQuery.ts @@ -97,7 +97,7 @@ export async function fetchWebauthnCredentialQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .webauthnCredential.findOne({ diff --git a/sdk/constructive-react/src/auth/orm/models/auditLog.ts b/sdk/constructive-react/src/auth/orm/models/auditLog.ts index 2d388026d..8d8abc012 100644 --- a/sdk/constructive-react/src/auth/orm/models/auditLog.ts +++ b/sdk/constructive-react/src/auth/orm/models/auditLog.ts @@ -70,13 +70,11 @@ export class AuditLogModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - auditLogs: { - nodes: InferSelectResult[]; - }; + auditLog: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AuditLog', @@ -84,17 +82,26 @@ export class AuditLogModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AuditLogFilter', + 'AuditLogOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AuditLog', - fieldName: 'auditLogs', + fieldName: 'auditLog', document, variables, + transform: (data: { + auditLogs?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + auditLog: data.auditLogs?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/auth/orm/models/cryptoAddress.ts b/sdk/constructive-react/src/auth/orm/models/cryptoAddress.ts index 7357c0126..11914bd9d 100644 --- a/sdk/constructive-react/src/auth/orm/models/cryptoAddress.ts +++ b/sdk/constructive-react/src/auth/orm/models/cryptoAddress.ts @@ -70,13 +70,11 @@ export class CryptoAddressModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - cryptoAddresses: { - nodes: InferSelectResult[]; - }; + cryptoAddress: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'CryptoAddress', @@ -84,17 +82,26 @@ export class CryptoAddressModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CryptoAddressFilter', + 'CryptoAddressOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'CryptoAddress', - fieldName: 'cryptoAddresses', + fieldName: 'cryptoAddress', document, variables, + transform: (data: { + cryptoAddresses?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + cryptoAddress: data.cryptoAddresses?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/auth/orm/models/email.ts b/sdk/constructive-react/src/auth/orm/models/email.ts index aa83efc07..325475b9c 100644 --- a/sdk/constructive-react/src/auth/orm/models/email.ts +++ b/sdk/constructive-react/src/auth/orm/models/email.ts @@ -70,13 +70,11 @@ export class EmailModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - emails: { - nodes: InferSelectResult[]; - }; + email: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Email', @@ -84,17 +82,26 @@ export class EmailModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EmailFilter', + 'EmailOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Email', - fieldName: 'emails', + fieldName: 'email', document, variables, + transform: (data: { + emails?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + email: data.emails?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/auth/orm/models/identityProvider.ts b/sdk/constructive-react/src/auth/orm/models/identityProvider.ts index 9c9cfc0d9..cdc672145 100644 --- a/sdk/constructive-react/src/auth/orm/models/identityProvider.ts +++ b/sdk/constructive-react/src/auth/orm/models/identityProvider.ts @@ -70,13 +70,11 @@ export class IdentityProviderModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - identityProviders: { - nodes: InferSelectResult[]; - }; + identityProvider: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'IdentityProvider', @@ -84,17 +82,26 @@ export class IdentityProviderModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'IdentityProviderFilter', + 'IdentityProviderOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'IdentityProvider', - fieldName: 'identityProviders', + fieldName: 'identityProvider', document, variables, + transform: (data: { + identityProviders?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + identityProvider: data.identityProviders?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-react/src/auth/orm/models/phoneNumber.ts b/sdk/constructive-react/src/auth/orm/models/phoneNumber.ts index a711db272..0803908e2 100644 --- a/sdk/constructive-react/src/auth/orm/models/phoneNumber.ts +++ b/sdk/constructive-react/src/auth/orm/models/phoneNumber.ts @@ -70,13 +70,11 @@ export class PhoneNumberModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - phoneNumbers: { - nodes: InferSelectResult[]; - }; + phoneNumber: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PhoneNumber', @@ -84,17 +82,26 @@ export class PhoneNumberModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PhoneNumberFilter', + 'PhoneNumberOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PhoneNumber', - fieldName: 'phoneNumbers', + fieldName: 'phoneNumber', document, variables, + transform: (data: { + phoneNumbers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + phoneNumber: data.phoneNumbers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/auth/orm/models/roleType.ts b/sdk/constructive-react/src/auth/orm/models/roleType.ts index 5b258dc9a..8b256a0dc 100644 --- a/sdk/constructive-react/src/auth/orm/models/roleType.ts +++ b/sdk/constructive-react/src/auth/orm/models/roleType.ts @@ -70,13 +70,11 @@ export class RoleTypeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - roleTypes: { - nodes: InferSelectResult[]; - }; + roleType: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'RoleType', @@ -84,17 +82,26 @@ export class RoleTypeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RoleTypeFilter', + 'RoleTypeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'RoleType', - fieldName: 'roleTypes', + fieldName: 'roleType', document, variables, + transform: (data: { + roleTypes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + roleType: data.roleTypes?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/auth/orm/models/user.ts b/sdk/constructive-react/src/auth/orm/models/user.ts index aedd4fcc8..893581835 100644 --- a/sdk/constructive-react/src/auth/orm/models/user.ts +++ b/sdk/constructive-react/src/auth/orm/models/user.ts @@ -70,13 +70,11 @@ export class UserModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - users: { - nodes: InferSelectResult[]; - }; + user: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'User', @@ -84,17 +82,26 @@ export class UserModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UserFilter', + 'UserOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'User', - fieldName: 'users', + fieldName: 'user', document, variables, + transform: (data: { + users?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + user: data.users?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/auth/orm/models/userConnectedAccount.ts b/sdk/constructive-react/src/auth/orm/models/userConnectedAccount.ts index 45bbea7f4..a2344afdf 100644 --- a/sdk/constructive-react/src/auth/orm/models/userConnectedAccount.ts +++ b/sdk/constructive-react/src/auth/orm/models/userConnectedAccount.ts @@ -72,13 +72,11 @@ export class UserConnectedAccountModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - userConnectedAccounts: { - nodes: InferSelectResult[]; - }; + userConnectedAccount: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'UserConnectedAccount', @@ -86,17 +84,26 @@ export class UserConnectedAccountModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'UserConnectedAccount', - fieldName: 'userConnectedAccounts', + fieldName: 'userConnectedAccount', document, variables, + transform: (data: { + userConnectedAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userConnectedAccount: data.userConnectedAccounts?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/auth/orm/models/webauthnCredential.ts b/sdk/constructive-react/src/auth/orm/models/webauthnCredential.ts index f02cf10bc..cca4c75cf 100644 --- a/sdk/constructive-react/src/auth/orm/models/webauthnCredential.ts +++ b/sdk/constructive-react/src/auth/orm/models/webauthnCredential.ts @@ -70,13 +70,11 @@ export class WebauthnCredentialModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - webauthnCredentials: { - nodes: InferSelectResult[]; - }; + webauthnCredential: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'WebauthnCredential', @@ -84,17 +82,26 @@ export class WebauthnCredentialModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'WebauthnCredentialFilter', + 'WebauthnCredentialOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'WebauthnCredential', - fieldName: 'webauthnCredentials', + fieldName: 'webauthnCredential', document, variables, + transform: (data: { + webauthnCredentials?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + webauthnCredential: data.webauthnCredentials?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/auth/orm/query-builder.ts b/sdk/constructive-react/src/auth/orm/query-builder.ts index f2fd4566f..5abdd3372 100644 --- a/sdk/constructive-react/src/auth/orm/query-builder.ts +++ b/sdk/constructive-react/src/auth/orm/query-builder.ts @@ -293,8 +293,9 @@ export function buildFindFirstDocument( operationName: string, queryField: string, select: TSelect, - args: { where?: TWhere }, + args: { where?: TWhere; orderBy?: string[] }, filterTypeName: string, + orderByTypeName: string, connectionFieldsMap?: Record> ): { document: string; variables: Record } { const selections = select @@ -322,6 +323,16 @@ export function buildFindFirstDocument( queryArgs, variables ); + addVariable( + { + varName: 'orderBy', + typeName: '[' + orderByTypeName + '!]', + value: args.orderBy?.length ? args.orderBy : undefined, + }, + variableDefinitions, + queryArgs, + variables + ); const document = t.document({ definitions: [ diff --git a/sdk/constructive-react/src/auth/orm/select-types.ts b/sdk/constructive-react/src/auth/orm/select-types.ts index 2621b3570..9c1ec1ad2 100644 --- a/sdk/constructive-react/src/auth/orm/select-types.ts +++ b/sdk/constructive-react/src/auth/orm/select-types.ts @@ -27,9 +27,10 @@ export interface FindManyArgs { offset?: number; } -export interface FindFirstArgs { +export interface FindFirstArgs { select?: TSelect; where?: TWhere; + orderBy?: TOrderBy[]; } export interface CreateArgs { diff --git a/sdk/constructive-react/src/objects/hooks/queries/useCommitQuery.ts b/sdk/constructive-react/src/objects/hooks/queries/useCommitQuery.ts index d21281d4d..4a2de0f06 100644 --- a/sdk/constructive-react/src/objects/hooks/queries/useCommitQuery.ts +++ b/sdk/constructive-react/src/objects/hooks/queries/useCommitQuery.ts @@ -91,7 +91,7 @@ export async function fetchCommitQuery(params: { export async function fetchCommitQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .commit.findOne({ diff --git a/sdk/constructive-react/src/objects/hooks/queries/useObjectQuery.ts b/sdk/constructive-react/src/objects/hooks/queries/useObjectQuery.ts index a846ce36d..088612d28 100644 --- a/sdk/constructive-react/src/objects/hooks/queries/useObjectQuery.ts +++ b/sdk/constructive-react/src/objects/hooks/queries/useObjectQuery.ts @@ -91,7 +91,7 @@ export async function fetchObjectQuery(params: { export async function fetchObjectQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .object.findOne({ diff --git a/sdk/constructive-react/src/objects/hooks/queries/useRefQuery.ts b/sdk/constructive-react/src/objects/hooks/queries/useRefQuery.ts index 809602570..fd9571133 100644 --- a/sdk/constructive-react/src/objects/hooks/queries/useRefQuery.ts +++ b/sdk/constructive-react/src/objects/hooks/queries/useRefQuery.ts @@ -88,7 +88,10 @@ export async function fetchRefQuery(params: { }): Promise<{ ref: InferSelectResult | null; }>; -export async function fetchRefQuery(params: { id: string; selection: SelectionConfig }) { +export async function fetchRefQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .ref.findOne({ diff --git a/sdk/constructive-react/src/objects/hooks/queries/useStoreQuery.ts b/sdk/constructive-react/src/objects/hooks/queries/useStoreQuery.ts index 98966c63e..4002a74e1 100644 --- a/sdk/constructive-react/src/objects/hooks/queries/useStoreQuery.ts +++ b/sdk/constructive-react/src/objects/hooks/queries/useStoreQuery.ts @@ -91,7 +91,7 @@ export async function fetchStoreQuery(params: { export async function fetchStoreQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .store.findOne({ diff --git a/sdk/constructive-react/src/objects/orm/models/commit.ts b/sdk/constructive-react/src/objects/orm/models/commit.ts index de0e94710..70f5c5960 100644 --- a/sdk/constructive-react/src/objects/orm/models/commit.ts +++ b/sdk/constructive-react/src/objects/orm/models/commit.ts @@ -70,13 +70,11 @@ export class CommitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - commits: { - nodes: InferSelectResult[]; - }; + commit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Commit', @@ -84,17 +82,26 @@ export class CommitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CommitFilter', + 'CommitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Commit', - fieldName: 'commits', + fieldName: 'commit', document, variables, + transform: (data: { + commits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + commit: data.commits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/objects/orm/models/getAllRecord.ts b/sdk/constructive-react/src/objects/orm/models/getAllRecord.ts index 53873a0f3..39a82fbbb 100644 --- a/sdk/constructive-react/src/objects/orm/models/getAllRecord.ts +++ b/sdk/constructive-react/src/objects/orm/models/getAllRecord.ts @@ -70,13 +70,11 @@ export class GetAllRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - getAll: { - nodes: InferSelectResult[]; - }; + getAllRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'GetAllRecord', @@ -84,17 +82,26 @@ export class GetAllRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'GetAllRecordFilter', + 'GetAllRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'GetAllRecord', - fieldName: 'getAll', + fieldName: 'getAllRecord', document, variables, + transform: (data: { + getAll?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + getAllRecord: data.getAll?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-react/src/objects/orm/models/object.ts b/sdk/constructive-react/src/objects/orm/models/object.ts index 085bdd4df..8a685b1df 100644 --- a/sdk/constructive-react/src/objects/orm/models/object.ts +++ b/sdk/constructive-react/src/objects/orm/models/object.ts @@ -70,13 +70,11 @@ export class ObjectModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - objects: { - nodes: InferSelectResult[]; - }; + object: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Object', @@ -84,17 +82,26 @@ export class ObjectModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ObjectFilter', + 'ObjectOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Object', - fieldName: 'objects', + fieldName: 'object', document, variables, + transform: (data: { + objects?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + object: data.objects?.nodes?.[0] ?? null, + }), }); } findOne( @@ -103,7 +110,7 @@ export class ObjectModel { select: S; } & StrictSelect ): QueryBuilder<{ - getNodeAtPath: InferSelectResult | null; + object: InferSelectResult | null; }> { const { document, variables } = buildFindOneDocument( 'Object', @@ -118,7 +125,7 @@ export class ObjectModel { client: this.client, operation: 'query', operationName: 'Object', - fieldName: 'getNodeAtPath', + fieldName: 'object', document, variables, }); diff --git a/sdk/constructive-react/src/objects/orm/models/ref.ts b/sdk/constructive-react/src/objects/orm/models/ref.ts index 016c70644..5c3419d89 100644 --- a/sdk/constructive-react/src/objects/orm/models/ref.ts +++ b/sdk/constructive-react/src/objects/orm/models/ref.ts @@ -70,13 +70,11 @@ export class RefModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - refs: { - nodes: InferSelectResult[]; - }; + ref: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Ref', @@ -84,17 +82,26 @@ export class RefModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RefFilter', + 'RefOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Ref', - fieldName: 'refs', + fieldName: 'ref', document, variables, + transform: (data: { + refs?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + ref: data.refs?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/objects/orm/models/store.ts b/sdk/constructive-react/src/objects/orm/models/store.ts index f249ee921..f80e63890 100644 --- a/sdk/constructive-react/src/objects/orm/models/store.ts +++ b/sdk/constructive-react/src/objects/orm/models/store.ts @@ -70,13 +70,11 @@ export class StoreModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - stores: { - nodes: InferSelectResult[]; - }; + store: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Store', @@ -84,17 +82,26 @@ export class StoreModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'StoreFilter', + 'StoreOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Store', - fieldName: 'stores', + fieldName: 'store', document, variables, + transform: (data: { + stores?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + store: data.stores?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/objects/orm/query-builder.ts b/sdk/constructive-react/src/objects/orm/query-builder.ts index f2fd4566f..5abdd3372 100644 --- a/sdk/constructive-react/src/objects/orm/query-builder.ts +++ b/sdk/constructive-react/src/objects/orm/query-builder.ts @@ -293,8 +293,9 @@ export function buildFindFirstDocument( operationName: string, queryField: string, select: TSelect, - args: { where?: TWhere }, + args: { where?: TWhere; orderBy?: string[] }, filterTypeName: string, + orderByTypeName: string, connectionFieldsMap?: Record> ): { document: string; variables: Record } { const selections = select @@ -322,6 +323,16 @@ export function buildFindFirstDocument( queryArgs, variables ); + addVariable( + { + varName: 'orderBy', + typeName: '[' + orderByTypeName + '!]', + value: args.orderBy?.length ? args.orderBy : undefined, + }, + variableDefinitions, + queryArgs, + variables + ); const document = t.document({ definitions: [ diff --git a/sdk/constructive-react/src/objects/orm/select-types.ts b/sdk/constructive-react/src/objects/orm/select-types.ts index 2621b3570..9c1ec1ad2 100644 --- a/sdk/constructive-react/src/objects/orm/select-types.ts +++ b/sdk/constructive-react/src/objects/orm/select-types.ts @@ -27,9 +27,10 @@ export interface FindManyArgs { offset?: number; } -export interface FindFirstArgs { +export interface FindFirstArgs { select?: TSelect; where?: TWhere; + orderBy?: TOrderBy[]; } export interface CreateArgs { diff --git a/sdk/constructive-react/src/public/hooks/queries/useAgentMessageQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAgentMessageQuery.ts index 43b045d23..2261588aa 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAgentMessageQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAgentMessageQuery.ts @@ -91,7 +91,7 @@ export async function fetchAgentMessageQuery(param export async function fetchAgentMessageQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .agentMessage.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAgentTaskQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAgentTaskQuery.ts index d75722785..32c667e3a 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAgentTaskQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAgentTaskQuery.ts @@ -91,7 +91,7 @@ export async function fetchAgentTaskQuery(params: { export async function fetchAgentTaskQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .agentTask.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAgentThreadQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAgentThreadQuery.ts index d044abf8d..583f503a8 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAgentThreadQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAgentThreadQuery.ts @@ -91,7 +91,7 @@ export async function fetchAgentThreadQuery(params: export async function fetchAgentThreadQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .agentThread.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useApiModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useApiModuleQuery.ts index d8ac6f281..1b8d9d34b 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useApiModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useApiModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchApiModuleQuery(params: { export async function fetchApiModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .apiModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useApiQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useApiQuery.ts index 1ccc623da..fb4402d6c 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useApiQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useApiQuery.ts @@ -88,7 +88,10 @@ export async function fetchApiQuery(params: { }): Promise<{ api: InferSelectResult | null; }>; -export async function fetchApiQuery(params: { id: string; selection: SelectionConfig }) { +export async function fetchApiQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .api.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useApiSchemaQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useApiSchemaQuery.ts index e0144dad2..9c086925f 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useApiSchemaQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useApiSchemaQuery.ts @@ -91,7 +91,7 @@ export async function fetchApiSchemaQuery(params: { export async function fetchApiSchemaQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .apiSchema.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAppAchievementQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAppAchievementQuery.ts index c7750c259..891db94c4 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAppAchievementQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAppAchievementQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppAchievementQuery(p export async function fetchAppAchievementQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appAchievement.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAppAdminGrantQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAppAdminGrantQuery.ts index dab440873..8cf929a7e 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAppAdminGrantQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAppAdminGrantQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppAdminGrantQuery(par export async function fetchAppAdminGrantQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appAdminGrant.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAppClaimedInviteQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAppClaimedInviteQuery.ts index d639d7374..51d1c60d2 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAppClaimedInviteQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAppClaimedInviteQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppClaimedInviteQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appClaimedInvite.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAppGrantQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAppGrantQuery.ts index 41777becd..a7a5d3304 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAppGrantQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAppGrantQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppGrantQuery(params: { export async function fetchAppGrantQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appGrant.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAppInviteQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAppInviteQuery.ts index 366128495..3a9293c3e 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAppInviteQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAppInviteQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppInviteQuery(params: { export async function fetchAppInviteQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appInvite.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAppLevelQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAppLevelQuery.ts index 2d947f33f..7458afb09 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAppLevelQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAppLevelQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppLevelQuery(params: { export async function fetchAppLevelQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appLevel.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAppLevelRequirementQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAppLevelRequirementQuery.ts index c446092be..1ff58327f 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAppLevelRequirementQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAppLevelRequirementQuery.ts @@ -97,7 +97,7 @@ export async function fetchAppLevelRequirementQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appLevelRequirement.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAppLimitDefaultQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAppLimitDefaultQuery.ts index 3f9e92b4c..4f4786638 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAppLimitDefaultQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAppLimitDefaultQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppLimitDefaultQuery export async function fetchAppLimitDefaultQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appLimitDefault.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAppLimitQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAppLimitQuery.ts index 92f7ca2ab..178e4553a 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAppLimitQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAppLimitQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppLimitQuery(params: { export async function fetchAppLimitQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appLimit.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAppMembershipDefaultQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAppMembershipDefaultQuery.ts index 7cf34e91a..85b8b0dcb 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAppMembershipDefaultQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAppMembershipDefaultQuery.ts @@ -97,7 +97,7 @@ export async function fetchAppMembershipDefaultQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appMembershipDefault.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAppMembershipQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAppMembershipQuery.ts index 47a401be2..53a941d1a 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAppMembershipQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAppMembershipQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppMembershipQuery(par export async function fetchAppMembershipQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appMembership.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAppOwnerGrantQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAppOwnerGrantQuery.ts index 98a75b276..a26148bca 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAppOwnerGrantQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAppOwnerGrantQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppOwnerGrantQuery(par export async function fetchAppOwnerGrantQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appOwnerGrant.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAppPermissionDefaultQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAppPermissionDefaultQuery.ts index 27e973c84..d7c76c2a3 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAppPermissionDefaultQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAppPermissionDefaultQuery.ts @@ -97,7 +97,7 @@ export async function fetchAppPermissionDefaultQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appPermissionDefault.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAppPermissionQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAppPermissionQuery.ts index a71c93422..b89353ec6 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAppPermissionQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAppPermissionQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppPermissionQuery(par export async function fetchAppPermissionQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appPermission.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAppQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAppQuery.ts index b01e48183..c955d089b 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAppQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAppQuery.ts @@ -88,7 +88,10 @@ export async function fetchAppQuery(params: { }): Promise<{ app: InferSelectResult | null; }>; -export async function fetchAppQuery(params: { id: string; selection: SelectionConfig }) { +export async function fetchAppQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .app.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAppStepQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAppStepQuery.ts index 5d3ebbbd0..c24230f27 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAppStepQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAppStepQuery.ts @@ -91,7 +91,7 @@ export async function fetchAppStepQuery(params: { export async function fetchAppStepQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .appStep.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAstMigrationQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAstMigrationQuery.ts index 7360593a5..ef2c2a95e 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAstMigrationQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAstMigrationQuery.ts @@ -91,7 +91,7 @@ export async function fetchAstMigrationQuery(param export async function fetchAstMigrationQuery(params: { id: number; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .astMigration.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useAuditLogQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useAuditLogQuery.ts index ccfe6231a..0fe853659 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useAuditLogQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useAuditLogQuery.ts @@ -91,7 +91,7 @@ export async function fetchAuditLogQuery(params: { export async function fetchAuditLogQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .auditLog.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useBillingModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useBillingModuleQuery.ts index 3a1aa4c11..5a8d1b156 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useBillingModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useBillingModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchBillingModuleQuery(par export async function fetchBillingModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .billingModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useBlueprintConstructionQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useBlueprintConstructionQuery.ts index 49fe783d0..b4c286d3d 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useBlueprintConstructionQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useBlueprintConstructionQuery.ts @@ -99,7 +99,7 @@ export async function fetchBlueprintConstructionQuery< export async function fetchBlueprintConstructionQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .blueprintConstruction.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useBlueprintQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useBlueprintQuery.ts index 2c11902be..31f820d61 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useBlueprintQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useBlueprintQuery.ts @@ -91,7 +91,7 @@ export async function fetchBlueprintQuery(params: { export async function fetchBlueprintQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .blueprint.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useBlueprintTemplateQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useBlueprintTemplateQuery.ts index 469aa8a83..e4e88528d 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useBlueprintTemplateQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useBlueprintTemplateQuery.ts @@ -97,7 +97,7 @@ export async function fetchBlueprintTemplateQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .blueprintTemplate.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useCheckConstraintQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useCheckConstraintQuery.ts index daedfa56d..009bb1d0c 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useCheckConstraintQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useCheckConstraintQuery.ts @@ -91,7 +91,7 @@ export async function fetchCheckConstraintQuery export async function fetchCheckConstraintQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .checkConstraint.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useCommitQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useCommitQuery.ts index d21281d4d..4a2de0f06 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useCommitQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useCommitQuery.ts @@ -91,7 +91,7 @@ export async function fetchCommitQuery(params: { export async function fetchCommitQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .commit.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useConnectedAccountsModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useConnectedAccountsModuleQuery.ts index da1221e42..fc4763332 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useConnectedAccountsModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useConnectedAccountsModuleQuery.ts @@ -99,7 +99,7 @@ export async function fetchConnectedAccountsModuleQuery< export async function fetchConnectedAccountsModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .connectedAccountsModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useCryptoAddressQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useCryptoAddressQuery.ts index 71a5ea067..71147292e 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useCryptoAddressQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useCryptoAddressQuery.ts @@ -91,7 +91,7 @@ export async function fetchCryptoAddressQuery(par export async function fetchCryptoAddressQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .cryptoAddress.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useCryptoAddressesModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useCryptoAddressesModuleQuery.ts index 941500402..da6c9e19a 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useCryptoAddressesModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useCryptoAddressesModuleQuery.ts @@ -99,7 +99,7 @@ export async function fetchCryptoAddressesModuleQuery< export async function fetchCryptoAddressesModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .cryptoAddressesModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useCryptoAuthModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useCryptoAuthModuleQuery.ts index 48e2b561b..b9f349d2e 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useCryptoAuthModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useCryptoAuthModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchCryptoAuthModuleQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .cryptoAuthModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useDatabaseProvisionModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useDatabaseProvisionModuleQuery.ts index 394ec3ab8..24a9d16a8 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useDatabaseProvisionModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useDatabaseProvisionModuleQuery.ts @@ -99,7 +99,7 @@ export async function fetchDatabaseProvisionModuleQuery< export async function fetchDatabaseProvisionModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .databaseProvisionModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useDatabaseQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useDatabaseQuery.ts index 79fc769b6..011c281d8 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useDatabaseQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useDatabaseQuery.ts @@ -91,7 +91,7 @@ export async function fetchDatabaseQuery(params: { export async function fetchDatabaseQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .database.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useDatabaseTransferQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useDatabaseTransferQuery.ts index 67dbacc3f..483eb6fdb 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useDatabaseTransferQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useDatabaseTransferQuery.ts @@ -91,7 +91,7 @@ export async function fetchDatabaseTransferQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .databaseTransfer.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useDefaultIdsModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useDefaultIdsModuleQuery.ts index ef5f72f46..bb3a92af7 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useDefaultIdsModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useDefaultIdsModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchDefaultIdsModuleQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .defaultIdsModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useDefaultPrivilegeQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useDefaultPrivilegeQuery.ts index ab0b868fe..c2649d9f1 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useDefaultPrivilegeQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useDefaultPrivilegeQuery.ts @@ -91,7 +91,7 @@ export async function fetchDefaultPrivilegeQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .defaultPrivilege.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useDenormalizedTableFieldQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useDenormalizedTableFieldQuery.ts index e5603b4cc..5ce724eff 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useDenormalizedTableFieldQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useDenormalizedTableFieldQuery.ts @@ -99,7 +99,7 @@ export async function fetchDenormalizedTableFieldQuery< export async function fetchDenormalizedTableFieldQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .denormalizedTableField.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useDevicesModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useDevicesModuleQuery.ts index a33999871..985152afe 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useDevicesModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useDevicesModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchDevicesModuleQuery(par export async function fetchDevicesModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .devicesModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useDomainQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useDomainQuery.ts index 036e59edd..3db398f14 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useDomainQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useDomainQuery.ts @@ -91,7 +91,7 @@ export async function fetchDomainQuery(params: { export async function fetchDomainQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .domain.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useEmailQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useEmailQuery.ts index c8e881673..8b2b35334 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useEmailQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useEmailQuery.ts @@ -91,7 +91,7 @@ export async function fetchEmailQuery(params: { export async function fetchEmailQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .email.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useEmailsModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useEmailsModuleQuery.ts index 8a20f5371..0364c76dc 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useEmailsModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useEmailsModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchEmailsModuleQuery(param export async function fetchEmailsModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .emailsModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useEmbeddingChunkQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useEmbeddingChunkQuery.ts index 3832d3c67..b6c192326 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useEmbeddingChunkQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useEmbeddingChunkQuery.ts @@ -91,7 +91,7 @@ export async function fetchEmbeddingChunkQuery(p export async function fetchEmbeddingChunkQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .embeddingChunk.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useEncryptedSecretsModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useEncryptedSecretsModuleQuery.ts index 82f923374..5bc441bb7 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useEncryptedSecretsModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useEncryptedSecretsModuleQuery.ts @@ -99,7 +99,7 @@ export async function fetchEncryptedSecretsModuleQuery< export async function fetchEncryptedSecretsModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .encryptedSecretsModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useEntityTypeProvisionQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useEntityTypeProvisionQuery.ts index 8f3eceb28..5021910e2 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useEntityTypeProvisionQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useEntityTypeProvisionQuery.ts @@ -118,7 +118,7 @@ export async function fetchEntityTypeProvisionQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .entityTypeProvision.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useEnumQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useEnumQuery.ts index 1b36d0eaf..f600ed320 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useEnumQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useEnumQuery.ts @@ -91,7 +91,7 @@ export async function fetchEnumQuery(params: { export async function fetchEnumQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .enum.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useFieldQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useFieldQuery.ts index 3227d14eb..c76c82d94 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useFieldQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useFieldQuery.ts @@ -91,7 +91,7 @@ export async function fetchFieldQuery(params: { export async function fetchFieldQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .field.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useForeignKeyConstraintQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useForeignKeyConstraintQuery.ts index 54dc67c50..8f57a2aa7 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useForeignKeyConstraintQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useForeignKeyConstraintQuery.ts @@ -97,7 +97,7 @@ export async function fetchForeignKeyConstraintQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .foreignKeyConstraint.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useFullTextSearchQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useFullTextSearchQuery.ts index 2f1b7d54d..7a2c74b13 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useFullTextSearchQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useFullTextSearchQuery.ts @@ -91,7 +91,7 @@ export async function fetchFullTextSearchQuery(p export async function fetchFullTextSearchQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .fullTextSearch.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useHierarchyModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useHierarchyModuleQuery.ts index f391086c7..40a523ade 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useHierarchyModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useHierarchyModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchHierarchyModuleQuery export async function fetchHierarchyModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .hierarchyModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useIdentityProvidersModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useIdentityProvidersModuleQuery.ts index 0245dc10c..da552bdbc 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useIdentityProvidersModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useIdentityProvidersModuleQuery.ts @@ -99,7 +99,7 @@ export async function fetchIdentityProvidersModuleQuery< export async function fetchIdentityProvidersModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .identityProvidersModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useIndexQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useIndexQuery.ts index c0bc193ca..7feeda908 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useIndexQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useIndexQuery.ts @@ -91,7 +91,7 @@ export async function fetchIndexQuery(params: { export async function fetchIndexQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .index.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useInvitesModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useInvitesModuleQuery.ts index 8fac4ad30..4018ec282 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useInvitesModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useInvitesModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchInvitesModuleQuery(par export async function fetchInvitesModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .invitesModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useLevelsModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useLevelsModuleQuery.ts index 8088cff8f..6ce7143f4 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useLevelsModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useLevelsModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchLevelsModuleQuery(param export async function fetchLevelsModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .levelsModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useLimitsModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useLimitsModuleQuery.ts index e11b2489e..deae8ef36 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useLimitsModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useLimitsModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchLimitsModuleQuery(param export async function fetchLimitsModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .limitsModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useMembershipTypeQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useMembershipTypeQuery.ts index 71fdd8b77..e41a27d95 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useMembershipTypeQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useMembershipTypeQuery.ts @@ -91,7 +91,7 @@ export async function fetchMembershipTypeQuery(p export async function fetchMembershipTypeQuery(params: { id: number; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .membershipType.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useMembershipTypesModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useMembershipTypesModuleQuery.ts index 239bb6ee9..58e4846a8 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useMembershipTypesModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useMembershipTypesModuleQuery.ts @@ -99,7 +99,7 @@ export async function fetchMembershipTypesModuleQuery< export async function fetchMembershipTypesModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .membershipTypesModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useMembershipsModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useMembershipsModuleQuery.ts index dec53546c..8dbaa2829 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useMembershipsModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useMembershipsModuleQuery.ts @@ -97,7 +97,7 @@ export async function fetchMembershipsModuleQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .membershipsModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useMigrateFileQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useMigrateFileQuery.ts index 8d016a3f2..432e2972b 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useMigrateFileQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useMigrateFileQuery.ts @@ -91,7 +91,7 @@ export async function fetchMigrateFileQuery(params: export async function fetchMigrateFileQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .migrateFile.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useNodeTypeRegistryQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useNodeTypeRegistryQuery.ts index ed4f7659b..082c1bada 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useNodeTypeRegistryQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useNodeTypeRegistryQuery.ts @@ -91,7 +91,7 @@ export async function fetchNodeTypeRegistryQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .nodeTypeRegistry.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useNotificationsModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useNotificationsModuleQuery.ts index 6d5d3f03d..c43c6203a 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useNotificationsModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useNotificationsModuleQuery.ts @@ -97,7 +97,7 @@ export async function fetchNotificationsModuleQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .notificationsModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useObjectQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useObjectQuery.ts index a846ce36d..088612d28 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useObjectQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useObjectQuery.ts @@ -91,7 +91,7 @@ export async function fetchObjectQuery(params: { export async function fetchObjectQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .object.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgAdminGrantQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgAdminGrantQuery.ts index 04901b7da..468412a98 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useOrgAdminGrantQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgAdminGrantQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgAdminGrantQuery(par export async function fetchOrgAdminGrantQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgAdminGrant.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgChartEdgeGrantQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgChartEdgeGrantQuery.ts index 576725d54..c367a5c77 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useOrgChartEdgeGrantQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgChartEdgeGrantQuery.ts @@ -97,7 +97,7 @@ export async function fetchOrgChartEdgeGrantQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgChartEdgeGrant.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgChartEdgeQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgChartEdgeQuery.ts index 9087f1620..fac39e2eb 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useOrgChartEdgeQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgChartEdgeQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgChartEdgeQuery(param export async function fetchOrgChartEdgeQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgChartEdge.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgClaimedInviteQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgClaimedInviteQuery.ts index 19223fbe3..bd0fcdb37 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useOrgClaimedInviteQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgClaimedInviteQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgClaimedInviteQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgClaimedInvite.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgGrantQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgGrantQuery.ts index cd04f290e..3d02f5cd4 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useOrgGrantQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgGrantQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgGrantQuery(params: { export async function fetchOrgGrantQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgGrant.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgInviteQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgInviteQuery.ts index 244288aa7..bf720507b 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useOrgInviteQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgInviteQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgInviteQuery(params: { export async function fetchOrgInviteQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgInvite.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgLimitAggregateQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgLimitAggregateQuery.ts index c2b56b3d0..efe5a4a53 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useOrgLimitAggregateQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgLimitAggregateQuery.ts @@ -97,7 +97,7 @@ export async function fetchOrgLimitAggregateQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgLimitAggregate.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgLimitDefaultQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgLimitDefaultQuery.ts index 4c0eff29a..4e9bd8585 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useOrgLimitDefaultQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgLimitDefaultQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgLimitDefaultQuery export async function fetchOrgLimitDefaultQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgLimitDefault.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgLimitQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgLimitQuery.ts index a63b11f53..6c03f817f 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useOrgLimitQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgLimitQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgLimitQuery(params: { export async function fetchOrgLimitQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgLimit.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgMemberProfileQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgMemberProfileQuery.ts index 6ad525e09..591bab676 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useOrgMemberProfileQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgMemberProfileQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgMemberProfileQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgMemberProfile.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgMemberQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgMemberQuery.ts index e8cbfeaa0..d222cf6e2 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useOrgMemberQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgMemberQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgMemberQuery(params: { export async function fetchOrgMemberQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgMember.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgMembershipDefaultQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgMembershipDefaultQuery.ts index bff51e2a0..b142d79be 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useOrgMembershipDefaultQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgMembershipDefaultQuery.ts @@ -97,7 +97,7 @@ export async function fetchOrgMembershipDefaultQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgMembershipDefault.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgMembershipQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgMembershipQuery.ts index 945adf98d..c251c5b23 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useOrgMembershipQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgMembershipQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgMembershipQuery(par export async function fetchOrgMembershipQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgMembership.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgMembershipSettingQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgMembershipSettingQuery.ts index 7e74cc9c1..1e3f0d167 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useOrgMembershipSettingQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgMembershipSettingQuery.ts @@ -97,7 +97,7 @@ export async function fetchOrgMembershipSettingQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgMembershipSetting.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgOwnerGrantQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgOwnerGrantQuery.ts index ad6a4b4ba..a7c0bc4dd 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useOrgOwnerGrantQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgOwnerGrantQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgOwnerGrantQuery(par export async function fetchOrgOwnerGrantQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgOwnerGrant.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgPermissionDefaultQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgPermissionDefaultQuery.ts index e1e71f5fc..9dc118fc7 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useOrgPermissionDefaultQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgPermissionDefaultQuery.ts @@ -97,7 +97,7 @@ export async function fetchOrgPermissionDefaultQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgPermissionDefault.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgPermissionQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgPermissionQuery.ts index fcee408e9..4407aaedd 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useOrgPermissionQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgPermissionQuery.ts @@ -91,7 +91,7 @@ export async function fetchOrgPermissionQuery(par export async function fetchOrgPermissionQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .orgPermission.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/usePermissionsModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/usePermissionsModuleQuery.ts index 736736bbe..5c5a95139 100644 --- a/sdk/constructive-react/src/public/hooks/queries/usePermissionsModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/usePermissionsModuleQuery.ts @@ -97,7 +97,7 @@ export async function fetchPermissionsModuleQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .permissionsModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/usePhoneNumberQuery.ts b/sdk/constructive-react/src/public/hooks/queries/usePhoneNumberQuery.ts index 80a507f4f..5e71658d7 100644 --- a/sdk/constructive-react/src/public/hooks/queries/usePhoneNumberQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/usePhoneNumberQuery.ts @@ -91,7 +91,7 @@ export async function fetchPhoneNumberQuery(params: export async function fetchPhoneNumberQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .phoneNumber.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/usePhoneNumbersModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/usePhoneNumbersModuleQuery.ts index e92d5458d..302e6ede9 100644 --- a/sdk/constructive-react/src/public/hooks/queries/usePhoneNumbersModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/usePhoneNumbersModuleQuery.ts @@ -97,7 +97,7 @@ export async function fetchPhoneNumbersModuleQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .phoneNumbersModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/usePlansModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/usePlansModuleQuery.ts index 7c3f926e8..72ca725d6 100644 --- a/sdk/constructive-react/src/public/hooks/queries/usePlansModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/usePlansModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchPlansModuleQuery(params: export async function fetchPlansModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .plansModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/usePolicyQuery.ts b/sdk/constructive-react/src/public/hooks/queries/usePolicyQuery.ts index b2639d62f..f29abbd30 100644 --- a/sdk/constructive-react/src/public/hooks/queries/usePolicyQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/usePolicyQuery.ts @@ -91,7 +91,7 @@ export async function fetchPolicyQuery(params: { export async function fetchPolicyQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .policy.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/usePrimaryKeyConstraintQuery.ts b/sdk/constructive-react/src/public/hooks/queries/usePrimaryKeyConstraintQuery.ts index 5176f8f9f..4de5ac1f6 100644 --- a/sdk/constructive-react/src/public/hooks/queries/usePrimaryKeyConstraintQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/usePrimaryKeyConstraintQuery.ts @@ -97,7 +97,7 @@ export async function fetchPrimaryKeyConstraintQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .primaryKeyConstraint.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useProfilesModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useProfilesModuleQuery.ts index 1a19cd9f5..84ca4805a 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useProfilesModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useProfilesModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchProfilesModuleQuery(p export async function fetchProfilesModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .profilesModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useRateLimitsModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useRateLimitsModuleQuery.ts index 0878c70a0..90ebc3458 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useRateLimitsModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useRateLimitsModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchRateLimitsModuleQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .rateLimitsModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useRefQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useRefQuery.ts index 809602570..fd9571133 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useRefQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useRefQuery.ts @@ -88,7 +88,10 @@ export async function fetchRefQuery(params: { }): Promise<{ ref: InferSelectResult | null; }>; -export async function fetchRefQuery(params: { id: string; selection: SelectionConfig }) { +export async function fetchRefQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .ref.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useRelationProvisionQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useRelationProvisionQuery.ts index e2fb67d34..c0c060af9 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useRelationProvisionQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useRelationProvisionQuery.ts @@ -118,7 +118,7 @@ export async function fetchRelationProvisionQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .relationProvision.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useRlsModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useRlsModuleQuery.ts index de4ac49a2..8ea9892d5 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useRlsModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useRlsModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchRlsModuleQuery(params: { export async function fetchRlsModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .rlsModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useRoleTypeQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useRoleTypeQuery.ts index 6320e76b4..314085b87 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useRoleTypeQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useRoleTypeQuery.ts @@ -91,7 +91,7 @@ export async function fetchRoleTypeQuery(params: { export async function fetchRoleTypeQuery(params: { id: number; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .roleType.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useSchemaGrantQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useSchemaGrantQuery.ts index 864c914a5..b7f55b286 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useSchemaGrantQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useSchemaGrantQuery.ts @@ -91,7 +91,7 @@ export async function fetchSchemaGrantQuery(params: export async function fetchSchemaGrantQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .schemaGrant.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useSchemaQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useSchemaQuery.ts index d49b168e0..0d5d77bb9 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useSchemaQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useSchemaQuery.ts @@ -91,7 +91,7 @@ export async function fetchSchemaQuery(params: { export async function fetchSchemaQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .schema.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useSecretsModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useSecretsModuleQuery.ts index 7c5e20f5e..a3d94fa6a 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useSecretsModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useSecretsModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchSecretsModuleQuery(par export async function fetchSecretsModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .secretsModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useSecureTableProvisionQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useSecureTableProvisionQuery.ts index 771d1abb9..53e81e59e 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useSecureTableProvisionQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useSecureTableProvisionQuery.ts @@ -97,7 +97,7 @@ export async function fetchSecureTableProvisionQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .secureTableProvision.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useSessionSecretsModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useSessionSecretsModuleQuery.ts index 67d69d950..76ffb4f90 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useSessionSecretsModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useSessionSecretsModuleQuery.ts @@ -97,7 +97,7 @@ export async function fetchSessionSecretsModuleQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .sessionSecretsModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useSessionsModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useSessionsModuleQuery.ts index db794bac8..90c32a14f 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useSessionsModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useSessionsModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchSessionsModuleQuery(p export async function fetchSessionsModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .sessionsModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useSiteMetadatumQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useSiteMetadatumQuery.ts index 3eb273aa7..5556a540f 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useSiteMetadatumQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useSiteMetadatumQuery.ts @@ -91,7 +91,7 @@ export async function fetchSiteMetadatumQuery(par export async function fetchSiteMetadatumQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .siteMetadatum.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useSiteModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useSiteModuleQuery.ts index e820d658b..6f454997b 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useSiteModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useSiteModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchSiteModuleQuery(params: { export async function fetchSiteModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .siteModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useSiteQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useSiteQuery.ts index 32643a7a5..7f0e9958c 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useSiteQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useSiteQuery.ts @@ -91,7 +91,7 @@ export async function fetchSiteQuery(params: { export async function fetchSiteQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .site.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useSiteThemeQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useSiteThemeQuery.ts index ac6a1e774..163bee3b6 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useSiteThemeQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useSiteThemeQuery.ts @@ -91,7 +91,7 @@ export async function fetchSiteThemeQuery(params: { export async function fetchSiteThemeQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .siteTheme.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useSpatialRelationQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useSpatialRelationQuery.ts index ae4ce4e89..3c16e8148 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useSpatialRelationQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useSpatialRelationQuery.ts @@ -91,7 +91,7 @@ export async function fetchSpatialRelationQuery export async function fetchSpatialRelationQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .spatialRelation.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useSqlActionQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useSqlActionQuery.ts index 736f2f122..8ca9fab57 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useSqlActionQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useSqlActionQuery.ts @@ -91,7 +91,7 @@ export async function fetchSqlActionQuery(params: { export async function fetchSqlActionQuery(params: { id: number; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .sqlAction.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useStorageModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useStorageModuleQuery.ts index 11e586028..15929937b 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useStorageModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useStorageModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchStorageModuleQuery(par export async function fetchStorageModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .storageModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useStoreQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useStoreQuery.ts index 98966c63e..4002a74e1 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useStoreQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useStoreQuery.ts @@ -91,7 +91,7 @@ export async function fetchStoreQuery(params: { export async function fetchStoreQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .store.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useTableGrantQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useTableGrantQuery.ts index 0940428e0..1214ca612 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useTableGrantQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useTableGrantQuery.ts @@ -91,7 +91,7 @@ export async function fetchTableGrantQuery(params: { export async function fetchTableGrantQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .tableGrant.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useTableQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useTableQuery.ts index b75a69c2e..3ead8b326 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useTableQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useTableQuery.ts @@ -91,7 +91,7 @@ export async function fetchTableQuery(params: { export async function fetchTableQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .table.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useTriggerFunctionQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useTriggerFunctionQuery.ts index ba894e2c5..eadd5cd41 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useTriggerFunctionQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useTriggerFunctionQuery.ts @@ -91,7 +91,7 @@ export async function fetchTriggerFunctionQuery export async function fetchTriggerFunctionQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .triggerFunction.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useTriggerQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useTriggerQuery.ts index 82cf9049c..92d6ea2b5 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useTriggerQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useTriggerQuery.ts @@ -91,7 +91,7 @@ export async function fetchTriggerQuery(params: { export async function fetchTriggerQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .trigger.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useUniqueConstraintQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useUniqueConstraintQuery.ts index 314e83cd9..15552fe22 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useUniqueConstraintQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useUniqueConstraintQuery.ts @@ -91,7 +91,7 @@ export async function fetchUniqueConstraintQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .uniqueConstraint.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useUserAuthModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useUserAuthModuleQuery.ts index 1424b66da..008ca0934 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useUserAuthModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useUserAuthModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchUserAuthModuleQuery(p export async function fetchUserAuthModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .userAuthModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useUserConnectedAccountQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useUserConnectedAccountQuery.ts index 1008f06ca..c904d6886 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useUserConnectedAccountQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useUserConnectedAccountQuery.ts @@ -97,7 +97,7 @@ export async function fetchUserConnectedAccountQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .userConnectedAccount.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useUserQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useUserQuery.ts index c6ca9d01b..03a7bb6bc 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useUserQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useUserQuery.ts @@ -91,7 +91,7 @@ export async function fetchUserQuery(params: { export async function fetchUserQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .user.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useUsersModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useUsersModuleQuery.ts index 4bd5bc0f0..528470c43 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useUsersModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useUsersModuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchUsersModuleQuery(params: export async function fetchUsersModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .usersModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useViewGrantQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useViewGrantQuery.ts index bc65e83c2..6a75ed80c 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useViewGrantQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useViewGrantQuery.ts @@ -91,7 +91,7 @@ export async function fetchViewGrantQuery(params: { export async function fetchViewGrantQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .viewGrant.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useViewQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useViewQuery.ts index 359c5bc55..a8dd8fac2 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useViewQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useViewQuery.ts @@ -91,7 +91,7 @@ export async function fetchViewQuery(params: { export async function fetchViewQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .view.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useViewRuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useViewRuleQuery.ts index f85cab776..e9928b2f1 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useViewRuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useViewRuleQuery.ts @@ -91,7 +91,7 @@ export async function fetchViewRuleQuery(params: { export async function fetchViewRuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .viewRule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useViewTableQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useViewTableQuery.ts index a5df307ba..c6fe2ddd5 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useViewTableQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useViewTableQuery.ts @@ -91,7 +91,7 @@ export async function fetchViewTableQuery(params: { export async function fetchViewTableQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .viewTable.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useWebauthnAuthModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useWebauthnAuthModuleQuery.ts index 870f1cb98..b69188439 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useWebauthnAuthModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useWebauthnAuthModuleQuery.ts @@ -97,7 +97,7 @@ export async function fetchWebauthnAuthModuleQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .webauthnAuthModule.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useWebauthnCredentialQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useWebauthnCredentialQuery.ts index 8041e139a..f1d55d52f 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useWebauthnCredentialQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useWebauthnCredentialQuery.ts @@ -97,7 +97,7 @@ export async function fetchWebauthnCredentialQuery; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .webauthnCredential.findOne({ diff --git a/sdk/constructive-react/src/public/hooks/queries/useWebauthnCredentialsModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useWebauthnCredentialsModuleQuery.ts index a44201361..f2dd3c177 100644 --- a/sdk/constructive-react/src/public/hooks/queries/useWebauthnCredentialsModuleQuery.ts +++ b/sdk/constructive-react/src/public/hooks/queries/useWebauthnCredentialsModuleQuery.ts @@ -102,7 +102,7 @@ export async function fetchWebauthnCredentialsModuleQuery< export async function fetchWebauthnCredentialsModuleQuery(params: { id: string; selection: SelectionConfig; -}) { +}): Promise { const args = buildSelectionArgs(params.selection); return getClient() .webauthnCredentialsModule.findOne({ diff --git a/sdk/constructive-react/src/public/orm/models/agentMessage.ts b/sdk/constructive-react/src/public/orm/models/agentMessage.ts index dd3434345..d128641c8 100644 --- a/sdk/constructive-react/src/public/orm/models/agentMessage.ts +++ b/sdk/constructive-react/src/public/orm/models/agentMessage.ts @@ -70,13 +70,11 @@ export class AgentMessageModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - agentMessages: { - nodes: InferSelectResult[]; - }; + agentMessage: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AgentMessage', @@ -84,17 +82,26 @@ export class AgentMessageModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AgentMessageFilter', + 'AgentMessageOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AgentMessage', - fieldName: 'agentMessages', + fieldName: 'agentMessage', document, variables, + transform: (data: { + agentMessages?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + agentMessage: data.agentMessages?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/agentTask.ts b/sdk/constructive-react/src/public/orm/models/agentTask.ts index 7f837b699..3bbc609f1 100644 --- a/sdk/constructive-react/src/public/orm/models/agentTask.ts +++ b/sdk/constructive-react/src/public/orm/models/agentTask.ts @@ -70,13 +70,11 @@ export class AgentTaskModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - agentTasks: { - nodes: InferSelectResult[]; - }; + agentTask: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AgentTask', @@ -84,17 +82,26 @@ export class AgentTaskModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AgentTaskFilter', + 'AgentTaskOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AgentTask', - fieldName: 'agentTasks', + fieldName: 'agentTask', document, variables, + transform: (data: { + agentTasks?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + agentTask: data.agentTasks?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/agentThread.ts b/sdk/constructive-react/src/public/orm/models/agentThread.ts index beb795fd1..7bbd14abe 100644 --- a/sdk/constructive-react/src/public/orm/models/agentThread.ts +++ b/sdk/constructive-react/src/public/orm/models/agentThread.ts @@ -70,13 +70,11 @@ export class AgentThreadModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - agentThreads: { - nodes: InferSelectResult[]; - }; + agentThread: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AgentThread', @@ -84,17 +82,26 @@ export class AgentThreadModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AgentThreadFilter', + 'AgentThreadOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AgentThread', - fieldName: 'agentThreads', + fieldName: 'agentThread', document, variables, + transform: (data: { + agentThreads?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + agentThread: data.agentThreads?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/api.ts b/sdk/constructive-react/src/public/orm/models/api.ts index 295ccbb65..5e2e04bd3 100644 --- a/sdk/constructive-react/src/public/orm/models/api.ts +++ b/sdk/constructive-react/src/public/orm/models/api.ts @@ -70,13 +70,11 @@ export class ApiModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - apis: { - nodes: InferSelectResult[]; - }; + api: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Api', @@ -84,17 +82,26 @@ export class ApiModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Api', - fieldName: 'apis', + fieldName: 'api', document, variables, + transform: (data: { + apis?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + api: data.apis?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/apiModule.ts b/sdk/constructive-react/src/public/orm/models/apiModule.ts index d90c9f9e9..d98c67c6e 100644 --- a/sdk/constructive-react/src/public/orm/models/apiModule.ts +++ b/sdk/constructive-react/src/public/orm/models/apiModule.ts @@ -70,13 +70,11 @@ export class ApiModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - apiModules: { - nodes: InferSelectResult[]; - }; + apiModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ApiModule', @@ -84,17 +82,26 @@ export class ApiModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ApiModuleFilter', + 'ApiModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ApiModule', - fieldName: 'apiModules', + fieldName: 'apiModule', document, variables, + transform: (data: { + apiModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + apiModule: data.apiModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/apiSchema.ts b/sdk/constructive-react/src/public/orm/models/apiSchema.ts index f9288041c..9ef99da8c 100644 --- a/sdk/constructive-react/src/public/orm/models/apiSchema.ts +++ b/sdk/constructive-react/src/public/orm/models/apiSchema.ts @@ -70,13 +70,11 @@ export class ApiSchemaModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - apiSchemas: { - nodes: InferSelectResult[]; - }; + apiSchema: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ApiSchema', @@ -84,17 +82,26 @@ export class ApiSchemaModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ApiSchemaFilter', + 'ApiSchemaOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ApiSchema', - fieldName: 'apiSchemas', + fieldName: 'apiSchema', document, variables, + transform: (data: { + apiSchemas?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + apiSchema: data.apiSchemas?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/app.ts b/sdk/constructive-react/src/public/orm/models/app.ts index f6a45b422..73ac9831b 100644 --- a/sdk/constructive-react/src/public/orm/models/app.ts +++ b/sdk/constructive-react/src/public/orm/models/app.ts @@ -70,13 +70,11 @@ export class AppModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - apps: { - nodes: InferSelectResult[]; - }; + app: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'App', @@ -84,17 +82,26 @@ export class AppModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppFilter', + 'AppOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'App', - fieldName: 'apps', + fieldName: 'app', document, variables, + transform: (data: { + apps?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + app: data.apps?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/appAchievement.ts b/sdk/constructive-react/src/public/orm/models/appAchievement.ts index f24447777..545b5e5f7 100644 --- a/sdk/constructive-react/src/public/orm/models/appAchievement.ts +++ b/sdk/constructive-react/src/public/orm/models/appAchievement.ts @@ -70,13 +70,11 @@ export class AppAchievementModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appAchievements: { - nodes: InferSelectResult[]; - }; + appAchievement: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppAchievement', @@ -84,17 +82,26 @@ export class AppAchievementModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppAchievementFilter', + 'AppAchievementOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppAchievement', - fieldName: 'appAchievements', + fieldName: 'appAchievement', document, variables, + transform: (data: { + appAchievements?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appAchievement: data.appAchievements?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/appAdminGrant.ts b/sdk/constructive-react/src/public/orm/models/appAdminGrant.ts index 6a2a59893..fd80edc23 100644 --- a/sdk/constructive-react/src/public/orm/models/appAdminGrant.ts +++ b/sdk/constructive-react/src/public/orm/models/appAdminGrant.ts @@ -70,13 +70,11 @@ export class AppAdminGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appAdminGrants: { - nodes: InferSelectResult[]; - }; + appAdminGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppAdminGrant', @@ -84,17 +82,26 @@ export class AppAdminGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppAdminGrantFilter', + 'AppAdminGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppAdminGrant', - fieldName: 'appAdminGrants', + fieldName: 'appAdminGrant', document, variables, + transform: (data: { + appAdminGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appAdminGrant: data.appAdminGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/appClaimedInvite.ts b/sdk/constructive-react/src/public/orm/models/appClaimedInvite.ts index 2a4c41dec..c9e66ec9c 100644 --- a/sdk/constructive-react/src/public/orm/models/appClaimedInvite.ts +++ b/sdk/constructive-react/src/public/orm/models/appClaimedInvite.ts @@ -70,13 +70,11 @@ export class AppClaimedInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appClaimedInvites: { - nodes: InferSelectResult[]; - }; + appClaimedInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppClaimedInvite', @@ -84,17 +82,26 @@ export class AppClaimedInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppClaimedInviteFilter', + 'AppClaimedInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppClaimedInvite', - fieldName: 'appClaimedInvites', + fieldName: 'appClaimedInvite', document, variables, + transform: (data: { + appClaimedInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appClaimedInvite: data.appClaimedInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/appGrant.ts b/sdk/constructive-react/src/public/orm/models/appGrant.ts index 2cb4f429a..4481fb3d8 100644 --- a/sdk/constructive-react/src/public/orm/models/appGrant.ts +++ b/sdk/constructive-react/src/public/orm/models/appGrant.ts @@ -70,13 +70,11 @@ export class AppGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appGrants: { - nodes: InferSelectResult[]; - }; + appGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppGrant', @@ -84,17 +82,26 @@ export class AppGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppGrantFilter', + 'AppGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppGrant', - fieldName: 'appGrants', + fieldName: 'appGrant', document, variables, + transform: (data: { + appGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appGrant: data.appGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/appInvite.ts b/sdk/constructive-react/src/public/orm/models/appInvite.ts index fe4a1c4e4..5fcbff936 100644 --- a/sdk/constructive-react/src/public/orm/models/appInvite.ts +++ b/sdk/constructive-react/src/public/orm/models/appInvite.ts @@ -70,13 +70,11 @@ export class AppInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appInvites: { - nodes: InferSelectResult[]; - }; + appInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppInvite', @@ -84,17 +82,26 @@ export class AppInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppInviteFilter', + 'AppInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppInvite', - fieldName: 'appInvites', + fieldName: 'appInvite', document, variables, + transform: (data: { + appInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appInvite: data.appInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/appLevel.ts b/sdk/constructive-react/src/public/orm/models/appLevel.ts index f9abef512..cd182a18c 100644 --- a/sdk/constructive-react/src/public/orm/models/appLevel.ts +++ b/sdk/constructive-react/src/public/orm/models/appLevel.ts @@ -70,13 +70,11 @@ export class AppLevelModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLevels: { - nodes: InferSelectResult[]; - }; + appLevel: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLevel', @@ -84,17 +82,26 @@ export class AppLevelModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLevelFilter', + 'AppLevelOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLevel', - fieldName: 'appLevels', + fieldName: 'appLevel', document, variables, + transform: (data: { + appLevels?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevel: data.appLevels?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/appLevelRequirement.ts b/sdk/constructive-react/src/public/orm/models/appLevelRequirement.ts index 54baeb7dc..c3f9d89f1 100644 --- a/sdk/constructive-react/src/public/orm/models/appLevelRequirement.ts +++ b/sdk/constructive-react/src/public/orm/models/appLevelRequirement.ts @@ -70,13 +70,11 @@ export class AppLevelRequirementModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLevelRequirements: { - nodes: InferSelectResult[]; - }; + appLevelRequirement: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLevelRequirement', @@ -84,17 +82,26 @@ export class AppLevelRequirementModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLevelRequirementFilter', + 'AppLevelRequirementOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLevelRequirement', - fieldName: 'appLevelRequirements', + fieldName: 'appLevelRequirement', document, variables, + transform: (data: { + appLevelRequirements?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevelRequirement: data.appLevelRequirements?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/appLimit.ts b/sdk/constructive-react/src/public/orm/models/appLimit.ts index dea896420..2e109cb07 100644 --- a/sdk/constructive-react/src/public/orm/models/appLimit.ts +++ b/sdk/constructive-react/src/public/orm/models/appLimit.ts @@ -70,13 +70,11 @@ export class AppLimitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimits: { - nodes: InferSelectResult[]; - }; + appLimit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimit', @@ -84,17 +82,26 @@ export class AppLimitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitFilter', + 'AppLimitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimit', - fieldName: 'appLimits', + fieldName: 'appLimit', document, variables, + transform: (data: { + appLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimit: data.appLimits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/appLimitDefault.ts b/sdk/constructive-react/src/public/orm/models/appLimitDefault.ts index dfec3cdd9..f9df6376e 100644 --- a/sdk/constructive-react/src/public/orm/models/appLimitDefault.ts +++ b/sdk/constructive-react/src/public/orm/models/appLimitDefault.ts @@ -70,13 +70,11 @@ export class AppLimitDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimitDefaults: { - nodes: InferSelectResult[]; - }; + appLimitDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimitDefault', @@ -84,17 +82,26 @@ export class AppLimitDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitDefaultFilter', + 'AppLimitDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimitDefault', - fieldName: 'appLimitDefaults', + fieldName: 'appLimitDefault', document, variables, + transform: (data: { + appLimitDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimitDefault: data.appLimitDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/appLimitEvent.ts b/sdk/constructive-react/src/public/orm/models/appLimitEvent.ts index 8f367e889..b8e0c98e1 100644 --- a/sdk/constructive-react/src/public/orm/models/appLimitEvent.ts +++ b/sdk/constructive-react/src/public/orm/models/appLimitEvent.ts @@ -70,13 +70,11 @@ export class AppLimitEventModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimitEvents: { - nodes: InferSelectResult[]; - }; + appLimitEvent: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimitEvent', @@ -84,17 +82,26 @@ export class AppLimitEventModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitEventFilter', + 'AppLimitEventOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimitEvent', - fieldName: 'appLimitEvents', + fieldName: 'appLimitEvent', document, variables, + transform: (data: { + appLimitEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimitEvent: data.appLimitEvents?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-react/src/public/orm/models/appMembership.ts b/sdk/constructive-react/src/public/orm/models/appMembership.ts index a830192e6..a4011c41a 100644 --- a/sdk/constructive-react/src/public/orm/models/appMembership.ts +++ b/sdk/constructive-react/src/public/orm/models/appMembership.ts @@ -70,13 +70,11 @@ export class AppMembershipModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appMemberships: { - nodes: InferSelectResult[]; - }; + appMembership: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppMembership', @@ -84,17 +82,26 @@ export class AppMembershipModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppMembershipFilter', + 'AppMembershipOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppMembership', - fieldName: 'appMemberships', + fieldName: 'appMembership', document, variables, + transform: (data: { + appMemberships?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appMembership: data.appMemberships?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/appMembershipDefault.ts b/sdk/constructive-react/src/public/orm/models/appMembershipDefault.ts index 8b1a54c01..f69f1aca6 100644 --- a/sdk/constructive-react/src/public/orm/models/appMembershipDefault.ts +++ b/sdk/constructive-react/src/public/orm/models/appMembershipDefault.ts @@ -72,13 +72,11 @@ export class AppMembershipDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appMembershipDefaults: { - nodes: InferSelectResult[]; - }; + appMembershipDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppMembershipDefault', @@ -86,17 +84,26 @@ export class AppMembershipDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppMembershipDefaultFilter', + 'AppMembershipDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppMembershipDefault', - fieldName: 'appMembershipDefaults', + fieldName: 'appMembershipDefault', document, variables, + transform: (data: { + appMembershipDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appMembershipDefault: data.appMembershipDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/appOwnerGrant.ts b/sdk/constructive-react/src/public/orm/models/appOwnerGrant.ts index a8695557e..eeb815d84 100644 --- a/sdk/constructive-react/src/public/orm/models/appOwnerGrant.ts +++ b/sdk/constructive-react/src/public/orm/models/appOwnerGrant.ts @@ -70,13 +70,11 @@ export class AppOwnerGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appOwnerGrants: { - nodes: InferSelectResult[]; - }; + appOwnerGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppOwnerGrant', @@ -84,17 +82,26 @@ export class AppOwnerGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppOwnerGrantFilter', + 'AppOwnerGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppOwnerGrant', - fieldName: 'appOwnerGrants', + fieldName: 'appOwnerGrant', document, variables, + transform: (data: { + appOwnerGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appOwnerGrant: data.appOwnerGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/appPermission.ts b/sdk/constructive-react/src/public/orm/models/appPermission.ts index 2575c5de2..e71adea65 100644 --- a/sdk/constructive-react/src/public/orm/models/appPermission.ts +++ b/sdk/constructive-react/src/public/orm/models/appPermission.ts @@ -70,13 +70,11 @@ export class AppPermissionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appPermissions: { - nodes: InferSelectResult[]; - }; + appPermission: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppPermission', @@ -84,17 +82,26 @@ export class AppPermissionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppPermissionFilter', + 'AppPermissionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppPermission', - fieldName: 'appPermissions', + fieldName: 'appPermission', document, variables, + transform: (data: { + appPermissions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appPermission: data.appPermissions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/appPermissionDefault.ts b/sdk/constructive-react/src/public/orm/models/appPermissionDefault.ts index 427272883..d5511aed0 100644 --- a/sdk/constructive-react/src/public/orm/models/appPermissionDefault.ts +++ b/sdk/constructive-react/src/public/orm/models/appPermissionDefault.ts @@ -72,13 +72,11 @@ export class AppPermissionDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appPermissionDefaults: { - nodes: InferSelectResult[]; - }; + appPermissionDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppPermissionDefault', @@ -86,17 +84,26 @@ export class AppPermissionDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppPermissionDefaultFilter', + 'AppPermissionDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppPermissionDefault', - fieldName: 'appPermissionDefaults', + fieldName: 'appPermissionDefault', document, variables, + transform: (data: { + appPermissionDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appPermissionDefault: data.appPermissionDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/appStep.ts b/sdk/constructive-react/src/public/orm/models/appStep.ts index 29dae0d6c..7ebb44fa1 100644 --- a/sdk/constructive-react/src/public/orm/models/appStep.ts +++ b/sdk/constructive-react/src/public/orm/models/appStep.ts @@ -70,13 +70,11 @@ export class AppStepModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appSteps: { - nodes: InferSelectResult[]; - }; + appStep: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppStep', @@ -84,17 +82,26 @@ export class AppStepModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppStepFilter', + 'AppStepOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppStep', - fieldName: 'appSteps', + fieldName: 'appStep', document, variables, + transform: (data: { + appSteps?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appStep: data.appSteps?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/astMigration.ts b/sdk/constructive-react/src/public/orm/models/astMigration.ts index 8bab8cfd0..bfcc5f455 100644 --- a/sdk/constructive-react/src/public/orm/models/astMigration.ts +++ b/sdk/constructive-react/src/public/orm/models/astMigration.ts @@ -70,13 +70,11 @@ export class AstMigrationModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - astMigrations: { - nodes: InferSelectResult[]; - }; + astMigration: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AstMigration', @@ -84,17 +82,26 @@ export class AstMigrationModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AstMigrationFilter', + 'AstMigrationOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AstMigration', - fieldName: 'astMigrations', + fieldName: 'astMigration', document, variables, + transform: (data: { + astMigrations?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + astMigration: data.astMigrations?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/auditLog.ts b/sdk/constructive-react/src/public/orm/models/auditLog.ts index 2d388026d..8d8abc012 100644 --- a/sdk/constructive-react/src/public/orm/models/auditLog.ts +++ b/sdk/constructive-react/src/public/orm/models/auditLog.ts @@ -70,13 +70,11 @@ export class AuditLogModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - auditLogs: { - nodes: InferSelectResult[]; - }; + auditLog: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AuditLog', @@ -84,17 +82,26 @@ export class AuditLogModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AuditLogFilter', + 'AuditLogOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AuditLog', - fieldName: 'auditLogs', + fieldName: 'auditLog', document, variables, + transform: (data: { + auditLogs?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + auditLog: data.auditLogs?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/billingModule.ts b/sdk/constructive-react/src/public/orm/models/billingModule.ts index 73e7928ed..712d75ae7 100644 --- a/sdk/constructive-react/src/public/orm/models/billingModule.ts +++ b/sdk/constructive-react/src/public/orm/models/billingModule.ts @@ -70,13 +70,11 @@ export class BillingModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - billingModules: { - nodes: InferSelectResult[]; - }; + billingModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'BillingModule', @@ -84,17 +82,26 @@ export class BillingModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'BillingModuleFilter', + 'BillingModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'BillingModule', - fieldName: 'billingModules', + fieldName: 'billingModule', document, variables, + transform: (data: { + billingModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + billingModule: data.billingModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/blueprint.ts b/sdk/constructive-react/src/public/orm/models/blueprint.ts index fa1ea0286..239c50eb9 100644 --- a/sdk/constructive-react/src/public/orm/models/blueprint.ts +++ b/sdk/constructive-react/src/public/orm/models/blueprint.ts @@ -70,13 +70,11 @@ export class BlueprintModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - blueprints: { - nodes: InferSelectResult[]; - }; + blueprint: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Blueprint', @@ -84,17 +82,26 @@ export class BlueprintModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'BlueprintFilter', + 'BlueprintOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Blueprint', - fieldName: 'blueprints', + fieldName: 'blueprint', document, variables, + transform: (data: { + blueprints?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + blueprint: data.blueprints?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/blueprintConstruction.ts b/sdk/constructive-react/src/public/orm/models/blueprintConstruction.ts index 3f7a8657d..dad6db0bf 100644 --- a/sdk/constructive-react/src/public/orm/models/blueprintConstruction.ts +++ b/sdk/constructive-react/src/public/orm/models/blueprintConstruction.ts @@ -72,13 +72,11 @@ export class BlueprintConstructionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - blueprintConstructions: { - nodes: InferSelectResult[]; - }; + blueprintConstruction: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'BlueprintConstruction', @@ -86,17 +84,26 @@ export class BlueprintConstructionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'BlueprintConstructionFilter', + 'BlueprintConstructionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'BlueprintConstruction', - fieldName: 'blueprintConstructions', + fieldName: 'blueprintConstruction', document, variables, + transform: (data: { + blueprintConstructions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + blueprintConstruction: data.blueprintConstructions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/blueprintTemplate.ts b/sdk/constructive-react/src/public/orm/models/blueprintTemplate.ts index 31d7824e5..1f957cded 100644 --- a/sdk/constructive-react/src/public/orm/models/blueprintTemplate.ts +++ b/sdk/constructive-react/src/public/orm/models/blueprintTemplate.ts @@ -70,13 +70,11 @@ export class BlueprintTemplateModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - blueprintTemplates: { - nodes: InferSelectResult[]; - }; + blueprintTemplate: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'BlueprintTemplate', @@ -84,17 +82,26 @@ export class BlueprintTemplateModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'BlueprintTemplateFilter', + 'BlueprintTemplateOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'BlueprintTemplate', - fieldName: 'blueprintTemplates', + fieldName: 'blueprintTemplate', document, variables, + transform: (data: { + blueprintTemplates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + blueprintTemplate: data.blueprintTemplates?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/checkConstraint.ts b/sdk/constructive-react/src/public/orm/models/checkConstraint.ts index 323b64b6c..5c052886f 100644 --- a/sdk/constructive-react/src/public/orm/models/checkConstraint.ts +++ b/sdk/constructive-react/src/public/orm/models/checkConstraint.ts @@ -70,13 +70,11 @@ export class CheckConstraintModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - checkConstraints: { - nodes: InferSelectResult[]; - }; + checkConstraint: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'CheckConstraint', @@ -84,17 +82,26 @@ export class CheckConstraintModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CheckConstraintFilter', + 'CheckConstraintOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'CheckConstraint', - fieldName: 'checkConstraints', + fieldName: 'checkConstraint', document, variables, + transform: (data: { + checkConstraints?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + checkConstraint: data.checkConstraints?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/commit.ts b/sdk/constructive-react/src/public/orm/models/commit.ts index de0e94710..70f5c5960 100644 --- a/sdk/constructive-react/src/public/orm/models/commit.ts +++ b/sdk/constructive-react/src/public/orm/models/commit.ts @@ -70,13 +70,11 @@ export class CommitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - commits: { - nodes: InferSelectResult[]; - }; + commit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Commit', @@ -84,17 +82,26 @@ export class CommitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CommitFilter', + 'CommitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Commit', - fieldName: 'commits', + fieldName: 'commit', document, variables, + transform: (data: { + commits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + commit: data.commits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/connectedAccountsModule.ts b/sdk/constructive-react/src/public/orm/models/connectedAccountsModule.ts index 408aec32a..226307b4b 100644 --- a/sdk/constructive-react/src/public/orm/models/connectedAccountsModule.ts +++ b/sdk/constructive-react/src/public/orm/models/connectedAccountsModule.ts @@ -72,13 +72,11 @@ export class ConnectedAccountsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - connectedAccountsModules: { - nodes: InferSelectResult[]; - }; + connectedAccountsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ConnectedAccountsModule', @@ -86,17 +84,26 @@ export class ConnectedAccountsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ConnectedAccountsModuleFilter', + 'ConnectedAccountsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ConnectedAccountsModule', - fieldName: 'connectedAccountsModules', + fieldName: 'connectedAccountsModule', document, variables, + transform: (data: { + connectedAccountsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + connectedAccountsModule: data.connectedAccountsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/cryptoAddress.ts b/sdk/constructive-react/src/public/orm/models/cryptoAddress.ts index 7357c0126..11914bd9d 100644 --- a/sdk/constructive-react/src/public/orm/models/cryptoAddress.ts +++ b/sdk/constructive-react/src/public/orm/models/cryptoAddress.ts @@ -70,13 +70,11 @@ export class CryptoAddressModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - cryptoAddresses: { - nodes: InferSelectResult[]; - }; + cryptoAddress: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'CryptoAddress', @@ -84,17 +82,26 @@ export class CryptoAddressModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CryptoAddressFilter', + 'CryptoAddressOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'CryptoAddress', - fieldName: 'cryptoAddresses', + fieldName: 'cryptoAddress', document, variables, + transform: (data: { + cryptoAddresses?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + cryptoAddress: data.cryptoAddresses?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/cryptoAddressesModule.ts b/sdk/constructive-react/src/public/orm/models/cryptoAddressesModule.ts index 25af5781a..6618ae4e9 100644 --- a/sdk/constructive-react/src/public/orm/models/cryptoAddressesModule.ts +++ b/sdk/constructive-react/src/public/orm/models/cryptoAddressesModule.ts @@ -72,13 +72,11 @@ export class CryptoAddressesModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - cryptoAddressesModules: { - nodes: InferSelectResult[]; - }; + cryptoAddressesModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'CryptoAddressesModule', @@ -86,17 +84,26 @@ export class CryptoAddressesModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CryptoAddressesModuleFilter', + 'CryptoAddressesModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'CryptoAddressesModule', - fieldName: 'cryptoAddressesModules', + fieldName: 'cryptoAddressesModule', document, variables, + transform: (data: { + cryptoAddressesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + cryptoAddressesModule: data.cryptoAddressesModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/cryptoAuthModule.ts b/sdk/constructive-react/src/public/orm/models/cryptoAuthModule.ts index c654aa3f7..c90349b9d 100644 --- a/sdk/constructive-react/src/public/orm/models/cryptoAuthModule.ts +++ b/sdk/constructive-react/src/public/orm/models/cryptoAuthModule.ts @@ -70,13 +70,11 @@ export class CryptoAuthModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - cryptoAuthModules: { - nodes: InferSelectResult[]; - }; + cryptoAuthModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'CryptoAuthModule', @@ -84,17 +82,26 @@ export class CryptoAuthModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CryptoAuthModuleFilter', + 'CryptoAuthModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'CryptoAuthModule', - fieldName: 'cryptoAuthModules', + fieldName: 'cryptoAuthModule', document, variables, + transform: (data: { + cryptoAuthModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + cryptoAuthModule: data.cryptoAuthModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/database.ts b/sdk/constructive-react/src/public/orm/models/database.ts index 6a4293010..57b350548 100644 --- a/sdk/constructive-react/src/public/orm/models/database.ts +++ b/sdk/constructive-react/src/public/orm/models/database.ts @@ -70,13 +70,11 @@ export class DatabaseModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - databases: { - nodes: InferSelectResult[]; - }; + database: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Database', @@ -84,17 +82,26 @@ export class DatabaseModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DatabaseFilter', + 'DatabaseOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Database', - fieldName: 'databases', + fieldName: 'database', document, variables, + transform: (data: { + databases?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + database: data.databases?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/databaseProvisionModule.ts b/sdk/constructive-react/src/public/orm/models/databaseProvisionModule.ts index 4d6c37645..4cf322de6 100644 --- a/sdk/constructive-react/src/public/orm/models/databaseProvisionModule.ts +++ b/sdk/constructive-react/src/public/orm/models/databaseProvisionModule.ts @@ -72,13 +72,11 @@ export class DatabaseProvisionModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - databaseProvisionModules: { - nodes: InferSelectResult[]; - }; + databaseProvisionModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DatabaseProvisionModule', @@ -86,17 +84,26 @@ export class DatabaseProvisionModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DatabaseProvisionModuleFilter', + 'DatabaseProvisionModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DatabaseProvisionModule', - fieldName: 'databaseProvisionModules', + fieldName: 'databaseProvisionModule', document, variables, + transform: (data: { + databaseProvisionModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + databaseProvisionModule: data.databaseProvisionModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/databaseTransfer.ts b/sdk/constructive-react/src/public/orm/models/databaseTransfer.ts index e5d347907..dd22777cd 100644 --- a/sdk/constructive-react/src/public/orm/models/databaseTransfer.ts +++ b/sdk/constructive-react/src/public/orm/models/databaseTransfer.ts @@ -70,13 +70,11 @@ export class DatabaseTransferModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - databaseTransfers: { - nodes: InferSelectResult[]; - }; + databaseTransfer: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DatabaseTransfer', @@ -84,17 +82,26 @@ export class DatabaseTransferModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DatabaseTransferFilter', + 'DatabaseTransferOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DatabaseTransfer', - fieldName: 'databaseTransfers', + fieldName: 'databaseTransfer', document, variables, + transform: (data: { + databaseTransfers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + databaseTransfer: data.databaseTransfers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/defaultIdsModule.ts b/sdk/constructive-react/src/public/orm/models/defaultIdsModule.ts index aa235bd39..9553db8ed 100644 --- a/sdk/constructive-react/src/public/orm/models/defaultIdsModule.ts +++ b/sdk/constructive-react/src/public/orm/models/defaultIdsModule.ts @@ -70,13 +70,11 @@ export class DefaultIdsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - defaultIdsModules: { - nodes: InferSelectResult[]; - }; + defaultIdsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DefaultIdsModule', @@ -84,17 +82,26 @@ export class DefaultIdsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DefaultIdsModuleFilter', + 'DefaultIdsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DefaultIdsModule', - fieldName: 'defaultIdsModules', + fieldName: 'defaultIdsModule', document, variables, + transform: (data: { + defaultIdsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + defaultIdsModule: data.defaultIdsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/defaultPrivilege.ts b/sdk/constructive-react/src/public/orm/models/defaultPrivilege.ts index 7041b7b55..36414357b 100644 --- a/sdk/constructive-react/src/public/orm/models/defaultPrivilege.ts +++ b/sdk/constructive-react/src/public/orm/models/defaultPrivilege.ts @@ -70,13 +70,11 @@ export class DefaultPrivilegeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - defaultPrivileges: { - nodes: InferSelectResult[]; - }; + defaultPrivilege: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DefaultPrivilege', @@ -84,17 +82,26 @@ export class DefaultPrivilegeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DefaultPrivilegeFilter', + 'DefaultPrivilegeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DefaultPrivilege', - fieldName: 'defaultPrivileges', + fieldName: 'defaultPrivilege', document, variables, + transform: (data: { + defaultPrivileges?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + defaultPrivilege: data.defaultPrivileges?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/denormalizedTableField.ts b/sdk/constructive-react/src/public/orm/models/denormalizedTableField.ts index d94b84104..881f2ffdb 100644 --- a/sdk/constructive-react/src/public/orm/models/denormalizedTableField.ts +++ b/sdk/constructive-react/src/public/orm/models/denormalizedTableField.ts @@ -72,13 +72,11 @@ export class DenormalizedTableFieldModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - denormalizedTableFields: { - nodes: InferSelectResult[]; - }; + denormalizedTableField: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DenormalizedTableField', @@ -86,17 +84,26 @@ export class DenormalizedTableFieldModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DenormalizedTableFieldFilter', + 'DenormalizedTableFieldOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DenormalizedTableField', - fieldName: 'denormalizedTableFields', + fieldName: 'denormalizedTableField', document, variables, + transform: (data: { + denormalizedTableFields?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + denormalizedTableField: data.denormalizedTableFields?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/devicesModule.ts b/sdk/constructive-react/src/public/orm/models/devicesModule.ts index 11386e4fe..8c9a7e06e 100644 --- a/sdk/constructive-react/src/public/orm/models/devicesModule.ts +++ b/sdk/constructive-react/src/public/orm/models/devicesModule.ts @@ -70,13 +70,11 @@ export class DevicesModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - devicesModules: { - nodes: InferSelectResult[]; - }; + devicesModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DevicesModule', @@ -84,17 +82,26 @@ export class DevicesModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DevicesModuleFilter', + 'DevicesModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DevicesModule', - fieldName: 'devicesModules', + fieldName: 'devicesModule', document, variables, + transform: (data: { + devicesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + devicesModule: data.devicesModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/domain.ts b/sdk/constructive-react/src/public/orm/models/domain.ts index acf05455c..ab0016ec4 100644 --- a/sdk/constructive-react/src/public/orm/models/domain.ts +++ b/sdk/constructive-react/src/public/orm/models/domain.ts @@ -70,13 +70,11 @@ export class DomainModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - domains: { - nodes: InferSelectResult[]; - }; + domain: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Domain', @@ -84,17 +82,26 @@ export class DomainModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DomainFilter', + 'DomainOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Domain', - fieldName: 'domains', + fieldName: 'domain', document, variables, + transform: (data: { + domains?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + domain: data.domains?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/email.ts b/sdk/constructive-react/src/public/orm/models/email.ts index aa83efc07..325475b9c 100644 --- a/sdk/constructive-react/src/public/orm/models/email.ts +++ b/sdk/constructive-react/src/public/orm/models/email.ts @@ -70,13 +70,11 @@ export class EmailModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - emails: { - nodes: InferSelectResult[]; - }; + email: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Email', @@ -84,17 +82,26 @@ export class EmailModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EmailFilter', + 'EmailOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Email', - fieldName: 'emails', + fieldName: 'email', document, variables, + transform: (data: { + emails?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + email: data.emails?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/emailsModule.ts b/sdk/constructive-react/src/public/orm/models/emailsModule.ts index 984018c0c..e95985b85 100644 --- a/sdk/constructive-react/src/public/orm/models/emailsModule.ts +++ b/sdk/constructive-react/src/public/orm/models/emailsModule.ts @@ -70,13 +70,11 @@ export class EmailsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - emailsModules: { - nodes: InferSelectResult[]; - }; + emailsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'EmailsModule', @@ -84,17 +82,26 @@ export class EmailsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EmailsModuleFilter', + 'EmailsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'EmailsModule', - fieldName: 'emailsModules', + fieldName: 'emailsModule', document, variables, + transform: (data: { + emailsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + emailsModule: data.emailsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/embeddingChunk.ts b/sdk/constructive-react/src/public/orm/models/embeddingChunk.ts index 6c175145d..a5c7feb75 100644 --- a/sdk/constructive-react/src/public/orm/models/embeddingChunk.ts +++ b/sdk/constructive-react/src/public/orm/models/embeddingChunk.ts @@ -70,13 +70,11 @@ export class EmbeddingChunkModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - embeddingChunks: { - nodes: InferSelectResult[]; - }; + embeddingChunk: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'EmbeddingChunk', @@ -84,17 +82,26 @@ export class EmbeddingChunkModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EmbeddingChunkFilter', + 'EmbeddingChunkOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'EmbeddingChunk', - fieldName: 'embeddingChunks', + fieldName: 'embeddingChunk', document, variables, + transform: (data: { + embeddingChunks?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + embeddingChunk: data.embeddingChunks?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/encryptedSecretsModule.ts b/sdk/constructive-react/src/public/orm/models/encryptedSecretsModule.ts index 8656f0937..754ec7e78 100644 --- a/sdk/constructive-react/src/public/orm/models/encryptedSecretsModule.ts +++ b/sdk/constructive-react/src/public/orm/models/encryptedSecretsModule.ts @@ -72,13 +72,11 @@ export class EncryptedSecretsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - encryptedSecretsModules: { - nodes: InferSelectResult[]; - }; + encryptedSecretsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'EncryptedSecretsModule', @@ -86,17 +84,26 @@ export class EncryptedSecretsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EncryptedSecretsModuleFilter', + 'EncryptedSecretsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'EncryptedSecretsModule', - fieldName: 'encryptedSecretsModules', + fieldName: 'encryptedSecretsModule', document, variables, + transform: (data: { + encryptedSecretsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + encryptedSecretsModule: data.encryptedSecretsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/entityTypeProvision.ts b/sdk/constructive-react/src/public/orm/models/entityTypeProvision.ts index 00ae9ebbc..93373a3dd 100644 --- a/sdk/constructive-react/src/public/orm/models/entityTypeProvision.ts +++ b/sdk/constructive-react/src/public/orm/models/entityTypeProvision.ts @@ -70,13 +70,11 @@ export class EntityTypeProvisionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - entityTypeProvisions: { - nodes: InferSelectResult[]; - }; + entityTypeProvision: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'EntityTypeProvision', @@ -84,17 +82,26 @@ export class EntityTypeProvisionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EntityTypeProvisionFilter', + 'EntityTypeProvisionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'EntityTypeProvision', - fieldName: 'entityTypeProvisions', + fieldName: 'entityTypeProvision', document, variables, + transform: (data: { + entityTypeProvisions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + entityTypeProvision: data.entityTypeProvisions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/enum.ts b/sdk/constructive-react/src/public/orm/models/enum.ts index 1e0e12ee3..58495e155 100644 --- a/sdk/constructive-react/src/public/orm/models/enum.ts +++ b/sdk/constructive-react/src/public/orm/models/enum.ts @@ -70,13 +70,11 @@ export class EnumModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - enums: { - nodes: InferSelectResult[]; - }; + enum: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Enum', @@ -84,17 +82,26 @@ export class EnumModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EnumFilter', + 'EnumOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Enum', - fieldName: 'enums', + fieldName: 'enum', document, variables, + transform: (data: { + enums?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + enum: data.enums?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/field.ts b/sdk/constructive-react/src/public/orm/models/field.ts index d8e8fc4ee..7664e791c 100644 --- a/sdk/constructive-react/src/public/orm/models/field.ts +++ b/sdk/constructive-react/src/public/orm/models/field.ts @@ -70,13 +70,11 @@ export class FieldModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - fields: { - nodes: InferSelectResult[]; - }; + field: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Field', @@ -84,17 +82,26 @@ export class FieldModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'FieldFilter', + 'FieldOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Field', - fieldName: 'fields', + fieldName: 'field', document, variables, + transform: (data: { + fields?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + field: data.fields?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/foreignKeyConstraint.ts b/sdk/constructive-react/src/public/orm/models/foreignKeyConstraint.ts index 951dc4fe2..36e80496f 100644 --- a/sdk/constructive-react/src/public/orm/models/foreignKeyConstraint.ts +++ b/sdk/constructive-react/src/public/orm/models/foreignKeyConstraint.ts @@ -72,13 +72,11 @@ export class ForeignKeyConstraintModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - foreignKeyConstraints: { - nodes: InferSelectResult[]; - }; + foreignKeyConstraint: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ForeignKeyConstraint', @@ -86,17 +84,26 @@ export class ForeignKeyConstraintModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ForeignKeyConstraintFilter', + 'ForeignKeyConstraintOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ForeignKeyConstraint', - fieldName: 'foreignKeyConstraints', + fieldName: 'foreignKeyConstraint', document, variables, + transform: (data: { + foreignKeyConstraints?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + foreignKeyConstraint: data.foreignKeyConstraints?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/fullTextSearch.ts b/sdk/constructive-react/src/public/orm/models/fullTextSearch.ts index a0a592138..2135f8447 100644 --- a/sdk/constructive-react/src/public/orm/models/fullTextSearch.ts +++ b/sdk/constructive-react/src/public/orm/models/fullTextSearch.ts @@ -70,13 +70,11 @@ export class FullTextSearchModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - fullTextSearches: { - nodes: InferSelectResult[]; - }; + fullTextSearch: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'FullTextSearch', @@ -84,17 +82,26 @@ export class FullTextSearchModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'FullTextSearchFilter', + 'FullTextSearchOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'FullTextSearch', - fieldName: 'fullTextSearches', + fieldName: 'fullTextSearch', document, variables, + transform: (data: { + fullTextSearches?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + fullTextSearch: data.fullTextSearches?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/getAllRecord.ts b/sdk/constructive-react/src/public/orm/models/getAllRecord.ts index 53873a0f3..39a82fbbb 100644 --- a/sdk/constructive-react/src/public/orm/models/getAllRecord.ts +++ b/sdk/constructive-react/src/public/orm/models/getAllRecord.ts @@ -70,13 +70,11 @@ export class GetAllRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - getAll: { - nodes: InferSelectResult[]; - }; + getAllRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'GetAllRecord', @@ -84,17 +82,26 @@ export class GetAllRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'GetAllRecordFilter', + 'GetAllRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'GetAllRecord', - fieldName: 'getAll', + fieldName: 'getAllRecord', document, variables, + transform: (data: { + getAll?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + getAllRecord: data.getAll?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-react/src/public/orm/models/hierarchyModule.ts b/sdk/constructive-react/src/public/orm/models/hierarchyModule.ts index 325927bd5..e1eca248c 100644 --- a/sdk/constructive-react/src/public/orm/models/hierarchyModule.ts +++ b/sdk/constructive-react/src/public/orm/models/hierarchyModule.ts @@ -70,13 +70,11 @@ export class HierarchyModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - hierarchyModules: { - nodes: InferSelectResult[]; - }; + hierarchyModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'HierarchyModule', @@ -84,17 +82,26 @@ export class HierarchyModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'HierarchyModuleFilter', + 'HierarchyModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'HierarchyModule', - fieldName: 'hierarchyModules', + fieldName: 'hierarchyModule', document, variables, + transform: (data: { + hierarchyModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + hierarchyModule: data.hierarchyModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/identityProvider.ts b/sdk/constructive-react/src/public/orm/models/identityProvider.ts index 9c9cfc0d9..cdc672145 100644 --- a/sdk/constructive-react/src/public/orm/models/identityProvider.ts +++ b/sdk/constructive-react/src/public/orm/models/identityProvider.ts @@ -70,13 +70,11 @@ export class IdentityProviderModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - identityProviders: { - nodes: InferSelectResult[]; - }; + identityProvider: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'IdentityProvider', @@ -84,17 +82,26 @@ export class IdentityProviderModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'IdentityProviderFilter', + 'IdentityProviderOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'IdentityProvider', - fieldName: 'identityProviders', + fieldName: 'identityProvider', document, variables, + transform: (data: { + identityProviders?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + identityProvider: data.identityProviders?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-react/src/public/orm/models/identityProvidersModule.ts b/sdk/constructive-react/src/public/orm/models/identityProvidersModule.ts index 151bd7aa6..86a507559 100644 --- a/sdk/constructive-react/src/public/orm/models/identityProvidersModule.ts +++ b/sdk/constructive-react/src/public/orm/models/identityProvidersModule.ts @@ -72,13 +72,11 @@ export class IdentityProvidersModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - identityProvidersModules: { - nodes: InferSelectResult[]; - }; + identityProvidersModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'IdentityProvidersModule', @@ -86,17 +84,26 @@ export class IdentityProvidersModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'IdentityProvidersModuleFilter', + 'IdentityProvidersModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'IdentityProvidersModule', - fieldName: 'identityProvidersModules', + fieldName: 'identityProvidersModule', document, variables, + transform: (data: { + identityProvidersModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + identityProvidersModule: data.identityProvidersModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/indexModel.ts b/sdk/constructive-react/src/public/orm/models/indexModel.ts index 052334e57..1c7eb1e96 100644 --- a/sdk/constructive-react/src/public/orm/models/indexModel.ts +++ b/sdk/constructive-react/src/public/orm/models/indexModel.ts @@ -70,13 +70,11 @@ export class IndexModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - indices: { - nodes: InferSelectResult[]; - }; + index: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Index', @@ -84,17 +82,26 @@ export class IndexModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'IndexFilter', + 'IndexOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Index', - fieldName: 'indices', + fieldName: 'index', document, variables, + transform: (data: { + indices?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + index: data.indices?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/invitesModule.ts b/sdk/constructive-react/src/public/orm/models/invitesModule.ts index f7999f502..b31e122a0 100644 --- a/sdk/constructive-react/src/public/orm/models/invitesModule.ts +++ b/sdk/constructive-react/src/public/orm/models/invitesModule.ts @@ -70,13 +70,11 @@ export class InvitesModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - invitesModules: { - nodes: InferSelectResult[]; - }; + invitesModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'InvitesModule', @@ -84,17 +82,26 @@ export class InvitesModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'InvitesModuleFilter', + 'InvitesModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'InvitesModule', - fieldName: 'invitesModules', + fieldName: 'invitesModule', document, variables, + transform: (data: { + invitesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + invitesModule: data.invitesModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/levelsModule.ts b/sdk/constructive-react/src/public/orm/models/levelsModule.ts index 0c758ad86..3cd4aa3cb 100644 --- a/sdk/constructive-react/src/public/orm/models/levelsModule.ts +++ b/sdk/constructive-react/src/public/orm/models/levelsModule.ts @@ -70,13 +70,11 @@ export class LevelsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - levelsModules: { - nodes: InferSelectResult[]; - }; + levelsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'LevelsModule', @@ -84,17 +82,26 @@ export class LevelsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'LevelsModuleFilter', + 'LevelsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'LevelsModule', - fieldName: 'levelsModules', + fieldName: 'levelsModule', document, variables, + transform: (data: { + levelsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + levelsModule: data.levelsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/limitsModule.ts b/sdk/constructive-react/src/public/orm/models/limitsModule.ts index 10e89be1d..60dec7814 100644 --- a/sdk/constructive-react/src/public/orm/models/limitsModule.ts +++ b/sdk/constructive-react/src/public/orm/models/limitsModule.ts @@ -70,13 +70,11 @@ export class LimitsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - limitsModules: { - nodes: InferSelectResult[]; - }; + limitsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'LimitsModule', @@ -84,17 +82,26 @@ export class LimitsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'LimitsModuleFilter', + 'LimitsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'LimitsModule', - fieldName: 'limitsModules', + fieldName: 'limitsModule', document, variables, + transform: (data: { + limitsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + limitsModule: data.limitsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/membershipType.ts b/sdk/constructive-react/src/public/orm/models/membershipType.ts index 40fac5490..ee7ed596c 100644 --- a/sdk/constructive-react/src/public/orm/models/membershipType.ts +++ b/sdk/constructive-react/src/public/orm/models/membershipType.ts @@ -70,13 +70,11 @@ export class MembershipTypeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - membershipTypes: { - nodes: InferSelectResult[]; - }; + membershipType: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'MembershipType', @@ -84,17 +82,26 @@ export class MembershipTypeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'MembershipTypeFilter', + 'MembershipTypeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'MembershipType', - fieldName: 'membershipTypes', + fieldName: 'membershipType', document, variables, + transform: (data: { + membershipTypes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + membershipType: data.membershipTypes?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/membershipTypesModule.ts b/sdk/constructive-react/src/public/orm/models/membershipTypesModule.ts index 31807c914..cf72c91fa 100644 --- a/sdk/constructive-react/src/public/orm/models/membershipTypesModule.ts +++ b/sdk/constructive-react/src/public/orm/models/membershipTypesModule.ts @@ -72,13 +72,11 @@ export class MembershipTypesModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - membershipTypesModules: { - nodes: InferSelectResult[]; - }; + membershipTypesModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'MembershipTypesModule', @@ -86,17 +84,26 @@ export class MembershipTypesModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'MembershipTypesModuleFilter', + 'MembershipTypesModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'MembershipTypesModule', - fieldName: 'membershipTypesModules', + fieldName: 'membershipTypesModule', document, variables, + transform: (data: { + membershipTypesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + membershipTypesModule: data.membershipTypesModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/membershipsModule.ts b/sdk/constructive-react/src/public/orm/models/membershipsModule.ts index b1ce2f836..5709ac904 100644 --- a/sdk/constructive-react/src/public/orm/models/membershipsModule.ts +++ b/sdk/constructive-react/src/public/orm/models/membershipsModule.ts @@ -70,13 +70,11 @@ export class MembershipsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - membershipsModules: { - nodes: InferSelectResult[]; - }; + membershipsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'MembershipsModule', @@ -84,17 +82,26 @@ export class MembershipsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'MembershipsModuleFilter', + 'MembershipsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'MembershipsModule', - fieldName: 'membershipsModules', + fieldName: 'membershipsModule', document, variables, + transform: (data: { + membershipsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + membershipsModule: data.membershipsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/migrateFile.ts b/sdk/constructive-react/src/public/orm/models/migrateFile.ts index 35bfa715e..9bc8b9baa 100644 --- a/sdk/constructive-react/src/public/orm/models/migrateFile.ts +++ b/sdk/constructive-react/src/public/orm/models/migrateFile.ts @@ -70,13 +70,11 @@ export class MigrateFileModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - migrateFiles: { - nodes: InferSelectResult[]; - }; + migrateFile: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'MigrateFile', @@ -84,17 +82,26 @@ export class MigrateFileModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'MigrateFileFilter', + 'MigrateFileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'MigrateFile', - fieldName: 'migrateFiles', + fieldName: 'migrateFile', document, variables, + transform: (data: { + migrateFiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + migrateFile: data.migrateFiles?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/nodeTypeRegistry.ts b/sdk/constructive-react/src/public/orm/models/nodeTypeRegistry.ts index 6e640c1c6..83cb41250 100644 --- a/sdk/constructive-react/src/public/orm/models/nodeTypeRegistry.ts +++ b/sdk/constructive-react/src/public/orm/models/nodeTypeRegistry.ts @@ -70,13 +70,11 @@ export class NodeTypeRegistryModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - nodeTypeRegistries: { - nodes: InferSelectResult[]; - }; + nodeTypeRegistry: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'NodeTypeRegistry', @@ -84,17 +82,26 @@ export class NodeTypeRegistryModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'NodeTypeRegistryFilter', + 'NodeTypeRegistryOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'NodeTypeRegistry', - fieldName: 'nodeTypeRegistries', + fieldName: 'nodeTypeRegistry', document, variables, + transform: (data: { + nodeTypeRegistries?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + nodeTypeRegistry: data.nodeTypeRegistries?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/notificationsModule.ts b/sdk/constructive-react/src/public/orm/models/notificationsModule.ts index 58bf0f2c4..dc44d0d69 100644 --- a/sdk/constructive-react/src/public/orm/models/notificationsModule.ts +++ b/sdk/constructive-react/src/public/orm/models/notificationsModule.ts @@ -70,13 +70,11 @@ export class NotificationsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - notificationsModules: { - nodes: InferSelectResult[]; - }; + notificationsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'NotificationsModule', @@ -84,17 +82,26 @@ export class NotificationsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'NotificationsModuleFilter', + 'NotificationsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'NotificationsModule', - fieldName: 'notificationsModules', + fieldName: 'notificationsModule', document, variables, + transform: (data: { + notificationsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + notificationsModule: data.notificationsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/object.ts b/sdk/constructive-react/src/public/orm/models/object.ts index 085bdd4df..8a685b1df 100644 --- a/sdk/constructive-react/src/public/orm/models/object.ts +++ b/sdk/constructive-react/src/public/orm/models/object.ts @@ -70,13 +70,11 @@ export class ObjectModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - objects: { - nodes: InferSelectResult[]; - }; + object: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Object', @@ -84,17 +82,26 @@ export class ObjectModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ObjectFilter', + 'ObjectOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Object', - fieldName: 'objects', + fieldName: 'object', document, variables, + transform: (data: { + objects?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + object: data.objects?.nodes?.[0] ?? null, + }), }); } findOne( @@ -103,7 +110,7 @@ export class ObjectModel { select: S; } & StrictSelect ): QueryBuilder<{ - getNodeAtPath: InferSelectResult | null; + object: InferSelectResult | null; }> { const { document, variables } = buildFindOneDocument( 'Object', @@ -118,7 +125,7 @@ export class ObjectModel { client: this.client, operation: 'query', operationName: 'Object', - fieldName: 'getNodeAtPath', + fieldName: 'object', document, variables, }); diff --git a/sdk/constructive-react/src/public/orm/models/orgAdminGrant.ts b/sdk/constructive-react/src/public/orm/models/orgAdminGrant.ts index e611a8578..7b1337731 100644 --- a/sdk/constructive-react/src/public/orm/models/orgAdminGrant.ts +++ b/sdk/constructive-react/src/public/orm/models/orgAdminGrant.ts @@ -70,13 +70,11 @@ export class OrgAdminGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgAdminGrants: { - nodes: InferSelectResult[]; - }; + orgAdminGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgAdminGrant', @@ -84,17 +82,26 @@ export class OrgAdminGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgAdminGrantFilter', + 'OrgAdminGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgAdminGrant', - fieldName: 'orgAdminGrants', + fieldName: 'orgAdminGrant', document, variables, + transform: (data: { + orgAdminGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgAdminGrant: data.orgAdminGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/orgChartEdge.ts b/sdk/constructive-react/src/public/orm/models/orgChartEdge.ts index 6c6fc84cc..8a43b83a9 100644 --- a/sdk/constructive-react/src/public/orm/models/orgChartEdge.ts +++ b/sdk/constructive-react/src/public/orm/models/orgChartEdge.ts @@ -70,13 +70,11 @@ export class OrgChartEdgeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgChartEdges: { - nodes: InferSelectResult[]; - }; + orgChartEdge: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgChartEdge', @@ -84,17 +82,26 @@ export class OrgChartEdgeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgChartEdgeFilter', + 'OrgChartEdgeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgChartEdge', - fieldName: 'orgChartEdges', + fieldName: 'orgChartEdge', document, variables, + transform: (data: { + orgChartEdges?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgChartEdge: data.orgChartEdges?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/orgChartEdgeGrant.ts b/sdk/constructive-react/src/public/orm/models/orgChartEdgeGrant.ts index 58345c78d..168a6fe3d 100644 --- a/sdk/constructive-react/src/public/orm/models/orgChartEdgeGrant.ts +++ b/sdk/constructive-react/src/public/orm/models/orgChartEdgeGrant.ts @@ -70,13 +70,11 @@ export class OrgChartEdgeGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgChartEdgeGrants: { - nodes: InferSelectResult[]; - }; + orgChartEdgeGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgChartEdgeGrant', @@ -84,17 +82,26 @@ export class OrgChartEdgeGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgChartEdgeGrantFilter', + 'OrgChartEdgeGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgChartEdgeGrant', - fieldName: 'orgChartEdgeGrants', + fieldName: 'orgChartEdgeGrant', document, variables, + transform: (data: { + orgChartEdgeGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgChartEdgeGrant: data.orgChartEdgeGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/orgClaimedInvite.ts b/sdk/constructive-react/src/public/orm/models/orgClaimedInvite.ts index 475de7291..e1a3aecaf 100644 --- a/sdk/constructive-react/src/public/orm/models/orgClaimedInvite.ts +++ b/sdk/constructive-react/src/public/orm/models/orgClaimedInvite.ts @@ -70,13 +70,11 @@ export class OrgClaimedInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgClaimedInvites: { - nodes: InferSelectResult[]; - }; + orgClaimedInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgClaimedInvite', @@ -84,17 +82,26 @@ export class OrgClaimedInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgClaimedInviteFilter', + 'OrgClaimedInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgClaimedInvite', - fieldName: 'orgClaimedInvites', + fieldName: 'orgClaimedInvite', document, variables, + transform: (data: { + orgClaimedInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgClaimedInvite: data.orgClaimedInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/orgGetManagersRecord.ts b/sdk/constructive-react/src/public/orm/models/orgGetManagersRecord.ts index 9a0cefa8a..7c333b76d 100644 --- a/sdk/constructive-react/src/public/orm/models/orgGetManagersRecord.ts +++ b/sdk/constructive-react/src/public/orm/models/orgGetManagersRecord.ts @@ -70,13 +70,11 @@ export class OrgGetManagersRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGetManagers: { - nodes: InferSelectResult[]; - }; + orgGetManagersRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGetManagersRecord', @@ -84,17 +82,26 @@ export class OrgGetManagersRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGetManagersRecordFilter', + 'OrgGetManagersRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGetManagersRecord', - fieldName: 'orgGetManagers', + fieldName: 'orgGetManagersRecord', document, variables, + transform: (data: { + orgGetManagers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGetManagersRecord: data.orgGetManagers?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-react/src/public/orm/models/orgGetSubordinatesRecord.ts b/sdk/constructive-react/src/public/orm/models/orgGetSubordinatesRecord.ts index 5eeec50ca..f259e1043 100644 --- a/sdk/constructive-react/src/public/orm/models/orgGetSubordinatesRecord.ts +++ b/sdk/constructive-react/src/public/orm/models/orgGetSubordinatesRecord.ts @@ -72,13 +72,11 @@ export class OrgGetSubordinatesRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGetSubordinates: { - nodes: InferSelectResult[]; - }; + orgGetSubordinatesRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGetSubordinatesRecord', @@ -86,17 +84,26 @@ export class OrgGetSubordinatesRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGetSubordinatesRecordFilter', + 'OrgGetSubordinatesRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGetSubordinatesRecord', - fieldName: 'orgGetSubordinates', + fieldName: 'orgGetSubordinatesRecord', document, variables, + transform: (data: { + orgGetSubordinates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGetSubordinatesRecord: data.orgGetSubordinates?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-react/src/public/orm/models/orgGrant.ts b/sdk/constructive-react/src/public/orm/models/orgGrant.ts index 291264ec5..c8e74f5cc 100644 --- a/sdk/constructive-react/src/public/orm/models/orgGrant.ts +++ b/sdk/constructive-react/src/public/orm/models/orgGrant.ts @@ -70,13 +70,11 @@ export class OrgGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGrants: { - nodes: InferSelectResult[]; - }; + orgGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGrant', @@ -84,17 +82,26 @@ export class OrgGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGrantFilter', + 'OrgGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGrant', - fieldName: 'orgGrants', + fieldName: 'orgGrant', document, variables, + transform: (data: { + orgGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGrant: data.orgGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/orgInvite.ts b/sdk/constructive-react/src/public/orm/models/orgInvite.ts index 639cb8dd5..8d7931f07 100644 --- a/sdk/constructive-react/src/public/orm/models/orgInvite.ts +++ b/sdk/constructive-react/src/public/orm/models/orgInvite.ts @@ -70,13 +70,11 @@ export class OrgInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgInvites: { - nodes: InferSelectResult[]; - }; + orgInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgInvite', @@ -84,17 +82,26 @@ export class OrgInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgInviteFilter', + 'OrgInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgInvite', - fieldName: 'orgInvites', + fieldName: 'orgInvite', document, variables, + transform: (data: { + orgInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgInvite: data.orgInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/orgLimit.ts b/sdk/constructive-react/src/public/orm/models/orgLimit.ts index 2d7937963..48a3932f2 100644 --- a/sdk/constructive-react/src/public/orm/models/orgLimit.ts +++ b/sdk/constructive-react/src/public/orm/models/orgLimit.ts @@ -70,13 +70,11 @@ export class OrgLimitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimits: { - nodes: InferSelectResult[]; - }; + orgLimit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimit', @@ -84,17 +82,26 @@ export class OrgLimitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitFilter', + 'OrgLimitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimit', - fieldName: 'orgLimits', + fieldName: 'orgLimit', document, variables, + transform: (data: { + orgLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimit: data.orgLimits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/orgLimitAggregate.ts b/sdk/constructive-react/src/public/orm/models/orgLimitAggregate.ts index daee50aee..d74b9e7d9 100644 --- a/sdk/constructive-react/src/public/orm/models/orgLimitAggregate.ts +++ b/sdk/constructive-react/src/public/orm/models/orgLimitAggregate.ts @@ -70,13 +70,11 @@ export class OrgLimitAggregateModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitAggregates: { - nodes: InferSelectResult[]; - }; + orgLimitAggregate: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitAggregate', @@ -84,17 +82,26 @@ export class OrgLimitAggregateModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitAggregateFilter', + 'OrgLimitAggregateOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitAggregate', - fieldName: 'orgLimitAggregates', + fieldName: 'orgLimitAggregate', document, variables, + transform: (data: { + orgLimitAggregates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitAggregate: data.orgLimitAggregates?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/orgLimitDefault.ts b/sdk/constructive-react/src/public/orm/models/orgLimitDefault.ts index bf0cfcf5e..7e55bfd1f 100644 --- a/sdk/constructive-react/src/public/orm/models/orgLimitDefault.ts +++ b/sdk/constructive-react/src/public/orm/models/orgLimitDefault.ts @@ -70,13 +70,11 @@ export class OrgLimitDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitDefaults: { - nodes: InferSelectResult[]; - }; + orgLimitDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitDefault', @@ -84,17 +82,26 @@ export class OrgLimitDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitDefaultFilter', + 'OrgLimitDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitDefault', - fieldName: 'orgLimitDefaults', + fieldName: 'orgLimitDefault', document, variables, + transform: (data: { + orgLimitDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitDefault: data.orgLimitDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/orgLimitEvent.ts b/sdk/constructive-react/src/public/orm/models/orgLimitEvent.ts index 6414ba0ed..c259e325f 100644 --- a/sdk/constructive-react/src/public/orm/models/orgLimitEvent.ts +++ b/sdk/constructive-react/src/public/orm/models/orgLimitEvent.ts @@ -70,13 +70,11 @@ export class OrgLimitEventModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitEvents: { - nodes: InferSelectResult[]; - }; + orgLimitEvent: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitEvent', @@ -84,17 +82,26 @@ export class OrgLimitEventModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitEventFilter', + 'OrgLimitEventOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitEvent', - fieldName: 'orgLimitEvents', + fieldName: 'orgLimitEvent', document, variables, + transform: (data: { + orgLimitEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitEvent: data.orgLimitEvents?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-react/src/public/orm/models/orgMember.ts b/sdk/constructive-react/src/public/orm/models/orgMember.ts index dd1d20e45..44f5608f4 100644 --- a/sdk/constructive-react/src/public/orm/models/orgMember.ts +++ b/sdk/constructive-react/src/public/orm/models/orgMember.ts @@ -70,13 +70,11 @@ export class OrgMemberModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembers: { - nodes: InferSelectResult[]; - }; + orgMember: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMember', @@ -84,17 +82,26 @@ export class OrgMemberModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMemberFilter', + 'OrgMemberOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMember', - fieldName: 'orgMembers', + fieldName: 'orgMember', document, variables, + transform: (data: { + orgMembers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMember: data.orgMembers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/orgMemberProfile.ts b/sdk/constructive-react/src/public/orm/models/orgMemberProfile.ts index de551ba79..77357e174 100644 --- a/sdk/constructive-react/src/public/orm/models/orgMemberProfile.ts +++ b/sdk/constructive-react/src/public/orm/models/orgMemberProfile.ts @@ -70,13 +70,11 @@ export class OrgMemberProfileModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMemberProfiles: { - nodes: InferSelectResult[]; - }; + orgMemberProfile: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMemberProfile', @@ -84,17 +82,26 @@ export class OrgMemberProfileModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMemberProfile', - fieldName: 'orgMemberProfiles', + fieldName: 'orgMemberProfile', document, variables, + transform: (data: { + orgMemberProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMemberProfile: data.orgMemberProfiles?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/orgMembership.ts b/sdk/constructive-react/src/public/orm/models/orgMembership.ts index c0173b3e1..623ec08fe 100644 --- a/sdk/constructive-react/src/public/orm/models/orgMembership.ts +++ b/sdk/constructive-react/src/public/orm/models/orgMembership.ts @@ -70,13 +70,11 @@ export class OrgMembershipModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMemberships: { - nodes: InferSelectResult[]; - }; + orgMembership: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembership', @@ -84,17 +82,26 @@ export class OrgMembershipModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipFilter', + 'OrgMembershipOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembership', - fieldName: 'orgMemberships', + fieldName: 'orgMembership', document, variables, + transform: (data: { + orgMemberships?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembership: data.orgMemberships?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/orgMembershipDefault.ts b/sdk/constructive-react/src/public/orm/models/orgMembershipDefault.ts index 09d525bec..344131505 100644 --- a/sdk/constructive-react/src/public/orm/models/orgMembershipDefault.ts +++ b/sdk/constructive-react/src/public/orm/models/orgMembershipDefault.ts @@ -72,13 +72,11 @@ export class OrgMembershipDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembershipDefaults: { - nodes: InferSelectResult[]; - }; + orgMembershipDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembershipDefault', @@ -86,17 +84,26 @@ export class OrgMembershipDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipDefaultFilter', + 'OrgMembershipDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembershipDefault', - fieldName: 'orgMembershipDefaults', + fieldName: 'orgMembershipDefault', document, variables, + transform: (data: { + orgMembershipDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembershipDefault: data.orgMembershipDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/orgMembershipSetting.ts b/sdk/constructive-react/src/public/orm/models/orgMembershipSetting.ts index 1efc26410..46801fc91 100644 --- a/sdk/constructive-react/src/public/orm/models/orgMembershipSetting.ts +++ b/sdk/constructive-react/src/public/orm/models/orgMembershipSetting.ts @@ -72,13 +72,11 @@ export class OrgMembershipSettingModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembershipSettings: { - nodes: InferSelectResult[]; - }; + orgMembershipSetting: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembershipSetting', @@ -86,17 +84,26 @@ export class OrgMembershipSettingModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipSettingFilter', + 'OrgMembershipSettingOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembershipSetting', - fieldName: 'orgMembershipSettings', + fieldName: 'orgMembershipSetting', document, variables, + transform: (data: { + orgMembershipSettings?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembershipSetting: data.orgMembershipSettings?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/orgOwnerGrant.ts b/sdk/constructive-react/src/public/orm/models/orgOwnerGrant.ts index bdf045511..9614dce8f 100644 --- a/sdk/constructive-react/src/public/orm/models/orgOwnerGrant.ts +++ b/sdk/constructive-react/src/public/orm/models/orgOwnerGrant.ts @@ -70,13 +70,11 @@ export class OrgOwnerGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgOwnerGrants: { - nodes: InferSelectResult[]; - }; + orgOwnerGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgOwnerGrant', @@ -84,17 +82,26 @@ export class OrgOwnerGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgOwnerGrantFilter', + 'OrgOwnerGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgOwnerGrant', - fieldName: 'orgOwnerGrants', + fieldName: 'orgOwnerGrant', document, variables, + transform: (data: { + orgOwnerGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgOwnerGrant: data.orgOwnerGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/orgPermission.ts b/sdk/constructive-react/src/public/orm/models/orgPermission.ts index c5910be63..7bdc90632 100644 --- a/sdk/constructive-react/src/public/orm/models/orgPermission.ts +++ b/sdk/constructive-react/src/public/orm/models/orgPermission.ts @@ -70,13 +70,11 @@ export class OrgPermissionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgPermissions: { - nodes: InferSelectResult[]; - }; + orgPermission: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgPermission', @@ -84,17 +82,26 @@ export class OrgPermissionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgPermissionFilter', + 'OrgPermissionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgPermission', - fieldName: 'orgPermissions', + fieldName: 'orgPermission', document, variables, + transform: (data: { + orgPermissions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgPermission: data.orgPermissions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/orgPermissionDefault.ts b/sdk/constructive-react/src/public/orm/models/orgPermissionDefault.ts index 40389a11b..8d00b9932 100644 --- a/sdk/constructive-react/src/public/orm/models/orgPermissionDefault.ts +++ b/sdk/constructive-react/src/public/orm/models/orgPermissionDefault.ts @@ -72,13 +72,11 @@ export class OrgPermissionDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgPermissionDefaults: { - nodes: InferSelectResult[]; - }; + orgPermissionDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgPermissionDefault', @@ -86,17 +84,26 @@ export class OrgPermissionDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgPermissionDefaultFilter', + 'OrgPermissionDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgPermissionDefault', - fieldName: 'orgPermissionDefaults', + fieldName: 'orgPermissionDefault', document, variables, + transform: (data: { + orgPermissionDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgPermissionDefault: data.orgPermissionDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/permissionsModule.ts b/sdk/constructive-react/src/public/orm/models/permissionsModule.ts index 6066e6218..5fb22b44d 100644 --- a/sdk/constructive-react/src/public/orm/models/permissionsModule.ts +++ b/sdk/constructive-react/src/public/orm/models/permissionsModule.ts @@ -70,13 +70,11 @@ export class PermissionsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - permissionsModules: { - nodes: InferSelectResult[]; - }; + permissionsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PermissionsModule', @@ -84,17 +82,26 @@ export class PermissionsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PermissionsModuleFilter', + 'PermissionsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PermissionsModule', - fieldName: 'permissionsModules', + fieldName: 'permissionsModule', document, variables, + transform: (data: { + permissionsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + permissionsModule: data.permissionsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/phoneNumber.ts b/sdk/constructive-react/src/public/orm/models/phoneNumber.ts index a711db272..0803908e2 100644 --- a/sdk/constructive-react/src/public/orm/models/phoneNumber.ts +++ b/sdk/constructive-react/src/public/orm/models/phoneNumber.ts @@ -70,13 +70,11 @@ export class PhoneNumberModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - phoneNumbers: { - nodes: InferSelectResult[]; - }; + phoneNumber: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PhoneNumber', @@ -84,17 +82,26 @@ export class PhoneNumberModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PhoneNumberFilter', + 'PhoneNumberOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PhoneNumber', - fieldName: 'phoneNumbers', + fieldName: 'phoneNumber', document, variables, + transform: (data: { + phoneNumbers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + phoneNumber: data.phoneNumbers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/phoneNumbersModule.ts b/sdk/constructive-react/src/public/orm/models/phoneNumbersModule.ts index 9b3da81ae..55f64339e 100644 --- a/sdk/constructive-react/src/public/orm/models/phoneNumbersModule.ts +++ b/sdk/constructive-react/src/public/orm/models/phoneNumbersModule.ts @@ -70,13 +70,11 @@ export class PhoneNumbersModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - phoneNumbersModules: { - nodes: InferSelectResult[]; - }; + phoneNumbersModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PhoneNumbersModule', @@ -84,17 +82,26 @@ export class PhoneNumbersModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PhoneNumbersModuleFilter', + 'PhoneNumbersModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PhoneNumbersModule', - fieldName: 'phoneNumbersModules', + fieldName: 'phoneNumbersModule', document, variables, + transform: (data: { + phoneNumbersModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + phoneNumbersModule: data.phoneNumbersModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/plansModule.ts b/sdk/constructive-react/src/public/orm/models/plansModule.ts index e310fa581..f13f1849b 100644 --- a/sdk/constructive-react/src/public/orm/models/plansModule.ts +++ b/sdk/constructive-react/src/public/orm/models/plansModule.ts @@ -70,13 +70,11 @@ export class PlansModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - plansModules: { - nodes: InferSelectResult[]; - }; + plansModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PlansModule', @@ -84,17 +82,26 @@ export class PlansModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PlansModuleFilter', + 'PlansModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PlansModule', - fieldName: 'plansModules', + fieldName: 'plansModule', document, variables, + transform: (data: { + plansModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + plansModule: data.plansModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/policy.ts b/sdk/constructive-react/src/public/orm/models/policy.ts index c76c4a3ad..c60088703 100644 --- a/sdk/constructive-react/src/public/orm/models/policy.ts +++ b/sdk/constructive-react/src/public/orm/models/policy.ts @@ -70,13 +70,11 @@ export class PolicyModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - policies: { - nodes: InferSelectResult[]; - }; + policy: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Policy', @@ -84,17 +82,26 @@ export class PolicyModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PolicyFilter', + 'PolicyOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Policy', - fieldName: 'policies', + fieldName: 'policy', document, variables, + transform: (data: { + policies?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + policy: data.policies?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/primaryKeyConstraint.ts b/sdk/constructive-react/src/public/orm/models/primaryKeyConstraint.ts index f1d79e61c..e73aca57d 100644 --- a/sdk/constructive-react/src/public/orm/models/primaryKeyConstraint.ts +++ b/sdk/constructive-react/src/public/orm/models/primaryKeyConstraint.ts @@ -72,13 +72,11 @@ export class PrimaryKeyConstraintModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - primaryKeyConstraints: { - nodes: InferSelectResult[]; - }; + primaryKeyConstraint: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PrimaryKeyConstraint', @@ -86,17 +84,26 @@ export class PrimaryKeyConstraintModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PrimaryKeyConstraintFilter', + 'PrimaryKeyConstraintOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PrimaryKeyConstraint', - fieldName: 'primaryKeyConstraints', + fieldName: 'primaryKeyConstraint', document, variables, + transform: (data: { + primaryKeyConstraints?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + primaryKeyConstraint: data.primaryKeyConstraints?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/profilesModule.ts b/sdk/constructive-react/src/public/orm/models/profilesModule.ts index 7841e9222..f1c152e77 100644 --- a/sdk/constructive-react/src/public/orm/models/profilesModule.ts +++ b/sdk/constructive-react/src/public/orm/models/profilesModule.ts @@ -70,13 +70,11 @@ export class ProfilesModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - profilesModules: { - nodes: InferSelectResult[]; - }; + profilesModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ProfilesModule', @@ -84,17 +82,26 @@ export class ProfilesModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ProfilesModuleFilter', + 'ProfilesModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ProfilesModule', - fieldName: 'profilesModules', + fieldName: 'profilesModule', document, variables, + transform: (data: { + profilesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + profilesModule: data.profilesModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/rateLimitsModule.ts b/sdk/constructive-react/src/public/orm/models/rateLimitsModule.ts index b541082db..9567ccaa2 100644 --- a/sdk/constructive-react/src/public/orm/models/rateLimitsModule.ts +++ b/sdk/constructive-react/src/public/orm/models/rateLimitsModule.ts @@ -70,13 +70,11 @@ export class RateLimitsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - rateLimitsModules: { - nodes: InferSelectResult[]; - }; + rateLimitsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'RateLimitsModule', @@ -84,17 +82,26 @@ export class RateLimitsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RateLimitsModuleFilter', + 'RateLimitsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'RateLimitsModule', - fieldName: 'rateLimitsModules', + fieldName: 'rateLimitsModule', document, variables, + transform: (data: { + rateLimitsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + rateLimitsModule: data.rateLimitsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/ref.ts b/sdk/constructive-react/src/public/orm/models/ref.ts index 016c70644..5c3419d89 100644 --- a/sdk/constructive-react/src/public/orm/models/ref.ts +++ b/sdk/constructive-react/src/public/orm/models/ref.ts @@ -70,13 +70,11 @@ export class RefModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - refs: { - nodes: InferSelectResult[]; - }; + ref: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Ref', @@ -84,17 +82,26 @@ export class RefModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RefFilter', + 'RefOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Ref', - fieldName: 'refs', + fieldName: 'ref', document, variables, + transform: (data: { + refs?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + ref: data.refs?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/relationProvision.ts b/sdk/constructive-react/src/public/orm/models/relationProvision.ts index 5d27d5872..eea0a0101 100644 --- a/sdk/constructive-react/src/public/orm/models/relationProvision.ts +++ b/sdk/constructive-react/src/public/orm/models/relationProvision.ts @@ -70,13 +70,11 @@ export class RelationProvisionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - relationProvisions: { - nodes: InferSelectResult[]; - }; + relationProvision: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'RelationProvision', @@ -84,17 +82,26 @@ export class RelationProvisionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RelationProvisionFilter', + 'RelationProvisionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'RelationProvision', - fieldName: 'relationProvisions', + fieldName: 'relationProvision', document, variables, + transform: (data: { + relationProvisions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + relationProvision: data.relationProvisions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/rlsModule.ts b/sdk/constructive-react/src/public/orm/models/rlsModule.ts index 750815c7b..5e1ed1afc 100644 --- a/sdk/constructive-react/src/public/orm/models/rlsModule.ts +++ b/sdk/constructive-react/src/public/orm/models/rlsModule.ts @@ -70,13 +70,11 @@ export class RlsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - rlsModules: { - nodes: InferSelectResult[]; - }; + rlsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'RlsModule', @@ -84,17 +82,26 @@ export class RlsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RlsModuleFilter', + 'RlsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'RlsModule', - fieldName: 'rlsModules', + fieldName: 'rlsModule', document, variables, + transform: (data: { + rlsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + rlsModule: data.rlsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/roleType.ts b/sdk/constructive-react/src/public/orm/models/roleType.ts index 5b258dc9a..8b256a0dc 100644 --- a/sdk/constructive-react/src/public/orm/models/roleType.ts +++ b/sdk/constructive-react/src/public/orm/models/roleType.ts @@ -70,13 +70,11 @@ export class RoleTypeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - roleTypes: { - nodes: InferSelectResult[]; - }; + roleType: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'RoleType', @@ -84,17 +82,26 @@ export class RoleTypeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RoleTypeFilter', + 'RoleTypeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'RoleType', - fieldName: 'roleTypes', + fieldName: 'roleType', document, variables, + transform: (data: { + roleTypes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + roleType: data.roleTypes?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/schema.ts b/sdk/constructive-react/src/public/orm/models/schema.ts index 5bc546943..3d0af9820 100644 --- a/sdk/constructive-react/src/public/orm/models/schema.ts +++ b/sdk/constructive-react/src/public/orm/models/schema.ts @@ -70,13 +70,11 @@ export class SchemaModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - schemas: { - nodes: InferSelectResult[]; - }; + schema: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Schema', @@ -84,17 +82,26 @@ export class SchemaModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SchemaFilter', + 'SchemaOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Schema', - fieldName: 'schemas', + fieldName: 'schema', document, variables, + transform: (data: { + schemas?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + schema: data.schemas?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/schemaGrant.ts b/sdk/constructive-react/src/public/orm/models/schemaGrant.ts index 97671a523..dfe756975 100644 --- a/sdk/constructive-react/src/public/orm/models/schemaGrant.ts +++ b/sdk/constructive-react/src/public/orm/models/schemaGrant.ts @@ -70,13 +70,11 @@ export class SchemaGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - schemaGrants: { - nodes: InferSelectResult[]; - }; + schemaGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SchemaGrant', @@ -84,17 +82,26 @@ export class SchemaGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SchemaGrantFilter', + 'SchemaGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SchemaGrant', - fieldName: 'schemaGrants', + fieldName: 'schemaGrant', document, variables, + transform: (data: { + schemaGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + schemaGrant: data.schemaGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/secretsModule.ts b/sdk/constructive-react/src/public/orm/models/secretsModule.ts index 808b0154d..1e91d4823 100644 --- a/sdk/constructive-react/src/public/orm/models/secretsModule.ts +++ b/sdk/constructive-react/src/public/orm/models/secretsModule.ts @@ -70,13 +70,11 @@ export class SecretsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - secretsModules: { - nodes: InferSelectResult[]; - }; + secretsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SecretsModule', @@ -84,17 +82,26 @@ export class SecretsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SecretsModuleFilter', + 'SecretsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SecretsModule', - fieldName: 'secretsModules', + fieldName: 'secretsModule', document, variables, + transform: (data: { + secretsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + secretsModule: data.secretsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/secureTableProvision.ts b/sdk/constructive-react/src/public/orm/models/secureTableProvision.ts index 585ea33c9..ca0ef2a68 100644 --- a/sdk/constructive-react/src/public/orm/models/secureTableProvision.ts +++ b/sdk/constructive-react/src/public/orm/models/secureTableProvision.ts @@ -72,13 +72,11 @@ export class SecureTableProvisionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - secureTableProvisions: { - nodes: InferSelectResult[]; - }; + secureTableProvision: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SecureTableProvision', @@ -86,17 +84,26 @@ export class SecureTableProvisionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SecureTableProvisionFilter', + 'SecureTableProvisionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SecureTableProvision', - fieldName: 'secureTableProvisions', + fieldName: 'secureTableProvision', document, variables, + transform: (data: { + secureTableProvisions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + secureTableProvision: data.secureTableProvisions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/sessionSecretsModule.ts b/sdk/constructive-react/src/public/orm/models/sessionSecretsModule.ts index b333c87f0..474a95320 100644 --- a/sdk/constructive-react/src/public/orm/models/sessionSecretsModule.ts +++ b/sdk/constructive-react/src/public/orm/models/sessionSecretsModule.ts @@ -72,13 +72,11 @@ export class SessionSecretsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - sessionSecretsModules: { - nodes: InferSelectResult[]; - }; + sessionSecretsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SessionSecretsModule', @@ -86,17 +84,26 @@ export class SessionSecretsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SessionSecretsModuleFilter', + 'SessionSecretsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SessionSecretsModule', - fieldName: 'sessionSecretsModules', + fieldName: 'sessionSecretsModule', document, variables, + transform: (data: { + sessionSecretsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + sessionSecretsModule: data.sessionSecretsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/sessionsModule.ts b/sdk/constructive-react/src/public/orm/models/sessionsModule.ts index 01cf5198a..b66cc7be3 100644 --- a/sdk/constructive-react/src/public/orm/models/sessionsModule.ts +++ b/sdk/constructive-react/src/public/orm/models/sessionsModule.ts @@ -70,13 +70,11 @@ export class SessionsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - sessionsModules: { - nodes: InferSelectResult[]; - }; + sessionsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SessionsModule', @@ -84,17 +82,26 @@ export class SessionsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SessionsModuleFilter', + 'SessionsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SessionsModule', - fieldName: 'sessionsModules', + fieldName: 'sessionsModule', document, variables, + transform: (data: { + sessionsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + sessionsModule: data.sessionsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/site.ts b/sdk/constructive-react/src/public/orm/models/site.ts index fa790b4d1..070a32b24 100644 --- a/sdk/constructive-react/src/public/orm/models/site.ts +++ b/sdk/constructive-react/src/public/orm/models/site.ts @@ -70,13 +70,11 @@ export class SiteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - sites: { - nodes: InferSelectResult[]; - }; + site: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Site', @@ -84,17 +82,26 @@ export class SiteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SiteFilter', + 'SiteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Site', - fieldName: 'sites', + fieldName: 'site', document, variables, + transform: (data: { + sites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + site: data.sites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/siteMetadatum.ts b/sdk/constructive-react/src/public/orm/models/siteMetadatum.ts index 629c19725..de85238e4 100644 --- a/sdk/constructive-react/src/public/orm/models/siteMetadatum.ts +++ b/sdk/constructive-react/src/public/orm/models/siteMetadatum.ts @@ -70,13 +70,11 @@ export class SiteMetadatumModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - siteMetadata: { - nodes: InferSelectResult[]; - }; + siteMetadatum: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SiteMetadatum', @@ -84,17 +82,26 @@ export class SiteMetadatumModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SiteMetadatumFilter', + 'SiteMetadatumOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SiteMetadatum', - fieldName: 'siteMetadata', + fieldName: 'siteMetadatum', document, variables, + transform: (data: { + siteMetadata?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + siteMetadatum: data.siteMetadata?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/siteModule.ts b/sdk/constructive-react/src/public/orm/models/siteModule.ts index 943a6d7ae..b890423fe 100644 --- a/sdk/constructive-react/src/public/orm/models/siteModule.ts +++ b/sdk/constructive-react/src/public/orm/models/siteModule.ts @@ -70,13 +70,11 @@ export class SiteModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - siteModules: { - nodes: InferSelectResult[]; - }; + siteModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SiteModule', @@ -84,17 +82,26 @@ export class SiteModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SiteModuleFilter', + 'SiteModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SiteModule', - fieldName: 'siteModules', + fieldName: 'siteModule', document, variables, + transform: (data: { + siteModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + siteModule: data.siteModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/siteTheme.ts b/sdk/constructive-react/src/public/orm/models/siteTheme.ts index da7e85ab8..57b9cadc5 100644 --- a/sdk/constructive-react/src/public/orm/models/siteTheme.ts +++ b/sdk/constructive-react/src/public/orm/models/siteTheme.ts @@ -70,13 +70,11 @@ export class SiteThemeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - siteThemes: { - nodes: InferSelectResult[]; - }; + siteTheme: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SiteTheme', @@ -84,17 +82,26 @@ export class SiteThemeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SiteThemeFilter', + 'SiteThemeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SiteTheme', - fieldName: 'siteThemes', + fieldName: 'siteTheme', document, variables, + transform: (data: { + siteThemes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + siteTheme: data.siteThemes?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/spatialRelation.ts b/sdk/constructive-react/src/public/orm/models/spatialRelation.ts index c1d09c31a..fe266c9d3 100644 --- a/sdk/constructive-react/src/public/orm/models/spatialRelation.ts +++ b/sdk/constructive-react/src/public/orm/models/spatialRelation.ts @@ -70,13 +70,11 @@ export class SpatialRelationModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - spatialRelations: { - nodes: InferSelectResult[]; - }; + spatialRelation: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SpatialRelation', @@ -84,17 +82,26 @@ export class SpatialRelationModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SpatialRelationFilter', + 'SpatialRelationOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SpatialRelation', - fieldName: 'spatialRelations', + fieldName: 'spatialRelation', document, variables, + transform: (data: { + spatialRelations?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + spatialRelation: data.spatialRelations?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/sqlAction.ts b/sdk/constructive-react/src/public/orm/models/sqlAction.ts index 449f16020..74b441868 100644 --- a/sdk/constructive-react/src/public/orm/models/sqlAction.ts +++ b/sdk/constructive-react/src/public/orm/models/sqlAction.ts @@ -70,13 +70,11 @@ export class SqlActionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - sqlActions: { - nodes: InferSelectResult[]; - }; + sqlAction: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SqlAction', @@ -84,17 +82,26 @@ export class SqlActionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SqlActionFilter', + 'SqlActionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SqlAction', - fieldName: 'sqlActions', + fieldName: 'sqlAction', document, variables, + transform: (data: { + sqlActions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + sqlAction: data.sqlActions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/storageModule.ts b/sdk/constructive-react/src/public/orm/models/storageModule.ts index cbfeb5b1e..e359f6471 100644 --- a/sdk/constructive-react/src/public/orm/models/storageModule.ts +++ b/sdk/constructive-react/src/public/orm/models/storageModule.ts @@ -70,13 +70,11 @@ export class StorageModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - storageModules: { - nodes: InferSelectResult[]; - }; + storageModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'StorageModule', @@ -84,17 +82,26 @@ export class StorageModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'StorageModuleFilter', + 'StorageModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'StorageModule', - fieldName: 'storageModules', + fieldName: 'storageModule', document, variables, + transform: (data: { + storageModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + storageModule: data.storageModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/store.ts b/sdk/constructive-react/src/public/orm/models/store.ts index f249ee921..f80e63890 100644 --- a/sdk/constructive-react/src/public/orm/models/store.ts +++ b/sdk/constructive-react/src/public/orm/models/store.ts @@ -70,13 +70,11 @@ export class StoreModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - stores: { - nodes: InferSelectResult[]; - }; + store: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Store', @@ -84,17 +82,26 @@ export class StoreModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'StoreFilter', + 'StoreOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Store', - fieldName: 'stores', + fieldName: 'store', document, variables, + transform: (data: { + stores?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + store: data.stores?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/table.ts b/sdk/constructive-react/src/public/orm/models/table.ts index c10b604a3..db1c5d3a9 100644 --- a/sdk/constructive-react/src/public/orm/models/table.ts +++ b/sdk/constructive-react/src/public/orm/models/table.ts @@ -70,13 +70,11 @@ export class TableModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - tables: { - nodes: InferSelectResult[]; - }; + table: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Table', @@ -84,17 +82,26 @@ export class TableModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'TableFilter', + 'TableOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Table', - fieldName: 'tables', + fieldName: 'table', document, variables, + transform: (data: { + tables?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + table: data.tables?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/tableGrant.ts b/sdk/constructive-react/src/public/orm/models/tableGrant.ts index 02d19136c..e05b44f2b 100644 --- a/sdk/constructive-react/src/public/orm/models/tableGrant.ts +++ b/sdk/constructive-react/src/public/orm/models/tableGrant.ts @@ -70,13 +70,11 @@ export class TableGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - tableGrants: { - nodes: InferSelectResult[]; - }; + tableGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'TableGrant', @@ -84,17 +82,26 @@ export class TableGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'TableGrantFilter', + 'TableGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'TableGrant', - fieldName: 'tableGrants', + fieldName: 'tableGrant', document, variables, + transform: (data: { + tableGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + tableGrant: data.tableGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/trigger.ts b/sdk/constructive-react/src/public/orm/models/trigger.ts index 3e2404f0e..f4812bc6e 100644 --- a/sdk/constructive-react/src/public/orm/models/trigger.ts +++ b/sdk/constructive-react/src/public/orm/models/trigger.ts @@ -70,13 +70,11 @@ export class TriggerModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - triggers: { - nodes: InferSelectResult[]; - }; + trigger: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Trigger', @@ -84,17 +82,26 @@ export class TriggerModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'TriggerFilter', + 'TriggerOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Trigger', - fieldName: 'triggers', + fieldName: 'trigger', document, variables, + transform: (data: { + triggers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + trigger: data.triggers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/triggerFunction.ts b/sdk/constructive-react/src/public/orm/models/triggerFunction.ts index 999438070..d2bd543aa 100644 --- a/sdk/constructive-react/src/public/orm/models/triggerFunction.ts +++ b/sdk/constructive-react/src/public/orm/models/triggerFunction.ts @@ -70,13 +70,11 @@ export class TriggerFunctionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - triggerFunctions: { - nodes: InferSelectResult[]; - }; + triggerFunction: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'TriggerFunction', @@ -84,17 +82,26 @@ export class TriggerFunctionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'TriggerFunctionFilter', + 'TriggerFunctionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'TriggerFunction', - fieldName: 'triggerFunctions', + fieldName: 'triggerFunction', document, variables, + transform: (data: { + triggerFunctions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + triggerFunction: data.triggerFunctions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/uniqueConstraint.ts b/sdk/constructive-react/src/public/orm/models/uniqueConstraint.ts index de5ba6f76..3c1dad93d 100644 --- a/sdk/constructive-react/src/public/orm/models/uniqueConstraint.ts +++ b/sdk/constructive-react/src/public/orm/models/uniqueConstraint.ts @@ -70,13 +70,11 @@ export class UniqueConstraintModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - uniqueConstraints: { - nodes: InferSelectResult[]; - }; + uniqueConstraint: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'UniqueConstraint', @@ -84,17 +82,26 @@ export class UniqueConstraintModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UniqueConstraintFilter', + 'UniqueConstraintOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'UniqueConstraint', - fieldName: 'uniqueConstraints', + fieldName: 'uniqueConstraint', document, variables, + transform: (data: { + uniqueConstraints?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + uniqueConstraint: data.uniqueConstraints?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/user.ts b/sdk/constructive-react/src/public/orm/models/user.ts index aedd4fcc8..893581835 100644 --- a/sdk/constructive-react/src/public/orm/models/user.ts +++ b/sdk/constructive-react/src/public/orm/models/user.ts @@ -70,13 +70,11 @@ export class UserModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - users: { - nodes: InferSelectResult[]; - }; + user: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'User', @@ -84,17 +82,26 @@ export class UserModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UserFilter', + 'UserOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'User', - fieldName: 'users', + fieldName: 'user', document, variables, + transform: (data: { + users?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + user: data.users?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/userAuthModule.ts b/sdk/constructive-react/src/public/orm/models/userAuthModule.ts index 431026d87..15fe6a854 100644 --- a/sdk/constructive-react/src/public/orm/models/userAuthModule.ts +++ b/sdk/constructive-react/src/public/orm/models/userAuthModule.ts @@ -70,13 +70,11 @@ export class UserAuthModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - userAuthModules: { - nodes: InferSelectResult[]; - }; + userAuthModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'UserAuthModule', @@ -84,17 +82,26 @@ export class UserAuthModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UserAuthModuleFilter', + 'UserAuthModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'UserAuthModule', - fieldName: 'userAuthModules', + fieldName: 'userAuthModule', document, variables, + transform: (data: { + userAuthModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userAuthModule: data.userAuthModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/userConnectedAccount.ts b/sdk/constructive-react/src/public/orm/models/userConnectedAccount.ts index 45bbea7f4..a2344afdf 100644 --- a/sdk/constructive-react/src/public/orm/models/userConnectedAccount.ts +++ b/sdk/constructive-react/src/public/orm/models/userConnectedAccount.ts @@ -72,13 +72,11 @@ export class UserConnectedAccountModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - userConnectedAccounts: { - nodes: InferSelectResult[]; - }; + userConnectedAccount: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'UserConnectedAccount', @@ -86,17 +84,26 @@ export class UserConnectedAccountModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'UserConnectedAccount', - fieldName: 'userConnectedAccounts', + fieldName: 'userConnectedAccount', document, variables, + transform: (data: { + userConnectedAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userConnectedAccount: data.userConnectedAccounts?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/usersModule.ts b/sdk/constructive-react/src/public/orm/models/usersModule.ts index c5b6d361b..de86bbbfb 100644 --- a/sdk/constructive-react/src/public/orm/models/usersModule.ts +++ b/sdk/constructive-react/src/public/orm/models/usersModule.ts @@ -70,13 +70,11 @@ export class UsersModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - usersModules: { - nodes: InferSelectResult[]; - }; + usersModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'UsersModule', @@ -84,17 +82,26 @@ export class UsersModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UsersModuleFilter', + 'UsersModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'UsersModule', - fieldName: 'usersModules', + fieldName: 'usersModule', document, variables, + transform: (data: { + usersModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + usersModule: data.usersModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/view.ts b/sdk/constructive-react/src/public/orm/models/view.ts index 5e7fa5f74..75acdcbcf 100644 --- a/sdk/constructive-react/src/public/orm/models/view.ts +++ b/sdk/constructive-react/src/public/orm/models/view.ts @@ -70,13 +70,11 @@ export class ViewModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - views: { - nodes: InferSelectResult[]; - }; + view: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'View', @@ -84,17 +82,26 @@ export class ViewModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ViewFilter', + 'ViewOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'View', - fieldName: 'views', + fieldName: 'view', document, variables, + transform: (data: { + views?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + view: data.views?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/viewGrant.ts b/sdk/constructive-react/src/public/orm/models/viewGrant.ts index 1023b5f7f..bd4eddaef 100644 --- a/sdk/constructive-react/src/public/orm/models/viewGrant.ts +++ b/sdk/constructive-react/src/public/orm/models/viewGrant.ts @@ -70,13 +70,11 @@ export class ViewGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - viewGrants: { - nodes: InferSelectResult[]; - }; + viewGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ViewGrant', @@ -84,17 +82,26 @@ export class ViewGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ViewGrantFilter', + 'ViewGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ViewGrant', - fieldName: 'viewGrants', + fieldName: 'viewGrant', document, variables, + transform: (data: { + viewGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + viewGrant: data.viewGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/viewRule.ts b/sdk/constructive-react/src/public/orm/models/viewRule.ts index 101bd199a..cdec5ad12 100644 --- a/sdk/constructive-react/src/public/orm/models/viewRule.ts +++ b/sdk/constructive-react/src/public/orm/models/viewRule.ts @@ -70,13 +70,11 @@ export class ViewRuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - viewRules: { - nodes: InferSelectResult[]; - }; + viewRule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ViewRule', @@ -84,17 +82,26 @@ export class ViewRuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ViewRuleFilter', + 'ViewRuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ViewRule', - fieldName: 'viewRules', + fieldName: 'viewRule', document, variables, + transform: (data: { + viewRules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + viewRule: data.viewRules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/viewTable.ts b/sdk/constructive-react/src/public/orm/models/viewTable.ts index a37e7137b..83362317e 100644 --- a/sdk/constructive-react/src/public/orm/models/viewTable.ts +++ b/sdk/constructive-react/src/public/orm/models/viewTable.ts @@ -70,13 +70,11 @@ export class ViewTableModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - viewTables: { - nodes: InferSelectResult[]; - }; + viewTable: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ViewTable', @@ -84,17 +82,26 @@ export class ViewTableModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ViewTableFilter', + 'ViewTableOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ViewTable', - fieldName: 'viewTables', + fieldName: 'viewTable', document, variables, + transform: (data: { + viewTables?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + viewTable: data.viewTables?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/webauthnAuthModule.ts b/sdk/constructive-react/src/public/orm/models/webauthnAuthModule.ts index 3267077b3..14ebdd6f2 100644 --- a/sdk/constructive-react/src/public/orm/models/webauthnAuthModule.ts +++ b/sdk/constructive-react/src/public/orm/models/webauthnAuthModule.ts @@ -70,13 +70,11 @@ export class WebauthnAuthModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - webauthnAuthModules: { - nodes: InferSelectResult[]; - }; + webauthnAuthModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'WebauthnAuthModule', @@ -84,17 +82,26 @@ export class WebauthnAuthModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'WebauthnAuthModuleFilter', + 'WebauthnAuthModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'WebauthnAuthModule', - fieldName: 'webauthnAuthModules', + fieldName: 'webauthnAuthModule', document, variables, + transform: (data: { + webauthnAuthModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + webauthnAuthModule: data.webauthnAuthModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/webauthnCredential.ts b/sdk/constructive-react/src/public/orm/models/webauthnCredential.ts index f02cf10bc..cca4c75cf 100644 --- a/sdk/constructive-react/src/public/orm/models/webauthnCredential.ts +++ b/sdk/constructive-react/src/public/orm/models/webauthnCredential.ts @@ -70,13 +70,11 @@ export class WebauthnCredentialModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - webauthnCredentials: { - nodes: InferSelectResult[]; - }; + webauthnCredential: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'WebauthnCredential', @@ -84,17 +82,26 @@ export class WebauthnCredentialModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'WebauthnCredentialFilter', + 'WebauthnCredentialOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'WebauthnCredential', - fieldName: 'webauthnCredentials', + fieldName: 'webauthnCredential', document, variables, + transform: (data: { + webauthnCredentials?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + webauthnCredential: data.webauthnCredentials?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/models/webauthnCredentialsModule.ts b/sdk/constructive-react/src/public/orm/models/webauthnCredentialsModule.ts index 78e687c34..ee66831a7 100644 --- a/sdk/constructive-react/src/public/orm/models/webauthnCredentialsModule.ts +++ b/sdk/constructive-react/src/public/orm/models/webauthnCredentialsModule.ts @@ -72,13 +72,11 @@ export class WebauthnCredentialsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - webauthnCredentialsModules: { - nodes: InferSelectResult[]; - }; + webauthnCredentialsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'WebauthnCredentialsModule', @@ -86,17 +84,26 @@ export class WebauthnCredentialsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'WebauthnCredentialsModuleFilter', + 'WebauthnCredentialsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'WebauthnCredentialsModule', - fieldName: 'webauthnCredentialsModules', + fieldName: 'webauthnCredentialsModule', document, variables, + transform: (data: { + webauthnCredentialsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + webauthnCredentialsModule: data.webauthnCredentialsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-react/src/public/orm/query-builder.ts b/sdk/constructive-react/src/public/orm/query-builder.ts index f2fd4566f..5abdd3372 100644 --- a/sdk/constructive-react/src/public/orm/query-builder.ts +++ b/sdk/constructive-react/src/public/orm/query-builder.ts @@ -293,8 +293,9 @@ export function buildFindFirstDocument( operationName: string, queryField: string, select: TSelect, - args: { where?: TWhere }, + args: { where?: TWhere; orderBy?: string[] }, filterTypeName: string, + orderByTypeName: string, connectionFieldsMap?: Record> ): { document: string; variables: Record } { const selections = select @@ -322,6 +323,16 @@ export function buildFindFirstDocument( queryArgs, variables ); + addVariable( + { + varName: 'orderBy', + typeName: '[' + orderByTypeName + '!]', + value: args.orderBy?.length ? args.orderBy : undefined, + }, + variableDefinitions, + queryArgs, + variables + ); const document = t.document({ definitions: [ diff --git a/sdk/constructive-react/src/public/orm/select-types.ts b/sdk/constructive-react/src/public/orm/select-types.ts index 2621b3570..9c1ec1ad2 100644 --- a/sdk/constructive-react/src/public/orm/select-types.ts +++ b/sdk/constructive-react/src/public/orm/select-types.ts @@ -27,9 +27,10 @@ export interface FindManyArgs { offset?: number; } -export interface FindFirstArgs { +export interface FindFirstArgs { select?: TSelect; where?: TWhere; + orderBy?: TOrderBy[]; } export interface CreateArgs { diff --git a/sdk/constructive-sdk/src/admin/orm/models/appAchievement.ts b/sdk/constructive-sdk/src/admin/orm/models/appAchievement.ts index f24447777..545b5e5f7 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/appAchievement.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/appAchievement.ts @@ -70,13 +70,11 @@ export class AppAchievementModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appAchievements: { - nodes: InferSelectResult[]; - }; + appAchievement: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppAchievement', @@ -84,17 +82,26 @@ export class AppAchievementModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppAchievementFilter', + 'AppAchievementOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppAchievement', - fieldName: 'appAchievements', + fieldName: 'appAchievement', document, variables, + transform: (data: { + appAchievements?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appAchievement: data.appAchievements?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/appAdminGrant.ts b/sdk/constructive-sdk/src/admin/orm/models/appAdminGrant.ts index 6a2a59893..fd80edc23 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/appAdminGrant.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/appAdminGrant.ts @@ -70,13 +70,11 @@ export class AppAdminGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appAdminGrants: { - nodes: InferSelectResult[]; - }; + appAdminGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppAdminGrant', @@ -84,17 +82,26 @@ export class AppAdminGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppAdminGrantFilter', + 'AppAdminGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppAdminGrant', - fieldName: 'appAdminGrants', + fieldName: 'appAdminGrant', document, variables, + transform: (data: { + appAdminGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appAdminGrant: data.appAdminGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/appClaimedInvite.ts b/sdk/constructive-sdk/src/admin/orm/models/appClaimedInvite.ts index 2a4c41dec..c9e66ec9c 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/appClaimedInvite.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/appClaimedInvite.ts @@ -70,13 +70,11 @@ export class AppClaimedInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appClaimedInvites: { - nodes: InferSelectResult[]; - }; + appClaimedInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppClaimedInvite', @@ -84,17 +82,26 @@ export class AppClaimedInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppClaimedInviteFilter', + 'AppClaimedInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppClaimedInvite', - fieldName: 'appClaimedInvites', + fieldName: 'appClaimedInvite', document, variables, + transform: (data: { + appClaimedInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appClaimedInvite: data.appClaimedInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/appGrant.ts b/sdk/constructive-sdk/src/admin/orm/models/appGrant.ts index 2cb4f429a..4481fb3d8 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/appGrant.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/appGrant.ts @@ -70,13 +70,11 @@ export class AppGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appGrants: { - nodes: InferSelectResult[]; - }; + appGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppGrant', @@ -84,17 +82,26 @@ export class AppGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppGrantFilter', + 'AppGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppGrant', - fieldName: 'appGrants', + fieldName: 'appGrant', document, variables, + transform: (data: { + appGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appGrant: data.appGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/appInvite.ts b/sdk/constructive-sdk/src/admin/orm/models/appInvite.ts index fe4a1c4e4..5fcbff936 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/appInvite.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/appInvite.ts @@ -70,13 +70,11 @@ export class AppInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appInvites: { - nodes: InferSelectResult[]; - }; + appInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppInvite', @@ -84,17 +82,26 @@ export class AppInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppInviteFilter', + 'AppInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppInvite', - fieldName: 'appInvites', + fieldName: 'appInvite', document, variables, + transform: (data: { + appInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appInvite: data.appInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/appLevel.ts b/sdk/constructive-sdk/src/admin/orm/models/appLevel.ts index f9abef512..cd182a18c 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/appLevel.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/appLevel.ts @@ -70,13 +70,11 @@ export class AppLevelModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLevels: { - nodes: InferSelectResult[]; - }; + appLevel: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLevel', @@ -84,17 +82,26 @@ export class AppLevelModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLevelFilter', + 'AppLevelOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLevel', - fieldName: 'appLevels', + fieldName: 'appLevel', document, variables, + transform: (data: { + appLevels?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevel: data.appLevels?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/appLevelRequirement.ts b/sdk/constructive-sdk/src/admin/orm/models/appLevelRequirement.ts index 54baeb7dc..c3f9d89f1 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/appLevelRequirement.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/appLevelRequirement.ts @@ -70,13 +70,11 @@ export class AppLevelRequirementModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLevelRequirements: { - nodes: InferSelectResult[]; - }; + appLevelRequirement: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLevelRequirement', @@ -84,17 +82,26 @@ export class AppLevelRequirementModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLevelRequirementFilter', + 'AppLevelRequirementOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLevelRequirement', - fieldName: 'appLevelRequirements', + fieldName: 'appLevelRequirement', document, variables, + transform: (data: { + appLevelRequirements?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevelRequirement: data.appLevelRequirements?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/appLimit.ts b/sdk/constructive-sdk/src/admin/orm/models/appLimit.ts index dea896420..2e109cb07 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/appLimit.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/appLimit.ts @@ -70,13 +70,11 @@ export class AppLimitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimits: { - nodes: InferSelectResult[]; - }; + appLimit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimit', @@ -84,17 +82,26 @@ export class AppLimitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitFilter', + 'AppLimitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimit', - fieldName: 'appLimits', + fieldName: 'appLimit', document, variables, + transform: (data: { + appLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimit: data.appLimits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/appLimitDefault.ts b/sdk/constructive-sdk/src/admin/orm/models/appLimitDefault.ts index dfec3cdd9..f9df6376e 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/appLimitDefault.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/appLimitDefault.ts @@ -70,13 +70,11 @@ export class AppLimitDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimitDefaults: { - nodes: InferSelectResult[]; - }; + appLimitDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimitDefault', @@ -84,17 +82,26 @@ export class AppLimitDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitDefaultFilter', + 'AppLimitDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimitDefault', - fieldName: 'appLimitDefaults', + fieldName: 'appLimitDefault', document, variables, + transform: (data: { + appLimitDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimitDefault: data.appLimitDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/appLimitEvent.ts b/sdk/constructive-sdk/src/admin/orm/models/appLimitEvent.ts index 8f367e889..b8e0c98e1 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/appLimitEvent.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/appLimitEvent.ts @@ -70,13 +70,11 @@ export class AppLimitEventModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimitEvents: { - nodes: InferSelectResult[]; - }; + appLimitEvent: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimitEvent', @@ -84,17 +82,26 @@ export class AppLimitEventModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitEventFilter', + 'AppLimitEventOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimitEvent', - fieldName: 'appLimitEvents', + fieldName: 'appLimitEvent', document, variables, + transform: (data: { + appLimitEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimitEvent: data.appLimitEvents?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-sdk/src/admin/orm/models/appMembership.ts b/sdk/constructive-sdk/src/admin/orm/models/appMembership.ts index a830192e6..a4011c41a 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/appMembership.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/appMembership.ts @@ -70,13 +70,11 @@ export class AppMembershipModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appMemberships: { - nodes: InferSelectResult[]; - }; + appMembership: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppMembership', @@ -84,17 +82,26 @@ export class AppMembershipModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppMembershipFilter', + 'AppMembershipOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppMembership', - fieldName: 'appMemberships', + fieldName: 'appMembership', document, variables, + transform: (data: { + appMemberships?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appMembership: data.appMemberships?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/appMembershipDefault.ts b/sdk/constructive-sdk/src/admin/orm/models/appMembershipDefault.ts index 8b1a54c01..f69f1aca6 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/appMembershipDefault.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/appMembershipDefault.ts @@ -72,13 +72,11 @@ export class AppMembershipDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appMembershipDefaults: { - nodes: InferSelectResult[]; - }; + appMembershipDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppMembershipDefault', @@ -86,17 +84,26 @@ export class AppMembershipDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppMembershipDefaultFilter', + 'AppMembershipDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppMembershipDefault', - fieldName: 'appMembershipDefaults', + fieldName: 'appMembershipDefault', document, variables, + transform: (data: { + appMembershipDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appMembershipDefault: data.appMembershipDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/appOwnerGrant.ts b/sdk/constructive-sdk/src/admin/orm/models/appOwnerGrant.ts index a8695557e..eeb815d84 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/appOwnerGrant.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/appOwnerGrant.ts @@ -70,13 +70,11 @@ export class AppOwnerGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appOwnerGrants: { - nodes: InferSelectResult[]; - }; + appOwnerGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppOwnerGrant', @@ -84,17 +82,26 @@ export class AppOwnerGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppOwnerGrantFilter', + 'AppOwnerGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppOwnerGrant', - fieldName: 'appOwnerGrants', + fieldName: 'appOwnerGrant', document, variables, + transform: (data: { + appOwnerGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appOwnerGrant: data.appOwnerGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/appPermission.ts b/sdk/constructive-sdk/src/admin/orm/models/appPermission.ts index 2575c5de2..e71adea65 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/appPermission.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/appPermission.ts @@ -70,13 +70,11 @@ export class AppPermissionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appPermissions: { - nodes: InferSelectResult[]; - }; + appPermission: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppPermission', @@ -84,17 +82,26 @@ export class AppPermissionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppPermissionFilter', + 'AppPermissionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppPermission', - fieldName: 'appPermissions', + fieldName: 'appPermission', document, variables, + transform: (data: { + appPermissions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appPermission: data.appPermissions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/appPermissionDefault.ts b/sdk/constructive-sdk/src/admin/orm/models/appPermissionDefault.ts index 427272883..d5511aed0 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/appPermissionDefault.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/appPermissionDefault.ts @@ -72,13 +72,11 @@ export class AppPermissionDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appPermissionDefaults: { - nodes: InferSelectResult[]; - }; + appPermissionDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppPermissionDefault', @@ -86,17 +84,26 @@ export class AppPermissionDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppPermissionDefaultFilter', + 'AppPermissionDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppPermissionDefault', - fieldName: 'appPermissionDefaults', + fieldName: 'appPermissionDefault', document, variables, + transform: (data: { + appPermissionDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appPermissionDefault: data.appPermissionDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/appStep.ts b/sdk/constructive-sdk/src/admin/orm/models/appStep.ts index 29dae0d6c..7ebb44fa1 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/appStep.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/appStep.ts @@ -70,13 +70,11 @@ export class AppStepModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appSteps: { - nodes: InferSelectResult[]; - }; + appStep: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppStep', @@ -84,17 +82,26 @@ export class AppStepModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppStepFilter', + 'AppStepOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppStep', - fieldName: 'appSteps', + fieldName: 'appStep', document, variables, + transform: (data: { + appSteps?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appStep: data.appSteps?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/membershipType.ts b/sdk/constructive-sdk/src/admin/orm/models/membershipType.ts index 40fac5490..ee7ed596c 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/membershipType.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/membershipType.ts @@ -70,13 +70,11 @@ export class MembershipTypeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - membershipTypes: { - nodes: InferSelectResult[]; - }; + membershipType: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'MembershipType', @@ -84,17 +82,26 @@ export class MembershipTypeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'MembershipTypeFilter', + 'MembershipTypeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'MembershipType', - fieldName: 'membershipTypes', + fieldName: 'membershipType', document, variables, + transform: (data: { + membershipTypes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + membershipType: data.membershipTypes?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgAdminGrant.ts b/sdk/constructive-sdk/src/admin/orm/models/orgAdminGrant.ts index e611a8578..7b1337731 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgAdminGrant.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgAdminGrant.ts @@ -70,13 +70,11 @@ export class OrgAdminGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgAdminGrants: { - nodes: InferSelectResult[]; - }; + orgAdminGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgAdminGrant', @@ -84,17 +82,26 @@ export class OrgAdminGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgAdminGrantFilter', + 'OrgAdminGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgAdminGrant', - fieldName: 'orgAdminGrants', + fieldName: 'orgAdminGrant', document, variables, + transform: (data: { + orgAdminGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgAdminGrant: data.orgAdminGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgChartEdge.ts b/sdk/constructive-sdk/src/admin/orm/models/orgChartEdge.ts index 6c6fc84cc..8a43b83a9 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgChartEdge.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgChartEdge.ts @@ -70,13 +70,11 @@ export class OrgChartEdgeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgChartEdges: { - nodes: InferSelectResult[]; - }; + orgChartEdge: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgChartEdge', @@ -84,17 +82,26 @@ export class OrgChartEdgeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgChartEdgeFilter', + 'OrgChartEdgeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgChartEdge', - fieldName: 'orgChartEdges', + fieldName: 'orgChartEdge', document, variables, + transform: (data: { + orgChartEdges?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgChartEdge: data.orgChartEdges?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgChartEdgeGrant.ts b/sdk/constructive-sdk/src/admin/orm/models/orgChartEdgeGrant.ts index 58345c78d..168a6fe3d 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgChartEdgeGrant.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgChartEdgeGrant.ts @@ -70,13 +70,11 @@ export class OrgChartEdgeGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgChartEdgeGrants: { - nodes: InferSelectResult[]; - }; + orgChartEdgeGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgChartEdgeGrant', @@ -84,17 +82,26 @@ export class OrgChartEdgeGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgChartEdgeGrantFilter', + 'OrgChartEdgeGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgChartEdgeGrant', - fieldName: 'orgChartEdgeGrants', + fieldName: 'orgChartEdgeGrant', document, variables, + transform: (data: { + orgChartEdgeGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgChartEdgeGrant: data.orgChartEdgeGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgClaimedInvite.ts b/sdk/constructive-sdk/src/admin/orm/models/orgClaimedInvite.ts index 475de7291..e1a3aecaf 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgClaimedInvite.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgClaimedInvite.ts @@ -70,13 +70,11 @@ export class OrgClaimedInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgClaimedInvites: { - nodes: InferSelectResult[]; - }; + orgClaimedInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgClaimedInvite', @@ -84,17 +82,26 @@ export class OrgClaimedInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgClaimedInviteFilter', + 'OrgClaimedInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgClaimedInvite', - fieldName: 'orgClaimedInvites', + fieldName: 'orgClaimedInvite', document, variables, + transform: (data: { + orgClaimedInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgClaimedInvite: data.orgClaimedInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgGetManagersRecord.ts b/sdk/constructive-sdk/src/admin/orm/models/orgGetManagersRecord.ts index 9a0cefa8a..7c333b76d 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgGetManagersRecord.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgGetManagersRecord.ts @@ -70,13 +70,11 @@ export class OrgGetManagersRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGetManagers: { - nodes: InferSelectResult[]; - }; + orgGetManagersRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGetManagersRecord', @@ -84,17 +82,26 @@ export class OrgGetManagersRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGetManagersRecordFilter', + 'OrgGetManagersRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGetManagersRecord', - fieldName: 'orgGetManagers', + fieldName: 'orgGetManagersRecord', document, variables, + transform: (data: { + orgGetManagers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGetManagersRecord: data.orgGetManagers?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgGetSubordinatesRecord.ts b/sdk/constructive-sdk/src/admin/orm/models/orgGetSubordinatesRecord.ts index 5eeec50ca..f259e1043 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgGetSubordinatesRecord.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgGetSubordinatesRecord.ts @@ -72,13 +72,11 @@ export class OrgGetSubordinatesRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGetSubordinates: { - nodes: InferSelectResult[]; - }; + orgGetSubordinatesRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGetSubordinatesRecord', @@ -86,17 +84,26 @@ export class OrgGetSubordinatesRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGetSubordinatesRecordFilter', + 'OrgGetSubordinatesRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGetSubordinatesRecord', - fieldName: 'orgGetSubordinates', + fieldName: 'orgGetSubordinatesRecord', document, variables, + transform: (data: { + orgGetSubordinates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGetSubordinatesRecord: data.orgGetSubordinates?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgGrant.ts b/sdk/constructive-sdk/src/admin/orm/models/orgGrant.ts index 291264ec5..c8e74f5cc 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgGrant.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgGrant.ts @@ -70,13 +70,11 @@ export class OrgGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGrants: { - nodes: InferSelectResult[]; - }; + orgGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGrant', @@ -84,17 +82,26 @@ export class OrgGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGrantFilter', + 'OrgGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGrant', - fieldName: 'orgGrants', + fieldName: 'orgGrant', document, variables, + transform: (data: { + orgGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGrant: data.orgGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgInvite.ts b/sdk/constructive-sdk/src/admin/orm/models/orgInvite.ts index 639cb8dd5..8d7931f07 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgInvite.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgInvite.ts @@ -70,13 +70,11 @@ export class OrgInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgInvites: { - nodes: InferSelectResult[]; - }; + orgInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgInvite', @@ -84,17 +82,26 @@ export class OrgInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgInviteFilter', + 'OrgInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgInvite', - fieldName: 'orgInvites', + fieldName: 'orgInvite', document, variables, + transform: (data: { + orgInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgInvite: data.orgInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgLimit.ts b/sdk/constructive-sdk/src/admin/orm/models/orgLimit.ts index 2d7937963..48a3932f2 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgLimit.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgLimit.ts @@ -70,13 +70,11 @@ export class OrgLimitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimits: { - nodes: InferSelectResult[]; - }; + orgLimit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimit', @@ -84,17 +82,26 @@ export class OrgLimitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitFilter', + 'OrgLimitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimit', - fieldName: 'orgLimits', + fieldName: 'orgLimit', document, variables, + transform: (data: { + orgLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimit: data.orgLimits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgLimitAggregate.ts b/sdk/constructive-sdk/src/admin/orm/models/orgLimitAggregate.ts index daee50aee..d74b9e7d9 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgLimitAggregate.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgLimitAggregate.ts @@ -70,13 +70,11 @@ export class OrgLimitAggregateModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitAggregates: { - nodes: InferSelectResult[]; - }; + orgLimitAggregate: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitAggregate', @@ -84,17 +82,26 @@ export class OrgLimitAggregateModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitAggregateFilter', + 'OrgLimitAggregateOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitAggregate', - fieldName: 'orgLimitAggregates', + fieldName: 'orgLimitAggregate', document, variables, + transform: (data: { + orgLimitAggregates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitAggregate: data.orgLimitAggregates?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgLimitDefault.ts b/sdk/constructive-sdk/src/admin/orm/models/orgLimitDefault.ts index bf0cfcf5e..7e55bfd1f 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgLimitDefault.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgLimitDefault.ts @@ -70,13 +70,11 @@ export class OrgLimitDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitDefaults: { - nodes: InferSelectResult[]; - }; + orgLimitDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitDefault', @@ -84,17 +82,26 @@ export class OrgLimitDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitDefaultFilter', + 'OrgLimitDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitDefault', - fieldName: 'orgLimitDefaults', + fieldName: 'orgLimitDefault', document, variables, + transform: (data: { + orgLimitDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitDefault: data.orgLimitDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgLimitEvent.ts b/sdk/constructive-sdk/src/admin/orm/models/orgLimitEvent.ts index 6414ba0ed..c259e325f 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgLimitEvent.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgLimitEvent.ts @@ -70,13 +70,11 @@ export class OrgLimitEventModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitEvents: { - nodes: InferSelectResult[]; - }; + orgLimitEvent: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitEvent', @@ -84,17 +82,26 @@ export class OrgLimitEventModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitEventFilter', + 'OrgLimitEventOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitEvent', - fieldName: 'orgLimitEvents', + fieldName: 'orgLimitEvent', document, variables, + transform: (data: { + orgLimitEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitEvent: data.orgLimitEvents?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgMember.ts b/sdk/constructive-sdk/src/admin/orm/models/orgMember.ts index dd1d20e45..44f5608f4 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgMember.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgMember.ts @@ -70,13 +70,11 @@ export class OrgMemberModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembers: { - nodes: InferSelectResult[]; - }; + orgMember: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMember', @@ -84,17 +82,26 @@ export class OrgMemberModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMemberFilter', + 'OrgMemberOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMember', - fieldName: 'orgMembers', + fieldName: 'orgMember', document, variables, + transform: (data: { + orgMembers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMember: data.orgMembers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgMemberProfile.ts b/sdk/constructive-sdk/src/admin/orm/models/orgMemberProfile.ts index de551ba79..77357e174 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgMemberProfile.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgMemberProfile.ts @@ -70,13 +70,11 @@ export class OrgMemberProfileModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMemberProfiles: { - nodes: InferSelectResult[]; - }; + orgMemberProfile: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMemberProfile', @@ -84,17 +82,26 @@ export class OrgMemberProfileModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMemberProfile', - fieldName: 'orgMemberProfiles', + fieldName: 'orgMemberProfile', document, variables, + transform: (data: { + orgMemberProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMemberProfile: data.orgMemberProfiles?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgMembership.ts b/sdk/constructive-sdk/src/admin/orm/models/orgMembership.ts index c0173b3e1..623ec08fe 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgMembership.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgMembership.ts @@ -70,13 +70,11 @@ export class OrgMembershipModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMemberships: { - nodes: InferSelectResult[]; - }; + orgMembership: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembership', @@ -84,17 +82,26 @@ export class OrgMembershipModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipFilter', + 'OrgMembershipOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembership', - fieldName: 'orgMemberships', + fieldName: 'orgMembership', document, variables, + transform: (data: { + orgMemberships?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembership: data.orgMemberships?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgMembershipDefault.ts b/sdk/constructive-sdk/src/admin/orm/models/orgMembershipDefault.ts index 09d525bec..344131505 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgMembershipDefault.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgMembershipDefault.ts @@ -72,13 +72,11 @@ export class OrgMembershipDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembershipDefaults: { - nodes: InferSelectResult[]; - }; + orgMembershipDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembershipDefault', @@ -86,17 +84,26 @@ export class OrgMembershipDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipDefaultFilter', + 'OrgMembershipDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembershipDefault', - fieldName: 'orgMembershipDefaults', + fieldName: 'orgMembershipDefault', document, variables, + transform: (data: { + orgMembershipDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembershipDefault: data.orgMembershipDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgMembershipSetting.ts b/sdk/constructive-sdk/src/admin/orm/models/orgMembershipSetting.ts index 1efc26410..46801fc91 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgMembershipSetting.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgMembershipSetting.ts @@ -72,13 +72,11 @@ export class OrgMembershipSettingModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembershipSettings: { - nodes: InferSelectResult[]; - }; + orgMembershipSetting: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembershipSetting', @@ -86,17 +84,26 @@ export class OrgMembershipSettingModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipSettingFilter', + 'OrgMembershipSettingOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembershipSetting', - fieldName: 'orgMembershipSettings', + fieldName: 'orgMembershipSetting', document, variables, + transform: (data: { + orgMembershipSettings?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembershipSetting: data.orgMembershipSettings?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgOwnerGrant.ts b/sdk/constructive-sdk/src/admin/orm/models/orgOwnerGrant.ts index bdf045511..9614dce8f 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgOwnerGrant.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgOwnerGrant.ts @@ -70,13 +70,11 @@ export class OrgOwnerGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgOwnerGrants: { - nodes: InferSelectResult[]; - }; + orgOwnerGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgOwnerGrant', @@ -84,17 +82,26 @@ export class OrgOwnerGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgOwnerGrantFilter', + 'OrgOwnerGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgOwnerGrant', - fieldName: 'orgOwnerGrants', + fieldName: 'orgOwnerGrant', document, variables, + transform: (data: { + orgOwnerGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgOwnerGrant: data.orgOwnerGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgPermission.ts b/sdk/constructive-sdk/src/admin/orm/models/orgPermission.ts index c5910be63..7bdc90632 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgPermission.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgPermission.ts @@ -70,13 +70,11 @@ export class OrgPermissionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgPermissions: { - nodes: InferSelectResult[]; - }; + orgPermission: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgPermission', @@ -84,17 +82,26 @@ export class OrgPermissionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgPermissionFilter', + 'OrgPermissionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgPermission', - fieldName: 'orgPermissions', + fieldName: 'orgPermission', document, variables, + transform: (data: { + orgPermissions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgPermission: data.orgPermissions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgPermissionDefault.ts b/sdk/constructive-sdk/src/admin/orm/models/orgPermissionDefault.ts index 40389a11b..8d00b9932 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/orgPermissionDefault.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/orgPermissionDefault.ts @@ -72,13 +72,11 @@ export class OrgPermissionDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgPermissionDefaults: { - nodes: InferSelectResult[]; - }; + orgPermissionDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgPermissionDefault', @@ -86,17 +84,26 @@ export class OrgPermissionDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgPermissionDefaultFilter', + 'OrgPermissionDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgPermissionDefault', - fieldName: 'orgPermissionDefaults', + fieldName: 'orgPermissionDefault', document, variables, + transform: (data: { + orgPermissionDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgPermissionDefault: data.orgPermissionDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/admin/orm/query-builder.ts b/sdk/constructive-sdk/src/admin/orm/query-builder.ts index f2fd4566f..5abdd3372 100644 --- a/sdk/constructive-sdk/src/admin/orm/query-builder.ts +++ b/sdk/constructive-sdk/src/admin/orm/query-builder.ts @@ -293,8 +293,9 @@ export function buildFindFirstDocument( operationName: string, queryField: string, select: TSelect, - args: { where?: TWhere }, + args: { where?: TWhere; orderBy?: string[] }, filterTypeName: string, + orderByTypeName: string, connectionFieldsMap?: Record> ): { document: string; variables: Record } { const selections = select @@ -322,6 +323,16 @@ export function buildFindFirstDocument( queryArgs, variables ); + addVariable( + { + varName: 'orderBy', + typeName: '[' + orderByTypeName + '!]', + value: args.orderBy?.length ? args.orderBy : undefined, + }, + variableDefinitions, + queryArgs, + variables + ); const document = t.document({ definitions: [ diff --git a/sdk/constructive-sdk/src/admin/orm/select-types.ts b/sdk/constructive-sdk/src/admin/orm/select-types.ts index 2621b3570..9c1ec1ad2 100644 --- a/sdk/constructive-sdk/src/admin/orm/select-types.ts +++ b/sdk/constructive-sdk/src/admin/orm/select-types.ts @@ -27,9 +27,10 @@ export interface FindManyArgs { offset?: number; } -export interface FindFirstArgs { +export interface FindFirstArgs { select?: TSelect; where?: TWhere; + orderBy?: TOrderBy[]; } export interface CreateArgs { diff --git a/sdk/constructive-sdk/src/auth/orm/models/auditLog.ts b/sdk/constructive-sdk/src/auth/orm/models/auditLog.ts index 2d388026d..8d8abc012 100644 --- a/sdk/constructive-sdk/src/auth/orm/models/auditLog.ts +++ b/sdk/constructive-sdk/src/auth/orm/models/auditLog.ts @@ -70,13 +70,11 @@ export class AuditLogModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - auditLogs: { - nodes: InferSelectResult[]; - }; + auditLog: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AuditLog', @@ -84,17 +82,26 @@ export class AuditLogModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AuditLogFilter', + 'AuditLogOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AuditLog', - fieldName: 'auditLogs', + fieldName: 'auditLog', document, variables, + transform: (data: { + auditLogs?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + auditLog: data.auditLogs?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/auth/orm/models/cryptoAddress.ts b/sdk/constructive-sdk/src/auth/orm/models/cryptoAddress.ts index 7357c0126..11914bd9d 100644 --- a/sdk/constructive-sdk/src/auth/orm/models/cryptoAddress.ts +++ b/sdk/constructive-sdk/src/auth/orm/models/cryptoAddress.ts @@ -70,13 +70,11 @@ export class CryptoAddressModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - cryptoAddresses: { - nodes: InferSelectResult[]; - }; + cryptoAddress: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'CryptoAddress', @@ -84,17 +82,26 @@ export class CryptoAddressModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CryptoAddressFilter', + 'CryptoAddressOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'CryptoAddress', - fieldName: 'cryptoAddresses', + fieldName: 'cryptoAddress', document, variables, + transform: (data: { + cryptoAddresses?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + cryptoAddress: data.cryptoAddresses?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/auth/orm/models/email.ts b/sdk/constructive-sdk/src/auth/orm/models/email.ts index aa83efc07..325475b9c 100644 --- a/sdk/constructive-sdk/src/auth/orm/models/email.ts +++ b/sdk/constructive-sdk/src/auth/orm/models/email.ts @@ -70,13 +70,11 @@ export class EmailModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - emails: { - nodes: InferSelectResult[]; - }; + email: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Email', @@ -84,17 +82,26 @@ export class EmailModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EmailFilter', + 'EmailOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Email', - fieldName: 'emails', + fieldName: 'email', document, variables, + transform: (data: { + emails?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + email: data.emails?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/auth/orm/models/identityProvider.ts b/sdk/constructive-sdk/src/auth/orm/models/identityProvider.ts index 9c9cfc0d9..cdc672145 100644 --- a/sdk/constructive-sdk/src/auth/orm/models/identityProvider.ts +++ b/sdk/constructive-sdk/src/auth/orm/models/identityProvider.ts @@ -70,13 +70,11 @@ export class IdentityProviderModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - identityProviders: { - nodes: InferSelectResult[]; - }; + identityProvider: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'IdentityProvider', @@ -84,17 +82,26 @@ export class IdentityProviderModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'IdentityProviderFilter', + 'IdentityProviderOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'IdentityProvider', - fieldName: 'identityProviders', + fieldName: 'identityProvider', document, variables, + transform: (data: { + identityProviders?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + identityProvider: data.identityProviders?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-sdk/src/auth/orm/models/phoneNumber.ts b/sdk/constructive-sdk/src/auth/orm/models/phoneNumber.ts index a711db272..0803908e2 100644 --- a/sdk/constructive-sdk/src/auth/orm/models/phoneNumber.ts +++ b/sdk/constructive-sdk/src/auth/orm/models/phoneNumber.ts @@ -70,13 +70,11 @@ export class PhoneNumberModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - phoneNumbers: { - nodes: InferSelectResult[]; - }; + phoneNumber: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PhoneNumber', @@ -84,17 +82,26 @@ export class PhoneNumberModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PhoneNumberFilter', + 'PhoneNumberOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PhoneNumber', - fieldName: 'phoneNumbers', + fieldName: 'phoneNumber', document, variables, + transform: (data: { + phoneNumbers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + phoneNumber: data.phoneNumbers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/auth/orm/models/roleType.ts b/sdk/constructive-sdk/src/auth/orm/models/roleType.ts index 5b258dc9a..8b256a0dc 100644 --- a/sdk/constructive-sdk/src/auth/orm/models/roleType.ts +++ b/sdk/constructive-sdk/src/auth/orm/models/roleType.ts @@ -70,13 +70,11 @@ export class RoleTypeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - roleTypes: { - nodes: InferSelectResult[]; - }; + roleType: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'RoleType', @@ -84,17 +82,26 @@ export class RoleTypeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RoleTypeFilter', + 'RoleTypeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'RoleType', - fieldName: 'roleTypes', + fieldName: 'roleType', document, variables, + transform: (data: { + roleTypes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + roleType: data.roleTypes?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/auth/orm/models/user.ts b/sdk/constructive-sdk/src/auth/orm/models/user.ts index aedd4fcc8..893581835 100644 --- a/sdk/constructive-sdk/src/auth/orm/models/user.ts +++ b/sdk/constructive-sdk/src/auth/orm/models/user.ts @@ -70,13 +70,11 @@ export class UserModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - users: { - nodes: InferSelectResult[]; - }; + user: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'User', @@ -84,17 +82,26 @@ export class UserModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UserFilter', + 'UserOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'User', - fieldName: 'users', + fieldName: 'user', document, variables, + transform: (data: { + users?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + user: data.users?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/auth/orm/models/userConnectedAccount.ts b/sdk/constructive-sdk/src/auth/orm/models/userConnectedAccount.ts index 45bbea7f4..a2344afdf 100644 --- a/sdk/constructive-sdk/src/auth/orm/models/userConnectedAccount.ts +++ b/sdk/constructive-sdk/src/auth/orm/models/userConnectedAccount.ts @@ -72,13 +72,11 @@ export class UserConnectedAccountModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - userConnectedAccounts: { - nodes: InferSelectResult[]; - }; + userConnectedAccount: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'UserConnectedAccount', @@ -86,17 +84,26 @@ export class UserConnectedAccountModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'UserConnectedAccount', - fieldName: 'userConnectedAccounts', + fieldName: 'userConnectedAccount', document, variables, + transform: (data: { + userConnectedAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userConnectedAccount: data.userConnectedAccounts?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/auth/orm/models/webauthnCredential.ts b/sdk/constructive-sdk/src/auth/orm/models/webauthnCredential.ts index f02cf10bc..cca4c75cf 100644 --- a/sdk/constructive-sdk/src/auth/orm/models/webauthnCredential.ts +++ b/sdk/constructive-sdk/src/auth/orm/models/webauthnCredential.ts @@ -70,13 +70,11 @@ export class WebauthnCredentialModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - webauthnCredentials: { - nodes: InferSelectResult[]; - }; + webauthnCredential: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'WebauthnCredential', @@ -84,17 +82,26 @@ export class WebauthnCredentialModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'WebauthnCredentialFilter', + 'WebauthnCredentialOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'WebauthnCredential', - fieldName: 'webauthnCredentials', + fieldName: 'webauthnCredential', document, variables, + transform: (data: { + webauthnCredentials?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + webauthnCredential: data.webauthnCredentials?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/auth/orm/query-builder.ts b/sdk/constructive-sdk/src/auth/orm/query-builder.ts index f2fd4566f..5abdd3372 100644 --- a/sdk/constructive-sdk/src/auth/orm/query-builder.ts +++ b/sdk/constructive-sdk/src/auth/orm/query-builder.ts @@ -293,8 +293,9 @@ export function buildFindFirstDocument( operationName: string, queryField: string, select: TSelect, - args: { where?: TWhere }, + args: { where?: TWhere; orderBy?: string[] }, filterTypeName: string, + orderByTypeName: string, connectionFieldsMap?: Record> ): { document: string; variables: Record } { const selections = select @@ -322,6 +323,16 @@ export function buildFindFirstDocument( queryArgs, variables ); + addVariable( + { + varName: 'orderBy', + typeName: '[' + orderByTypeName + '!]', + value: args.orderBy?.length ? args.orderBy : undefined, + }, + variableDefinitions, + queryArgs, + variables + ); const document = t.document({ definitions: [ diff --git a/sdk/constructive-sdk/src/auth/orm/select-types.ts b/sdk/constructive-sdk/src/auth/orm/select-types.ts index 2621b3570..9c1ec1ad2 100644 --- a/sdk/constructive-sdk/src/auth/orm/select-types.ts +++ b/sdk/constructive-sdk/src/auth/orm/select-types.ts @@ -27,9 +27,10 @@ export interface FindManyArgs { offset?: number; } -export interface FindFirstArgs { +export interface FindFirstArgs { select?: TSelect; where?: TWhere; + orderBy?: TOrderBy[]; } export interface CreateArgs { diff --git a/sdk/constructive-sdk/src/objects/orm/models/commit.ts b/sdk/constructive-sdk/src/objects/orm/models/commit.ts index de0e94710..70f5c5960 100644 --- a/sdk/constructive-sdk/src/objects/orm/models/commit.ts +++ b/sdk/constructive-sdk/src/objects/orm/models/commit.ts @@ -70,13 +70,11 @@ export class CommitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - commits: { - nodes: InferSelectResult[]; - }; + commit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Commit', @@ -84,17 +82,26 @@ export class CommitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CommitFilter', + 'CommitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Commit', - fieldName: 'commits', + fieldName: 'commit', document, variables, + transform: (data: { + commits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + commit: data.commits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/objects/orm/models/getAllRecord.ts b/sdk/constructive-sdk/src/objects/orm/models/getAllRecord.ts index 53873a0f3..39a82fbbb 100644 --- a/sdk/constructive-sdk/src/objects/orm/models/getAllRecord.ts +++ b/sdk/constructive-sdk/src/objects/orm/models/getAllRecord.ts @@ -70,13 +70,11 @@ export class GetAllRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - getAll: { - nodes: InferSelectResult[]; - }; + getAllRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'GetAllRecord', @@ -84,17 +82,26 @@ export class GetAllRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'GetAllRecordFilter', + 'GetAllRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'GetAllRecord', - fieldName: 'getAll', + fieldName: 'getAllRecord', document, variables, + transform: (data: { + getAll?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + getAllRecord: data.getAll?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-sdk/src/objects/orm/models/object.ts b/sdk/constructive-sdk/src/objects/orm/models/object.ts index 085bdd4df..8a685b1df 100644 --- a/sdk/constructive-sdk/src/objects/orm/models/object.ts +++ b/sdk/constructive-sdk/src/objects/orm/models/object.ts @@ -70,13 +70,11 @@ export class ObjectModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - objects: { - nodes: InferSelectResult[]; - }; + object: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Object', @@ -84,17 +82,26 @@ export class ObjectModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ObjectFilter', + 'ObjectOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Object', - fieldName: 'objects', + fieldName: 'object', document, variables, + transform: (data: { + objects?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + object: data.objects?.nodes?.[0] ?? null, + }), }); } findOne( @@ -103,7 +110,7 @@ export class ObjectModel { select: S; } & StrictSelect ): QueryBuilder<{ - getNodeAtPath: InferSelectResult | null; + object: InferSelectResult | null; }> { const { document, variables } = buildFindOneDocument( 'Object', @@ -118,7 +125,7 @@ export class ObjectModel { client: this.client, operation: 'query', operationName: 'Object', - fieldName: 'getNodeAtPath', + fieldName: 'object', document, variables, }); diff --git a/sdk/constructive-sdk/src/objects/orm/models/ref.ts b/sdk/constructive-sdk/src/objects/orm/models/ref.ts index 016c70644..5c3419d89 100644 --- a/sdk/constructive-sdk/src/objects/orm/models/ref.ts +++ b/sdk/constructive-sdk/src/objects/orm/models/ref.ts @@ -70,13 +70,11 @@ export class RefModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - refs: { - nodes: InferSelectResult[]; - }; + ref: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Ref', @@ -84,17 +82,26 @@ export class RefModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RefFilter', + 'RefOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Ref', - fieldName: 'refs', + fieldName: 'ref', document, variables, + transform: (data: { + refs?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + ref: data.refs?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/objects/orm/models/store.ts b/sdk/constructive-sdk/src/objects/orm/models/store.ts index f249ee921..f80e63890 100644 --- a/sdk/constructive-sdk/src/objects/orm/models/store.ts +++ b/sdk/constructive-sdk/src/objects/orm/models/store.ts @@ -70,13 +70,11 @@ export class StoreModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - stores: { - nodes: InferSelectResult[]; - }; + store: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Store', @@ -84,17 +82,26 @@ export class StoreModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'StoreFilter', + 'StoreOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Store', - fieldName: 'stores', + fieldName: 'store', document, variables, + transform: (data: { + stores?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + store: data.stores?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/objects/orm/query-builder.ts b/sdk/constructive-sdk/src/objects/orm/query-builder.ts index f2fd4566f..5abdd3372 100644 --- a/sdk/constructive-sdk/src/objects/orm/query-builder.ts +++ b/sdk/constructive-sdk/src/objects/orm/query-builder.ts @@ -293,8 +293,9 @@ export function buildFindFirstDocument( operationName: string, queryField: string, select: TSelect, - args: { where?: TWhere }, + args: { where?: TWhere; orderBy?: string[] }, filterTypeName: string, + orderByTypeName: string, connectionFieldsMap?: Record> ): { document: string; variables: Record } { const selections = select @@ -322,6 +323,16 @@ export function buildFindFirstDocument( queryArgs, variables ); + addVariable( + { + varName: 'orderBy', + typeName: '[' + orderByTypeName + '!]', + value: args.orderBy?.length ? args.orderBy : undefined, + }, + variableDefinitions, + queryArgs, + variables + ); const document = t.document({ definitions: [ diff --git a/sdk/constructive-sdk/src/objects/orm/select-types.ts b/sdk/constructive-sdk/src/objects/orm/select-types.ts index 2621b3570..9c1ec1ad2 100644 --- a/sdk/constructive-sdk/src/objects/orm/select-types.ts +++ b/sdk/constructive-sdk/src/objects/orm/select-types.ts @@ -27,9 +27,10 @@ export interface FindManyArgs { offset?: number; } -export interface FindFirstArgs { +export interface FindFirstArgs { select?: TSelect; where?: TWhere; + orderBy?: TOrderBy[]; } export interface CreateArgs { diff --git a/sdk/constructive-sdk/src/public/orm/models/agentMessage.ts b/sdk/constructive-sdk/src/public/orm/models/agentMessage.ts index dd3434345..d128641c8 100644 --- a/sdk/constructive-sdk/src/public/orm/models/agentMessage.ts +++ b/sdk/constructive-sdk/src/public/orm/models/agentMessage.ts @@ -70,13 +70,11 @@ export class AgentMessageModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - agentMessages: { - nodes: InferSelectResult[]; - }; + agentMessage: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AgentMessage', @@ -84,17 +82,26 @@ export class AgentMessageModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AgentMessageFilter', + 'AgentMessageOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AgentMessage', - fieldName: 'agentMessages', + fieldName: 'agentMessage', document, variables, + transform: (data: { + agentMessages?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + agentMessage: data.agentMessages?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/agentTask.ts b/sdk/constructive-sdk/src/public/orm/models/agentTask.ts index 7f837b699..3bbc609f1 100644 --- a/sdk/constructive-sdk/src/public/orm/models/agentTask.ts +++ b/sdk/constructive-sdk/src/public/orm/models/agentTask.ts @@ -70,13 +70,11 @@ export class AgentTaskModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - agentTasks: { - nodes: InferSelectResult[]; - }; + agentTask: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AgentTask', @@ -84,17 +82,26 @@ export class AgentTaskModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AgentTaskFilter', + 'AgentTaskOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AgentTask', - fieldName: 'agentTasks', + fieldName: 'agentTask', document, variables, + transform: (data: { + agentTasks?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + agentTask: data.agentTasks?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/agentThread.ts b/sdk/constructive-sdk/src/public/orm/models/agentThread.ts index beb795fd1..7bbd14abe 100644 --- a/sdk/constructive-sdk/src/public/orm/models/agentThread.ts +++ b/sdk/constructive-sdk/src/public/orm/models/agentThread.ts @@ -70,13 +70,11 @@ export class AgentThreadModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - agentThreads: { - nodes: InferSelectResult[]; - }; + agentThread: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AgentThread', @@ -84,17 +82,26 @@ export class AgentThreadModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AgentThreadFilter', + 'AgentThreadOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AgentThread', - fieldName: 'agentThreads', + fieldName: 'agentThread', document, variables, + transform: (data: { + agentThreads?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + agentThread: data.agentThreads?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/api.ts b/sdk/constructive-sdk/src/public/orm/models/api.ts index 295ccbb65..5e2e04bd3 100644 --- a/sdk/constructive-sdk/src/public/orm/models/api.ts +++ b/sdk/constructive-sdk/src/public/orm/models/api.ts @@ -70,13 +70,11 @@ export class ApiModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - apis: { - nodes: InferSelectResult[]; - }; + api: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Api', @@ -84,17 +82,26 @@ export class ApiModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Api', - fieldName: 'apis', + fieldName: 'api', document, variables, + transform: (data: { + apis?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + api: data.apis?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/apiModule.ts b/sdk/constructive-sdk/src/public/orm/models/apiModule.ts index d90c9f9e9..d98c67c6e 100644 --- a/sdk/constructive-sdk/src/public/orm/models/apiModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/apiModule.ts @@ -70,13 +70,11 @@ export class ApiModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - apiModules: { - nodes: InferSelectResult[]; - }; + apiModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ApiModule', @@ -84,17 +82,26 @@ export class ApiModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ApiModuleFilter', + 'ApiModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ApiModule', - fieldName: 'apiModules', + fieldName: 'apiModule', document, variables, + transform: (data: { + apiModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + apiModule: data.apiModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/apiSchema.ts b/sdk/constructive-sdk/src/public/orm/models/apiSchema.ts index f9288041c..9ef99da8c 100644 --- a/sdk/constructive-sdk/src/public/orm/models/apiSchema.ts +++ b/sdk/constructive-sdk/src/public/orm/models/apiSchema.ts @@ -70,13 +70,11 @@ export class ApiSchemaModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - apiSchemas: { - nodes: InferSelectResult[]; - }; + apiSchema: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ApiSchema', @@ -84,17 +82,26 @@ export class ApiSchemaModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ApiSchemaFilter', + 'ApiSchemaOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ApiSchema', - fieldName: 'apiSchemas', + fieldName: 'apiSchema', document, variables, + transform: (data: { + apiSchemas?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + apiSchema: data.apiSchemas?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/app.ts b/sdk/constructive-sdk/src/public/orm/models/app.ts index f6a45b422..73ac9831b 100644 --- a/sdk/constructive-sdk/src/public/orm/models/app.ts +++ b/sdk/constructive-sdk/src/public/orm/models/app.ts @@ -70,13 +70,11 @@ export class AppModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - apps: { - nodes: InferSelectResult[]; - }; + app: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'App', @@ -84,17 +82,26 @@ export class AppModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppFilter', + 'AppOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'App', - fieldName: 'apps', + fieldName: 'app', document, variables, + transform: (data: { + apps?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + app: data.apps?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/appAchievement.ts b/sdk/constructive-sdk/src/public/orm/models/appAchievement.ts index f24447777..545b5e5f7 100644 --- a/sdk/constructive-sdk/src/public/orm/models/appAchievement.ts +++ b/sdk/constructive-sdk/src/public/orm/models/appAchievement.ts @@ -70,13 +70,11 @@ export class AppAchievementModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appAchievements: { - nodes: InferSelectResult[]; - }; + appAchievement: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppAchievement', @@ -84,17 +82,26 @@ export class AppAchievementModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppAchievementFilter', + 'AppAchievementOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppAchievement', - fieldName: 'appAchievements', + fieldName: 'appAchievement', document, variables, + transform: (data: { + appAchievements?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appAchievement: data.appAchievements?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/appAdminGrant.ts b/sdk/constructive-sdk/src/public/orm/models/appAdminGrant.ts index 6a2a59893..fd80edc23 100644 --- a/sdk/constructive-sdk/src/public/orm/models/appAdminGrant.ts +++ b/sdk/constructive-sdk/src/public/orm/models/appAdminGrant.ts @@ -70,13 +70,11 @@ export class AppAdminGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appAdminGrants: { - nodes: InferSelectResult[]; - }; + appAdminGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppAdminGrant', @@ -84,17 +82,26 @@ export class AppAdminGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppAdminGrantFilter', + 'AppAdminGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppAdminGrant', - fieldName: 'appAdminGrants', + fieldName: 'appAdminGrant', document, variables, + transform: (data: { + appAdminGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appAdminGrant: data.appAdminGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/appClaimedInvite.ts b/sdk/constructive-sdk/src/public/orm/models/appClaimedInvite.ts index 2a4c41dec..c9e66ec9c 100644 --- a/sdk/constructive-sdk/src/public/orm/models/appClaimedInvite.ts +++ b/sdk/constructive-sdk/src/public/orm/models/appClaimedInvite.ts @@ -70,13 +70,11 @@ export class AppClaimedInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appClaimedInvites: { - nodes: InferSelectResult[]; - }; + appClaimedInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppClaimedInvite', @@ -84,17 +82,26 @@ export class AppClaimedInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppClaimedInviteFilter', + 'AppClaimedInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppClaimedInvite', - fieldName: 'appClaimedInvites', + fieldName: 'appClaimedInvite', document, variables, + transform: (data: { + appClaimedInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appClaimedInvite: data.appClaimedInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/appGrant.ts b/sdk/constructive-sdk/src/public/orm/models/appGrant.ts index 2cb4f429a..4481fb3d8 100644 --- a/sdk/constructive-sdk/src/public/orm/models/appGrant.ts +++ b/sdk/constructive-sdk/src/public/orm/models/appGrant.ts @@ -70,13 +70,11 @@ export class AppGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appGrants: { - nodes: InferSelectResult[]; - }; + appGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppGrant', @@ -84,17 +82,26 @@ export class AppGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppGrantFilter', + 'AppGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppGrant', - fieldName: 'appGrants', + fieldName: 'appGrant', document, variables, + transform: (data: { + appGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appGrant: data.appGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/appInvite.ts b/sdk/constructive-sdk/src/public/orm/models/appInvite.ts index fe4a1c4e4..5fcbff936 100644 --- a/sdk/constructive-sdk/src/public/orm/models/appInvite.ts +++ b/sdk/constructive-sdk/src/public/orm/models/appInvite.ts @@ -70,13 +70,11 @@ export class AppInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appInvites: { - nodes: InferSelectResult[]; - }; + appInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppInvite', @@ -84,17 +82,26 @@ export class AppInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppInviteFilter', + 'AppInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppInvite', - fieldName: 'appInvites', + fieldName: 'appInvite', document, variables, + transform: (data: { + appInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appInvite: data.appInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/appLevel.ts b/sdk/constructive-sdk/src/public/orm/models/appLevel.ts index f9abef512..cd182a18c 100644 --- a/sdk/constructive-sdk/src/public/orm/models/appLevel.ts +++ b/sdk/constructive-sdk/src/public/orm/models/appLevel.ts @@ -70,13 +70,11 @@ export class AppLevelModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLevels: { - nodes: InferSelectResult[]; - }; + appLevel: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLevel', @@ -84,17 +82,26 @@ export class AppLevelModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLevelFilter', + 'AppLevelOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLevel', - fieldName: 'appLevels', + fieldName: 'appLevel', document, variables, + transform: (data: { + appLevels?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevel: data.appLevels?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/appLevelRequirement.ts b/sdk/constructive-sdk/src/public/orm/models/appLevelRequirement.ts index 54baeb7dc..c3f9d89f1 100644 --- a/sdk/constructive-sdk/src/public/orm/models/appLevelRequirement.ts +++ b/sdk/constructive-sdk/src/public/orm/models/appLevelRequirement.ts @@ -70,13 +70,11 @@ export class AppLevelRequirementModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLevelRequirements: { - nodes: InferSelectResult[]; - }; + appLevelRequirement: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLevelRequirement', @@ -84,17 +82,26 @@ export class AppLevelRequirementModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLevelRequirementFilter', + 'AppLevelRequirementOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLevelRequirement', - fieldName: 'appLevelRequirements', + fieldName: 'appLevelRequirement', document, variables, + transform: (data: { + appLevelRequirements?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLevelRequirement: data.appLevelRequirements?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/appLimit.ts b/sdk/constructive-sdk/src/public/orm/models/appLimit.ts index dea896420..2e109cb07 100644 --- a/sdk/constructive-sdk/src/public/orm/models/appLimit.ts +++ b/sdk/constructive-sdk/src/public/orm/models/appLimit.ts @@ -70,13 +70,11 @@ export class AppLimitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimits: { - nodes: InferSelectResult[]; - }; + appLimit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimit', @@ -84,17 +82,26 @@ export class AppLimitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitFilter', + 'AppLimitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimit', - fieldName: 'appLimits', + fieldName: 'appLimit', document, variables, + transform: (data: { + appLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimit: data.appLimits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/appLimitDefault.ts b/sdk/constructive-sdk/src/public/orm/models/appLimitDefault.ts index dfec3cdd9..f9df6376e 100644 --- a/sdk/constructive-sdk/src/public/orm/models/appLimitDefault.ts +++ b/sdk/constructive-sdk/src/public/orm/models/appLimitDefault.ts @@ -70,13 +70,11 @@ export class AppLimitDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimitDefaults: { - nodes: InferSelectResult[]; - }; + appLimitDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimitDefault', @@ -84,17 +82,26 @@ export class AppLimitDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitDefaultFilter', + 'AppLimitDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimitDefault', - fieldName: 'appLimitDefaults', + fieldName: 'appLimitDefault', document, variables, + transform: (data: { + appLimitDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimitDefault: data.appLimitDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/appLimitEvent.ts b/sdk/constructive-sdk/src/public/orm/models/appLimitEvent.ts index 8f367e889..b8e0c98e1 100644 --- a/sdk/constructive-sdk/src/public/orm/models/appLimitEvent.ts +++ b/sdk/constructive-sdk/src/public/orm/models/appLimitEvent.ts @@ -70,13 +70,11 @@ export class AppLimitEventModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appLimitEvents: { - nodes: InferSelectResult[]; - }; + appLimitEvent: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppLimitEvent', @@ -84,17 +82,26 @@ export class AppLimitEventModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppLimitEventFilter', + 'AppLimitEventOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppLimitEvent', - fieldName: 'appLimitEvents', + fieldName: 'appLimitEvent', document, variables, + transform: (data: { + appLimitEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appLimitEvent: data.appLimitEvents?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-sdk/src/public/orm/models/appMembership.ts b/sdk/constructive-sdk/src/public/orm/models/appMembership.ts index a830192e6..a4011c41a 100644 --- a/sdk/constructive-sdk/src/public/orm/models/appMembership.ts +++ b/sdk/constructive-sdk/src/public/orm/models/appMembership.ts @@ -70,13 +70,11 @@ export class AppMembershipModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appMemberships: { - nodes: InferSelectResult[]; - }; + appMembership: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppMembership', @@ -84,17 +82,26 @@ export class AppMembershipModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppMembershipFilter', + 'AppMembershipOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppMembership', - fieldName: 'appMemberships', + fieldName: 'appMembership', document, variables, + transform: (data: { + appMemberships?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appMembership: data.appMemberships?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/appMembershipDefault.ts b/sdk/constructive-sdk/src/public/orm/models/appMembershipDefault.ts index 8b1a54c01..f69f1aca6 100644 --- a/sdk/constructive-sdk/src/public/orm/models/appMembershipDefault.ts +++ b/sdk/constructive-sdk/src/public/orm/models/appMembershipDefault.ts @@ -72,13 +72,11 @@ export class AppMembershipDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appMembershipDefaults: { - nodes: InferSelectResult[]; - }; + appMembershipDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppMembershipDefault', @@ -86,17 +84,26 @@ export class AppMembershipDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppMembershipDefaultFilter', + 'AppMembershipDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppMembershipDefault', - fieldName: 'appMembershipDefaults', + fieldName: 'appMembershipDefault', document, variables, + transform: (data: { + appMembershipDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appMembershipDefault: data.appMembershipDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/appOwnerGrant.ts b/sdk/constructive-sdk/src/public/orm/models/appOwnerGrant.ts index a8695557e..eeb815d84 100644 --- a/sdk/constructive-sdk/src/public/orm/models/appOwnerGrant.ts +++ b/sdk/constructive-sdk/src/public/orm/models/appOwnerGrant.ts @@ -70,13 +70,11 @@ export class AppOwnerGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appOwnerGrants: { - nodes: InferSelectResult[]; - }; + appOwnerGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppOwnerGrant', @@ -84,17 +82,26 @@ export class AppOwnerGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppOwnerGrantFilter', + 'AppOwnerGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppOwnerGrant', - fieldName: 'appOwnerGrants', + fieldName: 'appOwnerGrant', document, variables, + transform: (data: { + appOwnerGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appOwnerGrant: data.appOwnerGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/appPermission.ts b/sdk/constructive-sdk/src/public/orm/models/appPermission.ts index 2575c5de2..e71adea65 100644 --- a/sdk/constructive-sdk/src/public/orm/models/appPermission.ts +++ b/sdk/constructive-sdk/src/public/orm/models/appPermission.ts @@ -70,13 +70,11 @@ export class AppPermissionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appPermissions: { - nodes: InferSelectResult[]; - }; + appPermission: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppPermission', @@ -84,17 +82,26 @@ export class AppPermissionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppPermissionFilter', + 'AppPermissionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppPermission', - fieldName: 'appPermissions', + fieldName: 'appPermission', document, variables, + transform: (data: { + appPermissions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appPermission: data.appPermissions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/appPermissionDefault.ts b/sdk/constructive-sdk/src/public/orm/models/appPermissionDefault.ts index 427272883..d5511aed0 100644 --- a/sdk/constructive-sdk/src/public/orm/models/appPermissionDefault.ts +++ b/sdk/constructive-sdk/src/public/orm/models/appPermissionDefault.ts @@ -72,13 +72,11 @@ export class AppPermissionDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appPermissionDefaults: { - nodes: InferSelectResult[]; - }; + appPermissionDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppPermissionDefault', @@ -86,17 +84,26 @@ export class AppPermissionDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppPermissionDefaultFilter', + 'AppPermissionDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppPermissionDefault', - fieldName: 'appPermissionDefaults', + fieldName: 'appPermissionDefault', document, variables, + transform: (data: { + appPermissionDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appPermissionDefault: data.appPermissionDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/appStep.ts b/sdk/constructive-sdk/src/public/orm/models/appStep.ts index 29dae0d6c..7ebb44fa1 100644 --- a/sdk/constructive-sdk/src/public/orm/models/appStep.ts +++ b/sdk/constructive-sdk/src/public/orm/models/appStep.ts @@ -70,13 +70,11 @@ export class AppStepModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - appSteps: { - nodes: InferSelectResult[]; - }; + appStep: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AppStep', @@ -84,17 +82,26 @@ export class AppStepModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AppStepFilter', + 'AppStepOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AppStep', - fieldName: 'appSteps', + fieldName: 'appStep', document, variables, + transform: (data: { + appSteps?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + appStep: data.appSteps?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/astMigration.ts b/sdk/constructive-sdk/src/public/orm/models/astMigration.ts index 8bab8cfd0..bfcc5f455 100644 --- a/sdk/constructive-sdk/src/public/orm/models/astMigration.ts +++ b/sdk/constructive-sdk/src/public/orm/models/astMigration.ts @@ -70,13 +70,11 @@ export class AstMigrationModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - astMigrations: { - nodes: InferSelectResult[]; - }; + astMigration: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AstMigration', @@ -84,17 +82,26 @@ export class AstMigrationModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AstMigrationFilter', + 'AstMigrationOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AstMigration', - fieldName: 'astMigrations', + fieldName: 'astMigration', document, variables, + transform: (data: { + astMigrations?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + astMigration: data.astMigrations?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/auditLog.ts b/sdk/constructive-sdk/src/public/orm/models/auditLog.ts index 2d388026d..8d8abc012 100644 --- a/sdk/constructive-sdk/src/public/orm/models/auditLog.ts +++ b/sdk/constructive-sdk/src/public/orm/models/auditLog.ts @@ -70,13 +70,11 @@ export class AuditLogModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - auditLogs: { - nodes: InferSelectResult[]; - }; + auditLog: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'AuditLog', @@ -84,17 +82,26 @@ export class AuditLogModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'AuditLogFilter', + 'AuditLogOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'AuditLog', - fieldName: 'auditLogs', + fieldName: 'auditLog', document, variables, + transform: (data: { + auditLogs?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + auditLog: data.auditLogs?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/billingModule.ts b/sdk/constructive-sdk/src/public/orm/models/billingModule.ts index 73e7928ed..712d75ae7 100644 --- a/sdk/constructive-sdk/src/public/orm/models/billingModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/billingModule.ts @@ -70,13 +70,11 @@ export class BillingModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - billingModules: { - nodes: InferSelectResult[]; - }; + billingModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'BillingModule', @@ -84,17 +82,26 @@ export class BillingModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'BillingModuleFilter', + 'BillingModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'BillingModule', - fieldName: 'billingModules', + fieldName: 'billingModule', document, variables, + transform: (data: { + billingModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + billingModule: data.billingModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/blueprint.ts b/sdk/constructive-sdk/src/public/orm/models/blueprint.ts index fa1ea0286..239c50eb9 100644 --- a/sdk/constructive-sdk/src/public/orm/models/blueprint.ts +++ b/sdk/constructive-sdk/src/public/orm/models/blueprint.ts @@ -70,13 +70,11 @@ export class BlueprintModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - blueprints: { - nodes: InferSelectResult[]; - }; + blueprint: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Blueprint', @@ -84,17 +82,26 @@ export class BlueprintModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'BlueprintFilter', + 'BlueprintOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Blueprint', - fieldName: 'blueprints', + fieldName: 'blueprint', document, variables, + transform: (data: { + blueprints?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + blueprint: data.blueprints?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/blueprintConstruction.ts b/sdk/constructive-sdk/src/public/orm/models/blueprintConstruction.ts index 3f7a8657d..dad6db0bf 100644 --- a/sdk/constructive-sdk/src/public/orm/models/blueprintConstruction.ts +++ b/sdk/constructive-sdk/src/public/orm/models/blueprintConstruction.ts @@ -72,13 +72,11 @@ export class BlueprintConstructionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - blueprintConstructions: { - nodes: InferSelectResult[]; - }; + blueprintConstruction: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'BlueprintConstruction', @@ -86,17 +84,26 @@ export class BlueprintConstructionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'BlueprintConstructionFilter', + 'BlueprintConstructionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'BlueprintConstruction', - fieldName: 'blueprintConstructions', + fieldName: 'blueprintConstruction', document, variables, + transform: (data: { + blueprintConstructions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + blueprintConstruction: data.blueprintConstructions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/blueprintTemplate.ts b/sdk/constructive-sdk/src/public/orm/models/blueprintTemplate.ts index 31d7824e5..1f957cded 100644 --- a/sdk/constructive-sdk/src/public/orm/models/blueprintTemplate.ts +++ b/sdk/constructive-sdk/src/public/orm/models/blueprintTemplate.ts @@ -70,13 +70,11 @@ export class BlueprintTemplateModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - blueprintTemplates: { - nodes: InferSelectResult[]; - }; + blueprintTemplate: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'BlueprintTemplate', @@ -84,17 +82,26 @@ export class BlueprintTemplateModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'BlueprintTemplateFilter', + 'BlueprintTemplateOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'BlueprintTemplate', - fieldName: 'blueprintTemplates', + fieldName: 'blueprintTemplate', document, variables, + transform: (data: { + blueprintTemplates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + blueprintTemplate: data.blueprintTemplates?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/checkConstraint.ts b/sdk/constructive-sdk/src/public/orm/models/checkConstraint.ts index 323b64b6c..5c052886f 100644 --- a/sdk/constructive-sdk/src/public/orm/models/checkConstraint.ts +++ b/sdk/constructive-sdk/src/public/orm/models/checkConstraint.ts @@ -70,13 +70,11 @@ export class CheckConstraintModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - checkConstraints: { - nodes: InferSelectResult[]; - }; + checkConstraint: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'CheckConstraint', @@ -84,17 +82,26 @@ export class CheckConstraintModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CheckConstraintFilter', + 'CheckConstraintOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'CheckConstraint', - fieldName: 'checkConstraints', + fieldName: 'checkConstraint', document, variables, + transform: (data: { + checkConstraints?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + checkConstraint: data.checkConstraints?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/commit.ts b/sdk/constructive-sdk/src/public/orm/models/commit.ts index de0e94710..70f5c5960 100644 --- a/sdk/constructive-sdk/src/public/orm/models/commit.ts +++ b/sdk/constructive-sdk/src/public/orm/models/commit.ts @@ -70,13 +70,11 @@ export class CommitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - commits: { - nodes: InferSelectResult[]; - }; + commit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Commit', @@ -84,17 +82,26 @@ export class CommitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CommitFilter', + 'CommitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Commit', - fieldName: 'commits', + fieldName: 'commit', document, variables, + transform: (data: { + commits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + commit: data.commits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/connectedAccountsModule.ts b/sdk/constructive-sdk/src/public/orm/models/connectedAccountsModule.ts index 408aec32a..226307b4b 100644 --- a/sdk/constructive-sdk/src/public/orm/models/connectedAccountsModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/connectedAccountsModule.ts @@ -72,13 +72,11 @@ export class ConnectedAccountsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - connectedAccountsModules: { - nodes: InferSelectResult[]; - }; + connectedAccountsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ConnectedAccountsModule', @@ -86,17 +84,26 @@ export class ConnectedAccountsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ConnectedAccountsModuleFilter', + 'ConnectedAccountsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ConnectedAccountsModule', - fieldName: 'connectedAccountsModules', + fieldName: 'connectedAccountsModule', document, variables, + transform: (data: { + connectedAccountsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + connectedAccountsModule: data.connectedAccountsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/cryptoAddress.ts b/sdk/constructive-sdk/src/public/orm/models/cryptoAddress.ts index 7357c0126..11914bd9d 100644 --- a/sdk/constructive-sdk/src/public/orm/models/cryptoAddress.ts +++ b/sdk/constructive-sdk/src/public/orm/models/cryptoAddress.ts @@ -70,13 +70,11 @@ export class CryptoAddressModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - cryptoAddresses: { - nodes: InferSelectResult[]; - }; + cryptoAddress: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'CryptoAddress', @@ -84,17 +82,26 @@ export class CryptoAddressModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CryptoAddressFilter', + 'CryptoAddressOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'CryptoAddress', - fieldName: 'cryptoAddresses', + fieldName: 'cryptoAddress', document, variables, + transform: (data: { + cryptoAddresses?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + cryptoAddress: data.cryptoAddresses?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/cryptoAddressesModule.ts b/sdk/constructive-sdk/src/public/orm/models/cryptoAddressesModule.ts index 25af5781a..6618ae4e9 100644 --- a/sdk/constructive-sdk/src/public/orm/models/cryptoAddressesModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/cryptoAddressesModule.ts @@ -72,13 +72,11 @@ export class CryptoAddressesModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - cryptoAddressesModules: { - nodes: InferSelectResult[]; - }; + cryptoAddressesModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'CryptoAddressesModule', @@ -86,17 +84,26 @@ export class CryptoAddressesModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CryptoAddressesModuleFilter', + 'CryptoAddressesModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'CryptoAddressesModule', - fieldName: 'cryptoAddressesModules', + fieldName: 'cryptoAddressesModule', document, variables, + transform: (data: { + cryptoAddressesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + cryptoAddressesModule: data.cryptoAddressesModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/cryptoAuthModule.ts b/sdk/constructive-sdk/src/public/orm/models/cryptoAuthModule.ts index c654aa3f7..c90349b9d 100644 --- a/sdk/constructive-sdk/src/public/orm/models/cryptoAuthModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/cryptoAuthModule.ts @@ -70,13 +70,11 @@ export class CryptoAuthModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - cryptoAuthModules: { - nodes: InferSelectResult[]; - }; + cryptoAuthModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'CryptoAuthModule', @@ -84,17 +82,26 @@ export class CryptoAuthModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'CryptoAuthModuleFilter', + 'CryptoAuthModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'CryptoAuthModule', - fieldName: 'cryptoAuthModules', + fieldName: 'cryptoAuthModule', document, variables, + transform: (data: { + cryptoAuthModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + cryptoAuthModule: data.cryptoAuthModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/database.ts b/sdk/constructive-sdk/src/public/orm/models/database.ts index 6a4293010..57b350548 100644 --- a/sdk/constructive-sdk/src/public/orm/models/database.ts +++ b/sdk/constructive-sdk/src/public/orm/models/database.ts @@ -70,13 +70,11 @@ export class DatabaseModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - databases: { - nodes: InferSelectResult[]; - }; + database: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Database', @@ -84,17 +82,26 @@ export class DatabaseModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DatabaseFilter', + 'DatabaseOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Database', - fieldName: 'databases', + fieldName: 'database', document, variables, + transform: (data: { + databases?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + database: data.databases?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/databaseProvisionModule.ts b/sdk/constructive-sdk/src/public/orm/models/databaseProvisionModule.ts index 4d6c37645..4cf322de6 100644 --- a/sdk/constructive-sdk/src/public/orm/models/databaseProvisionModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/databaseProvisionModule.ts @@ -72,13 +72,11 @@ export class DatabaseProvisionModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - databaseProvisionModules: { - nodes: InferSelectResult[]; - }; + databaseProvisionModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DatabaseProvisionModule', @@ -86,17 +84,26 @@ export class DatabaseProvisionModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DatabaseProvisionModuleFilter', + 'DatabaseProvisionModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DatabaseProvisionModule', - fieldName: 'databaseProvisionModules', + fieldName: 'databaseProvisionModule', document, variables, + transform: (data: { + databaseProvisionModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + databaseProvisionModule: data.databaseProvisionModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/databaseTransfer.ts b/sdk/constructive-sdk/src/public/orm/models/databaseTransfer.ts index e5d347907..dd22777cd 100644 --- a/sdk/constructive-sdk/src/public/orm/models/databaseTransfer.ts +++ b/sdk/constructive-sdk/src/public/orm/models/databaseTransfer.ts @@ -70,13 +70,11 @@ export class DatabaseTransferModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - databaseTransfers: { - nodes: InferSelectResult[]; - }; + databaseTransfer: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DatabaseTransfer', @@ -84,17 +82,26 @@ export class DatabaseTransferModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DatabaseTransferFilter', + 'DatabaseTransferOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DatabaseTransfer', - fieldName: 'databaseTransfers', + fieldName: 'databaseTransfer', document, variables, + transform: (data: { + databaseTransfers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + databaseTransfer: data.databaseTransfers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/defaultIdsModule.ts b/sdk/constructive-sdk/src/public/orm/models/defaultIdsModule.ts index aa235bd39..9553db8ed 100644 --- a/sdk/constructive-sdk/src/public/orm/models/defaultIdsModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/defaultIdsModule.ts @@ -70,13 +70,11 @@ export class DefaultIdsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - defaultIdsModules: { - nodes: InferSelectResult[]; - }; + defaultIdsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DefaultIdsModule', @@ -84,17 +82,26 @@ export class DefaultIdsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DefaultIdsModuleFilter', + 'DefaultIdsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DefaultIdsModule', - fieldName: 'defaultIdsModules', + fieldName: 'defaultIdsModule', document, variables, + transform: (data: { + defaultIdsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + defaultIdsModule: data.defaultIdsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/defaultPrivilege.ts b/sdk/constructive-sdk/src/public/orm/models/defaultPrivilege.ts index 7041b7b55..36414357b 100644 --- a/sdk/constructive-sdk/src/public/orm/models/defaultPrivilege.ts +++ b/sdk/constructive-sdk/src/public/orm/models/defaultPrivilege.ts @@ -70,13 +70,11 @@ export class DefaultPrivilegeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - defaultPrivileges: { - nodes: InferSelectResult[]; - }; + defaultPrivilege: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DefaultPrivilege', @@ -84,17 +82,26 @@ export class DefaultPrivilegeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DefaultPrivilegeFilter', + 'DefaultPrivilegeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DefaultPrivilege', - fieldName: 'defaultPrivileges', + fieldName: 'defaultPrivilege', document, variables, + transform: (data: { + defaultPrivileges?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + defaultPrivilege: data.defaultPrivileges?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/denormalizedTableField.ts b/sdk/constructive-sdk/src/public/orm/models/denormalizedTableField.ts index d94b84104..881f2ffdb 100644 --- a/sdk/constructive-sdk/src/public/orm/models/denormalizedTableField.ts +++ b/sdk/constructive-sdk/src/public/orm/models/denormalizedTableField.ts @@ -72,13 +72,11 @@ export class DenormalizedTableFieldModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - denormalizedTableFields: { - nodes: InferSelectResult[]; - }; + denormalizedTableField: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DenormalizedTableField', @@ -86,17 +84,26 @@ export class DenormalizedTableFieldModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DenormalizedTableFieldFilter', + 'DenormalizedTableFieldOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DenormalizedTableField', - fieldName: 'denormalizedTableFields', + fieldName: 'denormalizedTableField', document, variables, + transform: (data: { + denormalizedTableFields?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + denormalizedTableField: data.denormalizedTableFields?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/devicesModule.ts b/sdk/constructive-sdk/src/public/orm/models/devicesModule.ts index 11386e4fe..8c9a7e06e 100644 --- a/sdk/constructive-sdk/src/public/orm/models/devicesModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/devicesModule.ts @@ -70,13 +70,11 @@ export class DevicesModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - devicesModules: { - nodes: InferSelectResult[]; - }; + devicesModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'DevicesModule', @@ -84,17 +82,26 @@ export class DevicesModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DevicesModuleFilter', + 'DevicesModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'DevicesModule', - fieldName: 'devicesModules', + fieldName: 'devicesModule', document, variables, + transform: (data: { + devicesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + devicesModule: data.devicesModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/domain.ts b/sdk/constructive-sdk/src/public/orm/models/domain.ts index acf05455c..ab0016ec4 100644 --- a/sdk/constructive-sdk/src/public/orm/models/domain.ts +++ b/sdk/constructive-sdk/src/public/orm/models/domain.ts @@ -70,13 +70,11 @@ export class DomainModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - domains: { - nodes: InferSelectResult[]; - }; + domain: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Domain', @@ -84,17 +82,26 @@ export class DomainModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'DomainFilter', + 'DomainOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Domain', - fieldName: 'domains', + fieldName: 'domain', document, variables, + transform: (data: { + domains?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + domain: data.domains?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/email.ts b/sdk/constructive-sdk/src/public/orm/models/email.ts index aa83efc07..325475b9c 100644 --- a/sdk/constructive-sdk/src/public/orm/models/email.ts +++ b/sdk/constructive-sdk/src/public/orm/models/email.ts @@ -70,13 +70,11 @@ export class EmailModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - emails: { - nodes: InferSelectResult[]; - }; + email: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Email', @@ -84,17 +82,26 @@ export class EmailModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EmailFilter', + 'EmailOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Email', - fieldName: 'emails', + fieldName: 'email', document, variables, + transform: (data: { + emails?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + email: data.emails?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/emailsModule.ts b/sdk/constructive-sdk/src/public/orm/models/emailsModule.ts index 984018c0c..e95985b85 100644 --- a/sdk/constructive-sdk/src/public/orm/models/emailsModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/emailsModule.ts @@ -70,13 +70,11 @@ export class EmailsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - emailsModules: { - nodes: InferSelectResult[]; - }; + emailsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'EmailsModule', @@ -84,17 +82,26 @@ export class EmailsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EmailsModuleFilter', + 'EmailsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'EmailsModule', - fieldName: 'emailsModules', + fieldName: 'emailsModule', document, variables, + transform: (data: { + emailsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + emailsModule: data.emailsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/embeddingChunk.ts b/sdk/constructive-sdk/src/public/orm/models/embeddingChunk.ts index 6c175145d..a5c7feb75 100644 --- a/sdk/constructive-sdk/src/public/orm/models/embeddingChunk.ts +++ b/sdk/constructive-sdk/src/public/orm/models/embeddingChunk.ts @@ -70,13 +70,11 @@ export class EmbeddingChunkModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - embeddingChunks: { - nodes: InferSelectResult[]; - }; + embeddingChunk: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'EmbeddingChunk', @@ -84,17 +82,26 @@ export class EmbeddingChunkModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EmbeddingChunkFilter', + 'EmbeddingChunkOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'EmbeddingChunk', - fieldName: 'embeddingChunks', + fieldName: 'embeddingChunk', document, variables, + transform: (data: { + embeddingChunks?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + embeddingChunk: data.embeddingChunks?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/encryptedSecretsModule.ts b/sdk/constructive-sdk/src/public/orm/models/encryptedSecretsModule.ts index 8656f0937..754ec7e78 100644 --- a/sdk/constructive-sdk/src/public/orm/models/encryptedSecretsModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/encryptedSecretsModule.ts @@ -72,13 +72,11 @@ export class EncryptedSecretsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - encryptedSecretsModules: { - nodes: InferSelectResult[]; - }; + encryptedSecretsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'EncryptedSecretsModule', @@ -86,17 +84,26 @@ export class EncryptedSecretsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EncryptedSecretsModuleFilter', + 'EncryptedSecretsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'EncryptedSecretsModule', - fieldName: 'encryptedSecretsModules', + fieldName: 'encryptedSecretsModule', document, variables, + transform: (data: { + encryptedSecretsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + encryptedSecretsModule: data.encryptedSecretsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/entityTypeProvision.ts b/sdk/constructive-sdk/src/public/orm/models/entityTypeProvision.ts index 00ae9ebbc..93373a3dd 100644 --- a/sdk/constructive-sdk/src/public/orm/models/entityTypeProvision.ts +++ b/sdk/constructive-sdk/src/public/orm/models/entityTypeProvision.ts @@ -70,13 +70,11 @@ export class EntityTypeProvisionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - entityTypeProvisions: { - nodes: InferSelectResult[]; - }; + entityTypeProvision: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'EntityTypeProvision', @@ -84,17 +82,26 @@ export class EntityTypeProvisionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EntityTypeProvisionFilter', + 'EntityTypeProvisionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'EntityTypeProvision', - fieldName: 'entityTypeProvisions', + fieldName: 'entityTypeProvision', document, variables, + transform: (data: { + entityTypeProvisions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + entityTypeProvision: data.entityTypeProvisions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/enum.ts b/sdk/constructive-sdk/src/public/orm/models/enum.ts index 1e0e12ee3..58495e155 100644 --- a/sdk/constructive-sdk/src/public/orm/models/enum.ts +++ b/sdk/constructive-sdk/src/public/orm/models/enum.ts @@ -70,13 +70,11 @@ export class EnumModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - enums: { - nodes: InferSelectResult[]; - }; + enum: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Enum', @@ -84,17 +82,26 @@ export class EnumModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'EnumFilter', + 'EnumOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Enum', - fieldName: 'enums', + fieldName: 'enum', document, variables, + transform: (data: { + enums?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + enum: data.enums?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/field.ts b/sdk/constructive-sdk/src/public/orm/models/field.ts index d8e8fc4ee..7664e791c 100644 --- a/sdk/constructive-sdk/src/public/orm/models/field.ts +++ b/sdk/constructive-sdk/src/public/orm/models/field.ts @@ -70,13 +70,11 @@ export class FieldModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - fields: { - nodes: InferSelectResult[]; - }; + field: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Field', @@ -84,17 +82,26 @@ export class FieldModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'FieldFilter', + 'FieldOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Field', - fieldName: 'fields', + fieldName: 'field', document, variables, + transform: (data: { + fields?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + field: data.fields?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/foreignKeyConstraint.ts b/sdk/constructive-sdk/src/public/orm/models/foreignKeyConstraint.ts index 951dc4fe2..36e80496f 100644 --- a/sdk/constructive-sdk/src/public/orm/models/foreignKeyConstraint.ts +++ b/sdk/constructive-sdk/src/public/orm/models/foreignKeyConstraint.ts @@ -72,13 +72,11 @@ export class ForeignKeyConstraintModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - foreignKeyConstraints: { - nodes: InferSelectResult[]; - }; + foreignKeyConstraint: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ForeignKeyConstraint', @@ -86,17 +84,26 @@ export class ForeignKeyConstraintModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ForeignKeyConstraintFilter', + 'ForeignKeyConstraintOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ForeignKeyConstraint', - fieldName: 'foreignKeyConstraints', + fieldName: 'foreignKeyConstraint', document, variables, + transform: (data: { + foreignKeyConstraints?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + foreignKeyConstraint: data.foreignKeyConstraints?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/fullTextSearch.ts b/sdk/constructive-sdk/src/public/orm/models/fullTextSearch.ts index a0a592138..2135f8447 100644 --- a/sdk/constructive-sdk/src/public/orm/models/fullTextSearch.ts +++ b/sdk/constructive-sdk/src/public/orm/models/fullTextSearch.ts @@ -70,13 +70,11 @@ export class FullTextSearchModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - fullTextSearches: { - nodes: InferSelectResult[]; - }; + fullTextSearch: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'FullTextSearch', @@ -84,17 +82,26 @@ export class FullTextSearchModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'FullTextSearchFilter', + 'FullTextSearchOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'FullTextSearch', - fieldName: 'fullTextSearches', + fieldName: 'fullTextSearch', document, variables, + transform: (data: { + fullTextSearches?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + fullTextSearch: data.fullTextSearches?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/getAllRecord.ts b/sdk/constructive-sdk/src/public/orm/models/getAllRecord.ts index 53873a0f3..39a82fbbb 100644 --- a/sdk/constructive-sdk/src/public/orm/models/getAllRecord.ts +++ b/sdk/constructive-sdk/src/public/orm/models/getAllRecord.ts @@ -70,13 +70,11 @@ export class GetAllRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - getAll: { - nodes: InferSelectResult[]; - }; + getAllRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'GetAllRecord', @@ -84,17 +82,26 @@ export class GetAllRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'GetAllRecordFilter', + 'GetAllRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'GetAllRecord', - fieldName: 'getAll', + fieldName: 'getAllRecord', document, variables, + transform: (data: { + getAll?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + getAllRecord: data.getAll?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-sdk/src/public/orm/models/hierarchyModule.ts b/sdk/constructive-sdk/src/public/orm/models/hierarchyModule.ts index 325927bd5..e1eca248c 100644 --- a/sdk/constructive-sdk/src/public/orm/models/hierarchyModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/hierarchyModule.ts @@ -70,13 +70,11 @@ export class HierarchyModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - hierarchyModules: { - nodes: InferSelectResult[]; - }; + hierarchyModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'HierarchyModule', @@ -84,17 +82,26 @@ export class HierarchyModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'HierarchyModuleFilter', + 'HierarchyModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'HierarchyModule', - fieldName: 'hierarchyModules', + fieldName: 'hierarchyModule', document, variables, + transform: (data: { + hierarchyModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + hierarchyModule: data.hierarchyModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/identityProvider.ts b/sdk/constructive-sdk/src/public/orm/models/identityProvider.ts index 9c9cfc0d9..cdc672145 100644 --- a/sdk/constructive-sdk/src/public/orm/models/identityProvider.ts +++ b/sdk/constructive-sdk/src/public/orm/models/identityProvider.ts @@ -70,13 +70,11 @@ export class IdentityProviderModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - identityProviders: { - nodes: InferSelectResult[]; - }; + identityProvider: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'IdentityProvider', @@ -84,17 +82,26 @@ export class IdentityProviderModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'IdentityProviderFilter', + 'IdentityProviderOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'IdentityProvider', - fieldName: 'identityProviders', + fieldName: 'identityProvider', document, variables, + transform: (data: { + identityProviders?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + identityProvider: data.identityProviders?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-sdk/src/public/orm/models/identityProvidersModule.ts b/sdk/constructive-sdk/src/public/orm/models/identityProvidersModule.ts index 151bd7aa6..86a507559 100644 --- a/sdk/constructive-sdk/src/public/orm/models/identityProvidersModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/identityProvidersModule.ts @@ -72,13 +72,11 @@ export class IdentityProvidersModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - identityProvidersModules: { - nodes: InferSelectResult[]; - }; + identityProvidersModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'IdentityProvidersModule', @@ -86,17 +84,26 @@ export class IdentityProvidersModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'IdentityProvidersModuleFilter', + 'IdentityProvidersModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'IdentityProvidersModule', - fieldName: 'identityProvidersModules', + fieldName: 'identityProvidersModule', document, variables, + transform: (data: { + identityProvidersModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + identityProvidersModule: data.identityProvidersModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/indexModel.ts b/sdk/constructive-sdk/src/public/orm/models/indexModel.ts index 052334e57..1c7eb1e96 100644 --- a/sdk/constructive-sdk/src/public/orm/models/indexModel.ts +++ b/sdk/constructive-sdk/src/public/orm/models/indexModel.ts @@ -70,13 +70,11 @@ export class IndexModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - indices: { - nodes: InferSelectResult[]; - }; + index: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Index', @@ -84,17 +82,26 @@ export class IndexModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'IndexFilter', + 'IndexOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Index', - fieldName: 'indices', + fieldName: 'index', document, variables, + transform: (data: { + indices?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + index: data.indices?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/invitesModule.ts b/sdk/constructive-sdk/src/public/orm/models/invitesModule.ts index f7999f502..b31e122a0 100644 --- a/sdk/constructive-sdk/src/public/orm/models/invitesModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/invitesModule.ts @@ -70,13 +70,11 @@ export class InvitesModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - invitesModules: { - nodes: InferSelectResult[]; - }; + invitesModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'InvitesModule', @@ -84,17 +82,26 @@ export class InvitesModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'InvitesModuleFilter', + 'InvitesModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'InvitesModule', - fieldName: 'invitesModules', + fieldName: 'invitesModule', document, variables, + transform: (data: { + invitesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + invitesModule: data.invitesModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/levelsModule.ts b/sdk/constructive-sdk/src/public/orm/models/levelsModule.ts index 0c758ad86..3cd4aa3cb 100644 --- a/sdk/constructive-sdk/src/public/orm/models/levelsModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/levelsModule.ts @@ -70,13 +70,11 @@ export class LevelsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - levelsModules: { - nodes: InferSelectResult[]; - }; + levelsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'LevelsModule', @@ -84,17 +82,26 @@ export class LevelsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'LevelsModuleFilter', + 'LevelsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'LevelsModule', - fieldName: 'levelsModules', + fieldName: 'levelsModule', document, variables, + transform: (data: { + levelsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + levelsModule: data.levelsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/limitsModule.ts b/sdk/constructive-sdk/src/public/orm/models/limitsModule.ts index 10e89be1d..60dec7814 100644 --- a/sdk/constructive-sdk/src/public/orm/models/limitsModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/limitsModule.ts @@ -70,13 +70,11 @@ export class LimitsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - limitsModules: { - nodes: InferSelectResult[]; - }; + limitsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'LimitsModule', @@ -84,17 +82,26 @@ export class LimitsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'LimitsModuleFilter', + 'LimitsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'LimitsModule', - fieldName: 'limitsModules', + fieldName: 'limitsModule', document, variables, + transform: (data: { + limitsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + limitsModule: data.limitsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/membershipType.ts b/sdk/constructive-sdk/src/public/orm/models/membershipType.ts index 40fac5490..ee7ed596c 100644 --- a/sdk/constructive-sdk/src/public/orm/models/membershipType.ts +++ b/sdk/constructive-sdk/src/public/orm/models/membershipType.ts @@ -70,13 +70,11 @@ export class MembershipTypeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - membershipTypes: { - nodes: InferSelectResult[]; - }; + membershipType: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'MembershipType', @@ -84,17 +82,26 @@ export class MembershipTypeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'MembershipTypeFilter', + 'MembershipTypeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'MembershipType', - fieldName: 'membershipTypes', + fieldName: 'membershipType', document, variables, + transform: (data: { + membershipTypes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + membershipType: data.membershipTypes?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/membershipTypesModule.ts b/sdk/constructive-sdk/src/public/orm/models/membershipTypesModule.ts index 31807c914..cf72c91fa 100644 --- a/sdk/constructive-sdk/src/public/orm/models/membershipTypesModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/membershipTypesModule.ts @@ -72,13 +72,11 @@ export class MembershipTypesModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - membershipTypesModules: { - nodes: InferSelectResult[]; - }; + membershipTypesModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'MembershipTypesModule', @@ -86,17 +84,26 @@ export class MembershipTypesModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'MembershipTypesModuleFilter', + 'MembershipTypesModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'MembershipTypesModule', - fieldName: 'membershipTypesModules', + fieldName: 'membershipTypesModule', document, variables, + transform: (data: { + membershipTypesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + membershipTypesModule: data.membershipTypesModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/membershipsModule.ts b/sdk/constructive-sdk/src/public/orm/models/membershipsModule.ts index b1ce2f836..5709ac904 100644 --- a/sdk/constructive-sdk/src/public/orm/models/membershipsModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/membershipsModule.ts @@ -70,13 +70,11 @@ export class MembershipsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - membershipsModules: { - nodes: InferSelectResult[]; - }; + membershipsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'MembershipsModule', @@ -84,17 +82,26 @@ export class MembershipsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'MembershipsModuleFilter', + 'MembershipsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'MembershipsModule', - fieldName: 'membershipsModules', + fieldName: 'membershipsModule', document, variables, + transform: (data: { + membershipsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + membershipsModule: data.membershipsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/migrateFile.ts b/sdk/constructive-sdk/src/public/orm/models/migrateFile.ts index 35bfa715e..9bc8b9baa 100644 --- a/sdk/constructive-sdk/src/public/orm/models/migrateFile.ts +++ b/sdk/constructive-sdk/src/public/orm/models/migrateFile.ts @@ -70,13 +70,11 @@ export class MigrateFileModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - migrateFiles: { - nodes: InferSelectResult[]; - }; + migrateFile: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'MigrateFile', @@ -84,17 +82,26 @@ export class MigrateFileModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'MigrateFileFilter', + 'MigrateFileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'MigrateFile', - fieldName: 'migrateFiles', + fieldName: 'migrateFile', document, variables, + transform: (data: { + migrateFiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + migrateFile: data.migrateFiles?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/nodeTypeRegistry.ts b/sdk/constructive-sdk/src/public/orm/models/nodeTypeRegistry.ts index 6e640c1c6..83cb41250 100644 --- a/sdk/constructive-sdk/src/public/orm/models/nodeTypeRegistry.ts +++ b/sdk/constructive-sdk/src/public/orm/models/nodeTypeRegistry.ts @@ -70,13 +70,11 @@ export class NodeTypeRegistryModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - nodeTypeRegistries: { - nodes: InferSelectResult[]; - }; + nodeTypeRegistry: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'NodeTypeRegistry', @@ -84,17 +82,26 @@ export class NodeTypeRegistryModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'NodeTypeRegistryFilter', + 'NodeTypeRegistryOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'NodeTypeRegistry', - fieldName: 'nodeTypeRegistries', + fieldName: 'nodeTypeRegistry', document, variables, + transform: (data: { + nodeTypeRegistries?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + nodeTypeRegistry: data.nodeTypeRegistries?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/notificationsModule.ts b/sdk/constructive-sdk/src/public/orm/models/notificationsModule.ts index 58bf0f2c4..dc44d0d69 100644 --- a/sdk/constructive-sdk/src/public/orm/models/notificationsModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/notificationsModule.ts @@ -70,13 +70,11 @@ export class NotificationsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - notificationsModules: { - nodes: InferSelectResult[]; - }; + notificationsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'NotificationsModule', @@ -84,17 +82,26 @@ export class NotificationsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'NotificationsModuleFilter', + 'NotificationsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'NotificationsModule', - fieldName: 'notificationsModules', + fieldName: 'notificationsModule', document, variables, + transform: (data: { + notificationsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + notificationsModule: data.notificationsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/object.ts b/sdk/constructive-sdk/src/public/orm/models/object.ts index 085bdd4df..8a685b1df 100644 --- a/sdk/constructive-sdk/src/public/orm/models/object.ts +++ b/sdk/constructive-sdk/src/public/orm/models/object.ts @@ -70,13 +70,11 @@ export class ObjectModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - objects: { - nodes: InferSelectResult[]; - }; + object: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Object', @@ -84,17 +82,26 @@ export class ObjectModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ObjectFilter', + 'ObjectOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Object', - fieldName: 'objects', + fieldName: 'object', document, variables, + transform: (data: { + objects?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + object: data.objects?.nodes?.[0] ?? null, + }), }); } findOne( @@ -103,7 +110,7 @@ export class ObjectModel { select: S; } & StrictSelect ): QueryBuilder<{ - getNodeAtPath: InferSelectResult | null; + object: InferSelectResult | null; }> { const { document, variables } = buildFindOneDocument( 'Object', @@ -118,7 +125,7 @@ export class ObjectModel { client: this.client, operation: 'query', operationName: 'Object', - fieldName: 'getNodeAtPath', + fieldName: 'object', document, variables, }); diff --git a/sdk/constructive-sdk/src/public/orm/models/orgAdminGrant.ts b/sdk/constructive-sdk/src/public/orm/models/orgAdminGrant.ts index e611a8578..7b1337731 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgAdminGrant.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgAdminGrant.ts @@ -70,13 +70,11 @@ export class OrgAdminGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgAdminGrants: { - nodes: InferSelectResult[]; - }; + orgAdminGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgAdminGrant', @@ -84,17 +82,26 @@ export class OrgAdminGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgAdminGrantFilter', + 'OrgAdminGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgAdminGrant', - fieldName: 'orgAdminGrants', + fieldName: 'orgAdminGrant', document, variables, + transform: (data: { + orgAdminGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgAdminGrant: data.orgAdminGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgChartEdge.ts b/sdk/constructive-sdk/src/public/orm/models/orgChartEdge.ts index 6c6fc84cc..8a43b83a9 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgChartEdge.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgChartEdge.ts @@ -70,13 +70,11 @@ export class OrgChartEdgeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgChartEdges: { - nodes: InferSelectResult[]; - }; + orgChartEdge: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgChartEdge', @@ -84,17 +82,26 @@ export class OrgChartEdgeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgChartEdgeFilter', + 'OrgChartEdgeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgChartEdge', - fieldName: 'orgChartEdges', + fieldName: 'orgChartEdge', document, variables, + transform: (data: { + orgChartEdges?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgChartEdge: data.orgChartEdges?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgChartEdgeGrant.ts b/sdk/constructive-sdk/src/public/orm/models/orgChartEdgeGrant.ts index 58345c78d..168a6fe3d 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgChartEdgeGrant.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgChartEdgeGrant.ts @@ -70,13 +70,11 @@ export class OrgChartEdgeGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgChartEdgeGrants: { - nodes: InferSelectResult[]; - }; + orgChartEdgeGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgChartEdgeGrant', @@ -84,17 +82,26 @@ export class OrgChartEdgeGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgChartEdgeGrantFilter', + 'OrgChartEdgeGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgChartEdgeGrant', - fieldName: 'orgChartEdgeGrants', + fieldName: 'orgChartEdgeGrant', document, variables, + transform: (data: { + orgChartEdgeGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgChartEdgeGrant: data.orgChartEdgeGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgClaimedInvite.ts b/sdk/constructive-sdk/src/public/orm/models/orgClaimedInvite.ts index 475de7291..e1a3aecaf 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgClaimedInvite.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgClaimedInvite.ts @@ -70,13 +70,11 @@ export class OrgClaimedInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgClaimedInvites: { - nodes: InferSelectResult[]; - }; + orgClaimedInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgClaimedInvite', @@ -84,17 +82,26 @@ export class OrgClaimedInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgClaimedInviteFilter', + 'OrgClaimedInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgClaimedInvite', - fieldName: 'orgClaimedInvites', + fieldName: 'orgClaimedInvite', document, variables, + transform: (data: { + orgClaimedInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgClaimedInvite: data.orgClaimedInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgGetManagersRecord.ts b/sdk/constructive-sdk/src/public/orm/models/orgGetManagersRecord.ts index 9a0cefa8a..7c333b76d 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgGetManagersRecord.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgGetManagersRecord.ts @@ -70,13 +70,11 @@ export class OrgGetManagersRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGetManagers: { - nodes: InferSelectResult[]; - }; + orgGetManagersRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGetManagersRecord', @@ -84,17 +82,26 @@ export class OrgGetManagersRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGetManagersRecordFilter', + 'OrgGetManagersRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGetManagersRecord', - fieldName: 'orgGetManagers', + fieldName: 'orgGetManagersRecord', document, variables, + transform: (data: { + orgGetManagers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGetManagersRecord: data.orgGetManagers?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgGetSubordinatesRecord.ts b/sdk/constructive-sdk/src/public/orm/models/orgGetSubordinatesRecord.ts index 5eeec50ca..f259e1043 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgGetSubordinatesRecord.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgGetSubordinatesRecord.ts @@ -72,13 +72,11 @@ export class OrgGetSubordinatesRecordModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGetSubordinates: { - nodes: InferSelectResult[]; - }; + orgGetSubordinatesRecord: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGetSubordinatesRecord', @@ -86,17 +84,26 @@ export class OrgGetSubordinatesRecordModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGetSubordinatesRecordFilter', + 'OrgGetSubordinatesRecordsOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGetSubordinatesRecord', - fieldName: 'orgGetSubordinates', + fieldName: 'orgGetSubordinatesRecord', document, variables, + transform: (data: { + orgGetSubordinates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGetSubordinatesRecord: data.orgGetSubordinates?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgGrant.ts b/sdk/constructive-sdk/src/public/orm/models/orgGrant.ts index 291264ec5..c8e74f5cc 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgGrant.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgGrant.ts @@ -70,13 +70,11 @@ export class OrgGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgGrants: { - nodes: InferSelectResult[]; - }; + orgGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgGrant', @@ -84,17 +82,26 @@ export class OrgGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgGrantFilter', + 'OrgGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgGrant', - fieldName: 'orgGrants', + fieldName: 'orgGrant', document, variables, + transform: (data: { + orgGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgGrant: data.orgGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgInvite.ts b/sdk/constructive-sdk/src/public/orm/models/orgInvite.ts index 639cb8dd5..8d7931f07 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgInvite.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgInvite.ts @@ -70,13 +70,11 @@ export class OrgInviteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgInvites: { - nodes: InferSelectResult[]; - }; + orgInvite: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgInvite', @@ -84,17 +82,26 @@ export class OrgInviteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgInviteFilter', + 'OrgInviteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgInvite', - fieldName: 'orgInvites', + fieldName: 'orgInvite', document, variables, + transform: (data: { + orgInvites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgInvite: data.orgInvites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgLimit.ts b/sdk/constructive-sdk/src/public/orm/models/orgLimit.ts index 2d7937963..48a3932f2 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgLimit.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgLimit.ts @@ -70,13 +70,11 @@ export class OrgLimitModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimits: { - nodes: InferSelectResult[]; - }; + orgLimit: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimit', @@ -84,17 +82,26 @@ export class OrgLimitModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitFilter', + 'OrgLimitOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimit', - fieldName: 'orgLimits', + fieldName: 'orgLimit', document, variables, + transform: (data: { + orgLimits?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimit: data.orgLimits?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgLimitAggregate.ts b/sdk/constructive-sdk/src/public/orm/models/orgLimitAggregate.ts index daee50aee..d74b9e7d9 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgLimitAggregate.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgLimitAggregate.ts @@ -70,13 +70,11 @@ export class OrgLimitAggregateModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitAggregates: { - nodes: InferSelectResult[]; - }; + orgLimitAggregate: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitAggregate', @@ -84,17 +82,26 @@ export class OrgLimitAggregateModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitAggregateFilter', + 'OrgLimitAggregateOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitAggregate', - fieldName: 'orgLimitAggregates', + fieldName: 'orgLimitAggregate', document, variables, + transform: (data: { + orgLimitAggregates?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitAggregate: data.orgLimitAggregates?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgLimitDefault.ts b/sdk/constructive-sdk/src/public/orm/models/orgLimitDefault.ts index bf0cfcf5e..7e55bfd1f 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgLimitDefault.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgLimitDefault.ts @@ -70,13 +70,11 @@ export class OrgLimitDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitDefaults: { - nodes: InferSelectResult[]; - }; + orgLimitDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitDefault', @@ -84,17 +82,26 @@ export class OrgLimitDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitDefaultFilter', + 'OrgLimitDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitDefault', - fieldName: 'orgLimitDefaults', + fieldName: 'orgLimitDefault', document, variables, + transform: (data: { + orgLimitDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitDefault: data.orgLimitDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgLimitEvent.ts b/sdk/constructive-sdk/src/public/orm/models/orgLimitEvent.ts index 6414ba0ed..c259e325f 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgLimitEvent.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgLimitEvent.ts @@ -70,13 +70,11 @@ export class OrgLimitEventModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgLimitEvents: { - nodes: InferSelectResult[]; - }; + orgLimitEvent: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgLimitEvent', @@ -84,17 +82,26 @@ export class OrgLimitEventModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgLimitEventFilter', + 'OrgLimitEventOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgLimitEvent', - fieldName: 'orgLimitEvents', + fieldName: 'orgLimitEvent', document, variables, + transform: (data: { + orgLimitEvents?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgLimitEvent: data.orgLimitEvents?.nodes?.[0] ?? null, + }), }); } create( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgMember.ts b/sdk/constructive-sdk/src/public/orm/models/orgMember.ts index dd1d20e45..44f5608f4 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgMember.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgMember.ts @@ -70,13 +70,11 @@ export class OrgMemberModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembers: { - nodes: InferSelectResult[]; - }; + orgMember: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMember', @@ -84,17 +82,26 @@ export class OrgMemberModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMemberFilter', + 'OrgMemberOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMember', - fieldName: 'orgMembers', + fieldName: 'orgMember', document, variables, + transform: (data: { + orgMembers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMember: data.orgMembers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgMemberProfile.ts b/sdk/constructive-sdk/src/public/orm/models/orgMemberProfile.ts index de551ba79..77357e174 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgMemberProfile.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgMemberProfile.ts @@ -70,13 +70,11 @@ export class OrgMemberProfileModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMemberProfiles: { - nodes: InferSelectResult[]; - }; + orgMemberProfile: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMemberProfile', @@ -84,17 +82,26 @@ export class OrgMemberProfileModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMemberProfile', - fieldName: 'orgMemberProfiles', + fieldName: 'orgMemberProfile', document, variables, + transform: (data: { + orgMemberProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMemberProfile: data.orgMemberProfiles?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgMembership.ts b/sdk/constructive-sdk/src/public/orm/models/orgMembership.ts index c0173b3e1..623ec08fe 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgMembership.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgMembership.ts @@ -70,13 +70,11 @@ export class OrgMembershipModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMemberships: { - nodes: InferSelectResult[]; - }; + orgMembership: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembership', @@ -84,17 +82,26 @@ export class OrgMembershipModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipFilter', + 'OrgMembershipOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembership', - fieldName: 'orgMemberships', + fieldName: 'orgMembership', document, variables, + transform: (data: { + orgMemberships?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembership: data.orgMemberships?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgMembershipDefault.ts b/sdk/constructive-sdk/src/public/orm/models/orgMembershipDefault.ts index 09d525bec..344131505 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgMembershipDefault.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgMembershipDefault.ts @@ -72,13 +72,11 @@ export class OrgMembershipDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembershipDefaults: { - nodes: InferSelectResult[]; - }; + orgMembershipDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembershipDefault', @@ -86,17 +84,26 @@ export class OrgMembershipDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipDefaultFilter', + 'OrgMembershipDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembershipDefault', - fieldName: 'orgMembershipDefaults', + fieldName: 'orgMembershipDefault', document, variables, + transform: (data: { + orgMembershipDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembershipDefault: data.orgMembershipDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgMembershipSetting.ts b/sdk/constructive-sdk/src/public/orm/models/orgMembershipSetting.ts index 1efc26410..46801fc91 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgMembershipSetting.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgMembershipSetting.ts @@ -72,13 +72,11 @@ export class OrgMembershipSettingModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgMembershipSettings: { - nodes: InferSelectResult[]; - }; + orgMembershipSetting: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgMembershipSetting', @@ -86,17 +84,26 @@ export class OrgMembershipSettingModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgMembershipSettingFilter', + 'OrgMembershipSettingOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgMembershipSetting', - fieldName: 'orgMembershipSettings', + fieldName: 'orgMembershipSetting', document, variables, + transform: (data: { + orgMembershipSettings?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMembershipSetting: data.orgMembershipSettings?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgOwnerGrant.ts b/sdk/constructive-sdk/src/public/orm/models/orgOwnerGrant.ts index bdf045511..9614dce8f 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgOwnerGrant.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgOwnerGrant.ts @@ -70,13 +70,11 @@ export class OrgOwnerGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgOwnerGrants: { - nodes: InferSelectResult[]; - }; + orgOwnerGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgOwnerGrant', @@ -84,17 +82,26 @@ export class OrgOwnerGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgOwnerGrantFilter', + 'OrgOwnerGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgOwnerGrant', - fieldName: 'orgOwnerGrants', + fieldName: 'orgOwnerGrant', document, variables, + transform: (data: { + orgOwnerGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgOwnerGrant: data.orgOwnerGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgPermission.ts b/sdk/constructive-sdk/src/public/orm/models/orgPermission.ts index c5910be63..7bdc90632 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgPermission.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgPermission.ts @@ -70,13 +70,11 @@ export class OrgPermissionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgPermissions: { - nodes: InferSelectResult[]; - }; + orgPermission: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgPermission', @@ -84,17 +82,26 @@ export class OrgPermissionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgPermissionFilter', + 'OrgPermissionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgPermission', - fieldName: 'orgPermissions', + fieldName: 'orgPermission', document, variables, + transform: (data: { + orgPermissions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgPermission: data.orgPermissions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/orgPermissionDefault.ts b/sdk/constructive-sdk/src/public/orm/models/orgPermissionDefault.ts index 40389a11b..8d00b9932 100644 --- a/sdk/constructive-sdk/src/public/orm/models/orgPermissionDefault.ts +++ b/sdk/constructive-sdk/src/public/orm/models/orgPermissionDefault.ts @@ -72,13 +72,11 @@ export class OrgPermissionDefaultModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - orgPermissionDefaults: { - nodes: InferSelectResult[]; - }; + orgPermissionDefault: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'OrgPermissionDefault', @@ -86,17 +84,26 @@ export class OrgPermissionDefaultModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'OrgPermissionDefaultFilter', + 'OrgPermissionDefaultOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'OrgPermissionDefault', - fieldName: 'orgPermissionDefaults', + fieldName: 'orgPermissionDefault', document, variables, + transform: (data: { + orgPermissionDefaults?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgPermissionDefault: data.orgPermissionDefaults?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/permissionsModule.ts b/sdk/constructive-sdk/src/public/orm/models/permissionsModule.ts index 6066e6218..5fb22b44d 100644 --- a/sdk/constructive-sdk/src/public/orm/models/permissionsModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/permissionsModule.ts @@ -70,13 +70,11 @@ export class PermissionsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - permissionsModules: { - nodes: InferSelectResult[]; - }; + permissionsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PermissionsModule', @@ -84,17 +82,26 @@ export class PermissionsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PermissionsModuleFilter', + 'PermissionsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PermissionsModule', - fieldName: 'permissionsModules', + fieldName: 'permissionsModule', document, variables, + transform: (data: { + permissionsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + permissionsModule: data.permissionsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/phoneNumber.ts b/sdk/constructive-sdk/src/public/orm/models/phoneNumber.ts index a711db272..0803908e2 100644 --- a/sdk/constructive-sdk/src/public/orm/models/phoneNumber.ts +++ b/sdk/constructive-sdk/src/public/orm/models/phoneNumber.ts @@ -70,13 +70,11 @@ export class PhoneNumberModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - phoneNumbers: { - nodes: InferSelectResult[]; - }; + phoneNumber: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PhoneNumber', @@ -84,17 +82,26 @@ export class PhoneNumberModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PhoneNumberFilter', + 'PhoneNumberOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PhoneNumber', - fieldName: 'phoneNumbers', + fieldName: 'phoneNumber', document, variables, + transform: (data: { + phoneNumbers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + phoneNumber: data.phoneNumbers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/phoneNumbersModule.ts b/sdk/constructive-sdk/src/public/orm/models/phoneNumbersModule.ts index 9b3da81ae..55f64339e 100644 --- a/sdk/constructive-sdk/src/public/orm/models/phoneNumbersModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/phoneNumbersModule.ts @@ -70,13 +70,11 @@ export class PhoneNumbersModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - phoneNumbersModules: { - nodes: InferSelectResult[]; - }; + phoneNumbersModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PhoneNumbersModule', @@ -84,17 +82,26 @@ export class PhoneNumbersModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PhoneNumbersModuleFilter', + 'PhoneNumbersModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PhoneNumbersModule', - fieldName: 'phoneNumbersModules', + fieldName: 'phoneNumbersModule', document, variables, + transform: (data: { + phoneNumbersModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + phoneNumbersModule: data.phoneNumbersModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/plansModule.ts b/sdk/constructive-sdk/src/public/orm/models/plansModule.ts index e310fa581..f13f1849b 100644 --- a/sdk/constructive-sdk/src/public/orm/models/plansModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/plansModule.ts @@ -70,13 +70,11 @@ export class PlansModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - plansModules: { - nodes: InferSelectResult[]; - }; + plansModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PlansModule', @@ -84,17 +82,26 @@ export class PlansModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PlansModuleFilter', + 'PlansModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PlansModule', - fieldName: 'plansModules', + fieldName: 'plansModule', document, variables, + transform: (data: { + plansModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + plansModule: data.plansModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/policy.ts b/sdk/constructive-sdk/src/public/orm/models/policy.ts index c76c4a3ad..c60088703 100644 --- a/sdk/constructive-sdk/src/public/orm/models/policy.ts +++ b/sdk/constructive-sdk/src/public/orm/models/policy.ts @@ -70,13 +70,11 @@ export class PolicyModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - policies: { - nodes: InferSelectResult[]; - }; + policy: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Policy', @@ -84,17 +82,26 @@ export class PolicyModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PolicyFilter', + 'PolicyOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Policy', - fieldName: 'policies', + fieldName: 'policy', document, variables, + transform: (data: { + policies?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + policy: data.policies?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/primaryKeyConstraint.ts b/sdk/constructive-sdk/src/public/orm/models/primaryKeyConstraint.ts index f1d79e61c..e73aca57d 100644 --- a/sdk/constructive-sdk/src/public/orm/models/primaryKeyConstraint.ts +++ b/sdk/constructive-sdk/src/public/orm/models/primaryKeyConstraint.ts @@ -72,13 +72,11 @@ export class PrimaryKeyConstraintModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - primaryKeyConstraints: { - nodes: InferSelectResult[]; - }; + primaryKeyConstraint: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'PrimaryKeyConstraint', @@ -86,17 +84,26 @@ export class PrimaryKeyConstraintModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'PrimaryKeyConstraintFilter', + 'PrimaryKeyConstraintOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'PrimaryKeyConstraint', - fieldName: 'primaryKeyConstraints', + fieldName: 'primaryKeyConstraint', document, variables, + transform: (data: { + primaryKeyConstraints?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + primaryKeyConstraint: data.primaryKeyConstraints?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/profilesModule.ts b/sdk/constructive-sdk/src/public/orm/models/profilesModule.ts index 7841e9222..f1c152e77 100644 --- a/sdk/constructive-sdk/src/public/orm/models/profilesModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/profilesModule.ts @@ -70,13 +70,11 @@ export class ProfilesModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - profilesModules: { - nodes: InferSelectResult[]; - }; + profilesModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ProfilesModule', @@ -84,17 +82,26 @@ export class ProfilesModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ProfilesModuleFilter', + 'ProfilesModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ProfilesModule', - fieldName: 'profilesModules', + fieldName: 'profilesModule', document, variables, + transform: (data: { + profilesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + profilesModule: data.profilesModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/rateLimitsModule.ts b/sdk/constructive-sdk/src/public/orm/models/rateLimitsModule.ts index b541082db..9567ccaa2 100644 --- a/sdk/constructive-sdk/src/public/orm/models/rateLimitsModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/rateLimitsModule.ts @@ -70,13 +70,11 @@ export class RateLimitsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - rateLimitsModules: { - nodes: InferSelectResult[]; - }; + rateLimitsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'RateLimitsModule', @@ -84,17 +82,26 @@ export class RateLimitsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RateLimitsModuleFilter', + 'RateLimitsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'RateLimitsModule', - fieldName: 'rateLimitsModules', + fieldName: 'rateLimitsModule', document, variables, + transform: (data: { + rateLimitsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + rateLimitsModule: data.rateLimitsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/ref.ts b/sdk/constructive-sdk/src/public/orm/models/ref.ts index 016c70644..5c3419d89 100644 --- a/sdk/constructive-sdk/src/public/orm/models/ref.ts +++ b/sdk/constructive-sdk/src/public/orm/models/ref.ts @@ -70,13 +70,11 @@ export class RefModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - refs: { - nodes: InferSelectResult[]; - }; + ref: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Ref', @@ -84,17 +82,26 @@ export class RefModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RefFilter', + 'RefOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Ref', - fieldName: 'refs', + fieldName: 'ref', document, variables, + transform: (data: { + refs?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + ref: data.refs?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/relationProvision.ts b/sdk/constructive-sdk/src/public/orm/models/relationProvision.ts index 5d27d5872..eea0a0101 100644 --- a/sdk/constructive-sdk/src/public/orm/models/relationProvision.ts +++ b/sdk/constructive-sdk/src/public/orm/models/relationProvision.ts @@ -70,13 +70,11 @@ export class RelationProvisionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - relationProvisions: { - nodes: InferSelectResult[]; - }; + relationProvision: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'RelationProvision', @@ -84,17 +82,26 @@ export class RelationProvisionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RelationProvisionFilter', + 'RelationProvisionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'RelationProvision', - fieldName: 'relationProvisions', + fieldName: 'relationProvision', document, variables, + transform: (data: { + relationProvisions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + relationProvision: data.relationProvisions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/rlsModule.ts b/sdk/constructive-sdk/src/public/orm/models/rlsModule.ts index 750815c7b..5e1ed1afc 100644 --- a/sdk/constructive-sdk/src/public/orm/models/rlsModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/rlsModule.ts @@ -70,13 +70,11 @@ export class RlsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - rlsModules: { - nodes: InferSelectResult[]; - }; + rlsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'RlsModule', @@ -84,17 +82,26 @@ export class RlsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RlsModuleFilter', + 'RlsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'RlsModule', - fieldName: 'rlsModules', + fieldName: 'rlsModule', document, variables, + transform: (data: { + rlsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + rlsModule: data.rlsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/roleType.ts b/sdk/constructive-sdk/src/public/orm/models/roleType.ts index 5b258dc9a..8b256a0dc 100644 --- a/sdk/constructive-sdk/src/public/orm/models/roleType.ts +++ b/sdk/constructive-sdk/src/public/orm/models/roleType.ts @@ -70,13 +70,11 @@ export class RoleTypeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - roleTypes: { - nodes: InferSelectResult[]; - }; + roleType: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'RoleType', @@ -84,17 +82,26 @@ export class RoleTypeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'RoleTypeFilter', + 'RoleTypeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'RoleType', - fieldName: 'roleTypes', + fieldName: 'roleType', document, variables, + transform: (data: { + roleTypes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + roleType: data.roleTypes?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/schema.ts b/sdk/constructive-sdk/src/public/orm/models/schema.ts index 5bc546943..3d0af9820 100644 --- a/sdk/constructive-sdk/src/public/orm/models/schema.ts +++ b/sdk/constructive-sdk/src/public/orm/models/schema.ts @@ -70,13 +70,11 @@ export class SchemaModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - schemas: { - nodes: InferSelectResult[]; - }; + schema: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Schema', @@ -84,17 +82,26 @@ export class SchemaModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SchemaFilter', + 'SchemaOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Schema', - fieldName: 'schemas', + fieldName: 'schema', document, variables, + transform: (data: { + schemas?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + schema: data.schemas?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/schemaGrant.ts b/sdk/constructive-sdk/src/public/orm/models/schemaGrant.ts index 97671a523..dfe756975 100644 --- a/sdk/constructive-sdk/src/public/orm/models/schemaGrant.ts +++ b/sdk/constructive-sdk/src/public/orm/models/schemaGrant.ts @@ -70,13 +70,11 @@ export class SchemaGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - schemaGrants: { - nodes: InferSelectResult[]; - }; + schemaGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SchemaGrant', @@ -84,17 +82,26 @@ export class SchemaGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SchemaGrantFilter', + 'SchemaGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SchemaGrant', - fieldName: 'schemaGrants', + fieldName: 'schemaGrant', document, variables, + transform: (data: { + schemaGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + schemaGrant: data.schemaGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/secretsModule.ts b/sdk/constructive-sdk/src/public/orm/models/secretsModule.ts index 808b0154d..1e91d4823 100644 --- a/sdk/constructive-sdk/src/public/orm/models/secretsModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/secretsModule.ts @@ -70,13 +70,11 @@ export class SecretsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - secretsModules: { - nodes: InferSelectResult[]; - }; + secretsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SecretsModule', @@ -84,17 +82,26 @@ export class SecretsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SecretsModuleFilter', + 'SecretsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SecretsModule', - fieldName: 'secretsModules', + fieldName: 'secretsModule', document, variables, + transform: (data: { + secretsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + secretsModule: data.secretsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/secureTableProvision.ts b/sdk/constructive-sdk/src/public/orm/models/secureTableProvision.ts index 585ea33c9..ca0ef2a68 100644 --- a/sdk/constructive-sdk/src/public/orm/models/secureTableProvision.ts +++ b/sdk/constructive-sdk/src/public/orm/models/secureTableProvision.ts @@ -72,13 +72,11 @@ export class SecureTableProvisionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - secureTableProvisions: { - nodes: InferSelectResult[]; - }; + secureTableProvision: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SecureTableProvision', @@ -86,17 +84,26 @@ export class SecureTableProvisionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SecureTableProvisionFilter', + 'SecureTableProvisionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SecureTableProvision', - fieldName: 'secureTableProvisions', + fieldName: 'secureTableProvision', document, variables, + transform: (data: { + secureTableProvisions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + secureTableProvision: data.secureTableProvisions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/sessionSecretsModule.ts b/sdk/constructive-sdk/src/public/orm/models/sessionSecretsModule.ts index b333c87f0..474a95320 100644 --- a/sdk/constructive-sdk/src/public/orm/models/sessionSecretsModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/sessionSecretsModule.ts @@ -72,13 +72,11 @@ export class SessionSecretsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - sessionSecretsModules: { - nodes: InferSelectResult[]; - }; + sessionSecretsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SessionSecretsModule', @@ -86,17 +84,26 @@ export class SessionSecretsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SessionSecretsModuleFilter', + 'SessionSecretsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SessionSecretsModule', - fieldName: 'sessionSecretsModules', + fieldName: 'sessionSecretsModule', document, variables, + transform: (data: { + sessionSecretsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + sessionSecretsModule: data.sessionSecretsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/sessionsModule.ts b/sdk/constructive-sdk/src/public/orm/models/sessionsModule.ts index 01cf5198a..b66cc7be3 100644 --- a/sdk/constructive-sdk/src/public/orm/models/sessionsModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/sessionsModule.ts @@ -70,13 +70,11 @@ export class SessionsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - sessionsModules: { - nodes: InferSelectResult[]; - }; + sessionsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SessionsModule', @@ -84,17 +82,26 @@ export class SessionsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SessionsModuleFilter', + 'SessionsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SessionsModule', - fieldName: 'sessionsModules', + fieldName: 'sessionsModule', document, variables, + transform: (data: { + sessionsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + sessionsModule: data.sessionsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/site.ts b/sdk/constructive-sdk/src/public/orm/models/site.ts index fa790b4d1..070a32b24 100644 --- a/sdk/constructive-sdk/src/public/orm/models/site.ts +++ b/sdk/constructive-sdk/src/public/orm/models/site.ts @@ -70,13 +70,11 @@ export class SiteModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - sites: { - nodes: InferSelectResult[]; - }; + site: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Site', @@ -84,17 +82,26 @@ export class SiteModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SiteFilter', + 'SiteOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Site', - fieldName: 'sites', + fieldName: 'site', document, variables, + transform: (data: { + sites?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + site: data.sites?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/siteMetadatum.ts b/sdk/constructive-sdk/src/public/orm/models/siteMetadatum.ts index 629c19725..de85238e4 100644 --- a/sdk/constructive-sdk/src/public/orm/models/siteMetadatum.ts +++ b/sdk/constructive-sdk/src/public/orm/models/siteMetadatum.ts @@ -70,13 +70,11 @@ export class SiteMetadatumModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - siteMetadata: { - nodes: InferSelectResult[]; - }; + siteMetadatum: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SiteMetadatum', @@ -84,17 +82,26 @@ export class SiteMetadatumModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SiteMetadatumFilter', + 'SiteMetadatumOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SiteMetadatum', - fieldName: 'siteMetadata', + fieldName: 'siteMetadatum', document, variables, + transform: (data: { + siteMetadata?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + siteMetadatum: data.siteMetadata?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/siteModule.ts b/sdk/constructive-sdk/src/public/orm/models/siteModule.ts index 943a6d7ae..b890423fe 100644 --- a/sdk/constructive-sdk/src/public/orm/models/siteModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/siteModule.ts @@ -70,13 +70,11 @@ export class SiteModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - siteModules: { - nodes: InferSelectResult[]; - }; + siteModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SiteModule', @@ -84,17 +82,26 @@ export class SiteModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SiteModuleFilter', + 'SiteModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SiteModule', - fieldName: 'siteModules', + fieldName: 'siteModule', document, variables, + transform: (data: { + siteModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + siteModule: data.siteModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/siteTheme.ts b/sdk/constructive-sdk/src/public/orm/models/siteTheme.ts index da7e85ab8..57b9cadc5 100644 --- a/sdk/constructive-sdk/src/public/orm/models/siteTheme.ts +++ b/sdk/constructive-sdk/src/public/orm/models/siteTheme.ts @@ -70,13 +70,11 @@ export class SiteThemeModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - siteThemes: { - nodes: InferSelectResult[]; - }; + siteTheme: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SiteTheme', @@ -84,17 +82,26 @@ export class SiteThemeModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SiteThemeFilter', + 'SiteThemeOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SiteTheme', - fieldName: 'siteThemes', + fieldName: 'siteTheme', document, variables, + transform: (data: { + siteThemes?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + siteTheme: data.siteThemes?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/spatialRelation.ts b/sdk/constructive-sdk/src/public/orm/models/spatialRelation.ts index c1d09c31a..fe266c9d3 100644 --- a/sdk/constructive-sdk/src/public/orm/models/spatialRelation.ts +++ b/sdk/constructive-sdk/src/public/orm/models/spatialRelation.ts @@ -70,13 +70,11 @@ export class SpatialRelationModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - spatialRelations: { - nodes: InferSelectResult[]; - }; + spatialRelation: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SpatialRelation', @@ -84,17 +82,26 @@ export class SpatialRelationModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SpatialRelationFilter', + 'SpatialRelationOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SpatialRelation', - fieldName: 'spatialRelations', + fieldName: 'spatialRelation', document, variables, + transform: (data: { + spatialRelations?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + spatialRelation: data.spatialRelations?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/sqlAction.ts b/sdk/constructive-sdk/src/public/orm/models/sqlAction.ts index 449f16020..74b441868 100644 --- a/sdk/constructive-sdk/src/public/orm/models/sqlAction.ts +++ b/sdk/constructive-sdk/src/public/orm/models/sqlAction.ts @@ -70,13 +70,11 @@ export class SqlActionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - sqlActions: { - nodes: InferSelectResult[]; - }; + sqlAction: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SqlAction', @@ -84,17 +82,26 @@ export class SqlActionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SqlActionFilter', + 'SqlActionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SqlAction', - fieldName: 'sqlActions', + fieldName: 'sqlAction', document, variables, + transform: (data: { + sqlActions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + sqlAction: data.sqlActions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/storageModule.ts b/sdk/constructive-sdk/src/public/orm/models/storageModule.ts index cbfeb5b1e..e359f6471 100644 --- a/sdk/constructive-sdk/src/public/orm/models/storageModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/storageModule.ts @@ -70,13 +70,11 @@ export class StorageModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - storageModules: { - nodes: InferSelectResult[]; - }; + storageModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'StorageModule', @@ -84,17 +82,26 @@ export class StorageModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'StorageModuleFilter', + 'StorageModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'StorageModule', - fieldName: 'storageModules', + fieldName: 'storageModule', document, variables, + transform: (data: { + storageModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + storageModule: data.storageModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/store.ts b/sdk/constructive-sdk/src/public/orm/models/store.ts index f249ee921..f80e63890 100644 --- a/sdk/constructive-sdk/src/public/orm/models/store.ts +++ b/sdk/constructive-sdk/src/public/orm/models/store.ts @@ -70,13 +70,11 @@ export class StoreModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - stores: { - nodes: InferSelectResult[]; - }; + store: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Store', @@ -84,17 +82,26 @@ export class StoreModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'StoreFilter', + 'StoreOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Store', - fieldName: 'stores', + fieldName: 'store', document, variables, + transform: (data: { + stores?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + store: data.stores?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/table.ts b/sdk/constructive-sdk/src/public/orm/models/table.ts index c10b604a3..db1c5d3a9 100644 --- a/sdk/constructive-sdk/src/public/orm/models/table.ts +++ b/sdk/constructive-sdk/src/public/orm/models/table.ts @@ -70,13 +70,11 @@ export class TableModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - tables: { - nodes: InferSelectResult[]; - }; + table: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Table', @@ -84,17 +82,26 @@ export class TableModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'TableFilter', + 'TableOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Table', - fieldName: 'tables', + fieldName: 'table', document, variables, + transform: (data: { + tables?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + table: data.tables?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/tableGrant.ts b/sdk/constructive-sdk/src/public/orm/models/tableGrant.ts index 02d19136c..e05b44f2b 100644 --- a/sdk/constructive-sdk/src/public/orm/models/tableGrant.ts +++ b/sdk/constructive-sdk/src/public/orm/models/tableGrant.ts @@ -70,13 +70,11 @@ export class TableGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - tableGrants: { - nodes: InferSelectResult[]; - }; + tableGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'TableGrant', @@ -84,17 +82,26 @@ export class TableGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'TableGrantFilter', + 'TableGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'TableGrant', - fieldName: 'tableGrants', + fieldName: 'tableGrant', document, variables, + transform: (data: { + tableGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + tableGrant: data.tableGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/trigger.ts b/sdk/constructive-sdk/src/public/orm/models/trigger.ts index 3e2404f0e..f4812bc6e 100644 --- a/sdk/constructive-sdk/src/public/orm/models/trigger.ts +++ b/sdk/constructive-sdk/src/public/orm/models/trigger.ts @@ -70,13 +70,11 @@ export class TriggerModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - triggers: { - nodes: InferSelectResult[]; - }; + trigger: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'Trigger', @@ -84,17 +82,26 @@ export class TriggerModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'TriggerFilter', + 'TriggerOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'Trigger', - fieldName: 'triggers', + fieldName: 'trigger', document, variables, + transform: (data: { + triggers?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + trigger: data.triggers?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/triggerFunction.ts b/sdk/constructive-sdk/src/public/orm/models/triggerFunction.ts index 999438070..d2bd543aa 100644 --- a/sdk/constructive-sdk/src/public/orm/models/triggerFunction.ts +++ b/sdk/constructive-sdk/src/public/orm/models/triggerFunction.ts @@ -70,13 +70,11 @@ export class TriggerFunctionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - triggerFunctions: { - nodes: InferSelectResult[]; - }; + triggerFunction: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'TriggerFunction', @@ -84,17 +82,26 @@ export class TriggerFunctionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'TriggerFunctionFilter', + 'TriggerFunctionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'TriggerFunction', - fieldName: 'triggerFunctions', + fieldName: 'triggerFunction', document, variables, + transform: (data: { + triggerFunctions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + triggerFunction: data.triggerFunctions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/uniqueConstraint.ts b/sdk/constructive-sdk/src/public/orm/models/uniqueConstraint.ts index de5ba6f76..3c1dad93d 100644 --- a/sdk/constructive-sdk/src/public/orm/models/uniqueConstraint.ts +++ b/sdk/constructive-sdk/src/public/orm/models/uniqueConstraint.ts @@ -70,13 +70,11 @@ export class UniqueConstraintModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - uniqueConstraints: { - nodes: InferSelectResult[]; - }; + uniqueConstraint: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'UniqueConstraint', @@ -84,17 +82,26 @@ export class UniqueConstraintModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UniqueConstraintFilter', + 'UniqueConstraintOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'UniqueConstraint', - fieldName: 'uniqueConstraints', + fieldName: 'uniqueConstraint', document, variables, + transform: (data: { + uniqueConstraints?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + uniqueConstraint: data.uniqueConstraints?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/user.ts b/sdk/constructive-sdk/src/public/orm/models/user.ts index aedd4fcc8..893581835 100644 --- a/sdk/constructive-sdk/src/public/orm/models/user.ts +++ b/sdk/constructive-sdk/src/public/orm/models/user.ts @@ -70,13 +70,11 @@ export class UserModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - users: { - nodes: InferSelectResult[]; - }; + user: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'User', @@ -84,17 +82,26 @@ export class UserModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UserFilter', + 'UserOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'User', - fieldName: 'users', + fieldName: 'user', document, variables, + transform: (data: { + users?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + user: data.users?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/userAuthModule.ts b/sdk/constructive-sdk/src/public/orm/models/userAuthModule.ts index 431026d87..15fe6a854 100644 --- a/sdk/constructive-sdk/src/public/orm/models/userAuthModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/userAuthModule.ts @@ -70,13 +70,11 @@ export class UserAuthModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - userAuthModules: { - nodes: InferSelectResult[]; - }; + userAuthModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'UserAuthModule', @@ -84,17 +82,26 @@ export class UserAuthModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UserAuthModuleFilter', + 'UserAuthModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'UserAuthModule', - fieldName: 'userAuthModules', + fieldName: 'userAuthModule', document, variables, + transform: (data: { + userAuthModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userAuthModule: data.userAuthModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/userConnectedAccount.ts b/sdk/constructive-sdk/src/public/orm/models/userConnectedAccount.ts index 45bbea7f4..a2344afdf 100644 --- a/sdk/constructive-sdk/src/public/orm/models/userConnectedAccount.ts +++ b/sdk/constructive-sdk/src/public/orm/models/userConnectedAccount.ts @@ -72,13 +72,11 @@ export class UserConnectedAccountModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - userConnectedAccounts: { - nodes: InferSelectResult[]; - }; + userConnectedAccount: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'UserConnectedAccount', @@ -86,17 +84,26 @@ export class UserConnectedAccountModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'UserConnectedAccount', - fieldName: 'userConnectedAccounts', + fieldName: 'userConnectedAccount', document, variables, + transform: (data: { + userConnectedAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userConnectedAccount: data.userConnectedAccounts?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/usersModule.ts b/sdk/constructive-sdk/src/public/orm/models/usersModule.ts index c5b6d361b..de86bbbfb 100644 --- a/sdk/constructive-sdk/src/public/orm/models/usersModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/usersModule.ts @@ -70,13 +70,11 @@ export class UsersModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - usersModules: { - nodes: InferSelectResult[]; - }; + usersModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'UsersModule', @@ -84,17 +82,26 @@ export class UsersModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'UsersModuleFilter', + 'UsersModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'UsersModule', - fieldName: 'usersModules', + fieldName: 'usersModule', document, variables, + transform: (data: { + usersModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + usersModule: data.usersModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/view.ts b/sdk/constructive-sdk/src/public/orm/models/view.ts index 5e7fa5f74..75acdcbcf 100644 --- a/sdk/constructive-sdk/src/public/orm/models/view.ts +++ b/sdk/constructive-sdk/src/public/orm/models/view.ts @@ -70,13 +70,11 @@ export class ViewModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - views: { - nodes: InferSelectResult[]; - }; + view: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'View', @@ -84,17 +82,26 @@ export class ViewModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ViewFilter', + 'ViewOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'View', - fieldName: 'views', + fieldName: 'view', document, variables, + transform: (data: { + views?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + view: data.views?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/viewGrant.ts b/sdk/constructive-sdk/src/public/orm/models/viewGrant.ts index 1023b5f7f..bd4eddaef 100644 --- a/sdk/constructive-sdk/src/public/orm/models/viewGrant.ts +++ b/sdk/constructive-sdk/src/public/orm/models/viewGrant.ts @@ -70,13 +70,11 @@ export class ViewGrantModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - viewGrants: { - nodes: InferSelectResult[]; - }; + viewGrant: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ViewGrant', @@ -84,17 +82,26 @@ export class ViewGrantModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ViewGrantFilter', + 'ViewGrantOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ViewGrant', - fieldName: 'viewGrants', + fieldName: 'viewGrant', document, variables, + transform: (data: { + viewGrants?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + viewGrant: data.viewGrants?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/viewRule.ts b/sdk/constructive-sdk/src/public/orm/models/viewRule.ts index 101bd199a..cdec5ad12 100644 --- a/sdk/constructive-sdk/src/public/orm/models/viewRule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/viewRule.ts @@ -70,13 +70,11 @@ export class ViewRuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - viewRules: { - nodes: InferSelectResult[]; - }; + viewRule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ViewRule', @@ -84,17 +82,26 @@ export class ViewRuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ViewRuleFilter', + 'ViewRuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ViewRule', - fieldName: 'viewRules', + fieldName: 'viewRule', document, variables, + transform: (data: { + viewRules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + viewRule: data.viewRules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/viewTable.ts b/sdk/constructive-sdk/src/public/orm/models/viewTable.ts index a37e7137b..83362317e 100644 --- a/sdk/constructive-sdk/src/public/orm/models/viewTable.ts +++ b/sdk/constructive-sdk/src/public/orm/models/viewTable.ts @@ -70,13 +70,11 @@ export class ViewTableModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - viewTables: { - nodes: InferSelectResult[]; - }; + viewTable: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'ViewTable', @@ -84,17 +82,26 @@ export class ViewTableModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'ViewTableFilter', + 'ViewTableOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'ViewTable', - fieldName: 'viewTables', + fieldName: 'viewTable', document, variables, + transform: (data: { + viewTables?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + viewTable: data.viewTables?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/webauthnAuthModule.ts b/sdk/constructive-sdk/src/public/orm/models/webauthnAuthModule.ts index 3267077b3..14ebdd6f2 100644 --- a/sdk/constructive-sdk/src/public/orm/models/webauthnAuthModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/webauthnAuthModule.ts @@ -70,13 +70,11 @@ export class WebauthnAuthModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - webauthnAuthModules: { - nodes: InferSelectResult[]; - }; + webauthnAuthModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'WebauthnAuthModule', @@ -84,17 +82,26 @@ export class WebauthnAuthModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'WebauthnAuthModuleFilter', + 'WebauthnAuthModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'WebauthnAuthModule', - fieldName: 'webauthnAuthModules', + fieldName: 'webauthnAuthModule', document, variables, + transform: (data: { + webauthnAuthModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + webauthnAuthModule: data.webauthnAuthModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/webauthnCredential.ts b/sdk/constructive-sdk/src/public/orm/models/webauthnCredential.ts index f02cf10bc..cca4c75cf 100644 --- a/sdk/constructive-sdk/src/public/orm/models/webauthnCredential.ts +++ b/sdk/constructive-sdk/src/public/orm/models/webauthnCredential.ts @@ -70,13 +70,11 @@ export class WebauthnCredentialModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - webauthnCredentials: { - nodes: InferSelectResult[]; - }; + webauthnCredential: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'WebauthnCredential', @@ -84,17 +82,26 @@ export class WebauthnCredentialModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'WebauthnCredentialFilter', + 'WebauthnCredentialOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'WebauthnCredential', - fieldName: 'webauthnCredentials', + fieldName: 'webauthnCredential', document, variables, + transform: (data: { + webauthnCredentials?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + webauthnCredential: data.webauthnCredentials?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/models/webauthnCredentialsModule.ts b/sdk/constructive-sdk/src/public/orm/models/webauthnCredentialsModule.ts index 78e687c34..ee66831a7 100644 --- a/sdk/constructive-sdk/src/public/orm/models/webauthnCredentialsModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/webauthnCredentialsModule.ts @@ -72,13 +72,11 @@ export class WebauthnCredentialsModuleModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - webauthnCredentialsModules: { - nodes: InferSelectResult[]; - }; + webauthnCredentialsModule: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'WebauthnCredentialsModule', @@ -86,17 +84,26 @@ export class WebauthnCredentialsModuleModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'WebauthnCredentialsModuleFilter', + 'WebauthnCredentialsModuleOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'WebauthnCredentialsModule', - fieldName: 'webauthnCredentialsModules', + fieldName: 'webauthnCredentialsModule', document, variables, + transform: (data: { + webauthnCredentialsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + webauthnCredentialsModule: data.webauthnCredentialsModules?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/constructive-sdk/src/public/orm/query-builder.ts b/sdk/constructive-sdk/src/public/orm/query-builder.ts index f2fd4566f..5abdd3372 100644 --- a/sdk/constructive-sdk/src/public/orm/query-builder.ts +++ b/sdk/constructive-sdk/src/public/orm/query-builder.ts @@ -293,8 +293,9 @@ export function buildFindFirstDocument( operationName: string, queryField: string, select: TSelect, - args: { where?: TWhere }, + args: { where?: TWhere; orderBy?: string[] }, filterTypeName: string, + orderByTypeName: string, connectionFieldsMap?: Record> ): { document: string; variables: Record } { const selections = select @@ -322,6 +323,16 @@ export function buildFindFirstDocument( queryArgs, variables ); + addVariable( + { + varName: 'orderBy', + typeName: '[' + orderByTypeName + '!]', + value: args.orderBy?.length ? args.orderBy : undefined, + }, + variableDefinitions, + queryArgs, + variables + ); const document = t.document({ definitions: [ diff --git a/sdk/constructive-sdk/src/public/orm/select-types.ts b/sdk/constructive-sdk/src/public/orm/select-types.ts index 2621b3570..9c1ec1ad2 100644 --- a/sdk/constructive-sdk/src/public/orm/select-types.ts +++ b/sdk/constructive-sdk/src/public/orm/select-types.ts @@ -27,9 +27,10 @@ export interface FindManyArgs { offset?: number; } -export interface FindFirstArgs { +export interface FindFirstArgs { select?: TSelect; where?: TWhere; + orderBy?: TOrderBy[]; } export interface CreateArgs { diff --git a/sdk/migrate-client/src/migrate/orm/models/migrateFile.ts b/sdk/migrate-client/src/migrate/orm/models/migrateFile.ts index 58fb76360..18b8369ea 100644 --- a/sdk/migrate-client/src/migrate/orm/models/migrateFile.ts +++ b/sdk/migrate-client/src/migrate/orm/models/migrateFile.ts @@ -70,13 +70,11 @@ export class MigrateFileModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - migrateFiles: { - nodes: InferSelectResult[]; - }; + migrateFile: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'MigrateFile', @@ -84,17 +82,26 @@ export class MigrateFileModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'MigrateFileFilter', + 'MigrateFileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'MigrateFile', - fieldName: 'migrateFiles', + fieldName: 'migrateFile', document, variables, + transform: (data: { + migrateFiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + migrateFile: data.migrateFiles?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/migrate-client/src/migrate/orm/models/sqlAction.ts b/sdk/migrate-client/src/migrate/orm/models/sqlAction.ts index 3917660f3..62857f6be 100644 --- a/sdk/migrate-client/src/migrate/orm/models/sqlAction.ts +++ b/sdk/migrate-client/src/migrate/orm/models/sqlAction.ts @@ -70,13 +70,11 @@ export class SqlActionModel { }); } findFirst( - args: FindFirstArgs & { + args: FindFirstArgs & { select: S; } & StrictSelect ): QueryBuilder<{ - sqlActions: { - nodes: InferSelectResult[]; - }; + sqlAction: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( 'SqlAction', @@ -84,17 +82,26 @@ export class SqlActionModel { args.select, { where: args?.where, + orderBy: args?.orderBy as string[] | undefined, }, 'SqlActionFilter', + 'SqlActionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', operationName: 'SqlAction', - fieldName: 'sqlActions', + fieldName: 'sqlAction', document, variables, + transform: (data: { + sqlActions?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + sqlAction: data.sqlActions?.nodes?.[0] ?? null, + }), }); } findOne( diff --git a/sdk/migrate-client/src/migrate/orm/query-builder.ts b/sdk/migrate-client/src/migrate/orm/query-builder.ts index f2fd4566f..5abdd3372 100644 --- a/sdk/migrate-client/src/migrate/orm/query-builder.ts +++ b/sdk/migrate-client/src/migrate/orm/query-builder.ts @@ -293,8 +293,9 @@ export function buildFindFirstDocument( operationName: string, queryField: string, select: TSelect, - args: { where?: TWhere }, + args: { where?: TWhere; orderBy?: string[] }, filterTypeName: string, + orderByTypeName: string, connectionFieldsMap?: Record> ): { document: string; variables: Record } { const selections = select @@ -322,6 +323,16 @@ export function buildFindFirstDocument( queryArgs, variables ); + addVariable( + { + varName: 'orderBy', + typeName: '[' + orderByTypeName + '!]', + value: args.orderBy?.length ? args.orderBy : undefined, + }, + variableDefinitions, + queryArgs, + variables + ); const document = t.document({ definitions: [ diff --git a/sdk/migrate-client/src/migrate/orm/select-types.ts b/sdk/migrate-client/src/migrate/orm/select-types.ts index 2621b3570..9c1ec1ad2 100644 --- a/sdk/migrate-client/src/migrate/orm/select-types.ts +++ b/sdk/migrate-client/src/migrate/orm/select-types.ts @@ -27,9 +27,10 @@ export interface FindManyArgs { offset?: number; } -export interface FindFirstArgs { +export interface FindFirstArgs { select?: TSelect; where?: TWhere; + orderBy?: TOrderBy[]; } export interface CreateArgs {