@@ -2,8 +2,18 @@ import { z } from 'zod'
22import { isUserFileWithMetadata } from '@/lib/core/utils/user-file'
33import type { UserFile } from '@/executor/types'
44
5- const name = z . string ( ) . trim ( ) . min ( 1 ) . max ( 255 )
6- const period = z . string ( ) . trim ( ) . min ( 1 ) . max ( 1024 )
5+ const identifier = z . string ( ) . trim ( ) . min ( 1 ) . max ( 255 )
6+ /** Configured provider names must round-trip unchanged from selectors to requests. */
7+ const name = z
8+ . string ( )
9+ . min ( 1 )
10+ . max ( 255 )
11+ . refine ( ( value ) => value . trim ( ) . length > 0 , 'Name is required' )
12+ const period = z
13+ . string ( )
14+ . min ( 1 )
15+ . max ( 1024 )
16+ . refine ( ( value ) => value . trim ( ) . length > 0 , 'Period is required' )
717/** Preserve provider filenames, including meaningful spaces and literal percent signs. */
818const fileName = z
919 . string ( )
@@ -12,7 +22,7 @@ const fileName = z
1222 . refine ( ( value ) => value . trim ( ) . length > 0 , 'File name is required' )
1323const optionalName = name . optional ( )
1424const auth = {
15- oauthCredential : name ,
25+ oauthCredential : identifier ,
1626 accessToken : z . string ( ) . min ( 1 ) . max ( 4096 ) ,
1727 instanceUrl : z . string ( ) . min ( 1 ) . max ( 4096 ) ,
1828}
@@ -31,9 +41,9 @@ export const oracleEpmDataSchemas = {
3141 get_connection : z . object ( { ...auth , connectionName : name } ) ,
3242 update_connection : z . object ( {
3343 ...auth ,
34- sourceSystemId : name ,
44+ sourceSystemId : identifier ,
3545 sourceSystemName : name ,
36- sourceSystemType : name ,
46+ sourceSystemType : identifier ,
3747 sourceSystemOptions : z
3848 . array ( z . object ( { optionName : name , optionValue : z . string ( ) . max ( 65_536 ) } ) )
3949 . min ( 1 )
@@ -45,8 +55,8 @@ export const oracleEpmDataSchemas = {
4555 ...auth ,
4656 jobName : name ,
4757 periodName : period ,
48- importMode : name ,
49- exportMode : name ,
58+ importMode : identifier ,
59+ exportMode : identifier ,
5060 fileName : fileName . optional ( ) ,
5161 executionMode : z . enum ( [ 'SYNC' , 'ASYNC' ] ) . optional ( ) ,
5262 sourceFilters : options . optional ( ) ,
@@ -74,7 +84,7 @@ export const oracleEpmDataSchemas = {
7484 get_job_status : z . object ( {
7585 ...auth ,
7686 ...wait ,
77- jobId : name . regex ( / ^ [ 1 - 9 ] \d * $ / , 'A positive Oracle job ID is required' ) ,
87+ jobId : identifier . regex ( / ^ [ 1 - 9 ] \d * $ / , 'A positive Oracle job ID is required' ) ,
7888 } ) ,
7989 execute_report : z . object ( {
8090 ...auth ,
0 commit comments