|
1 | 1 | import { BSON } from 'bsonfy'; |
2 | 2 | import { Struct, Timestamp, type JsonValue } from '@bufbuild/protobuf'; |
3 | | -import { |
4 | | - createPromiseClient, |
5 | | - type PromiseClient, |
6 | | - type Transport, |
7 | | -} from '@connectrpc/connect'; |
| 3 | +import { createClient, type Client, type Transport } from '@connectrpc/connect'; |
8 | 4 | import { DataService } from '../gen/app/data/v1/data_connect'; |
9 | 5 | import { |
10 | 6 | BinaryID, |
@@ -73,19 +69,16 @@ const logDeprecationWarning = () => { |
73 | 69 | }; |
74 | 70 |
|
75 | 71 | export class DataClient { |
76 | | - private dataClient: PromiseClient<typeof DataService>; |
77 | | - private datasetClient: PromiseClient<typeof DatasetService>; |
78 | | - private dataSyncClient: PromiseClient<typeof DataSyncService>; |
79 | | - private dataPipelinesClient: PromiseClient<typeof DataPipelinesService>; |
| 72 | + private dataClient: Client<typeof DataService>; |
| 73 | + private datasetClient: Client<typeof DatasetService>; |
| 74 | + private dataSyncClient: Client<typeof DataSyncService>; |
| 75 | + private dataPipelinesClient: Client<typeof DataPipelinesService>; |
80 | 76 |
|
81 | 77 | constructor(transport: Transport) { |
82 | | - this.dataClient = createPromiseClient(DataService, transport); |
83 | | - this.datasetClient = createPromiseClient(DatasetService, transport); |
84 | | - this.dataSyncClient = createPromiseClient(DataSyncService, transport); |
85 | | - this.dataPipelinesClient = createPromiseClient( |
86 | | - DataPipelinesService, |
87 | | - transport |
88 | | - ); |
| 78 | + this.dataClient = createClient(DataService, transport); |
| 79 | + this.datasetClient = createClient(DatasetService, transport); |
| 80 | + this.dataSyncClient = createClient(DataSyncService, transport); |
| 81 | + this.dataPipelinesClient = createClient(DataPipelinesService, transport); |
89 | 82 | } |
90 | 83 |
|
91 | 84 | /** |
@@ -1519,9 +1512,7 @@ export class DataClient { |
1519 | 1512 |
|
1520 | 1513 | export class ListDataPipelineRunsPage { |
1521 | 1514 | constructor( |
1522 | | - private readonly dataPipelinesClient: PromiseClient< |
1523 | | - typeof DataPipelinesService |
1524 | | - >, |
| 1515 | + private readonly dataPipelinesClient: Client<typeof DataPipelinesService>, |
1525 | 1516 | private readonly pipelineId: string, |
1526 | 1517 | public readonly runs: DataPipelineRun[] = [], |
1527 | 1518 | private readonly pageSize?: number, |
|
0 commit comments