@njdamstra/appwrite-utils-cli 1.8.9
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/CHANGELOG.md +19 -0
- package/README.md +1133 -0
- package/dist/adapters/AdapterFactory.d.ts +94 -0
- package/dist/adapters/AdapterFactory.js +405 -0
- package/dist/adapters/DatabaseAdapter.d.ts +233 -0
- package/dist/adapters/DatabaseAdapter.js +50 -0
- package/dist/adapters/LegacyAdapter.d.ts +50 -0
- package/dist/adapters/LegacyAdapter.js +612 -0
- package/dist/adapters/TablesDBAdapter.d.ts +45 -0
- package/dist/adapters/TablesDBAdapter.js +571 -0
- package/dist/adapters/index.d.ts +11 -0
- package/dist/adapters/index.js +12 -0
- package/dist/backups/operations/bucketBackup.d.ts +19 -0
- package/dist/backups/operations/bucketBackup.js +197 -0
- package/dist/backups/operations/collectionBackup.d.ts +30 -0
- package/dist/backups/operations/collectionBackup.js +201 -0
- package/dist/backups/operations/comprehensiveBackup.d.ts +25 -0
- package/dist/backups/operations/comprehensiveBackup.js +238 -0
- package/dist/backups/schemas/bucketManifest.d.ts +93 -0
- package/dist/backups/schemas/bucketManifest.js +33 -0
- package/dist/backups/schemas/comprehensiveManifest.d.ts +108 -0
- package/dist/backups/schemas/comprehensiveManifest.js +32 -0
- package/dist/backups/tracking/centralizedTracking.d.ts +34 -0
- package/dist/backups/tracking/centralizedTracking.js +274 -0
- package/dist/cli/commands/configCommands.d.ts +8 -0
- package/dist/cli/commands/configCommands.js +166 -0
- package/dist/cli/commands/databaseCommands.d.ts +13 -0
- package/dist/cli/commands/databaseCommands.js +554 -0
- package/dist/cli/commands/functionCommands.d.ts +7 -0
- package/dist/cli/commands/functionCommands.js +330 -0
- package/dist/cli/commands/schemaCommands.d.ts +7 -0
- package/dist/cli/commands/schemaCommands.js +169 -0
- package/dist/cli/commands/storageCommands.d.ts +5 -0
- package/dist/cli/commands/storageCommands.js +143 -0
- package/dist/cli/commands/transferCommands.d.ts +5 -0
- package/dist/cli/commands/transferCommands.js +384 -0
- package/dist/collections/attributes.d.ts +13 -0
- package/dist/collections/attributes.js +1364 -0
- package/dist/collections/indexes.d.ts +12 -0
- package/dist/collections/indexes.js +217 -0
- package/dist/collections/methods.d.ts +19 -0
- package/dist/collections/methods.js +682 -0
- package/dist/collections/tableOperations.d.ts +86 -0
- package/dist/collections/tableOperations.js +434 -0
- package/dist/collections/transferOperations.d.ts +8 -0
- package/dist/collections/transferOperations.js +412 -0
- package/dist/collections/wipeOperations.d.ts +16 -0
- package/dist/collections/wipeOperations.js +233 -0
- package/dist/config/ConfigManager.d.ts +445 -0
- package/dist/config/ConfigManager.js +625 -0
- package/dist/config/configMigration.d.ts +87 -0
- package/dist/config/configMigration.js +390 -0
- package/dist/config/configValidation.d.ts +66 -0
- package/dist/config/configValidation.js +358 -0
- package/dist/config/index.d.ts +8 -0
- package/dist/config/index.js +7 -0
- package/dist/config/services/ConfigDiscoveryService.d.ts +126 -0
- package/dist/config/services/ConfigDiscoveryService.js +374 -0
- package/dist/config/services/ConfigLoaderService.d.ts +129 -0
- package/dist/config/services/ConfigLoaderService.js +540 -0
- package/dist/config/services/ConfigMergeService.d.ts +208 -0
- package/dist/config/services/ConfigMergeService.js +308 -0
- package/dist/config/services/ConfigValidationService.d.ts +214 -0
- package/dist/config/services/ConfigValidationService.js +310 -0
- package/dist/config/services/SessionAuthService.d.ts +225 -0
- package/dist/config/services/SessionAuthService.js +456 -0
- package/dist/config/services/__tests__/ConfigMergeService.test.d.ts +1 -0
- package/dist/config/services/__tests__/ConfigMergeService.test.js +271 -0
- package/dist/config/services/index.d.ts +13 -0
- package/dist/config/services/index.js +10 -0
- package/dist/config/yamlConfig.d.ts +722 -0
- package/dist/config/yamlConfig.js +702 -0
- package/dist/databases/methods.d.ts +6 -0
- package/dist/databases/methods.js +35 -0
- package/dist/databases/setup.d.ts +5 -0
- package/dist/databases/setup.js +45 -0
- package/dist/examples/yamlTerminologyExample.d.ts +42 -0
- package/dist/examples/yamlTerminologyExample.js +272 -0
- package/dist/functions/deployments.d.ts +4 -0
- package/dist/functions/deployments.js +146 -0
- package/dist/functions/fnConfigDiscovery.d.ts +3 -0
- package/dist/functions/fnConfigDiscovery.js +108 -0
- package/dist/functions/methods.d.ts +16 -0
- package/dist/functions/methods.js +162 -0
- package/dist/functions/pathResolution.d.ts +37 -0
- package/dist/functions/pathResolution.js +185 -0
- package/dist/functions/templates/count-docs-in-collection/README.md +54 -0
- package/dist/functions/templates/count-docs-in-collection/src/main.ts +159 -0
- package/dist/functions/templates/count-docs-in-collection/src/request.ts +9 -0
- package/dist/functions/templates/hono-typescript/README.md +286 -0
- package/dist/functions/templates/hono-typescript/src/adapters/request.ts +74 -0
- package/dist/functions/templates/hono-typescript/src/adapters/response.ts +106 -0
- package/dist/functions/templates/hono-typescript/src/app.ts +180 -0
- package/dist/functions/templates/hono-typescript/src/context.ts +103 -0
- package/dist/functions/templates/hono-typescript/src/index.ts +54 -0
- package/dist/functions/templates/hono-typescript/src/middleware/appwrite.ts +119 -0
- package/dist/functions/templates/typescript-node/README.md +32 -0
- package/dist/functions/templates/typescript-node/src/context.ts +103 -0
- package/dist/functions/templates/typescript-node/src/index.ts +29 -0
- package/dist/functions/templates/uv/README.md +31 -0
- package/dist/functions/templates/uv/pyproject.toml +30 -0
- package/dist/functions/templates/uv/src/__init__.py +0 -0
- package/dist/functions/templates/uv/src/context.py +125 -0
- package/dist/functions/templates/uv/src/index.py +46 -0
- package/dist/init.d.ts +2 -0
- package/dist/init.js +57 -0
- package/dist/interactiveCLI.d.ts +31 -0
- package/dist/interactiveCLI.js +898 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +1172 -0
- package/dist/migrations/afterImportActions.d.ts +17 -0
- package/dist/migrations/afterImportActions.js +306 -0
- package/dist/migrations/appwriteToX.d.ts +211 -0
- package/dist/migrations/appwriteToX.js +491 -0
- package/dist/migrations/comprehensiveTransfer.d.ts +147 -0
- package/dist/migrations/comprehensiveTransfer.js +1317 -0
- package/dist/migrations/dataLoader.d.ts +753 -0
- package/dist/migrations/dataLoader.js +1250 -0
- package/dist/migrations/importController.d.ts +23 -0
- package/dist/migrations/importController.js +268 -0
- package/dist/migrations/importDataActions.d.ts +50 -0
- package/dist/migrations/importDataActions.js +230 -0
- package/dist/migrations/relationships.d.ts +29 -0
- package/dist/migrations/relationships.js +204 -0
- package/dist/migrations/services/DataTransformationService.d.ts +55 -0
- package/dist/migrations/services/DataTransformationService.js +158 -0
- package/dist/migrations/services/FileHandlerService.d.ts +75 -0
- package/dist/migrations/services/FileHandlerService.js +236 -0
- package/dist/migrations/services/ImportOrchestrator.d.ts +97 -0
- package/dist/migrations/services/ImportOrchestrator.js +485 -0
- package/dist/migrations/services/RateLimitManager.d.ts +138 -0
- package/dist/migrations/services/RateLimitManager.js +279 -0
- package/dist/migrations/services/RelationshipResolver.d.ts +120 -0
- package/dist/migrations/services/RelationshipResolver.js +332 -0
- package/dist/migrations/services/UserMappingService.d.ts +109 -0
- package/dist/migrations/services/UserMappingService.js +277 -0
- package/dist/migrations/services/ValidationService.d.ts +74 -0
- package/dist/migrations/services/ValidationService.js +260 -0
- package/dist/migrations/transfer.d.ts +26 -0
- package/dist/migrations/transfer.js +608 -0
- package/dist/migrations/yaml/YamlImportConfigLoader.d.ts +131 -0
- package/dist/migrations/yaml/YamlImportConfigLoader.js +383 -0
- package/dist/migrations/yaml/YamlImportIntegration.d.ts +93 -0
- package/dist/migrations/yaml/YamlImportIntegration.js +341 -0
- package/dist/migrations/yaml/generateImportSchemas.d.ts +30 -0
- package/dist/migrations/yaml/generateImportSchemas.js +1327 -0
- package/dist/schemas/authUser.d.ts +24 -0
- package/dist/schemas/authUser.js +17 -0
- package/dist/setup.d.ts +2 -0
- package/dist/setup.js +5 -0
- package/dist/setupCommands.d.ts +58 -0
- package/dist/setupCommands.js +490 -0
- package/dist/setupController.d.ts +9 -0
- package/dist/setupController.js +34 -0
- package/dist/shared/attributeMapper.d.ts +20 -0
- package/dist/shared/attributeMapper.js +203 -0
- package/dist/shared/backupMetadataSchema.d.ts +94 -0
- package/dist/shared/backupMetadataSchema.js +38 -0
- package/dist/shared/backupTracking.d.ts +18 -0
- package/dist/shared/backupTracking.js +176 -0
- package/dist/shared/confirmationDialogs.d.ts +75 -0
- package/dist/shared/confirmationDialogs.js +236 -0
- package/dist/shared/errorUtils.d.ts +54 -0
- package/dist/shared/errorUtils.js +95 -0
- package/dist/shared/functionManager.d.ts +48 -0
- package/dist/shared/functionManager.js +336 -0
- package/dist/shared/indexManager.d.ts +24 -0
- package/dist/shared/indexManager.js +151 -0
- package/dist/shared/jsonSchemaGenerator.d.ts +50 -0
- package/dist/shared/jsonSchemaGenerator.js +290 -0
- package/dist/shared/logging.d.ts +61 -0
- package/dist/shared/logging.js +116 -0
- package/dist/shared/messageFormatter.d.ts +39 -0
- package/dist/shared/messageFormatter.js +162 -0
- package/dist/shared/migrationHelpers.d.ts +61 -0
- package/dist/shared/migrationHelpers.js +145 -0
- package/dist/shared/operationLogger.d.ts +10 -0
- package/dist/shared/operationLogger.js +12 -0
- package/dist/shared/operationQueue.d.ts +40 -0
- package/dist/shared/operationQueue.js +311 -0
- package/dist/shared/operationsTable.d.ts +26 -0
- package/dist/shared/operationsTable.js +286 -0
- package/dist/shared/operationsTableSchema.d.ts +48 -0
- package/dist/shared/operationsTableSchema.js +35 -0
- package/dist/shared/progressManager.d.ts +62 -0
- package/dist/shared/progressManager.js +215 -0
- package/dist/shared/pydanticModelGenerator.d.ts +17 -0
- package/dist/shared/pydanticModelGenerator.js +615 -0
- package/dist/shared/relationshipExtractor.d.ts +56 -0
- package/dist/shared/relationshipExtractor.js +138 -0
- package/dist/shared/schemaGenerator.d.ts +40 -0
- package/dist/shared/schemaGenerator.js +556 -0
- package/dist/shared/selectionDialogs.d.ts +214 -0
- package/dist/shared/selectionDialogs.js +544 -0
- package/dist/storage/backupCompression.d.ts +20 -0
- package/dist/storage/backupCompression.js +67 -0
- package/dist/storage/methods.d.ts +32 -0
- package/dist/storage/methods.js +472 -0
- package/dist/storage/schemas.d.ts +842 -0
- package/dist/storage/schemas.js +175 -0
- package/dist/types.d.ts +4 -0
- package/dist/types.js +3 -0
- package/dist/users/methods.d.ts +16 -0
- package/dist/users/methods.js +277 -0
- package/dist/utils/ClientFactory.d.ts +87 -0
- package/dist/utils/ClientFactory.js +212 -0
- package/dist/utils/configDiscovery.d.ts +78 -0
- package/dist/utils/configDiscovery.js +472 -0
- package/dist/utils/configMigration.d.ts +1 -0
- package/dist/utils/configMigration.js +261 -0
- package/dist/utils/constantsGenerator.d.ts +31 -0
- package/dist/utils/constantsGenerator.js +321 -0
- package/dist/utils/dataConverters.d.ts +46 -0
- package/dist/utils/dataConverters.js +139 -0
- package/dist/utils/directoryUtils.d.ts +22 -0
- package/dist/utils/directoryUtils.js +59 -0
- package/dist/utils/getClientFromConfig.d.ts +39 -0
- package/dist/utils/getClientFromConfig.js +199 -0
- package/dist/utils/helperFunctions.d.ts +63 -0
- package/dist/utils/helperFunctions.js +156 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/loadConfigs.d.ts +50 -0
- package/dist/utils/loadConfigs.js +358 -0
- package/dist/utils/pathResolvers.d.ts +53 -0
- package/dist/utils/pathResolvers.js +72 -0
- package/dist/utils/projectConfig.d.ts +119 -0
- package/dist/utils/projectConfig.js +171 -0
- package/dist/utils/retryFailedPromises.d.ts +2 -0
- package/dist/utils/retryFailedPromises.js +23 -0
- package/dist/utils/sessionAuth.d.ts +48 -0
- package/dist/utils/sessionAuth.js +164 -0
- package/dist/utils/setupFiles.d.ts +4 -0
- package/dist/utils/setupFiles.js +1192 -0
- package/dist/utils/typeGuards.d.ts +35 -0
- package/dist/utils/typeGuards.js +57 -0
- package/dist/utils/validationRules.d.ts +43 -0
- package/dist/utils/validationRules.js +42 -0
- package/dist/utils/versionDetection.d.ts +58 -0
- package/dist/utils/versionDetection.js +251 -0
- package/dist/utils/yamlConverter.d.ts +100 -0
- package/dist/utils/yamlConverter.js +428 -0
- package/dist/utils/yamlLoader.d.ts +70 -0
- package/dist/utils/yamlLoader.js +267 -0
- package/dist/utilsController.d.ts +106 -0
- package/dist/utilsController.js +863 -0
- package/package.json +75 -0
- package/scripts/copy-templates.ts +23 -0
- package/src/adapters/AdapterFactory.ts +510 -0
- package/src/adapters/DatabaseAdapter.ts +306 -0
- package/src/adapters/LegacyAdapter.ts +841 -0
- package/src/adapters/TablesDBAdapter.ts +773 -0
- package/src/adapters/index.ts +37 -0
- package/src/backups/operations/bucketBackup.ts +277 -0
- package/src/backups/operations/collectionBackup.ts +310 -0
- package/src/backups/operations/comprehensiveBackup.ts +342 -0
- package/src/backups/schemas/bucketManifest.ts +78 -0
- package/src/backups/schemas/comprehensiveManifest.ts +76 -0
- package/src/backups/tracking/centralizedTracking.ts +352 -0
- package/src/cli/commands/configCommands.ts +201 -0
- package/src/cli/commands/databaseCommands.ts +749 -0
- package/src/cli/commands/functionCommands.ts +418 -0
- package/src/cli/commands/schemaCommands.ts +200 -0
- package/src/cli/commands/storageCommands.ts +152 -0
- package/src/cli/commands/transferCommands.ts +457 -0
- package/src/collections/attributes.ts +2054 -0
- package/src/collections/attributes.ts.backup +1555 -0
- package/src/collections/indexes.ts +352 -0
- package/src/collections/methods.ts +745 -0
- package/src/collections/tableOperations.ts +506 -0
- package/src/collections/transferOperations.ts +590 -0
- package/src/collections/wipeOperations.ts +346 -0
- package/src/config/ConfigManager.ts +808 -0
- package/src/config/README.md +274 -0
- package/src/config/configMigration.ts +575 -0
- package/src/config/configValidation.ts +445 -0
- package/src/config/index.ts +10 -0
- package/src/config/services/ConfigDiscoveryService.ts +463 -0
- package/src/config/services/ConfigLoaderService.ts +740 -0
- package/src/config/services/ConfigMergeService.ts +388 -0
- package/src/config/services/ConfigValidationService.ts +394 -0
- package/src/config/services/SessionAuthService.ts +565 -0
- package/src/config/services/__tests__/ConfigMergeService.test.ts +351 -0
- package/src/config/services/index.ts +29 -0
- package/src/config/yamlConfig.ts +761 -0
- package/src/databases/methods.ts +49 -0
- package/src/databases/setup.ts +77 -0
- package/src/examples/yamlTerminologyExample.ts +346 -0
- package/src/functions/deployments.ts +220 -0
- package/src/functions/fnConfigDiscovery.ts +103 -0
- package/src/functions/methods.ts +271 -0
- package/src/functions/pathResolution.ts +227 -0
- package/src/functions/templates/count-docs-in-collection/README.md +54 -0
- package/src/functions/templates/count-docs-in-collection/src/main.ts +159 -0
- package/src/functions/templates/count-docs-in-collection/src/request.ts +9 -0
- package/src/functions/templates/hono-typescript/README.md +286 -0
- package/src/functions/templates/hono-typescript/src/adapters/request.ts +74 -0
- package/src/functions/templates/hono-typescript/src/adapters/response.ts +106 -0
- package/src/functions/templates/hono-typescript/src/app.ts +180 -0
- package/src/functions/templates/hono-typescript/src/context.ts +103 -0
- package/src/functions/templates/hono-typescript/src/index.ts +54 -0
- package/src/functions/templates/hono-typescript/src/middleware/appwrite.ts +119 -0
- package/src/functions/templates/typescript-node/README.md +32 -0
- package/src/functions/templates/typescript-node/src/context.ts +103 -0
- package/src/functions/templates/typescript-node/src/index.ts +29 -0
- package/src/functions/templates/uv/README.md +31 -0
- package/src/functions/templates/uv/pyproject.toml +30 -0
- package/src/functions/templates/uv/src/__init__.py +0 -0
- package/src/functions/templates/uv/src/context.py +125 -0
- package/src/functions/templates/uv/src/index.py +46 -0
- package/src/init.ts +62 -0
- package/src/interactiveCLI.ts +1136 -0
- package/src/main.ts +1661 -0
- package/src/migrations/afterImportActions.ts +580 -0
- package/src/migrations/appwriteToX.ts +664 -0
- package/src/migrations/comprehensiveTransfer.ts +2285 -0
- package/src/migrations/dataLoader.ts +1702 -0
- package/src/migrations/importController.ts +428 -0
- package/src/migrations/importDataActions.ts +315 -0
- package/src/migrations/relationships.ts +334 -0
- package/src/migrations/services/DataTransformationService.ts +196 -0
- package/src/migrations/services/FileHandlerService.ts +311 -0
- package/src/migrations/services/ImportOrchestrator.ts +666 -0
- package/src/migrations/services/RateLimitManager.ts +363 -0
- package/src/migrations/services/RelationshipResolver.ts +461 -0
- package/src/migrations/services/UserMappingService.ts +345 -0
- package/src/migrations/services/ValidationService.ts +349 -0
- package/src/migrations/transfer.ts +1068 -0
- package/src/migrations/yaml/YamlImportConfigLoader.ts +439 -0
- package/src/migrations/yaml/YamlImportIntegration.ts +446 -0
- package/src/migrations/yaml/generateImportSchemas.ts +1354 -0
- package/src/schemas/authUser.ts +23 -0
- package/src/setup.ts +8 -0
- package/src/setupCommands.ts +603 -0
- package/src/setupController.ts +43 -0
- package/src/shared/attributeMapper.ts +229 -0
- package/src/shared/backupMetadataSchema.ts +93 -0
- package/src/shared/backupTracking.ts +211 -0
- package/src/shared/confirmationDialogs.ts +327 -0
- package/src/shared/errorUtils.ts +110 -0
- package/src/shared/functionManager.ts +525 -0
- package/src/shared/indexManager.ts +254 -0
- package/src/shared/jsonSchemaGenerator.ts +383 -0
- package/src/shared/logging.ts +149 -0
- package/src/shared/messageFormatter.ts +208 -0
- package/src/shared/migrationHelpers.ts +232 -0
- package/src/shared/operationLogger.ts +20 -0
- package/src/shared/operationQueue.ts +377 -0
- package/src/shared/operationsTable.ts +338 -0
- package/src/shared/operationsTableSchema.ts +60 -0
- package/src/shared/progressManager.ts +278 -0
- package/src/shared/pydanticModelGenerator.ts +618 -0
- package/src/shared/relationshipExtractor.ts +214 -0
- package/src/shared/schemaGenerator.ts +644 -0
- package/src/shared/selectionDialogs.ts +749 -0
- package/src/storage/backupCompression.ts +88 -0
- package/src/storage/methods.ts +698 -0
- package/src/storage/schemas.ts +205 -0
- package/src/types/node-appwrite-tablesdb.d.ts +44 -0
- package/src/types.ts +9 -0
- package/src/users/methods.ts +359 -0
- package/src/utils/ClientFactory.ts +240 -0
- package/src/utils/configDiscovery.ts +557 -0
- package/src/utils/configMigration.ts +348 -0
- package/src/utils/constantsGenerator.ts +369 -0
- package/src/utils/dataConverters.ts +159 -0
- package/src/utils/directoryUtils.ts +61 -0
- package/src/utils/getClientFromConfig.ts +257 -0
- package/src/utils/helperFunctions.ts +228 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/loadConfigs.ts +449 -0
- package/src/utils/pathResolvers.ts +81 -0
- package/src/utils/projectConfig.ts +299 -0
- package/src/utils/retryFailedPromises.ts +29 -0
- package/src/utils/sessionAuth.ts +230 -0
- package/src/utils/setupFiles.ts +1238 -0
- package/src/utils/typeGuards.ts +65 -0
- package/src/utils/validationRules.ts +88 -0
- package/src/utils/versionDetection.ts +292 -0
- package/src/utils/yamlConverter.ts +542 -0
- package/src/utils/yamlLoader.ts +371 -0
- package/src/utilsController.ts +1203 -0
- package/tests/README.md +497 -0
- package/tests/adapters/AdapterFactory.test.ts +277 -0
- package/tests/integration/syncOperations.test.ts +463 -0
- package/tests/jest.config.js +25 -0
- package/tests/migration/configMigration.test.ts +546 -0
- package/tests/setup.ts +62 -0
- package/tests/testUtils.ts +340 -0
- package/tests/utils/loadConfigs.test.ts +350 -0
- package/tests/validation/configValidation.test.ts +412 -0
- package/tsconfig.json +44 -0
|
@@ -0,0 +1,722 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type AppwriteConfig, type AppwriteFunction } from "@njdamstra/appwrite-utils";
|
|
3
|
+
declare const YamlConfigSchema: z.ZodObject<{
|
|
4
|
+
appwrite: z.ZodObject<{
|
|
5
|
+
endpoint: z.ZodDefault<z.ZodString>;
|
|
6
|
+
project: z.ZodString;
|
|
7
|
+
key: z.ZodString;
|
|
8
|
+
sessionCookie: z.ZodOptional<z.ZodString>;
|
|
9
|
+
authMethod: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
10
|
+
session: "session";
|
|
11
|
+
apikey: "apikey";
|
|
12
|
+
auto: "auto";
|
|
13
|
+
}>>>;
|
|
14
|
+
sessionMetadata: z.ZodOptional<z.ZodObject<{
|
|
15
|
+
email: z.ZodOptional<z.ZodString>;
|
|
16
|
+
expiresAt: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
logging: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
20
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
21
|
+
level: z.ZodDefault<z.ZodEnum<{
|
|
22
|
+
error: "error";
|
|
23
|
+
info: "info";
|
|
24
|
+
debug: "debug";
|
|
25
|
+
warn: "warn";
|
|
26
|
+
}>>;
|
|
27
|
+
directory: z.ZodOptional<z.ZodString>;
|
|
28
|
+
console: z.ZodDefault<z.ZodBoolean>;
|
|
29
|
+
}, z.core.$strip>>>;
|
|
30
|
+
backups: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
31
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
32
|
+
interval: z.ZodDefault<z.ZodNumber>;
|
|
33
|
+
retention: z.ZodDefault<z.ZodNumber>;
|
|
34
|
+
cleanup: z.ZodDefault<z.ZodBoolean>;
|
|
35
|
+
}, z.core.$strip>>>;
|
|
36
|
+
data: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
37
|
+
enableMockData: z.ZodDefault<z.ZodBoolean>;
|
|
38
|
+
documentBucketId: z.ZodDefault<z.ZodString>;
|
|
39
|
+
usersCollectionName: z.ZodDefault<z.ZodString>;
|
|
40
|
+
importDirectory: z.ZodDefault<z.ZodString>;
|
|
41
|
+
}, z.core.$strip>>>;
|
|
42
|
+
schemas: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
43
|
+
outputDirectory: z.ZodDefault<z.ZodString>;
|
|
44
|
+
yamlSchemaDirectory: z.ZodDefault<z.ZodString>;
|
|
45
|
+
collectionsDirectory: z.ZodDefault<z.ZodString>;
|
|
46
|
+
tablesDirectory: z.ZodDefault<z.ZodString>;
|
|
47
|
+
}, z.core.$strip>>>;
|
|
48
|
+
migrations: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
49
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
50
|
+
}, z.core.$strip>>>;
|
|
51
|
+
databases: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
bucket: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
id: z.ZodString;
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
permissions: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
58
|
+
permission: z.ZodString;
|
|
59
|
+
target: z.ZodString;
|
|
60
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
61
|
+
permission: string;
|
|
62
|
+
target: string;
|
|
63
|
+
}, string>>]>>>;
|
|
64
|
+
fileSecurity: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
maximumFileSize: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
allowedFileExtensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
68
|
+
compression: z.ZodOptional<z.ZodEnum<{
|
|
69
|
+
none: "none";
|
|
70
|
+
gzip: "gzip";
|
|
71
|
+
zstd: "zstd";
|
|
72
|
+
}>>;
|
|
73
|
+
encryption: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
+
antivirus: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
}, z.core.$strip>>;
|
|
76
|
+
}, z.core.$strip>>>>;
|
|
77
|
+
buckets: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
78
|
+
id: z.ZodString;
|
|
79
|
+
name: z.ZodString;
|
|
80
|
+
permissions: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
81
|
+
permission: z.ZodString;
|
|
82
|
+
target: z.ZodString;
|
|
83
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
84
|
+
permission: string;
|
|
85
|
+
target: string;
|
|
86
|
+
}, string>>]>>>;
|
|
87
|
+
fileSecurity: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
89
|
+
maximumFileSize: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
allowedFileExtensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
91
|
+
compression: z.ZodOptional<z.ZodEnum<{
|
|
92
|
+
none: "none";
|
|
93
|
+
gzip: "gzip";
|
|
94
|
+
zstd: "zstd";
|
|
95
|
+
}>>;
|
|
96
|
+
encryption: z.ZodOptional<z.ZodBoolean>;
|
|
97
|
+
antivirus: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
+
}, z.core.$strip>>>>;
|
|
99
|
+
functions: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
100
|
+
id: z.ZodString;
|
|
101
|
+
name: z.ZodString;
|
|
102
|
+
runtime: any;
|
|
103
|
+
execute: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
104
|
+
events: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
105
|
+
schedule: z.ZodOptional<z.ZodString>;
|
|
106
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
108
|
+
logging: z.ZodOptional<z.ZodBoolean>;
|
|
109
|
+
entrypoint: z.ZodOptional<z.ZodString>;
|
|
110
|
+
commands: z.ZodOptional<z.ZodString>;
|
|
111
|
+
scopes: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<"users.read" | "users.write" | "sessions.read" | "sessions.write" | "teams.read" | "teams.write" | "databases.read" | "databases.write" | "collections.read" | "collections.write" | "tables.read" | "tables.write" | "attributes.read" | "attributes.write" | "indexes.read" | "indexes.write" | "documents.read" | "documents.write" | "rows.read" | "rows.write" | "files.read" | "files.write" | "buckets.read" | "buckets.write" | "functions.read" | "functions.write" | "execution.read" | "execution.write" | "locale.read" | "avatars.read" | "health.read" | "rules.read" | "rules.write" | "migrations.read" | "migrations.write" | "sites.read" | "sites.write" | "log.read" | "log.write" | "tokens.read" | "tokens.write" | "vcs.read" | "vcs.write" | "assistant.read" | "messages.read" | "messages.write" | "targets.read" | "targets.write" | "providers.read" | "providers.write" | "topics.read" | "topics.write" | "subscribers.read" | "subscribers.write", string, z.core.$ZodTypeInternals<"users.read" | "users.write" | "sessions.read" | "sessions.write" | "teams.read" | "teams.write" | "databases.read" | "databases.write" | "collections.read" | "collections.write" | "tables.read" | "tables.write" | "attributes.read" | "attributes.write" | "indexes.read" | "indexes.write" | "documents.read" | "documents.write" | "rows.read" | "rows.write" | "files.read" | "files.write" | "buckets.read" | "buckets.write" | "functions.read" | "functions.write" | "execution.read" | "execution.write" | "locale.read" | "avatars.read" | "health.read" | "rules.read" | "rules.write" | "migrations.read" | "migrations.write" | "sites.read" | "sites.write" | "log.read" | "log.write" | "tokens.read" | "tokens.write" | "vcs.read" | "vcs.write" | "assistant.read" | "messages.read" | "messages.write" | "targets.read" | "targets.write" | "providers.read" | "providers.write" | "topics.read" | "topics.write" | "subscribers.read" | "subscribers.write", string>>>>;
|
|
112
|
+
installationId: z.ZodOptional<z.ZodString>;
|
|
113
|
+
providerRepositoryId: z.ZodOptional<z.ZodString>;
|
|
114
|
+
providerBranch: z.ZodOptional<z.ZodString>;
|
|
115
|
+
providerSilentMode: z.ZodOptional<z.ZodBoolean>;
|
|
116
|
+
providerRootDirectory: z.ZodOptional<z.ZodString>;
|
|
117
|
+
templateRepository: z.ZodOptional<z.ZodString>;
|
|
118
|
+
templateOwner: z.ZodOptional<z.ZodString>;
|
|
119
|
+
templateRootDirectory: z.ZodOptional<z.ZodString>;
|
|
120
|
+
templateBranch: z.ZodOptional<z.ZodString>;
|
|
121
|
+
specification: z.ZodOptional<z.ZodString & z.ZodType<"s-0.5vcpu-512mb" | "s-1vcpu-512mb" | "s-1vcpu-1gb" | "s-2vcpu-2gb" | "s-2vcpu-4gb" | "s-4vcpu-4gb" | "s-4vcpu-8gb" | "s-8vcpu-4gb" | "s-8vcpu-8gb", string, z.core.$ZodTypeInternals<"s-0.5vcpu-512mb" | "s-1vcpu-512mb" | "s-1vcpu-1gb" | "s-2vcpu-2gb" | "s-2vcpu-4gb" | "s-4vcpu-4gb" | "s-4vcpu-8gb" | "s-8vcpu-4gb" | "s-8vcpu-8gb", string>>>;
|
|
122
|
+
dirPath: z.ZodOptional<z.ZodString>;
|
|
123
|
+
predeployCommands: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
124
|
+
deployDir: z.ZodOptional<z.ZodString>;
|
|
125
|
+
ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
126
|
+
templateVersion: z.ZodOptional<z.ZodString>;
|
|
127
|
+
}, z.core.$strip>>>>;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
export type YamlConfig = z.infer<typeof YamlConfigSchema>;
|
|
130
|
+
export declare const convertYamlToAppwriteConfig: (yamlConfig: YamlConfig) => AppwriteConfig;
|
|
131
|
+
/**
|
|
132
|
+
* Enhanced config loading with session authentication support
|
|
133
|
+
* Supports session override options for preserving session state
|
|
134
|
+
*/
|
|
135
|
+
export interface YamlSessionOptions {
|
|
136
|
+
sessionCookie?: string;
|
|
137
|
+
authMethod?: "session" | "apikey" | "auto";
|
|
138
|
+
sessionMetadata?: {
|
|
139
|
+
email?: string;
|
|
140
|
+
expiresAt?: string;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Load YAML config with optional session preservation
|
|
145
|
+
* Maintains authentication priority: explicit session > YAML file > system prefs
|
|
146
|
+
*/
|
|
147
|
+
export declare const loadYamlConfigWithSession: (configPath: string, sessionOptions?: YamlSessionOptions) => Promise<AppwriteConfig | null>;
|
|
148
|
+
export declare const loadYamlConfig: (configPath: string) => Promise<AppwriteConfig | null>;
|
|
149
|
+
export declare const findYamlConfig: (startDir: string) => string | null;
|
|
150
|
+
export declare const generateYamlConfigTemplate: (outputPath: string) => void;
|
|
151
|
+
/**
|
|
152
|
+
* Converts AppwriteConfig back to YAML format and writes to file
|
|
153
|
+
* @param configPath Path to the YAML config file
|
|
154
|
+
* @param config The AppwriteConfig to convert and save
|
|
155
|
+
*/
|
|
156
|
+
export declare const writeYamlConfig: (configPath: string, config: AppwriteConfig) => Promise<void>;
|
|
157
|
+
/**
|
|
158
|
+
* Adds a new function to the YAML config file
|
|
159
|
+
* @param configPath Path to the YAML config file
|
|
160
|
+
* @param newFunction The function configuration to add
|
|
161
|
+
*/
|
|
162
|
+
export declare const addFunctionToYamlConfig: (configPath: string, newFunction: AppwriteFunction) => Promise<void>;
|
|
163
|
+
/**
|
|
164
|
+
* Extract session options from AppwriteConfig for YAML operations
|
|
165
|
+
* Useful for preserving session state during config reloads
|
|
166
|
+
*/
|
|
167
|
+
export declare const extractSessionOptionsFromConfig: (config: AppwriteConfig) => YamlSessionOptions;
|
|
168
|
+
/**
|
|
169
|
+
* Create session-preserved YAML config operations
|
|
170
|
+
* Maintains authentication state during config file updates
|
|
171
|
+
*/
|
|
172
|
+
export declare const createSessionPreservingYamlConfig: (configPath: string, sessionOptions: YamlSessionOptions) => {
|
|
173
|
+
load: () => Promise<{
|
|
174
|
+
appwriteEndpoint: string;
|
|
175
|
+
appwriteProject: string;
|
|
176
|
+
appwriteKey: string;
|
|
177
|
+
appwriteClient: any;
|
|
178
|
+
authMethod: "session" | "apikey" | "auto";
|
|
179
|
+
logging: {
|
|
180
|
+
enabled: boolean;
|
|
181
|
+
level: "error" | "warn" | "info" | "debug";
|
|
182
|
+
console: boolean;
|
|
183
|
+
logDirectory?: string | undefined;
|
|
184
|
+
};
|
|
185
|
+
enableBackups: boolean;
|
|
186
|
+
backupInterval: number;
|
|
187
|
+
backupRetention: number;
|
|
188
|
+
enableBackupCleanup: boolean;
|
|
189
|
+
enableMockData: boolean;
|
|
190
|
+
documentBucketId: string;
|
|
191
|
+
usersCollectionName: string;
|
|
192
|
+
databases: {
|
|
193
|
+
$id: string;
|
|
194
|
+
name: string;
|
|
195
|
+
bucket?: {
|
|
196
|
+
$id: string;
|
|
197
|
+
name: string;
|
|
198
|
+
permissions?: ({
|
|
199
|
+
permission: string;
|
|
200
|
+
target: string;
|
|
201
|
+
} | {
|
|
202
|
+
permission: string;
|
|
203
|
+
target: string;
|
|
204
|
+
})[] | undefined;
|
|
205
|
+
fileSecurity?: boolean | undefined;
|
|
206
|
+
enabled?: boolean | undefined;
|
|
207
|
+
maximumFileSize?: number | undefined;
|
|
208
|
+
allowedFileExtensions?: string[] | undefined;
|
|
209
|
+
compression?: "none" | "gzip" | "zstd" | undefined;
|
|
210
|
+
encryption?: boolean | undefined;
|
|
211
|
+
antivirus?: boolean | undefined;
|
|
212
|
+
} | undefined;
|
|
213
|
+
}[];
|
|
214
|
+
buckets: {
|
|
215
|
+
$id: string;
|
|
216
|
+
name: string;
|
|
217
|
+
permissions?: ({
|
|
218
|
+
permission: string;
|
|
219
|
+
target: string;
|
|
220
|
+
} | {
|
|
221
|
+
permission: string;
|
|
222
|
+
target: string;
|
|
223
|
+
})[] | undefined;
|
|
224
|
+
fileSecurity?: boolean | undefined;
|
|
225
|
+
enabled?: boolean | undefined;
|
|
226
|
+
maximumFileSize?: number | undefined;
|
|
227
|
+
allowedFileExtensions?: string[] | undefined;
|
|
228
|
+
compression?: "none" | "gzip" | "zstd" | undefined;
|
|
229
|
+
encryption?: boolean | undefined;
|
|
230
|
+
antivirus?: boolean | undefined;
|
|
231
|
+
}[];
|
|
232
|
+
apiMode: "auto" | "legacy" | "tablesdb";
|
|
233
|
+
sessionCookie?: string | undefined;
|
|
234
|
+
sessionMetadata?: {
|
|
235
|
+
email?: string | undefined;
|
|
236
|
+
expiresAt?: string | undefined;
|
|
237
|
+
} | undefined;
|
|
238
|
+
collections?: {
|
|
239
|
+
name: string;
|
|
240
|
+
attributes: ({
|
|
241
|
+
key: string;
|
|
242
|
+
required: boolean;
|
|
243
|
+
type: "integer";
|
|
244
|
+
array?: boolean | undefined;
|
|
245
|
+
format?: string | undefined;
|
|
246
|
+
status?: string | undefined;
|
|
247
|
+
attributes?: string[] | undefined;
|
|
248
|
+
orders?: string[] | undefined;
|
|
249
|
+
$createdAt?: string | undefined;
|
|
250
|
+
$updatedAt?: string | undefined;
|
|
251
|
+
error?: string | undefined;
|
|
252
|
+
min?: number | undefined;
|
|
253
|
+
max?: number | undefined;
|
|
254
|
+
xdefault?: number | null | undefined;
|
|
255
|
+
} | {
|
|
256
|
+
key: string;
|
|
257
|
+
required: boolean;
|
|
258
|
+
type: "relationship";
|
|
259
|
+
relatedCollection: string;
|
|
260
|
+
relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
|
|
261
|
+
twoWay: boolean;
|
|
262
|
+
onDelete: "setNull" | "cascade" | "restrict";
|
|
263
|
+
array?: boolean | undefined;
|
|
264
|
+
format?: string | undefined;
|
|
265
|
+
status?: string | undefined;
|
|
266
|
+
attributes?: string[] | undefined;
|
|
267
|
+
orders?: string[] | undefined;
|
|
268
|
+
$createdAt?: string | undefined;
|
|
269
|
+
$updatedAt?: string | undefined;
|
|
270
|
+
error?: string | undefined;
|
|
271
|
+
twoWayKey?: string | undefined;
|
|
272
|
+
side?: "parent" | "child" | undefined;
|
|
273
|
+
importMapping?: {
|
|
274
|
+
originalIdField: string;
|
|
275
|
+
targetField?: string | undefined;
|
|
276
|
+
} | undefined;
|
|
277
|
+
} | {
|
|
278
|
+
key: string;
|
|
279
|
+
required: boolean;
|
|
280
|
+
type: "string";
|
|
281
|
+
size: number;
|
|
282
|
+
array?: boolean | undefined;
|
|
283
|
+
format?: string | undefined;
|
|
284
|
+
status?: string | undefined;
|
|
285
|
+
attributes?: string[] | undefined;
|
|
286
|
+
orders?: string[] | undefined;
|
|
287
|
+
$createdAt?: string | undefined;
|
|
288
|
+
$updatedAt?: string | undefined;
|
|
289
|
+
error?: string | undefined;
|
|
290
|
+
xdefault?: string | null | undefined;
|
|
291
|
+
encrypt?: boolean | undefined;
|
|
292
|
+
} | {
|
|
293
|
+
key: string;
|
|
294
|
+
required: boolean;
|
|
295
|
+
type: "double";
|
|
296
|
+
array?: boolean | undefined;
|
|
297
|
+
format?: string | undefined;
|
|
298
|
+
status?: string | undefined;
|
|
299
|
+
attributes?: string[] | undefined;
|
|
300
|
+
orders?: string[] | undefined;
|
|
301
|
+
$createdAt?: string | undefined;
|
|
302
|
+
$updatedAt?: string | undefined;
|
|
303
|
+
error?: string | undefined;
|
|
304
|
+
min?: number | undefined;
|
|
305
|
+
max?: number | undefined;
|
|
306
|
+
xdefault?: number | null | undefined;
|
|
307
|
+
} | {
|
|
308
|
+
key: string;
|
|
309
|
+
required: boolean;
|
|
310
|
+
type: "float";
|
|
311
|
+
array?: boolean | undefined;
|
|
312
|
+
format?: string | undefined;
|
|
313
|
+
status?: string | undefined;
|
|
314
|
+
attributes?: string[] | undefined;
|
|
315
|
+
orders?: string[] | undefined;
|
|
316
|
+
$createdAt?: string | undefined;
|
|
317
|
+
$updatedAt?: string | undefined;
|
|
318
|
+
error?: string | undefined;
|
|
319
|
+
min?: number | undefined;
|
|
320
|
+
max?: number | undefined;
|
|
321
|
+
xdefault?: number | null | undefined;
|
|
322
|
+
} | {
|
|
323
|
+
key: string;
|
|
324
|
+
required: boolean;
|
|
325
|
+
type: "boolean";
|
|
326
|
+
array?: boolean | undefined;
|
|
327
|
+
format?: string | undefined;
|
|
328
|
+
status?: string | undefined;
|
|
329
|
+
attributes?: string[] | undefined;
|
|
330
|
+
orders?: string[] | undefined;
|
|
331
|
+
$createdAt?: string | undefined;
|
|
332
|
+
$updatedAt?: string | undefined;
|
|
333
|
+
error?: string | undefined;
|
|
334
|
+
xdefault?: boolean | null | undefined;
|
|
335
|
+
} | {
|
|
336
|
+
key: string;
|
|
337
|
+
required: boolean;
|
|
338
|
+
type: "datetime";
|
|
339
|
+
array?: boolean | undefined;
|
|
340
|
+
format?: string | undefined;
|
|
341
|
+
status?: string | undefined;
|
|
342
|
+
attributes?: string[] | undefined;
|
|
343
|
+
orders?: string[] | undefined;
|
|
344
|
+
$createdAt?: string | undefined;
|
|
345
|
+
$updatedAt?: string | undefined;
|
|
346
|
+
error?: string | undefined;
|
|
347
|
+
xdefault?: string | null | undefined;
|
|
348
|
+
} | {
|
|
349
|
+
key: string;
|
|
350
|
+
required: boolean;
|
|
351
|
+
type: "email";
|
|
352
|
+
array?: boolean | undefined;
|
|
353
|
+
format?: string | undefined;
|
|
354
|
+
status?: string | undefined;
|
|
355
|
+
attributes?: string[] | undefined;
|
|
356
|
+
orders?: string[] | undefined;
|
|
357
|
+
$createdAt?: string | undefined;
|
|
358
|
+
$updatedAt?: string | undefined;
|
|
359
|
+
error?: string | undefined;
|
|
360
|
+
xdefault?: string | null | undefined;
|
|
361
|
+
} | {
|
|
362
|
+
key: string;
|
|
363
|
+
required: boolean;
|
|
364
|
+
type: "ip";
|
|
365
|
+
array?: boolean | undefined;
|
|
366
|
+
format?: string | undefined;
|
|
367
|
+
status?: string | undefined;
|
|
368
|
+
attributes?: string[] | undefined;
|
|
369
|
+
orders?: string[] | undefined;
|
|
370
|
+
$createdAt?: string | undefined;
|
|
371
|
+
$updatedAt?: string | undefined;
|
|
372
|
+
error?: string | undefined;
|
|
373
|
+
xdefault?: string | null | undefined;
|
|
374
|
+
} | {
|
|
375
|
+
key: string;
|
|
376
|
+
required: boolean;
|
|
377
|
+
type: "url";
|
|
378
|
+
array?: boolean | undefined;
|
|
379
|
+
format?: string | undefined;
|
|
380
|
+
status?: string | undefined;
|
|
381
|
+
attributes?: string[] | undefined;
|
|
382
|
+
orders?: string[] | undefined;
|
|
383
|
+
$createdAt?: string | undefined;
|
|
384
|
+
$updatedAt?: string | undefined;
|
|
385
|
+
error?: string | undefined;
|
|
386
|
+
xdefault?: string | null | undefined;
|
|
387
|
+
} | {
|
|
388
|
+
key: string;
|
|
389
|
+
required: boolean;
|
|
390
|
+
type: "enum";
|
|
391
|
+
elements: string[];
|
|
392
|
+
array?: boolean | undefined;
|
|
393
|
+
format?: string | undefined;
|
|
394
|
+
status?: string | undefined;
|
|
395
|
+
attributes?: string[] | undefined;
|
|
396
|
+
orders?: string[] | undefined;
|
|
397
|
+
$createdAt?: string | undefined;
|
|
398
|
+
$updatedAt?: string | undefined;
|
|
399
|
+
error?: string | undefined;
|
|
400
|
+
xdefault?: string | null | undefined;
|
|
401
|
+
})[];
|
|
402
|
+
$permissions: {
|
|
403
|
+
permission: string;
|
|
404
|
+
target: string;
|
|
405
|
+
}[];
|
|
406
|
+
indexes: {
|
|
407
|
+
key: string;
|
|
408
|
+
type: "key" | "unique" | "fulltext";
|
|
409
|
+
attributes: string[];
|
|
410
|
+
status?: string | undefined;
|
|
411
|
+
error?: string | undefined;
|
|
412
|
+
orders?: string[] | undefined;
|
|
413
|
+
}[];
|
|
414
|
+
importDefs: {
|
|
415
|
+
filePath: string;
|
|
416
|
+
primaryKeyField: string;
|
|
417
|
+
attributeMappings: {
|
|
418
|
+
targetKey: string;
|
|
419
|
+
oldKey?: string | undefined;
|
|
420
|
+
oldKeys?: string[] | undefined;
|
|
421
|
+
valueToSet?: any;
|
|
422
|
+
fileData?: {
|
|
423
|
+
name: string;
|
|
424
|
+
path: string;
|
|
425
|
+
} | undefined;
|
|
426
|
+
converters?: string[] | undefined;
|
|
427
|
+
validationActions?: {
|
|
428
|
+
action: string;
|
|
429
|
+
params: string[];
|
|
430
|
+
}[] | undefined;
|
|
431
|
+
postImportActions?: {
|
|
432
|
+
action: string;
|
|
433
|
+
params: (string | Record<string, any>)[];
|
|
434
|
+
}[] | undefined;
|
|
435
|
+
}[];
|
|
436
|
+
type?: "create" | "update" | undefined;
|
|
437
|
+
basePath?: string | undefined;
|
|
438
|
+
idMappings?: {
|
|
439
|
+
sourceField: string;
|
|
440
|
+
targetField: string;
|
|
441
|
+
targetCollection: string;
|
|
442
|
+
fieldToSet?: string | undefined;
|
|
443
|
+
targetFieldToMatch?: string | undefined;
|
|
444
|
+
}[] | undefined;
|
|
445
|
+
createUsers?: boolean | null | undefined;
|
|
446
|
+
updateMapping?: {
|
|
447
|
+
originalIdField: string;
|
|
448
|
+
targetField: string;
|
|
449
|
+
} | undefined;
|
|
450
|
+
}[];
|
|
451
|
+
$id?: string | undefined;
|
|
452
|
+
enabled?: boolean | undefined;
|
|
453
|
+
documentSecurity?: boolean | undefined;
|
|
454
|
+
databaseId?: string | undefined;
|
|
455
|
+
databaseIds?: string[] | undefined;
|
|
456
|
+
}[] | undefined;
|
|
457
|
+
tables?: {
|
|
458
|
+
attributes: ({
|
|
459
|
+
key: string;
|
|
460
|
+
required: boolean;
|
|
461
|
+
type: "integer";
|
|
462
|
+
array?: boolean | undefined;
|
|
463
|
+
format?: string | undefined;
|
|
464
|
+
status?: string | undefined;
|
|
465
|
+
attributes?: string[] | undefined;
|
|
466
|
+
orders?: string[] | undefined;
|
|
467
|
+
$createdAt?: string | undefined;
|
|
468
|
+
$updatedAt?: string | undefined;
|
|
469
|
+
error?: string | undefined;
|
|
470
|
+
min?: number | undefined;
|
|
471
|
+
max?: number | undefined;
|
|
472
|
+
xdefault?: number | null | undefined;
|
|
473
|
+
} | {
|
|
474
|
+
key: string;
|
|
475
|
+
required: boolean;
|
|
476
|
+
type: "relationship";
|
|
477
|
+
relatedCollection: string;
|
|
478
|
+
relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
|
|
479
|
+
twoWay: boolean;
|
|
480
|
+
onDelete: "setNull" | "cascade" | "restrict";
|
|
481
|
+
array?: boolean | undefined;
|
|
482
|
+
format?: string | undefined;
|
|
483
|
+
status?: string | undefined;
|
|
484
|
+
attributes?: string[] | undefined;
|
|
485
|
+
orders?: string[] | undefined;
|
|
486
|
+
$createdAt?: string | undefined;
|
|
487
|
+
$updatedAt?: string | undefined;
|
|
488
|
+
error?: string | undefined;
|
|
489
|
+
twoWayKey?: string | undefined;
|
|
490
|
+
side?: "parent" | "child" | undefined;
|
|
491
|
+
importMapping?: {
|
|
492
|
+
originalIdField: string;
|
|
493
|
+
targetField?: string | undefined;
|
|
494
|
+
} | undefined;
|
|
495
|
+
} | {
|
|
496
|
+
key: string;
|
|
497
|
+
required: boolean;
|
|
498
|
+
type: "string";
|
|
499
|
+
size: number;
|
|
500
|
+
array?: boolean | undefined;
|
|
501
|
+
format?: string | undefined;
|
|
502
|
+
status?: string | undefined;
|
|
503
|
+
attributes?: string[] | undefined;
|
|
504
|
+
orders?: string[] | undefined;
|
|
505
|
+
$createdAt?: string | undefined;
|
|
506
|
+
$updatedAt?: string | undefined;
|
|
507
|
+
error?: string | undefined;
|
|
508
|
+
xdefault?: string | null | undefined;
|
|
509
|
+
encrypt?: boolean | undefined;
|
|
510
|
+
} | {
|
|
511
|
+
key: string;
|
|
512
|
+
required: boolean;
|
|
513
|
+
type: "double";
|
|
514
|
+
array?: boolean | undefined;
|
|
515
|
+
format?: string | undefined;
|
|
516
|
+
status?: string | undefined;
|
|
517
|
+
attributes?: string[] | undefined;
|
|
518
|
+
orders?: string[] | undefined;
|
|
519
|
+
$createdAt?: string | undefined;
|
|
520
|
+
$updatedAt?: string | undefined;
|
|
521
|
+
error?: string | undefined;
|
|
522
|
+
min?: number | undefined;
|
|
523
|
+
max?: number | undefined;
|
|
524
|
+
xdefault?: number | null | undefined;
|
|
525
|
+
} | {
|
|
526
|
+
key: string;
|
|
527
|
+
required: boolean;
|
|
528
|
+
type: "float";
|
|
529
|
+
array?: boolean | undefined;
|
|
530
|
+
format?: string | undefined;
|
|
531
|
+
status?: string | undefined;
|
|
532
|
+
attributes?: string[] | undefined;
|
|
533
|
+
orders?: string[] | undefined;
|
|
534
|
+
$createdAt?: string | undefined;
|
|
535
|
+
$updatedAt?: string | undefined;
|
|
536
|
+
error?: string | undefined;
|
|
537
|
+
min?: number | undefined;
|
|
538
|
+
max?: number | undefined;
|
|
539
|
+
xdefault?: number | null | undefined;
|
|
540
|
+
} | {
|
|
541
|
+
key: string;
|
|
542
|
+
required: boolean;
|
|
543
|
+
type: "boolean";
|
|
544
|
+
array?: boolean | undefined;
|
|
545
|
+
format?: string | undefined;
|
|
546
|
+
status?: string | undefined;
|
|
547
|
+
attributes?: string[] | undefined;
|
|
548
|
+
orders?: string[] | undefined;
|
|
549
|
+
$createdAt?: string | undefined;
|
|
550
|
+
$updatedAt?: string | undefined;
|
|
551
|
+
error?: string | undefined;
|
|
552
|
+
xdefault?: boolean | null | undefined;
|
|
553
|
+
} | {
|
|
554
|
+
key: string;
|
|
555
|
+
required: boolean;
|
|
556
|
+
type: "datetime";
|
|
557
|
+
array?: boolean | undefined;
|
|
558
|
+
format?: string | undefined;
|
|
559
|
+
status?: string | undefined;
|
|
560
|
+
attributes?: string[] | undefined;
|
|
561
|
+
orders?: string[] | undefined;
|
|
562
|
+
$createdAt?: string | undefined;
|
|
563
|
+
$updatedAt?: string | undefined;
|
|
564
|
+
error?: string | undefined;
|
|
565
|
+
xdefault?: string | null | undefined;
|
|
566
|
+
} | {
|
|
567
|
+
key: string;
|
|
568
|
+
required: boolean;
|
|
569
|
+
type: "email";
|
|
570
|
+
array?: boolean | undefined;
|
|
571
|
+
format?: string | undefined;
|
|
572
|
+
status?: string | undefined;
|
|
573
|
+
attributes?: string[] | undefined;
|
|
574
|
+
orders?: string[] | undefined;
|
|
575
|
+
$createdAt?: string | undefined;
|
|
576
|
+
$updatedAt?: string | undefined;
|
|
577
|
+
error?: string | undefined;
|
|
578
|
+
xdefault?: string | null | undefined;
|
|
579
|
+
} | {
|
|
580
|
+
key: string;
|
|
581
|
+
required: boolean;
|
|
582
|
+
type: "ip";
|
|
583
|
+
array?: boolean | undefined;
|
|
584
|
+
format?: string | undefined;
|
|
585
|
+
status?: string | undefined;
|
|
586
|
+
attributes?: string[] | undefined;
|
|
587
|
+
orders?: string[] | undefined;
|
|
588
|
+
$createdAt?: string | undefined;
|
|
589
|
+
$updatedAt?: string | undefined;
|
|
590
|
+
error?: string | undefined;
|
|
591
|
+
xdefault?: string | null | undefined;
|
|
592
|
+
} | {
|
|
593
|
+
key: string;
|
|
594
|
+
required: boolean;
|
|
595
|
+
type: "url";
|
|
596
|
+
array?: boolean | undefined;
|
|
597
|
+
format?: string | undefined;
|
|
598
|
+
status?: string | undefined;
|
|
599
|
+
attributes?: string[] | undefined;
|
|
600
|
+
orders?: string[] | undefined;
|
|
601
|
+
$createdAt?: string | undefined;
|
|
602
|
+
$updatedAt?: string | undefined;
|
|
603
|
+
error?: string | undefined;
|
|
604
|
+
xdefault?: string | null | undefined;
|
|
605
|
+
} | {
|
|
606
|
+
key: string;
|
|
607
|
+
required: boolean;
|
|
608
|
+
type: "enum";
|
|
609
|
+
elements: string[];
|
|
610
|
+
array?: boolean | undefined;
|
|
611
|
+
format?: string | undefined;
|
|
612
|
+
status?: string | undefined;
|
|
613
|
+
attributes?: string[] | undefined;
|
|
614
|
+
orders?: string[] | undefined;
|
|
615
|
+
$createdAt?: string | undefined;
|
|
616
|
+
$updatedAt?: string | undefined;
|
|
617
|
+
error?: string | undefined;
|
|
618
|
+
xdefault?: string | null | undefined;
|
|
619
|
+
})[];
|
|
620
|
+
columns: undefined;
|
|
621
|
+
indexes: {
|
|
622
|
+
key: string;
|
|
623
|
+
type: "key" | "unique" | "fulltext";
|
|
624
|
+
attributes: string[];
|
|
625
|
+
status?: string | undefined;
|
|
626
|
+
error?: string | undefined;
|
|
627
|
+
orders?: string[] | undefined;
|
|
628
|
+
}[];
|
|
629
|
+
name: string;
|
|
630
|
+
$permissions: {
|
|
631
|
+
permission: string;
|
|
632
|
+
target: string;
|
|
633
|
+
}[];
|
|
634
|
+
importDefs: {
|
|
635
|
+
filePath: string;
|
|
636
|
+
primaryKeyField: string;
|
|
637
|
+
attributeMappings: {
|
|
638
|
+
targetKey: string;
|
|
639
|
+
oldKey?: string | undefined;
|
|
640
|
+
oldKeys?: string[] | undefined;
|
|
641
|
+
valueToSet?: any;
|
|
642
|
+
fileData?: {
|
|
643
|
+
name: string;
|
|
644
|
+
path: string;
|
|
645
|
+
} | undefined;
|
|
646
|
+
converters?: string[] | undefined;
|
|
647
|
+
validationActions?: {
|
|
648
|
+
action: string;
|
|
649
|
+
params: string[];
|
|
650
|
+
}[] | undefined;
|
|
651
|
+
postImportActions?: {
|
|
652
|
+
action: string;
|
|
653
|
+
params: (string | Record<string, any>)[];
|
|
654
|
+
}[] | undefined;
|
|
655
|
+
}[];
|
|
656
|
+
type?: "create" | "update" | undefined;
|
|
657
|
+
basePath?: string | undefined;
|
|
658
|
+
idMappings?: {
|
|
659
|
+
sourceField: string;
|
|
660
|
+
targetField: string;
|
|
661
|
+
targetCollection: string;
|
|
662
|
+
fieldToSet?: string | undefined;
|
|
663
|
+
targetFieldToMatch?: string | undefined;
|
|
664
|
+
}[] | undefined;
|
|
665
|
+
createUsers?: boolean | null | undefined;
|
|
666
|
+
updateMapping?: {
|
|
667
|
+
originalIdField: string;
|
|
668
|
+
targetField: string;
|
|
669
|
+
} | undefined;
|
|
670
|
+
}[];
|
|
671
|
+
$id?: string | undefined;
|
|
672
|
+
enabled?: boolean | undefined;
|
|
673
|
+
documentSecurity?: boolean | undefined;
|
|
674
|
+
databaseId?: string | undefined;
|
|
675
|
+
databaseIds?: string[] | undefined;
|
|
676
|
+
tableId?: string | undefined;
|
|
677
|
+
rowSecurity?: boolean | undefined;
|
|
678
|
+
}[] | undefined;
|
|
679
|
+
functions?: {
|
|
680
|
+
$id: string;
|
|
681
|
+
name: string;
|
|
682
|
+
runtime: any;
|
|
683
|
+
execute: string[];
|
|
684
|
+
events: string[];
|
|
685
|
+
dirPath?: string | undefined;
|
|
686
|
+
schedule?: string | undefined;
|
|
687
|
+
timeout?: number | undefined;
|
|
688
|
+
enabled?: boolean | undefined;
|
|
689
|
+
logging?: boolean | undefined;
|
|
690
|
+
ignore?: string[] | undefined;
|
|
691
|
+
entrypoint?: string | undefined;
|
|
692
|
+
predeployCommands?: string[] | undefined;
|
|
693
|
+
deployDir?: string | undefined;
|
|
694
|
+
commands?: string | undefined;
|
|
695
|
+
scopes?: ("users.read" | "users.write" | "sessions.read" | "sessions.write" | "teams.read" | "teams.write" | "databases.read" | "databases.write" | "collections.read" | "collections.write" | "tables.read" | "tables.write" | "attributes.read" | "attributes.write" | "indexes.read" | "indexes.write" | "documents.read" | "documents.write" | "rows.read" | "rows.write" | "files.read" | "files.write" | "buckets.read" | "buckets.write" | "functions.read" | "functions.write" | "execution.read" | "execution.write" | "locale.read" | "avatars.read" | "health.read" | "rules.read" | "rules.write" | "migrations.read" | "migrations.write" | "sites.read" | "sites.write" | "log.read" | "log.write" | "tokens.read" | "tokens.write" | "vcs.read" | "vcs.write" | "assistant.read" | "messages.read" | "messages.write" | "targets.read" | "targets.write" | "providers.read" | "providers.write" | "topics.read" | "topics.write" | "subscribers.read" | "subscribers.write")[] | undefined;
|
|
696
|
+
installationId?: string | undefined;
|
|
697
|
+
providerRepositoryId?: string | undefined;
|
|
698
|
+
providerBranch?: string | undefined;
|
|
699
|
+
providerSilentMode?: boolean | undefined;
|
|
700
|
+
providerRootDirectory?: string | undefined;
|
|
701
|
+
templateRepository?: string | undefined;
|
|
702
|
+
templateOwner?: string | undefined;
|
|
703
|
+
templateRootDirectory?: string | undefined;
|
|
704
|
+
templateVersion?: string | undefined;
|
|
705
|
+
specification?: "s-0.5vcpu-512mb" | "s-1vcpu-512mb" | "s-1vcpu-1gb" | "s-2vcpu-2gb" | "s-2vcpu-4gb" | "s-4vcpu-4gb" | "s-4vcpu-8gb" | "s-8vcpu-4gb" | "s-8vcpu-8gb" | undefined;
|
|
706
|
+
}[] | undefined;
|
|
707
|
+
schemaConfig?: {
|
|
708
|
+
outputDirectory: string;
|
|
709
|
+
yamlSchemaDirectory: string;
|
|
710
|
+
importDirectory: string;
|
|
711
|
+
collectionsDirectory: string;
|
|
712
|
+
tablesDirectory: string;
|
|
713
|
+
} | undefined;
|
|
714
|
+
} | null>;
|
|
715
|
+
write: (config: AppwriteConfig) => Promise<void>;
|
|
716
|
+
addFunction: (func: AppwriteFunction) => Promise<void>;
|
|
717
|
+
};
|
|
718
|
+
/**
|
|
719
|
+
* Determine if YAML config has session authentication configured
|
|
720
|
+
*/
|
|
721
|
+
export declare const hasYamlSessionAuth: (configPath: string) => boolean;
|
|
722
|
+
export {};
|