mirror of
https://github.com/supabase/supabase.git
synced 2026-10-16 14:49:10 +03:00
add source and sink names
This commit is contained in:
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) {
|
||||
|
||||
Vendored
+4
@@ -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: {
|
||||
|
||||
Reference in new issue
Block a user