add source and sink names

This commit is contained in:
Raminder Singh committed 2025-02-06 16:48:49 +05:30
1 parent bdc2684d15
commit ed5c7d6597
2 files changed
+12 -2

No files matched your search

@@ -7,20 +7,26 @@ import { handleError, post } from 'data/fetchers'
export type CreateSinkParams = {
projectRef: string
sink_name: string
project_id: string
dataset_id: string
service_account_key: string
}
async function createSink(
{ projectRef, project_id, dataset_id, service_account_key }: CreateSinkParams,
{ projectRef, sink_name, project_id, dataset_id, service_account_key }: CreateSinkParams,
signal?: AbortSignal
) {
if (!projectRef) throw new Error('projectRef is required')
const { data, error } = await post('/platform/replication/{ref}/sinks', {
params: { path: { ref: projectRef } },
body: { project_id, dataset_id, service_account_key },
body: {
project_id,
dataset_id,
service_account_key,
sink_name,
},
signal,
})
if (error) {
+4
View File
@@ -8703,6 +8703,8 @@ export interface components {
project_id: string
/** @description BigQuery service account key */
service_account_key: string
/** @description Sink name */
sink_name: string
}
CreateRoleBody: {
admins?: string[]
@@ -10879,6 +10881,7 @@ export interface components {
BigQuery?: components['schemas']['ReplicationBigQueryConfig']
}
id: number
name: string
tenant_id: string
}
ReplicationSourcesResponse: {
@@ -10886,6 +10889,7 @@ export interface components {
Postgres?: components['schemas']['ReplicationPostgresConfig']
}
id: number
name: string
tenant_id: string
}
ReplicationTable: {