@pushwoosh/rpc-v2-http-api-data 0.1.999 → 0.1.1001

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 CHANGED
@@ -6693,6 +6693,12 @@ export const data = {
6693
6693
  "preliminary": {
6694
6694
  "type": "boolean"
6695
6695
  },
6696
+ "errorCount": {
6697
+ "type": "number"
6698
+ },
6699
+ "warningCount": {
6700
+ "type": "number"
6701
+ },
6696
6702
  "size": {
6697
6703
  "type": "pushwoosh.rpc_v2.deliverability_checker.SizeDetails"
6698
6704
  },
@@ -6851,6 +6857,9 @@ export const data = {
6851
6857
  },
6852
6858
  "redirects": {
6853
6859
  "type": "number"
6860
+ },
6861
+ "level": {
6862
+ "type": "pushwoosh.rpc_v2.deliverability_checker.Level"
6854
6863
  }
6855
6864
  }
6856
6865
  },
@@ -6877,6 +6886,9 @@ export const data = {
6877
6886
  },
6878
6887
  "source": {
6879
6888
  "type": "string"
6889
+ },
6890
+ "level": {
6891
+ "type": "pushwoosh.rpc_v2.deliverability_checker.Level"
6880
6892
  }
6881
6893
  }
6882
6894
  },
@@ -10160,6 +10172,312 @@ export const data = {
10160
10172
  }
10161
10173
  }
10162
10174
  },
