@ductape/sdk 0.0.4-v5 → 0.0.4-v51
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/README.md +1 -1
- package/dist/api/services/appApi.service.d.ts +48 -2
- package/dist/api/services/appApi.service.js +101 -2
- package/dist/api/services/appApi.service.js.map +1 -1
- package/dist/api/services/pricingApi.service.d.ts +10 -0
- package/dist/api/services/pricingApi.service.js +34 -0
- package/dist/api/services/pricingApi.service.js.map +1 -0
- package/dist/api/services/processorApi.service.d.ts +12 -2
- package/dist/api/services/processorApi.service.js +12 -2
- package/dist/api/services/processorApi.service.js.map +1 -1
- package/dist/api/services/productsApi.service.d.ts +40 -1
- package/dist/api/services/productsApi.service.js +105 -1
- package/dist/api/services/productsApi.service.js.map +1 -1
- package/dist/api/services/userApi.service.js +1 -0
- package/dist/api/services/userApi.service.js.map +1 -1
- package/dist/api/services/workspaceApi.service.js +1 -0
- package/dist/api/services/workspaceApi.service.js.map +1 -1
- package/dist/api/services/workspaceSecretsApi.service.d.ts +75 -0
- package/dist/api/services/workspaceSecretsApi.service.js +62 -0
- package/dist/api/services/workspaceSecretsApi.service.js.map +1 -0
- package/dist/api/urls.d.ts +6 -1
- package/dist/api/urls.js +12 -2
- package/dist/api/urls.js.map +1 -1
- package/dist/api/utils/cache.utils.d.ts +1 -1
- package/dist/api/utils/cache.utils.js +10 -4
- package/dist/api/utils/cache.utils.js.map +1 -1
- package/dist/api/utils/strings.utils.d.ts +2 -0
- package/dist/api/utils/strings.utils.js +14 -0
- package/dist/api/utils/strings.utils.js.map +1 -1
- package/dist/apps/services/app.service.d.ts +51 -33
- package/dist/apps/services/app.service.js +488 -244
- package/dist/apps/services/app.service.js.map +1 -1
- package/dist/apps/validators/joi-validators/create.appAction.validator.d.ts +1 -2
- package/dist/apps/validators/joi-validators/create.appAction.validator.js +21 -2
- package/dist/apps/validators/joi-validators/create.appAction.validator.js.map +1 -1
- package/dist/apps/validators/joi-validators/create.appWebhook.validator.d.ts +1 -2
- package/dist/apps/validators/joi-validators/create.appWebhook.validator.js +2 -15
- package/dist/apps/validators/joi-validators/create.appWebhook.validator.js.map +1 -1
- package/dist/apps/validators/joi-validators/update.appAction.validator.js +11 -1
- package/dist/apps/validators/joi-validators/update.appAction.validator.js.map +1 -1
- package/dist/apps/validators/joi-validators/update.appActionResponse.validator.d.ts +1 -1
- package/dist/apps/validators/joi-validators/update.appActionResponse.validator.js +34 -1
- package/dist/apps/validators/joi-validators/update.appActionResponse.validator.js.map +1 -1
- package/dist/apps/validators/joi-validators/update.appWebhook.validator.d.ts +1 -2
- package/dist/apps/validators/joi-validators/update.appWebhook.validator.js +2 -14
- package/dist/apps/validators/joi-validators/update.appWebhook.validator.js.map +1 -1
- package/dist/clients/pricing.client.d.ts +3 -0
- package/dist/clients/pricing.client.js +33 -0
- package/dist/clients/pricing.client.js.map +1 -0
- package/dist/database/adapters/base.adapter.d.ts +176 -0
- package/dist/database/adapters/base.adapter.js +31 -0
- package/dist/database/adapters/base.adapter.js.map +1 -0
- package/dist/database/adapters/dynamodb.adapter.d.ts +91 -0
- package/dist/database/adapters/dynamodb.adapter.js +1608 -0
- package/dist/database/adapters/dynamodb.adapter.js.map +1 -0
- package/dist/database/adapters/mongodb.adapter.d.ts +71 -0
- package/dist/database/adapters/mongodb.adapter.js +1072 -0
- package/dist/database/adapters/mongodb.adapter.js.map +1 -0
- package/dist/database/adapters/mysql.adapter.d.ts +146 -0
- package/dist/database/adapters/mysql.adapter.js +1492 -0
- package/dist/database/adapters/mysql.adapter.js.map +1 -0
- package/dist/database/adapters/postgresql.adapter.d.ts +147 -0
- package/dist/database/adapters/postgresql.adapter.js +1603 -0
- package/dist/database/adapters/postgresql.adapter.js.map +1 -0
- package/dist/database/database.service.d.ts +232 -0
- package/dist/database/database.service.js +802 -0
- package/dist/database/database.service.js.map +1 -0
- package/dist/database/index.d.ts +18 -0
- package/dist/database/index.js +98 -0
- package/dist/database/index.js.map +1 -0
- package/dist/database/types/aggregation.types.d.ts +261 -0
- package/dist/database/types/aggregation.types.js +21 -0
- package/dist/database/types/aggregation.types.js.map +1 -0
- package/dist/database/types/connection.types.d.ts +132 -0
- package/dist/database/types/connection.types.js +6 -0
- package/dist/database/types/connection.types.js.map +1 -0
- package/dist/database/types/database.types.d.ts +175 -0
- package/dist/database/types/database.types.js +75 -0
- package/dist/database/types/database.types.js.map +1 -0
- package/dist/database/types/index.d.ts +12 -0
- package/dist/database/types/index.js +37 -0
- package/dist/database/types/index.js.map +1 -0
- package/dist/database/types/index.types.d.ts +220 -0
- package/dist/database/types/index.types.js +27 -0
- package/dist/database/types/index.types.js.map +1 -0
- package/dist/database/types/migration.types.d.ts +205 -0
- package/dist/database/types/migration.types.js +44 -0
- package/dist/database/types/migration.types.js.map +1 -0
- package/dist/database/types/query.types.d.ts +305 -0
- package/dist/database/types/query.types.js +57 -0
- package/dist/database/types/query.types.js.map +1 -0
- package/dist/database/types/result.types.d.ts +220 -0
- package/dist/database/types/result.types.js +6 -0
- package/dist/database/types/result.types.js.map +1 -0
- package/dist/database/types/schema.types.d.ts +190 -0
- package/dist/database/types/schema.types.js +69 -0
- package/dist/database/types/schema.types.js.map +1 -0
- package/dist/database/utils/helpers.d.ts +66 -0
- package/dist/database/utils/helpers.js +501 -0
- package/dist/database/utils/helpers.js.map +1 -0
- package/dist/database/utils/migration.utils.d.ts +151 -0
- package/dist/database/utils/migration.utils.js +476 -0
- package/dist/database/utils/migration.utils.js.map +1 -0
- package/dist/database/utils/transaction.d.ts +64 -0
- package/dist/database/utils/transaction.js +130 -0
- package/dist/database/utils/transaction.js.map +1 -0
- package/dist/database/validators/connection.validator.d.ts +20 -0
- package/dist/database/validators/connection.validator.js +267 -0
- package/dist/database/validators/connection.validator.js.map +1 -0
- package/dist/database/validators/query.validator.d.ts +31 -0
- package/dist/database/validators/query.validator.js +305 -0
- package/dist/database/validators/query.validator.js.map +1 -0
- package/dist/database/validators/schema.validator.d.ts +31 -0
- package/dist/database/validators/schema.validator.js +334 -0
- package/dist/database/validators/schema.validator.js.map +1 -0
- package/dist/graph/adapters/arangodb.adapter.d.ts +80 -0
- package/dist/graph/adapters/arangodb.adapter.js +1393 -0
- package/dist/graph/adapters/arangodb.adapter.js.map +1 -0
- package/dist/graph/adapters/base.adapter.d.ts +228 -0
- package/dist/graph/adapters/base.adapter.js +38 -0
- package/dist/graph/adapters/base.adapter.js.map +1 -0
- package/dist/graph/adapters/index.d.ts +10 -0
- package/dist/graph/adapters/index.js +23 -0
- package/dist/graph/adapters/index.js.map +1 -0
- package/dist/graph/adapters/memgraph.adapter.d.ts +85 -0
- package/dist/graph/adapters/memgraph.adapter.js +1491 -0
- package/dist/graph/adapters/memgraph.adapter.js.map +1 -0
- package/dist/graph/adapters/neo4j.adapter.d.ts +88 -0
- package/dist/graph/adapters/neo4j.adapter.js +1861 -0
- package/dist/graph/adapters/neo4j.adapter.js.map +1 -0
- package/dist/graph/adapters/neptune.adapter.d.ts +87 -0
- package/dist/graph/adapters/neptune.adapter.js +1430 -0
- package/dist/graph/adapters/neptune.adapter.js.map +1 -0
- package/dist/graph/graph.service.d.ts +278 -0
- package/dist/graph/graph.service.js +687 -0
- package/dist/graph/graph.service.js.map +1 -0
- package/dist/graph/index.d.ts +11 -0
- package/dist/graph/index.js +42 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/types/connection.types.d.ts +158 -0
- package/dist/graph/types/connection.types.js +43 -0
- package/dist/graph/types/connection.types.js.map +1 -0
- package/dist/graph/types/graph.types.d.ts +144 -0
- package/dist/graph/types/graph.types.js +84 -0
- package/dist/graph/types/graph.types.js.map +1 -0
- package/dist/graph/types/index.d.ts +11 -0
- package/dist/graph/types/index.js +35 -0
- package/dist/graph/types/index.js.map +1 -0
- package/dist/graph/types/node.types.d.ts +193 -0
- package/dist/graph/types/node.types.js +49 -0
- package/dist/graph/types/node.types.js.map +1 -0
- package/dist/graph/types/path.types.d.ts +224 -0
- package/dist/graph/types/path.types.js +38 -0
- package/dist/graph/types/path.types.js.map +1 -0
- package/dist/graph/types/query.types.d.ts +247 -0
- package/dist/graph/types/query.types.js +23 -0
- package/dist/graph/types/query.types.js.map +1 -0
- package/dist/graph/types/relationship.types.d.ts +224 -0
- package/dist/graph/types/relationship.types.js +35 -0
- package/dist/graph/types/relationship.types.js.map +1 -0
- package/dist/graph/types/result.types.d.ts +237 -0
- package/dist/graph/types/result.types.js +7 -0
- package/dist/graph/types/result.types.js.map +1 -0
- package/dist/graph/validators/index.d.ts +81 -0
- package/dist/graph/validators/index.js +243 -0
- package/dist/graph/validators/index.js.map +1 -0
- package/dist/imports/imports.service.d.ts +3 -3
- package/dist/imports/imports.service.js +7 -7
- package/dist/imports/imports.service.js.map +1 -1
- package/dist/imports/imports.types.d.ts +8 -0
- package/dist/imports/repos/postmanV21.repo.d.ts +1 -1
- package/dist/imports/repos/postmanV21.repo.js +29 -2
- package/dist/imports/repos/postmanV21.repo.js.map +1 -1
- package/dist/index.d.ts +1244 -150
- package/dist/index.js +1309 -209
- package/dist/index.js.map +1 -1
- package/dist/inputs/inputs.service.js +2 -2
- package/dist/inputs/inputs.service.js.map +1 -1
- package/dist/inputs/utils/inputs.utils.create.js +1 -1
- package/dist/inputs/utils/inputs.utils.create.js.map +1 -1
- package/dist/logs/logs.types.d.ts +5 -0
- package/dist/logs/logs.types.js +1 -0
- package/dist/logs/logs.types.js.map +1 -1
- package/dist/parsers/index.d.ts +3 -0
- package/dist/parsers/index.js +27 -0
- package/dist/parsers/index.js.map +1 -0
- package/dist/parsers/pipelines/postman.pipelines.d.ts +15 -0
- package/dist/parsers/pipelines/postman.pipelines.js +103 -0
- package/dist/parsers/pipelines/postman.pipelines.js.map +1 -0
- package/dist/parsers/types/postman.types.d.ts +200 -0
- package/dist/parsers/types/postman.types.js +3 -0
- package/dist/parsers/types/postman.types.js.map +1 -0
- package/dist/parsers/utils/postman.utils.d.ts +12 -0
- package/dist/parsers/utils/postman.utils.js +116 -0
- package/dist/parsers/utils/postman.utils.js.map +1 -0
- package/dist/parsers/validators/postman-auth.validators.d.ts +10 -0
- package/dist/parsers/validators/postman-auth.validators.js +127 -0
- package/dist/parsers/validators/postman-auth.validators.js.map +1 -0
- package/dist/parsers/validators/postman-request.validators.d.ts +13 -0
- package/dist/parsers/validators/postman-request.validators.js +139 -0
- package/dist/parsers/validators/postman-request.validators.js.map +1 -0
- package/dist/parsers/validators/postman-response.validators.d.ts +13 -0
- package/dist/parsers/validators/postman-response.validators.js +150 -0
- package/dist/parsers/validators/postman-response.validators.js.map +1 -0
- package/dist/parsers/validators/postman-variable.validators.d.ts +14 -0
- package/dist/parsers/validators/postman-variable.validators.js +163 -0
- package/dist/parsers/validators/postman-variable.validators.js.map +1 -0
- package/dist/pricing/pricing.repo.d.ts +0 -0
- package/dist/pricing/pricing.repo.js +1 -0
- package/dist/pricing/pricing.repo.js.map +1 -0
- package/dist/pricing/pricing.service.d.ts +24 -0
- package/dist/pricing/pricing.service.js +51 -0
- package/dist/pricing/pricing.service.js.map +1 -0
- package/dist/pricing/pricing.types.d.ts +76 -0
- package/dist/pricing/pricing.types.js +21 -0
- package/dist/pricing/pricing.types.js.map +1 -0
- package/dist/pricing/utils/string.utils.d.ts +1 -0
- package/dist/pricing/utils/string.utils.js +9 -0
- package/dist/pricing/utils/string.utils.js.map +1 -0
- package/dist/processor/repos/sms.repo.d.ts +4 -4
- package/dist/processor/repos/sms.repo.js +23 -10
- package/dist/processor/repos/sms.repo.js.map +1 -1
- package/dist/processor/services/messagebrokers/kafka.service.js +0 -2
- package/dist/processor/services/messagebrokers/kafka.service.js.map +1 -1
- package/dist/processor/services/messagebrokers/rabbitmq.service.d.ts +9 -1
- package/dist/processor/services/messagebrokers/rabbitmq.service.js +40 -11
- package/dist/processor/services/messagebrokers/rabbitmq.service.js.map +1 -1
- package/dist/processor/services/processor.service.d.ts +38 -10
- package/dist/processor/services/processor.service.js +533 -248
- package/dist/processor/services/processor.service.js.map +1 -1
- package/dist/processor/services/request.service.d.ts +36 -0
- package/dist/processor/services/request.service.js +304 -0
- package/dist/processor/services/request.service.js.map +1 -0
- package/dist/processor/types/request.types.d.ts +14 -0
- package/dist/processor/types/request.types.js +3 -0
- package/dist/processor/types/request.types.js.map +1 -0
- package/dist/processor/utils/processor.utils.d.ts +3 -0
- package/dist/processor/utils/processor.utils.js +84 -22
- package/dist/processor/utils/processor.utils.js.map +1 -1
- package/dist/processor/utils/request.utils.d.ts +20 -0
- package/dist/processor/utils/request.utils.js +113 -0
- package/dist/processor/utils/request.utils.js.map +1 -0
- package/dist/products/services/products.service.d.ts +114 -77
- package/dist/products/services/products.service.js +805 -362
- package/dist/products/services/products.service.js.map +1 -1
- package/dist/products/services/utils/crypt.utils.d.ts +1 -0
- package/dist/products/services/utils/crypt.utils.js +17 -0
- package/dist/products/services/utils/crypt.utils.js.map +1 -0
- package/dist/products/services/utils/functions.utils.d.ts +13 -0
- package/dist/products/services/utils/functions.utils.js +289 -0
- package/dist/products/services/utils/functions.utils.js.map +1 -0
- package/dist/products/services/utils/objects.utils.d.ts +13 -0
- package/dist/products/services/utils/objects.utils.js +89 -0
- package/dist/products/services/utils/objects.utils.js.map +1 -0
- package/dist/products/services/utils/string.utils.d.ts +12 -0
- package/dist/products/services/utils/string.utils.js +168 -0
- package/dist/products/services/utils/string.utils.js.map +1 -0
- package/dist/products/utils/string.utils.d.ts +1 -1
- package/dist/products/utils/string.utils.js +14 -2
- package/dist/products/utils/string.utils.js.map +1 -1
- package/dist/products/validators/index.d.ts +4 -1
- package/dist/products/validators/index.js +7 -1
- package/dist/products/validators/index.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.d.ts +15 -4
- package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.js +501 -109
- package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productEnv.validator.js +1 -0
- package/dist/products/validators/joi-validators/create.productEnv.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productGraph.validator.d.ts +3 -0
- package/dist/products/validators/joi-validators/create.productGraph.validator.js +82 -0
- package/dist/products/validators/joi-validators/create.productGraph.validator.js.map +1 -0
- package/dist/products/validators/joi-validators/create.productGraphAction.validator.d.ts +14 -0
- package/dist/products/validators/joi-validators/create.productGraphAction.validator.js +696 -0
- package/dist/products/validators/joi-validators/create.productGraphAction.validator.js.map +1 -0
- package/dist/products/validators/joi-validators/create.productHealthcheck.validator.d.ts +4 -0
- package/dist/products/validators/joi-validators/create.productHealthcheck.validator.js +58 -0
- package/dist/products/validators/joi-validators/create.productHealthcheck.validator.js.map +1 -0
- package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.js +1 -0
- package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js +9 -4
- package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productNotification.validator.js +5 -2
- package/dist/products/validators/joi-validators/create.productNotification.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.userAuth.validator.js +1 -0
- package/dist/products/validators/joi-validators/create.userAuth.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/update.dataValue.validator.js +1 -0
- package/dist/products/validators/joi-validators/update.dataValue.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.d.ts +6 -0
- package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.js +28 -26
- package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/update.productEnv.validator.js +3 -0
- package/dist/products/validators/joi-validators/update.productEnv.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/update.productGraph.validator.d.ts +3 -0
- package/dist/products/validators/joi-validators/update.productGraph.validator.js +87 -0
- package/dist/products/validators/joi-validators/update.productGraph.validator.js.map +1 -0
- package/dist/products/validators/joi-validators/update.productGraphAction.validator.d.ts +7 -0
- package/dist/products/validators/joi-validators/update.productGraphAction.validator.js +72 -0
- package/dist/products/validators/joi-validators/update.productGraphAction.validator.js.map +1 -0
- package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.js +1 -0
- package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/update.userAuth.validator.js +1 -0
- package/dist/products/validators/joi-validators/update.userAuth.validator.js.map +1 -1
- package/dist/test/test.health.d.ts +1 -0
- package/dist/test/test.health.js +49 -0
- package/dist/test/test.health.js.map +1 -0
- package/dist/test/test.import.js +51 -4
- package/dist/test/test.import.js.map +1 -1
- package/dist/test/test.imports.js +22 -7
- package/dist/test/test.imports.js.map +1 -1
- package/dist/test/test.notifiers.d.ts +1 -0
- package/dist/test/test.notifiers.js +85 -0
- package/dist/test/test.notifiers.js.map +1 -0
- package/dist/test/test.processor.js +30 -115
- package/dist/test/test.processor.js.map +1 -1
- package/dist/test/test.products.d.ts +1 -0
- package/dist/test/test.products.js +49 -0
- package/dist/test/test.products.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/appBuilder.types.d.ts +5 -12
- package/dist/types/enums.d.ts +4 -1
- package/dist/types/enums.js +3 -0
- package/dist/types/enums.js.map +1 -1
- package/dist/types/index.types.d.ts +4 -0
- package/dist/types/pricing.types.d.ts +4 -0
- package/dist/types/pricing.types.js +3 -0
- package/dist/types/pricing.types.js.map +1 -0
- package/dist/types/processor.types.d.ts +67 -11
- package/dist/types/processor.types.js.map +1 -1
- package/dist/types/productsBuilder.types.d.ts +132 -14
- package/dist/types/productsBuilder.types.js +69 -4
- package/dist/types/productsBuilder.types.js.map +1 -1
- package/dist/types/request-tracker.interface.d.ts +0 -0
- package/dist/types/request-tracker.interface.js +1 -0
- package/dist/types/request-tracker.interface.js.map +1 -0
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.js +5 -0
- package/dist/utils/constants.js.map +1 -0
- package/package.json +17 -3
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration type definitions for database schema versioning
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Migration status
|
|
6
|
+
*/
|
|
7
|
+
export declare enum MigrationStatus {
|
|
8
|
+
PENDING = "pending",
|
|
9
|
+
RUNNING = "running",
|
|
10
|
+
COMPLETED = "completed",
|
|
11
|
+
FAILED = "failed",
|
|
12
|
+
ROLLED_BACK = "rolled_back"
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Migration direction
|
|
16
|
+
*/
|
|
17
|
+
export declare enum MigrationDirection {
|
|
18
|
+
UP = "up",
|
|
19
|
+
DOWN = "down"
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Migration operation type
|
|
23
|
+
*/
|
|
24
|
+
export declare enum MigrationOperationType {
|
|
25
|
+
CREATE_TABLE = "create_table",
|
|
26
|
+
DROP_TABLE = "drop_table",
|
|
27
|
+
ALTER_TABLE = "alter_table",
|
|
28
|
+
ADD_COLUMN = "add_column",
|
|
29
|
+
DROP_COLUMN = "drop_column",
|
|
30
|
+
MODIFY_COLUMN = "modify_column",
|
|
31
|
+
RENAME_COLUMN = "rename_column",
|
|
32
|
+
ADD_INDEX = "add_index",
|
|
33
|
+
DROP_INDEX = "drop_index",
|
|
34
|
+
ADD_CONSTRAINT = "add_constraint",
|
|
35
|
+
DROP_CONSTRAINT = "drop_constraint",
|
|
36
|
+
RAW_SQL = "raw_sql"
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Migration operation
|
|
40
|
+
*/
|
|
41
|
+
export interface IMigrationOperation {
|
|
42
|
+
/** Operation type */
|
|
43
|
+
type: MigrationOperationType;
|
|
44
|
+
/** Table name */
|
|
45
|
+
table?: string;
|
|
46
|
+
/** Raw SQL (for RAW_SQL type) */
|
|
47
|
+
sql?: string;
|
|
48
|
+
/** Operation parameters */
|
|
49
|
+
params?: Record<string, any>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Migration definition
|
|
53
|
+
*/
|
|
54
|
+
export interface IMigrationDefinition {
|
|
55
|
+
/** Migration name */
|
|
56
|
+
name: string;
|
|
57
|
+
/** Migration description */
|
|
58
|
+
description?: string;
|
|
59
|
+
/** Migration tag/identifier */
|
|
60
|
+
tag: string;
|
|
61
|
+
/** Up operations */
|
|
62
|
+
up: IMigrationOperation[];
|
|
63
|
+
/** Down operations (rollback) */
|
|
64
|
+
down: IMigrationOperation[];
|
|
65
|
+
/** Migration dependencies (tags of migrations that must run first) */
|
|
66
|
+
dependencies?: string[];
|
|
67
|
+
/** Created timestamp */
|
|
68
|
+
createdAt?: Date | string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Migration execution result
|
|
72
|
+
*/
|
|
73
|
+
export interface IMigrationResult {
|
|
74
|
+
/** Migration tag */
|
|
75
|
+
tag: string;
|
|
76
|
+
/** Execution status */
|
|
77
|
+
status: MigrationStatus;
|
|
78
|
+
/** Direction executed */
|
|
79
|
+
direction: MigrationDirection;
|
|
80
|
+
/** Executed at timestamp */
|
|
81
|
+
executedAt: Date | string;
|
|
82
|
+
/** Duration in milliseconds */
|
|
83
|
+
duration?: number;
|
|
84
|
+
/** Error message (if failed) */
|
|
85
|
+
error?: string;
|
|
86
|
+
/** SQL statements executed */
|
|
87
|
+
statements?: string[];
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Migration history entry
|
|
91
|
+
*/
|
|
92
|
+
export interface IMigrationHistory {
|
|
93
|
+
/** Migration tag */
|
|
94
|
+
tag: string;
|
|
95
|
+
/** Migration name */
|
|
96
|
+
name: string;
|
|
97
|
+
/** Environment slug (optional if connection is already established) */
|
|
98
|
+
env?: string;
|
|
99
|
+
/** Product tag (optional if connection is already established) */
|
|
100
|
+
product?: string;
|
|
101
|
+
/** Database tag (optional if connection is already established) */
|
|
102
|
+
database?: string;
|
|
103
|
+
/** Status */
|
|
104
|
+
status: MigrationStatus;
|
|
105
|
+
/** Last direction executed */
|
|
106
|
+
direction: MigrationDirection;
|
|
107
|
+
/** Applied at timestamp */
|
|
108
|
+
appliedAt: Date | string;
|
|
109
|
+
/** Duration in milliseconds */
|
|
110
|
+
duration?: number;
|
|
111
|
+
/** Error details (if failed) */
|
|
112
|
+
error?: {
|
|
113
|
+
message: string;
|
|
114
|
+
stack?: string;
|
|
115
|
+
};
|
|
116
|
+
/** Batch number (for grouping migrations) */
|
|
117
|
+
batch?: number;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Migration generation options
|
|
121
|
+
*/
|
|
122
|
+
export interface IMigrationGenerationOptions {
|
|
123
|
+
/** Migration name */
|
|
124
|
+
name: string;
|
|
125
|
+
/** Table name (if applicable) */
|
|
126
|
+
table?: string;
|
|
127
|
+
/** Description */
|
|
128
|
+
description?: string;
|
|
129
|
+
/** Auto-generate based on schema changes */
|
|
130
|
+
autoGenerate?: boolean;
|
|
131
|
+
/** Include timestamp in filename */
|
|
132
|
+
timestamp?: boolean;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Migration execution options
|
|
136
|
+
*/
|
|
137
|
+
export interface IMigrationExecutionOptions {
|
|
138
|
+
/** Environment slug (optional if connection is already established) */
|
|
139
|
+
env?: string;
|
|
140
|
+
/** Product tag (optional if connection is already established) */
|
|
141
|
+
product?: string;
|
|
142
|
+
/** Database tag (optional if connection is already established) */
|
|
143
|
+
database?: string;
|
|
144
|
+
/** Run specific migration tag */
|
|
145
|
+
tag?: string;
|
|
146
|
+
/** Run up to specific migration */
|
|
147
|
+
to?: string;
|
|
148
|
+
/** Batch mode */
|
|
149
|
+
batch?: boolean;
|
|
150
|
+
/** Dry run (don't execute, just show what would run) */
|
|
151
|
+
dryRun?: boolean;
|
|
152
|
+
/** Force execution even if migration already ran */
|
|
153
|
+
force?: boolean;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Migration rollback options
|
|
157
|
+
*/
|
|
158
|
+
export interface IMigrationRollbackOptions {
|
|
159
|
+
/** Environment slug (optional if connection is already established) */
|
|
160
|
+
env?: string;
|
|
161
|
+
/** Product tag (optional if connection is already established) */
|
|
162
|
+
product?: string;
|
|
163
|
+
/** Database tag (optional if connection is already established) */
|
|
164
|
+
database?: string;
|
|
165
|
+
/** Rollback specific migration */
|
|
166
|
+
tag?: string;
|
|
167
|
+
/** Rollback last N migrations */
|
|
168
|
+
steps?: number;
|
|
169
|
+
/** Rollback last batch */
|
|
170
|
+
batch?: boolean;
|
|
171
|
+
/** Dry run */
|
|
172
|
+
dryRun?: boolean;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Pending migration info
|
|
176
|
+
*/
|
|
177
|
+
export interface IPendingMigration {
|
|
178
|
+
/** Migration tag */
|
|
179
|
+
tag: string;
|
|
180
|
+
/** Migration name */
|
|
181
|
+
name: string;
|
|
182
|
+
/** Description */
|
|
183
|
+
description?: string;
|
|
184
|
+
/** Created at */
|
|
185
|
+
createdAt: Date | string;
|
|
186
|
+
/** Dependencies */
|
|
187
|
+
dependencies?: string[];
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Migration status summary
|
|
191
|
+
*/
|
|
192
|
+
export interface IMigrationStatus {
|
|
193
|
+
/** Total migrations */
|
|
194
|
+
total: number;
|
|
195
|
+
/** Completed migrations */
|
|
196
|
+
completed: number;
|
|
197
|
+
/** Pending migrations */
|
|
198
|
+
pending: number;
|
|
199
|
+
/** Failed migrations */
|
|
200
|
+
failed: number;
|
|
201
|
+
/** Last migration applied */
|
|
202
|
+
lastApplied?: IMigrationHistory;
|
|
203
|
+
/** Pending migrations list */
|
|
204
|
+
pendingMigrations: IPendingMigration[];
|
|
205
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Migration type definitions for database schema versioning
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MigrationOperationType = exports.MigrationDirection = exports.MigrationStatus = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Migration status
|
|
9
|
+
*/
|
|
10
|
+
var MigrationStatus;
|
|
11
|
+
(function (MigrationStatus) {
|
|
12
|
+
MigrationStatus["PENDING"] = "pending";
|
|
13
|
+
MigrationStatus["RUNNING"] = "running";
|
|
14
|
+
MigrationStatus["COMPLETED"] = "completed";
|
|
15
|
+
MigrationStatus["FAILED"] = "failed";
|
|
16
|
+
MigrationStatus["ROLLED_BACK"] = "rolled_back";
|
|
17
|
+
})(MigrationStatus || (exports.MigrationStatus = MigrationStatus = {}));
|
|
18
|
+
/**
|
|
19
|
+
* Migration direction
|
|
20
|
+
*/
|
|
21
|
+
var MigrationDirection;
|
|
22
|
+
(function (MigrationDirection) {
|
|
23
|
+
MigrationDirection["UP"] = "up";
|
|
24
|
+
MigrationDirection["DOWN"] = "down";
|
|
25
|
+
})(MigrationDirection || (exports.MigrationDirection = MigrationDirection = {}));
|
|
26
|
+
/**
|
|
27
|
+
* Migration operation type
|
|
28
|
+
*/
|
|
29
|
+
var MigrationOperationType;
|
|
30
|
+
(function (MigrationOperationType) {
|
|
31
|
+
MigrationOperationType["CREATE_TABLE"] = "create_table";
|
|
32
|
+
MigrationOperationType["DROP_TABLE"] = "drop_table";
|
|
33
|
+
MigrationOperationType["ALTER_TABLE"] = "alter_table";
|
|
34
|
+
MigrationOperationType["ADD_COLUMN"] = "add_column";
|
|
35
|
+
MigrationOperationType["DROP_COLUMN"] = "drop_column";
|
|
36
|
+
MigrationOperationType["MODIFY_COLUMN"] = "modify_column";
|
|
37
|
+
MigrationOperationType["RENAME_COLUMN"] = "rename_column";
|
|
38
|
+
MigrationOperationType["ADD_INDEX"] = "add_index";
|
|
39
|
+
MigrationOperationType["DROP_INDEX"] = "drop_index";
|
|
40
|
+
MigrationOperationType["ADD_CONSTRAINT"] = "add_constraint";
|
|
41
|
+
MigrationOperationType["DROP_CONSTRAINT"] = "drop_constraint";
|
|
42
|
+
MigrationOperationType["RAW_SQL"] = "raw_sql";
|
|
43
|
+
})(MigrationOperationType || (exports.MigrationOperationType = MigrationOperationType = {}));
|
|
44
|
+
//# sourceMappingURL=migration.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration.types.js","sourceRoot":"","sources":["../../../src/database/types/migration.types.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH;;GAEG;AACH,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,0CAAuB,CAAA;IACvB,oCAAiB,CAAA;IACjB,8CAA2B,CAAA;AAC7B,CAAC,EANW,eAAe,+BAAf,eAAe,QAM1B;AAED;;GAEG;AACH,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,+BAAS,CAAA;IACT,mCAAa,CAAA;AACf,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAED;;GAEG;AACH,IAAY,sBAaX;AAbD,WAAY,sBAAsB;IAChC,uDAA6B,CAAA;IAC7B,mDAAyB,CAAA;IACzB,qDAA2B,CAAA;IAC3B,mDAAyB,CAAA;IACzB,qDAA2B,CAAA;IAC3B,yDAA+B,CAAA;IAC/B,yDAA+B,CAAA;IAC/B,iDAAuB,CAAA;IACvB,mDAAyB,CAAA;IACzB,2DAAiC,CAAA;IACjC,6DAAmC,CAAA;IACnC,6CAAmB,CAAA;AACrB,CAAC,EAbW,sBAAsB,sCAAtB,sBAAsB,QAajC"}
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Query type definitions for database operations
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Comparison operators for where clauses
|
|
6
|
+
*/
|
|
7
|
+
export declare enum ComparisonOperator {
|
|
8
|
+
EQUALS = "=",
|
|
9
|
+
NOT_EQUALS = "!=",
|
|
10
|
+
GREATER_THAN = ">",
|
|
11
|
+
GREATER_THAN_OR_EQUAL = ">=",
|
|
12
|
+
LESS_THAN = "<",
|
|
13
|
+
LESS_THAN_OR_EQUAL = "<=",
|
|
14
|
+
LIKE = "like",
|
|
15
|
+
NOT_LIKE = "not_like",
|
|
16
|
+
IN = "in",
|
|
17
|
+
NOT_IN = "not_in",
|
|
18
|
+
BETWEEN = "between",
|
|
19
|
+
NOT_BETWEEN = "not_between",
|
|
20
|
+
IS_NULL = "is_null",
|
|
21
|
+
IS_NOT_NULL = "is_not_null",
|
|
22
|
+
CONTAINS = "contains",// For arrays/JSON
|
|
23
|
+
NOT_CONTAINS = "not_contains"
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Logical operators for combining conditions
|
|
27
|
+
*/
|
|
28
|
+
export declare enum LogicalOperator {
|
|
29
|
+
AND = "and",
|
|
30
|
+
OR = "or",
|
|
31
|
+
NOT = "not"
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Sort order
|
|
35
|
+
*/
|
|
36
|
+
export declare enum SortOrder {
|
|
37
|
+
ASC = "asc",
|
|
38
|
+
DESC = "desc"
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Simple where condition
|
|
42
|
+
*/
|
|
43
|
+
export interface IWhereCondition {
|
|
44
|
+
/** Column name */
|
|
45
|
+
column: string;
|
|
46
|
+
/** Comparison operator */
|
|
47
|
+
operator: ComparisonOperator | string;
|
|
48
|
+
/** Value to compare */
|
|
49
|
+
value?: any;
|
|
50
|
+
/** Values for IN, NOT_IN, BETWEEN operators */
|
|
51
|
+
values?: any[];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Grouped where conditions
|
|
55
|
+
*/
|
|
56
|
+
export interface IWhereGroup {
|
|
57
|
+
/** Logical operator for this group */
|
|
58
|
+
operator: LogicalOperator;
|
|
59
|
+
/** Conditions in this group */
|
|
60
|
+
conditions: (IWhereCondition | IWhereGroup)[];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Where clause (can be object notation or complex conditions)
|
|
64
|
+
*/
|
|
65
|
+
export type WhereClause = Record<string, any> | IWhereCondition | IWhereGroup | IWhereCondition[] | IWhereGroup[];
|
|
66
|
+
/**
|
|
67
|
+
* Order by clause
|
|
68
|
+
*/
|
|
69
|
+
export interface IOrderBy {
|
|
70
|
+
/** Column name */
|
|
71
|
+
column: string;
|
|
72
|
+
/** Sort order */
|
|
73
|
+
order: SortOrder;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Join type
|
|
77
|
+
*/
|
|
78
|
+
export declare enum JoinType {
|
|
79
|
+
INNER = "inner",
|
|
80
|
+
LEFT = "left",
|
|
81
|
+
RIGHT = "right",
|
|
82
|
+
FULL = "full",
|
|
83
|
+
CROSS = "cross"
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Join clause
|
|
87
|
+
*/
|
|
88
|
+
export interface IJoinClause {
|
|
89
|
+
/** Join type */
|
|
90
|
+
type: JoinType;
|
|
91
|
+
/** Table to join */
|
|
92
|
+
table: string;
|
|
93
|
+
/** Left column (from main table) */
|
|
94
|
+
leftColumn: string;
|
|
95
|
+
/** Right column (from joined table) */
|
|
96
|
+
rightColumn: string;
|
|
97
|
+
/** Optional join condition */
|
|
98
|
+
condition?: WhereClause;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Pagination options
|
|
102
|
+
*/
|
|
103
|
+
export interface IPagination {
|
|
104
|
+
/** Number of records to skip */
|
|
105
|
+
offset?: number;
|
|
106
|
+
/** Number of records to return */
|
|
107
|
+
limit?: number;
|
|
108
|
+
/** Page number (alternative to offset) */
|
|
109
|
+
page?: number;
|
|
110
|
+
/** Page size (alternative to limit) */
|
|
111
|
+
pageSize?: number;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Include options for relationship lookups
|
|
115
|
+
*/
|
|
116
|
+
export interface IInclude {
|
|
117
|
+
/** Relationship name/table to include */
|
|
118
|
+
relation: string;
|
|
119
|
+
/** Fields to select from the related table */
|
|
120
|
+
select?: string[];
|
|
121
|
+
/** Where clause for the related table */
|
|
122
|
+
where?: WhereClause;
|
|
123
|
+
/** Nested includes (for deep relationships) */
|
|
124
|
+
include?: IInclude | IInclude[];
|
|
125
|
+
/** Limit results from the relationship */
|
|
126
|
+
limit?: number;
|
|
127
|
+
/** Order results from the relationship */
|
|
128
|
+
orderBy?: IOrderBy | IOrderBy[];
|
|
129
|
+
/** Foreign key column in the main table (defaults to relation_id) */
|
|
130
|
+
foreignKey?: string;
|
|
131
|
+
/** Primary key column in the related table (defaults to id) */
|
|
132
|
+
primaryKey?: string;
|
|
133
|
+
/** Relationship type */
|
|
134
|
+
type?: 'one-to-one' | 'one-to-many' | 'many-to-one' | 'many-to-many';
|
|
135
|
+
/** For many-to-many: junction table name */
|
|
136
|
+
through?: string;
|
|
137
|
+
/** For many-to-many: foreign key in junction table pointing to main table */
|
|
138
|
+
throughForeignKey?: string;
|
|
139
|
+
/** For many-to-many: foreign key in junction table pointing to related table */
|
|
140
|
+
throughRelatedKey?: string;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Query options
|
|
144
|
+
*/
|
|
145
|
+
export interface IQueryOptions {
|
|
146
|
+
/** Table/Collection name */
|
|
147
|
+
table: string;
|
|
148
|
+
/** Environment slug (optional if connection is already established) */
|
|
149
|
+
env?: string;
|
|
150
|
+
/** Product tag (optional if connection is already established) */
|
|
151
|
+
product?: string;
|
|
152
|
+
/** Database tag (optional if connection is already established) */
|
|
153
|
+
database?: string;
|
|
154
|
+
/** Columns to select (empty for all) */
|
|
155
|
+
select?: string[];
|
|
156
|
+
/** Where clause */
|
|
157
|
+
where?: WhereClause;
|
|
158
|
+
/** Order by */
|
|
159
|
+
orderBy?: IOrderBy | IOrderBy[];
|
|
160
|
+
/** Pagination */
|
|
161
|
+
limit?: number;
|
|
162
|
+
/** Offset */
|
|
163
|
+
offset?: number;
|
|
164
|
+
/** Joins (SQL only) */
|
|
165
|
+
joins?: IJoinClause[];
|
|
166
|
+
/** Include related data (relationship lookups) */
|
|
167
|
+
include?: IInclude | IInclude[];
|
|
168
|
+
/** Group by columns */
|
|
169
|
+
groupBy?: string[];
|
|
170
|
+
/** Having clause (for grouped queries) */
|
|
171
|
+
having?: WhereClause;
|
|
172
|
+
/** Distinct results */
|
|
173
|
+
distinct?: boolean;
|
|
174
|
+
/** Transaction to execute within */
|
|
175
|
+
transaction?: any;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Insert options
|
|
179
|
+
*/
|
|
180
|
+
export interface IInsertOptions {
|
|
181
|
+
/** Table/Collection name */
|
|
182
|
+
table: string;
|
|
183
|
+
/** Environment slug (optional if connection is already established) */
|
|
184
|
+
env?: string;
|
|
185
|
+
/** Product tag (optional if connection is already established) */
|
|
186
|
+
product?: string;
|
|
187
|
+
/** Database tag (optional if connection is already established) */
|
|
188
|
+
database?: string;
|
|
189
|
+
/** Data to insert (single record or array) */
|
|
190
|
+
data: Record<string, any> | Record<string, any>[];
|
|
191
|
+
/** Return inserted records */
|
|
192
|
+
returning?: boolean | string[];
|
|
193
|
+
/** Ignore duplicate key errors */
|
|
194
|
+
ignoreErrors?: boolean;
|
|
195
|
+
/** On conflict action (PostgreSQL) */
|
|
196
|
+
onConflict?: {
|
|
197
|
+
/** Columns that define the conflict */
|
|
198
|
+
columns: string[];
|
|
199
|
+
/** Action: 'ignore' or 'update' */
|
|
200
|
+
action: 'ignore' | 'update';
|
|
201
|
+
/** Columns to update (if action is 'update') */
|
|
202
|
+
update?: string[];
|
|
203
|
+
};
|
|
204
|
+
/** Transaction to execute within */
|
|
205
|
+
transaction?: any;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Update options
|
|
209
|
+
*/
|
|
210
|
+
export interface IUpdateOptions {
|
|
211
|
+
/** Table/Collection name */
|
|
212
|
+
table: string;
|
|
213
|
+
/** Environment slug (optional if connection is already established) */
|
|
214
|
+
env?: string;
|
|
215
|
+
/** Product tag (optional if connection is already established) */
|
|
216
|
+
product?: string;
|
|
217
|
+
/** Database tag (optional if connection is already established) */
|
|
218
|
+
database?: string;
|
|
219
|
+
/** Data to update */
|
|
220
|
+
data: Record<string, any>;
|
|
221
|
+
/** Where clause */
|
|
222
|
+
where: WhereClause;
|
|
223
|
+
/** Return updated records */
|
|
224
|
+
returning?: boolean | string[];
|
|
225
|
+
/** Limit number of records to update */
|
|
226
|
+
limit?: number;
|
|
227
|
+
/** Transaction to execute within */
|
|
228
|
+
transaction?: any;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Delete options
|
|
232
|
+
*/
|
|
233
|
+
export interface IDeleteOptions {
|
|
234
|
+
/** Table/Collection name */
|
|
235
|
+
table: string;
|
|
236
|
+
/** Environment slug (optional if connection is already established) */
|
|
237
|
+
env?: string;
|
|
238
|
+
/** Product tag (optional if connection is already established) */
|
|
239
|
+
product?: string;
|
|
240
|
+
/** Database tag (optional if connection is already established) */
|
|
241
|
+
database?: string;
|
|
242
|
+
/** Where clause */
|
|
243
|
+
where: WhereClause;
|
|
244
|
+
/** Return deleted records */
|
|
245
|
+
returning?: boolean | string[];
|
|
246
|
+
/** Limit number of records to delete */
|
|
247
|
+
limit?: number;
|
|
248
|
+
/** Transaction to execute within */
|
|
249
|
+
transaction?: any;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Upsert options (insert or update)
|
|
253
|
+
*/
|
|
254
|
+
export interface IUpsertOptions {
|
|
255
|
+
/** Table/Collection name */
|
|
256
|
+
table: string;
|
|
257
|
+
/** Environment slug (optional if connection is already established) */
|
|
258
|
+
env?: string;
|
|
259
|
+
/** Product tag (optional if connection is already established) */
|
|
260
|
+
product?: string;
|
|
261
|
+
/** Database tag (optional if connection is already established) */
|
|
262
|
+
database?: string;
|
|
263
|
+
/** Data to upsert */
|
|
264
|
+
data: Record<string, any> | Record<string, any>[];
|
|
265
|
+
/** Columns that define uniqueness */
|
|
266
|
+
uniqueColumns: string[];
|
|
267
|
+
/** Columns to update on conflict */
|
|
268
|
+
updateColumns?: string[];
|
|
269
|
+
/** Return upserted records */
|
|
270
|
+
returning?: boolean | string[];
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Transaction execution options
|
|
274
|
+
*/
|
|
275
|
+
export interface ITransactionExecutionOptions {
|
|
276
|
+
/** Environment slug (optional if connection is already established) */
|
|
277
|
+
env?: string;
|
|
278
|
+
/** Product tag (optional if connection is already established) */
|
|
279
|
+
product?: string;
|
|
280
|
+
/** Database tag (optional if connection is already established) */
|
|
281
|
+
database?: string;
|
|
282
|
+
/** Isolation level */
|
|
283
|
+
isolationLevel?: 'READ_UNCOMMITTED' | 'READ_COMMITTED' | 'REPEATABLE_READ' | 'SERIALIZABLE';
|
|
284
|
+
/** Read only transaction */
|
|
285
|
+
readOnly?: boolean;
|
|
286
|
+
/** Timeout in milliseconds */
|
|
287
|
+
timeout?: number;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Raw query options
|
|
291
|
+
*/
|
|
292
|
+
export interface IRawQueryOptions {
|
|
293
|
+
/** Environment slug (optional if connection is already established) */
|
|
294
|
+
env?: string;
|
|
295
|
+
/** Product tag (optional if connection is already established) */
|
|
296
|
+
product?: string;
|
|
297
|
+
/** Database tag (optional if connection is already established) */
|
|
298
|
+
database?: string;
|
|
299
|
+
/** Raw SQL/query string */
|
|
300
|
+
query: string;
|
|
301
|
+
/** Query parameters */
|
|
302
|
+
params?: any[];
|
|
303
|
+
/** Named parameters */
|
|
304
|
+
namedParams?: Record<string, any>;
|
|
305
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Query type definitions for database operations
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.JoinType = exports.SortOrder = exports.LogicalOperator = exports.ComparisonOperator = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Comparison operators for where clauses
|
|
9
|
+
*/
|
|
10
|
+
var ComparisonOperator;
|
|
11
|
+
(function (ComparisonOperator) {
|
|
12
|
+
ComparisonOperator["EQUALS"] = "=";
|
|
13
|
+
ComparisonOperator["NOT_EQUALS"] = "!=";
|
|
14
|
+
ComparisonOperator["GREATER_THAN"] = ">";
|
|
15
|
+
ComparisonOperator["GREATER_THAN_OR_EQUAL"] = ">=";
|
|
16
|
+
ComparisonOperator["LESS_THAN"] = "<";
|
|
17
|
+
ComparisonOperator["LESS_THAN_OR_EQUAL"] = "<=";
|
|
18
|
+
ComparisonOperator["LIKE"] = "like";
|
|
19
|
+
ComparisonOperator["NOT_LIKE"] = "not_like";
|
|
20
|
+
ComparisonOperator["IN"] = "in";
|
|
21
|
+
ComparisonOperator["NOT_IN"] = "not_in";
|
|
22
|
+
ComparisonOperator["BETWEEN"] = "between";
|
|
23
|
+
ComparisonOperator["NOT_BETWEEN"] = "not_between";
|
|
24
|
+
ComparisonOperator["IS_NULL"] = "is_null";
|
|
25
|
+
ComparisonOperator["IS_NOT_NULL"] = "is_not_null";
|
|
26
|
+
ComparisonOperator["CONTAINS"] = "contains";
|
|
27
|
+
ComparisonOperator["NOT_CONTAINS"] = "not_contains";
|
|
28
|
+
})(ComparisonOperator || (exports.ComparisonOperator = ComparisonOperator = {}));
|
|
29
|
+
/**
|
|
30
|
+
* Logical operators for combining conditions
|
|
31
|
+
*/
|
|
32
|
+
var LogicalOperator;
|
|
33
|
+
(function (LogicalOperator) {
|
|
34
|
+
LogicalOperator["AND"] = "and";
|
|
35
|
+
LogicalOperator["OR"] = "or";
|
|
36
|
+
LogicalOperator["NOT"] = "not";
|
|
37
|
+
})(LogicalOperator || (exports.LogicalOperator = LogicalOperator = {}));
|
|
38
|
+
/**
|
|
39
|
+
* Sort order
|
|
40
|
+
*/
|
|
41
|
+
var SortOrder;
|
|
42
|
+
(function (SortOrder) {
|
|
43
|
+
SortOrder["ASC"] = "asc";
|
|
44
|
+
SortOrder["DESC"] = "desc";
|
|
45
|
+
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
46
|
+
/**
|
|
47
|
+
* Join type
|
|
48
|
+
*/
|
|
49
|
+
var JoinType;
|
|
50
|
+
(function (JoinType) {
|
|
51
|
+
JoinType["INNER"] = "inner";
|
|
52
|
+
JoinType["LEFT"] = "left";
|
|
53
|
+
JoinType["RIGHT"] = "right";
|
|
54
|
+
JoinType["FULL"] = "full";
|
|
55
|
+
JoinType["CROSS"] = "cross";
|
|
56
|
+
})(JoinType || (exports.JoinType = JoinType = {}));
|
|
57
|
+
//# sourceMappingURL=query.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.types.js","sourceRoot":"","sources":["../../../src/database/types/query.types.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH;;GAEG;AACH,IAAY,kBAiBX;AAjBD,WAAY,kBAAkB;IAC5B,kCAAY,CAAA;IACZ,uCAAiB,CAAA;IACjB,wCAAkB,CAAA;IAClB,kDAA4B,CAAA;IAC5B,qCAAe,CAAA;IACf,+CAAyB,CAAA;IACzB,mCAAa,CAAA;IACb,2CAAqB,CAAA;IACrB,+BAAS,CAAA;IACT,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;IACnB,iDAA2B,CAAA;IAC3B,yCAAmB,CAAA;IACnB,iDAA2B,CAAA;IAC3B,2CAAqB,CAAA;IACrB,mDAA6B,CAAA;AAC/B,CAAC,EAjBW,kBAAkB,kCAAlB,kBAAkB,QAiB7B;AAED;;GAEG;AACH,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,8BAAW,CAAA;IACX,4BAAS,CAAA;IACT,8BAAW,CAAA;AACb,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAED;;GAEG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AA8CD;;GAEG;AACH,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,2BAAe,CAAA;AACjB,CAAC,EANW,QAAQ,wBAAR,QAAQ,QAMnB"}
|