@devcycle/cli 6.0.2 → 6.1.1
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/.tsbuildinfo +1 -1
- package/dist/api/apiClient.js +7 -3
- package/dist/api/apiClient.js.map +1 -1
- package/dist/api/schemas.js +23 -27
- package/dist/api/schemas.js.map +1 -1
- package/dist/api/{zodClient.js → zodClientAPI.js} +188 -1070
- package/dist/api/zodClientAPI.js.map +1 -0
- package/dist/api/zodSchemas.js +1406 -0
- package/dist/api/zodSchemas.js.map +1 -0
- package/dist/commands/authCommand.js.map +1 -1
- package/dist/commands/base.js.map +1 -1
- package/dist/commands/environments/list.js.map +1 -1
- package/dist/commands/overrides/get.js.map +1 -1
- package/dist/commands/projects/get.js +2 -2
- package/dist/commands/projects/get.js.map +1 -1
- package/dist/commands/projects/list.js.map +1 -1
- package/dist/commands/projects/select.js.map +1 -1
- package/dist/commands/variables/create.js +2 -2
- package/dist/commands/variables/create.js.map +1 -1
- package/dist/commands/variables/list.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/tools/featureTools.js +11 -155
- package/dist/mcp/tools/featureTools.js.map +1 -1
- package/dist/mcp/tools/variableTools.js +1 -1
- package/dist/mcp/tools/variableTools.js.map +1 -1
- package/dist/mcp/types.js +95 -103
- package/dist/mcp/types.js.map +1 -1
- package/dist/ui/prompts/environmentPrompts.js.map +1 -1
- package/dist/ui/prompts/targetingPrompts.js +1 -1
- package/dist/ui/prompts/targetingPrompts.js.map +1 -1
- package/dist/ui/prompts/variablePrompts.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +13 -13
- package/dist/api/apiClient.d.ts +0 -5292
- package/dist/api/apiClient.d.ts.map +0 -1
- package/dist/api/audiences.d.ts +0 -57
- package/dist/api/audiences.d.ts.map +0 -1
- package/dist/api/common.d.ts +0 -7
- package/dist/api/common.d.ts.map +0 -1
- package/dist/api/customProperties.d.ts +0 -78
- package/dist/api/customProperties.d.ts.map +0 -1
- package/dist/api/environments.d.ts +0 -139
- package/dist/api/environments.d.ts.map +0 -1
- package/dist/api/features.d.ts +0 -23
- package/dist/api/features.d.ts.map +0 -1
- package/dist/api/members.d.ts +0 -8
- package/dist/api/members.d.ts.map +0 -1
- package/dist/api/organizations.d.ts +0 -7
- package/dist/api/organizations.d.ts.map +0 -1
- package/dist/api/overrides.d.ts +0 -19
- package/dist/api/overrides.d.ts.map +0 -1
- package/dist/api/projects.d.ts +0 -154
- package/dist/api/projects.d.ts.map +0 -1
- package/dist/api/results.d.ts +0 -23
- package/dist/api/results.d.ts.map +0 -1
- package/dist/api/schemas.d.ts +0 -2387
- package/dist/api/schemas.d.ts.map +0 -1
- package/dist/api/targeting.d.ts +0 -340
- package/dist/api/targeting.d.ts.map +0 -1
- package/dist/api/userProfile.d.ts +0 -20
- package/dist/api/userProfile.d.ts.map +0 -1
- package/dist/api/variables.d.ts +0 -132
- package/dist/api/variables.d.ts.map +0 -1
- package/dist/api/variations.d.ts +0 -158
- package/dist/api/variations.d.ts.map +0 -1
- package/dist/api/zodClient.d.ts +0 -65412
- package/dist/api/zodClient.d.ts.map +0 -1
- package/dist/api/zodClient.js.map +0 -1
- package/dist/auth/ApiAuth.d.ts +0 -22
- package/dist/auth/ApiAuth.d.ts.map +0 -1
- package/dist/auth/SSOAuth.d.ts +0 -34
- package/dist/auth/SSOAuth.d.ts.map +0 -1
- package/dist/auth/TokenCache.d.ts +0 -8
- package/dist/auth/TokenCache.d.ts.map +0 -1
- package/dist/auth/config.d.ts +0 -16
- package/dist/auth/config.d.ts.map +0 -1
- package/dist/auth/utils/getOrgIdFromToken.d.ts +0 -2
- package/dist/auth/utils/getOrgIdFromToken.d.ts.map +0 -1
- package/dist/auth/utils/getTokenExpiry.d.ts +0 -2
- package/dist/auth/utils/getTokenExpiry.d.ts.map +0 -1
- package/dist/auth/utils/getTokenPayload.d.ts +0 -8
- package/dist/auth/utils/getTokenPayload.d.ts.map +0 -1
- package/dist/auth/utils/index.d.ts +0 -5
- package/dist/auth/utils/index.d.ts.map +0 -1
- package/dist/auth/utils/shouldRefreshToken.d.ts +0 -2
- package/dist/auth/utils/shouldRefreshToken.d.ts.map +0 -1
- package/dist/commands/alias/add.d.ts +0 -22
- package/dist/commands/alias/add.d.ts.map +0 -1
- package/dist/commands/authCommand.d.ts +0 -30
- package/dist/commands/authCommand.d.ts.map +0 -1
- package/dist/commands/base.d.ts +0 -59
- package/dist/commands/base.d.ts.map +0 -1
- package/dist/commands/cleanup/index.d.ts +0 -29
- package/dist/commands/cleanup/index.d.ts.map +0 -1
- package/dist/commands/createCommand.d.ts +0 -21
- package/dist/commands/createCommand.d.ts.map +0 -1
- package/dist/commands/diff/index.d.ts +0 -43
- package/dist/commands/diff/index.d.ts.map +0 -1
- package/dist/commands/environments/create.d.ts +0 -29
- package/dist/commands/environments/create.d.ts.map +0 -1
- package/dist/commands/environments/get.d.ts +0 -26
- package/dist/commands/environments/get.d.ts.map +0 -1
- package/dist/commands/environments/list.d.ts +0 -8
- package/dist/commands/environments/list.d.ts.map +0 -1
- package/dist/commands/environments/update.d.ts +0 -24
- package/dist/commands/environments/update.d.ts.map +0 -1
- package/dist/commands/features/create.d.ts +0 -28
- package/dist/commands/features/create.d.ts.map +0 -1
- package/dist/commands/features/delete.d.ts +0 -11
- package/dist/commands/features/delete.d.ts.map +0 -1
- package/dist/commands/features/get.d.ts +0 -29
- package/dist/commands/features/get.d.ts.map +0 -1
- package/dist/commands/features/list.d.ts +0 -24
- package/dist/commands/features/list.d.ts.map +0 -1
- package/dist/commands/features/update.d.ts +0 -27
- package/dist/commands/features/update.d.ts.map +0 -1
- package/dist/commands/generate/types.d.ts +0 -55
- package/dist/commands/generate/types.d.ts.map +0 -1
- package/dist/commands/getCommand.d.ts +0 -19
- package/dist/commands/getCommand.d.ts.map +0 -1
- package/dist/commands/identity/get.d.ts +0 -8
- package/dist/commands/identity/get.d.ts.map +0 -1
- package/dist/commands/identity/update.d.ts +0 -29
- package/dist/commands/identity/update.d.ts.map +0 -1
- package/dist/commands/keys/get.d.ts +0 -25
- package/dist/commands/keys/get.d.ts.map +0 -1
- package/dist/commands/login/again.d.ts +0 -9
- package/dist/commands/login/again.d.ts.map +0 -1
- package/dist/commands/login/sso.d.ts +0 -9
- package/dist/commands/login/sso.d.ts.map +0 -1
- package/dist/commands/logout/index.d.ts +0 -8
- package/dist/commands/logout/index.d.ts.map +0 -1
- package/dist/commands/organizations/get.d.ts +0 -8
- package/dist/commands/organizations/get.d.ts.map +0 -1
- package/dist/commands/organizations/list.d.ts +0 -9
- package/dist/commands/organizations/list.d.ts.map +0 -1
- package/dist/commands/organizations/select.d.ts +0 -8
- package/dist/commands/organizations/select.d.ts.map +0 -1
- package/dist/commands/overrides/clear.d.ts +0 -25
- package/dist/commands/overrides/clear.d.ts.map +0 -1
- package/dist/commands/overrides/get.d.ts +0 -34
- package/dist/commands/overrides/get.d.ts.map +0 -1
- package/dist/commands/overrides/list.d.ts +0 -31
- package/dist/commands/overrides/list.d.ts.map +0 -1
- package/dist/commands/overrides/update.d.ts +0 -25
- package/dist/commands/overrides/update.d.ts.map +0 -1
- package/dist/commands/projects/create.d.ts +0 -23
- package/dist/commands/projects/create.d.ts.map +0 -1
- package/dist/commands/projects/current.d.ts +0 -7
- package/dist/commands/projects/current.d.ts.map +0 -1
- package/dist/commands/projects/get.d.ts +0 -22
- package/dist/commands/projects/get.d.ts.map +0 -1
- package/dist/commands/projects/list.d.ts +0 -9
- package/dist/commands/projects/list.d.ts.map +0 -1
- package/dist/commands/projects/select.d.ts +0 -10
- package/dist/commands/projects/select.d.ts.map +0 -1
- package/dist/commands/repo/init.d.ts +0 -10
- package/dist/commands/repo/init.d.ts.map +0 -1
- package/dist/commands/status/index.d.ts +0 -8
- package/dist/commands/status/index.d.ts.map +0 -1
- package/dist/commands/targeting/disable.d.ts +0 -25
- package/dist/commands/targeting/disable.d.ts.map +0 -1
- package/dist/commands/targeting/enable.d.ts +0 -25
- package/dist/commands/targeting/enable.d.ts.map +0 -1
- package/dist/commands/targeting/get.d.ts +0 -36
- package/dist/commands/targeting/get.d.ts.map +0 -1
- package/dist/commands/targeting/update.d.ts +0 -30
- package/dist/commands/targeting/update.d.ts.map +0 -1
- package/dist/commands/updateCommand.d.ts +0 -7
- package/dist/commands/updateCommand.d.ts.map +0 -1
- package/dist/commands/updateCommandWithCommonProperties.d.ts +0 -20
- package/dist/commands/updateCommandWithCommonProperties.d.ts.map +0 -1
- package/dist/commands/usages/index.d.ts +0 -34
- package/dist/commands/usages/index.d.ts.map +0 -1
- package/dist/commands/variables/create.d.ts +0 -26
- package/dist/commands/variables/create.d.ts.map +0 -1
- package/dist/commands/variables/get.d.ts +0 -29
- package/dist/commands/variables/get.d.ts.map +0 -1
- package/dist/commands/variables/list.d.ts +0 -23
- package/dist/commands/variables/list.d.ts.map +0 -1
- package/dist/commands/variables/update.d.ts +0 -22
- package/dist/commands/variables/update.d.ts.map +0 -1
- package/dist/commands/variations/create.d.ts +0 -27
- package/dist/commands/variations/create.d.ts.map +0 -1
- package/dist/commands/variations/get.d.ts +0 -11
- package/dist/commands/variations/get.d.ts.map +0 -1
- package/dist/commands/variations/list.d.ts +0 -12
- package/dist/commands/variations/list.d.ts.map +0 -1
- package/dist/commands/variations/update.d.ts +0 -28
- package/dist/commands/variations/update.d.ts.map +0 -1
- package/dist/commands/wink.d.ts +0 -6
- package/dist/commands/wink.d.ts.map +0 -1
- package/dist/flags/client-name/index.d.ts +0 -5
- package/dist/flags/client-name/index.d.ts.map +0 -1
- package/dist/flags/match-pattern/index.d.ts +0 -5
- package/dist/flags/match-pattern/index.d.ts.map +0 -1
- package/dist/flags/show-regex/index.d.ts +0 -4
- package/dist/flags/show-regex/index.d.ts.map +0 -1
- package/dist/flags/var-alias/index.d.ts +0 -7
- package/dist/flags/var-alias/index.d.ts.map +0 -1
- package/dist/help.d.ts +0 -13
- package/dist/help.d.ts.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/mcp/api/interface.d.ts +0 -125
- package/dist/mcp/api/interface.d.ts.map +0 -1
- package/dist/mcp/index.d.ts +0 -3
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/server.d.ts +0 -29
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/mcp/tools/customPropertiesTools.d.ts +0 -90
- package/dist/mcp/tools/customPropertiesTools.d.ts.map +0 -1
- package/dist/mcp/tools/environmentTools.d.ts +0 -146
- package/dist/mcp/tools/environmentTools.d.ts.map +0 -1
- package/dist/mcp/tools/featureTools.d.ts +0 -1096
- package/dist/mcp/tools/featureTools.d.ts.map +0 -1
- package/dist/mcp/tools/index.d.ts +0 -12
- package/dist/mcp/tools/index.d.ts.map +0 -1
- package/dist/mcp/tools/installGuides.generated.d.ts +0 -3
- package/dist/mcp/tools/installGuides.generated.d.ts.map +0 -1
- package/dist/mcp/tools/installTools.d.ts +0 -3
- package/dist/mcp/tools/installTools.d.ts.map +0 -1
- package/dist/mcp/tools/localProjectTools.d.ts +0 -51
- package/dist/mcp/tools/localProjectTools.d.ts.map +0 -1
- package/dist/mcp/tools/projectTools.d.ts +0 -156
- package/dist/mcp/tools/projectTools.d.ts.map +0 -1
- package/dist/mcp/tools/resultsTools.d.ts +0 -35
- package/dist/mcp/tools/resultsTools.d.ts.map +0 -1
- package/dist/mcp/tools/selfTargetingTools.d.ts +0 -67
- package/dist/mcp/tools/selfTargetingTools.d.ts.map +0 -1
- package/dist/mcp/tools/variableTools.d.ts +0 -96
- package/dist/mcp/tools/variableTools.d.ts.map +0 -1
- package/dist/mcp/types.d.ts +0 -2106
- package/dist/mcp/types.d.ts.map +0 -1
- package/dist/mcp/utils/api.d.ts +0 -26
- package/dist/mcp/utils/api.d.ts.map +0 -1
- package/dist/mcp/utils/auth.d.ts +0 -26
- package/dist/mcp/utils/auth.d.ts.map +0 -1
- package/dist/mcp/utils/dashboardLinks.d.ts +0 -29
- package/dist/mcp/utils/dashboardLinks.d.ts.map +0 -1
- package/dist/mcp/utils/errorHandling.d.ts +0 -9
- package/dist/mcp/utils/errorHandling.d.ts.map +0 -1
- package/dist/mcp/utils/github.d.ts +0 -2
- package/dist/mcp/utils/github.d.ts.map +0 -1
- package/dist/mcp/utils/headers.d.ts +0 -13
- package/dist/mcp/utils/headers.d.ts.map +0 -1
- package/dist/mcp/utils/projectFormatting.d.ts +0 -29
- package/dist/mcp/utils/projectFormatting.d.ts.map +0 -1
- package/dist/types/configFile.d.ts +0 -32
- package/dist/types/configFile.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -2
- package/dist/types/index.d.ts.map +0 -1
- package/dist/ui/autocomplete.d.ts +0 -4
- package/dist/ui/autocomplete.d.ts.map +0 -1
- package/dist/ui/constants/colors.d.ts +0 -7
- package/dist/ui/constants/colors.d.ts.map +0 -1
- package/dist/ui/promptForOrganization.d.ts +0 -3
- package/dist/ui/promptForOrganization.d.ts.map +0 -1
- package/dist/ui/promptForProject.d.ts +0 -3
- package/dist/ui/promptForProject.d.ts.map +0 -1
- package/dist/ui/prompts/commonPrompts.d.ts +0 -16
- package/dist/ui/prompts/commonPrompts.d.ts.map +0 -1
- package/dist/ui/prompts/environmentPrompts.d.ts +0 -29
- package/dist/ui/prompts/environmentPrompts.d.ts.map +0 -1
- package/dist/ui/prompts/featurePrompts.d.ts +0 -42
- package/dist/ui/prompts/featurePrompts.d.ts.map +0 -1
- package/dist/ui/prompts/identityPrompts.d.ts +0 -5
- package/dist/ui/prompts/identityPrompts.d.ts.map +0 -1
- package/dist/ui/prompts/index.d.ts +0 -7
- package/dist/ui/prompts/index.d.ts.map +0 -1
- package/dist/ui/prompts/listPrompts/filterListPrompt.d.ts +0 -18
- package/dist/ui/prompts/listPrompts/filterListPrompt.d.ts.map +0 -1
- package/dist/ui/prompts/listPrompts/listOptionsPrompt.d.ts +0 -70
- package/dist/ui/prompts/listPrompts/listOptionsPrompt.d.ts.map +0 -1
- package/dist/ui/prompts/listPrompts/promptOptions.d.ts +0 -25
- package/dist/ui/prompts/listPrompts/promptOptions.d.ts.map +0 -1
- package/dist/ui/prompts/listPrompts/targetingListPrompt.d.ts +0 -97
- package/dist/ui/prompts/listPrompts/targetingListPrompt.d.ts.map +0 -1
- package/dist/ui/prompts/listPrompts/variablesListPrompt.d.ts +0 -48
- package/dist/ui/prompts/listPrompts/variablesListPrompt.d.ts.map +0 -1
- package/dist/ui/prompts/listPrompts/variationsListPrompt.d.ts +0 -30
- package/dist/ui/prompts/listPrompts/variationsListPrompt.d.ts.map +0 -1
- package/dist/ui/prompts/overridePrompts.d.ts +0 -23
- package/dist/ui/prompts/overridePrompts.d.ts.map +0 -1
- package/dist/ui/prompts/targetingPrompts.d.ts +0 -129
- package/dist/ui/prompts/targetingPrompts.d.ts.map +0 -1
- package/dist/ui/prompts/types.d.ts +0 -30
- package/dist/ui/prompts/types.d.ts.map +0 -1
- package/dist/ui/prompts/variablePrompts.d.ts +0 -46
- package/dist/ui/prompts/variablePrompts.d.ts.map +0 -1
- package/dist/ui/prompts/variationPrompts.d.ts +0 -48
- package/dist/ui/prompts/variationPrompts.d.ts.map +0 -1
- package/dist/ui/tableOutput.d.ts +0 -8
- package/dist/ui/tableOutput.d.ts.map +0 -1
- package/dist/ui/targetingTree.d.ts +0 -10
- package/dist/ui/targetingTree.d.ts.map +0 -1
- package/dist/ui/togglebot.d.ts +0 -6
- package/dist/ui/togglebot.d.ts.map +0 -1
- package/dist/ui/writer.d.ts +0 -21
- package/dist/ui/writer.d.ts.map +0 -1
- package/dist/utils/FileFilters.d.ts +0 -14
- package/dist/utils/FileFilters.d.ts.map +0 -1
- package/dist/utils/audiences/index.d.ts +0 -4
- package/dist/utils/audiences/index.d.ts.map +0 -1
- package/dist/utils/batchRequests.d.ts +0 -2
- package/dist/utils/batchRequests.d.ts.map +0 -1
- package/dist/utils/configManager.d.ts +0 -37
- package/dist/utils/configManager.d.ts.map +0 -1
- package/dist/utils/diff/diff.d.ts +0 -3
- package/dist/utils/diff/diff.d.ts.map +0 -1
- package/dist/utils/diff/fileDiff.d.ts +0 -3
- package/dist/utils/diff/fileDiff.d.ts.map +0 -1
- package/dist/utils/diff/parse.d.ts +0 -4
- package/dist/utils/diff/parse.d.ts.map +0 -1
- package/dist/utils/environments/index.d.ts +0 -3
- package/dist/utils/environments/index.d.ts.map +0 -1
- package/dist/utils/features/quickCreateFeatureUtils.d.ts +0 -4
- package/dist/utils/features/quickCreateFeatureUtils.d.ts.map +0 -1
- package/dist/utils/fileSystem.d.ts +0 -7
- package/dist/utils/fileSystem.d.ts.map +0 -1
- package/dist/utils/git/ls-files.d.ts +0 -2
- package/dist/utils/git/ls-files.d.ts.map +0 -1
- package/dist/utils/overrides/index.d.ts +0 -10
- package/dist/utils/overrides/index.d.ts.map +0 -1
- package/dist/utils/parseKeysFromArgs.d.ts +0 -10
- package/dist/utils/parseKeysFromArgs.d.ts.map +0 -1
- package/dist/utils/parsers/BaseParser.d.ts +0 -49
- package/dist/utils/parsers/BaseParser.d.ts.map +0 -1
- package/dist/utils/parsers/android/index.d.ts +0 -13
- package/dist/utils/parsers/android/index.d.ts.map +0 -1
- package/dist/utils/parsers/csharp/index.d.ts +0 -13
- package/dist/utils/parsers/csharp/index.d.ts.map +0 -1
- package/dist/utils/parsers/custom.d.ts +0 -10
- package/dist/utils/parsers/custom.d.ts.map +0 -1
- package/dist/utils/parsers/dart/index.d.ts +0 -8
- package/dist/utils/parsers/dart/index.d.ts.map +0 -1
- package/dist/utils/parsers/golang/index.d.ts +0 -8
- package/dist/utils/parsers/golang/index.d.ts.map +0 -1
- package/dist/utils/parsers/index.d.ts +0 -16
- package/dist/utils/parsers/index.d.ts.map +0 -1
- package/dist/utils/parsers/ios/index.d.ts +0 -12
- package/dist/utils/parsers/ios/index.d.ts.map +0 -1
- package/dist/utils/parsers/java/index.d.ts +0 -8
- package/dist/utils/parsers/java/index.d.ts.map +0 -1
- package/dist/utils/parsers/javascript/index.d.ts +0 -8
- package/dist/utils/parsers/javascript/index.d.ts.map +0 -1
- package/dist/utils/parsers/nodejs/index.d.ts +0 -8
- package/dist/utils/parsers/nodejs/index.d.ts.map +0 -1
- package/dist/utils/parsers/php/index.d.ts +0 -14
- package/dist/utils/parsers/php/index.d.ts.map +0 -1
- package/dist/utils/parsers/python/index.d.ts +0 -14
- package/dist/utils/parsers/python/index.d.ts.map +0 -1
- package/dist/utils/parsers/react/index.d.ts +0 -9
- package/dist/utils/parsers/react/index.d.ts.map +0 -1
- package/dist/utils/parsers/ruby/index.d.ts +0 -8
- package/dist/utils/parsers/ruby/index.d.ts.map +0 -1
- package/dist/utils/parsers/types.d.ts +0 -29
- package/dist/utils/parsers/types.d.ts.map +0 -1
- package/dist/utils/prompts.d.ts +0 -7
- package/dist/utils/prompts.d.ts.map +0 -1
- package/dist/utils/refactor/RefactorEngine.d.ts +0 -65
- package/dist/utils/refactor/RefactorEngine.d.ts.map +0 -1
- package/dist/utils/refactor/index.d.ts +0 -3
- package/dist/utils/refactor/index.d.ts.map +0 -1
- package/dist/utils/refactor/javascript/JavascriptEngine.d.ts +0 -6
- package/dist/utils/refactor/javascript/JavascriptEngine.d.ts.map +0 -1
- package/dist/utils/refactor/javascript/index.d.ts +0 -2
- package/dist/utils/refactor/javascript/index.d.ts.map +0 -1
- package/dist/utils/refactor/utils.d.ts +0 -4
- package/dist/utils/refactor/utils.d.ts.map +0 -1
- package/dist/utils/reportValidationErrors.d.ts +0 -8
- package/dist/utils/reportValidationErrors.d.ts.map +0 -1
- package/dist/utils/targeting/index.d.ts +0 -92
- package/dist/utils/targeting/index.d.ts.map +0 -1
- package/dist/utils/usages/parse.d.ts +0 -4
- package/dist/utils/usages/parse.d.ts.map +0 -1
- package/dist/utils/validators.d.ts +0 -4
- package/dist/utils/validators.d.ts.map +0 -1
|
@@ -0,0 +1,1406 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateCustomPropertyDto = exports.UpdateProjectUserProfileDto = exports.ProjectUserProfile = exports.ResultProjectEvaluationsByHourDto = exports.ResultEvaluationsByHourDto = exports.UpdateFeatureVariationDto = exports.FeatureVariationDto = exports.JiraIssueLink = exports.UpdateFeatureStatusDto = exports.UpdateFeatureDto = exports.Feature = exports.FeatureConfig = exports.Target = exports.Variation = exports.CreateFeatureDto = exports.FeatureSDKVisibilityDto = exports.FeatureSettingsDto = exports.CreateVariationDto = exports.UpdateFeatureConfigDto = exports.UpdateTargetDto = exports.AudienceOperatorWithAudienceMatchFilter = exports.AudienceMatchFilter = exports.UpdateVariableStatusDto = exports.UpdateVariableDto = exports.Variable = exports.FeatureVariableDto = exports.CreateVariableDto = exports.UpdateAudienceDto = exports.Audience = exports.CreateAudienceDto = exports.AudienceOperator = exports.UserCustomFilter = exports.UserPlatformVersionFilter = exports.UserAppVersionFilter = exports.UserCountryFilter = exports.UserFilter = exports.OptInFilter = exports.AllFilter = exports.GenerateSdkTokensDto = exports.UpdateEnvironmentDto = exports.Environment = exports.SDKKeys = exports.CreateEnvironmentDto = exports.UpdateProjectDto = exports.Project = exports.ProjectSettings = exports.CreateProjectDto = exports.ProjectSettingsDTO = exports.ResultSummaryDto = exports.GetProjectsParams = void 0;
|
|
4
|
+
exports.ReassociateVariableDto = exports.UserOverride = exports.FeatureOverrideResponse = exports.OverrideResponse = exports.FeatureOverride = exports.Override = exports.UpdateUserOverrideDto = exports.DeleteMetricAssociationDto = exports.CreateMetricAssociationDto = exports.MetricAssociation = exports.MetricResult = exports.UpdateMetricDto = exports.Metric = exports.CreateMetricDto = exports.UpdateCustomPropertyDto = exports.CustomProperty = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* IMPORTANT: MCP Schema Compatibility
|
|
7
|
+
*
|
|
8
|
+
* The MCP (Model Context Protocol) requires that all array types in JSON schemas
|
|
9
|
+
* have an 'items' property. When using Zod schemas that will be converted to JSON
|
|
10
|
+
* schemas for MCP tools:
|
|
11
|
+
*
|
|
12
|
+
* ❌ NEVER use: z.array(z.any()) - This doesn't generate the required 'items' property
|
|
13
|
+
* ✅ ALWAYS use: z.array(z.unknown()) - This generates proper JSON schemas
|
|
14
|
+
*
|
|
15
|
+
* Similarly:
|
|
16
|
+
* ❌ NEVER use: z.record(z.any())
|
|
17
|
+
* ✅ ALWAYS use: z.record(z.unknown())
|
|
18
|
+
*
|
|
19
|
+
* The z.unknown() type provides the same runtime flexibility as z.any() but
|
|
20
|
+
* generates valid JSON schemas that pass MCP validation.
|
|
21
|
+
*/
|
|
22
|
+
const zod_1 = require("zod");
|
|
23
|
+
exports.GetProjectsParams = zod_1.z.object({
|
|
24
|
+
page: zod_1.z.number().gte(1).optional().default(1),
|
|
25
|
+
perPage: zod_1.z.number().gte(1).lte(1000).optional().default(100),
|
|
26
|
+
sortBy: zod_1.z
|
|
27
|
+
.enum([
|
|
28
|
+
'createdAt',
|
|
29
|
+
'updatedAt',
|
|
30
|
+
'name',
|
|
31
|
+
'key',
|
|
32
|
+
'createdBy',
|
|
33
|
+
'propertyKey',
|
|
34
|
+
])
|
|
35
|
+
.optional()
|
|
36
|
+
.default('createdAt'),
|
|
37
|
+
sortOrder: zod_1.z.enum(['asc', 'desc']).optional().default('desc'),
|
|
38
|
+
search: zod_1.z.string().optional(),
|
|
39
|
+
createdBy: zod_1.z.string().optional(),
|
|
40
|
+
});
|
|
41
|
+
exports.ResultSummaryDto = zod_1.z.object({
|
|
42
|
+
result: zod_1.z
|
|
43
|
+
.object({
|
|
44
|
+
counts: zod_1.z
|
|
45
|
+
.object({
|
|
46
|
+
total: zod_1.z.number(),
|
|
47
|
+
withFeature: zod_1.z.number(),
|
|
48
|
+
accessedFeature: zod_1.z.number(),
|
|
49
|
+
})
|
|
50
|
+
.partial(),
|
|
51
|
+
})
|
|
52
|
+
.partial(),
|
|
53
|
+
cached: zod_1.z.boolean(),
|
|
54
|
+
updatedAt: zod_1.z.string().datetime(),
|
|
55
|
+
});
|
|
56
|
+
// Zod Schemas
|
|
57
|
+
const EdgeDBSettingsDTO = zod_1.z.object({ enabled: zod_1.z.boolean() });
|
|
58
|
+
const ColorSettingsDTO = zod_1.z.object({
|
|
59
|
+
primary: zod_1.z
|
|
60
|
+
.string()
|
|
61
|
+
.max(9)
|
|
62
|
+
.regex(/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/),
|
|
63
|
+
secondary: zod_1.z
|
|
64
|
+
.string()
|
|
65
|
+
.max(9)
|
|
66
|
+
.regex(/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/),
|
|
67
|
+
});
|
|
68
|
+
const OptInSettingsDTO = zod_1.z
|
|
69
|
+
.object({
|
|
70
|
+
title: zod_1.z.string().min(1).max(100),
|
|
71
|
+
description: zod_1.z.string().max(1000),
|
|
72
|
+
enabled: zod_1.z.boolean(),
|
|
73
|
+
imageURL: zod_1.z.string(),
|
|
74
|
+
colors: ColorSettingsDTO,
|
|
75
|
+
poweredByAlignment: zod_1.z.enum(['center', 'left', 'right', 'hidden']),
|
|
76
|
+
})
|
|
77
|
+
.passthrough();
|
|
78
|
+
const SDKTypeVisibilitySettingsDTO = zod_1.z
|
|
79
|
+
.object({ enabledInFeatureSettings: zod_1.z.boolean() })
|
|
80
|
+
.passthrough();
|
|
81
|
+
const LifeCycleSettingsDTO = zod_1.z
|
|
82
|
+
.object({ disableCodeRefChecks: zod_1.z.boolean() })
|
|
83
|
+
.passthrough();
|
|
84
|
+
const ObfuscationSettingsDTO = zod_1.z
|
|
85
|
+
.object({ enabled: zod_1.z.boolean(), required: zod_1.z.boolean() })
|
|
86
|
+
.passthrough();
|
|
87
|
+
const DynatraceProjectSettingsDTO = zod_1.z
|
|
88
|
+
.object({
|
|
89
|
+
enabled: zod_1.z.boolean(),
|
|
90
|
+
environmentMap: zod_1.z.record(zod_1.z.unknown()),
|
|
91
|
+
})
|
|
92
|
+
.partial()
|
|
93
|
+
.passthrough();
|
|
94
|
+
exports.ProjectSettingsDTO = zod_1.z
|
|
95
|
+
.object({
|
|
96
|
+
edgeDB: EdgeDBSettingsDTO,
|
|
97
|
+
optIn: OptInSettingsDTO,
|
|
98
|
+
sdkTypeVisibility: SDKTypeVisibilitySettingsDTO,
|
|
99
|
+
lifeCycle: LifeCycleSettingsDTO,
|
|
100
|
+
obfuscation: ObfuscationSettingsDTO,
|
|
101
|
+
disablePassthroughRollouts: zod_1.z.boolean(),
|
|
102
|
+
dynatrace: DynatraceProjectSettingsDTO,
|
|
103
|
+
})
|
|
104
|
+
.passthrough();
|
|
105
|
+
exports.CreateProjectDto = zod_1.z.object({
|
|
106
|
+
key: zod_1.z
|
|
107
|
+
.string()
|
|
108
|
+
.min(1)
|
|
109
|
+
.max(100)
|
|
110
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
111
|
+
name: zod_1.z.string().min(1).max(100),
|
|
112
|
+
description: zod_1.z.string().max(1000).optional(),
|
|
113
|
+
color: zod_1.z
|
|
114
|
+
.string()
|
|
115
|
+
.max(9)
|
|
116
|
+
.regex(/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/)
|
|
117
|
+
.optional(),
|
|
118
|
+
settings: exports.ProjectSettingsDTO.optional(),
|
|
119
|
+
});
|
|
120
|
+
const EdgeDBSettings = zod_1.z.object({ enabled: zod_1.z.boolean() });
|
|
121
|
+
const ColorSettings = zod_1.z.object({ primary: zod_1.z.string(), secondary: zod_1.z.string() });
|
|
122
|
+
const OptInSettings = zod_1.z.object({
|
|
123
|
+
enabled: zod_1.z.boolean(),
|
|
124
|
+
title: zod_1.z.string(),
|
|
125
|
+
description: zod_1.z.string(),
|
|
126
|
+
imageURL: zod_1.z.string(),
|
|
127
|
+
colors: ColorSettings,
|
|
128
|
+
poweredByAlignment: zod_1.z.record(zod_1.z.unknown()),
|
|
129
|
+
});
|
|
130
|
+
const SDKTypeVisibilitySettings = zod_1.z.object({
|
|
131
|
+
enabledInFeatureSettings: zod_1.z.boolean(),
|
|
132
|
+
});
|
|
133
|
+
const LifeCycleSettings = zod_1.z.object({ disableCodeRefChecks: zod_1.z.boolean() });
|
|
134
|
+
const ObfuscationSettings = zod_1.z.object({
|
|
135
|
+
enabled: zod_1.z.boolean(),
|
|
136
|
+
required: zod_1.z.boolean(),
|
|
137
|
+
});
|
|
138
|
+
const FeatureApprovalWorkflowSettings = zod_1.z
|
|
139
|
+
.object({
|
|
140
|
+
enabled: zod_1.z.boolean(),
|
|
141
|
+
allowPublisherBypass: zod_1.z.boolean(),
|
|
142
|
+
defaultReviewers: zod_1.z.array(zod_1.z.string()),
|
|
143
|
+
})
|
|
144
|
+
.passthrough();
|
|
145
|
+
const ReleasedStalenessSettings = zod_1.z.object({ enabled: zod_1.z.boolean() });
|
|
146
|
+
const UnmodifiedLongStalenessSettings = zod_1.z.object({ enabled: zod_1.z.boolean() });
|
|
147
|
+
const UnmodifiedShortStalenessSettings = zod_1.z.object({ enabled: zod_1.z.boolean() });
|
|
148
|
+
const UnusedStalenessSettings = zod_1.z.object({ enabled: zod_1.z.boolean() });
|
|
149
|
+
const StalenessEmailSettings = zod_1.z.object({
|
|
150
|
+
enabled: zod_1.z.boolean(),
|
|
151
|
+
frequency: zod_1.z.enum(['weekly', 'biweekly', 'monthly']),
|
|
152
|
+
users: zod_1.z.array(zod_1.z.string()),
|
|
153
|
+
lastNotification: zod_1.z.string().datetime({ offset: true }),
|
|
154
|
+
});
|
|
155
|
+
const StalenessSettings = zod_1.z
|
|
156
|
+
.object({
|
|
157
|
+
enabled: zod_1.z.boolean(),
|
|
158
|
+
released: ReleasedStalenessSettings,
|
|
159
|
+
unmodifiedLong: UnmodifiedLongStalenessSettings,
|
|
160
|
+
unmodifiedShort: UnmodifiedShortStalenessSettings,
|
|
161
|
+
unused: UnusedStalenessSettings,
|
|
162
|
+
email: StalenessEmailSettings,
|
|
163
|
+
})
|
|
164
|
+
.passthrough();
|
|
165
|
+
const DynatraceProjectSettings = zod_1.z
|
|
166
|
+
.object({
|
|
167
|
+
enabled: zod_1.z.boolean(),
|
|
168
|
+
environmentMap: zod_1.z.record(zod_1.z.unknown()),
|
|
169
|
+
})
|
|
170
|
+
.passthrough();
|
|
171
|
+
exports.ProjectSettings = zod_1.z
|
|
172
|
+
.object({
|
|
173
|
+
edgeDB: EdgeDBSettings,
|
|
174
|
+
optIn: OptInSettings,
|
|
175
|
+
sdkTypeVisibility: SDKTypeVisibilitySettings,
|
|
176
|
+
lifeCycle: LifeCycleSettings,
|
|
177
|
+
obfuscation: ObfuscationSettings,
|
|
178
|
+
featureApprovalWorkflow: FeatureApprovalWorkflowSettings,
|
|
179
|
+
disablePassthroughRollouts: zod_1.z.boolean(),
|
|
180
|
+
staleness: StalenessSettings,
|
|
181
|
+
dynatrace: DynatraceProjectSettings,
|
|
182
|
+
})
|
|
183
|
+
.passthrough();
|
|
184
|
+
const VercelEdgeConfigConnection = zod_1.z
|
|
185
|
+
.object({ edgeConfigName: zod_1.z.string(), configurationId: zod_1.z.string() })
|
|
186
|
+
.passthrough();
|
|
187
|
+
exports.Project = zod_1.z
|
|
188
|
+
.object({
|
|
189
|
+
_id: zod_1.z.string(),
|
|
190
|
+
_organization: zod_1.z.string(),
|
|
191
|
+
_createdBy: zod_1.z.string(),
|
|
192
|
+
name: zod_1.z.string(),
|
|
193
|
+
key: zod_1.z.string(),
|
|
194
|
+
description: zod_1.z.string().optional(),
|
|
195
|
+
color: zod_1.z.string().optional(),
|
|
196
|
+
settings: exports.ProjectSettings,
|
|
197
|
+
createdAt: zod_1.z.string().datetime({ offset: true }),
|
|
198
|
+
updatedAt: zod_1.z.string().datetime({ offset: true }),
|
|
199
|
+
hasJiraIntegration: zod_1.z.boolean(),
|
|
200
|
+
hasReceivedCodeUsages: zod_1.z.boolean(),
|
|
201
|
+
hasUserConfigFetch: zod_1.z.boolean(),
|
|
202
|
+
jiraBaseUrl: zod_1.z.string(),
|
|
203
|
+
readonly: zod_1.z.boolean(),
|
|
204
|
+
vercelEdgeConfigConnections: zod_1.z
|
|
205
|
+
.array(VercelEdgeConfigConnection)
|
|
206
|
+
.optional(),
|
|
207
|
+
})
|
|
208
|
+
.passthrough();
|
|
209
|
+
exports.UpdateProjectDto = zod_1.z
|
|
210
|
+
.object({
|
|
211
|
+
key: zod_1.z
|
|
212
|
+
.string()
|
|
213
|
+
.min(1)
|
|
214
|
+
.max(100)
|
|
215
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
216
|
+
name: zod_1.z.string().min(1).max(100),
|
|
217
|
+
description: zod_1.z.string().max(1000),
|
|
218
|
+
color: zod_1.z
|
|
219
|
+
.string()
|
|
220
|
+
.max(9)
|
|
221
|
+
.regex(/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/),
|
|
222
|
+
settings: exports.ProjectSettingsDTO,
|
|
223
|
+
})
|
|
224
|
+
.partial();
|
|
225
|
+
// const UpdateProjectSettingsDto = z
|
|
226
|
+
// .object({ settings: ProjectSettings })
|
|
227
|
+
// .passthrough()
|
|
228
|
+
// const FeatureApprovalWorkflowDTO = z
|
|
229
|
+
// .object({
|
|
230
|
+
// enabled: z.boolean(),
|
|
231
|
+
// allowPublisherBypass: z.boolean(),
|
|
232
|
+
// defaultReviewers: z.array(z.string()),
|
|
233
|
+
// })
|
|
234
|
+
// .passthrough()
|
|
235
|
+
// const ReleasedStalenessDTO = z.object({ enabled: z.boolean() }).passthrough()
|
|
236
|
+
// const UnmodifiedLongStalenessDTO = z
|
|
237
|
+
// .object({ enabled: z.boolean() })
|
|
238
|
+
// .passthrough()
|
|
239
|
+
// const UnmodifiedShortStalenessDTO = z
|
|
240
|
+
// .object({ enabled: z.boolean() })
|
|
241
|
+
// .passthrough()
|
|
242
|
+
// const UnusedStalenessDTO = z.object({ enabled: z.boolean() }).passthrough()
|
|
243
|
+
// const EmailSettingsDTO = z
|
|
244
|
+
// .object({
|
|
245
|
+
// enabled: z.boolean(),
|
|
246
|
+
// users: z.array(z.string()),
|
|
247
|
+
// frequency: z.enum(['weekly', 'biweekly', 'monthly']),
|
|
248
|
+
// })
|
|
249
|
+
// .passthrough()
|
|
250
|
+
// const StalenessSettingsDTO = z
|
|
251
|
+
// .object({
|
|
252
|
+
// enabled: z.boolean(),
|
|
253
|
+
// released: ReleasedStalenessDTO,
|
|
254
|
+
// unmodifiedLong: UnmodifiedLongStalenessDTO,
|
|
255
|
+
// unmodifiedShort: UnmodifiedShortStalenessDTO,
|
|
256
|
+
// unused: UnusedStalenessDTO,
|
|
257
|
+
// email: EmailSettingsDTO,
|
|
258
|
+
// })
|
|
259
|
+
// .passthrough()
|
|
260
|
+
// const ProtectedProjectSettingsDto = z
|
|
261
|
+
// .object({
|
|
262
|
+
// featureApprovalWorkflow: FeatureApprovalWorkflowDTO,
|
|
263
|
+
// staleness: StalenessSettingsDTO,
|
|
264
|
+
// })
|
|
265
|
+
// .passthrough()
|
|
266
|
+
// const UpdateProtectedProjectSettingsDto = z
|
|
267
|
+
// .object({ settings: ProtectedProjectSettingsDto })
|
|
268
|
+
// .passthrough()
|
|
269
|
+
const FeatureStalenessEntity = zod_1.z
|
|
270
|
+
.object({
|
|
271
|
+
stale: zod_1.z.boolean(),
|
|
272
|
+
updatedAt: zod_1.z.string().datetime({ offset: true }).optional(),
|
|
273
|
+
disabled: zod_1.z.boolean(),
|
|
274
|
+
snoozedUntil: zod_1.z.string().datetime({ offset: true }).optional(),
|
|
275
|
+
reason: zod_1.z
|
|
276
|
+
.enum(['released', 'unused', 'unmodifiedShort', 'unmodifiedLong'])
|
|
277
|
+
.optional(),
|
|
278
|
+
metaData: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
279
|
+
})
|
|
280
|
+
.passthrough();
|
|
281
|
+
const EnvironmentSettings = zod_1.z
|
|
282
|
+
.object({ appIconURI: zod_1.z.string().max(2048) })
|
|
283
|
+
.partial();
|
|
284
|
+
exports.CreateEnvironmentDto = zod_1.z.object({
|
|
285
|
+
key: zod_1.z
|
|
286
|
+
.string()
|
|
287
|
+
.min(1)
|
|
288
|
+
.max(100)
|
|
289
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
290
|
+
name: zod_1.z.string().min(1).max(100),
|
|
291
|
+
description: zod_1.z.string().max(1000).optional(),
|
|
292
|
+
color: zod_1.z
|
|
293
|
+
.string()
|
|
294
|
+
.max(9)
|
|
295
|
+
.regex(/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/)
|
|
296
|
+
.optional(),
|
|
297
|
+
type: zod_1.z.enum(['development', 'staging', 'production', 'disaster_recovery']),
|
|
298
|
+
settings: EnvironmentSettings.optional(),
|
|
299
|
+
});
|
|
300
|
+
const APIKey = zod_1.z.object({
|
|
301
|
+
key: zod_1.z.string(),
|
|
302
|
+
createdAt: zod_1.z.string().datetime(),
|
|
303
|
+
compromised: zod_1.z.boolean(),
|
|
304
|
+
});
|
|
305
|
+
exports.SDKKeys = zod_1.z.object({
|
|
306
|
+
mobile: zod_1.z.array(APIKey),
|
|
307
|
+
client: zod_1.z.array(APIKey),
|
|
308
|
+
server: zod_1.z.array(APIKey),
|
|
309
|
+
});
|
|
310
|
+
exports.Environment = zod_1.z.object({
|
|
311
|
+
_id: zod_1.z.string(),
|
|
312
|
+
_project: zod_1.z.string(),
|
|
313
|
+
key: zod_1.z
|
|
314
|
+
.string()
|
|
315
|
+
.min(1)
|
|
316
|
+
.max(100)
|
|
317
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
318
|
+
name: zod_1.z.string().min(1).max(100),
|
|
319
|
+
description: zod_1.z.string().max(1000).optional(),
|
|
320
|
+
color: zod_1.z
|
|
321
|
+
.string()
|
|
322
|
+
.max(9)
|
|
323
|
+
.regex(/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/)
|
|
324
|
+
.optional(),
|
|
325
|
+
type: zod_1.z.enum(['development', 'staging', 'production', 'disaster_recovery']),
|
|
326
|
+
_createdBy: zod_1.z.string(),
|
|
327
|
+
createdAt: zod_1.z.string().datetime({ offset: true }),
|
|
328
|
+
updatedAt: zod_1.z.string().datetime({ offset: true }),
|
|
329
|
+
sdkKeys: exports.SDKKeys,
|
|
330
|
+
settings: EnvironmentSettings.optional(),
|
|
331
|
+
readonly: zod_1.z.boolean(),
|
|
332
|
+
});
|
|
333
|
+
exports.UpdateEnvironmentDto = zod_1.z
|
|
334
|
+
.object({
|
|
335
|
+
key: zod_1.z
|
|
336
|
+
.string()
|
|
337
|
+
.min(1)
|
|
338
|
+
.max(100)
|
|
339
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
340
|
+
name: zod_1.z.string().min(1).max(100),
|
|
341
|
+
description: zod_1.z.string().max(1000),
|
|
342
|
+
color: zod_1.z
|
|
343
|
+
.string()
|
|
344
|
+
.max(9)
|
|
345
|
+
.regex(/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/),
|
|
346
|
+
type: zod_1.z.enum([
|
|
347
|
+
'development',
|
|
348
|
+
'staging',
|
|
349
|
+
'production',
|
|
350
|
+
'disaster_recovery',
|
|
351
|
+
]),
|
|
352
|
+
settings: EnvironmentSettings,
|
|
353
|
+
})
|
|
354
|
+
.partial();
|
|
355
|
+
exports.GenerateSdkTokensDto = zod_1.z
|
|
356
|
+
.object({ client: zod_1.z.boolean(), server: zod_1.z.boolean(), mobile: zod_1.z.boolean() })
|
|
357
|
+
.partial();
|
|
358
|
+
exports.AllFilter = zod_1.z.object({ type: zod_1.z.literal('all').default('all') });
|
|
359
|
+
exports.OptInFilter = zod_1.z.object({
|
|
360
|
+
type: zod_1.z.literal('optIn').default('optIn'),
|
|
361
|
+
_audiences: zod_1.z.array(zod_1.z.string()).optional(),
|
|
362
|
+
values: zod_1.z.array(zod_1.z.string()).optional(),
|
|
363
|
+
});
|
|
364
|
+
exports.UserFilter = zod_1.z.object({
|
|
365
|
+
subType: zod_1.z.enum(['user_id', 'email', 'platform', 'deviceModel']),
|
|
366
|
+
comparator: zod_1.z.enum([
|
|
367
|
+
'=',
|
|
368
|
+
'!=',
|
|
369
|
+
'exist',
|
|
370
|
+
'!exist',
|
|
371
|
+
'contain',
|
|
372
|
+
'!contain',
|
|
373
|
+
'startWith',
|
|
374
|
+
'!startWith',
|
|
375
|
+
'endWith',
|
|
376
|
+
'!endWith',
|
|
377
|
+
]),
|
|
378
|
+
values: zod_1.z.array(zod_1.z.string()).optional(),
|
|
379
|
+
type: zod_1.z.literal('user').default('user'),
|
|
380
|
+
});
|
|
381
|
+
exports.UserCountryFilter = zod_1.z
|
|
382
|
+
.object({
|
|
383
|
+
subType: zod_1.z.literal('country').default('country'),
|
|
384
|
+
comparator: zod_1.z.enum([
|
|
385
|
+
'=',
|
|
386
|
+
'!=',
|
|
387
|
+
'exist',
|
|
388
|
+
'!exist',
|
|
389
|
+
'contain',
|
|
390
|
+
'!contain',
|
|
391
|
+
'startWith',
|
|
392
|
+
'!startWith',
|
|
393
|
+
'endWith',
|
|
394
|
+
'!endWith',
|
|
395
|
+
]),
|
|
396
|
+
values: zod_1.z.array(zod_1.z.string()).optional(),
|
|
397
|
+
type: zod_1.z.literal('user').default('user'),
|
|
398
|
+
})
|
|
399
|
+
.describe('values must be valid ISO31661 Alpha2 country codes');
|
|
400
|
+
exports.UserAppVersionFilter = zod_1.z
|
|
401
|
+
.object({
|
|
402
|
+
comparator: zod_1.z.enum([
|
|
403
|
+
'=',
|
|
404
|
+
'!=',
|
|
405
|
+
'>',
|
|
406
|
+
'>=',
|
|
407
|
+
'<',
|
|
408
|
+
'<=',
|
|
409
|
+
'exist',
|
|
410
|
+
'!exist',
|
|
411
|
+
]),
|
|
412
|
+
values: zod_1.z.array(zod_1.z.string()).optional(),
|
|
413
|
+
type: zod_1.z.literal('user').default('user'),
|
|
414
|
+
subType: zod_1.z.literal('appVersion').default('appVersion'),
|
|
415
|
+
})
|
|
416
|
+
.describe('values must be valid semver versions');
|
|
417
|
+
exports.UserPlatformVersionFilter = zod_1.z.object({
|
|
418
|
+
comparator: zod_1.z.enum(['=', '!=', '>', '>=', '<', '<=', 'exist', '!exist']),
|
|
419
|
+
values: zod_1.z.array(zod_1.z.string()).optional(),
|
|
420
|
+
type: zod_1.z.literal('user').default('user'),
|
|
421
|
+
subType: zod_1.z.literal('platformVersion').default('platformVersion'),
|
|
422
|
+
});
|
|
423
|
+
exports.UserCustomFilter = zod_1.z
|
|
424
|
+
.object({
|
|
425
|
+
comparator: zod_1.z.enum([
|
|
426
|
+
'=',
|
|
427
|
+
'!=',
|
|
428
|
+
'>',
|
|
429
|
+
'>=',
|
|
430
|
+
'<',
|
|
431
|
+
'<=',
|
|
432
|
+
'exist',
|
|
433
|
+
'!exist',
|
|
434
|
+
'contain',
|
|
435
|
+
'!contain',
|
|
436
|
+
'startWith',
|
|
437
|
+
'!startWith',
|
|
438
|
+
'endWith',
|
|
439
|
+
'!endWith',
|
|
440
|
+
]),
|
|
441
|
+
dataKey: zod_1.z.string().min(1),
|
|
442
|
+
dataKeyType: zod_1.z.enum(['String', 'Boolean', 'Number']),
|
|
443
|
+
values: zod_1.z
|
|
444
|
+
.array(zod_1.z.union([zod_1.z.boolean(), zod_1.z.string(), zod_1.z.number()]))
|
|
445
|
+
.optional(),
|
|
446
|
+
type: zod_1.z.literal('user').default('user'),
|
|
447
|
+
subType: zod_1.z.literal('customData').default('customData'),
|
|
448
|
+
})
|
|
449
|
+
.describe('Filters users by comparing customData[dataKey] (coerced to dataKeyType) to values using the specified comparator');
|
|
450
|
+
exports.AudienceOperator = zod_1.z.object({
|
|
451
|
+
filters: zod_1.z.array(zod_1.z.union([
|
|
452
|
+
exports.AllFilter.passthrough(),
|
|
453
|
+
exports.UserFilter.passthrough(),
|
|
454
|
+
exports.UserCountryFilter.passthrough(),
|
|
455
|
+
exports.UserAppVersionFilter.passthrough(),
|
|
456
|
+
exports.UserPlatformVersionFilter.passthrough(),
|
|
457
|
+
exports.UserCustomFilter.passthrough(),
|
|
458
|
+
])),
|
|
459
|
+
operator: zod_1.z.enum(['and', 'or']),
|
|
460
|
+
});
|
|
461
|
+
exports.CreateAudienceDto = zod_1.z.object({
|
|
462
|
+
name: zod_1.z.string().min(1).max(100).optional(),
|
|
463
|
+
key: zod_1.z
|
|
464
|
+
.string()
|
|
465
|
+
.min(1)
|
|
466
|
+
.max(100)
|
|
467
|
+
.regex(/^[a-z0-9-_.]+$/)
|
|
468
|
+
.optional(),
|
|
469
|
+
description: zod_1.z.string().max(1000).optional(),
|
|
470
|
+
filters: exports.AudienceOperator,
|
|
471
|
+
tags: zod_1.z.array(zod_1.z.string()).optional(),
|
|
472
|
+
});
|
|
473
|
+
exports.Audience = zod_1.z
|
|
474
|
+
.object({
|
|
475
|
+
_id: zod_1.z.string(),
|
|
476
|
+
_project: zod_1.z.string(),
|
|
477
|
+
key: zod_1.z
|
|
478
|
+
.string()
|
|
479
|
+
.min(1)
|
|
480
|
+
.max(100)
|
|
481
|
+
.regex(/^[a-z0-9-_.]+$/)
|
|
482
|
+
.optional(),
|
|
483
|
+
name: zod_1.z.string().min(1).max(100).optional(),
|
|
484
|
+
description: zod_1.z.string().max(1000).optional(),
|
|
485
|
+
filters: exports.AudienceOperator,
|
|
486
|
+
source: zod_1.z
|
|
487
|
+
.enum([
|
|
488
|
+
'api',
|
|
489
|
+
'dashboard',
|
|
490
|
+
'importer',
|
|
491
|
+
'github.code_usages',
|
|
492
|
+
'github.pr_insights',
|
|
493
|
+
'gitlab.code_usages',
|
|
494
|
+
'gitlab.pr_insights',
|
|
495
|
+
'bitbucket.code_usages',
|
|
496
|
+
'bitbucket.pr_insights',
|
|
497
|
+
'terraform',
|
|
498
|
+
'cli',
|
|
499
|
+
'slack',
|
|
500
|
+
'mcp',
|
|
501
|
+
])
|
|
502
|
+
.optional(),
|
|
503
|
+
_createdBy: zod_1.z.string().optional(),
|
|
504
|
+
createdAt: zod_1.z.string().datetime({ offset: true }),
|
|
505
|
+
updatedAt: zod_1.z.string().datetime({ offset: true }),
|
|
506
|
+
tags: zod_1.z.array(zod_1.z.string()).optional(),
|
|
507
|
+
readonly: zod_1.z.boolean(),
|
|
508
|
+
hasUsage: zod_1.z.boolean().optional(),
|
|
509
|
+
})
|
|
510
|
+
.passthrough();
|
|
511
|
+
exports.UpdateAudienceDto = zod_1.z
|
|
512
|
+
.object({
|
|
513
|
+
key: zod_1.z
|
|
514
|
+
.string()
|
|
515
|
+
.min(1)
|
|
516
|
+
.max(100)
|
|
517
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
518
|
+
name: zod_1.z.string().min(1).max(100),
|
|
519
|
+
description: zod_1.z.string().max(1000),
|
|
520
|
+
filters: exports.AudienceOperator,
|
|
521
|
+
tags: zod_1.z.array(zod_1.z.string()),
|
|
522
|
+
})
|
|
523
|
+
.partial();
|
|
524
|
+
// const AudienceEnvironments = z.record(z.unknown())
|
|
525
|
+
// const AudienceFeature = z
|
|
526
|
+
// .object({
|
|
527
|
+
// key: z
|
|
528
|
+
// .string()
|
|
529
|
+
// .min(1)
|
|
530
|
+
// .max(100)
|
|
531
|
+
// .regex(/^[a-z0-9-_.]+$/),
|
|
532
|
+
// name: z.string().min(1).max(100),
|
|
533
|
+
// id: z.string(),
|
|
534
|
+
// environments: AudienceEnvironments,
|
|
535
|
+
// })
|
|
536
|
+
// .passthrough()
|
|
537
|
+
// const AudienceUsage = z
|
|
538
|
+
// .object({ features: z.array(AudienceFeature) })
|
|
539
|
+
// .passthrough()
|
|
540
|
+
const VariableValidationEntity = zod_1.z.object({
|
|
541
|
+
schemaType: zod_1.z.enum(['enum', 'regex', 'jsonSchema']),
|
|
542
|
+
enumValues: zod_1.z.union([zod_1.z.array(zod_1.z.string()), zod_1.z.array(zod_1.z.number())]).optional(),
|
|
543
|
+
regexPattern: zod_1.z.string().optional(),
|
|
544
|
+
jsonSchema: zod_1.z.string().optional(),
|
|
545
|
+
description: zod_1.z.string(),
|
|
546
|
+
exampleValue: zod_1.z.any(),
|
|
547
|
+
});
|
|
548
|
+
exports.CreateVariableDto = zod_1.z.object({
|
|
549
|
+
key: zod_1.z
|
|
550
|
+
.string()
|
|
551
|
+
.min(1)
|
|
552
|
+
.max(100)
|
|
553
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
554
|
+
name: zod_1.z.string().min(1).max(100).optional(),
|
|
555
|
+
description: zod_1.z.string().max(1000).optional(),
|
|
556
|
+
type: zod_1.z.enum(['String', 'Boolean', 'Number', 'JSON']),
|
|
557
|
+
defaultValue: zod_1.z.any().optional(),
|
|
558
|
+
_feature: zod_1.z.string().optional(),
|
|
559
|
+
validationSchema: VariableValidationEntity.optional(),
|
|
560
|
+
persistent: zod_1.z.boolean().optional(),
|
|
561
|
+
tags: zod_1.z.array(zod_1.z.string()).optional(),
|
|
562
|
+
});
|
|
563
|
+
// Remove defaultValue from CreateVariableDto for Features V2 endpoints
|
|
564
|
+
exports.FeatureVariableDto = exports.CreateVariableDto.omit({ defaultValue: true });
|
|
565
|
+
exports.Variable = zod_1.z
|
|
566
|
+
.object({
|
|
567
|
+
name: zod_1.z.string().min(1).max(100).optional(),
|
|
568
|
+
description: zod_1.z.string().max(1000).optional(),
|
|
569
|
+
key: zod_1.z
|
|
570
|
+
.string()
|
|
571
|
+
.min(1)
|
|
572
|
+
.max(100)
|
|
573
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
574
|
+
_id: zod_1.z.string(),
|
|
575
|
+
_project: zod_1.z.string(),
|
|
576
|
+
_feature: zod_1.z.string().optional(),
|
|
577
|
+
type: zod_1.z.enum(['String', 'Boolean', 'Number', 'JSON']),
|
|
578
|
+
status: zod_1.z.enum(['active', 'archived']),
|
|
579
|
+
defaultValue: zod_1.z.any().optional(),
|
|
580
|
+
source: zod_1.z.enum([
|
|
581
|
+
'api',
|
|
582
|
+
'dashboard',
|
|
583
|
+
'importer',
|
|
584
|
+
'github.code_usages',
|
|
585
|
+
'github.pr_insights',
|
|
586
|
+
'gitlab.code_usages',
|
|
587
|
+
'gitlab.pr_insights',
|
|
588
|
+
'bitbucket.code_usages',
|
|
589
|
+
'bitbucket.pr_insights',
|
|
590
|
+
'terraform',
|
|
591
|
+
'cli',
|
|
592
|
+
'slack',
|
|
593
|
+
'mcp',
|
|
594
|
+
]),
|
|
595
|
+
_createdBy: zod_1.z.string().optional(),
|
|
596
|
+
createdAt: zod_1.z.string().datetime({ offset: true }),
|
|
597
|
+
updatedAt: zod_1.z.string().datetime({ offset: true }),
|
|
598
|
+
validationSchema: VariableValidationEntity.optional(),
|
|
599
|
+
persistent: zod_1.z.boolean().optional(),
|
|
600
|
+
tags: zod_1.z.array(zod_1.z.string()).optional(),
|
|
601
|
+
})
|
|
602
|
+
.passthrough();
|
|
603
|
+
exports.UpdateVariableDto = zod_1.z
|
|
604
|
+
.object({
|
|
605
|
+
key: zod_1.z
|
|
606
|
+
.string()
|
|
607
|
+
.min(1)
|
|
608
|
+
.max(100)
|
|
609
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
610
|
+
name: zod_1.z.string().min(1).max(100),
|
|
611
|
+
description: zod_1.z.string().max(1000),
|
|
612
|
+
type: zod_1.z.enum(['String', 'Boolean', 'Number', 'JSON']),
|
|
613
|
+
validationSchema: VariableValidationEntity,
|
|
614
|
+
persistent: zod_1.z.boolean(),
|
|
615
|
+
tags: zod_1.z.array(zod_1.z.string()),
|
|
616
|
+
})
|
|
617
|
+
.partial();
|
|
618
|
+
exports.UpdateVariableStatusDto = zod_1.z.object({
|
|
619
|
+
status: zod_1.z.enum(['active', 'archived']),
|
|
620
|
+
});
|
|
621
|
+
const RolloutStage = zod_1.z.object({
|
|
622
|
+
percentage: zod_1.z.number().gte(0).lte(1),
|
|
623
|
+
type: zod_1.z.enum(['linear', 'discrete']),
|
|
624
|
+
date: zod_1.z.string().datetime({ offset: true }),
|
|
625
|
+
});
|
|
626
|
+
const Rollout = zod_1.z.object({
|
|
627
|
+
startPercentage: zod_1.z.number().gte(0).lte(1).optional(),
|
|
628
|
+
type: zod_1.z.enum(['schedule', 'gradual', 'stepped']),
|
|
629
|
+
startDate: zod_1.z.string().datetime({ offset: true }),
|
|
630
|
+
stages: zod_1.z.array(RolloutStage).optional(),
|
|
631
|
+
});
|
|
632
|
+
const TargetDistribution = zod_1.z.object({
|
|
633
|
+
percentage: zod_1.z.number().gte(0).lte(1),
|
|
634
|
+
_variation: zod_1.z.string(),
|
|
635
|
+
});
|
|
636
|
+
exports.AudienceMatchFilter = zod_1.z.object({
|
|
637
|
+
type: zod_1.z.literal('audienceMatch').default('audienceMatch'),
|
|
638
|
+
comparator: zod_1.z.enum(['=', '!=']).optional(),
|
|
639
|
+
_audiences: zod_1.z.array(zod_1.z.string()).optional(),
|
|
640
|
+
});
|
|
641
|
+
exports.AudienceOperatorWithAudienceMatchFilter = zod_1.z.object({
|
|
642
|
+
filters: zod_1.z.array(zod_1.z.union([
|
|
643
|
+
exports.AllFilter.passthrough(),
|
|
644
|
+
exports.OptInFilter.passthrough(),
|
|
645
|
+
exports.UserFilter.passthrough(),
|
|
646
|
+
exports.UserCountryFilter.passthrough(),
|
|
647
|
+
exports.UserAppVersionFilter.passthrough(),
|
|
648
|
+
exports.UserPlatformVersionFilter.passthrough(),
|
|
649
|
+
exports.UserCustomFilter.passthrough(),
|
|
650
|
+
exports.AudienceMatchFilter.passthrough(),
|
|
651
|
+
])),
|
|
652
|
+
operator: zod_1.z.enum(['and', 'or']),
|
|
653
|
+
});
|
|
654
|
+
const TargetAudience = zod_1.z.object({
|
|
655
|
+
name: zod_1.z.string().min(1).max(100).optional(),
|
|
656
|
+
filters: exports.AudienceOperatorWithAudienceMatchFilter,
|
|
657
|
+
});
|
|
658
|
+
exports.UpdateTargetDto = zod_1.z.object({
|
|
659
|
+
_id: zod_1.z.string().optional(),
|
|
660
|
+
name: zod_1.z.string().optional(),
|
|
661
|
+
rollout: Rollout.nullable().optional(),
|
|
662
|
+
distribution: zod_1.z.array(TargetDistribution),
|
|
663
|
+
audience: TargetAudience,
|
|
664
|
+
});
|
|
665
|
+
exports.UpdateFeatureConfigDto = zod_1.z
|
|
666
|
+
.object({
|
|
667
|
+
status: zod_1.z.enum(['active', 'inactive']).default('inactive'),
|
|
668
|
+
targets: zod_1.z
|
|
669
|
+
.array(exports.UpdateTargetDto)
|
|
670
|
+
.describe('Setting an empty array will remove all targets for this configuration'),
|
|
671
|
+
})
|
|
672
|
+
.partial();
|
|
673
|
+
exports.CreateVariationDto = zod_1.z.object({
|
|
674
|
+
key: zod_1.z
|
|
675
|
+
.string()
|
|
676
|
+
.min(1)
|
|
677
|
+
.max(100)
|
|
678
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
679
|
+
name: zod_1.z.string().min(1).max(100),
|
|
680
|
+
variables: zod_1.z
|
|
681
|
+
.record(zod_1.z.union([
|
|
682
|
+
zod_1.z.string(),
|
|
683
|
+
zod_1.z.number(),
|
|
684
|
+
zod_1.z.boolean(),
|
|
685
|
+
zod_1.z.array(zod_1.z.unknown()),
|
|
686
|
+
zod_1.z.record(zod_1.z.unknown()),
|
|
687
|
+
]))
|
|
688
|
+
.optional(),
|
|
689
|
+
});
|
|
690
|
+
exports.FeatureSettingsDto = zod_1.z.object({
|
|
691
|
+
publicName: zod_1.z.string().max(100),
|
|
692
|
+
publicDescription: zod_1.z.string().max(1000),
|
|
693
|
+
optInEnabled: zod_1.z.boolean(),
|
|
694
|
+
});
|
|
695
|
+
exports.FeatureSDKVisibilityDto = zod_1.z.object({
|
|
696
|
+
mobile: zod_1.z.boolean(),
|
|
697
|
+
client: zod_1.z.boolean(),
|
|
698
|
+
server: zod_1.z.boolean(),
|
|
699
|
+
});
|
|
700
|
+
exports.CreateFeatureDto = zod_1.z.object({
|
|
701
|
+
key: zod_1.z
|
|
702
|
+
.string()
|
|
703
|
+
.min(1)
|
|
704
|
+
.max(100)
|
|
705
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
706
|
+
name: zod_1.z.string().min(1).max(100),
|
|
707
|
+
description: zod_1.z.string().max(1000).optional(),
|
|
708
|
+
configurations: zod_1.z.record(exports.UpdateFeatureConfigDto).optional(),
|
|
709
|
+
type: zod_1.z.enum(['release', 'experiment', 'permission', 'ops']).optional(),
|
|
710
|
+
tags: zod_1.z.array(zod_1.z.string()).optional(),
|
|
711
|
+
variations: zod_1.z.array(exports.CreateVariationDto).optional(),
|
|
712
|
+
controlVariation: zod_1.z.string().optional(),
|
|
713
|
+
variables: zod_1.z.array(exports.FeatureVariableDto).optional(),
|
|
714
|
+
settings: exports.FeatureSettingsDto.optional(),
|
|
715
|
+
sdkVisibility: exports.FeatureSDKVisibilityDto.optional(),
|
|
716
|
+
});
|
|
717
|
+
exports.Variation = zod_1.z.object({
|
|
718
|
+
key: zod_1.z
|
|
719
|
+
.string()
|
|
720
|
+
.min(1)
|
|
721
|
+
.max(100)
|
|
722
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
723
|
+
name: zod_1.z.string().min(1).max(100),
|
|
724
|
+
variables: zod_1.z
|
|
725
|
+
.record(zod_1.z.union([
|
|
726
|
+
zod_1.z.string(),
|
|
727
|
+
zod_1.z.number(),
|
|
728
|
+
zod_1.z.boolean(),
|
|
729
|
+
zod_1.z.array(zod_1.z.unknown()),
|
|
730
|
+
zod_1.z.record(zod_1.z.unknown()),
|
|
731
|
+
]))
|
|
732
|
+
.optional(),
|
|
733
|
+
_id: zod_1.z.string(),
|
|
734
|
+
});
|
|
735
|
+
const FeatureSettings = zod_1.z.object({
|
|
736
|
+
publicName: zod_1.z.string().max(100),
|
|
737
|
+
publicDescription: zod_1.z.string().max(1000),
|
|
738
|
+
optInEnabled: zod_1.z.boolean(),
|
|
739
|
+
});
|
|
740
|
+
const FeatureSDKVisibility = zod_1.z.object({
|
|
741
|
+
mobile: zod_1.z.boolean(),
|
|
742
|
+
client: zod_1.z.boolean(),
|
|
743
|
+
server: zod_1.z.boolean(),
|
|
744
|
+
});
|
|
745
|
+
exports.Target = zod_1.z.object({
|
|
746
|
+
_id: zod_1.z.string(),
|
|
747
|
+
name: zod_1.z.string().optional(),
|
|
748
|
+
audience: TargetAudience,
|
|
749
|
+
rollout: Rollout.nullable().optional(),
|
|
750
|
+
distribution: zod_1.z.array(TargetDistribution),
|
|
751
|
+
bucketingKey: zod_1.z.string().optional(),
|
|
752
|
+
});
|
|
753
|
+
exports.FeatureConfig = zod_1.z.object({
|
|
754
|
+
_feature: zod_1.z.string(),
|
|
755
|
+
_environment: zod_1.z.string(),
|
|
756
|
+
_createdBy: zod_1.z.string().optional(),
|
|
757
|
+
status: zod_1.z.enum(['active', 'inactive']),
|
|
758
|
+
startedAt: zod_1.z.string().datetime({ offset: true }).optional(),
|
|
759
|
+
updatedAt: zod_1.z.string().datetime({ offset: true }),
|
|
760
|
+
targets: zod_1.z.array(exports.Target),
|
|
761
|
+
readonly: zod_1.z.boolean(),
|
|
762
|
+
hasStaticConfig: zod_1.z.boolean(),
|
|
763
|
+
});
|
|
764
|
+
const AuditLogEntity = zod_1.z
|
|
765
|
+
.object({
|
|
766
|
+
date: zod_1.z.string().datetime({ offset: true }),
|
|
767
|
+
a0_user: zod_1.z.string(),
|
|
768
|
+
changes: zod_1.z.array(zod_1.z.record(zod_1.z.unknown())),
|
|
769
|
+
})
|
|
770
|
+
.passthrough();
|
|
771
|
+
// const FeatureStaleness = z.record(z.unknown())
|
|
772
|
+
const Link = zod_1.z.object({ url: zod_1.z.string(), title: zod_1.z.string() }).passthrough();
|
|
773
|
+
const FeatureSummary = zod_1.z
|
|
774
|
+
.object({
|
|
775
|
+
maintainers: zod_1.z.array(zod_1.z.string()),
|
|
776
|
+
links: zod_1.z.array(Link),
|
|
777
|
+
markdown: zod_1.z.string(),
|
|
778
|
+
})
|
|
779
|
+
.passthrough();
|
|
780
|
+
exports.Feature = zod_1.z
|
|
781
|
+
.object({
|
|
782
|
+
_id: zod_1.z.string(),
|
|
783
|
+
_project: zod_1.z.string(),
|
|
784
|
+
source: zod_1.z.enum([
|
|
785
|
+
'api',
|
|
786
|
+
'dashboard',
|
|
787
|
+
'importer',
|
|
788
|
+
'github.code_usages',
|
|
789
|
+
'github.pr_insights',
|
|
790
|
+
'gitlab.code_usages',
|
|
791
|
+
'gitlab.pr_insights',
|
|
792
|
+
'bitbucket.code_usages',
|
|
793
|
+
'bitbucket.pr_insights',
|
|
794
|
+
'terraform',
|
|
795
|
+
'cli',
|
|
796
|
+
'slack',
|
|
797
|
+
'mcp',
|
|
798
|
+
]),
|
|
799
|
+
status: zod_1.z.enum(['active', 'complete', 'archived']).optional(),
|
|
800
|
+
type: zod_1.z.enum(['release', 'experiment', 'permission', 'ops']).optional(),
|
|
801
|
+
name: zod_1.z.string(),
|
|
802
|
+
key: zod_1.z.string(),
|
|
803
|
+
description: zod_1.z.string().optional(),
|
|
804
|
+
_createdBy: zod_1.z.string().optional(),
|
|
805
|
+
createdAt: zod_1.z.string().datetime({ offset: true }),
|
|
806
|
+
updatedAt: zod_1.z.string().datetime({ offset: true }),
|
|
807
|
+
prodTargetingUpdatedAt: zod_1.z
|
|
808
|
+
.string()
|
|
809
|
+
.datetime({ offset: true })
|
|
810
|
+
.optional(),
|
|
811
|
+
variations: zod_1.z.array(exports.Variation).optional(),
|
|
812
|
+
controlVariation: zod_1.z.string(),
|
|
813
|
+
staticVariation: zod_1.z.string().optional(),
|
|
814
|
+
variables: zod_1.z.array(exports.Variable).optional(),
|
|
815
|
+
tags: zod_1.z.array(zod_1.z.string()),
|
|
816
|
+
ldLink: zod_1.z.string().optional(),
|
|
817
|
+
readonly: zod_1.z.boolean(),
|
|
818
|
+
settings: FeatureSettings.partial().optional(),
|
|
819
|
+
sdkVisibility: FeatureSDKVisibility.optional(),
|
|
820
|
+
configurations: zod_1.z.array(exports.FeatureConfig.partial()).optional(),
|
|
821
|
+
latestUpdate: AuditLogEntity.optional(),
|
|
822
|
+
changeRequests: zod_1.z.array(zod_1.z.record(zod_1.z.unknown())).optional(),
|
|
823
|
+
staleness: FeatureStalenessEntity.optional(),
|
|
824
|
+
summary: FeatureSummary.partial().optional(),
|
|
825
|
+
})
|
|
826
|
+
.passthrough();
|
|
827
|
+
const UpdateVariationDto = zod_1.z
|
|
828
|
+
.object({
|
|
829
|
+
key: zod_1.z
|
|
830
|
+
.string()
|
|
831
|
+
.min(1)
|
|
832
|
+
.max(100)
|
|
833
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
834
|
+
name: zod_1.z.string().min(1).max(100),
|
|
835
|
+
variables: zod_1.z
|
|
836
|
+
.record(zod_1.z.union([
|
|
837
|
+
zod_1.z.string(),
|
|
838
|
+
zod_1.z.number(),
|
|
839
|
+
zod_1.z.boolean(),
|
|
840
|
+
zod_1.z.array(zod_1.z.unknown()),
|
|
841
|
+
zod_1.z.record(zod_1.z.unknown()),
|
|
842
|
+
]))
|
|
843
|
+
.optional(),
|
|
844
|
+
_id: zod_1.z.string().optional(),
|
|
845
|
+
})
|
|
846
|
+
.passthrough();
|
|
847
|
+
const UpdateFeatureSummaryDto = zod_1.z
|
|
848
|
+
.object({
|
|
849
|
+
maintainers: zod_1.z.array(zod_1.z.string()),
|
|
850
|
+
links: zod_1.z.array(Link),
|
|
851
|
+
markdown: zod_1.z.string(),
|
|
852
|
+
})
|
|
853
|
+
.partial()
|
|
854
|
+
.passthrough();
|
|
855
|
+
exports.UpdateFeatureDto = zod_1.z
|
|
856
|
+
.object({
|
|
857
|
+
key: zod_1.z
|
|
858
|
+
.string()
|
|
859
|
+
.min(1)
|
|
860
|
+
.max(100)
|
|
861
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
862
|
+
name: zod_1.z.string().min(1).max(100),
|
|
863
|
+
description: zod_1.z.string().max(1000),
|
|
864
|
+
configurations: zod_1.z.record(exports.UpdateFeatureConfigDto),
|
|
865
|
+
variables: zod_1.z.array(exports.FeatureVariableDto),
|
|
866
|
+
variations: zod_1.z.array(UpdateVariationDto),
|
|
867
|
+
summary: UpdateFeatureSummaryDto,
|
|
868
|
+
type: zod_1.z.enum(['release', 'experiment', 'permission', 'ops']),
|
|
869
|
+
tags: zod_1.z.array(zod_1.z.string()),
|
|
870
|
+
controlVariation: zod_1.z.string(),
|
|
871
|
+
settings: exports.FeatureSettingsDto,
|
|
872
|
+
sdkVisibility: exports.FeatureSDKVisibilityDto,
|
|
873
|
+
})
|
|
874
|
+
.partial();
|
|
875
|
+
exports.UpdateFeatureStatusDto = zod_1.z.object({
|
|
876
|
+
status: zod_1.z.enum(['active', 'complete', 'archived']),
|
|
877
|
+
staticVariation: zod_1.z.string().optional(),
|
|
878
|
+
});
|
|
879
|
+
// const StaticConfiguration = z
|
|
880
|
+
// .object({
|
|
881
|
+
// key: z
|
|
882
|
+
// .string()
|
|
883
|
+
// .min(1)
|
|
884
|
+
// .max(100)
|
|
885
|
+
// .regex(/^[a-z0-9-_.]+$/)
|
|
886
|
+
// .optional(),
|
|
887
|
+
// name: z.string().min(1).max(100).optional(),
|
|
888
|
+
// description: z.string().max(1000).optional(),
|
|
889
|
+
// variables: z.record(z.unknown()),
|
|
890
|
+
// environments: z.record(z.unknown()),
|
|
891
|
+
// readonly: z.boolean(),
|
|
892
|
+
// type: z.enum(['release', 'experiment', 'permission', 'ops']).optional(),
|
|
893
|
+
// tags: z.array(z.string()).optional(),
|
|
894
|
+
// controlVariation: z.string().optional(),
|
|
895
|
+
// settings: FeatureSettingsDto.optional(),
|
|
896
|
+
// sdkVisibility: FeatureSDKVisibilityDto.optional(),
|
|
897
|
+
// staleness: z.record(z.unknown()).optional(),
|
|
898
|
+
// summary: UpdateFeatureSummaryDto.optional(),
|
|
899
|
+
// })
|
|
900
|
+
// .passthrough()
|
|
901
|
+
// const UpdateStaticConfigurationDto = z
|
|
902
|
+
// .object({
|
|
903
|
+
// key: z
|
|
904
|
+
// .string()
|
|
905
|
+
// .min(1)
|
|
906
|
+
// .max(100)
|
|
907
|
+
// .regex(/^[a-z0-9-_.]+$/),
|
|
908
|
+
// name: z.string().min(1).max(100),
|
|
909
|
+
// description: z.string().max(1000),
|
|
910
|
+
// type: z.enum(['release', 'experiment', 'permission', 'ops']),
|
|
911
|
+
// tags: z.array(z.string()),
|
|
912
|
+
// controlVariation: z.string(),
|
|
913
|
+
// settings: FeatureSettingsDto,
|
|
914
|
+
// sdkVisibility: FeatureSDKVisibilityDto,
|
|
915
|
+
// staleness: z.record(z.unknown()),
|
|
916
|
+
// summary: UpdateFeatureSummaryDto,
|
|
917
|
+
// variables: z.record(z.unknown()),
|
|
918
|
+
// environments: z.record(z.unknown()),
|
|
919
|
+
// })
|
|
920
|
+
// .partial()
|
|
921
|
+
// .passthrough()
|
|
922
|
+
const LinkJiraIssueDto = zod_1.z.object({ issueId: zod_1.z.string() });
|
|
923
|
+
exports.JiraIssueLink = zod_1.z.object({ issueId: zod_1.z.string() });
|
|
924
|
+
exports.FeatureVariationDto = zod_1.z.object({
|
|
925
|
+
_id: zod_1.z.string(),
|
|
926
|
+
key: zod_1.z
|
|
927
|
+
.string()
|
|
928
|
+
.min(1)
|
|
929
|
+
.max(100)
|
|
930
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
931
|
+
name: zod_1.z.string().min(1).max(100),
|
|
932
|
+
variables: zod_1.z
|
|
933
|
+
.record(zod_1.z.union([
|
|
934
|
+
zod_1.z.string(),
|
|
935
|
+
zod_1.z.number(),
|
|
936
|
+
zod_1.z.boolean(),
|
|
937
|
+
zod_1.z.array(zod_1.z.unknown()),
|
|
938
|
+
zod_1.z.record(zod_1.z.unknown()),
|
|
939
|
+
]))
|
|
940
|
+
.optional(),
|
|
941
|
+
});
|
|
942
|
+
exports.UpdateFeatureVariationDto = zod_1.z
|
|
943
|
+
.object({
|
|
944
|
+
_id: zod_1.z.string(),
|
|
945
|
+
key: zod_1.z
|
|
946
|
+
.string()
|
|
947
|
+
.min(1)
|
|
948
|
+
.max(100)
|
|
949
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
950
|
+
name: zod_1.z.string().min(1).max(100),
|
|
951
|
+
variables: zod_1.z.record(zod_1.z.union([
|
|
952
|
+
zod_1.z.string(),
|
|
953
|
+
zod_1.z.number(),
|
|
954
|
+
zod_1.z.boolean(),
|
|
955
|
+
zod_1.z.array(zod_1.z.unknown()),
|
|
956
|
+
zod_1.z.record(zod_1.z.unknown()),
|
|
957
|
+
])),
|
|
958
|
+
})
|
|
959
|
+
.partial();
|
|
960
|
+
const FeatureDataPoint = zod_1.z.object({
|
|
961
|
+
values: zod_1.z.record(zod_1.z.unknown()),
|
|
962
|
+
date: zod_1.z.string().datetime({ offset: true }),
|
|
963
|
+
});
|
|
964
|
+
const ResultWithFeatureData = zod_1.z
|
|
965
|
+
.object({
|
|
966
|
+
evaluations: zod_1.z.array(FeatureDataPoint),
|
|
967
|
+
})
|
|
968
|
+
.partial();
|
|
969
|
+
exports.ResultEvaluationsByHourDto = zod_1.z.object({
|
|
970
|
+
result: ResultWithFeatureData,
|
|
971
|
+
cached: zod_1.z.boolean(),
|
|
972
|
+
updatedAt: zod_1.z.string().datetime({ offset: true }),
|
|
973
|
+
});
|
|
974
|
+
const ProjectDataPoint = zod_1.z.object({
|
|
975
|
+
date: zod_1.z.string().datetime({ offset: true }),
|
|
976
|
+
value: zod_1.z.number(),
|
|
977
|
+
});
|
|
978
|
+
const ResultsWithProjectData = zod_1.z
|
|
979
|
+
.object({
|
|
980
|
+
evaluations: zod_1.z.array(ProjectDataPoint),
|
|
981
|
+
})
|
|
982
|
+
.partial();
|
|
983
|
+
exports.ResultProjectEvaluationsByHourDto = zod_1.z.object({
|
|
984
|
+
result: ResultsWithProjectData,
|
|
985
|
+
cached: zod_1.z.boolean(),
|
|
986
|
+
updatedAt: zod_1.z.string().datetime({ offset: true }),
|
|
987
|
+
});
|
|
988
|
+
exports.ProjectUserProfile = zod_1.z.object({
|
|
989
|
+
_id: zod_1.z.string(),
|
|
990
|
+
_project: zod_1.z.string(),
|
|
991
|
+
a0_user: zod_1.z.string(),
|
|
992
|
+
dvcUserId: zod_1.z.string().nullish(),
|
|
993
|
+
createdAt: zod_1.z.string().datetime({ offset: true }),
|
|
994
|
+
updatedAt: zod_1.z.string().datetime({ offset: true }),
|
|
995
|
+
});
|
|
996
|
+
exports.UpdateProjectUserProfileDto = zod_1.z.object({
|
|
997
|
+
dvcUserId: zod_1.z.string().nullable(),
|
|
998
|
+
});
|
|
999
|
+
const UpdateUserProfileDto = zod_1.z
|
|
1000
|
+
.object({ dvcUserId: zod_1.z.string().nullable() })
|
|
1001
|
+
.partial();
|
|
1002
|
+
const AllowedValue = zod_1.z.object({
|
|
1003
|
+
label: zod_1.z.string(),
|
|
1004
|
+
value: zod_1.z.record(zod_1.z.unknown()),
|
|
1005
|
+
});
|
|
1006
|
+
const EnumSchema = zod_1.z.object({
|
|
1007
|
+
allowedValues: zod_1.z.array(AllowedValue),
|
|
1008
|
+
allowAdditionalValues: zod_1.z.boolean(),
|
|
1009
|
+
});
|
|
1010
|
+
const PropertySchema = zod_1.z
|
|
1011
|
+
.object({
|
|
1012
|
+
schemaType: zod_1.z.enum(['enum']),
|
|
1013
|
+
required: zod_1.z.boolean(),
|
|
1014
|
+
enumSchema: EnumSchema,
|
|
1015
|
+
})
|
|
1016
|
+
.partial();
|
|
1017
|
+
exports.CreateCustomPropertyDto = zod_1.z.object({
|
|
1018
|
+
name: zod_1.z.string().min(1).max(100),
|
|
1019
|
+
key: zod_1.z
|
|
1020
|
+
.string()
|
|
1021
|
+
.min(1)
|
|
1022
|
+
.max(100)
|
|
1023
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
1024
|
+
type: zod_1.z.enum(['String', 'Boolean', 'Number']),
|
|
1025
|
+
propertyKey: zod_1.z.string(),
|
|
1026
|
+
schema: PropertySchema.optional(),
|
|
1027
|
+
});
|
|
1028
|
+
exports.CustomProperty = zod_1.z.object({
|
|
1029
|
+
_id: zod_1.z.string(),
|
|
1030
|
+
_project: zod_1.z.string(),
|
|
1031
|
+
key: zod_1.z
|
|
1032
|
+
.string()
|
|
1033
|
+
.min(1)
|
|
1034
|
+
.max(100)
|
|
1035
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
1036
|
+
name: zod_1.z.string().min(1).max(100),
|
|
1037
|
+
_createdBy: zod_1.z.string(),
|
|
1038
|
+
propertyKey: zod_1.z.string(),
|
|
1039
|
+
type: zod_1.z.enum(['String', 'Boolean', 'Number']),
|
|
1040
|
+
createdAt: zod_1.z.string().datetime({ offset: true }),
|
|
1041
|
+
updatedAt: zod_1.z.string().datetime({ offset: true }),
|
|
1042
|
+
schema: PropertySchema.optional(),
|
|
1043
|
+
hasUsage: zod_1.z.boolean().optional(),
|
|
1044
|
+
});
|
|
1045
|
+
exports.UpdateCustomPropertyDto = zod_1.z
|
|
1046
|
+
.object({
|
|
1047
|
+
key: zod_1.z
|
|
1048
|
+
.string()
|
|
1049
|
+
.min(1)
|
|
1050
|
+
.max(100)
|
|
1051
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
1052
|
+
name: zod_1.z.string().min(1).max(100),
|
|
1053
|
+
propertyKey: zod_1.z.string(),
|
|
1054
|
+
type: zod_1.z.enum(['String', 'Boolean', 'Number']),
|
|
1055
|
+
schema: PropertySchema,
|
|
1056
|
+
})
|
|
1057
|
+
.partial();
|
|
1058
|
+
exports.CreateMetricDto = zod_1.z.object({
|
|
1059
|
+
key: zod_1.z
|
|
1060
|
+
.string()
|
|
1061
|
+
.min(1)
|
|
1062
|
+
.max(100)
|
|
1063
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
1064
|
+
name: zod_1.z.string().min(1).max(100),
|
|
1065
|
+
description: zod_1.z.string().max(1000).optional(),
|
|
1066
|
+
event: zod_1.z.string(),
|
|
1067
|
+
dimension: zod_1.z.enum([
|
|
1068
|
+
'COUNT_PER_UNIQUE_USER',
|
|
1069
|
+
'COUNT_PER_VARIABLE_EVALUATION',
|
|
1070
|
+
'SUM_PER_UNIQUE_USER',
|
|
1071
|
+
'AVERAGE_PER_UNIQUE_USER',
|
|
1072
|
+
'TOTAL_AVERAGE',
|
|
1073
|
+
'TOTAL_SUM',
|
|
1074
|
+
]),
|
|
1075
|
+
optimize: zod_1.z.enum(['increase', 'decrease']),
|
|
1076
|
+
});
|
|
1077
|
+
exports.Metric = zod_1.z.object({
|
|
1078
|
+
_id: zod_1.z.string(),
|
|
1079
|
+
_project: zod_1.z.string(),
|
|
1080
|
+
key: zod_1.z
|
|
1081
|
+
.string()
|
|
1082
|
+
.min(1)
|
|
1083
|
+
.max(100)
|
|
1084
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
1085
|
+
name: zod_1.z.string().min(1).max(100),
|
|
1086
|
+
description: zod_1.z.string().max(1000).optional(),
|
|
1087
|
+
source: zod_1.z
|
|
1088
|
+
.enum([
|
|
1089
|
+
'api',
|
|
1090
|
+
'dashboard',
|
|
1091
|
+
'importer',
|
|
1092
|
+
'github.code_usages',
|
|
1093
|
+
'github.pr_insights',
|
|
1094
|
+
'gitlab.code_usages',
|
|
1095
|
+
'gitlab.pr_insights',
|
|
1096
|
+
'bitbucket.code_usages',
|
|
1097
|
+
'bitbucket.pr_insights',
|
|
1098
|
+
'terraform',
|
|
1099
|
+
'cli',
|
|
1100
|
+
'slack',
|
|
1101
|
+
'mcp',
|
|
1102
|
+
])
|
|
1103
|
+
.optional(),
|
|
1104
|
+
event: zod_1.z.string(),
|
|
1105
|
+
dimension: zod_1.z.enum([
|
|
1106
|
+
'COUNT_PER_UNIQUE_USER',
|
|
1107
|
+
'COUNT_PER_VARIABLE_EVALUATION',
|
|
1108
|
+
'SUM_PER_UNIQUE_USER',
|
|
1109
|
+
'AVERAGE_PER_UNIQUE_USER',
|
|
1110
|
+
'TOTAL_AVERAGE',
|
|
1111
|
+
'TOTAL_SUM',
|
|
1112
|
+
]),
|
|
1113
|
+
optimize: zod_1.z.enum(['increase', 'decrease']),
|
|
1114
|
+
createdAt: zod_1.z.string().datetime({ offset: true }),
|
|
1115
|
+
updatedAt: zod_1.z.string().datetime({ offset: true }),
|
|
1116
|
+
});
|
|
1117
|
+
exports.UpdateMetricDto = zod_1.z
|
|
1118
|
+
.object({
|
|
1119
|
+
key: zod_1.z
|
|
1120
|
+
.string()
|
|
1121
|
+
.min(1)
|
|
1122
|
+
.max(100)
|
|
1123
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
1124
|
+
name: zod_1.z.string().min(1).max(100),
|
|
1125
|
+
description: zod_1.z.string().max(1000),
|
|
1126
|
+
event: zod_1.z.string(),
|
|
1127
|
+
dimension: zod_1.z.enum([
|
|
1128
|
+
'COUNT_PER_UNIQUE_USER',
|
|
1129
|
+
'COUNT_PER_VARIABLE_EVALUATION',
|
|
1130
|
+
'SUM_PER_UNIQUE_USER',
|
|
1131
|
+
'AVERAGE_PER_UNIQUE_USER',
|
|
1132
|
+
'TOTAL_AVERAGE',
|
|
1133
|
+
'TOTAL_SUM',
|
|
1134
|
+
]),
|
|
1135
|
+
optimize: zod_1.z.enum(['increase', 'decrease']),
|
|
1136
|
+
})
|
|
1137
|
+
.partial();
|
|
1138
|
+
const VariationValues = zod_1.z.object({}).partial();
|
|
1139
|
+
const DataPoint = zod_1.z.object({
|
|
1140
|
+
date: zod_1.z.string().datetime({ offset: true }),
|
|
1141
|
+
values: VariationValues,
|
|
1142
|
+
});
|
|
1143
|
+
const VariationResult = zod_1.z.object({
|
|
1144
|
+
key: zod_1.z.string(),
|
|
1145
|
+
name: zod_1.z.string(),
|
|
1146
|
+
numerator: zod_1.z.number(),
|
|
1147
|
+
denominator: zod_1.z.number(),
|
|
1148
|
+
rate: zod_1.z.number(),
|
|
1149
|
+
avgValue: zod_1.z.number().optional(),
|
|
1150
|
+
totalValue: zod_1.z.number().optional(),
|
|
1151
|
+
stdev: zod_1.z.number().optional(),
|
|
1152
|
+
percentDifference: zod_1.z.number().nullable(),
|
|
1153
|
+
chanceToBeatControl: zod_1.z.number().nullable(),
|
|
1154
|
+
});
|
|
1155
|
+
const Result = zod_1.z
|
|
1156
|
+
.object({
|
|
1157
|
+
dataSeries: zod_1.z.array(DataPoint),
|
|
1158
|
+
variations: zod_1.z.array(VariationResult),
|
|
1159
|
+
})
|
|
1160
|
+
.partial();
|
|
1161
|
+
exports.MetricResult = zod_1.z.object({
|
|
1162
|
+
result: Result,
|
|
1163
|
+
cached: zod_1.z.boolean(),
|
|
1164
|
+
updatedAt: zod_1.z.string().datetime({ offset: true }),
|
|
1165
|
+
});
|
|
1166
|
+
exports.MetricAssociation = zod_1.z.object({
|
|
1167
|
+
_project: zod_1.z.string(),
|
|
1168
|
+
feature: exports.Feature,
|
|
1169
|
+
metric: exports.Metric,
|
|
1170
|
+
createdAt: zod_1.z.string().datetime({ offset: true }),
|
|
1171
|
+
});
|
|
1172
|
+
exports.CreateMetricAssociationDto = zod_1.z.object({
|
|
1173
|
+
metric: zod_1.z.string(),
|
|
1174
|
+
feature: zod_1.z.string(),
|
|
1175
|
+
});
|
|
1176
|
+
exports.DeleteMetricAssociationDto = zod_1.z.object({
|
|
1177
|
+
metric: zod_1.z.string(),
|
|
1178
|
+
feature: zod_1.z.string(),
|
|
1179
|
+
});
|
|
1180
|
+
exports.UpdateUserOverrideDto = zod_1.z.object({
|
|
1181
|
+
environment: zod_1.z.string(),
|
|
1182
|
+
variation: zod_1.z.string(),
|
|
1183
|
+
});
|
|
1184
|
+
exports.Override = zod_1.z.object({
|
|
1185
|
+
_project: zod_1.z.string(),
|
|
1186
|
+
_environment: zod_1.z.string(),
|
|
1187
|
+
_feature: zod_1.z.string(),
|
|
1188
|
+
_variation: zod_1.z.string(),
|
|
1189
|
+
dvcUserId: zod_1.z.string(),
|
|
1190
|
+
createdAt: zod_1.z.string().datetime(),
|
|
1191
|
+
updatedAt: zod_1.z.string().datetime(),
|
|
1192
|
+
a0_user: zod_1.z.string().optional(),
|
|
1193
|
+
});
|
|
1194
|
+
exports.FeatureOverride = zod_1.z.object({
|
|
1195
|
+
_environment: zod_1.z.string(),
|
|
1196
|
+
_variation: zod_1.z.string(),
|
|
1197
|
+
});
|
|
1198
|
+
exports.OverrideResponse = zod_1.z.object({
|
|
1199
|
+
overrides: zod_1.z.array(exports.FeatureOverride),
|
|
1200
|
+
});
|
|
1201
|
+
exports.FeatureOverrideResponse = zod_1.z.object({
|
|
1202
|
+
overrides: zod_1.z.record(zod_1.z.array(exports.Override)),
|
|
1203
|
+
uniqueTeamMembers: zod_1.z.number(),
|
|
1204
|
+
});
|
|
1205
|
+
exports.UserOverride = zod_1.z.object({
|
|
1206
|
+
_feature: zod_1.z.string(),
|
|
1207
|
+
featureName: zod_1.z.string(),
|
|
1208
|
+
_environment: zod_1.z.string(),
|
|
1209
|
+
environmentName: zod_1.z.string(),
|
|
1210
|
+
_variation: zod_1.z.string(),
|
|
1211
|
+
variationName: zod_1.z.string(),
|
|
1212
|
+
});
|
|
1213
|
+
// const AudiencePatchAction = z
|
|
1214
|
+
// .object({
|
|
1215
|
+
// values: z.record(z.unknown()),
|
|
1216
|
+
// filterIndex: z.string(),
|
|
1217
|
+
// })
|
|
1218
|
+
// .passthrough()
|
|
1219
|
+
// const AudiencePatchInstructionsDto = z
|
|
1220
|
+
// .object({
|
|
1221
|
+
// op: z.enum(['addFilterValues', 'removeFilterValues']),
|
|
1222
|
+
// action: AudiencePatchAction,
|
|
1223
|
+
// })
|
|
1224
|
+
// .passthrough()
|
|
1225
|
+
// const AudiencePatchDto = z
|
|
1226
|
+
// .object({ instructions: z.array(AudiencePatchInstructionsDto) })
|
|
1227
|
+
// .passthrough()
|
|
1228
|
+
// const UpdateStalenessDto = z
|
|
1229
|
+
// .object({
|
|
1230
|
+
// snoozedUntil: z.string(),
|
|
1231
|
+
// disabled: z.boolean(),
|
|
1232
|
+
// metaData: z.record(z.unknown()),
|
|
1233
|
+
// })
|
|
1234
|
+
// .partial()
|
|
1235
|
+
// .passthrough()
|
|
1236
|
+
// const Reviewers = z.record(z.unknown())
|
|
1237
|
+
// const ReviewReason = z.record(z.unknown())
|
|
1238
|
+
// const FeatureDetails = z
|
|
1239
|
+
// .object({
|
|
1240
|
+
// key: z
|
|
1241
|
+
// .string()
|
|
1242
|
+
// .min(1)
|
|
1243
|
+
// .max(100)
|
|
1244
|
+
// .regex(/^[a-z0-9-_.]+$/),
|
|
1245
|
+
// name: z.string().min(1).max(100),
|
|
1246
|
+
// id: z.string(),
|
|
1247
|
+
// })
|
|
1248
|
+
// .passthrough()
|
|
1249
|
+
// const FeatureChangeRequestSummary = z
|
|
1250
|
+
// .object({
|
|
1251
|
+
// _id: z.string(),
|
|
1252
|
+
// _project: z.string(),
|
|
1253
|
+
// _feature: z.string(),
|
|
1254
|
+
// status: z.enum([
|
|
1255
|
+
// 'draft',
|
|
1256
|
+
// 'pending',
|
|
1257
|
+
// 'approved',
|
|
1258
|
+
// 'applied',
|
|
1259
|
+
// 'rejected',
|
|
1260
|
+
// 'cancelled',
|
|
1261
|
+
// ]),
|
|
1262
|
+
// operation: z.enum([
|
|
1263
|
+
// 'featureUpdate',
|
|
1264
|
+
// 'featureStatusUpdate',
|
|
1265
|
+
// 'featureStaticConfigurationUpdate',
|
|
1266
|
+
// ]),
|
|
1267
|
+
// description: z.string().optional(),
|
|
1268
|
+
// reviewers: Reviewers,
|
|
1269
|
+
// reviews: z.array(ReviewReason),
|
|
1270
|
+
// _createdBy: z.string(),
|
|
1271
|
+
// _updatedBy: z.string().optional(),
|
|
1272
|
+
// createdAt: z.string().datetime({ offset: true }).optional(),
|
|
1273
|
+
// updatedAt: z.string().datetime({ offset: true }).optional(),
|
|
1274
|
+
// feature: FeatureDetails,
|
|
1275
|
+
// })
|
|
1276
|
+
// .passthrough()
|
|
1277
|
+
// const CreateFeatureChangeRequestDto = z
|
|
1278
|
+
// .object({
|
|
1279
|
+
// path: z.string(),
|
|
1280
|
+
// method: z.literal('PATCH'),
|
|
1281
|
+
// body: z.record(z.unknown()),
|
|
1282
|
+
// })
|
|
1283
|
+
// .passthrough()
|
|
1284
|
+
// const FeatureChangeRequest = z
|
|
1285
|
+
// .object({
|
|
1286
|
+
// _id: z.string(),
|
|
1287
|
+
// _project: z.string(),
|
|
1288
|
+
// _baseFeatureSnapshot: z.string(),
|
|
1289
|
+
// _feature: z.string(),
|
|
1290
|
+
// status: z.enum([
|
|
1291
|
+
// 'draft',
|
|
1292
|
+
// 'pending',
|
|
1293
|
+
// 'approved',
|
|
1294
|
+
// 'applied',
|
|
1295
|
+
// 'rejected',
|
|
1296
|
+
// 'cancelled',
|
|
1297
|
+
// ]),
|
|
1298
|
+
// changes: z.array(z.record(z.unknown())).optional(),
|
|
1299
|
+
// operation: z.enum([
|
|
1300
|
+
// 'featureUpdate',
|
|
1301
|
+
// 'featureStatusUpdate',
|
|
1302
|
+
// 'featureStaticConfigurationUpdate',
|
|
1303
|
+
// ]),
|
|
1304
|
+
// description: z.string().optional(),
|
|
1305
|
+
// reviewers: Reviewers,
|
|
1306
|
+
// reviews: z.array(ReviewReason),
|
|
1307
|
+
// _createdBy: z.string(),
|
|
1308
|
+
// _updatedBy: z.string().optional(),
|
|
1309
|
+
// createdAt: z.string().datetime({ offset: true }).optional(),
|
|
1310
|
+
// updatedAt: z.string().datetime({ offset: true }).optional(),
|
|
1311
|
+
// })
|
|
1312
|
+
// .passthrough()
|
|
1313
|
+
// const SubmitFeatureChangeRequestDto = z
|
|
1314
|
+
// .object({
|
|
1315
|
+
// description: z.string().max(1000),
|
|
1316
|
+
// reviewers: z.array(z.string()),
|
|
1317
|
+
// })
|
|
1318
|
+
// .passthrough()
|
|
1319
|
+
// const ReviewFeatureChangeRequestDto = z
|
|
1320
|
+
// .object({ action: z.enum(['approved', 'rejected']), comment: z.string() })
|
|
1321
|
+
// .passthrough()
|
|
1322
|
+
// const ApplyFeatureChangeRequestDto = z
|
|
1323
|
+
// .object({ description: z.string().max(1000), action: z.literal('applied') })
|
|
1324
|
+
// .passthrough()
|
|
1325
|
+
// const CreateWebhookDto = z
|
|
1326
|
+
// .object({
|
|
1327
|
+
// name: z.string().min(1).max(100),
|
|
1328
|
+
// description: z.string().max(1000).optional(),
|
|
1329
|
+
// outputFormat: z.record(z.unknown()).optional(),
|
|
1330
|
+
// _feature: z.string().optional(),
|
|
1331
|
+
// _environments: z.array(z.string()).optional(),
|
|
1332
|
+
// events: z.array(z.string()),
|
|
1333
|
+
// url: z.string(),
|
|
1334
|
+
// })
|
|
1335
|
+
// .passthrough()
|
|
1336
|
+
// const Webhook = z
|
|
1337
|
+
// .object({
|
|
1338
|
+
// name: z.string().min(1).max(100),
|
|
1339
|
+
// description: z.string().max(1000).optional(),
|
|
1340
|
+
// _id: z.string(),
|
|
1341
|
+
// _project: z.string(),
|
|
1342
|
+
// _feature: z.string().optional(),
|
|
1343
|
+
// _environments: z.array(z.string()),
|
|
1344
|
+
// url: z.string(),
|
|
1345
|
+
// events: z.array(z.string()),
|
|
1346
|
+
// source: z
|
|
1347
|
+
// .enum([
|
|
1348
|
+
// 'api',
|
|
1349
|
+
// 'dashboard',
|
|
1350
|
+
// 'importer',
|
|
1351
|
+
// 'github.code_usages',
|
|
1352
|
+
// 'github.pr_insights',
|
|
1353
|
+
// 'gitlab.code_usages',
|
|
1354
|
+
// 'gitlab.pr_insights',
|
|
1355
|
+
// 'bitbucket.code_usages',
|
|
1356
|
+
// 'bitbucket.pr_insights',
|
|
1357
|
+
// 'terraform',
|
|
1358
|
+
// 'cli',
|
|
1359
|
+
// 'slack',
|
|
1360
|
+
// 'mcp',
|
|
1361
|
+
// ])
|
|
1362
|
+
// .optional(),
|
|
1363
|
+
// createdBy: z.string().optional(),
|
|
1364
|
+
// createdAt: z.string().datetime({ offset: true }),
|
|
1365
|
+
// updatedAt: z.string().datetime({ offset: true }),
|
|
1366
|
+
// outputFormat: z.record(z.unknown()).optional(),
|
|
1367
|
+
// _slackIntegration: z.string().optional(),
|
|
1368
|
+
// })
|
|
1369
|
+
// .passthrough()
|
|
1370
|
+
// const UpdateWebhookDto = z
|
|
1371
|
+
// .object({
|
|
1372
|
+
// name: z.string().min(1).max(100).optional(),
|
|
1373
|
+
// description: z.string().max(1000).optional(),
|
|
1374
|
+
// _feature: z.string(),
|
|
1375
|
+
// _environments: z.array(z.string()),
|
|
1376
|
+
// events: z.array(z.string()).optional(),
|
|
1377
|
+
// url: z.string().optional(),
|
|
1378
|
+
// outputFormat: z.record(z.unknown()).optional(),
|
|
1379
|
+
// })
|
|
1380
|
+
// .passthrough()
|
|
1381
|
+
// const CreateDynatraceIntegrationDto = z
|
|
1382
|
+
// .object({
|
|
1383
|
+
// dynatraceEnvironmentId: z.string(),
|
|
1384
|
+
// accessToken: z.string(),
|
|
1385
|
+
// environmentUrl: z.string(),
|
|
1386
|
+
// })
|
|
1387
|
+
// .passthrough()
|
|
1388
|
+
// const DynatraceEnvironment = z
|
|
1389
|
+
// .object({
|
|
1390
|
+
// dynatraceEnvironmentId: z.string(),
|
|
1391
|
+
// accessToken: z.string(),
|
|
1392
|
+
// environmentUrl: z.string(),
|
|
1393
|
+
// projects: z.array(Project),
|
|
1394
|
+
// })
|
|
1395
|
+
// .passthrough()
|
|
1396
|
+
// const DynatraceIntegration = z
|
|
1397
|
+
// .object({ environments: z.array(DynatraceEnvironment) })
|
|
1398
|
+
// .passthrough()
|
|
1399
|
+
exports.ReassociateVariableDto = zod_1.z.object({
|
|
1400
|
+
key: zod_1.z
|
|
1401
|
+
.string()
|
|
1402
|
+
.min(1)
|
|
1403
|
+
.max(100)
|
|
1404
|
+
.regex(/^[a-z0-9-_.]+$/),
|
|
1405
|
+
});
|
|
1406
|
+
//# sourceMappingURL=zodSchemas.js.map
|