10175
+ "pushwoosh.rpc.external_segments.v3.ExternalSegmentsService_Create_FieldViolations": {
10176
+ "type": "E",
10177
+ "values": [
10178
+ "CREATE_FV_UNSPECIFIED",
10179
+ "CREATE_CONNECTION_REQUIRED",
10180
+ "CREATE_HOST_EMPTY",
10181
+ "CREATE_DATABASE_EMPTY",
10182
+ "CREATE_USER_EMPTY",
10183
+ "CREATE_QUERY_EMPTY",
10184
+ "CREATE_HOST_NOT_ALLOWED"
10185
+ ]
10186
+ },
10187
+ "pushwoosh.rpc.external_segments.v3.ExternalSegmentsService_Update_FieldViolations": {
10188
+ "type": "E",
10189
+ "values": [
10190
+ "UPDATE_FV_UNSPECIFIED",
10191
+ "UPDATE_CODE_EMPTY",
10192
+ "UPDATE_HOST_EMPTY",
10193
+ "UPDATE_DATABASE_EMPTY",
10194
+ "UPDATE_USER_EMPTY",
10195
+ "UPDATE_QUERY_EMPTY",
10196
+ "UPDATE_HOST_NOT_ALLOWED"
10197
+ ]
10198
+ },
10199
+ "pushwoosh.rpc.external_segments.v3.ExternalSegmentsService_Update_FailedPreconditions": {
10200
+ "type": "E",
10201
+ "values": [
10202
+ "UPDATE_FP_UNSPECIFIED",
10203
+ "UPDATE_SEGMENT_NOT_FOUND",
10204
+ "UPDATE_KIND_MISMATCH"
10205
+ ]
10206
+ },
10207
+ "pushwoosh.rpc.external_segments.v3.ExternalSegmentsService_Delete_FailedPreconditions": {
10208
+ "type": "E",
10209
+ "values": [
10210
+ "DELETE_FP_UNSPECIFIED",
10211
+ "DELETE_SEGMENT_NOT_FOUND"
10212
+ ]
10213
+ },
10214
+ "pushwoosh.rpc.external_segments.v3.ExternalSegmentsService": {
10215
+ "type": "S",
10216
+ "key": "externalSegments",
10217
+ "methods": {
10218
+ "List": {
10219
+ "request": "pushwoosh.rpc.external_segments.v3.ListRequest",
10220
+ "response": "pushwoosh.rpc.external_segments.v3.ListResponse",
10221
+ "method": "get",
10222
+ "path": "/api/external-segments",
10223
+ "errors": {
10224
+ "commonFailedPreconditions": "pushwoosh.rpc.errors.v3.Common_FailedPreconditions"
10225
+ }
10226
+ },
10227
+ "Get": {
10228
+ "request": "pushwoosh.rpc.external_segments.v3.GetRequest",
10229
+ "response": "pushwoosh.rpc.external_segments.v3.GetResponse",
10230
+ "method": "get",
10231
+ "path": "/api/external-segments/{code}",
10232
+ "errors": {
10233
+ "commonFailedPreconditions": "pushwoosh.rpc.errors.v3.Common_FailedPreconditions"
10234
+ }
10235
+ },
10236
+ "Create": {
10237
+ "request": "pushwoosh.rpc.external_segments.v3.CreateRequest",
10238
+ "response": "pushwoosh.rpc.external_segments.v3.CreateResponse",
10239
+ "method": "post",
10240
+ "path": "/api/external-segments",
10241
+ "errors": {
10242
+ "fieldViolations": "pushwoosh.rpc.external_segments.v3.ExternalSegmentsService_Create_FieldViolations",
10243
+ "commonFailedPreconditions": "pushwoosh.rpc.errors.v3.Common_FailedPreconditions"
10244
+ }
10245
+ },
10246
+ "Update": {
10247
+ "request": "pushwoosh.rpc.external_segments.v3.UpdateRequest",
10248
+ "response": "pushwoosh.rpc.external_segments.v3.UpdateResponse",
10249
+ "method": "put",
10250
+ "path": "/api/external-segments/{code}",
10251
+ "errors": {
10252
+ "fieldViolations": "pushwoosh.rpc.external_segments.v3.ExternalSegmentsService_Update_FieldViolations",
10253
+ "failedPreconditions": "pushwoosh.rpc.external_segments.v3.ExternalSegmentsService_Update_FailedPreconditions",
10254
+ "commonFailedPreconditions": "pushwoosh.rpc.errors.v3.Common_FailedPreconditions"
10255
+ }
10256
+ },
10257
+ "Delete": {
10258
+ "request": "pushwoosh.rpc.external_segments.v3.DeleteRequest",
10259
+ "response": "pushwoosh.rpc.external_segments.v3.DeleteResponse",
10260
+ "method": "delete",
10261
+ "path": "/api/external-segments/{code}",
10262
+ "errors": {
10263
+ "failedPreconditions": "pushwoosh.rpc.external_segments.v3.ExternalSegmentsService_Delete_FailedPreconditions",
10264
+ "commonFailedPreconditions": "pushwoosh.rpc.errors.v3.Common_FailedPreconditions"
10265
+ }
10266
+ }
10267
+ }
10268
+ },
10269
+ "pushwoosh.rpc.external_segments.v3.PostgresConnection": {
10270
+ "type": "I",
10271
+ "fields": {
10272
+ "host": {
10273
+ "type": "string"
10274
+ },
10275
+ "port": {
10276
+ "type": "number"
10277
+ },
10278
+ "user": {
10279
+ "type": "string"
10280
+ },
10281
+ "password": {
10282
+ "type": "string"
10283
+ },
10284
+ "database": {
10285
+ "type": "string"
10286
+ },
10287
+ "options": {
10288
+ "type": "string",
10289
+ "mapKeyType": "string"
10290
+ }
10291
+ }
10292
+ },
10293
+ "pushwoosh.rpc.external_segments.v3.MysqlConnection": {
10294
+ "type": "I",
10295
+ "fields": {
10296
+ "host": {
10297
+ "type": "string"
10298
+ },
10299
+ "port": {
10300
+ "type": "number"
10301
+ },
10302
+ "user": {
10303
+ "type": "string"
10304
+ },
10305
+ "password": {
10306
+ "type": "string"
10307
+ },
10308
+ "database": {
10309
+ "type": "string"
10310
+ },
10311
+ "params": {
10312
+ "type": "string",
10313
+ "mapKeyType": "string"
10314
+ }
10315
+ }
10316
+ },
10317
+ "pushwoosh.rpc.external_segments.v3.ExternalSegment": {
10318
+ "type": "I",
10319
+ "fields": {
10320
+ "application": {
10321
+ "type": "string"
10322
+ },
10323
+ "code": {
10324
+ "type": "string"
10325
+ },
10326
+ "postgres": {
10327
+ "type": "pushwoosh.rpc.external_segments.v3.PostgresConnection"
10328
+ },
10329
+ "mysql": {
10330
+ "type": "pushwoosh.rpc.external_segments.v3.MysqlConnection"
10331
+ },
10332
+ "query": {
10333
+ "type": "string"
10334
+ },
10335
+ "valid": {
10336
+ "type": "boolean"
10337
+ },
10338
+ "lastRequestedAt": {
10339
+ "type": "Date"
10340
+ },
10341
+ "lastError": {
10342
+ "type": "string"
10343
+ },
10344
+ "generation": {
10345
+ "type": "number"
10346
+ },
10347
+ "createdAt": {
10348
+ "type": "Date"
10349
+ }
10350
+ },
10351
+ "oneofs": {
10352
+ "connection": {
10353
+ "oneof": [
10354
+ "postgres",
10355
+ "mysql"
10356
+ ]
10357
+ }
10358
+ }
10359
+ },
10360
+ "pushwoosh.rpc.external_segments.v3.ListRequest": {
10361
+ "type": "I",
10362
+ "fields": {
10363
+ "application": {
10364
+ "type": "string"
10365
+ }
10366
+ }
10367
+ },
10368
+ "pushwoosh.rpc.external_segments.v3.ListResponse": {
10369
+ "type": "I",
10370
+ "fields": {
10371
+ "segments": {
10372
+ "type": "pushwoosh.rpc.external_segments.v3.ExternalSegment",
10373
+ "array": true
10374
+ }
10375
+ }
10376
+ },
10377
+ "pushwoosh.rpc.external_segments.v3.GetRequest": {
10378
+ "type": "I",
10379
+ "fields": {
10380
+ "application": {
10381
+ "type": "string"
10382
+ },
10383
+ "code": {
10384
+ "type": "string"
10385
+ }
10386
+ }
10387
+ },
10388
+ "pushwoosh.rpc.external_segments.v3.GetResponse": {
10389
+ "type": "I",
10390
+ "fields": {
10391
+ "segment": {
10392
+ "type": "pushwoosh.rpc.external_segments.v3.ExternalSegment"
10393
+ }
10394
+ }
10395
+ },
10396
+ "pushwoosh.rpc.external_segments.v3.CreateRequest": {
10397
+ "type": "I",
10398
+ "fields": {
10399
+ "application": {
10400
+ "type": "string"
10401
+ },
10402
+ "postgres": {
10403
+ "type": "pushwoosh.rpc.external_segments.v3.PostgresConnection"
10404
+ },
10405
+ "mysql": {
10406
+ "type": "pushwoosh.rpc.external_segments.v3.MysqlConnection"
10407
+ },
10408
+ "query": {
10409
+ "type": "string"
10410
+ }
10411
+ },
10412
+ "oneofs": {
10413
+ "connection": {
10414
+ "oneof": [
10415
+ "postgres",
10416
+ "mysql"
10417
+ ]
10418
+ }
10419
+ }
10420
+ },
10421
+ "pushwoosh.rpc.external_segments.v3.CreateResponse": {
10422
+ "type": "I",
10423
+ "fields": {
10424
+ "segment": {
10425
+ "type": "pushwoosh.rpc.external_segments.v3.ExternalSegment"
10426
+ }
10427
+ }
10428
+ },
10429
+ "pushwoosh.rpc.external_segments.v3.UpdateRequest": {
10430
+ "type": "I",
10431
+ "fields": {
10432
+ "application": {
10433
+ "type": "string"
10434
+ },
10435
+ "code": {
10436
+ "type": "string"
10437
+ },
10438
+ "postgres": {
10439
+ "type": "pushwoosh.rpc.external_segments.v3.PostgresConnection"
10440
+ },
10441
+ "mysql": {
10442
+ "type": "pushwoosh.rpc.external_segments.v3.MysqlConnection"
10443
+ },
10444
+ "query": {
10445
+ "type": "string",
10446
+ "optional": true
10447
+ }
10448
+ },
10449
+ "oneofs": {
10450
+ "connection": {
10451
+ "oneof": [
10452
+ "postgres",
10453
+ "mysql"
10454
+ ]
10455
+ }
10456
+ }
10457
+ },
10458
+ "pushwoosh.rpc.external_segments.v3.UpdateResponse": {
10459
+ "type": "I",
10460
+ "fields": {
10461
+ "segment": {
10462
+ "type": "pushwoosh.rpc.external_segments.v3.ExternalSegment"
10463
+ }
10464
+ }
10465
+ },
10466
+ "pushwoosh.rpc.external_segments.v3.DeleteRequest": {
10467
+ "type": "I",
10468
+ "fields": {
10469
+ "application": {
10470
+ "type": "string"
10471
+ },
10472
+ "code": {
10473
+ "type": "string"
10474
+ }
10475
+ }
10476
+ },
10477
+ "pushwoosh.rpc.external_segments.v3.DeleteResponse": {
10478
+ "type": "I",
10479
+ "fields": {}
10480
+ },
10163
10481
  "pushwoosh.rpc_v2.filters.FiltersService": {
10164
10482
  "type": "S",
10165
10483
  "key": "filters",
@@ -131,6 +131,8 @@ export type Check = {
131
131
  status: CheckStatus;
132
132
  message: string;
133
133
  preliminary: boolean;
134
+ errorCount: number;
135
+ warningCount: number;
134
136
  details: Check_details;
135
137
  };
136
138
  export type SizeDetails = {
@@ -165,6 +167,7 @@ export type BrokenLinkItem = {
165
167
  reason: string;
166
168
  statusCode: number;
167
169
  redirects: number;
170
+ level: Level;
168
171
  };
169
172
  export type SafeBrowsingDetails = {
170
173
  items: SafeBrowsingItem[];
@@ -174,6 +177,7 @@ export type SafeBrowsingItem = {
174
177
  url: string;
175
178
  category: string;
176
179
  source: string;
180
+ level: Level;
177
181
  };
178
182
  export type TrackerConsistencyDetails = {
179
183
  unwrappedCount: number;
package/index.d.ts CHANGED
@@ -27,6 +27,7 @@ import { EmailTemplatesService as pushwoosh_rpc_v2_accounts_EmailTemplatesServic
27
27
  import { EmailsConfigurationsService as pushwoosh_rpc_v2_emails_configurations_EmailsConfigurationsService } from './emails_configurations';
28
28
  import { EventsService as pushwoosh_rpc_v2_events_EventsService } from './events';
29
29
  import { ExportStatisticsService as pushwoosh_rpc_v2_export_messages_ExportStatisticsService } from './export_messages';
30
+ import { ExternalSegmentsService as pushwoosh_rpc_external_segments_v3_ExternalSegmentsService } from './pushwoosh_rpc_external_segments_v3';
30
31
  import { FiltersService as pushwoosh_rpc_v2_filters_FiltersService } from './filters';
31
32
  import { FrequencyCappingService as pushwoosh_rpc_v2_frequency_capping_FrequencyCappingService } from './frequency_capping';
32
33
  import { FrequencyCappingDisabledUsersService as pushwoosh_rpc_frequency_capping_disabled_users_v3_FrequencyCappingDisabledUsersService } from './pushwoosh_rpc_frequency_capping_disabled_users_v3';
@@ -92,6 +93,7 @@ export type API = {
92
93
  emailsConfigurations: pushwoosh_rpc_v2_emails_configurations_EmailsConfigurationsService;
93
94
  events: pushwoosh_rpc_v2_events_EventsService;
94
95
  exportStatistics: pushwoosh_rpc_v2_export_messages_ExportStatisticsService;
96
+ externalSegments: pushwoosh_rpc_external_segments_v3_ExternalSegmentsService;
95
97
  filters: pushwoosh_rpc_v2_filters_FiltersService;
96
98
  frequencyCapping: pushwoosh_rpc_v2_frequency_capping_FrequencyCappingService;
97
99
  frequencyCappingDisabledUsers: pushwoosh_rpc_frequency_capping_disabled_users_v3_FrequencyCappingDisabledUsersService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.1.999",
3
+ "version": "0.1.1001",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -0,0 +1,302 @@
1
+ import { RpcMethodV3 } from './commonTypes';
2
+ import { Common_FailedPreconditions as pushwoosh_rpc_errors_v3_Common_FailedPreconditions } from './pushwoosh_rpc_errors_v3';
3
+ export type ExternalSegmentsService_Create_FieldViolations = {
4
+ reason: 'CREATE_FV_UNSPECIFIED';
5
+ field: string;
6
+ description: string;
7
+ } | {
8
+ reason: 'CREATE_CONNECTION_REQUIRED';
9
+ field: string;
10
+ description: string;
11
+ } | {
12
+ reason: 'CREATE_HOST_EMPTY';
13
+ field: string;
14
+ description: string;
15
+ } | {
16
+ reason: 'CREATE_DATABASE_EMPTY';
17
+ field: string;
18
+ description: string;
19
+ } | {
20
+ reason: 'CREATE_USER_EMPTY';
21
+ field: string;
22
+ description: string;
23
+ } | {
24
+ reason: 'CREATE_QUERY_EMPTY';
25
+ field: string;
26
+ description: string;
27
+ } | {
28
+ reason: 'CREATE_HOST_NOT_ALLOWED';
29
+ field: string;
30
+ description: string;
31
+ };
32
+ export type ExternalSegmentsService_Update_FieldViolations = {
33
+ reason: 'UPDATE_FV_UNSPECIFIED';
34
+ field: string;
35
+ description: string;
36
+ } | {
37
+ reason: 'UPDATE_CODE_EMPTY';
38
+ field: string;
39
+ description: string;
40
+ } | {
41
+ reason: 'UPDATE_HOST_EMPTY';
42
+ field: string;
43
+ description: string;
44
+ } | {
45
+ reason: 'UPDATE_DATABASE_EMPTY';
46
+ field: string;
47
+ description: string;
48
+ } | {
49
+ reason: 'UPDATE_USER_EMPTY';
50
+ field: string;
51
+ description: string;
52
+ } | {
53
+ reason: 'UPDATE_QUERY_EMPTY';
54
+ field: string;
55
+ description: string;
56
+ } | {
57
+ reason: 'UPDATE_HOST_NOT_ALLOWED';
58
+ field: string;
59
+ description: string;
60
+ };
61
+ export type ExternalSegmentsService_Update_FailedPreconditions = {
62
+ type: 'UPDATE_FP_UNSPECIFIED';
63
+ description: string;
64
+ } | {
65
+ type: 'UPDATE_SEGMENT_NOT_FOUND';
66
+ description: string;
67
+ } | {
68
+ type: 'UPDATE_KIND_MISMATCH';
69
+ description: string;
70
+ };
71
+ export type ExternalSegmentsService_Delete_FailedPreconditions = {
72
+ type: 'DELETE_FP_UNSPECIFIED';
73
+ description: string;
74
+ } | {
75
+ type: 'DELETE_SEGMENT_NOT_FOUND';
76
+ description: string;
77
+ };
78
+ export type ExternalSegmentsService_List = RpcMethodV3<ListRequest, ListResponse, {
79
+ error: unknown;
80
+ failedPreconditions?: undefined;
81
+ } | {
82
+ error?: undefined;
83
+ failedPreconditions?: pushwoosh_rpc_errors_v3_Common_FailedPreconditions;
84
+ }>;
85
+ export type ExternalSegmentsService_Get = RpcMethodV3<GetRequest, GetResponse, {
86
+ error: unknown;
87
+ failedPreconditions?: undefined;
88
+ } | {
89
+ error?: undefined;
90
+ failedPreconditions?: pushwoosh_rpc_errors_v3_Common_FailedPreconditions;
91
+ }>;
92
+ export type ExternalSegmentsService_Create = RpcMethodV3<CreateRequest, CreateResponse, {
93
+ error: unknown;
94
+ fieldViolations?: undefined;
95
+ failedPreconditions?: undefined;
96
+ } | {
97
+ error?: undefined;
98
+ fieldViolations?: ExternalSegmentsService_Create_FieldViolations[];
99
+ failedPreconditions?: pushwoosh_rpc_errors_v3_Common_FailedPreconditions;
100
+ }>;
101
+ export type ExternalSegmentsService_Update = RpcMethodV3<UpdateRequest, UpdateResponse, {
102
+ error: unknown;
103
+ fieldViolations?: undefined;
104
+ failedPreconditions?: undefined;
105
+ } | {
106
+ error?: undefined;
107
+ fieldViolations?: ExternalSegmentsService_Update_FieldViolations[];
108
+ failedPreconditions?: ExternalSegmentsService_Update_FailedPreconditions | pushwoosh_rpc_errors_v3_Common_FailedPreconditions;
109
+ }>;
110
+ export type ExternalSegmentsService_Delete = RpcMethodV3<DeleteRequest, DeleteResponse, {
111
+ error: unknown;
112
+ failedPreconditions?: undefined;
113
+ } | {
114
+ error?: undefined;
115
+ failedPreconditions?: ExternalSegmentsService_Delete_FailedPreconditions | pushwoosh_rpc_errors_v3_Common_FailedPreconditions;
116
+ }>;
117
+ /**
118
+ * ExternalSegmentsService manages external segments: user populations materialized
119
+ * from an external database (PostgreSQL / MySQL) via a user-supplied SQL query.
120
+ *
121
+ * Unlike regular segments, an external segment is not built from filter conditions.
122
+ * It stores connection parameters and a query that must return a single "user_id"
123
+ * column. The query is executed and the result materialized by the storage service
124
+ * in background.
125
+ *
126
+ * The caller never deals with a raw connection string nor a database "kind": the
127
+ * database type is implied by which connection message is set, and the backend
128
+ * assembles the proper connection string from the structured parameters.
129
+ */
130
+ export interface ExternalSegmentsService {
131
+ /** List external segments of the given application. */
132
+ List: ExternalSegmentsService_List;
133
+ /** Get a single external segment by code. */
134
+ Get: ExternalSegmentsService_Get;
135
+ /** Create a new external segment. */
136
+ Create: ExternalSegmentsService_Create;
137
+ /** Update an existing external segment. Only provided fields are changed. */
138
+ Update: ExternalSegmentsService_Update;
139
+ /** Delete an external segment. */
140
+ Delete: ExternalSegmentsService_Delete;
141
+ }
142
+ export type ExternalSegmentsService_Errors = {
143
+ List: {
144
+ failedPreconditions: pushwoosh_rpc_errors_v3_Common_FailedPreconditions;
145
+ };
146
+ Get: {
147
+ failedPreconditions: pushwoosh_rpc_errors_v3_Common_FailedPreconditions;
148
+ };
149
+ Create: {
150
+ fieldViolations: ExternalSegmentsService_Create_FieldViolations[];
151
+ failedPreconditions: pushwoosh_rpc_errors_v3_Common_FailedPreconditions;
152
+ };
153
+ Update: {
154
+ fieldViolations: ExternalSegmentsService_Update_FieldViolations[];
155
+ failedPreconditions: ExternalSegmentsService_Update_FailedPreconditions | pushwoosh_rpc_errors_v3_Common_FailedPreconditions;
156
+ };
157
+ Delete: {
158
+ failedPreconditions: ExternalSegmentsService_Delete_FailedPreconditions | pushwoosh_rpc_errors_v3_Common_FailedPreconditions;
159
+ };
160
+ };
161
+ /**
162
+ * PostgresConnection holds PostgreSQL connection parameters.
163
+ * The backend assembles them into a libpq connection string, e.g.
164
+ * postgresql://user:password@host:port/database?sslmode=disable
165
+ */
166
+ export type PostgresConnection = {
167
+ /** Database server host. */
168
+ host: string;
169
+ /** Database server port. Defaults to 5432 if zero. */
170
+ port: number;
171
+ /** Database user. */
172
+ user: string;
173
+ /** Database password. Write-only: never returned by read methods. */
174
+ password: string;
175
+ /** Database name. */
176
+ database: string;
177
+ /**
178
+ * Any additional standard libpq connection parameters (e.g. sslmode,
179
+ * connect_timeout, application_name, sslcert, sslkey, sslrootcert,
180
+ * target_session_attrs, options). Keys must be valid libpq keywords.
181
+ */
182
+ options: Record<string, string>;
183
+ };
184
+ /**
185
+ * MysqlConnection holds MySQL connection parameters.
186
+ * The backend assembles them into a go-sql-driver DSN, e.g.
187
+ * user:password@tcp(host:port)/database?parseTime=true
188
+ */
189
+ export type MysqlConnection = {
190
+ /** Database server host. */
191
+ host: string;
192
+ /** Database server port. Defaults to 3306 if zero. */
193
+ port: number;
194
+ /** Database user. */
195
+ user: string;
196
+ /** Database password. Write-only: never returned by read methods. */
197
+ password: string;
198
+ /** Database name. */
199
+ database: string;
200
+ /**
201
+ * Any additional standard DSN parameters (e.g. tls, charset, collation,
202
+ * parseTime, loc, timeout, readTimeout, writeTimeout).
203
+ */
204
+ params: Record<string, string>;
205
+ };
206
+ export type ExternalSegment_connection_postgres = {
207
+ type: 'postgres';
208
+ data: PostgresConnection;
209
+ };
210
+ export type ExternalSegment_connection_mysql = {
211
+ type: 'mysql';
212
+ data: MysqlConnection;
213
+ };
214
+ export type ExternalSegment_connection = ExternalSegment_connection_postgres | ExternalSegment_connection_mysql;
215
+ /**
216
+ * ExternalSegment is the full representation returned by read methods.
217
+ * It exposes neither the raw connection string nor a database "kind" enum:
218
+ * the database type is conveyed by which connection message is set, and
219
+ * passwords are never returned.
220
+ */
221
+ export type ExternalSegment = {
222
+ /** Owning application code. */
223
+ application: string;
224
+ /** Unique (within application) external segment code, generated on creation. */
225
+ code: string;
226
+ /** SQL query that returns a single "user_id" column. */
227
+ query: string;
228
+ /** Whether the segment configuration is considered valid and usable. */
229
+ valid: boolean;
230
+ /** Last time the segment was successfully refreshed. Unset if never refreshed. */
231
+ lastRequestedAt: Date;
232
+ /** Error message from the last failed refresh. Empty if the last refresh succeeded. */
233
+ lastError: string;
234
+ /** Materialized snapshot version, incremented on every successful refresh. */
235
+ generation: number;
236
+ /** Segment creation time. */
237
+ createdAt: Date;
238
+ connection: ExternalSegment_connection;
239
+ };
240
+ export type ListRequest = {
241
+ /** Application code to list external segments for. */
242
+ application?: string;
243
+ };
244
+ export type ListResponse = {
245
+ segments: ExternalSegment[];
246
+ };
247
+ export type GetRequest = {
248
+ /** Owning application code. */
249
+ application?: string;
250
+ /** External segment code. */
251
+ code?: string;
252
+ };
253
+ export type GetResponse = {
254
+ segment: ExternalSegment;
255
+ };
256
+ export type CreateRequest_connection_postgres = {
257
+ type: 'postgres';
258
+ data: PostgresConnection;
259
+ };
260
+ export type CreateRequest_connection_mysql = {
261
+ type: 'mysql';
262
+ data: MysqlConnection;
263
+ };
264
+ export type CreateRequest_connection = CreateRequest_connection_postgres | CreateRequest_connection_mysql;
265
+ export type CreateRequest = {
266
+ /** Application code the segment belongs to. */
267
+ application?: string;
268
+ /** SQL query that must return a single "user_id" column. */
269
+ query?: string;
270
+ connection: CreateRequest_connection;
271
+ };
272
+ export type CreateResponse = {
273
+ segment: ExternalSegment;
274
+ };
275
+ export type UpdateRequest_connection_postgres = {
276
+ type: 'postgres';
277
+ data: PostgresConnection;
278
+ };
279
+ export type UpdateRequest_connection_mysql = {
280
+ type: 'mysql';
281
+ data: MysqlConnection;
282
+ };
283
+ export type UpdateRequest_connection = UpdateRequest_connection_postgres | UpdateRequest_connection_mysql;
284
+ export type UpdateRequest = {
285
+ /** Application code the segment belongs to. */
286
+ application?: string;
287
+ /** External segment code to update. */
288
+ code?: string;
289
+ /** New SQL query. If set, replaces the current value. */
290
+ query?: string;
291
+ connection: UpdateRequest_connection;
292
+ };
293
+ export type UpdateResponse = {
294
+ segment: ExternalSegment;
295
+ };
296
+ export type DeleteRequest = {
297
+ /** Application code the segment belongs to. */
298
+ application?: string;
299
+ /** External segment code to delete. */
300
+ code?: string;
301
+ };
302
+ export type DeleteResponse = {};
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ /* Autogenerated code */
3
+ export {};