@pushwoosh/rpc-v2-http-api-data 0.2.33 → 0.2.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data.js +55 -0
- package/package.json +1 -1
- package/pushwoosh_rpc_external_segments_v3.d.ts +57 -1
package/data.js
CHANGED
|
@@ -10250,6 +10250,15 @@ export const data = {
|
|
|
10250
10250
|
"errors": {
|
|
10251
10251
|
"commonFailedPreconditions": "pushwoosh.rpc.errors.v3.Common_FailedPreconditions"
|
|
10252
10252
|
}
|
|
10253
|
+
},
|
|
10254
|
+
"TestConnection": {
|
|
10255
|
+
"request": "pushwoosh.rpc.external_segments.v3.TestConnectionRequest",
|
|
10256
|
+
"response": "pushwoosh.rpc.external_segments.v3.TestConnectionResponse",
|
|
10257
|
+
"method": "post",
|
|
10258
|
+
"path": "/api/external-segments:test-connection",
|
|
10259
|
+
"errors": {
|
|
10260
|
+
"commonFailedPreconditions": "pushwoosh.rpc.errors.v3.Common_FailedPreconditions"
|
|
10261
|
+
}
|
|
10253
10262
|
}
|
|
10254
10263
|
}
|
|
10255
10264
|
},
|
|
@@ -10535,6 +10544,52 @@ export const data = {
|
|
|
10535
10544
|
}
|
|
10536
10545
|
}
|
|
10537
10546
|
},
|
|
10547
|
+
"pushwoosh.rpc.external_segments.v3.TestConnectionRequest": {
|
|
10548
|
+
"type": "I",
|
|
10549
|
+
"fields": {
|
|
10550
|
+
"application": {
|
|
10551
|
+
"type": "string"
|
|
10552
|
+
},
|
|
10553
|
+
"code": {
|
|
10554
|
+
"type": "string"
|
|
10555
|
+
},
|
|
10556
|
+
"postgres": {
|
|
10557
|
+
"type": "pushwoosh.rpc.external_segments.v3.PostgresConnection"
|
|
10558
|
+
},
|
|
10559
|
+
"mysql": {
|
|
10560
|
+
"type": "pushwoosh.rpc.external_segments.v3.MysqlConnection"
|
|
10561
|
+
},
|
|
10562
|
+
"bigquery": {
|
|
10563
|
+
"type": "pushwoosh.rpc.external_segments.v3.BigQueryConnection"
|
|
10564
|
+
},
|
|
10565
|
+
"query": {
|
|
10566
|
+
"type": "string"
|
|
10567
|
+
},
|
|
10568
|
+
"checkQuery": {
|
|
10569
|
+
"type": "boolean"
|
|
10570
|
+
}
|
|
10571
|
+
},
|
|
10572
|
+
"oneofs": {
|
|
10573
|
+
"connection": {
|
|
10574
|
+
"oneof": [
|
|
10575
|
+
"postgres",
|
|
10576
|
+
"mysql",
|
|
10577
|
+
"bigquery"
|
|
10578
|
+
]
|
|
10579
|
+
}
|
|
10580
|
+
}
|
|
10581
|
+
},
|
|
10582
|
+
"pushwoosh.rpc.external_segments.v3.TestConnectionResponse": {
|
|
10583
|
+
"type": "I",
|
|
10584
|
+
"fields": {
|
|
10585
|
+
"ok": {
|
|
10586
|
+
"type": "boolean"
|
|
10587
|
+
},
|
|
10588
|
+
"error": {
|
|
10589
|
+
"type": "string"
|
|
10590
|
+
}
|
|
10591
|
+
}
|
|
10592
|
+
},
|
|
10538
10593
|
"pushwoosh.rpc_v2.filters.FiltersService": {
|
|
10539
10594
|
"type": "S",
|
|
10540
10595
|
"key": "filters",
|
package/package.json
CHANGED
|
@@ -161,6 +161,13 @@ export type ExternalSegmentsService_CheckConnection = RpcMethodV3<CheckConnectio
|
|
|
161
161
|
error?: undefined;
|
|
162
162
|
failedPreconditions?: pushwoosh_rpc_errors_v3_Common_FailedPreconditions;
|
|
163
163
|
}>;
|
|
164
|
+
export type ExternalSegmentsService_TestConnection = RpcMethodV3<TestConnectionRequest, TestConnectionResponse, {
|
|
165
|
+
error: unknown;
|
|
166
|
+
failedPreconditions?: undefined;
|
|
167
|
+
} | {
|
|
168
|
+
error?: undefined;
|
|
169
|
+
failedPreconditions?: pushwoosh_rpc_errors_v3_Common_FailedPreconditions;
|
|
170
|
+
}>;
|
|
164
171
|
/**
|
|
165
172
|
* ExternalSegmentsService manages external segments: user populations materialized
|
|
166
173
|
* from an external database (PostgreSQL / MySQL) via a user-supplied SQL query.
|
|
@@ -186,10 +193,18 @@ export interface ExternalSegmentsService {
|
|
|
186
193
|
/** Delete an external segment. */
|
|
187
194
|
Delete: ExternalSegmentsService_Delete;
|
|
188
195
|
/**
|
|
189
|
-
* CheckConnection connects to the segment's database and
|
|
196
|
+
* CheckConnection connects to the segment's database and validates its stored
|
|
197
|
+
* query (SQL: executes it and reads the first row; BigQuery: dry-run), then
|
|
190
198
|
* stores the outcome in the segment's `valid` flag. Returns the result.
|
|
191
199
|
*/
|
|
192
200
|
CheckConnection: ExternalSegmentsService_CheckConnection;
|
|
201
|
+
/**
|
|
202
|
+
* TestConnection validates connection parameters supplied inline (not yet
|
|
203
|
+
* persisted), so the create/edit form can test before saving. When
|
|
204
|
+
* check_query is false it only connects and pings; when true it also
|
|
205
|
+
* validates the query. It never persists anything (unlike CheckConnection).
|
|
206
|
+
*/
|
|
207
|
+
TestConnection: ExternalSegmentsService_TestConnection;
|
|
193
208
|
}
|
|
194
209
|
export type ExternalSegmentsService_Errors = {
|
|
195
210
|
List: {
|
|
@@ -212,6 +227,9 @@ export type ExternalSegmentsService_Errors = {
|
|
|
212
227
|
CheckConnection: {
|
|
213
228
|
failedPreconditions: pushwoosh_rpc_errors_v3_Common_FailedPreconditions;
|
|
214
229
|
};
|
|
230
|
+
TestConnection: {
|
|
231
|
+
failedPreconditions: pushwoosh_rpc_errors_v3_Common_FailedPreconditions;
|
|
232
|
+
};
|
|
215
233
|
};
|
|
216
234
|
/**
|
|
217
235
|
* PostgresConnection holds PostgreSQL connection parameters.
|
|
@@ -422,3 +440,41 @@ export type CheckConnectionResponse = {
|
|
|
422
440
|
/** Connection error message when valid is false; empty otherwise. */
|
|
423
441
|
error: string;
|
|
424
442
|
};
|
|
443
|
+
export type TestConnectionRequest_connection_postgres = {
|
|
444
|
+
type: 'postgres';
|
|
445
|
+
data: PostgresConnection;
|
|
446
|
+
};
|
|
447
|
+
export type TestConnectionRequest_connection_mysql = {
|
|
448
|
+
type: 'mysql';
|
|
449
|
+
data: MysqlConnection;
|
|
450
|
+
};
|
|
451
|
+
export type TestConnectionRequest_connection_bigquery = {
|
|
452
|
+
type: 'bigquery';
|
|
453
|
+
data: BigQueryConnection;
|
|
454
|
+
};
|
|
455
|
+
export type TestConnectionRequest_connection = TestConnectionRequest_connection_postgres | TestConnectionRequest_connection_mysql | TestConnectionRequest_connection_bigquery;
|
|
456
|
+
export type TestConnectionRequest = {
|
|
457
|
+
/** Application code the segment belongs to. */
|
|
458
|
+
application?: string;
|
|
459
|
+
/**
|
|
460
|
+
* Optional external segment code. When set, blank write-only secrets
|
|
461
|
+
* (password / service account JSON) and TLS certificates are backfilled from
|
|
462
|
+
* the stored segment, so an existing segment can be tested without re-entering
|
|
463
|
+
* them. Leave empty when testing brand-new parameters on the create form.
|
|
464
|
+
*/
|
|
465
|
+
code?: string;
|
|
466
|
+
/** SQL query to validate. Required (and only used) when check_query is true. */
|
|
467
|
+
query?: string;
|
|
468
|
+
/**
|
|
469
|
+
* When true, the query is executed to validate it (SQL: run it and read the
|
|
470
|
+
* first row; BigQuery: dry-run). When false, only connectivity is checked.
|
|
471
|
+
*/
|
|
472
|
+
checkQuery?: boolean;
|
|
473
|
+
connection: TestConnectionRequest_connection;
|
|
474
|
+
};
|
|
475
|
+
export type TestConnectionResponse = {
|
|
476
|
+
/** Whether the test succeeded. */
|
|
477
|
+
ok: boolean;
|
|
478
|
+
/** Failure message when ok is false; empty otherwise. */
|
|
479
|
+
error: string;
|
|
480
|
+
};
|