nucleus-core-ts 0.9.781 → 0.9.783
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/dist/client.js +1 -1
- package/dist/fe/components/IntegrationsPage/components/ConnectionAuthFields.d.ts +2 -0
- package/dist/fe/components/IntegrationsPage/components/ConnectionAuthFields.js +85 -0
- package/dist/fe/components/IntegrationsPage/components/ConnectionBasicFields.d.ts +2 -0
- package/dist/fe/components/IntegrationsPage/components/ConnectionBasicFields.js +165 -0
- package/dist/fe/components/IntegrationsPage/components/ConnectionForm.d.ts +10 -0
- package/dist/fe/components/IntegrationsPage/components/ConnectionForm.js +112 -0
- package/dist/fe/components/IntegrationsPage/components/ConnectionList.d.ts +9 -0
- package/dist/fe/components/IntegrationsPage/components/ConnectionList.js +184 -0
- package/dist/fe/components/IntegrationsPage/components/ConnectionOauthFields.d.ts +2 -0
- package/dist/fe/components/IntegrationsPage/components/ConnectionOauthFields.js +131 -0
- package/dist/fe/components/IntegrationsPage/components/ConnectionSettingsTab.d.ts +21 -0
- package/dist/fe/components/IntegrationsPage/components/ConnectionSettingsTab.js +49 -0
- package/dist/fe/components/IntegrationsPage/components/ConnectionTabs.d.ts +12 -0
- package/dist/fe/components/IntegrationsPage/components/ConnectionTabs.js +95 -0
- package/dist/fe/components/IntegrationsPage/components/ConnectionTest.d.ts +9 -0
- package/dist/fe/components/IntegrationsPage/components/ConnectionTest.js +116 -0
- package/dist/fe/components/IntegrationsPage/components/CredentialFields.d.ts +9 -0
- package/dist/fe/components/IntegrationsPage/components/CredentialFields.js +171 -0
- package/dist/fe/components/IntegrationsPage/components/CredentialSlotRow.d.ts +13 -0
- package/dist/fe/components/IntegrationsPage/components/CredentialSlotRow.js +63 -0
- package/dist/fe/components/IntegrationsPage/components/EndpointForm.d.ts +11 -0
- package/dist/fe/components/IntegrationsPage/components/EndpointForm.js +166 -0
- package/dist/fe/components/IntegrationsPage/components/EndpointFormFields.d.ts +19 -0
- package/dist/fe/components/IntegrationsPage/components/EndpointFormFields.js +162 -0
- package/dist/fe/components/IntegrationsPage/components/EndpointList.d.ts +12 -0
- package/dist/fe/components/IntegrationsPage/components/EndpointList.js +205 -0
- package/dist/fe/components/IntegrationsPage/components/EndpointSample.d.ts +6 -0
- package/dist/fe/components/IntegrationsPage/components/EndpointSample.js +204 -0
- package/dist/fe/components/IntegrationsPage/components/EndpointsTab.d.ts +5 -0
- package/dist/fe/components/IntegrationsPage/components/EndpointsTab.js +101 -0
- package/dist/fe/components/IntegrationsPage/components/FieldMappingRow.d.ts +17 -0
- package/dist/fe/components/IntegrationsPage/components/FieldMappingRow.js +179 -0
- package/dist/fe/components/IntegrationsPage/components/FieldMappingRows.d.ts +11 -0
- package/dist/fe/components/IntegrationsPage/components/FieldMappingRows.js +115 -0
- package/dist/fe/components/IntegrationsPage/components/IntegrationsPage.d.ts +2 -0
- package/dist/fe/components/IntegrationsPage/components/IntegrationsPage.js +175 -0
- package/dist/fe/components/IntegrationsPage/components/MappingEditor.d.ts +15 -0
- package/dist/fe/components/IntegrationsPage/components/MappingEditor.js +193 -0
- package/dist/fe/components/IntegrationsPage/components/MappingList.d.ts +11 -0
- package/dist/fe/components/IntegrationsPage/components/MappingList.js +191 -0
- package/dist/fe/components/IntegrationsPage/components/MappingWriteModeFields.d.ts +19 -0
- package/dist/fe/components/IntegrationsPage/components/MappingWriteModeFields.js +150 -0
- package/dist/fe/components/IntegrationsPage/components/MappingsTab.d.ts +5 -0
- package/dist/fe/components/IntegrationsPage/components/MappingsTab.js +154 -0
- package/dist/fe/components/IntegrationsPage/components/PaginationFields.d.ts +9 -0
- package/dist/fe/components/IntegrationsPage/components/PaginationFields.js +218 -0
- package/dist/fe/components/IntegrationsPage/components/ParamBindingRow.d.ts +24 -0
- package/dist/fe/components/IntegrationsPage/components/ParamBindingRow.js +180 -0
- package/dist/fe/components/IntegrationsPage/components/ParamBindingRows.d.ts +33 -0
- package/dist/fe/components/IntegrationsPage/components/ParamBindingRows.js +100 -0
- package/dist/fe/components/IntegrationsPage/components/Primitives.d.ts +65 -0
- package/dist/fe/components/IntegrationsPage/components/Primitives.js +94 -0
- package/dist/fe/components/IntegrationsPage/components/RunConfirmStep.d.ts +10 -0
- package/dist/fe/components/IntegrationsPage/components/RunConfirmStep.js +48 -0
- package/dist/fe/components/IntegrationsPage/components/RunHistory.d.ts +10 -0
- package/dist/fe/components/IntegrationsPage/components/RunHistory.js +124 -0
- package/dist/fe/components/IntegrationsPage/components/RunHistoryRow.d.ts +7 -0
- package/dist/fe/components/IntegrationsPage/components/RunHistoryRow.js +129 -0
- package/dist/fe/components/IntegrationsPage/components/RunPanel.d.ts +9 -0
- package/dist/fe/components/IntegrationsPage/components/RunPanel.js +160 -0
- package/dist/fe/components/IntegrationsPage/components/RunPlanIssues.d.ts +5 -0
- package/dist/fe/components/IntegrationsPage/components/RunPlanIssues.js +43 -0
- package/dist/fe/components/IntegrationsPage/components/RunPlanSummary.d.ts +5 -0
- package/dist/fe/components/IntegrationsPage/components/RunPlanSummary.js +92 -0
- package/dist/fe/components/IntegrationsPage/components/RunProgressBar.d.ts +8 -0
- package/dist/fe/components/IntegrationsPage/components/RunProgressBar.js +77 -0
- package/dist/fe/components/IntegrationsPage/components/RunRevertConflicts.d.ts +13 -0
- package/dist/fe/components/IntegrationsPage/components/RunRevertConflicts.js +65 -0
- package/dist/fe/components/IntegrationsPage/components/RunsTab.d.ts +13 -0
- package/dist/fe/components/IntegrationsPage/components/RunsTab.js +39 -0
- package/dist/fe/components/IntegrationsPage/components/Skeletons.d.ts +9 -0
- package/dist/fe/components/IntegrationsPage/components/Skeletons.js +139 -0
- package/dist/fe/components/IntegrationsPage/components/authOptions.d.ts +29 -0
- package/dist/fe/components/IntegrationsPage/components/authOptions.js +71 -0
- package/dist/fe/components/IntegrationsPage/components/connectionDraft.d.ts +64 -0
- package/dist/fe/components/IntegrationsPage/components/connectionDraft.js +112 -0
- package/dist/fe/components/IntegrationsPage/components/credentialSlots.d.ts +25 -0
- package/dist/fe/components/IntegrationsPage/components/credentialSlots.js +67 -0
- package/dist/fe/components/IntegrationsPage/components/fieldMappingOptions.d.ts +16 -0
- package/dist/fe/components/IntegrationsPage/components/fieldMappingOptions.js +41 -0
- package/dist/fe/components/IntegrationsPage/components/formSupport.d.ts +19 -0
- package/dist/fe/components/IntegrationsPage/components/formSupport.js +25 -0
- package/dist/fe/components/IntegrationsPage/components/mappingDraft.d.ts +40 -0
- package/dist/fe/components/IntegrationsPage/components/mappingDraft.js +44 -0
- package/dist/fe/components/IntegrationsPage/components/pathParams.d.ts +9 -0
- package/dist/fe/components/IntegrationsPage/components/pathParams.js +15 -0
- package/dist/fe/components/IntegrationsPage/components/runFormat.d.ts +33 -0
- package/dist/fe/components/IntegrationsPage/components/runFormat.js +85 -0
- package/dist/fe/components/IntegrationsPage/components/useInfiniteList.d.ts +40 -0
- package/dist/fe/components/IntegrationsPage/components/useInfiniteList.js +110 -0
- package/dist/fe/components/IntegrationsPage/index.d.ts +18 -0
- package/dist/fe/components/IntegrationsPage/index.js +11 -0
- package/dist/fe/components/IntegrationsPage/store/index.d.ts +2 -0
- package/dist/fe/components/IntegrationsPage/store/index.js +124 -0
- package/dist/fe/components/IntegrationsPage/store/state.d.ts +80 -0
- package/dist/fe/components/IntegrationsPage/store/state.js +32 -0
- package/dist/fe/components/IntegrationsPage/theme/index.d.ts +103 -0
- package/dist/fe/components/IntegrationsPage/theme/index.js +113 -0
- package/dist/fe/components/IntegrationsPage/types/actions.d.ts +91 -0
- package/dist/fe/components/IntegrationsPage/types/actions.js +1 -0
- package/dist/fe/components/IntegrationsPage/types/index.d.ts +3 -0
- package/dist/fe/components/IntegrationsPage/types/index.js +3 -0
- package/dist/fe/components/IntegrationsPage/types/records.d.ts +139 -0
- package/dist/fe/components/IntegrationsPage/types/records.js +11 -0
- package/dist/fe/components/IntegrationsPage/types/results.d.ts +52 -0
- package/dist/fe/components/IntegrationsPage/types/results.js +4 -0
- package/dist/fe/index.d.ts +2 -0
- package/dist/fe/index.js +1 -0
- package/dist/index.js +14 -14
- package/dist/src/Client/ApiCaller/system-tables.d.ts +505 -0
- package/dist/src/Client/Proxy/wsProxy.js +25 -1
- package/dist/src/ElysiaPlugin/routes/backup/types.d.ts +3 -1
- package/dist/src/ElysiaPlugin/routes/integrations/index.d.ts +49 -0
- package/dist/src/ElysiaPlugin/routes/integrations/inspect.d.ts +87 -0
- package/dist/src/ElysiaPlugin/routes/integrations/inspectRoutes.d.ts +41 -0
- package/dist/src/ElysiaPlugin/routes/integrations/repository.d.ts +88 -0
- package/dist/src/ElysiaPlugin/routes/integrations/types.d.ts +22 -0
- package/dist/src/ElysiaPlugin/routes/pubsub/frame.d.ts +37 -0
- package/dist/src/ElysiaPlugin/routes/pubsub/frame.test.d.ts +1 -0
- package/dist/src/Services/Backup/BackupService.d.ts +16 -8
- package/dist/src/Services/Backup/types.d.ts +25 -0
- package/dist/src/Services/Integrations/bindings.d.ts +116 -0
- package/dist/src/Services/Integrations/bindings.test.d.ts +1 -0
- package/dist/src/Services/Integrations/collect.d.ts +68 -0
- package/dist/src/Services/Integrations/collect.test.d.ts +1 -0
- package/dist/src/Services/Integrations/fetcher.d.ts +100 -0
- package/dist/src/Services/Integrations/fetcher.test.d.ts +1 -0
- package/dist/src/Services/Integrations/lock.d.ts +77 -0
- package/dist/src/Services/Integrations/lock.test.d.ts +1 -0
- package/dist/src/Services/Integrations/mapping.d.ts +63 -0
- package/dist/src/Services/Integrations/mapping.test.d.ts +1 -0
- package/dist/src/Services/Integrations/oauth.d.ts +89 -0
- package/dist/src/Services/Integrations/oauth.test.d.ts +1 -0
- package/dist/src/Services/Integrations/pagination.d.ts +97 -0
- package/dist/src/Services/Integrations/pagination.test.d.ts +1 -0
- package/dist/src/Services/Integrations/plan.d.ts +74 -0
- package/dist/src/Services/Integrations/plan.test.d.ts +1 -0
- package/dist/src/Services/Integrations/revert.d.ts +78 -0
- package/dist/src/Services/Integrations/revert.test.d.ts +1 -0
- package/dist/src/Services/Integrations/runner.d.ts +126 -0
- package/dist/src/Services/Integrations/runner.test.d.ts +1 -0
- package/dist/src/Services/Integrations/types.d.ts +208 -0
- package/dist/src/Services/Integrations/writer.d.ts +105 -0
- package/dist/src/Services/Integrations/writer.test.d.ts +1 -0
- package/dist/src/Utils/cron.d.ts +65 -0
- package/dist/src/Utils/cron.test.d.ts +1 -0
- package/dist/src/types.d.ts +67 -1
- package/package.json +1 -1
- package/schemas/config.nucleus.json +43 -0
- package/schemas/table.schema.json +2 -1
- package/scripts/generate-schema.test.ts +78 -0
- package/scripts/generate-schema.ts +43 -5
- package/src/system.tables.json +362 -0
|
@@ -4283,5 +4283,510 @@ export declare const SYSTEM_TABLES: readonly [{
|
|
|
4283
4283
|
}, {
|
|
4284
4284
|
readonly columns: readonly ["scope"];
|
|
4285
4285
|
}];
|
|
4286
|
+
}, {
|
|
4287
|
+
readonly table_name: "integration_sources";
|
|
4288
|
+
readonly feature_set: readonly ["integrations"];
|
|
4289
|
+
readonly add_base_columns: true;
|
|
4290
|
+
readonly is_form_data: false;
|
|
4291
|
+
readonly available_app_ids: readonly ["default_be"];
|
|
4292
|
+
readonly available_schemas: readonly ["*"];
|
|
4293
|
+
readonly excluded_schemas: readonly [];
|
|
4294
|
+
readonly excluded_methods: readonly [];
|
|
4295
|
+
readonly bulk_endpoints_enabled: false;
|
|
4296
|
+
readonly group_name: "Integrations";
|
|
4297
|
+
readonly columns: readonly [{
|
|
4298
|
+
readonly name: "name";
|
|
4299
|
+
readonly type: "varchar";
|
|
4300
|
+
readonly length: 150;
|
|
4301
|
+
readonly notNull: true;
|
|
4302
|
+
}, {
|
|
4303
|
+
readonly name: "slug";
|
|
4304
|
+
readonly type: "varchar";
|
|
4305
|
+
readonly length: 150;
|
|
4306
|
+
readonly notNull: true;
|
|
4307
|
+
readonly comment: "Stable machine name; referenced by exports and by operators in logs";
|
|
4308
|
+
}, {
|
|
4309
|
+
readonly name: "base_url";
|
|
4310
|
+
readonly type: "varchar";
|
|
4311
|
+
readonly length: 500;
|
|
4312
|
+
readonly notNull: true;
|
|
4313
|
+
readonly comment: "Any scheme, host and port — https, plain http, in-cluster DNS, IP. HTTPS is NOT required and must never be enforced: reaching a service inside the same cluster over http is a legitimate deployment.";
|
|
4314
|
+
}, {
|
|
4315
|
+
readonly name: "description";
|
|
4316
|
+
readonly type: "text";
|
|
4317
|
+
}, {
|
|
4318
|
+
readonly name: "enabled";
|
|
4319
|
+
readonly type: "boolean";
|
|
4320
|
+
readonly default: true;
|
|
4321
|
+
}, {
|
|
4322
|
+
readonly name: "auth_type";
|
|
4323
|
+
readonly type: "varchar";
|
|
4324
|
+
readonly length: 20;
|
|
4325
|
+
readonly notNull: true;
|
|
4326
|
+
readonly default: "none";
|
|
4327
|
+
readonly enumValues: readonly ["none", "bearer", "api_key", "basic", "oauth2"];
|
|
4328
|
+
}, {
|
|
4329
|
+
readonly name: "auth_token_encrypted";
|
|
4330
|
+
readonly type: "text";
|
|
4331
|
+
readonly sensitive: true;
|
|
4332
|
+
readonly comment: "Static credential (bearer / api key / basic blob), encrypted at rest";
|
|
4333
|
+
}, {
|
|
4334
|
+
readonly name: "auth_token_hint";
|
|
4335
|
+
readonly type: "varchar";
|
|
4336
|
+
readonly length: 24;
|
|
4337
|
+
}, {
|
|
4338
|
+
readonly name: "auth_header_name";
|
|
4339
|
+
readonly type: "varchar";
|
|
4340
|
+
readonly length: 80;
|
|
4341
|
+
readonly default: "Authorization";
|
|
4342
|
+
}, {
|
|
4343
|
+
readonly name: "auth_query_param";
|
|
4344
|
+
readonly type: "varchar";
|
|
4345
|
+
readonly length: 80;
|
|
4346
|
+
readonly comment: "When set, an api_key credential travels as this query parameter instead of a header";
|
|
4347
|
+
}, {
|
|
4348
|
+
readonly name: "extra_headers";
|
|
4349
|
+
readonly type: "jsonb";
|
|
4350
|
+
readonly default: {};
|
|
4351
|
+
}, {
|
|
4352
|
+
readonly name: "token_url";
|
|
4353
|
+
readonly type: "varchar";
|
|
4354
|
+
readonly length: 500;
|
|
4355
|
+
}, {
|
|
4356
|
+
readonly name: "oauth_grant_type";
|
|
4357
|
+
readonly type: "varchar";
|
|
4358
|
+
readonly length: 40;
|
|
4359
|
+
readonly default: "password";
|
|
4360
|
+
readonly enumValues: readonly ["password", "client_credentials"];
|
|
4361
|
+
}, {
|
|
4362
|
+
readonly name: "oauth_client_id";
|
|
4363
|
+
readonly type: "varchar";
|
|
4364
|
+
readonly length: 200;
|
|
4365
|
+
}, {
|
|
4366
|
+
readonly name: "oauth_client_secret_encrypted";
|
|
4367
|
+
readonly type: "text";
|
|
4368
|
+
readonly sensitive: true;
|
|
4369
|
+
}, {
|
|
4370
|
+
readonly name: "oauth_client_secret_hint";
|
|
4371
|
+
readonly type: "varchar";
|
|
4372
|
+
readonly length: 24;
|
|
4373
|
+
}, {
|
|
4374
|
+
readonly name: "oauth_username";
|
|
4375
|
+
readonly type: "varchar";
|
|
4376
|
+
readonly length: 200;
|
|
4377
|
+
}, {
|
|
4378
|
+
readonly name: "oauth_password_encrypted";
|
|
4379
|
+
readonly type: "text";
|
|
4380
|
+
readonly sensitive: true;
|
|
4381
|
+
}, {
|
|
4382
|
+
readonly name: "oauth_password_hint";
|
|
4383
|
+
readonly type: "varchar";
|
|
4384
|
+
readonly length: 24;
|
|
4385
|
+
}, {
|
|
4386
|
+
readonly name: "oauth_scope";
|
|
4387
|
+
readonly type: "varchar";
|
|
4388
|
+
readonly length: 300;
|
|
4389
|
+
}, {
|
|
4390
|
+
readonly name: "oauth_client_auth";
|
|
4391
|
+
readonly type: "varchar";
|
|
4392
|
+
readonly length: 20;
|
|
4393
|
+
readonly default: "basic";
|
|
4394
|
+
readonly enumValues: readonly ["basic", "body"];
|
|
4395
|
+
}, {
|
|
4396
|
+
readonly name: "tls_verify";
|
|
4397
|
+
readonly type: "boolean";
|
|
4398
|
+
readonly notNull: true;
|
|
4399
|
+
readonly default: true;
|
|
4400
|
+
readonly comment: "Per-source certificate verification. Turning it off applies to THIS source's connections only — never to the process, which is what a NODE_TLS_REJECT_UNAUTHORIZED toggle would do.";
|
|
4401
|
+
}, {
|
|
4402
|
+
readonly name: "timeout_ms";
|
|
4403
|
+
readonly type: "integer";
|
|
4404
|
+
readonly notNull: true;
|
|
4405
|
+
readonly default: 30000;
|
|
4406
|
+
}, {
|
|
4407
|
+
readonly name: "spec_url";
|
|
4408
|
+
readonly type: "varchar";
|
|
4409
|
+
readonly length: 500;
|
|
4410
|
+
readonly comment: "Optional API description document (OpenAPI/Swagger/Postman/Bruno). Discovery is a convenience: every endpoint can always be defined by hand instead.";
|
|
4411
|
+
}, {
|
|
4412
|
+
readonly name: "spec_format";
|
|
4413
|
+
readonly type: "varchar";
|
|
4414
|
+
readonly length: 20;
|
|
4415
|
+
readonly default: "manual";
|
|
4416
|
+
readonly enumValues: readonly ["manual", "openapi", "swagger", "postman", "bruno", "har"];
|
|
4417
|
+
}];
|
|
4418
|
+
readonly constraints: {
|
|
4419
|
+
readonly unique: readonly [{
|
|
4420
|
+
readonly name: "uniq_integration_source_slug";
|
|
4421
|
+
readonly columns: readonly ["slug"];
|
|
4422
|
+
}];
|
|
4423
|
+
};
|
|
4424
|
+
readonly indexes: readonly [{
|
|
4425
|
+
readonly columns: readonly ["enabled"];
|
|
4426
|
+
}];
|
|
4427
|
+
}, {
|
|
4428
|
+
readonly table_name: "integration_endpoints";
|
|
4429
|
+
readonly feature_set: readonly ["integrations"];
|
|
4430
|
+
readonly add_base_columns: true;
|
|
4431
|
+
readonly is_form_data: false;
|
|
4432
|
+
readonly available_app_ids: readonly ["default_be"];
|
|
4433
|
+
readonly available_schemas: readonly ["*"];
|
|
4434
|
+
readonly excluded_schemas: readonly [];
|
|
4435
|
+
readonly excluded_methods: readonly [];
|
|
4436
|
+
readonly bulk_endpoints_enabled: false;
|
|
4437
|
+
readonly group_name: "Integrations";
|
|
4438
|
+
readonly columns: readonly [{
|
|
4439
|
+
readonly name: "source_id";
|
|
4440
|
+
readonly type: "uuid";
|
|
4441
|
+
readonly notNull: true;
|
|
4442
|
+
readonly references: {
|
|
4443
|
+
readonly table: "integrationSources";
|
|
4444
|
+
readonly column: "id";
|
|
4445
|
+
readonly onDelete: "cascade";
|
|
4446
|
+
};
|
|
4447
|
+
}, {
|
|
4448
|
+
readonly name: "tag";
|
|
4449
|
+
readonly type: "varchar";
|
|
4450
|
+
readonly length: 120;
|
|
4451
|
+
readonly notNull: true;
|
|
4452
|
+
}, {
|
|
4453
|
+
readonly name: "name";
|
|
4454
|
+
readonly type: "varchar";
|
|
4455
|
+
readonly length: 200;
|
|
4456
|
+
}, {
|
|
4457
|
+
readonly name: "method";
|
|
4458
|
+
readonly type: "varchar";
|
|
4459
|
+
readonly length: 10;
|
|
4460
|
+
readonly notNull: true;
|
|
4461
|
+
readonly default: "GET";
|
|
4462
|
+
readonly enumValues: readonly ["GET", "POST", "PUT", "PATCH", "DELETE"];
|
|
4463
|
+
}, {
|
|
4464
|
+
readonly name: "path";
|
|
4465
|
+
readonly type: "varchar";
|
|
4466
|
+
readonly length: 500;
|
|
4467
|
+
readonly notNull: true;
|
|
4468
|
+
readonly comment: "Appended to the source base URL. May carry {brace} or :colon path tokens, whose values come from param_bindings.";
|
|
4469
|
+
}, {
|
|
4470
|
+
readonly name: "description";
|
|
4471
|
+
readonly type: "text";
|
|
4472
|
+
}, {
|
|
4473
|
+
readonly name: "query_params";
|
|
4474
|
+
readonly type: "jsonb";
|
|
4475
|
+
readonly default: {};
|
|
4476
|
+
}, {
|
|
4477
|
+
readonly name: "request_body";
|
|
4478
|
+
readonly type: "jsonb";
|
|
4479
|
+
readonly default: {};
|
|
4480
|
+
}, {
|
|
4481
|
+
readonly name: "param_bindings";
|
|
4482
|
+
readonly type: "jsonb";
|
|
4483
|
+
readonly default: readonly [];
|
|
4484
|
+
readonly comment: "Where each path/query parameter comes from: a static value, another endpoint's records (fan-out), or a column of one of our own tables.";
|
|
4485
|
+
}, {
|
|
4486
|
+
readonly name: "pagination";
|
|
4487
|
+
readonly type: "jsonb";
|
|
4488
|
+
readonly default: {};
|
|
4489
|
+
readonly comment: "Explicitly chosen paging profile (none/page_number/offset/cursor/link_header). Never guessed — a wrong guess silently imports one page.";
|
|
4490
|
+
}, {
|
|
4491
|
+
readonly name: "response_root_path";
|
|
4492
|
+
readonly type: "varchar";
|
|
4493
|
+
readonly length: 200;
|
|
4494
|
+
}, {
|
|
4495
|
+
readonly name: "sample_response";
|
|
4496
|
+
readonly type: "jsonb";
|
|
4497
|
+
readonly default: {};
|
|
4498
|
+
readonly comment: "A few real records captured by a live test, so the mapping screen still shows fields when the source is unreachable";
|
|
4499
|
+
}, {
|
|
4500
|
+
readonly name: "enabled";
|
|
4501
|
+
readonly type: "boolean";
|
|
4502
|
+
readonly default: true;
|
|
4503
|
+
}];
|
|
4504
|
+
readonly indexes: readonly [{
|
|
4505
|
+
readonly columns: readonly ["source_id"];
|
|
4506
|
+
}, {
|
|
4507
|
+
readonly columns: readonly ["source_id", "tag"];
|
|
4508
|
+
}];
|
|
4509
|
+
}, {
|
|
4510
|
+
readonly table_name: "integration_mappings";
|
|
4511
|
+
readonly feature_set: readonly ["integrations"];
|
|
4512
|
+
readonly add_base_columns: true;
|
|
4513
|
+
readonly is_form_data: false;
|
|
4514
|
+
readonly available_app_ids: readonly ["default_be"];
|
|
4515
|
+
readonly available_schemas: readonly ["*"];
|
|
4516
|
+
readonly excluded_schemas: readonly [];
|
|
4517
|
+
readonly excluded_methods: readonly [];
|
|
4518
|
+
readonly bulk_endpoints_enabled: false;
|
|
4519
|
+
readonly group_name: "Integrations";
|
|
4520
|
+
readonly columns: readonly [{
|
|
4521
|
+
readonly name: "endpoint_id";
|
|
4522
|
+
readonly type: "uuid";
|
|
4523
|
+
readonly notNull: true;
|
|
4524
|
+
readonly references: {
|
|
4525
|
+
readonly table: "integrationEndpoints";
|
|
4526
|
+
readonly column: "id";
|
|
4527
|
+
readonly onDelete: "cascade";
|
|
4528
|
+
};
|
|
4529
|
+
}, {
|
|
4530
|
+
readonly name: "name";
|
|
4531
|
+
readonly type: "varchar";
|
|
4532
|
+
readonly length: 200;
|
|
4533
|
+
readonly notNull: true;
|
|
4534
|
+
}, {
|
|
4535
|
+
readonly name: "target_entity";
|
|
4536
|
+
readonly type: "varchar";
|
|
4537
|
+
readonly length: 120;
|
|
4538
|
+
readonly notNull: true;
|
|
4539
|
+
readonly comment: "snake_case table name this mapping writes into";
|
|
4540
|
+
}, {
|
|
4541
|
+
readonly name: "field_mappings";
|
|
4542
|
+
readonly type: "jsonb";
|
|
4543
|
+
readonly notNull: true;
|
|
4544
|
+
readonly default: readonly [];
|
|
4545
|
+
}, {
|
|
4546
|
+
readonly name: "dedup_source_field";
|
|
4547
|
+
readonly type: "varchar";
|
|
4548
|
+
readonly length: 200;
|
|
4549
|
+
}, {
|
|
4550
|
+
readonly name: "dedup_target_field";
|
|
4551
|
+
readonly type: "varchar";
|
|
4552
|
+
readonly length: 200;
|
|
4553
|
+
readonly comment: "Target column that identifies the same record across runs. Without it nothing can be matched and every run appends.";
|
|
4554
|
+
}, {
|
|
4555
|
+
readonly name: "write_mode";
|
|
4556
|
+
readonly type: "varchar";
|
|
4557
|
+
readonly length: 20;
|
|
4558
|
+
readonly notNull: true;
|
|
4559
|
+
readonly default: "upsert";
|
|
4560
|
+
readonly enumValues: readonly ["upsert", "append", "replace"];
|
|
4561
|
+
readonly comment: "replace is the destructive wipe-and-rewrite; it is no longer the default and is gated by the completeness check.";
|
|
4562
|
+
}, {
|
|
4563
|
+
readonly name: "missing_record_policy";
|
|
4564
|
+
readonly type: "varchar";
|
|
4565
|
+
readonly length: 20;
|
|
4566
|
+
readonly notNull: true;
|
|
4567
|
+
readonly default: "ignore";
|
|
4568
|
+
readonly enumValues: readonly ["ignore", "deactivate", "delete"];
|
|
4569
|
+
readonly comment: "What happens to a row that exists here but no longer in the source. deactivate is the right answer for most HR data and could not be expressed before.";
|
|
4570
|
+
}, {
|
|
4571
|
+
readonly name: "missing_record_column";
|
|
4572
|
+
readonly type: "varchar";
|
|
4573
|
+
readonly length: 120;
|
|
4574
|
+
}, {
|
|
4575
|
+
readonly name: "missing_record_value";
|
|
4576
|
+
readonly type: "varchar";
|
|
4577
|
+
readonly length: 200;
|
|
4578
|
+
}, {
|
|
4579
|
+
readonly name: "schedule_cron";
|
|
4580
|
+
readonly type: "varchar";
|
|
4581
|
+
readonly length: 120;
|
|
4582
|
+
}, {
|
|
4583
|
+
readonly name: "schedule_timezone";
|
|
4584
|
+
readonly type: "varchar";
|
|
4585
|
+
readonly length: 64;
|
|
4586
|
+
readonly comment: "IANA zone the cron expression is read in. Without it a nightly job drifts with the container's clock.";
|
|
4587
|
+
}, {
|
|
4588
|
+
readonly name: "schedule_enabled";
|
|
4589
|
+
readonly type: "boolean";
|
|
4590
|
+
readonly notNull: true;
|
|
4591
|
+
readonly default: false;
|
|
4592
|
+
}, {
|
|
4593
|
+
readonly name: "last_run_at";
|
|
4594
|
+
readonly type: "timestamptz";
|
|
4595
|
+
}, {
|
|
4596
|
+
readonly name: "enabled";
|
|
4597
|
+
readonly type: "boolean";
|
|
4598
|
+
readonly default: true;
|
|
4599
|
+
}];
|
|
4600
|
+
readonly indexes: readonly [{
|
|
4601
|
+
readonly columns: readonly ["endpoint_id"];
|
|
4602
|
+
}, {
|
|
4603
|
+
readonly columns: readonly ["target_entity"];
|
|
4604
|
+
}, {
|
|
4605
|
+
readonly columns: readonly ["schedule_enabled"];
|
|
4606
|
+
}];
|
|
4607
|
+
}, {
|
|
4608
|
+
readonly table_name: "integration_runs";
|
|
4609
|
+
readonly feature_set: readonly ["integrations"];
|
|
4610
|
+
readonly add_base_columns: true;
|
|
4611
|
+
readonly is_form_data: false;
|
|
4612
|
+
readonly available_app_ids: readonly ["default_be"];
|
|
4613
|
+
readonly available_schemas: readonly ["*"];
|
|
4614
|
+
readonly excluded_schemas: readonly [];
|
|
4615
|
+
readonly excluded_methods: readonly ["POST", "PUT", "PATCH", "DELETE"];
|
|
4616
|
+
readonly bulk_endpoints_enabled: false;
|
|
4617
|
+
readonly group_name: "Integrations";
|
|
4618
|
+
readonly columns: readonly [{
|
|
4619
|
+
readonly name: "mapping_id";
|
|
4620
|
+
readonly type: "uuid";
|
|
4621
|
+
readonly references: {
|
|
4622
|
+
readonly table: "integrationMappings";
|
|
4623
|
+
readonly column: "id";
|
|
4624
|
+
readonly onDelete: "set null";
|
|
4625
|
+
};
|
|
4626
|
+
readonly comment: "Nullable and NOT cascaded: deleting a mapping must not erase the record that it once rewrote a table.";
|
|
4627
|
+
}, {
|
|
4628
|
+
readonly name: "target_entity";
|
|
4629
|
+
readonly type: "varchar";
|
|
4630
|
+
readonly length: 120;
|
|
4631
|
+
}, {
|
|
4632
|
+
readonly name: "write_mode";
|
|
4633
|
+
readonly type: "varchar";
|
|
4634
|
+
readonly length: 20;
|
|
4635
|
+
readonly enumValues: readonly ["upsert", "append", "replace"];
|
|
4636
|
+
}, {
|
|
4637
|
+
readonly name: "status";
|
|
4638
|
+
readonly type: "varchar";
|
|
4639
|
+
readonly length: 20;
|
|
4640
|
+
readonly notNull: true;
|
|
4641
|
+
readonly default: "queued";
|
|
4642
|
+
readonly enumValues: readonly ["queued", "running", "succeeded", "failed", "cancelled", "reverted"];
|
|
4643
|
+
readonly comment: "There is deliberately no 'partial': a run either applied in full or not at all.";
|
|
4644
|
+
}, {
|
|
4645
|
+
readonly name: "trigger";
|
|
4646
|
+
readonly type: "varchar";
|
|
4647
|
+
readonly length: 20;
|
|
4648
|
+
readonly notNull: true;
|
|
4649
|
+
readonly default: "manual";
|
|
4650
|
+
readonly enumValues: readonly ["manual", "schedule", "api"];
|
|
4651
|
+
}, {
|
|
4652
|
+
readonly name: "total_fetched";
|
|
4653
|
+
readonly type: "integer";
|
|
4654
|
+
readonly notNull: true;
|
|
4655
|
+
readonly default: 0;
|
|
4656
|
+
}, {
|
|
4657
|
+
readonly name: "source_reported_total";
|
|
4658
|
+
readonly type: "integer";
|
|
4659
|
+
readonly comment: "What the source said it had. When this and total_fetched disagree, a destructive run refuses to start.";
|
|
4660
|
+
}, {
|
|
4661
|
+
readonly name: "created_count";
|
|
4662
|
+
readonly type: "integer";
|
|
4663
|
+
readonly notNull: true;
|
|
4664
|
+
readonly default: 0;
|
|
4665
|
+
}, {
|
|
4666
|
+
readonly name: "updated_count";
|
|
4667
|
+
readonly type: "integer";
|
|
4668
|
+
readonly notNull: true;
|
|
4669
|
+
readonly default: 0;
|
|
4670
|
+
}, {
|
|
4671
|
+
readonly name: "skipped_count";
|
|
4672
|
+
readonly type: "integer";
|
|
4673
|
+
readonly notNull: true;
|
|
4674
|
+
readonly default: 0;
|
|
4675
|
+
}, {
|
|
4676
|
+
readonly name: "deleted_count";
|
|
4677
|
+
readonly type: "integer";
|
|
4678
|
+
readonly notNull: true;
|
|
4679
|
+
readonly default: 0;
|
|
4680
|
+
}, {
|
|
4681
|
+
readonly name: "deactivated_count";
|
|
4682
|
+
readonly type: "integer";
|
|
4683
|
+
readonly notNull: true;
|
|
4684
|
+
readonly default: 0;
|
|
4685
|
+
}, {
|
|
4686
|
+
readonly name: "error_count";
|
|
4687
|
+
readonly type: "integer";
|
|
4688
|
+
readonly notNull: true;
|
|
4689
|
+
readonly default: 0;
|
|
4690
|
+
}, {
|
|
4691
|
+
readonly name: "external_call_count";
|
|
4692
|
+
readonly type: "integer";
|
|
4693
|
+
readonly notNull: true;
|
|
4694
|
+
readonly default: 0;
|
|
4695
|
+
}, {
|
|
4696
|
+
readonly name: "issues";
|
|
4697
|
+
readonly type: "jsonb";
|
|
4698
|
+
readonly default: readonly [];
|
|
4699
|
+
}, {
|
|
4700
|
+
readonly name: "errors";
|
|
4701
|
+
readonly type: "jsonb";
|
|
4702
|
+
readonly default: readonly [];
|
|
4703
|
+
}, {
|
|
4704
|
+
readonly name: "cancel_requested";
|
|
4705
|
+
readonly type: "boolean";
|
|
4706
|
+
readonly notNull: true;
|
|
4707
|
+
readonly default: false;
|
|
4708
|
+
readonly comment: "Set by the cancel endpoint; the engine checks it at every batch boundary. A dropped HTTP connection is NOT a cancellation.";
|
|
4709
|
+
}, {
|
|
4710
|
+
readonly name: "started_at";
|
|
4711
|
+
readonly type: "timestamptz";
|
|
4712
|
+
}, {
|
|
4713
|
+
readonly name: "finished_at";
|
|
4714
|
+
readonly type: "timestamptz";
|
|
4715
|
+
}, {
|
|
4716
|
+
readonly name: "pre_images_expire_at";
|
|
4717
|
+
readonly type: "timestamptz";
|
|
4718
|
+
readonly comment: "After this, the run can no longer be reverted and the UI says so rather than offering a button that quietly does nothing.";
|
|
4719
|
+
}, {
|
|
4720
|
+
readonly name: "reverted_at";
|
|
4721
|
+
readonly type: "timestamptz";
|
|
4722
|
+
}, {
|
|
4723
|
+
readonly name: "reverted_by";
|
|
4724
|
+
readonly type: "uuid";
|
|
4725
|
+
readonly references: {
|
|
4726
|
+
readonly table: "users";
|
|
4727
|
+
readonly column: "id";
|
|
4728
|
+
};
|
|
4729
|
+
}, {
|
|
4730
|
+
readonly name: "reverted_run_id";
|
|
4731
|
+
readonly type: "uuid";
|
|
4732
|
+
}];
|
|
4733
|
+
readonly indexes: readonly [{
|
|
4734
|
+
readonly columns: readonly ["mapping_id"];
|
|
4735
|
+
}, {
|
|
4736
|
+
readonly columns: readonly ["status"];
|
|
4737
|
+
}, {
|
|
4738
|
+
readonly columns: readonly ["target_entity"];
|
|
4739
|
+
}, {
|
|
4740
|
+
readonly columns: readonly ["created_at"];
|
|
4741
|
+
}];
|
|
4742
|
+
}, {
|
|
4743
|
+
readonly table_name: "integration_run_items";
|
|
4744
|
+
readonly feature_set: readonly ["integrations"];
|
|
4745
|
+
readonly add_base_columns: true;
|
|
4746
|
+
readonly is_form_data: false;
|
|
4747
|
+
readonly available_app_ids: readonly ["default_be"];
|
|
4748
|
+
readonly available_schemas: readonly ["*"];
|
|
4749
|
+
readonly excluded_schemas: readonly [];
|
|
4750
|
+
readonly excluded_methods: readonly ["POST", "PUT", "PATCH", "DELETE"];
|
|
4751
|
+
readonly bulk_endpoints_enabled: false;
|
|
4752
|
+
readonly group_name: "Integrations";
|
|
4753
|
+
readonly columns: readonly [{
|
|
4754
|
+
readonly name: "run_id";
|
|
4755
|
+
readonly type: "uuid";
|
|
4756
|
+
readonly notNull: true;
|
|
4757
|
+
readonly references: {
|
|
4758
|
+
readonly table: "integrationRuns";
|
|
4759
|
+
readonly column: "id";
|
|
4760
|
+
readonly onDelete: "cascade";
|
|
4761
|
+
};
|
|
4762
|
+
}, {
|
|
4763
|
+
readonly name: "target_entity";
|
|
4764
|
+
readonly type: "varchar";
|
|
4765
|
+
readonly length: 120;
|
|
4766
|
+
readonly notNull: true;
|
|
4767
|
+
}, {
|
|
4768
|
+
readonly name: "row_id";
|
|
4769
|
+
readonly type: "uuid";
|
|
4770
|
+
}, {
|
|
4771
|
+
readonly name: "action";
|
|
4772
|
+
readonly type: "varchar";
|
|
4773
|
+
readonly length: 20;
|
|
4774
|
+
readonly notNull: true;
|
|
4775
|
+
readonly enumValues: readonly ["create", "update", "delete", "deactivate"];
|
|
4776
|
+
}, {
|
|
4777
|
+
readonly name: "before";
|
|
4778
|
+
readonly type: "jsonb";
|
|
4779
|
+
readonly comment: "The row as it stood before this run touched it. This is what makes a successful run reversible; the bulk delete path already produced these rows and threw them away.";
|
|
4780
|
+
}, {
|
|
4781
|
+
readonly name: "after";
|
|
4782
|
+
readonly type: "jsonb";
|
|
4783
|
+
}];
|
|
4784
|
+
readonly indexes: readonly [{
|
|
4785
|
+
readonly columns: readonly ["run_id"];
|
|
4786
|
+
}, {
|
|
4787
|
+
readonly columns: readonly ["run_id", "action"];
|
|
4788
|
+
}, {
|
|
4789
|
+
readonly columns: readonly ["target_entity", "row_id"];
|
|
4790
|
+
}];
|
|
4286
4791
|
}];
|
|
4287
4792
|
export type SystemTables = typeof SYSTEM_TABLES;
|
|
@@ -16,6 +16,30 @@ import { addQueryParam, createProxyLogger, httpToWs, matchPath, parseCookies, re
|
|
|
16
16
|
return true;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Keeps the proxy→backend socket alive with a PROTOCOL ping, not a data frame.
|
|
21
|
+
*
|
|
22
|
+
* This used to send `''`. An empty text frame is still application data, so it
|
|
23
|
+
* arrived at the backend's `message` handler, where `JSON.parse('')` throws —
|
|
24
|
+
* and nucleus' own PubSub route logged "Failed to parse client message" once per
|
|
25
|
+
* interval per connected client. On a busy IDP that is the entire debug log, and
|
|
26
|
+
* it names the proxy's own heartbeat as a misbehaving client.
|
|
27
|
+
*
|
|
28
|
+
* `ping()` is a control frame: it never reaches `message`, the peer answers with
|
|
29
|
+
* pong automatically, and it resets the idle timer the same way. Bun's WebSocket
|
|
30
|
+
* client implements it; the JSON heartbeat is the fallback for a runtime that
|
|
31
|
+
* does not, because `{"type":"ping"}` is a frame the PubSub route understands and
|
|
32
|
+
* replies to, rather than one it can only fail to parse.
|
|
33
|
+
*/ function pingBackend(backendWs) {
|
|
34
|
+
const withPing = backendWs;
|
|
35
|
+
if (typeof withPing.ping === 'function') {
|
|
36
|
+
withPing.ping();
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
backendWs.send(JSON.stringify({
|
|
40
|
+
type: 'ping'
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
19
43
|
export function createWsProxyHandler(config) {
|
|
20
44
|
const logger = createProxyLogger('WS Proxy', config.debug ?? false);
|
|
21
45
|
const pingIntervalMs = config.pingIntervalMs ?? 0;
|
|
@@ -189,7 +213,7 @@ export function createWsProxyHandler(config) {
|
|
|
189
213
|
state.pingTimer = setInterval(()=>{
|
|
190
214
|
try {
|
|
191
215
|
if (ws.readyState <= 1) ws.ping();
|
|
192
|
-
if (backendWs.readyState === WebSocket.OPEN) backendWs
|
|
216
|
+
if (backendWs.readyState === WebSocket.OPEN) pingBackend(backendWs);
|
|
193
217
|
} catch {
|
|
194
218
|
/* connection already closing */ }
|
|
195
219
|
}, pingIntervalMs);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NodePgDatabase } from 'drizzle-orm/node-postgres';
|
|
2
|
-
import type { BackupConfig } from 'src/Services/Backup';
|
|
2
|
+
import type { BackupConfig, BackupServiceConfig } from 'src/Services/Backup';
|
|
3
3
|
import type { Logger } from 'src/Services/Logger';
|
|
4
4
|
import type { TenantRegistry } from 'src/Services/Tenant';
|
|
5
5
|
export type BackupRouteConfig = {
|
|
@@ -9,4 +9,6 @@ export type BackupRouteConfig = {
|
|
|
9
9
|
schemaTables: Record<string, unknown>;
|
|
10
10
|
schemaName: string;
|
|
11
11
|
tenantRegistry?: TenantRegistry | null;
|
|
12
|
+
/** Cross-replica scheduler lock — see BackupServiceConfig['lock']. */
|
|
13
|
+
lock?: BackupServiceConfig['lock'];
|
|
12
14
|
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The endpoints an operator's panel drives.
|
|
3
|
+
*
|
|
4
|
+
* Only the ACTIONS live here. Listing sources, endpoints, mappings and runs is
|
|
5
|
+
* the generic entity API's job — which already pages, filters, searches and
|
|
6
|
+
* sorts on the server — so this file adds nothing that would duplicate it worse.
|
|
7
|
+
*
|
|
8
|
+
* ## A run is a job, not a request
|
|
9
|
+
*
|
|
10
|
+
* `POST /runs` answers 202 with an identifier and gets on with it. A chained
|
|
11
|
+
* import legitimately takes minutes, and the alternative — holding the HTTP
|
|
12
|
+
* request open — means the browser, the ingress and the server each get their
|
|
13
|
+
* own opinion about when to give up, none of which stops the work. That is how
|
|
14
|
+
* the engine this replaces could show "failed" on screen while still deleting
|
|
15
|
+
* rows, with the retry button already enabled.
|
|
16
|
+
*/
|
|
17
|
+
import Elysia from 'elysia';
|
|
18
|
+
import type { IntegrationsRouteConfig } from './types';
|
|
19
|
+
export type { IntegrationsRouteConfig } from './types';
|
|
20
|
+
export declare function createIntegrationRoutes(routeConfig: IntegrationsRouteConfig): Elysia<string, {
|
|
21
|
+
decorator: {};
|
|
22
|
+
store: {};
|
|
23
|
+
derive: {};
|
|
24
|
+
resolve: {};
|
|
25
|
+
}, {
|
|
26
|
+
typebox: {};
|
|
27
|
+
error: {};
|
|
28
|
+
}, {
|
|
29
|
+
schema: {};
|
|
30
|
+
standaloneSchema: {};
|
|
31
|
+
macro: {};
|
|
32
|
+
macroFn: {};
|
|
33
|
+
parser: {};
|
|
34
|
+
response: {};
|
|
35
|
+
}, {}, {
|
|
36
|
+
derive: {};
|
|
37
|
+
resolve: {};
|
|
38
|
+
schema: {};
|
|
39
|
+
standaloneSchema: {};
|
|
40
|
+
response: {};
|
|
41
|
+
}, {
|
|
42
|
+
derive: {};
|
|
43
|
+
resolve: {};
|
|
44
|
+
schema: {};
|
|
45
|
+
standaloneSchema: {};
|
|
46
|
+
response: {};
|
|
47
|
+
}>;
|
|
48
|
+
/** `30d`, `12h`, `45m` → milliseconds. Undefined for an unparseable value. */
|
|
49
|
+
export declare function parseDuration(value: string | undefined): number | undefined;
|