Skip to content
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/dataconnect/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
debugDetails?: string;
warningLevel?: WarningLevel;
workarounds?: Workaround[];
[key: string]: any;

Check warning on line 107 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
}

export interface BuildResult {
Expand All @@ -120,7 +120,7 @@
};
}

export function requiresVector(dm?: DeploymentMetadata): boolean {

Check warning on line 123 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing JSDoc comment
return dm?.primaryDataSource?.postgres?.requiredExtensions?.includes("vector") ?? false;
}

Expand Down Expand Up @@ -173,29 +173,40 @@
angular?: boolean;
}

export interface CacheSettings {
maxAge?: string;
maxSize?: string;
storage?: "persistent" | "memory";
}

export interface AdminNodeSDK {
outputDir: string;
package: string;
packageJsonDir?: string;
clientCache?: CacheSettings;

Check failure on line 186 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Delete `·`

Check failure on line 186 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / unit (24)

Delete `·`
}

export interface JavascriptSDK extends SupportedFrameworks {
outputDir: string;
package: string;
packageJsonDir?: string;
clientCache?: CacheSettings;

Check failure on line 193 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Delete `·`

Check failure on line 193 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / unit (24)

Delete `·`
}

export interface SwiftSDK {
outputDir: string;
package: string;
clientCache?: CacheSettings;

Check failure on line 199 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Delete `·`

Check failure on line 199 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / unit (24)

Delete `·`
}
export interface KotlinSDK {
outputDir: string;
package: string;
clientCache?: CacheSettings;

Check failure on line 204 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Delete `·`

Check failure on line 204 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / unit (24)

Delete `·`
}
export interface DartSDK {
outputDir: string;
package: string;
clientCache?: CacheSettings;

Check failure on line 209 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Delete `·`

Check failure on line 209 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / unit (24)

Delete `·`
}

// Helper types && converters
Expand All @@ -214,7 +225,7 @@
connectorYaml: ConnectorYaml;
}

export function toDatasource(

Check warning on line 228 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing JSDoc comment
projectId: string,
locationId: string,
ds: DatasourceYaml,
Expand Down Expand Up @@ -284,7 +295,7 @@
}

export interface GraphqlResponse {
data: Record<string, any>;

Check warning on line 298 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
errors: GraphqlError[];
}

Expand All @@ -308,9 +319,9 @@
details?: GraphqlError[];
}

export const isGraphQLResponse = (g: any): g is GraphqlResponse => !!g.data || !!g.errors;

Check warning on line 322 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .errors on an `any` value

Check warning on line 322 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .data on an `any` value

Check warning on line 322 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
export const isGraphQLResponseError = (g: any): g is GraphqlResponseError =>

Check warning on line 323 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
!!g.error?.message || !!g.message;

Check warning on line 324 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .message on an `any` value

Check warning on line 324 in src/dataconnect/types.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .error on an `any` value

interface ImpersonationAuthenticated {
authClaims: any;
Expand Down
Loading