@nebius/js-sdk 0.1.0
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/LICENSE +21 -0
- package/README.md +338 -0
- package/dist/cjs/__tests__/generator_basic.cases.d.ts +2 -0
- package/dist/cjs/__tests__/generator_basic.cases.d.ts.map +1 -0
- package/dist/cjs/__tests__/generator_basic.cases.js +596 -0
- package/dist/cjs/__tests__/generator_basic.cases.js.map +1 -0
- package/dist/cjs/__tests__/generator_cross.cases.d.ts +2 -0
- package/dist/cjs/__tests__/generator_cross.cases.d.ts.map +1 -0
- package/dist/cjs/__tests__/generator_cross.cases.js +448 -0
- package/dist/cjs/__tests__/generator_cross.cases.js.map +1 -0
- package/dist/cjs/__tests__/generator_extensions.cases.d.ts +2 -0
- package/dist/cjs/__tests__/generator_extensions.cases.d.ts.map +1 -0
- package/dist/cjs/__tests__/generator_extensions.cases.js +347 -0
- package/dist/cjs/__tests__/generator_extensions.cases.js.map +1 -0
- package/dist/cjs/__tests__/generator_registry.cases.d.ts +7 -0
- package/dist/cjs/__tests__/generator_registry.cases.d.ts.map +1 -0
- package/dist/cjs/__tests__/generator_registry.cases.js +35 -0
- package/dist/cjs/__tests__/generator_registry.cases.js.map +1 -0
- package/dist/cjs/__tests__/generator_sanitization.cases.d.ts +2 -0
- package/dist/cjs/__tests__/generator_sanitization.cases.d.ts.map +1 -0
- package/dist/cjs/__tests__/generator_sanitization.cases.js +62 -0
- package/dist/cjs/__tests__/generator_sanitization.cases.js.map +1 -0
- package/dist/cjs/__tests__/generator_shared.helpers.d.ts +21 -0
- package/dist/cjs/__tests__/generator_shared.helpers.d.ts.map +1 -0
- package/dist/cjs/__tests__/generator_shared.helpers.js +396 -0
- package/dist/cjs/__tests__/generator_shared.helpers.js.map +1 -0
- package/dist/cjs/api/buf/validate/index.d.ts +2681 -0
- package/dist/cjs/api/buf/validate/index.d.ts.map +1 -0
- package/dist/cjs/api/buf/validate/index.js +9586 -0
- package/dist/cjs/api/buf/validate/index.js.map +1 -0
- package/dist/cjs/api/google/protobuf/index.d.ts +1779 -0
- package/dist/cjs/api/google/protobuf/index.d.ts.map +1 -0
- package/dist/cjs/api/google/protobuf/index.js +7326 -0
- package/dist/cjs/api/google/protobuf/index.js.map +1 -0
- package/dist/cjs/api/google/rpc/index.d.ts +247 -0
- package/dist/cjs/api/google/rpc/index.d.ts.map +1 -0
- package/dist/cjs/api/google/rpc/index.js +366 -0
- package/dist/cjs/api/google/rpc/index.js.map +1 -0
- package/dist/cjs/api/nebius/applications/v1alpha1/index.d.ts +210 -0
- package/dist/cjs/api/nebius/applications/v1alpha1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/applications/v1alpha1/index.js +1421 -0
- package/dist/cjs/api/nebius/applications/v1alpha1/index.js.map +1 -0
- package/dist/cjs/api/nebius/audit/v2/index.d.ts +457 -0
- package/dist/cjs/api/nebius/audit/v2/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/audit/v2/index.js +2695 -0
- package/dist/cjs/api/nebius/audit/v2/index.js.map +1 -0
- package/dist/cjs/api/nebius/billing/v1alpha1/index.d.ts +262 -0
- package/dist/cjs/api/nebius/billing/v1alpha1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/billing/v1alpha1/index.js +1319 -0
- package/dist/cjs/api/nebius/billing/v1alpha1/index.js.map +1 -0
- package/dist/cjs/api/nebius/common/error/v1alpha1/index.d.ts +327 -0
- package/dist/cjs/api/nebius/common/error/v1alpha1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/common/error/v1alpha1/index.js +2050 -0
- package/dist/cjs/api/nebius/common/error/v1alpha1/index.js.map +1 -0
- package/dist/cjs/api/nebius/common/v1/index.d.ts +717 -0
- package/dist/cjs/api/nebius/common/v1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/common/v1/index.js +3971 -0
- package/dist/cjs/api/nebius/common/v1/index.js.map +1 -0
- package/dist/cjs/api/nebius/common/v1alpha1/index.d.ts +314 -0
- package/dist/cjs/api/nebius/common/v1alpha1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/common/v1alpha1/index.js +1154 -0
- package/dist/cjs/api/nebius/common/v1alpha1/index.js.map +1 -0
- package/dist/cjs/api/nebius/compute/v1/index.d.ts +2279 -0
- package/dist/cjs/api/nebius/compute/v1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/compute/v1/index.js +12616 -0
- package/dist/cjs/api/nebius/compute/v1/index.js.map +1 -0
- package/dist/cjs/api/nebius/compute/v1alpha1/index.d.ts +1430 -0
- package/dist/cjs/api/nebius/compute/v1alpha1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/compute/v1alpha1/index.js +8107 -0
- package/dist/cjs/api/nebius/compute/v1alpha1/index.js.map +1 -0
- package/dist/cjs/api/nebius/iam/v1/index.d.ts +4055 -0
- package/dist/cjs/api/nebius/iam/v1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/iam/v1/index.js +23617 -0
- package/dist/cjs/api/nebius/iam/v1/index.js.map +1 -0
- package/dist/cjs/api/nebius/iam/v2/index.d.ts +674 -0
- package/dist/cjs/api/nebius/iam/v2/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/iam/v2/index.js +3640 -0
- package/dist/cjs/api/nebius/iam/v2/index.js.map +1 -0
- package/dist/cjs/api/nebius/index.d.ts +257 -0
- package/dist/cjs/api/nebius/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/index.js +1667 -0
- package/dist/cjs/api/nebius/index.js.map +1 -0
- package/dist/cjs/api/nebius/logging/v1/agentmanager/index.d.ts +416 -0
- package/dist/cjs/api/nebius/logging/v1/agentmanager/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/logging/v1/agentmanager/index.js +1752 -0
- package/dist/cjs/api/nebius/logging/v1/agentmanager/index.js.map +1 -0
- package/dist/cjs/api/nebius/maintenance/v1alpha1/index.d.ts +281 -0
- package/dist/cjs/api/nebius/maintenance/v1alpha1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/maintenance/v1alpha1/index.js +1207 -0
- package/dist/cjs/api/nebius/maintenance/v1alpha1/index.js.map +1 -0
- package/dist/cjs/api/nebius/mk8s/v1/index.d.ts +1191 -0
- package/dist/cjs/api/nebius/mk8s/v1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/mk8s/v1/index.js +6964 -0
- package/dist/cjs/api/nebius/mk8s/v1/index.js.map +1 -0
- package/dist/cjs/api/nebius/mk8s/v1alpha1/index.d.ts +1132 -0
- package/dist/cjs/api/nebius/mk8s/v1alpha1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/mk8s/v1alpha1/index.js +7189 -0
- package/dist/cjs/api/nebius/mk8s/v1alpha1/index.js.map +1 -0
- package/dist/cjs/api/nebius/msp/mlflow/v1alpha1/index.d.ts +349 -0
- package/dist/cjs/api/nebius/msp/mlflow/v1alpha1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/msp/mlflow/v1alpha1/index.js +1604 -0
- package/dist/cjs/api/nebius/msp/mlflow/v1alpha1/index.js.map +1 -0
- package/dist/cjs/api/nebius/msp/postgresql/v1alpha1/config/index.d.ts +46 -0
- package/dist/cjs/api/nebius/msp/postgresql/v1alpha1/config/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/msp/postgresql/v1alpha1/config/index.js +360 -0
- package/dist/cjs/api/nebius/msp/postgresql/v1alpha1/config/index.js.map +1 -0
- package/dist/cjs/api/nebius/msp/postgresql/v1alpha1/index.d.ts +875 -0
- package/dist/cjs/api/nebius/msp/postgresql/v1alpha1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/msp/postgresql/v1alpha1/index.js +3926 -0
- package/dist/cjs/api/nebius/msp/postgresql/v1alpha1/index.js.map +1 -0
- package/dist/cjs/api/nebius/msp/serverless/v1alpha1/index.d.ts +670 -0
- package/dist/cjs/api/nebius/msp/serverless/v1alpha1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/msp/serverless/v1alpha1/index.js +2975 -0
- package/dist/cjs/api/nebius/msp/serverless/v1alpha1/index.js.map +1 -0
- package/dist/cjs/api/nebius/msp/v1alpha1/index.d.ts +145 -0
- package/dist/cjs/api/nebius/msp/v1alpha1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/msp/v1alpha1/index.js +946 -0
- package/dist/cjs/api/nebius/msp/v1alpha1/index.js.map +1 -0
- package/dist/cjs/api/nebius/msp/v1alpha1/resource/index.d.ts +90 -0
- package/dist/cjs/api/nebius/msp/v1alpha1/resource/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/msp/v1alpha1/resource/index.js +1288 -0
- package/dist/cjs/api/nebius/msp/v1alpha1/resource/index.js.map +1 -0
- package/dist/cjs/api/nebius/mysterybox/v1/index.d.ts +826 -0
- package/dist/cjs/api/nebius/mysterybox/v1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/mysterybox/v1/index.js +3691 -0
- package/dist/cjs/api/nebius/mysterybox/v1/index.js.map +1 -0
- package/dist/cjs/api/nebius/quotas/v1/index.d.ts +299 -0
- package/dist/cjs/api/nebius/quotas/v1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/quotas/v1/index.js +1178 -0
- package/dist/cjs/api/nebius/quotas/v1/index.js.map +1 -0
- package/dist/cjs/api/nebius/registry/v1/index.d.ts +366 -0
- package/dist/cjs/api/nebius/registry/v1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/registry/v1/index.js +2146 -0
- package/dist/cjs/api/nebius/registry/v1/index.js.map +1 -0
- package/dist/cjs/api/nebius/storage/v1/index.d.ts +928 -0
- package/dist/cjs/api/nebius/storage/v1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/storage/v1/index.js +7811 -0
- package/dist/cjs/api/nebius/storage/v1/index.js.map +1 -0
- package/dist/cjs/api/nebius/storage/v1alpha1/index.d.ts +579 -0
- package/dist/cjs/api/nebius/storage/v1alpha1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/storage/v1alpha1/index.js +3554 -0
- package/dist/cjs/api/nebius/storage/v1alpha1/index.js.map +1 -0
- package/dist/cjs/api/nebius/vpc/v1/index.d.ts +2458 -0
- package/dist/cjs/api/nebius/vpc/v1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/vpc/v1/index.js +13277 -0
- package/dist/cjs/api/nebius/vpc/v1/index.js.map +1 -0
- package/dist/cjs/api/nebius/vpc/v1alpha1/index.d.ts +1493 -0
- package/dist/cjs/api/nebius/vpc/v1alpha1/index.d.ts.map +1 -0
- package/dist/cjs/api/nebius/vpc/v1alpha1/index.js +8338 -0
- package/dist/cjs/api/nebius/vpc/v1alpha1/index.js.map +1 -0
- package/dist/cjs/api/protobuf.d.ts +3 -0
- package/dist/cjs/api/protobuf.d.ts.map +1 -0
- package/dist/cjs/api/protobuf.js +9 -0
- package/dist/cjs/api/protobuf.js.map +1 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +24 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/runtime/authorization/interceptor.d.ts +5 -0
- package/dist/cjs/runtime/authorization/interceptor.d.ts.map +1 -0
- package/dist/cjs/runtime/authorization/interceptor.js +120 -0
- package/dist/cjs/runtime/authorization/interceptor.js.map +1 -0
- package/dist/cjs/runtime/authorization/provider.d.ts +16 -0
- package/dist/cjs/runtime/authorization/provider.d.ts.map +1 -0
- package/dist/cjs/runtime/authorization/provider.js +3 -0
- package/dist/cjs/runtime/authorization/provider.js.map +1 -0
- package/dist/cjs/runtime/authorization/token.d.ts +23 -0
- package/dist/cjs/runtime/authorization/token.d.ts.map +1 -0
- package/dist/cjs/runtime/authorization/token.js +54 -0
- package/dist/cjs/runtime/authorization/token.js.map +1 -0
- package/dist/cjs/runtime/cli_config.d.ts +41 -0
- package/dist/cjs/runtime/cli_config.d.ts.map +1 -0
- package/dist/cjs/runtime/cli_config.js +331 -0
- package/dist/cjs/runtime/cli_config.js.map +1 -0
- package/dist/cjs/runtime/cli_config_interfaces.d.ts +21 -0
- package/dist/cjs/runtime/cli_config_interfaces.d.ts.map +1 -0
- package/dist/cjs/runtime/cli_config_interfaces.js +3 -0
- package/dist/cjs/runtime/cli_config_interfaces.js.map +1 -0
- package/dist/cjs/runtime/constants.d.ts +8 -0
- package/dist/cjs/runtime/constants.d.ts.map +1 -0
- package/dist/cjs/runtime/constants.js +12 -0
- package/dist/cjs/runtime/constants.js.map +1 -0
- package/dist/cjs/runtime/error.d.ts +18 -0
- package/dist/cjs/runtime/error.d.ts.map +1 -0
- package/dist/cjs/runtime/error.js +242 -0
- package/dist/cjs/runtime/error.js.map +1 -0
- package/dist/cjs/runtime/fieldmask.d.ts +68 -0
- package/dist/cjs/runtime/fieldmask.d.ts.map +1 -0
- package/dist/cjs/runtime/fieldmask.js +516 -0
- package/dist/cjs/runtime/fieldmask.js.map +1 -0
- package/dist/cjs/runtime/fieldmask_parser.d.ts +3 -0
- package/dist/cjs/runtime/fieldmask_parser.d.ts.map +1 -0
- package/dist/cjs/runtime/fieldmask_parser.js +173 -0
- package/dist/cjs/runtime/fieldmask_parser.js.map +1 -0
- package/dist/cjs/runtime/operation.d.ts +59 -0
- package/dist/cjs/runtime/operation.d.ts.map +1 -0
- package/dist/cjs/runtime/operation.js +122 -0
- package/dist/cjs/runtime/operation.js.map +1 -0
- package/dist/cjs/runtime/protos/any.d.ts +11 -0
- package/dist/cjs/runtime/protos/any.d.ts.map +1 -0
- package/dist/cjs/runtime/protos/any.js +43 -0
- package/dist/cjs/runtime/protos/any.js.map +1 -0
- package/dist/cjs/runtime/protos/base64.d.ts +3 -0
- package/dist/cjs/runtime/protos/base64.d.ts.map +1 -0
- package/dist/cjs/runtime/protos/base64.js +26 -0
- package/dist/cjs/runtime/protos/base64.js.map +1 -0
- package/dist/cjs/runtime/protos/core.d.ts +23 -0
- package/dist/cjs/runtime/protos/core.d.ts.map +1 -0
- package/dist/cjs/runtime/protos/core.js +28 -0
- package/dist/cjs/runtime/protos/core.js.map +1 -0
- package/dist/cjs/runtime/protos/enum.d.ts +31 -0
- package/dist/cjs/runtime/protos/enum.d.ts.map +1 -0
- package/dist/cjs/runtime/protos/enum.js +91 -0
- package/dist/cjs/runtime/protos/enum.js.map +1 -0
- package/dist/cjs/runtime/protos/fieldmask.d.ts +6 -0
- package/dist/cjs/runtime/protos/fieldmask.d.ts.map +1 -0
- package/dist/cjs/runtime/protos/fieldmask.js +37 -0
- package/dist/cjs/runtime/protos/fieldmask.js.map +1 -0
- package/dist/cjs/runtime/protos/index.d.ts +8 -0
- package/dist/cjs/runtime/protos/index.d.ts.map +1 -0
- package/dist/cjs/runtime/protos/index.js +20 -0
- package/dist/cjs/runtime/protos/index.js.map +1 -0
- package/dist/cjs/runtime/protos/long.d.ts +2 -0
- package/dist/cjs/runtime/protos/long.d.ts.map +1 -0
- package/dist/cjs/runtime/protos/long.js +3 -0
- package/dist/cjs/runtime/protos/long.js.map +1 -0
- package/dist/cjs/runtime/protos/registry.d.ts +83 -0
- package/dist/cjs/runtime/protos/registry.d.ts.map +1 -0
- package/dist/cjs/runtime/protos/registry.js +48 -0
- package/dist/cjs/runtime/protos/registry.js.map +1 -0
- package/dist/cjs/runtime/protos/values.d.ts +6 -0
- package/dist/cjs/runtime/protos/values.d.ts.map +1 -0
- package/dist/cjs/runtime/protos/values.js +162 -0
- package/dist/cjs/runtime/protos/values.js.map +1 -0
- package/dist/cjs/runtime/protos/wkt.d.ts +92 -0
- package/dist/cjs/runtime/protos/wkt.d.ts.map +1 -0
- package/dist/cjs/runtime/protos/wkt.js +276 -0
- package/dist/cjs/runtime/protos/wkt.js.map +1 -0
- package/dist/cjs/runtime/request.d.ts +49 -0
- package/dist/cjs/runtime/request.d.ts.map +1 -0
- package/dist/cjs/runtime/request.js +635 -0
- package/dist/cjs/runtime/request.js.map +1 -0
- package/dist/cjs/runtime/resetmask.d.ts +7 -0
- package/dist/cjs/runtime/resetmask.d.ts.map +1 -0
- package/dist/cjs/runtime/resetmask.js +142 -0
- package/dist/cjs/runtime/resetmask.js.map +1 -0
- package/dist/cjs/runtime/resolver.d.ts +73 -0
- package/dist/cjs/runtime/resolver.d.ts.map +1 -0
- package/dist/cjs/runtime/resolver.js +235 -0
- package/dist/cjs/runtime/resolver.js.map +1 -0
- package/dist/cjs/runtime/service_account/cached.d.ts +13 -0
- package/dist/cjs/runtime/service_account/cached.d.ts.map +1 -0
- package/dist/cjs/runtime/service_account/cached.js +33 -0
- package/dist/cjs/runtime/service_account/cached.js.map +1 -0
- package/dist/cjs/runtime/service_account/credentials_file.d.ts +16 -0
- package/dist/cjs/runtime/service_account/credentials_file.d.ts.map +1 -0
- package/dist/cjs/runtime/service_account/credentials_file.js +57 -0
- package/dist/cjs/runtime/service_account/credentials_file.js.map +1 -0
- package/dist/cjs/runtime/service_account/federated_credentials.d.ts +31 -0
- package/dist/cjs/runtime/service_account/federated_credentials.d.ts.map +1 -0
- package/dist/cjs/runtime/service_account/federated_credentials.js +95 -0
- package/dist/cjs/runtime/service_account/federated_credentials.js.map +1 -0
- package/dist/cjs/runtime/service_account/pk_file.d.ts +18 -0
- package/dist/cjs/runtime/service_account/pk_file.d.ts.map +1 -0
- package/dist/cjs/runtime/service_account/pk_file.js +43 -0
- package/dist/cjs/runtime/service_account/pk_file.js.map +1 -0
- package/dist/cjs/runtime/service_account/service_account.d.ts +22 -0
- package/dist/cjs/runtime/service_account/service_account.d.ts.map +1 -0
- package/dist/cjs/runtime/service_account/service_account.js +70 -0
- package/dist/cjs/runtime/service_account/service_account.js.map +1 -0
- package/dist/cjs/runtime/service_account/static.d.ts +13 -0
- package/dist/cjs/runtime/service_account/static.d.ts.map +1 -0
- package/dist/cjs/runtime/service_account/static.js +29 -0
- package/dist/cjs/runtime/service_account/static.js.map +1 -0
- package/dist/cjs/runtime/tls/system_certs.d.ts +15 -0
- package/dist/cjs/runtime/tls/system_certs.d.ts.map +1 -0
- package/dist/cjs/runtime/tls/system_certs.js +99 -0
- package/dist/cjs/runtime/tls/system_certs.js.map +1 -0
- package/dist/cjs/runtime/token/exchangeable.d.ts +26 -0
- package/dist/cjs/runtime/token/exchangeable.d.ts.map +1 -0
- package/dist/cjs/runtime/token/exchangeable.js +151 -0
- package/dist/cjs/runtime/token/exchangeable.js.map +1 -0
- package/dist/cjs/runtime/token/federated_credentials.d.ts +27 -0
- package/dist/cjs/runtime/token/federated_credentials.d.ts.map +1 -0
- package/dist/cjs/runtime/token/federated_credentials.js +76 -0
- package/dist/cjs/runtime/token/federated_credentials.js.map +1 -0
- package/dist/cjs/runtime/token/federation_account.d.ts +27 -0
- package/dist/cjs/runtime/token/federation_account.d.ts.map +1 -0
- package/dist/cjs/runtime/token/federation_account.js +47 -0
- package/dist/cjs/runtime/token/federation_account.js.map +1 -0
- package/dist/cjs/runtime/token/federation_bearer/auth.d.ts +42 -0
- package/dist/cjs/runtime/token/federation_bearer/auth.d.ts.map +1 -0
- package/dist/cjs/runtime/token/federation_bearer/auth.js +197 -0
- package/dist/cjs/runtime/token/federation_bearer/auth.js.map +1 -0
- package/dist/cjs/runtime/token/federation_bearer/constants.d.ts +3 -0
- package/dist/cjs/runtime/token/federation_bearer/constants.d.ts.map +1 -0
- package/dist/cjs/runtime/token/federation_bearer/constants.js +6 -0
- package/dist/cjs/runtime/token/federation_bearer/constants.js.map +1 -0
- package/dist/cjs/runtime/token/federation_bearer/index.d.ts +19 -0
- package/dist/cjs/runtime/token/federation_bearer/index.d.ts.map +1 -0
- package/dist/cjs/runtime/token/federation_bearer/index.js +120 -0
- package/dist/cjs/runtime/token/federation_bearer/index.js.map +1 -0
- package/dist/cjs/runtime/token/federation_bearer/is_wsl.d.ts +2 -0
- package/dist/cjs/runtime/token/federation_bearer/is_wsl.d.ts.map +1 -0
- package/dist/cjs/runtime/token/federation_bearer/is_wsl.js +14 -0
- package/dist/cjs/runtime/token/federation_bearer/is_wsl.js.map +1 -0
- package/dist/cjs/runtime/token/federation_bearer/pkce.d.ts +8 -0
- package/dist/cjs/runtime/token/federation_bearer/pkce.d.ts.map +1 -0
- package/dist/cjs/runtime/token/federation_bearer/pkce.js +30 -0
- package/dist/cjs/runtime/token/federation_bearer/pkce.js.map +1 -0
- package/dist/cjs/runtime/token/federation_bearer/server.d.ts +20 -0
- package/dist/cjs/runtime/token/federation_bearer/server.d.ts.map +1 -0
- package/dist/cjs/runtime/token/federation_bearer/server.js +132 -0
- package/dist/cjs/runtime/token/federation_bearer/server.js.map +1 -0
- package/dist/cjs/runtime/token/file.d.ts +11 -0
- package/dist/cjs/runtime/token/file.d.ts.map +1 -0
- package/dist/cjs/runtime/token/file.js +55 -0
- package/dist/cjs/runtime/token/file.js.map +1 -0
- package/dist/cjs/runtime/token/file_cache/async_renewable_bearer.d.ts +63 -0
- package/dist/cjs/runtime/token/file_cache/async_renewable_bearer.d.ts.map +1 -0
- package/dist/cjs/runtime/token/file_cache/async_renewable_bearer.js +452 -0
- package/dist/cjs/runtime/token/file_cache/async_renewable_bearer.js.map +1 -0
- package/dist/cjs/runtime/token/file_cache/file_bearer.d.ts +16 -0
- package/dist/cjs/runtime/token/file_cache/file_bearer.d.ts.map +1 -0
- package/dist/cjs/runtime/token/file_cache/file_bearer.js +65 -0
- package/dist/cjs/runtime/token/file_cache/file_bearer.js.map +1 -0
- package/dist/cjs/runtime/token/file_cache/renewable_bearer.d.ts +15 -0
- package/dist/cjs/runtime/token/file_cache/renewable_bearer.d.ts.map +1 -0
- package/dist/cjs/runtime/token/file_cache/renewable_bearer.js +135 -0
- package/dist/cjs/runtime/token/file_cache/renewable_bearer.js.map +1 -0
- package/dist/cjs/runtime/token/file_cache/throttled_token_cache.d.ts +22 -0
- package/dist/cjs/runtime/token/file_cache/throttled_token_cache.d.ts.map +1 -0
- package/dist/cjs/runtime/token/file_cache/throttled_token_cache.js +89 -0
- package/dist/cjs/runtime/token/file_cache/throttled_token_cache.js.map +1 -0
- package/dist/cjs/runtime/token/file_cache/token_cache.d.ts +24 -0
- package/dist/cjs/runtime/token/file_cache/token_cache.d.ts.map +1 -0
- package/dist/cjs/runtime/token/file_cache/token_cache.js +316 -0
- package/dist/cjs/runtime/token/file_cache/token_cache.js.map +1 -0
- package/dist/cjs/runtime/token/renewable.d.ts +59 -0
- package/dist/cjs/runtime/token/renewable.d.ts.map +1 -0
- package/dist/cjs/runtime/token/renewable.js +393 -0
- package/dist/cjs/runtime/token/renewable.js.map +1 -0
- package/dist/cjs/runtime/token/service_account.d.ts +28 -0
- package/dist/cjs/runtime/token/service_account.d.ts.map +1 -0
- package/dist/cjs/runtime/token/service_account.js +95 -0
- package/dist/cjs/runtime/token/service_account.js.map +1 -0
- package/dist/cjs/runtime/token/static.d.ts +17 -0
- package/dist/cjs/runtime/token/static.d.ts.map +1 -0
- package/dist/cjs/runtime/token/static.js +69 -0
- package/dist/cjs/runtime/token/static.js.map +1 -0
- package/dist/cjs/runtime/token.d.ts +52 -0
- package/dist/cjs/runtime/token.d.ts.map +1 -0
- package/dist/cjs/runtime/token.js +135 -0
- package/dist/cjs/runtime/token.js.map +1 -0
- package/dist/cjs/runtime/token_sanitizer.d.ts +31 -0
- package/dist/cjs/runtime/token_sanitizer.d.ts.map +1 -0
- package/dist/cjs/runtime/token_sanitizer.js +94 -0
- package/dist/cjs/runtime/token_sanitizer.js.map +1 -0
- package/dist/cjs/runtime/util/cancelable.d.ts +25 -0
- package/dist/cjs/runtime/util/cancelable.d.ts.map +1 -0
- package/dist/cjs/runtime/util/cancelable.js +130 -0
- package/dist/cjs/runtime/util/cancelable.js.map +1 -0
- package/dist/cjs/runtime/util/logging.d.ts +146 -0
- package/dist/cjs/runtime/util/logging.d.ts.map +1 -0
- package/dist/cjs/runtime/util/logging.js +865 -0
- package/dist/cjs/runtime/util/logging.js.map +1 -0
- package/dist/cjs/runtime/util/path.d.ts +2 -0
- package/dist/cjs/runtime/util/path.d.ts.map +1 -0
- package/dist/cjs/runtime/util/path.js +22 -0
- package/dist/cjs/runtime/util/path.js.map +1 -0
- package/dist/cjs/sdk.d.ts +98 -0
- package/dist/cjs/sdk.d.ts.map +1 -0
- package/dist/cjs/sdk.js +543 -0
- package/dist/cjs/sdk.js.map +1 -0
- package/dist/cjs/test/setup.d.ts +1 -0
- package/dist/cjs/test/setup.d.ts.map +1 -0
- package/dist/cjs/test/setup.js +24 -0
- package/dist/cjs/test/setup.js.map +1 -0
- package/dist/cjs/version.d.ts +2 -0
- package/dist/cjs/version.d.ts.map +1 -0
- package/dist/cjs/version.js +6 -0
- package/dist/cjs/version.js.map +1 -0
- package/dist/esm/__tests__/generator_basic.cases.d.ts +2 -0
- package/dist/esm/__tests__/generator_basic.cases.d.ts.map +1 -0
- package/dist/esm/__tests__/generator_basic.cases.js +4 -0
- package/dist/esm/__tests__/generator_cross.cases.d.ts +2 -0
- package/dist/esm/__tests__/generator_cross.cases.d.ts.map +1 -0
- package/dist/esm/__tests__/generator_cross.cases.js +4 -0
- package/dist/esm/__tests__/generator_extensions.cases.d.ts +2 -0
- package/dist/esm/__tests__/generator_extensions.cases.d.ts.map +1 -0
- package/dist/esm/__tests__/generator_extensions.cases.js +4 -0
- package/dist/esm/__tests__/generator_registry.cases.d.ts +7 -0
- package/dist/esm/__tests__/generator_registry.cases.d.ts.map +1 -0
- package/dist/esm/__tests__/generator_registry.cases.js +4 -0
- package/dist/esm/__tests__/generator_sanitization.cases.d.ts +2 -0
- package/dist/esm/__tests__/generator_sanitization.cases.d.ts.map +1 -0
- package/dist/esm/__tests__/generator_sanitization.cases.js +4 -0
- package/dist/esm/__tests__/generator_shared.helpers.d.ts +21 -0
- package/dist/esm/__tests__/generator_shared.helpers.d.ts.map +1 -0
- package/dist/esm/__tests__/generator_shared.helpers.js +4 -0
- package/dist/esm/api/buf/validate/index.d.ts +2681 -0
- package/dist/esm/api/buf/validate/index.d.ts.map +1 -0
- package/dist/esm/api/buf/validate/index.js +4 -0
- package/dist/esm/api/google/protobuf/index.d.ts +1779 -0
- package/dist/esm/api/google/protobuf/index.d.ts.map +1 -0
- package/dist/esm/api/google/protobuf/index.js +4 -0
- package/dist/esm/api/google/rpc/index.d.ts +247 -0
- package/dist/esm/api/google/rpc/index.d.ts.map +1 -0
- package/dist/esm/api/google/rpc/index.js +4 -0
- package/dist/esm/api/nebius/applications/v1alpha1/index.d.ts +210 -0
- package/dist/esm/api/nebius/applications/v1alpha1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/applications/v1alpha1/index.js +4 -0
- package/dist/esm/api/nebius/audit/v2/index.d.ts +457 -0
- package/dist/esm/api/nebius/audit/v2/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/audit/v2/index.js +4 -0
- package/dist/esm/api/nebius/billing/v1alpha1/index.d.ts +262 -0
- package/dist/esm/api/nebius/billing/v1alpha1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/billing/v1alpha1/index.js +4 -0
- package/dist/esm/api/nebius/common/error/v1alpha1/index.d.ts +327 -0
- package/dist/esm/api/nebius/common/error/v1alpha1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/common/error/v1alpha1/index.js +4 -0
- package/dist/esm/api/nebius/common/v1/index.d.ts +717 -0
- package/dist/esm/api/nebius/common/v1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/common/v1/index.js +4 -0
- package/dist/esm/api/nebius/common/v1alpha1/index.d.ts +314 -0
- package/dist/esm/api/nebius/common/v1alpha1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/common/v1alpha1/index.js +4 -0
- package/dist/esm/api/nebius/compute/v1/index.d.ts +2279 -0
- package/dist/esm/api/nebius/compute/v1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/compute/v1/index.js +4 -0
- package/dist/esm/api/nebius/compute/v1alpha1/index.d.ts +1430 -0
- package/dist/esm/api/nebius/compute/v1alpha1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/compute/v1alpha1/index.js +4 -0
- package/dist/esm/api/nebius/iam/v1/index.d.ts +4055 -0
- package/dist/esm/api/nebius/iam/v1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/iam/v1/index.js +4 -0
- package/dist/esm/api/nebius/iam/v2/index.d.ts +674 -0
- package/dist/esm/api/nebius/iam/v2/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/iam/v2/index.js +4 -0
- package/dist/esm/api/nebius/index.d.ts +257 -0
- package/dist/esm/api/nebius/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/index.js +4 -0
- package/dist/esm/api/nebius/logging/v1/agentmanager/index.d.ts +416 -0
- package/dist/esm/api/nebius/logging/v1/agentmanager/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/logging/v1/agentmanager/index.js +4 -0
- package/dist/esm/api/nebius/maintenance/v1alpha1/index.d.ts +281 -0
- package/dist/esm/api/nebius/maintenance/v1alpha1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/maintenance/v1alpha1/index.js +4 -0
- package/dist/esm/api/nebius/mk8s/v1/index.d.ts +1191 -0
- package/dist/esm/api/nebius/mk8s/v1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/mk8s/v1/index.js +4 -0
- package/dist/esm/api/nebius/mk8s/v1alpha1/index.d.ts +1132 -0
- package/dist/esm/api/nebius/mk8s/v1alpha1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/mk8s/v1alpha1/index.js +4 -0
- package/dist/esm/api/nebius/msp/mlflow/v1alpha1/index.d.ts +349 -0
- package/dist/esm/api/nebius/msp/mlflow/v1alpha1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/msp/mlflow/v1alpha1/index.js +4 -0
- package/dist/esm/api/nebius/msp/postgresql/v1alpha1/config/index.d.ts +46 -0
- package/dist/esm/api/nebius/msp/postgresql/v1alpha1/config/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/msp/postgresql/v1alpha1/config/index.js +4 -0
- package/dist/esm/api/nebius/msp/postgresql/v1alpha1/index.d.ts +875 -0
- package/dist/esm/api/nebius/msp/postgresql/v1alpha1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/msp/postgresql/v1alpha1/index.js +4 -0
- package/dist/esm/api/nebius/msp/serverless/v1alpha1/index.d.ts +670 -0
- package/dist/esm/api/nebius/msp/serverless/v1alpha1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/msp/serverless/v1alpha1/index.js +4 -0
- package/dist/esm/api/nebius/msp/v1alpha1/index.d.ts +145 -0
- package/dist/esm/api/nebius/msp/v1alpha1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/msp/v1alpha1/index.js +4 -0
- package/dist/esm/api/nebius/msp/v1alpha1/resource/index.d.ts +90 -0
- package/dist/esm/api/nebius/msp/v1alpha1/resource/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/msp/v1alpha1/resource/index.js +4 -0
- package/dist/esm/api/nebius/mysterybox/v1/index.d.ts +826 -0
- package/dist/esm/api/nebius/mysterybox/v1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/mysterybox/v1/index.js +4 -0
- package/dist/esm/api/nebius/quotas/v1/index.d.ts +299 -0
- package/dist/esm/api/nebius/quotas/v1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/quotas/v1/index.js +4 -0
- package/dist/esm/api/nebius/registry/v1/index.d.ts +366 -0
- package/dist/esm/api/nebius/registry/v1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/registry/v1/index.js +4 -0
- package/dist/esm/api/nebius/storage/v1/index.d.ts +928 -0
- package/dist/esm/api/nebius/storage/v1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/storage/v1/index.js +4 -0
- package/dist/esm/api/nebius/storage/v1alpha1/index.d.ts +579 -0
- package/dist/esm/api/nebius/storage/v1alpha1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/storage/v1alpha1/index.js +4 -0
- package/dist/esm/api/nebius/vpc/v1/index.d.ts +2458 -0
- package/dist/esm/api/nebius/vpc/v1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/vpc/v1/index.js +4 -0
- package/dist/esm/api/nebius/vpc/v1alpha1/index.d.ts +1493 -0
- package/dist/esm/api/nebius/vpc/v1alpha1/index.d.ts.map +1 -0
- package/dist/esm/api/nebius/vpc/v1alpha1/index.js +4 -0
- package/dist/esm/api/protobuf.d.ts +3 -0
- package/dist/esm/api/protobuf.d.ts.map +1 -0
- package/dist/esm/api/protobuf.js +4 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/runtime/authorization/interceptor.d.ts +5 -0
- package/dist/esm/runtime/authorization/interceptor.d.ts.map +1 -0
- package/dist/esm/runtime/authorization/interceptor.js +4 -0
- package/dist/esm/runtime/authorization/provider.d.ts +16 -0
- package/dist/esm/runtime/authorization/provider.d.ts.map +1 -0
- package/dist/esm/runtime/authorization/provider.js +4 -0
- package/dist/esm/runtime/authorization/token.d.ts +23 -0
- package/dist/esm/runtime/authorization/token.d.ts.map +1 -0
- package/dist/esm/runtime/authorization/token.js +4 -0
- package/dist/esm/runtime/cli_config.d.ts +41 -0
- package/dist/esm/runtime/cli_config.d.ts.map +1 -0
- package/dist/esm/runtime/cli_config.js +4 -0
- package/dist/esm/runtime/cli_config_interfaces.d.ts +21 -0
- package/dist/esm/runtime/cli_config_interfaces.d.ts.map +1 -0
- package/dist/esm/runtime/cli_config_interfaces.js +4 -0
- package/dist/esm/runtime/constants.d.ts +8 -0
- package/dist/esm/runtime/constants.d.ts.map +1 -0
- package/dist/esm/runtime/constants.js +4 -0
- package/dist/esm/runtime/error.d.ts +18 -0
- package/dist/esm/runtime/error.d.ts.map +1 -0
- package/dist/esm/runtime/error.js +4 -0
- package/dist/esm/runtime/fieldmask.d.ts +68 -0
- package/dist/esm/runtime/fieldmask.d.ts.map +1 -0
- package/dist/esm/runtime/fieldmask.js +4 -0
- package/dist/esm/runtime/fieldmask_parser.d.ts +3 -0
- package/dist/esm/runtime/fieldmask_parser.d.ts.map +1 -0
- package/dist/esm/runtime/fieldmask_parser.js +4 -0
- package/dist/esm/runtime/operation.d.ts +59 -0
- package/dist/esm/runtime/operation.d.ts.map +1 -0
- package/dist/esm/runtime/operation.js +4 -0
- package/dist/esm/runtime/protos/any.d.ts +11 -0
- package/dist/esm/runtime/protos/any.d.ts.map +1 -0
- package/dist/esm/runtime/protos/any.js +4 -0
- package/dist/esm/runtime/protos/base64.d.ts +3 -0
- package/dist/esm/runtime/protos/base64.d.ts.map +1 -0
- package/dist/esm/runtime/protos/base64.js +4 -0
- package/dist/esm/runtime/protos/core.d.ts +23 -0
- package/dist/esm/runtime/protos/core.d.ts.map +1 -0
- package/dist/esm/runtime/protos/core.js +4 -0
- package/dist/esm/runtime/protos/enum.d.ts +31 -0
- package/dist/esm/runtime/protos/enum.d.ts.map +1 -0
- package/dist/esm/runtime/protos/enum.js +4 -0
- package/dist/esm/runtime/protos/fieldmask.d.ts +6 -0
- package/dist/esm/runtime/protos/fieldmask.d.ts.map +1 -0
- package/dist/esm/runtime/protos/fieldmask.js +4 -0
- package/dist/esm/runtime/protos/index.d.ts +8 -0
- package/dist/esm/runtime/protos/index.d.ts.map +1 -0
- package/dist/esm/runtime/protos/index.js +4 -0
- package/dist/esm/runtime/protos/long.d.ts +2 -0
- package/dist/esm/runtime/protos/long.d.ts.map +1 -0
- package/dist/esm/runtime/protos/long.js +4 -0
- package/dist/esm/runtime/protos/registry.d.ts +83 -0
- package/dist/esm/runtime/protos/registry.d.ts.map +1 -0
- package/dist/esm/runtime/protos/registry.js +4 -0
- package/dist/esm/runtime/protos/values.d.ts +6 -0
- package/dist/esm/runtime/protos/values.d.ts.map +1 -0
- package/dist/esm/runtime/protos/values.js +4 -0
- package/dist/esm/runtime/protos/wkt.d.ts +92 -0
- package/dist/esm/runtime/protos/wkt.d.ts.map +1 -0
- package/dist/esm/runtime/protos/wkt.js +4 -0
- package/dist/esm/runtime/request.d.ts +49 -0
- package/dist/esm/runtime/request.d.ts.map +1 -0
- package/dist/esm/runtime/request.js +4 -0
- package/dist/esm/runtime/resetmask.d.ts +7 -0
- package/dist/esm/runtime/resetmask.d.ts.map +1 -0
- package/dist/esm/runtime/resetmask.js +4 -0
- package/dist/esm/runtime/resolver.d.ts +73 -0
- package/dist/esm/runtime/resolver.d.ts.map +1 -0
- package/dist/esm/runtime/resolver.js +4 -0
- package/dist/esm/runtime/service_account/cached.d.ts +13 -0
- package/dist/esm/runtime/service_account/cached.d.ts.map +1 -0
- package/dist/esm/runtime/service_account/cached.js +4 -0
- package/dist/esm/runtime/service_account/credentials_file.d.ts +16 -0
- package/dist/esm/runtime/service_account/credentials_file.d.ts.map +1 -0
- package/dist/esm/runtime/service_account/credentials_file.js +4 -0
- package/dist/esm/runtime/service_account/federated_credentials.d.ts +31 -0
- package/dist/esm/runtime/service_account/federated_credentials.d.ts.map +1 -0
- package/dist/esm/runtime/service_account/federated_credentials.js +4 -0
- package/dist/esm/runtime/service_account/pk_file.d.ts +18 -0
- package/dist/esm/runtime/service_account/pk_file.d.ts.map +1 -0
- package/dist/esm/runtime/service_account/pk_file.js +4 -0
- package/dist/esm/runtime/service_account/service_account.d.ts +22 -0
- package/dist/esm/runtime/service_account/service_account.d.ts.map +1 -0
- package/dist/esm/runtime/service_account/service_account.js +4 -0
- package/dist/esm/runtime/service_account/static.d.ts +13 -0
- package/dist/esm/runtime/service_account/static.d.ts.map +1 -0
- package/dist/esm/runtime/service_account/static.js +4 -0
- package/dist/esm/runtime/tls/system_certs.d.ts +15 -0
- package/dist/esm/runtime/tls/system_certs.d.ts.map +1 -0
- package/dist/esm/runtime/tls/system_certs.js +4 -0
- package/dist/esm/runtime/token/exchangeable.d.ts +26 -0
- package/dist/esm/runtime/token/exchangeable.d.ts.map +1 -0
- package/dist/esm/runtime/token/exchangeable.js +4 -0
- package/dist/esm/runtime/token/federated_credentials.d.ts +27 -0
- package/dist/esm/runtime/token/federated_credentials.d.ts.map +1 -0
- package/dist/esm/runtime/token/federated_credentials.js +4 -0
- package/dist/esm/runtime/token/federation_account.d.ts +27 -0
- package/dist/esm/runtime/token/federation_account.d.ts.map +1 -0
- package/dist/esm/runtime/token/federation_account.js +4 -0
- package/dist/esm/runtime/token/federation_bearer/auth.d.ts +42 -0
- package/dist/esm/runtime/token/federation_bearer/auth.d.ts.map +1 -0
- package/dist/esm/runtime/token/federation_bearer/auth.js +4 -0
- package/dist/esm/runtime/token/federation_bearer/constants.d.ts +3 -0
- package/dist/esm/runtime/token/federation_bearer/constants.d.ts.map +1 -0
- package/dist/esm/runtime/token/federation_bearer/constants.js +4 -0
- package/dist/esm/runtime/token/federation_bearer/index.d.ts +19 -0
- package/dist/esm/runtime/token/federation_bearer/index.d.ts.map +1 -0
- package/dist/esm/runtime/token/federation_bearer/index.js +4 -0
- package/dist/esm/runtime/token/federation_bearer/is_wsl.d.ts +2 -0
- package/dist/esm/runtime/token/federation_bearer/is_wsl.d.ts.map +1 -0
- package/dist/esm/runtime/token/federation_bearer/is_wsl.js +4 -0
- package/dist/esm/runtime/token/federation_bearer/pkce.d.ts +8 -0
- package/dist/esm/runtime/token/federation_bearer/pkce.d.ts.map +1 -0
- package/dist/esm/runtime/token/federation_bearer/pkce.js +4 -0
- package/dist/esm/runtime/token/federation_bearer/server.d.ts +20 -0
- package/dist/esm/runtime/token/federation_bearer/server.d.ts.map +1 -0
- package/dist/esm/runtime/token/federation_bearer/server.js +4 -0
- package/dist/esm/runtime/token/file.d.ts +11 -0
- package/dist/esm/runtime/token/file.d.ts.map +1 -0
- package/dist/esm/runtime/token/file.js +4 -0
- package/dist/esm/runtime/token/file_cache/async_renewable_bearer.d.ts +63 -0
- package/dist/esm/runtime/token/file_cache/async_renewable_bearer.d.ts.map +1 -0
- package/dist/esm/runtime/token/file_cache/async_renewable_bearer.js +4 -0
- package/dist/esm/runtime/token/file_cache/file_bearer.d.ts +16 -0
- package/dist/esm/runtime/token/file_cache/file_bearer.d.ts.map +1 -0
- package/dist/esm/runtime/token/file_cache/file_bearer.js +4 -0
- package/dist/esm/runtime/token/file_cache/renewable_bearer.d.ts +15 -0
- package/dist/esm/runtime/token/file_cache/renewable_bearer.d.ts.map +1 -0
- package/dist/esm/runtime/token/file_cache/renewable_bearer.js +4 -0
- package/dist/esm/runtime/token/file_cache/throttled_token_cache.d.ts +22 -0
- package/dist/esm/runtime/token/file_cache/throttled_token_cache.d.ts.map +1 -0
- package/dist/esm/runtime/token/file_cache/throttled_token_cache.js +4 -0
- package/dist/esm/runtime/token/file_cache/token_cache.d.ts +24 -0
- package/dist/esm/runtime/token/file_cache/token_cache.d.ts.map +1 -0
- package/dist/esm/runtime/token/file_cache/token_cache.js +4 -0
- package/dist/esm/runtime/token/renewable.d.ts +59 -0
- package/dist/esm/runtime/token/renewable.d.ts.map +1 -0
- package/dist/esm/runtime/token/renewable.js +4 -0
- package/dist/esm/runtime/token/service_account.d.ts +28 -0
- package/dist/esm/runtime/token/service_account.d.ts.map +1 -0
- package/dist/esm/runtime/token/service_account.js +4 -0
- package/dist/esm/runtime/token/static.d.ts +17 -0
- package/dist/esm/runtime/token/static.d.ts.map +1 -0
- package/dist/esm/runtime/token/static.js +4 -0
- package/dist/esm/runtime/token.d.ts +52 -0
- package/dist/esm/runtime/token.d.ts.map +1 -0
- package/dist/esm/runtime/token.js +4 -0
- package/dist/esm/runtime/token_sanitizer.d.ts +31 -0
- package/dist/esm/runtime/token_sanitizer.d.ts.map +1 -0
- package/dist/esm/runtime/token_sanitizer.js +4 -0
- package/dist/esm/runtime/util/cancelable.d.ts +25 -0
- package/dist/esm/runtime/util/cancelable.d.ts.map +1 -0
- package/dist/esm/runtime/util/cancelable.js +4 -0
- package/dist/esm/runtime/util/logging.d.ts +146 -0
- package/dist/esm/runtime/util/logging.d.ts.map +1 -0
- package/dist/esm/runtime/util/logging.js +4 -0
- package/dist/esm/runtime/util/path.d.ts +2 -0
- package/dist/esm/runtime/util/path.d.ts.map +1 -0
- package/dist/esm/runtime/util/path.js +4 -0
- package/dist/esm/sdk.d.ts +98 -0
- package/dist/esm/sdk.d.ts.map +1 -0
- package/dist/esm/sdk.js +4 -0
- package/dist/esm/test/setup.d.ts +1 -0
- package/dist/esm/test/setup.d.ts.map +1 -0
- package/dist/esm/test/setup.js +4 -0
- package/dist/esm/version.d.ts +2 -0
- package/dist/esm/version.d.ts.map +1 -0
- package/dist/esm/version.js +4 -0
- package/package.json +121 -0
|
@@ -0,0 +1,2681 @@
|
|
|
1
|
+
import { Long, unknownFieldsSymbol } from "../../../runtime/protos/index";
|
|
2
|
+
import type { Dayjs, Duration, MessageFns, EnumInstance, EnumClass } from "../../../runtime/protos/index";
|
|
3
|
+
import { customJson } from "../../../runtime/util/logging";
|
|
4
|
+
import { FieldDescriptorProto_Type } from "../../google/protobuf";
|
|
5
|
+
/**
|
|
6
|
+
* Specifies how FieldConstraints.ignore behaves. See the documentation for
|
|
7
|
+
* FieldConstraints.required for definitions of "populated" and "nullable".
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export type Ignore = EnumInstance<"UNRECOGNIZED" | "IGNORE_UNSPECIFIED" | "IGNORE_IF_UNPOPULATED" | "IGNORE_IF_DEFAULT_VALUE" | "IGNORE_ALWAYS" | "IGNORE_EMPTY" | "IGNORE_DEFAULT">;
|
|
11
|
+
interface IgnoreValueMembers {
|
|
12
|
+
/**
|
|
13
|
+
* Validation is only skipped if it's an unpopulated nullable fields.
|
|
14
|
+
*
|
|
15
|
+
* ```proto
|
|
16
|
+
* syntax="proto3";
|
|
17
|
+
*
|
|
18
|
+
* message Request {
|
|
19
|
+
* // The uri rule applies to any value, including the empty string.
|
|
20
|
+
* string foo = 1 [
|
|
21
|
+
* (buf.validate.field).string.uri = true
|
|
22
|
+
* ];
|
|
23
|
+
*
|
|
24
|
+
* // The uri rule only applies if the field is set, including if it's
|
|
25
|
+
* // set to the empty string.
|
|
26
|
+
* optional string bar = 2 [
|
|
27
|
+
* (buf.validate.field).string.uri = true
|
|
28
|
+
* ];
|
|
29
|
+
*
|
|
30
|
+
* // The min_items rule always applies, even if the list is empty.
|
|
31
|
+
* repeated string baz = 3 [
|
|
32
|
+
* (buf.validate.field).repeated.min_items = 3
|
|
33
|
+
* ];
|
|
34
|
+
*
|
|
35
|
+
* // The custom CEL rule applies only if the field is set, including if
|
|
36
|
+
* // it's the "zero" value of that message.
|
|
37
|
+
* SomeMessage quux = 4 [
|
|
38
|
+
* (buf.validate.field).cel = {/* ... * /}
|
|
39
|
+
* ];
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
readonly IGNORE_UNSPECIFIED: EnumInstance<"UNRECOGNIZED" | "IGNORE_UNSPECIFIED" | "IGNORE_IF_UNPOPULATED" | "IGNORE_IF_DEFAULT_VALUE" | "IGNORE_ALWAYS" | "IGNORE_EMPTY" | "IGNORE_DEFAULT">;
|
|
45
|
+
/**
|
|
46
|
+
* Validation is skipped if the field is unpopulated. This rule is redundant
|
|
47
|
+
* if the field is already nullable. This value is equivalent behavior to the
|
|
48
|
+
* deprecated ignore_empty rule.
|
|
49
|
+
*
|
|
50
|
+
* ```proto
|
|
51
|
+
* syntax="proto3
|
|
52
|
+
*
|
|
53
|
+
* message Request {
|
|
54
|
+
* // The uri rule applies only if the value is not the empty string.
|
|
55
|
+
* string foo = 1 [
|
|
56
|
+
* (buf.validate.field).string.uri = true,
|
|
57
|
+
* (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
|
|
58
|
+
* ];
|
|
59
|
+
*
|
|
60
|
+
* // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this
|
|
61
|
+
* // case: the uri rule only applies if the field is set, including if
|
|
62
|
+
* // it's set to the empty string.
|
|
63
|
+
* optional string bar = 2 [
|
|
64
|
+
* (buf.validate.field).string.uri = true,
|
|
65
|
+
* (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
|
|
66
|
+
* ];
|
|
67
|
+
*
|
|
68
|
+
* // The min_items rule only applies if the list has at least one item.
|
|
69
|
+
* repeated string baz = 3 [
|
|
70
|
+
* (buf.validate.field).repeated.min_items = 3,
|
|
71
|
+
* (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
|
|
72
|
+
* ];
|
|
73
|
+
*
|
|
74
|
+
* // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this
|
|
75
|
+
* // case: the custom CEL rule applies only if the field is set, including
|
|
76
|
+
* // if it's the "zero" value of that message.
|
|
77
|
+
* SomeMessage quux = 4 [
|
|
78
|
+
* (buf.validate.field).cel = {/* ... * /},
|
|
79
|
+
* (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
|
|
80
|
+
* ];
|
|
81
|
+
* }
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
*/
|
|
85
|
+
readonly IGNORE_IF_UNPOPULATED: EnumInstance<"UNRECOGNIZED" | "IGNORE_UNSPECIFIED" | "IGNORE_IF_UNPOPULATED" | "IGNORE_IF_DEFAULT_VALUE" | "IGNORE_ALWAYS" | "IGNORE_EMPTY" | "IGNORE_DEFAULT">;
|
|
86
|
+
/**
|
|
87
|
+
* Validation is skipped if the field is unpopulated or if it is a nullable
|
|
88
|
+
* field populated with its default value. This is typically the zero or
|
|
89
|
+
* empty value, but proto2 scalars support custom defaults. For messages, the
|
|
90
|
+
* default is a non-null message with all its fields unpopulated.
|
|
91
|
+
*
|
|
92
|
+
* ```proto
|
|
93
|
+
* syntax="proto3
|
|
94
|
+
*
|
|
95
|
+
* message Request {
|
|
96
|
+
* // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in
|
|
97
|
+
* // this case; the uri rule applies only if the value is not the empty
|
|
98
|
+
* // string.
|
|
99
|
+
* string foo = 1 [
|
|
100
|
+
* (buf.validate.field).string.uri = true,
|
|
101
|
+
* (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
|
|
102
|
+
* ];
|
|
103
|
+
*
|
|
104
|
+
* // The uri rule only applies if the field is set to a value other than
|
|
105
|
+
* // the empty string.
|
|
106
|
+
* optional string bar = 2 [
|
|
107
|
+
* (buf.validate.field).string.uri = true,
|
|
108
|
+
* (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
|
|
109
|
+
* ];
|
|
110
|
+
*
|
|
111
|
+
* // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in
|
|
112
|
+
* // this case; the min_items rule only applies if the list has at least
|
|
113
|
+
* // one item.
|
|
114
|
+
* repeated string baz = 3 [
|
|
115
|
+
* (buf.validate.field).repeated.min_items = 3,
|
|
116
|
+
* (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
|
|
117
|
+
* ];
|
|
118
|
+
*
|
|
119
|
+
* // The custom CEL rule only applies if the field is set to a value other
|
|
120
|
+
* // than an empty message (i.e., fields are unpopulated).
|
|
121
|
+
* SomeMessage quux = 4 [
|
|
122
|
+
* (buf.validate.field).cel = {/* ... * /},
|
|
123
|
+
* (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
|
|
124
|
+
* ];
|
|
125
|
+
* }
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* This rule is affected by proto2 custom default values:
|
|
129
|
+
*
|
|
130
|
+
* ```proto
|
|
131
|
+
* syntax="proto2";
|
|
132
|
+
*
|
|
133
|
+
* message Request {
|
|
134
|
+
* // The gt rule only applies if the field is set and it's value is not
|
|
135
|
+
* the default (i.e., not -42). The rule even applies if the field is set
|
|
136
|
+
* to zero since the default value differs.
|
|
137
|
+
* optional int32 value = 1 [
|
|
138
|
+
* default = -42,
|
|
139
|
+
* (buf.validate.field).int32.gt = 0,
|
|
140
|
+
* (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
|
|
141
|
+
* ];
|
|
142
|
+
* }
|
|
143
|
+
*
|
|
144
|
+
*/
|
|
145
|
+
readonly IGNORE_IF_DEFAULT_VALUE: EnumInstance<"UNRECOGNIZED" | "IGNORE_UNSPECIFIED" | "IGNORE_IF_UNPOPULATED" | "IGNORE_IF_DEFAULT_VALUE" | "IGNORE_ALWAYS" | "IGNORE_EMPTY" | "IGNORE_DEFAULT">;
|
|
146
|
+
/**
|
|
147
|
+
* The validation rules of this field will be skipped and not evaluated. This
|
|
148
|
+
* is useful for situations that necessitate turning off the rules of a field
|
|
149
|
+
* containing a message that may not make sense in the current context, or to
|
|
150
|
+
* temporarily disable constraints during development.
|
|
151
|
+
*
|
|
152
|
+
* ```proto
|
|
153
|
+
* message MyMessage {
|
|
154
|
+
* // The field's rules will always be ignored, including any validation's
|
|
155
|
+
* // on value's fields.
|
|
156
|
+
* MyOtherMessage value = 1 [
|
|
157
|
+
* (buf.validate.field).ignore = IGNORE_ALWAYS];
|
|
158
|
+
* }
|
|
159
|
+
* ```
|
|
160
|
+
*
|
|
161
|
+
*/
|
|
162
|
+
readonly IGNORE_ALWAYS: EnumInstance<"UNRECOGNIZED" | "IGNORE_UNSPECIFIED" | "IGNORE_IF_UNPOPULATED" | "IGNORE_IF_DEFAULT_VALUE" | "IGNORE_ALWAYS" | "IGNORE_EMPTY" | "IGNORE_DEFAULT">;
|
|
163
|
+
/**
|
|
164
|
+
* Deprecated: Use IGNORE_IF_UNPOPULATED instead. TODO: Remove this value pre-v1.
|
|
165
|
+
*
|
|
166
|
+
* @deprecated Deprecated.
|
|
167
|
+
*/
|
|
168
|
+
readonly IGNORE_EMPTY: EnumInstance<"UNRECOGNIZED" | "IGNORE_UNSPECIFIED" | "IGNORE_IF_UNPOPULATED" | "IGNORE_IF_DEFAULT_VALUE" | "IGNORE_ALWAYS" | "IGNORE_EMPTY" | "IGNORE_DEFAULT">;
|
|
169
|
+
/**
|
|
170
|
+
* Deprecated: Use IGNORE_IF_DEFAULT_VALUE. TODO: Remove this value pre-v1.
|
|
171
|
+
*
|
|
172
|
+
* @deprecated Deprecated.
|
|
173
|
+
*/
|
|
174
|
+
readonly IGNORE_DEFAULT: EnumInstance<"UNRECOGNIZED" | "IGNORE_UNSPECIFIED" | "IGNORE_IF_UNPOPULATED" | "IGNORE_IF_DEFAULT_VALUE" | "IGNORE_ALWAYS" | "IGNORE_EMPTY" | "IGNORE_DEFAULT">;
|
|
175
|
+
}
|
|
176
|
+
export type IgnoreClass = EnumClass<"UNRECOGNIZED" | "IGNORE_UNSPECIFIED" | "IGNORE_IF_UNPOPULATED" | "IGNORE_IF_DEFAULT_VALUE" | "IGNORE_ALWAYS" | "IGNORE_EMPTY" | "IGNORE_DEFAULT"> & IgnoreValueMembers;
|
|
177
|
+
export declare const Ignore: IgnoreClass;
|
|
178
|
+
/**
|
|
179
|
+
* WellKnownRegex contain some well-known patterns.
|
|
180
|
+
*
|
|
181
|
+
*/
|
|
182
|
+
export type KnownRegex = EnumInstance<"UNRECOGNIZED" | "KNOWN_REGEX_UNSPECIFIED" | "KNOWN_REGEX_HTTP_HEADER_NAME" | "KNOWN_REGEX_HTTP_HEADER_VALUE">;
|
|
183
|
+
interface KnownRegexValueMembers {
|
|
184
|
+
readonly KNOWN_REGEX_UNSPECIFIED: EnumInstance<"UNRECOGNIZED" | "KNOWN_REGEX_UNSPECIFIED" | "KNOWN_REGEX_HTTP_HEADER_NAME" | "KNOWN_REGEX_HTTP_HEADER_VALUE">;
|
|
185
|
+
/**
|
|
186
|
+
* HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2).
|
|
187
|
+
*
|
|
188
|
+
*/
|
|
189
|
+
readonly KNOWN_REGEX_HTTP_HEADER_NAME: EnumInstance<"UNRECOGNIZED" | "KNOWN_REGEX_UNSPECIFIED" | "KNOWN_REGEX_HTTP_HEADER_NAME" | "KNOWN_REGEX_HTTP_HEADER_VALUE">;
|
|
190
|
+
/**
|
|
191
|
+
* HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4).
|
|
192
|
+
*
|
|
193
|
+
*/
|
|
194
|
+
readonly KNOWN_REGEX_HTTP_HEADER_VALUE: EnumInstance<"UNRECOGNIZED" | "KNOWN_REGEX_UNSPECIFIED" | "KNOWN_REGEX_HTTP_HEADER_NAME" | "KNOWN_REGEX_HTTP_HEADER_VALUE">;
|
|
195
|
+
}
|
|
196
|
+
export type KnownRegexClass = EnumClass<"UNRECOGNIZED" | "KNOWN_REGEX_UNSPECIFIED" | "KNOWN_REGEX_HTTP_HEADER_NAME" | "KNOWN_REGEX_HTTP_HEADER_VALUE"> & KnownRegexValueMembers;
|
|
197
|
+
export declare const KnownRegex: KnownRegexClass;
|
|
198
|
+
/**
|
|
199
|
+
* `Constraint` represents a validation rule written in the Common Expression
|
|
200
|
+
* Language (CEL) syntax. Each Constraint includes a unique identifier, an
|
|
201
|
+
* optional error message, and the CEL expression to evaluate. For more
|
|
202
|
+
* information on CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
|
|
203
|
+
*
|
|
204
|
+
* ```proto
|
|
205
|
+
* message Foo {
|
|
206
|
+
* option (buf.validate.message).cel = {
|
|
207
|
+
* id: "foo.bar"
|
|
208
|
+
* message: "bar must be greater than 0"
|
|
209
|
+
* expression: "this.bar > 0"
|
|
210
|
+
* };
|
|
211
|
+
* int32 bar = 1;
|
|
212
|
+
* }
|
|
213
|
+
* ```
|
|
214
|
+
*
|
|
215
|
+
*/
|
|
216
|
+
export interface Constraint {
|
|
217
|
+
$type: "buf.validate.Constraint";
|
|
218
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
219
|
+
[customJson]?: () => unknown;
|
|
220
|
+
/**
|
|
221
|
+
* `id` is a string that serves as a machine-readable name for this Constraint.
|
|
222
|
+
* It should be unique within its scope, which could be either a message or a field.
|
|
223
|
+
*
|
|
224
|
+
*/
|
|
225
|
+
id?: string | undefined;
|
|
226
|
+
/**
|
|
227
|
+
* `message` is an optional field that provides a human-readable error message
|
|
228
|
+
* for this Constraint when the CEL expression evaluates to false. If a
|
|
229
|
+
* non-empty message is provided, any strings resulting from the CEL
|
|
230
|
+
* expression evaluation are ignored.
|
|
231
|
+
*
|
|
232
|
+
*/
|
|
233
|
+
message?: string | undefined;
|
|
234
|
+
/**
|
|
235
|
+
* `expression` is the actual CEL expression that will be evaluated for
|
|
236
|
+
* validation. This string must resolve to either a boolean or a string
|
|
237
|
+
* value. If the expression evaluates to false or a non-empty string, the
|
|
238
|
+
* validation is considered failed, and the message is rejected.
|
|
239
|
+
*
|
|
240
|
+
*/
|
|
241
|
+
expression?: string | undefined;
|
|
242
|
+
}
|
|
243
|
+
export declare const Constraint: MessageFns<Constraint, "buf.validate.Constraint">;
|
|
244
|
+
/**
|
|
245
|
+
* MessageConstraints represents validation rules that are applied to the entire message.
|
|
246
|
+
* It includes disabling options and a list of Constraint messages representing Common Expression Language (CEL) validation rules.
|
|
247
|
+
*
|
|
248
|
+
*/
|
|
249
|
+
export interface MessageConstraints {
|
|
250
|
+
$type: "buf.validate.MessageConstraints";
|
|
251
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
252
|
+
[customJson]?: () => unknown;
|
|
253
|
+
/**
|
|
254
|
+
* `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
|
|
255
|
+
* This includes any fields within the message that would otherwise support validation.
|
|
256
|
+
*
|
|
257
|
+
* ```proto
|
|
258
|
+
* message MyMessage {
|
|
259
|
+
* // validation will be bypassed for this message
|
|
260
|
+
* option (buf.validate.message).disabled = true;
|
|
261
|
+
* }
|
|
262
|
+
* ```
|
|
263
|
+
*
|
|
264
|
+
*/
|
|
265
|
+
disabled?: boolean | undefined;
|
|
266
|
+
/**
|
|
267
|
+
* `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
|
|
268
|
+
* These constraints are written in Common Expression Language (CEL) syntax. For more information on
|
|
269
|
+
* CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
|
|
270
|
+
*
|
|
271
|
+
*
|
|
272
|
+
* ```proto
|
|
273
|
+
* message MyMessage {
|
|
274
|
+
* // The field `foo` must be greater than 42.
|
|
275
|
+
* option (buf.validate.message).cel = {
|
|
276
|
+
* id: "my_message.value",
|
|
277
|
+
* message: "value must be greater than 42",
|
|
278
|
+
* expression: "this.foo > 42",
|
|
279
|
+
* };
|
|
280
|
+
* optional int32 foo = 1;
|
|
281
|
+
* }
|
|
282
|
+
* ```
|
|
283
|
+
*
|
|
284
|
+
*/
|
|
285
|
+
cel: Constraint[];
|
|
286
|
+
}
|
|
287
|
+
export declare const MessageConstraints: MessageFns<MessageConstraints, "buf.validate.MessageConstraints">;
|
|
288
|
+
/**
|
|
289
|
+
* The `OneofConstraints` message type enables you to manage constraints for
|
|
290
|
+
* oneof fields in your protobuf messages.
|
|
291
|
+
*
|
|
292
|
+
*/
|
|
293
|
+
export interface OneofConstraints {
|
|
294
|
+
$type: "buf.validate.OneofConstraints";
|
|
295
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
296
|
+
[customJson]?: () => unknown;
|
|
297
|
+
/**
|
|
298
|
+
* If `required` is true, exactly one field of the oneof must be present. A
|
|
299
|
+
* validation error is returned if no fields in the oneof are present. The
|
|
300
|
+
* field itself may still be a default value; further constraints
|
|
301
|
+
* should be placed on the fields themselves to ensure they are valid values,
|
|
302
|
+
* such as `min_len` or `gt`.
|
|
303
|
+
*
|
|
304
|
+
* ```proto
|
|
305
|
+
* message MyMessage {
|
|
306
|
+
* oneof value {
|
|
307
|
+
* // Either `a` or `b` must be set. If `a` is set, it must also be
|
|
308
|
+
* // non-empty; whereas if `b` is set, it can still be an empty string.
|
|
309
|
+
* option (buf.validate.oneof).required = true;
|
|
310
|
+
* string a = 1 [(buf.validate.field).string.min_len = 1];
|
|
311
|
+
* string b = 2;
|
|
312
|
+
* }
|
|
313
|
+
* }
|
|
314
|
+
* ```
|
|
315
|
+
*
|
|
316
|
+
*/
|
|
317
|
+
required?: boolean | undefined;
|
|
318
|
+
}
|
|
319
|
+
export declare const OneofConstraints: MessageFns<OneofConstraints, "buf.validate.OneofConstraints">;
|
|
320
|
+
/**
|
|
321
|
+
* FieldConstraints encapsulates the rules for each type of field. Depending on
|
|
322
|
+
* the field, the correct set should be used to ensure proper validations.
|
|
323
|
+
*
|
|
324
|
+
*/
|
|
325
|
+
export interface FieldConstraints {
|
|
326
|
+
$type: "buf.validate.FieldConstraints";
|
|
327
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
328
|
+
[customJson]?: () => unknown;
|
|
329
|
+
/**
|
|
330
|
+
* `cel` is a repeated field used to represent a textual expression
|
|
331
|
+
* in the Common Expression Language (CEL) syntax. For more information on
|
|
332
|
+
* CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
|
|
333
|
+
*
|
|
334
|
+
* ```proto
|
|
335
|
+
* message MyMessage {
|
|
336
|
+
* // The field `value` must be greater than 42.
|
|
337
|
+
* optional int32 value = 1 [(buf.validate.field).cel = {
|
|
338
|
+
* id: "my_message.value",
|
|
339
|
+
* message: "value must be greater than 42",
|
|
340
|
+
* expression: "this > 42",
|
|
341
|
+
* }];
|
|
342
|
+
* }
|
|
343
|
+
* ```
|
|
344
|
+
*
|
|
345
|
+
*/
|
|
346
|
+
cel: Constraint[];
|
|
347
|
+
/**
|
|
348
|
+
* If `required` is true, the field must be populated. A populated field can be
|
|
349
|
+
* described as "serialized in the wire format," which includes:
|
|
350
|
+
*
|
|
351
|
+
* - the following "nullable" fields must be explicitly set to be considered populated:
|
|
352
|
+
* - singular message fields (whose fields may be unpopulated/default values)
|
|
353
|
+
* - member fields of a oneof (may be their default value)
|
|
354
|
+
* - proto3 optional fields (may be their default value)
|
|
355
|
+
* - proto2 scalar fields (both optional and required)
|
|
356
|
+
* - proto3 scalar fields must be non-zero to be considered populated
|
|
357
|
+
* - repeated and map fields must be non-empty to be considered populated
|
|
358
|
+
*
|
|
359
|
+
* ```proto
|
|
360
|
+
* message MyMessage {
|
|
361
|
+
* // The field `value` must be set to a non-null value.
|
|
362
|
+
* optional MyOtherMessage value = 1 [(buf.validate.field).required = true];
|
|
363
|
+
* }
|
|
364
|
+
* ```
|
|
365
|
+
*
|
|
366
|
+
*/
|
|
367
|
+
required?: boolean | undefined;
|
|
368
|
+
/**
|
|
369
|
+
* Skip validation on the field if its value matches the specified criteria.
|
|
370
|
+
* See Ignore enum for details.
|
|
371
|
+
*
|
|
372
|
+
* ```proto
|
|
373
|
+
* message UpdateRequest {
|
|
374
|
+
* // The uri rule only applies if the field is populated and not an empty
|
|
375
|
+
* // string.
|
|
376
|
+
* optional string url = 1 [
|
|
377
|
+
* (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE,
|
|
378
|
+
* (buf.validate.field).string.uri = true,
|
|
379
|
+
* ];
|
|
380
|
+
* }
|
|
381
|
+
* ```
|
|
382
|
+
*
|
|
383
|
+
*/
|
|
384
|
+
ignore?: Ignore | undefined;
|
|
385
|
+
/**
|
|
386
|
+
* DEPRECATED: use ignore=IGNORE_ALWAYS instead. TODO: remove this field pre-v1.
|
|
387
|
+
*
|
|
388
|
+
* @deprecated Deprecated.
|
|
389
|
+
*/
|
|
390
|
+
skipped?: boolean | undefined;
|
|
391
|
+
/**
|
|
392
|
+
* DEPRECATED: use ignore=IGNORE_IF_UNPOPULATED instead. TODO: remove this field pre-v1.
|
|
393
|
+
*
|
|
394
|
+
* @deprecated Deprecated.
|
|
395
|
+
*/
|
|
396
|
+
ignoreEmpty?: boolean | undefined;
|
|
397
|
+
type?: {
|
|
398
|
+
$case: "float";
|
|
399
|
+
float: FloatRules;
|
|
400
|
+
} | {
|
|
401
|
+
$case: "double";
|
|
402
|
+
double: DoubleRules;
|
|
403
|
+
} | {
|
|
404
|
+
$case: "int32";
|
|
405
|
+
int32: Int32Rules;
|
|
406
|
+
} | {
|
|
407
|
+
$case: "int64";
|
|
408
|
+
int64: Int64Rules;
|
|
409
|
+
} | {
|
|
410
|
+
$case: "uint32";
|
|
411
|
+
uint32: UInt32Rules;
|
|
412
|
+
} | {
|
|
413
|
+
$case: "uint64";
|
|
414
|
+
uint64: UInt64Rules;
|
|
415
|
+
} | {
|
|
416
|
+
$case: "sint32";
|
|
417
|
+
sint32: SInt32Rules;
|
|
418
|
+
} | {
|
|
419
|
+
$case: "sint64";
|
|
420
|
+
sint64: SInt64Rules;
|
|
421
|
+
} | {
|
|
422
|
+
$case: "fixed32";
|
|
423
|
+
fixed32: Fixed32Rules;
|
|
424
|
+
} | {
|
|
425
|
+
$case: "fixed64";
|
|
426
|
+
fixed64: Fixed64Rules;
|
|
427
|
+
} | {
|
|
428
|
+
$case: "sfixed32";
|
|
429
|
+
sfixed32: SFixed32Rules;
|
|
430
|
+
} | {
|
|
431
|
+
$case: "sfixed64";
|
|
432
|
+
sfixed64: SFixed64Rules;
|
|
433
|
+
} | {
|
|
434
|
+
$case: "bool";
|
|
435
|
+
bool: BoolRules;
|
|
436
|
+
} | {
|
|
437
|
+
$case: "string";
|
|
438
|
+
string: StringRules;
|
|
439
|
+
} | {
|
|
440
|
+
$case: "bytes";
|
|
441
|
+
bytes: BytesRules;
|
|
442
|
+
} | {
|
|
443
|
+
$case: "enum";
|
|
444
|
+
enum: EnumRules;
|
|
445
|
+
} | {
|
|
446
|
+
$case: "repeated";
|
|
447
|
+
repeated: RepeatedRules;
|
|
448
|
+
} | {
|
|
449
|
+
$case: "map";
|
|
450
|
+
map: MapRules;
|
|
451
|
+
} | {
|
|
452
|
+
$case: "any";
|
|
453
|
+
any: AnyRules;
|
|
454
|
+
} | {
|
|
455
|
+
$case: "duration";
|
|
456
|
+
duration: DurationRules;
|
|
457
|
+
} | {
|
|
458
|
+
$case: "timestamp";
|
|
459
|
+
timestamp: TimestampRules;
|
|
460
|
+
} | undefined;
|
|
461
|
+
}
|
|
462
|
+
export declare const FieldConstraints: MessageFns<FieldConstraints, "buf.validate.FieldConstraints">;
|
|
463
|
+
/**
|
|
464
|
+
* PredefinedConstraints are custom constraints that can be re-used with
|
|
465
|
+
* multiple fields.
|
|
466
|
+
*
|
|
467
|
+
*/
|
|
468
|
+
export interface PredefinedConstraints {
|
|
469
|
+
$type: "buf.validate.PredefinedConstraints";
|
|
470
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
471
|
+
[customJson]?: () => unknown;
|
|
472
|
+
/**
|
|
473
|
+
* `cel` is a repeated field used to represent a textual expression
|
|
474
|
+
* in the Common Expression Language (CEL) syntax. For more information on
|
|
475
|
+
* CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
|
|
476
|
+
*
|
|
477
|
+
* ```proto
|
|
478
|
+
* message MyMessage {
|
|
479
|
+
* // The field `value` must be greater than 42.
|
|
480
|
+
* optional int32 value = 1 [(buf.validate.predefined).cel = {
|
|
481
|
+
* id: "my_message.value",
|
|
482
|
+
* message: "value must be greater than 42",
|
|
483
|
+
* expression: "this > 42",
|
|
484
|
+
* }];
|
|
485
|
+
* }
|
|
486
|
+
* ```
|
|
487
|
+
*
|
|
488
|
+
*/
|
|
489
|
+
cel: Constraint[];
|
|
490
|
+
}
|
|
491
|
+
export declare const PredefinedConstraints: MessageFns<PredefinedConstraints, "buf.validate.PredefinedConstraints">;
|
|
492
|
+
/**
|
|
493
|
+
* FloatRules describes the constraints applied to `float` values. These
|
|
494
|
+
* rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type.
|
|
495
|
+
*
|
|
496
|
+
*/
|
|
497
|
+
export interface FloatRules {
|
|
498
|
+
$type: "buf.validate.FloatRules";
|
|
499
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
500
|
+
[customJson]?: () => unknown;
|
|
501
|
+
/**
|
|
502
|
+
* `const` requires the field value to exactly match the specified value. If
|
|
503
|
+
* the field value doesn't match, an error message is generated.
|
|
504
|
+
*
|
|
505
|
+
* ```proto
|
|
506
|
+
* message MyFloat {
|
|
507
|
+
* // value must equal 42.0
|
|
508
|
+
* float value = 1 [(buf.validate.field).float.const = 42.0];
|
|
509
|
+
* }
|
|
510
|
+
* ```
|
|
511
|
+
*
|
|
512
|
+
*/
|
|
513
|
+
const?: number | undefined;
|
|
514
|
+
/**
|
|
515
|
+
* `in` requires the field value to be equal to one of the specified values.
|
|
516
|
+
* If the field value isn't one of the specified values, an error message
|
|
517
|
+
* is generated.
|
|
518
|
+
*
|
|
519
|
+
* ```proto
|
|
520
|
+
* message MyFloat {
|
|
521
|
+
* // value must be in list [1.0, 2.0, 3.0]
|
|
522
|
+
* repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] };
|
|
523
|
+
* }
|
|
524
|
+
* ```
|
|
525
|
+
*
|
|
526
|
+
*/
|
|
527
|
+
in: number[];
|
|
528
|
+
/**
|
|
529
|
+
* `in` requires the field value to not be equal to any of the specified
|
|
530
|
+
* values. If the field value is one of the specified values, an error
|
|
531
|
+
* message is generated.
|
|
532
|
+
*
|
|
533
|
+
* ```proto
|
|
534
|
+
* message MyFloat {
|
|
535
|
+
* // value must not be in list [1.0, 2.0, 3.0]
|
|
536
|
+
* repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] };
|
|
537
|
+
* }
|
|
538
|
+
* ```
|
|
539
|
+
*
|
|
540
|
+
*/
|
|
541
|
+
notIn: number[];
|
|
542
|
+
/**
|
|
543
|
+
* `finite` requires the field value to be finite. If the field value is
|
|
544
|
+
* infinite or NaN, an error message is generated.
|
|
545
|
+
*
|
|
546
|
+
*/
|
|
547
|
+
finite?: boolean | undefined;
|
|
548
|
+
/**
|
|
549
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
550
|
+
* conform to other constraints. `example` values will not impact validation
|
|
551
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
552
|
+
*
|
|
553
|
+
* ```proto
|
|
554
|
+
* message MyFloat {
|
|
555
|
+
* float value = 1 [
|
|
556
|
+
* (buf.validate.field).float.example = 1.0,
|
|
557
|
+
* (buf.validate.field).float.example = "Infinity"
|
|
558
|
+
* ];
|
|
559
|
+
* }
|
|
560
|
+
* ```
|
|
561
|
+
*
|
|
562
|
+
*/
|
|
563
|
+
example: number[];
|
|
564
|
+
lessThan?: {
|
|
565
|
+
$case: "lt";
|
|
566
|
+
lt: number;
|
|
567
|
+
} | {
|
|
568
|
+
$case: "lte";
|
|
569
|
+
lte: number;
|
|
570
|
+
} | undefined;
|
|
571
|
+
greaterThan?: {
|
|
572
|
+
$case: "gt";
|
|
573
|
+
gt: number;
|
|
574
|
+
} | {
|
|
575
|
+
$case: "gte";
|
|
576
|
+
gte: number;
|
|
577
|
+
} | undefined;
|
|
578
|
+
}
|
|
579
|
+
export declare const FloatRules: MessageFns<FloatRules, "buf.validate.FloatRules">;
|
|
580
|
+
/**
|
|
581
|
+
* DoubleRules describes the constraints applied to `double` values. These
|
|
582
|
+
* rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type.
|
|
583
|
+
*
|
|
584
|
+
*/
|
|
585
|
+
export interface DoubleRules {
|
|
586
|
+
$type: "buf.validate.DoubleRules";
|
|
587
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
588
|
+
[customJson]?: () => unknown;
|
|
589
|
+
/**
|
|
590
|
+
* `const` requires the field value to exactly match the specified value. If
|
|
591
|
+
* the field value doesn't match, an error message is generated.
|
|
592
|
+
*
|
|
593
|
+
* ```proto
|
|
594
|
+
* message MyDouble {
|
|
595
|
+
* // value must equal 42.0
|
|
596
|
+
* double value = 1 [(buf.validate.field).double.const = 42.0];
|
|
597
|
+
* }
|
|
598
|
+
* ```
|
|
599
|
+
*
|
|
600
|
+
*/
|
|
601
|
+
const?: number | undefined;
|
|
602
|
+
/**
|
|
603
|
+
* `in` requires the field value to be equal to one of the specified values.
|
|
604
|
+
* If the field value isn't one of the specified values, an error message is
|
|
605
|
+
* generated.
|
|
606
|
+
*
|
|
607
|
+
* ```proto
|
|
608
|
+
* message MyDouble {
|
|
609
|
+
* // value must be in list [1.0, 2.0, 3.0]
|
|
610
|
+
* repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] };
|
|
611
|
+
* }
|
|
612
|
+
* ```
|
|
613
|
+
*
|
|
614
|
+
*/
|
|
615
|
+
in: number[];
|
|
616
|
+
/**
|
|
617
|
+
* `not_in` requires the field value to not be equal to any of the specified
|
|
618
|
+
* values. If the field value is one of the specified values, an error
|
|
619
|
+
* message is generated.
|
|
620
|
+
*
|
|
621
|
+
* ```proto
|
|
622
|
+
* message MyDouble {
|
|
623
|
+
* // value must not be in list [1.0, 2.0, 3.0]
|
|
624
|
+
* repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] };
|
|
625
|
+
* }
|
|
626
|
+
* ```
|
|
627
|
+
*
|
|
628
|
+
*/
|
|
629
|
+
notIn: number[];
|
|
630
|
+
/**
|
|
631
|
+
* `finite` requires the field value to be finite. If the field value is
|
|
632
|
+
* infinite or NaN, an error message is generated.
|
|
633
|
+
*
|
|
634
|
+
*/
|
|
635
|
+
finite?: boolean | undefined;
|
|
636
|
+
/**
|
|
637
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
638
|
+
* conform to other constraints. `example` values will not impact validation
|
|
639
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
640
|
+
*
|
|
641
|
+
* ```proto
|
|
642
|
+
* message MyDouble {
|
|
643
|
+
* double value = 1 [
|
|
644
|
+
* (buf.validate.field).double.example = 1.0,
|
|
645
|
+
* (buf.validate.field).double.example = "Infinity"
|
|
646
|
+
* ];
|
|
647
|
+
* }
|
|
648
|
+
* ```
|
|
649
|
+
*
|
|
650
|
+
*/
|
|
651
|
+
example: number[];
|
|
652
|
+
lessThan?: {
|
|
653
|
+
$case: "lt";
|
|
654
|
+
lt: number;
|
|
655
|
+
} | {
|
|
656
|
+
$case: "lte";
|
|
657
|
+
lte: number;
|
|
658
|
+
} | undefined;
|
|
659
|
+
greaterThan?: {
|
|
660
|
+
$case: "gt";
|
|
661
|
+
gt: number;
|
|
662
|
+
} | {
|
|
663
|
+
$case: "gte";
|
|
664
|
+
gte: number;
|
|
665
|
+
} | undefined;
|
|
666
|
+
}
|
|
667
|
+
export declare const DoubleRules: MessageFns<DoubleRules, "buf.validate.DoubleRules">;
|
|
668
|
+
/**
|
|
669
|
+
* Int32Rules describes the constraints applied to `int32` values. These
|
|
670
|
+
* rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type.
|
|
671
|
+
*
|
|
672
|
+
*/
|
|
673
|
+
export interface Int32Rules {
|
|
674
|
+
$type: "buf.validate.Int32Rules";
|
|
675
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
676
|
+
[customJson]?: () => unknown;
|
|
677
|
+
/**
|
|
678
|
+
* `const` requires the field value to exactly match the specified value. If
|
|
679
|
+
* the field value doesn't match, an error message is generated.
|
|
680
|
+
*
|
|
681
|
+
* ```proto
|
|
682
|
+
* message MyInt32 {
|
|
683
|
+
* // value must equal 42
|
|
684
|
+
* int32 value = 1 [(buf.validate.field).int32.const = 42];
|
|
685
|
+
* }
|
|
686
|
+
* ```
|
|
687
|
+
*
|
|
688
|
+
*/
|
|
689
|
+
const?: number | undefined;
|
|
690
|
+
/**
|
|
691
|
+
* `in` requires the field value to be equal to one of the specified values.
|
|
692
|
+
* If the field value isn't one of the specified values, an error message is
|
|
693
|
+
* generated.
|
|
694
|
+
*
|
|
695
|
+
* ```proto
|
|
696
|
+
* message MyInt32 {
|
|
697
|
+
* // value must be in list [1, 2, 3]
|
|
698
|
+
* repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] };
|
|
699
|
+
* }
|
|
700
|
+
* ```
|
|
701
|
+
*
|
|
702
|
+
*/
|
|
703
|
+
in: number[];
|
|
704
|
+
/**
|
|
705
|
+
* `not_in` requires the field value to not be equal to any of the specified
|
|
706
|
+
* values. If the field value is one of the specified values, an error message
|
|
707
|
+
* is generated.
|
|
708
|
+
*
|
|
709
|
+
* ```proto
|
|
710
|
+
* message MyInt32 {
|
|
711
|
+
* // value must not be in list [1, 2, 3]
|
|
712
|
+
* repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] };
|
|
713
|
+
* }
|
|
714
|
+
* ```
|
|
715
|
+
*
|
|
716
|
+
*/
|
|
717
|
+
notIn: number[];
|
|
718
|
+
/**
|
|
719
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
720
|
+
* conform to other constraints. `example` values will not impact validation
|
|
721
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
722
|
+
*
|
|
723
|
+
* ```proto
|
|
724
|
+
* message MyInt32 {
|
|
725
|
+
* int32 value = 1 [
|
|
726
|
+
* (buf.validate.field).int32.example = 1,
|
|
727
|
+
* (buf.validate.field).int32.example = -10
|
|
728
|
+
* ];
|
|
729
|
+
* }
|
|
730
|
+
* ```
|
|
731
|
+
*
|
|
732
|
+
*/
|
|
733
|
+
example: number[];
|
|
734
|
+
lessThan?: {
|
|
735
|
+
$case: "lt";
|
|
736
|
+
lt: number;
|
|
737
|
+
} | {
|
|
738
|
+
$case: "lte";
|
|
739
|
+
lte: number;
|
|
740
|
+
} | undefined;
|
|
741
|
+
greaterThan?: {
|
|
742
|
+
$case: "gt";
|
|
743
|
+
gt: number;
|
|
744
|
+
} | {
|
|
745
|
+
$case: "gte";
|
|
746
|
+
gte: number;
|
|
747
|
+
} | undefined;
|
|
748
|
+
}
|
|
749
|
+
export declare const Int32Rules: MessageFns<Int32Rules, "buf.validate.Int32Rules">;
|
|
750
|
+
/**
|
|
751
|
+
* Int64Rules describes the constraints applied to `int64` values. These
|
|
752
|
+
* rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type.
|
|
753
|
+
*
|
|
754
|
+
*/
|
|
755
|
+
export interface Int64Rules {
|
|
756
|
+
$type: "buf.validate.Int64Rules";
|
|
757
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
758
|
+
[customJson]?: () => unknown;
|
|
759
|
+
/**
|
|
760
|
+
* `const` requires the field value to exactly match the specified value. If
|
|
761
|
+
* the field value doesn't match, an error message is generated.
|
|
762
|
+
*
|
|
763
|
+
* ```proto
|
|
764
|
+
* message MyInt64 {
|
|
765
|
+
* // value must equal 42
|
|
766
|
+
* int64 value = 1 [(buf.validate.field).int64.const = 42];
|
|
767
|
+
* }
|
|
768
|
+
* ```
|
|
769
|
+
*
|
|
770
|
+
*/
|
|
771
|
+
const?: Long | undefined;
|
|
772
|
+
/**
|
|
773
|
+
* `in` requires the field value to be equal to one of the specified values.
|
|
774
|
+
* If the field value isn't one of the specified values, an error message is
|
|
775
|
+
* generated.
|
|
776
|
+
*
|
|
777
|
+
* ```proto
|
|
778
|
+
* message MyInt64 {
|
|
779
|
+
* // value must be in list [1, 2, 3]
|
|
780
|
+
* repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] };
|
|
781
|
+
* }
|
|
782
|
+
* ```
|
|
783
|
+
*
|
|
784
|
+
*/
|
|
785
|
+
in: Long[];
|
|
786
|
+
/**
|
|
787
|
+
* `not_in` requires the field value to not be equal to any of the specified
|
|
788
|
+
* values. If the field value is one of the specified values, an error
|
|
789
|
+
* message is generated.
|
|
790
|
+
*
|
|
791
|
+
* ```proto
|
|
792
|
+
* message MyInt64 {
|
|
793
|
+
* // value must not be in list [1, 2, 3]
|
|
794
|
+
* repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] };
|
|
795
|
+
* }
|
|
796
|
+
* ```
|
|
797
|
+
*
|
|
798
|
+
*/
|
|
799
|
+
notIn: Long[];
|
|
800
|
+
/**
|
|
801
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
802
|
+
* conform to other constraints. `example` values will not impact validation
|
|
803
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
804
|
+
*
|
|
805
|
+
* ```proto
|
|
806
|
+
* message MyInt64 {
|
|
807
|
+
* int64 value = 1 [
|
|
808
|
+
* (buf.validate.field).int64.example = 1,
|
|
809
|
+
* (buf.validate.field).int64.example = -10
|
|
810
|
+
* ];
|
|
811
|
+
* }
|
|
812
|
+
* ```
|
|
813
|
+
*
|
|
814
|
+
*/
|
|
815
|
+
example: Long[];
|
|
816
|
+
lessThan?: {
|
|
817
|
+
$case: "lt";
|
|
818
|
+
lt: Long;
|
|
819
|
+
} | {
|
|
820
|
+
$case: "lte";
|
|
821
|
+
lte: Long;
|
|
822
|
+
} | undefined;
|
|
823
|
+
greaterThan?: {
|
|
824
|
+
$case: "gt";
|
|
825
|
+
gt: Long;
|
|
826
|
+
} | {
|
|
827
|
+
$case: "gte";
|
|
828
|
+
gte: Long;
|
|
829
|
+
} | undefined;
|
|
830
|
+
}
|
|
831
|
+
export declare const Int64Rules: MessageFns<Int64Rules, "buf.validate.Int64Rules">;
|
|
832
|
+
/**
|
|
833
|
+
* UInt32Rules describes the constraints applied to `uint32` values. These
|
|
834
|
+
* rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type.
|
|
835
|
+
*
|
|
836
|
+
*/
|
|
837
|
+
export interface UInt32Rules {
|
|
838
|
+
$type: "buf.validate.UInt32Rules";
|
|
839
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
840
|
+
[customJson]?: () => unknown;
|
|
841
|
+
/**
|
|
842
|
+
* `const` requires the field value to exactly match the specified value. If
|
|
843
|
+
* the field value doesn't match, an error message is generated.
|
|
844
|
+
*
|
|
845
|
+
* ```proto
|
|
846
|
+
* message MyUInt32 {
|
|
847
|
+
* // value must equal 42
|
|
848
|
+
* uint32 value = 1 [(buf.validate.field).uint32.const = 42];
|
|
849
|
+
* }
|
|
850
|
+
* ```
|
|
851
|
+
*
|
|
852
|
+
*/
|
|
853
|
+
const?: number | undefined;
|
|
854
|
+
/**
|
|
855
|
+
* `in` requires the field value to be equal to one of the specified values.
|
|
856
|
+
* If the field value isn't one of the specified values, an error message is
|
|
857
|
+
* generated.
|
|
858
|
+
*
|
|
859
|
+
* ```proto
|
|
860
|
+
* message MyUInt32 {
|
|
861
|
+
* // value must be in list [1, 2, 3]
|
|
862
|
+
* repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] };
|
|
863
|
+
* }
|
|
864
|
+
* ```
|
|
865
|
+
*
|
|
866
|
+
*/
|
|
867
|
+
in: number[];
|
|
868
|
+
/**
|
|
869
|
+
* `not_in` requires the field value to not be equal to any of the specified
|
|
870
|
+
* values. If the field value is one of the specified values, an error
|
|
871
|
+
* message is generated.
|
|
872
|
+
*
|
|
873
|
+
* ```proto
|
|
874
|
+
* message MyUInt32 {
|
|
875
|
+
* // value must not be in list [1, 2, 3]
|
|
876
|
+
* repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] };
|
|
877
|
+
* }
|
|
878
|
+
* ```
|
|
879
|
+
*
|
|
880
|
+
*/
|
|
881
|
+
notIn: number[];
|
|
882
|
+
/**
|
|
883
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
884
|
+
* conform to other constraints. `example` values will not impact validation
|
|
885
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
886
|
+
*
|
|
887
|
+
* ```proto
|
|
888
|
+
* message MyUInt32 {
|
|
889
|
+
* uint32 value = 1 [
|
|
890
|
+
* (buf.validate.field).uint32.example = 1,
|
|
891
|
+
* (buf.validate.field).uint32.example = 10
|
|
892
|
+
* ];
|
|
893
|
+
* }
|
|
894
|
+
* ```
|
|
895
|
+
*
|
|
896
|
+
*/
|
|
897
|
+
example: number[];
|
|
898
|
+
lessThan?: {
|
|
899
|
+
$case: "lt";
|
|
900
|
+
lt: number;
|
|
901
|
+
} | {
|
|
902
|
+
$case: "lte";
|
|
903
|
+
lte: number;
|
|
904
|
+
} | undefined;
|
|
905
|
+
greaterThan?: {
|
|
906
|
+
$case: "gt";
|
|
907
|
+
gt: number;
|
|
908
|
+
} | {
|
|
909
|
+
$case: "gte";
|
|
910
|
+
gte: number;
|
|
911
|
+
} | undefined;
|
|
912
|
+
}
|
|
913
|
+
export declare const UInt32Rules: MessageFns<UInt32Rules, "buf.validate.UInt32Rules">;
|
|
914
|
+
/**
|
|
915
|
+
* UInt64Rules describes the constraints applied to `uint64` values. These
|
|
916
|
+
* rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type.
|
|
917
|
+
*
|
|
918
|
+
*/
|
|
919
|
+
export interface UInt64Rules {
|
|
920
|
+
$type: "buf.validate.UInt64Rules";
|
|
921
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
922
|
+
[customJson]?: () => unknown;
|
|
923
|
+
/**
|
|
924
|
+
* `const` requires the field value to exactly match the specified value. If
|
|
925
|
+
* the field value doesn't match, an error message is generated.
|
|
926
|
+
*
|
|
927
|
+
* ```proto
|
|
928
|
+
* message MyUInt64 {
|
|
929
|
+
* // value must equal 42
|
|
930
|
+
* uint64 value = 1 [(buf.validate.field).uint64.const = 42];
|
|
931
|
+
* }
|
|
932
|
+
* ```
|
|
933
|
+
*
|
|
934
|
+
*/
|
|
935
|
+
const?: Long | undefined;
|
|
936
|
+
/**
|
|
937
|
+
* `in` requires the field value to be equal to one of the specified values.
|
|
938
|
+
* If the field value isn't one of the specified values, an error message is
|
|
939
|
+
* generated.
|
|
940
|
+
*
|
|
941
|
+
* ```proto
|
|
942
|
+
* message MyUInt64 {
|
|
943
|
+
* // value must be in list [1, 2, 3]
|
|
944
|
+
* repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] };
|
|
945
|
+
* }
|
|
946
|
+
* ```
|
|
947
|
+
*
|
|
948
|
+
*/
|
|
949
|
+
in: Long[];
|
|
950
|
+
/**
|
|
951
|
+
* `not_in` requires the field value to not be equal to any of the specified
|
|
952
|
+
* values. If the field value is one of the specified values, an error
|
|
953
|
+
* message is generated.
|
|
954
|
+
*
|
|
955
|
+
* ```proto
|
|
956
|
+
* message MyUInt64 {
|
|
957
|
+
* // value must not be in list [1, 2, 3]
|
|
958
|
+
* repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] };
|
|
959
|
+
* }
|
|
960
|
+
* ```
|
|
961
|
+
*
|
|
962
|
+
*/
|
|
963
|
+
notIn: Long[];
|
|
964
|
+
/**
|
|
965
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
966
|
+
* conform to other constraints. `example` values will not impact validation
|
|
967
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
968
|
+
*
|
|
969
|
+
* ```proto
|
|
970
|
+
* message MyUInt64 {
|
|
971
|
+
* uint64 value = 1 [
|
|
972
|
+
* (buf.validate.field).uint64.example = 1,
|
|
973
|
+
* (buf.validate.field).uint64.example = -10
|
|
974
|
+
* ];
|
|
975
|
+
* }
|
|
976
|
+
* ```
|
|
977
|
+
*
|
|
978
|
+
*/
|
|
979
|
+
example: Long[];
|
|
980
|
+
lessThan?: {
|
|
981
|
+
$case: "lt";
|
|
982
|
+
lt: Long;
|
|
983
|
+
} | {
|
|
984
|
+
$case: "lte";
|
|
985
|
+
lte: Long;
|
|
986
|
+
} | undefined;
|
|
987
|
+
greaterThan?: {
|
|
988
|
+
$case: "gt";
|
|
989
|
+
gt: Long;
|
|
990
|
+
} | {
|
|
991
|
+
$case: "gte";
|
|
992
|
+
gte: Long;
|
|
993
|
+
} | undefined;
|
|
994
|
+
}
|
|
995
|
+
export declare const UInt64Rules: MessageFns<UInt64Rules, "buf.validate.UInt64Rules">;
|
|
996
|
+
/**
|
|
997
|
+
* SInt32Rules describes the constraints applied to `sint32` values.
|
|
998
|
+
*
|
|
999
|
+
*/
|
|
1000
|
+
export interface SInt32Rules {
|
|
1001
|
+
$type: "buf.validate.SInt32Rules";
|
|
1002
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
1003
|
+
[customJson]?: () => unknown;
|
|
1004
|
+
/**
|
|
1005
|
+
* `const` requires the field value to exactly match the specified value. If
|
|
1006
|
+
* the field value doesn't match, an error message is generated.
|
|
1007
|
+
*
|
|
1008
|
+
* ```proto
|
|
1009
|
+
* message MySInt32 {
|
|
1010
|
+
* // value must equal 42
|
|
1011
|
+
* sint32 value = 1 [(buf.validate.field).sint32.const = 42];
|
|
1012
|
+
* }
|
|
1013
|
+
* ```
|
|
1014
|
+
*
|
|
1015
|
+
*/
|
|
1016
|
+
const?: number | undefined;
|
|
1017
|
+
/**
|
|
1018
|
+
* `in` requires the field value to be equal to one of the specified values.
|
|
1019
|
+
* If the field value isn't one of the specified values, an error message is
|
|
1020
|
+
* generated.
|
|
1021
|
+
*
|
|
1022
|
+
* ```proto
|
|
1023
|
+
* message MySInt32 {
|
|
1024
|
+
* // value must be in list [1, 2, 3]
|
|
1025
|
+
* repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] };
|
|
1026
|
+
* }
|
|
1027
|
+
* ```
|
|
1028
|
+
*
|
|
1029
|
+
*/
|
|
1030
|
+
in: number[];
|
|
1031
|
+
/**
|
|
1032
|
+
* `not_in` requires the field value to not be equal to any of the specified
|
|
1033
|
+
* values. If the field value is one of the specified values, an error
|
|
1034
|
+
* message is generated.
|
|
1035
|
+
*
|
|
1036
|
+
* ```proto
|
|
1037
|
+
* message MySInt32 {
|
|
1038
|
+
* // value must not be in list [1, 2, 3]
|
|
1039
|
+
* repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] };
|
|
1040
|
+
* }
|
|
1041
|
+
* ```
|
|
1042
|
+
*
|
|
1043
|
+
*/
|
|
1044
|
+
notIn: number[];
|
|
1045
|
+
/**
|
|
1046
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
1047
|
+
* conform to other constraints. `example` values will not impact validation
|
|
1048
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
1049
|
+
*
|
|
1050
|
+
* ```proto
|
|
1051
|
+
* message MySInt32 {
|
|
1052
|
+
* sint32 value = 1 [
|
|
1053
|
+
* (buf.validate.field).sint32.example = 1,
|
|
1054
|
+
* (buf.validate.field).sint32.example = -10
|
|
1055
|
+
* ];
|
|
1056
|
+
* }
|
|
1057
|
+
* ```
|
|
1058
|
+
*
|
|
1059
|
+
*/
|
|
1060
|
+
example: number[];
|
|
1061
|
+
lessThan?: {
|
|
1062
|
+
$case: "lt";
|
|
1063
|
+
lt: number;
|
|
1064
|
+
} | {
|
|
1065
|
+
$case: "lte";
|
|
1066
|
+
lte: number;
|
|
1067
|
+
} | undefined;
|
|
1068
|
+
greaterThan?: {
|
|
1069
|
+
$case: "gt";
|
|
1070
|
+
gt: number;
|
|
1071
|
+
} | {
|
|
1072
|
+
$case: "gte";
|
|
1073
|
+
gte: number;
|
|
1074
|
+
} | undefined;
|
|
1075
|
+
}
|
|
1076
|
+
export declare const SInt32Rules: MessageFns<SInt32Rules, "buf.validate.SInt32Rules">;
|
|
1077
|
+
/**
|
|
1078
|
+
* SInt64Rules describes the constraints applied to `sint64` values.
|
|
1079
|
+
*
|
|
1080
|
+
*/
|
|
1081
|
+
export interface SInt64Rules {
|
|
1082
|
+
$type: "buf.validate.SInt64Rules";
|
|
1083
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
1084
|
+
[customJson]?: () => unknown;
|
|
1085
|
+
/**
|
|
1086
|
+
* `const` requires the field value to exactly match the specified value. If
|
|
1087
|
+
* the field value doesn't match, an error message is generated.
|
|
1088
|
+
*
|
|
1089
|
+
* ```proto
|
|
1090
|
+
* message MySInt64 {
|
|
1091
|
+
* // value must equal 42
|
|
1092
|
+
* sint64 value = 1 [(buf.validate.field).sint64.const = 42];
|
|
1093
|
+
* }
|
|
1094
|
+
* ```
|
|
1095
|
+
*
|
|
1096
|
+
*/
|
|
1097
|
+
const?: Long | undefined;
|
|
1098
|
+
/**
|
|
1099
|
+
* `in` requires the field value to be equal to one of the specified values.
|
|
1100
|
+
* If the field value isn't one of the specified values, an error message
|
|
1101
|
+
* is generated.
|
|
1102
|
+
*
|
|
1103
|
+
* ```proto
|
|
1104
|
+
* message MySInt64 {
|
|
1105
|
+
* // value must be in list [1, 2, 3]
|
|
1106
|
+
* repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] };
|
|
1107
|
+
* }
|
|
1108
|
+
* ```
|
|
1109
|
+
*
|
|
1110
|
+
*/
|
|
1111
|
+
in: Long[];
|
|
1112
|
+
/**
|
|
1113
|
+
* `not_in` requires the field value to not be equal to any of the specified
|
|
1114
|
+
* values. If the field value is one of the specified values, an error
|
|
1115
|
+
* message is generated.
|
|
1116
|
+
*
|
|
1117
|
+
* ```proto
|
|
1118
|
+
* message MySInt64 {
|
|
1119
|
+
* // value must not be in list [1, 2, 3]
|
|
1120
|
+
* repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] };
|
|
1121
|
+
* }
|
|
1122
|
+
* ```
|
|
1123
|
+
*
|
|
1124
|
+
*/
|
|
1125
|
+
notIn: Long[];
|
|
1126
|
+
/**
|
|
1127
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
1128
|
+
* conform to other constraints. `example` values will not impact validation
|
|
1129
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
1130
|
+
*
|
|
1131
|
+
* ```proto
|
|
1132
|
+
* message MySInt64 {
|
|
1133
|
+
* sint64 value = 1 [
|
|
1134
|
+
* (buf.validate.field).sint64.example = 1,
|
|
1135
|
+
* (buf.validate.field).sint64.example = -10
|
|
1136
|
+
* ];
|
|
1137
|
+
* }
|
|
1138
|
+
* ```
|
|
1139
|
+
*
|
|
1140
|
+
*/
|
|
1141
|
+
example: Long[];
|
|
1142
|
+
lessThan?: {
|
|
1143
|
+
$case: "lt";
|
|
1144
|
+
lt: Long;
|
|
1145
|
+
} | {
|
|
1146
|
+
$case: "lte";
|
|
1147
|
+
lte: Long;
|
|
1148
|
+
} | undefined;
|
|
1149
|
+
greaterThan?: {
|
|
1150
|
+
$case: "gt";
|
|
1151
|
+
gt: Long;
|
|
1152
|
+
} | {
|
|
1153
|
+
$case: "gte";
|
|
1154
|
+
gte: Long;
|
|
1155
|
+
} | undefined;
|
|
1156
|
+
}
|
|
1157
|
+
export declare const SInt64Rules: MessageFns<SInt64Rules, "buf.validate.SInt64Rules">;
|
|
1158
|
+
/**
|
|
1159
|
+
* Fixed32Rules describes the constraints applied to `fixed32` values.
|
|
1160
|
+
*
|
|
1161
|
+
*/
|
|
1162
|
+
export interface Fixed32Rules {
|
|
1163
|
+
$type: "buf.validate.Fixed32Rules";
|
|
1164
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
1165
|
+
[customJson]?: () => unknown;
|
|
1166
|
+
/**
|
|
1167
|
+
* `const` requires the field value to exactly match the specified value.
|
|
1168
|
+
* If the field value doesn't match, an error message is generated.
|
|
1169
|
+
*
|
|
1170
|
+
* ```proto
|
|
1171
|
+
* message MyFixed32 {
|
|
1172
|
+
* // value must equal 42
|
|
1173
|
+
* fixed32 value = 1 [(buf.validate.field).fixed32.const = 42];
|
|
1174
|
+
* }
|
|
1175
|
+
* ```
|
|
1176
|
+
*
|
|
1177
|
+
*/
|
|
1178
|
+
const?: number | undefined;
|
|
1179
|
+
/**
|
|
1180
|
+
* `in` requires the field value to be equal to one of the specified values.
|
|
1181
|
+
* If the field value isn't one of the specified values, an error message
|
|
1182
|
+
* is generated.
|
|
1183
|
+
*
|
|
1184
|
+
* ```proto
|
|
1185
|
+
* message MyFixed32 {
|
|
1186
|
+
* // value must be in list [1, 2, 3]
|
|
1187
|
+
* repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] };
|
|
1188
|
+
* }
|
|
1189
|
+
* ```
|
|
1190
|
+
*
|
|
1191
|
+
*/
|
|
1192
|
+
in: number[];
|
|
1193
|
+
/**
|
|
1194
|
+
* `not_in` requires the field value to not be equal to any of the specified
|
|
1195
|
+
* values. If the field value is one of the specified values, an error
|
|
1196
|
+
* message is generated.
|
|
1197
|
+
*
|
|
1198
|
+
* ```proto
|
|
1199
|
+
* message MyFixed32 {
|
|
1200
|
+
* // value must not be in list [1, 2, 3]
|
|
1201
|
+
* repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] };
|
|
1202
|
+
* }
|
|
1203
|
+
* ```
|
|
1204
|
+
*
|
|
1205
|
+
*/
|
|
1206
|
+
notIn: number[];
|
|
1207
|
+
/**
|
|
1208
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
1209
|
+
* conform to other constraints. `example` values will not impact validation
|
|
1210
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
1211
|
+
*
|
|
1212
|
+
* ```proto
|
|
1213
|
+
* message MyFixed32 {
|
|
1214
|
+
* fixed32 value = 1 [
|
|
1215
|
+
* (buf.validate.field).fixed32.example = 1,
|
|
1216
|
+
* (buf.validate.field).fixed32.example = 2
|
|
1217
|
+
* ];
|
|
1218
|
+
* }
|
|
1219
|
+
* ```
|
|
1220
|
+
*
|
|
1221
|
+
*/
|
|
1222
|
+
example: number[];
|
|
1223
|
+
lessThan?: {
|
|
1224
|
+
$case: "lt";
|
|
1225
|
+
lt: number;
|
|
1226
|
+
} | {
|
|
1227
|
+
$case: "lte";
|
|
1228
|
+
lte: number;
|
|
1229
|
+
} | undefined;
|
|
1230
|
+
greaterThan?: {
|
|
1231
|
+
$case: "gt";
|
|
1232
|
+
gt: number;
|
|
1233
|
+
} | {
|
|
1234
|
+
$case: "gte";
|
|
1235
|
+
gte: number;
|
|
1236
|
+
} | undefined;
|
|
1237
|
+
}
|
|
1238
|
+
export declare const Fixed32Rules: MessageFns<Fixed32Rules, "buf.validate.Fixed32Rules">;
|
|
1239
|
+
/**
|
|
1240
|
+
* Fixed64Rules describes the constraints applied to `fixed64` values.
|
|
1241
|
+
*
|
|
1242
|
+
*/
|
|
1243
|
+
export interface Fixed64Rules {
|
|
1244
|
+
$type: "buf.validate.Fixed64Rules";
|
|
1245
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
1246
|
+
[customJson]?: () => unknown;
|
|
1247
|
+
/**
|
|
1248
|
+
* `const` requires the field value to exactly match the specified value. If
|
|
1249
|
+
* the field value doesn't match, an error message is generated.
|
|
1250
|
+
*
|
|
1251
|
+
* ```proto
|
|
1252
|
+
* message MyFixed64 {
|
|
1253
|
+
* // value must equal 42
|
|
1254
|
+
* fixed64 value = 1 [(buf.validate.field).fixed64.const = 42];
|
|
1255
|
+
* }
|
|
1256
|
+
* ```
|
|
1257
|
+
*
|
|
1258
|
+
*/
|
|
1259
|
+
const?: Long | undefined;
|
|
1260
|
+
/**
|
|
1261
|
+
* `in` requires the field value to be equal to one of the specified values.
|
|
1262
|
+
* If the field value isn't one of the specified values, an error message is
|
|
1263
|
+
* generated.
|
|
1264
|
+
*
|
|
1265
|
+
* ```proto
|
|
1266
|
+
* message MyFixed64 {
|
|
1267
|
+
* // value must be in list [1, 2, 3]
|
|
1268
|
+
* repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] };
|
|
1269
|
+
* }
|
|
1270
|
+
* ```
|
|
1271
|
+
*
|
|
1272
|
+
*/
|
|
1273
|
+
in: Long[];
|
|
1274
|
+
/**
|
|
1275
|
+
* `not_in` requires the field value to not be equal to any of the specified
|
|
1276
|
+
* values. If the field value is one of the specified values, an error
|
|
1277
|
+
* message is generated.
|
|
1278
|
+
*
|
|
1279
|
+
* ```proto
|
|
1280
|
+
* message MyFixed64 {
|
|
1281
|
+
* // value must not be in list [1, 2, 3]
|
|
1282
|
+
* repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] };
|
|
1283
|
+
* }
|
|
1284
|
+
* ```
|
|
1285
|
+
*
|
|
1286
|
+
*/
|
|
1287
|
+
notIn: Long[];
|
|
1288
|
+
/**
|
|
1289
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
1290
|
+
* conform to other constraints. `example` values will not impact validation
|
|
1291
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
1292
|
+
*
|
|
1293
|
+
* ```proto
|
|
1294
|
+
* message MyFixed64 {
|
|
1295
|
+
* fixed64 value = 1 [
|
|
1296
|
+
* (buf.validate.field).fixed64.example = 1,
|
|
1297
|
+
* (buf.validate.field).fixed64.example = 2
|
|
1298
|
+
* ];
|
|
1299
|
+
* }
|
|
1300
|
+
* ```
|
|
1301
|
+
*
|
|
1302
|
+
*/
|
|
1303
|
+
example: Long[];
|
|
1304
|
+
lessThan?: {
|
|
1305
|
+
$case: "lt";
|
|
1306
|
+
lt: Long;
|
|
1307
|
+
} | {
|
|
1308
|
+
$case: "lte";
|
|
1309
|
+
lte: Long;
|
|
1310
|
+
} | undefined;
|
|
1311
|
+
greaterThan?: {
|
|
1312
|
+
$case: "gt";
|
|
1313
|
+
gt: Long;
|
|
1314
|
+
} | {
|
|
1315
|
+
$case: "gte";
|
|
1316
|
+
gte: Long;
|
|
1317
|
+
} | undefined;
|
|
1318
|
+
}
|
|
1319
|
+
export declare const Fixed64Rules: MessageFns<Fixed64Rules, "buf.validate.Fixed64Rules">;
|
|
1320
|
+
/**
|
|
1321
|
+
* SFixed32Rules describes the constraints applied to `fixed32` values.
|
|
1322
|
+
*
|
|
1323
|
+
*/
|
|
1324
|
+
export interface SFixed32Rules {
|
|
1325
|
+
$type: "buf.validate.SFixed32Rules";
|
|
1326
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
1327
|
+
[customJson]?: () => unknown;
|
|
1328
|
+
/**
|
|
1329
|
+
* `const` requires the field value to exactly match the specified value. If
|
|
1330
|
+
* the field value doesn't match, an error message is generated.
|
|
1331
|
+
*
|
|
1332
|
+
* ```proto
|
|
1333
|
+
* message MySFixed32 {
|
|
1334
|
+
* // value must equal 42
|
|
1335
|
+
* sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42];
|
|
1336
|
+
* }
|
|
1337
|
+
* ```
|
|
1338
|
+
*
|
|
1339
|
+
*/
|
|
1340
|
+
const?: number | undefined;
|
|
1341
|
+
/**
|
|
1342
|
+
* `in` requires the field value to be equal to one of the specified values.
|
|
1343
|
+
* If the field value isn't one of the specified values, an error message is
|
|
1344
|
+
* generated.
|
|
1345
|
+
*
|
|
1346
|
+
* ```proto
|
|
1347
|
+
* message MySFixed32 {
|
|
1348
|
+
* // value must be in list [1, 2, 3]
|
|
1349
|
+
* repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] };
|
|
1350
|
+
* }
|
|
1351
|
+
* ```
|
|
1352
|
+
*
|
|
1353
|
+
*/
|
|
1354
|
+
in: number[];
|
|
1355
|
+
/**
|
|
1356
|
+
* `not_in` requires the field value to not be equal to any of the specified
|
|
1357
|
+
* values. If the field value is one of the specified values, an error
|
|
1358
|
+
* message is generated.
|
|
1359
|
+
*
|
|
1360
|
+
* ```proto
|
|
1361
|
+
* message MySFixed32 {
|
|
1362
|
+
* // value must not be in list [1, 2, 3]
|
|
1363
|
+
* repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] };
|
|
1364
|
+
* }
|
|
1365
|
+
* ```
|
|
1366
|
+
*
|
|
1367
|
+
*/
|
|
1368
|
+
notIn: number[];
|
|
1369
|
+
/**
|
|
1370
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
1371
|
+
* conform to other constraints. `example` values will not impact validation
|
|
1372
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
1373
|
+
*
|
|
1374
|
+
* ```proto
|
|
1375
|
+
* message MySFixed32 {
|
|
1376
|
+
* sfixed32 value = 1 [
|
|
1377
|
+
* (buf.validate.field).sfixed32.example = 1,
|
|
1378
|
+
* (buf.validate.field).sfixed32.example = 2
|
|
1379
|
+
* ];
|
|
1380
|
+
* }
|
|
1381
|
+
* ```
|
|
1382
|
+
*
|
|
1383
|
+
*/
|
|
1384
|
+
example: number[];
|
|
1385
|
+
lessThan?: {
|
|
1386
|
+
$case: "lt";
|
|
1387
|
+
lt: number;
|
|
1388
|
+
} | {
|
|
1389
|
+
$case: "lte";
|
|
1390
|
+
lte: number;
|
|
1391
|
+
} | undefined;
|
|
1392
|
+
greaterThan?: {
|
|
1393
|
+
$case: "gt";
|
|
1394
|
+
gt: number;
|
|
1395
|
+
} | {
|
|
1396
|
+
$case: "gte";
|
|
1397
|
+
gte: number;
|
|
1398
|
+
} | undefined;
|
|
1399
|
+
}
|
|
1400
|
+
export declare const SFixed32Rules: MessageFns<SFixed32Rules, "buf.validate.SFixed32Rules">;
|
|
1401
|
+
/**
|
|
1402
|
+
* SFixed64Rules describes the constraints applied to `fixed64` values.
|
|
1403
|
+
*
|
|
1404
|
+
*/
|
|
1405
|
+
export interface SFixed64Rules {
|
|
1406
|
+
$type: "buf.validate.SFixed64Rules";
|
|
1407
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
1408
|
+
[customJson]?: () => unknown;
|
|
1409
|
+
/**
|
|
1410
|
+
* `const` requires the field value to exactly match the specified value. If
|
|
1411
|
+
* the field value doesn't match, an error message is generated.
|
|
1412
|
+
*
|
|
1413
|
+
* ```proto
|
|
1414
|
+
* message MySFixed64 {
|
|
1415
|
+
* // value must equal 42
|
|
1416
|
+
* sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42];
|
|
1417
|
+
* }
|
|
1418
|
+
* ```
|
|
1419
|
+
*
|
|
1420
|
+
*/
|
|
1421
|
+
const?: Long | undefined;
|
|
1422
|
+
/**
|
|
1423
|
+
* `in` requires the field value to be equal to one of the specified values.
|
|
1424
|
+
* If the field value isn't one of the specified values, an error message is
|
|
1425
|
+
* generated.
|
|
1426
|
+
*
|
|
1427
|
+
* ```proto
|
|
1428
|
+
* message MySFixed64 {
|
|
1429
|
+
* // value must be in list [1, 2, 3]
|
|
1430
|
+
* repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] };
|
|
1431
|
+
* }
|
|
1432
|
+
* ```
|
|
1433
|
+
*
|
|
1434
|
+
*/
|
|
1435
|
+
in: Long[];
|
|
1436
|
+
/**
|
|
1437
|
+
* `not_in` requires the field value to not be equal to any of the specified
|
|
1438
|
+
* values. If the field value is one of the specified values, an error
|
|
1439
|
+
* message is generated.
|
|
1440
|
+
*
|
|
1441
|
+
* ```proto
|
|
1442
|
+
* message MySFixed64 {
|
|
1443
|
+
* // value must not be in list [1, 2, 3]
|
|
1444
|
+
* repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] };
|
|
1445
|
+
* }
|
|
1446
|
+
* ```
|
|
1447
|
+
*
|
|
1448
|
+
*/
|
|
1449
|
+
notIn: Long[];
|
|
1450
|
+
/**
|
|
1451
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
1452
|
+
* conform to other constraints. `example` values will not impact validation
|
|
1453
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
1454
|
+
*
|
|
1455
|
+
* ```proto
|
|
1456
|
+
* message MySFixed64 {
|
|
1457
|
+
* sfixed64 value = 1 [
|
|
1458
|
+
* (buf.validate.field).sfixed64.example = 1,
|
|
1459
|
+
* (buf.validate.field).sfixed64.example = 2
|
|
1460
|
+
* ];
|
|
1461
|
+
* }
|
|
1462
|
+
* ```
|
|
1463
|
+
*
|
|
1464
|
+
*/
|
|
1465
|
+
example: Long[];
|
|
1466
|
+
lessThan?: {
|
|
1467
|
+
$case: "lt";
|
|
1468
|
+
lt: Long;
|
|
1469
|
+
} | {
|
|
1470
|
+
$case: "lte";
|
|
1471
|
+
lte: Long;
|
|
1472
|
+
} | undefined;
|
|
1473
|
+
greaterThan?: {
|
|
1474
|
+
$case: "gt";
|
|
1475
|
+
gt: Long;
|
|
1476
|
+
} | {
|
|
1477
|
+
$case: "gte";
|
|
1478
|
+
gte: Long;
|
|
1479
|
+
} | undefined;
|
|
1480
|
+
}
|
|
1481
|
+
export declare const SFixed64Rules: MessageFns<SFixed64Rules, "buf.validate.SFixed64Rules">;
|
|
1482
|
+
/**
|
|
1483
|
+
* BoolRules describes the constraints applied to `bool` values. These rules
|
|
1484
|
+
* may also be applied to the `google.protobuf.BoolValue` Well-Known-Type.
|
|
1485
|
+
*
|
|
1486
|
+
*/
|
|
1487
|
+
export interface BoolRules {
|
|
1488
|
+
$type: "buf.validate.BoolRules";
|
|
1489
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
1490
|
+
[customJson]?: () => unknown;
|
|
1491
|
+
/**
|
|
1492
|
+
* `const` requires the field value to exactly match the specified boolean value.
|
|
1493
|
+
* If the field value doesn't match, an error message is generated.
|
|
1494
|
+
*
|
|
1495
|
+
* ```proto
|
|
1496
|
+
* message MyBool {
|
|
1497
|
+
* // value must equal true
|
|
1498
|
+
* bool value = 1 [(buf.validate.field).bool.const = true];
|
|
1499
|
+
* }
|
|
1500
|
+
* ```
|
|
1501
|
+
*
|
|
1502
|
+
*/
|
|
1503
|
+
const?: boolean | undefined;
|
|
1504
|
+
/**
|
|
1505
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
1506
|
+
* conform to other constraints. `example` values will not impact validation
|
|
1507
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
1508
|
+
*
|
|
1509
|
+
* ```proto
|
|
1510
|
+
* message MyBool {
|
|
1511
|
+
* bool value = 1 [
|
|
1512
|
+
* (buf.validate.field).bool.example = 1,
|
|
1513
|
+
* (buf.validate.field).bool.example = 2
|
|
1514
|
+
* ];
|
|
1515
|
+
* }
|
|
1516
|
+
* ```
|
|
1517
|
+
*
|
|
1518
|
+
*/
|
|
1519
|
+
example: boolean[];
|
|
1520
|
+
}
|
|
1521
|
+
export declare const BoolRules: MessageFns<BoolRules, "buf.validate.BoolRules">;
|
|
1522
|
+
/**
|
|
1523
|
+
* StringRules describes the constraints applied to `string` values These
|
|
1524
|
+
* rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type.
|
|
1525
|
+
*
|
|
1526
|
+
*/
|
|
1527
|
+
export interface StringRules {
|
|
1528
|
+
$type: "buf.validate.StringRules";
|
|
1529
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
1530
|
+
[customJson]?: () => unknown;
|
|
1531
|
+
/**
|
|
1532
|
+
* `const` requires the field value to exactly match the specified value. If
|
|
1533
|
+
* the field value doesn't match, an error message is generated.
|
|
1534
|
+
*
|
|
1535
|
+
* ```proto
|
|
1536
|
+
* message MyString {
|
|
1537
|
+
* // value must equal `hello`
|
|
1538
|
+
* string value = 1 [(buf.validate.field).string.const = "hello"];
|
|
1539
|
+
* }
|
|
1540
|
+
* ```
|
|
1541
|
+
*
|
|
1542
|
+
*/
|
|
1543
|
+
const?: string | undefined;
|
|
1544
|
+
/**
|
|
1545
|
+
* `len` dictates that the field value must have the specified
|
|
1546
|
+
* number of characters (Unicode code points), which may differ from the number
|
|
1547
|
+
* of bytes in the string. If the field value does not meet the specified
|
|
1548
|
+
* length, an error message will be generated.
|
|
1549
|
+
*
|
|
1550
|
+
* ```proto
|
|
1551
|
+
* message MyString {
|
|
1552
|
+
* // value length must be 5 characters
|
|
1553
|
+
* string value = 1 [(buf.validate.field).string.len = 5];
|
|
1554
|
+
* }
|
|
1555
|
+
* ```
|
|
1556
|
+
*
|
|
1557
|
+
*/
|
|
1558
|
+
len?: Long | undefined;
|
|
1559
|
+
/**
|
|
1560
|
+
* `min_len` specifies that the field value must have at least the specified
|
|
1561
|
+
* number of characters (Unicode code points), which may differ from the number
|
|
1562
|
+
* of bytes in the string. If the field value contains fewer characters, an error
|
|
1563
|
+
* message will be generated.
|
|
1564
|
+
*
|
|
1565
|
+
* ```proto
|
|
1566
|
+
* message MyString {
|
|
1567
|
+
* // value length must be at least 3 characters
|
|
1568
|
+
* string value = 1 [(buf.validate.field).string.min_len = 3];
|
|
1569
|
+
* }
|
|
1570
|
+
* ```
|
|
1571
|
+
*
|
|
1572
|
+
*/
|
|
1573
|
+
minLen?: Long | undefined;
|
|
1574
|
+
/**
|
|
1575
|
+
* `max_len` specifies that the field value must have no more than the specified
|
|
1576
|
+
* number of characters (Unicode code points), which may differ from the
|
|
1577
|
+
* number of bytes in the string. If the field value contains more characters,
|
|
1578
|
+
* an error message will be generated.
|
|
1579
|
+
*
|
|
1580
|
+
* ```proto
|
|
1581
|
+
* message MyString {
|
|
1582
|
+
* // value length must be at most 10 characters
|
|
1583
|
+
* string value = 1 [(buf.validate.field).string.max_len = 10];
|
|
1584
|
+
* }
|
|
1585
|
+
* ```
|
|
1586
|
+
*
|
|
1587
|
+
*/
|
|
1588
|
+
maxLen?: Long | undefined;
|
|
1589
|
+
/**
|
|
1590
|
+
* `len_bytes` dictates that the field value must have the specified number of
|
|
1591
|
+
* bytes. If the field value does not match the specified length in bytes,
|
|
1592
|
+
* an error message will be generated.
|
|
1593
|
+
*
|
|
1594
|
+
* ```proto
|
|
1595
|
+
* message MyString {
|
|
1596
|
+
* // value length must be 6 bytes
|
|
1597
|
+
* string value = 1 [(buf.validate.field).string.len_bytes = 6];
|
|
1598
|
+
* }
|
|
1599
|
+
* ```
|
|
1600
|
+
*
|
|
1601
|
+
*/
|
|
1602
|
+
lenBytes?: Long | undefined;
|
|
1603
|
+
/**
|
|
1604
|
+
* `min_bytes` specifies that the field value must have at least the specified
|
|
1605
|
+
* number of bytes. If the field value contains fewer bytes, an error message
|
|
1606
|
+
* will be generated.
|
|
1607
|
+
*
|
|
1608
|
+
* ```proto
|
|
1609
|
+
* message MyString {
|
|
1610
|
+
* // value length must be at least 4 bytes
|
|
1611
|
+
* string value = 1 [(buf.validate.field).string.min_bytes = 4];
|
|
1612
|
+
* }
|
|
1613
|
+
*
|
|
1614
|
+
* ```
|
|
1615
|
+
*
|
|
1616
|
+
*/
|
|
1617
|
+
minBytes?: Long | undefined;
|
|
1618
|
+
/**
|
|
1619
|
+
* `max_bytes` specifies that the field value must have no more than the
|
|
1620
|
+
* specified number of bytes. If the field value contains more bytes, an
|
|
1621
|
+
* error message will be generated.
|
|
1622
|
+
*
|
|
1623
|
+
* ```proto
|
|
1624
|
+
* message MyString {
|
|
1625
|
+
* // value length must be at most 8 bytes
|
|
1626
|
+
* string value = 1 [(buf.validate.field).string.max_bytes = 8];
|
|
1627
|
+
* }
|
|
1628
|
+
* ```
|
|
1629
|
+
*
|
|
1630
|
+
*/
|
|
1631
|
+
maxBytes?: Long | undefined;
|
|
1632
|
+
/**
|
|
1633
|
+
* `pattern` specifies that the field value must match the specified
|
|
1634
|
+
* regular expression (RE2 syntax), with the expression provided without any
|
|
1635
|
+
* delimiters. If the field value doesn't match the regular expression, an
|
|
1636
|
+
* error message will be generated.
|
|
1637
|
+
*
|
|
1638
|
+
* ```proto
|
|
1639
|
+
* message MyString {
|
|
1640
|
+
* // value does not match regex pattern `^[a-zA-Z]//$`
|
|
1641
|
+
* string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
|
|
1642
|
+
* }
|
|
1643
|
+
* ```
|
|
1644
|
+
*
|
|
1645
|
+
*/
|
|
1646
|
+
pattern?: string | undefined;
|
|
1647
|
+
/**
|
|
1648
|
+
* `prefix` specifies that the field value must have the
|
|
1649
|
+
* specified substring at the beginning of the string. If the field value
|
|
1650
|
+
* doesn't start with the specified prefix, an error message will be
|
|
1651
|
+
* generated.
|
|
1652
|
+
*
|
|
1653
|
+
* ```proto
|
|
1654
|
+
* message MyString {
|
|
1655
|
+
* // value does not have prefix `pre`
|
|
1656
|
+
* string value = 1 [(buf.validate.field).string.prefix = "pre"];
|
|
1657
|
+
* }
|
|
1658
|
+
* ```
|
|
1659
|
+
*
|
|
1660
|
+
*/
|
|
1661
|
+
prefix?: string | undefined;
|
|
1662
|
+
/**
|
|
1663
|
+
* `suffix` specifies that the field value must have the
|
|
1664
|
+
* specified substring at the end of the string. If the field value doesn't
|
|
1665
|
+
* end with the specified suffix, an error message will be generated.
|
|
1666
|
+
*
|
|
1667
|
+
* ```proto
|
|
1668
|
+
* message MyString {
|
|
1669
|
+
* // value does not have suffix `post`
|
|
1670
|
+
* string value = 1 [(buf.validate.field).string.suffix = "post"];
|
|
1671
|
+
* }
|
|
1672
|
+
* ```
|
|
1673
|
+
*
|
|
1674
|
+
*/
|
|
1675
|
+
suffix?: string | undefined;
|
|
1676
|
+
/**
|
|
1677
|
+
* `contains` specifies that the field value must have the
|
|
1678
|
+
* specified substring anywhere in the string. If the field value doesn't
|
|
1679
|
+
* contain the specified substring, an error message will be generated.
|
|
1680
|
+
*
|
|
1681
|
+
* ```proto
|
|
1682
|
+
* message MyString {
|
|
1683
|
+
* // value does not contain substring `inside`.
|
|
1684
|
+
* string value = 1 [(buf.validate.field).string.contains = "inside"];
|
|
1685
|
+
* }
|
|
1686
|
+
* ```
|
|
1687
|
+
*
|
|
1688
|
+
*/
|
|
1689
|
+
contains?: string | undefined;
|
|
1690
|
+
/**
|
|
1691
|
+
* `not_contains` specifies that the field value must not have the
|
|
1692
|
+
* specified substring anywhere in the string. If the field value contains
|
|
1693
|
+
* the specified substring, an error message will be generated.
|
|
1694
|
+
*
|
|
1695
|
+
* ```proto
|
|
1696
|
+
* message MyString {
|
|
1697
|
+
* // value contains substring `inside`.
|
|
1698
|
+
* string value = 1 [(buf.validate.field).string.not_contains = "inside"];
|
|
1699
|
+
* }
|
|
1700
|
+
* ```
|
|
1701
|
+
*
|
|
1702
|
+
*/
|
|
1703
|
+
notContains?: string | undefined;
|
|
1704
|
+
/**
|
|
1705
|
+
* `in` specifies that the field value must be equal to one of the specified
|
|
1706
|
+
* values. If the field value isn't one of the specified values, an error
|
|
1707
|
+
* message will be generated.
|
|
1708
|
+
*
|
|
1709
|
+
* ```proto
|
|
1710
|
+
* message MyString {
|
|
1711
|
+
* // value must be in list ["apple", "banana"]
|
|
1712
|
+
* repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
|
|
1713
|
+
* }
|
|
1714
|
+
* ```
|
|
1715
|
+
*
|
|
1716
|
+
*/
|
|
1717
|
+
in: string[];
|
|
1718
|
+
/**
|
|
1719
|
+
* `not_in` specifies that the field value cannot be equal to any
|
|
1720
|
+
* of the specified values. If the field value is one of the specified values,
|
|
1721
|
+
* an error message will be generated.
|
|
1722
|
+
* ```proto
|
|
1723
|
+
* message MyString {
|
|
1724
|
+
* // value must not be in list ["orange", "grape"]
|
|
1725
|
+
* repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
|
|
1726
|
+
* }
|
|
1727
|
+
* ```
|
|
1728
|
+
*
|
|
1729
|
+
*/
|
|
1730
|
+
notIn: string[];
|
|
1731
|
+
/**
|
|
1732
|
+
* This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
|
|
1733
|
+
* enable strict header validation. By default, this is true, and HTTP header
|
|
1734
|
+
* validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser
|
|
1735
|
+
* validations that only disallow `\r\n\0` characters, which can be used to
|
|
1736
|
+
* bypass header matching rules.
|
|
1737
|
+
*
|
|
1738
|
+
* ```proto
|
|
1739
|
+
* message MyString {
|
|
1740
|
+
* // The field `value` must have be a valid HTTP headers, but not enforced with strict rules.
|
|
1741
|
+
* string value = 1 [(buf.validate.field).string.strict = false];
|
|
1742
|
+
* }
|
|
1743
|
+
* ```
|
|
1744
|
+
*
|
|
1745
|
+
*/
|
|
1746
|
+
strict?: boolean | undefined;
|
|
1747
|
+
/**
|
|
1748
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
1749
|
+
* conform to other constraints. `example` values will not impact validation
|
|
1750
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
1751
|
+
*
|
|
1752
|
+
* ```proto
|
|
1753
|
+
* message MyString {
|
|
1754
|
+
* string value = 1 [
|
|
1755
|
+
* (buf.validate.field).string.example = "hello",
|
|
1756
|
+
* (buf.validate.field).string.example = "world"
|
|
1757
|
+
* ];
|
|
1758
|
+
* }
|
|
1759
|
+
* ```
|
|
1760
|
+
*
|
|
1761
|
+
*/
|
|
1762
|
+
example: string[];
|
|
1763
|
+
/**
|
|
1764
|
+
* `WellKnown` rules provide advanced constraints against common string
|
|
1765
|
+
* patterns
|
|
1766
|
+
*
|
|
1767
|
+
*/
|
|
1768
|
+
wellKnown?: {
|
|
1769
|
+
$case: "email";
|
|
1770
|
+
email: boolean;
|
|
1771
|
+
} | {
|
|
1772
|
+
$case: "hostname";
|
|
1773
|
+
hostname: boolean;
|
|
1774
|
+
} | {
|
|
1775
|
+
$case: "ip";
|
|
1776
|
+
ip: boolean;
|
|
1777
|
+
} | {
|
|
1778
|
+
$case: "ipv4";
|
|
1779
|
+
ipv4: boolean;
|
|
1780
|
+
} | {
|
|
1781
|
+
$case: "ipv6";
|
|
1782
|
+
ipv6: boolean;
|
|
1783
|
+
} | {
|
|
1784
|
+
$case: "uri";
|
|
1785
|
+
uri: boolean;
|
|
1786
|
+
} | {
|
|
1787
|
+
$case: "uriRef";
|
|
1788
|
+
uriRef: boolean;
|
|
1789
|
+
} | {
|
|
1790
|
+
$case: "address";
|
|
1791
|
+
address: boolean;
|
|
1792
|
+
} | {
|
|
1793
|
+
$case: "uuid";
|
|
1794
|
+
uuid: boolean;
|
|
1795
|
+
} | {
|
|
1796
|
+
$case: "tuuid";
|
|
1797
|
+
tuuid: boolean;
|
|
1798
|
+
} | {
|
|
1799
|
+
$case: "ipWithPrefixlen";
|
|
1800
|
+
ipWithPrefixlen: boolean;
|
|
1801
|
+
} | {
|
|
1802
|
+
$case: "ipv4WithPrefixlen";
|
|
1803
|
+
ipv4WithPrefixlen: boolean;
|
|
1804
|
+
} | {
|
|
1805
|
+
$case: "ipv6WithPrefixlen";
|
|
1806
|
+
ipv6WithPrefixlen: boolean;
|
|
1807
|
+
} | {
|
|
1808
|
+
$case: "ipPrefix";
|
|
1809
|
+
ipPrefix: boolean;
|
|
1810
|
+
} | {
|
|
1811
|
+
$case: "ipv4Prefix";
|
|
1812
|
+
ipv4Prefix: boolean;
|
|
1813
|
+
} | {
|
|
1814
|
+
$case: "ipv6Prefix";
|
|
1815
|
+
ipv6Prefix: boolean;
|
|
1816
|
+
} | {
|
|
1817
|
+
$case: "hostAndPort";
|
|
1818
|
+
hostAndPort: boolean;
|
|
1819
|
+
} | {
|
|
1820
|
+
$case: "wellKnownRegex";
|
|
1821
|
+
wellKnownRegex: KnownRegex;
|
|
1822
|
+
} | undefined;
|
|
1823
|
+
}
|
|
1824
|
+
export declare const StringRules: MessageFns<StringRules, "buf.validate.StringRules">;
|
|
1825
|
+
/**
|
|
1826
|
+
* BytesRules describe the constraints applied to `bytes` values. These rules
|
|
1827
|
+
* may also be applied to the `google.protobuf.BytesValue` Well-Known-Type.
|
|
1828
|
+
*
|
|
1829
|
+
*/
|
|
1830
|
+
export interface BytesRules {
|
|
1831
|
+
$type: "buf.validate.BytesRules";
|
|
1832
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
1833
|
+
[customJson]?: () => unknown;
|
|
1834
|
+
/**
|
|
1835
|
+
* `const` requires the field value to exactly match the specified bytes
|
|
1836
|
+
* value. If the field value doesn't match, an error message is generated.
|
|
1837
|
+
*
|
|
1838
|
+
* ```proto
|
|
1839
|
+
* message MyBytes {
|
|
1840
|
+
* // value must be "\x01\x02\x03\x04"
|
|
1841
|
+
* bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"];
|
|
1842
|
+
* }
|
|
1843
|
+
* ```
|
|
1844
|
+
*
|
|
1845
|
+
*/
|
|
1846
|
+
const?: Uint8Array | undefined;
|
|
1847
|
+
/**
|
|
1848
|
+
* `len` requires the field value to have the specified length in bytes.
|
|
1849
|
+
* If the field value doesn't match, an error message is generated.
|
|
1850
|
+
*
|
|
1851
|
+
* ```proto
|
|
1852
|
+
* message MyBytes {
|
|
1853
|
+
* // value length must be 4 bytes.
|
|
1854
|
+
* optional bytes value = 1 [(buf.validate.field).bytes.len = 4];
|
|
1855
|
+
* }
|
|
1856
|
+
* ```
|
|
1857
|
+
*
|
|
1858
|
+
*/
|
|
1859
|
+
len?: Long | undefined;
|
|
1860
|
+
/**
|
|
1861
|
+
* `min_len` requires the field value to have at least the specified minimum
|
|
1862
|
+
* length in bytes.
|
|
1863
|
+
* If the field value doesn't meet the requirement, an error message is generated.
|
|
1864
|
+
*
|
|
1865
|
+
* ```proto
|
|
1866
|
+
* message MyBytes {
|
|
1867
|
+
* // value length must be at least 2 bytes.
|
|
1868
|
+
* optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2];
|
|
1869
|
+
* }
|
|
1870
|
+
* ```
|
|
1871
|
+
*
|
|
1872
|
+
*/
|
|
1873
|
+
minLen?: Long | undefined;
|
|
1874
|
+
/**
|
|
1875
|
+
* `max_len` requires the field value to have at most the specified maximum
|
|
1876
|
+
* length in bytes.
|
|
1877
|
+
* If the field value exceeds the requirement, an error message is generated.
|
|
1878
|
+
*
|
|
1879
|
+
* ```proto
|
|
1880
|
+
* message MyBytes {
|
|
1881
|
+
* // value must be at most 6 bytes.
|
|
1882
|
+
* optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6];
|
|
1883
|
+
* }
|
|
1884
|
+
* ```
|
|
1885
|
+
*
|
|
1886
|
+
*/
|
|
1887
|
+
maxLen?: Long | undefined;
|
|
1888
|
+
/**
|
|
1889
|
+
* `pattern` requires the field value to match the specified regular
|
|
1890
|
+
* expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
|
|
1891
|
+
* The value of the field must be valid UTF-8 or validation will fail with a
|
|
1892
|
+
* runtime error.
|
|
1893
|
+
* If the field value doesn't match the pattern, an error message is generated.
|
|
1894
|
+
*
|
|
1895
|
+
* ```proto
|
|
1896
|
+
* message MyBytes {
|
|
1897
|
+
* // value must match regex pattern "^[a-zA-Z0-9]+$".
|
|
1898
|
+
* optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
|
|
1899
|
+
* }
|
|
1900
|
+
* ```
|
|
1901
|
+
*
|
|
1902
|
+
*/
|
|
1903
|
+
pattern?: string | undefined;
|
|
1904
|
+
/**
|
|
1905
|
+
* `prefix` requires the field value to have the specified bytes at the
|
|
1906
|
+
* beginning of the string.
|
|
1907
|
+
* If the field value doesn't meet the requirement, an error message is generated.
|
|
1908
|
+
*
|
|
1909
|
+
* ```proto
|
|
1910
|
+
* message MyBytes {
|
|
1911
|
+
* // value does not have prefix \x01\x02
|
|
1912
|
+
* optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"];
|
|
1913
|
+
* }
|
|
1914
|
+
* ```
|
|
1915
|
+
*
|
|
1916
|
+
*/
|
|
1917
|
+
prefix?: Uint8Array | undefined;
|
|
1918
|
+
/**
|
|
1919
|
+
* `suffix` requires the field value to have the specified bytes at the end
|
|
1920
|
+
* of the string.
|
|
1921
|
+
* If the field value doesn't meet the requirement, an error message is generated.
|
|
1922
|
+
*
|
|
1923
|
+
* ```proto
|
|
1924
|
+
* message MyBytes {
|
|
1925
|
+
* // value does not have suffix \x03\x04
|
|
1926
|
+
* optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"];
|
|
1927
|
+
* }
|
|
1928
|
+
* ```
|
|
1929
|
+
*
|
|
1930
|
+
*/
|
|
1931
|
+
suffix?: Uint8Array | undefined;
|
|
1932
|
+
/**
|
|
1933
|
+
* `contains` requires the field value to have the specified bytes anywhere in
|
|
1934
|
+
* the string.
|
|
1935
|
+
* If the field value doesn't meet the requirement, an error message is generated.
|
|
1936
|
+
*
|
|
1937
|
+
* ```protobuf
|
|
1938
|
+
* message MyBytes {
|
|
1939
|
+
* // value does not contain \x02\x03
|
|
1940
|
+
* optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
|
|
1941
|
+
* }
|
|
1942
|
+
* ```
|
|
1943
|
+
*
|
|
1944
|
+
*/
|
|
1945
|
+
contains?: Uint8Array | undefined;
|
|
1946
|
+
/**
|
|
1947
|
+
* `in` requires the field value to be equal to one of the specified
|
|
1948
|
+
* values. If the field value doesn't match any of the specified values, an
|
|
1949
|
+
* error message is generated.
|
|
1950
|
+
*
|
|
1951
|
+
* ```protobuf
|
|
1952
|
+
* message MyBytes {
|
|
1953
|
+
* // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
|
|
1954
|
+
* optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
|
|
1955
|
+
* }
|
|
1956
|
+
* ```
|
|
1957
|
+
*
|
|
1958
|
+
*/
|
|
1959
|
+
in: Uint8Array[];
|
|
1960
|
+
/**
|
|
1961
|
+
* `not_in` requires the field value to be not equal to any of the specified
|
|
1962
|
+
* values.
|
|
1963
|
+
* If the field value matches any of the specified values, an error message is
|
|
1964
|
+
* generated.
|
|
1965
|
+
*
|
|
1966
|
+
* ```proto
|
|
1967
|
+
* message MyBytes {
|
|
1968
|
+
* // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
|
|
1969
|
+
* optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
|
|
1970
|
+
* }
|
|
1971
|
+
* ```
|
|
1972
|
+
*
|
|
1973
|
+
*/
|
|
1974
|
+
notIn: Uint8Array[];
|
|
1975
|
+
/**
|
|
1976
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
1977
|
+
* conform to other constraints. `example` values will not impact validation
|
|
1978
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
1979
|
+
*
|
|
1980
|
+
* ```proto
|
|
1981
|
+
* message MyBytes {
|
|
1982
|
+
* bytes value = 1 [
|
|
1983
|
+
* (buf.validate.field).bytes.example = "\x01\x02",
|
|
1984
|
+
* (buf.validate.field).bytes.example = "\x02\x03"
|
|
1985
|
+
* ];
|
|
1986
|
+
* }
|
|
1987
|
+
* ```
|
|
1988
|
+
*
|
|
1989
|
+
*/
|
|
1990
|
+
example: Uint8Array[];
|
|
1991
|
+
/**
|
|
1992
|
+
* WellKnown rules provide advanced constraints against common byte
|
|
1993
|
+
* patterns
|
|
1994
|
+
*
|
|
1995
|
+
*/
|
|
1996
|
+
wellKnown?: {
|
|
1997
|
+
$case: "ip";
|
|
1998
|
+
ip: boolean;
|
|
1999
|
+
} | {
|
|
2000
|
+
$case: "ipv4";
|
|
2001
|
+
ipv4: boolean;
|
|
2002
|
+
} | {
|
|
2003
|
+
$case: "ipv6";
|
|
2004
|
+
ipv6: boolean;
|
|
2005
|
+
} | undefined;
|
|
2006
|
+
}
|
|
2007
|
+
export declare const BytesRules: MessageFns<BytesRules, "buf.validate.BytesRules">;
|
|
2008
|
+
/**
|
|
2009
|
+
* EnumRules describe the constraints applied to `enum` values.
|
|
2010
|
+
*
|
|
2011
|
+
*/
|
|
2012
|
+
export interface EnumRules {
|
|
2013
|
+
$type: "buf.validate.EnumRules";
|
|
2014
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
2015
|
+
[customJson]?: () => unknown;
|
|
2016
|
+
/**
|
|
2017
|
+
* `const` requires the field value to exactly match the specified enum value.
|
|
2018
|
+
* If the field value doesn't match, an error message is generated.
|
|
2019
|
+
*
|
|
2020
|
+
* ```proto
|
|
2021
|
+
* enum MyEnum {
|
|
2022
|
+
* MY_ENUM_UNSPECIFIED = 0;
|
|
2023
|
+
* MY_ENUM_VALUE1 = 1;
|
|
2024
|
+
* MY_ENUM_VALUE2 = 2;
|
|
2025
|
+
* }
|
|
2026
|
+
*
|
|
2027
|
+
* message MyMessage {
|
|
2028
|
+
* // The field `value` must be exactly MY_ENUM_VALUE1.
|
|
2029
|
+
* MyEnum value = 1 [(buf.validate.field).enum.const = 1];
|
|
2030
|
+
* }
|
|
2031
|
+
* ```
|
|
2032
|
+
*
|
|
2033
|
+
*/
|
|
2034
|
+
const?: number | undefined;
|
|
2035
|
+
/**
|
|
2036
|
+
* `defined_only` requires the field value to be one of the defined values for
|
|
2037
|
+
* this enum, failing on any undefined value.
|
|
2038
|
+
*
|
|
2039
|
+
* ```proto
|
|
2040
|
+
* enum MyEnum {
|
|
2041
|
+
* MY_ENUM_UNSPECIFIED = 0;
|
|
2042
|
+
* MY_ENUM_VALUE1 = 1;
|
|
2043
|
+
* MY_ENUM_VALUE2 = 2;
|
|
2044
|
+
* }
|
|
2045
|
+
*
|
|
2046
|
+
* message MyMessage {
|
|
2047
|
+
* // The field `value` must be a defined value of MyEnum.
|
|
2048
|
+
* MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
|
|
2049
|
+
* }
|
|
2050
|
+
* ```
|
|
2051
|
+
*
|
|
2052
|
+
*/
|
|
2053
|
+
definedOnly?: boolean | undefined;
|
|
2054
|
+
/**
|
|
2055
|
+
* `in` requires the field value to be equal to one of the
|
|
2056
|
+
* specified enum values. If the field value doesn't match any of the
|
|
2057
|
+
* specified values, an error message is generated.
|
|
2058
|
+
*
|
|
2059
|
+
* ```proto
|
|
2060
|
+
* enum MyEnum {
|
|
2061
|
+
* MY_ENUM_UNSPECIFIED = 0;
|
|
2062
|
+
* MY_ENUM_VALUE1 = 1;
|
|
2063
|
+
* MY_ENUM_VALUE2 = 2;
|
|
2064
|
+
* }
|
|
2065
|
+
*
|
|
2066
|
+
* message MyMessage {
|
|
2067
|
+
* // The field `value` must be equal to one of the specified values.
|
|
2068
|
+
* MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
|
|
2069
|
+
* }
|
|
2070
|
+
* ```
|
|
2071
|
+
*
|
|
2072
|
+
*/
|
|
2073
|
+
in: number[];
|
|
2074
|
+
/**
|
|
2075
|
+
* `not_in` requires the field value to be not equal to any of the
|
|
2076
|
+
* specified enum values. If the field value matches one of the specified
|
|
2077
|
+
* values, an error message is generated.
|
|
2078
|
+
*
|
|
2079
|
+
* ```proto
|
|
2080
|
+
* enum MyEnum {
|
|
2081
|
+
* MY_ENUM_UNSPECIFIED = 0;
|
|
2082
|
+
* MY_ENUM_VALUE1 = 1;
|
|
2083
|
+
* MY_ENUM_VALUE2 = 2;
|
|
2084
|
+
* }
|
|
2085
|
+
*
|
|
2086
|
+
* message MyMessage {
|
|
2087
|
+
* // The field `value` must not be equal to any of the specified values.
|
|
2088
|
+
* MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
|
|
2089
|
+
* }
|
|
2090
|
+
* ```
|
|
2091
|
+
*
|
|
2092
|
+
*/
|
|
2093
|
+
notIn: number[];
|
|
2094
|
+
/**
|
|
2095
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
2096
|
+
* conform to other constraints. `example` values will not impact validation
|
|
2097
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
2098
|
+
*
|
|
2099
|
+
* ```proto
|
|
2100
|
+
* enum MyEnum {
|
|
2101
|
+
* MY_ENUM_UNSPECIFIED = 0;
|
|
2102
|
+
* MY_ENUM_VALUE1 = 1;
|
|
2103
|
+
* MY_ENUM_VALUE2 = 2;
|
|
2104
|
+
* }
|
|
2105
|
+
*
|
|
2106
|
+
* message MyMessage {
|
|
2107
|
+
* (buf.validate.field).enum.example = 1,
|
|
2108
|
+
* (buf.validate.field).enum.example = 2
|
|
2109
|
+
* }
|
|
2110
|
+
* ```
|
|
2111
|
+
*
|
|
2112
|
+
*/
|
|
2113
|
+
example: number[];
|
|
2114
|
+
}
|
|
2115
|
+
export declare const EnumRules: MessageFns<EnumRules, "buf.validate.EnumRules">;
|
|
2116
|
+
/**
|
|
2117
|
+
* RepeatedRules describe the constraints applied to `repeated` values.
|
|
2118
|
+
*
|
|
2119
|
+
*/
|
|
2120
|
+
export interface RepeatedRules {
|
|
2121
|
+
$type: "buf.validate.RepeatedRules";
|
|
2122
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
2123
|
+
[customJson]?: () => unknown;
|
|
2124
|
+
/**
|
|
2125
|
+
* `min_items` requires that this field must contain at least the specified
|
|
2126
|
+
* minimum number of items.
|
|
2127
|
+
*
|
|
2128
|
+
* Note that `min_items = 1` is equivalent to setting a field as `required`.
|
|
2129
|
+
*
|
|
2130
|
+
* ```proto
|
|
2131
|
+
* message MyRepeated {
|
|
2132
|
+
* // value must contain at least 2 items
|
|
2133
|
+
* repeated string value = 1 [(buf.validate.field).repeated.min_items = 2];
|
|
2134
|
+
* }
|
|
2135
|
+
* ```
|
|
2136
|
+
*
|
|
2137
|
+
*/
|
|
2138
|
+
minItems?: Long | undefined;
|
|
2139
|
+
/**
|
|
2140
|
+
* `max_items` denotes that this field must not exceed a
|
|
2141
|
+
* certain number of items as the upper limit. If the field contains more
|
|
2142
|
+
* items than specified, an error message will be generated, requiring the
|
|
2143
|
+
* field to maintain no more than the specified number of items.
|
|
2144
|
+
*
|
|
2145
|
+
* ```proto
|
|
2146
|
+
* message MyRepeated {
|
|
2147
|
+
* // value must contain no more than 3 item(s)
|
|
2148
|
+
* repeated string value = 1 [(buf.validate.field).repeated.max_items = 3];
|
|
2149
|
+
* }
|
|
2150
|
+
* ```
|
|
2151
|
+
*
|
|
2152
|
+
*/
|
|
2153
|
+
maxItems?: Long | undefined;
|
|
2154
|
+
/**
|
|
2155
|
+
* `unique` indicates that all elements in this field must
|
|
2156
|
+
* be unique. This constraint is strictly applicable to scalar and enum
|
|
2157
|
+
* types, with message types not being supported.
|
|
2158
|
+
*
|
|
2159
|
+
* ```proto
|
|
2160
|
+
* message MyRepeated {
|
|
2161
|
+
* // repeated value must contain unique items
|
|
2162
|
+
* repeated string value = 1 [(buf.validate.field).repeated.unique = true];
|
|
2163
|
+
* }
|
|
2164
|
+
* ```
|
|
2165
|
+
*
|
|
2166
|
+
*/
|
|
2167
|
+
unique?: boolean | undefined;
|
|
2168
|
+
/**
|
|
2169
|
+
* `items` details the constraints to be applied to each item
|
|
2170
|
+
* in the field. Even for repeated message fields, validation is executed
|
|
2171
|
+
* against each item unless skip is explicitly specified.
|
|
2172
|
+
*
|
|
2173
|
+
* ```proto
|
|
2174
|
+
* message MyRepeated {
|
|
2175
|
+
* // The items in the field `value` must follow the specified constraints.
|
|
2176
|
+
* repeated string value = 1 [(buf.validate.field).repeated.items = {
|
|
2177
|
+
* string: {
|
|
2178
|
+
* min_len: 3
|
|
2179
|
+
* max_len: 10
|
|
2180
|
+
* }
|
|
2181
|
+
* }];
|
|
2182
|
+
* }
|
|
2183
|
+
* ```
|
|
2184
|
+
*
|
|
2185
|
+
*/
|
|
2186
|
+
items?: FieldConstraints | undefined;
|
|
2187
|
+
}
|
|
2188
|
+
export declare const RepeatedRules: MessageFns<RepeatedRules, "buf.validate.RepeatedRules">;
|
|
2189
|
+
/**
|
|
2190
|
+
* MapRules describe the constraints applied to `map` values.
|
|
2191
|
+
*
|
|
2192
|
+
*/
|
|
2193
|
+
export interface MapRules {
|
|
2194
|
+
$type: "buf.validate.MapRules";
|
|
2195
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
2196
|
+
[customJson]?: () => unknown;
|
|
2197
|
+
/**
|
|
2198
|
+
* Specifies the minimum number of key-value pairs allowed. If the field has
|
|
2199
|
+
* fewer key-value pairs than specified, an error message is generated.
|
|
2200
|
+
*
|
|
2201
|
+
* ```proto
|
|
2202
|
+
* message MyMap {
|
|
2203
|
+
* // The field `value` must have at least 2 key-value pairs.
|
|
2204
|
+
* map<string, string> value = 1 [(buf.validate.field).map.min_pairs = 2];
|
|
2205
|
+
* }
|
|
2206
|
+
* ```
|
|
2207
|
+
*
|
|
2208
|
+
*/
|
|
2209
|
+
minPairs?: Long | undefined;
|
|
2210
|
+
/**
|
|
2211
|
+
* Specifies the maximum number of key-value pairs allowed. If the field has
|
|
2212
|
+
* more key-value pairs than specified, an error message is generated.
|
|
2213
|
+
*
|
|
2214
|
+
* ```proto
|
|
2215
|
+
* message MyMap {
|
|
2216
|
+
* // The field `value` must have at most 3 key-value pairs.
|
|
2217
|
+
* map<string, string> value = 1 [(buf.validate.field).map.max_pairs = 3];
|
|
2218
|
+
* }
|
|
2219
|
+
* ```
|
|
2220
|
+
*
|
|
2221
|
+
*/
|
|
2222
|
+
maxPairs?: Long | undefined;
|
|
2223
|
+
/**
|
|
2224
|
+
* Specifies the constraints to be applied to each key in the field.
|
|
2225
|
+
*
|
|
2226
|
+
* ```proto
|
|
2227
|
+
* message MyMap {
|
|
2228
|
+
* // The keys in the field `value` must follow the specified constraints.
|
|
2229
|
+
* map<string, string> value = 1 [(buf.validate.field).map.keys = {
|
|
2230
|
+
* string: {
|
|
2231
|
+
* min_len: 3
|
|
2232
|
+
* max_len: 10
|
|
2233
|
+
* }
|
|
2234
|
+
* }];
|
|
2235
|
+
* }
|
|
2236
|
+
* ```
|
|
2237
|
+
*
|
|
2238
|
+
*/
|
|
2239
|
+
keys?: FieldConstraints | undefined;
|
|
2240
|
+
/**
|
|
2241
|
+
* Specifies the constraints to be applied to the value of each key in the
|
|
2242
|
+
* field. Message values will still have their validations evaluated unless
|
|
2243
|
+
* skip is specified here.
|
|
2244
|
+
*
|
|
2245
|
+
* ```proto
|
|
2246
|
+
* message MyMap {
|
|
2247
|
+
* // The values in the field `value` must follow the specified constraints.
|
|
2248
|
+
* map<string, string> value = 1 [(buf.validate.field).map.values = {
|
|
2249
|
+
* string: {
|
|
2250
|
+
* min_len: 5
|
|
2251
|
+
* max_len: 20
|
|
2252
|
+
* }
|
|
2253
|
+
* }];
|
|
2254
|
+
* }
|
|
2255
|
+
* ```
|
|
2256
|
+
*
|
|
2257
|
+
*/
|
|
2258
|
+
values?: FieldConstraints | undefined;
|
|
2259
|
+
}
|
|
2260
|
+
export declare const MapRules: MessageFns<MapRules, "buf.validate.MapRules">;
|
|
2261
|
+
/**
|
|
2262
|
+
* AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type.
|
|
2263
|
+
*
|
|
2264
|
+
*/
|
|
2265
|
+
export interface AnyRules {
|
|
2266
|
+
$type: "buf.validate.AnyRules";
|
|
2267
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
2268
|
+
[customJson]?: () => unknown;
|
|
2269
|
+
/**
|
|
2270
|
+
* `in` requires the field's `type_url` to be equal to one of the
|
|
2271
|
+
* specified values. If it doesn't match any of the specified values, an error
|
|
2272
|
+
* message is generated.
|
|
2273
|
+
*
|
|
2274
|
+
* ```proto
|
|
2275
|
+
* message MyAny {
|
|
2276
|
+
* // The `value` field must have a `type_url` equal to one of the specified values.
|
|
2277
|
+
* google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
|
|
2278
|
+
* }
|
|
2279
|
+
* ```
|
|
2280
|
+
*
|
|
2281
|
+
*/
|
|
2282
|
+
in: string[];
|
|
2283
|
+
/**
|
|
2284
|
+
* requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
|
|
2285
|
+
*
|
|
2286
|
+
* ```proto
|
|
2287
|
+
* message MyAny {
|
|
2288
|
+
* // The field `value` must not have a `type_url` equal to any of the specified values.
|
|
2289
|
+
* google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
|
|
2290
|
+
* }
|
|
2291
|
+
* ```
|
|
2292
|
+
*
|
|
2293
|
+
*/
|
|
2294
|
+
notIn: string[];
|
|
2295
|
+
}
|
|
2296
|
+
export declare const AnyRules: MessageFns<AnyRules, "buf.validate.AnyRules">;
|
|
2297
|
+
/**
|
|
2298
|
+
* DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type.
|
|
2299
|
+
*
|
|
2300
|
+
*/
|
|
2301
|
+
export interface DurationRules {
|
|
2302
|
+
$type: "buf.validate.DurationRules";
|
|
2303
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
2304
|
+
[customJson]?: () => unknown;
|
|
2305
|
+
/**
|
|
2306
|
+
* `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
|
|
2307
|
+
* If the field's value deviates from the specified value, an error message
|
|
2308
|
+
* will be generated.
|
|
2309
|
+
*
|
|
2310
|
+
* ```proto
|
|
2311
|
+
* message MyDuration {
|
|
2312
|
+
* // value must equal 5s
|
|
2313
|
+
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
|
|
2314
|
+
* }
|
|
2315
|
+
* ```
|
|
2316
|
+
*
|
|
2317
|
+
*/
|
|
2318
|
+
const?: Duration | undefined;
|
|
2319
|
+
/**
|
|
2320
|
+
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
|
|
2321
|
+
* If the field's value doesn't correspond to any of the specified values,
|
|
2322
|
+
* an error message will be generated.
|
|
2323
|
+
*
|
|
2324
|
+
* ```proto
|
|
2325
|
+
* message MyDuration {
|
|
2326
|
+
* // value must be in list [1s, 2s, 3s]
|
|
2327
|
+
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
|
|
2328
|
+
* }
|
|
2329
|
+
* ```
|
|
2330
|
+
*
|
|
2331
|
+
*/
|
|
2332
|
+
in: Duration[];
|
|
2333
|
+
/**
|
|
2334
|
+
* `not_in` denotes that the field must not be equal to
|
|
2335
|
+
* any of the specified values of the `google.protobuf.Duration` type.
|
|
2336
|
+
* If the field's value matches any of these values, an error message will be
|
|
2337
|
+
* generated.
|
|
2338
|
+
*
|
|
2339
|
+
* ```proto
|
|
2340
|
+
* message MyDuration {
|
|
2341
|
+
* // value must not be in list [1s, 2s, 3s]
|
|
2342
|
+
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
|
|
2343
|
+
* }
|
|
2344
|
+
* ```
|
|
2345
|
+
*
|
|
2346
|
+
*/
|
|
2347
|
+
notIn: Duration[];
|
|
2348
|
+
/**
|
|
2349
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
2350
|
+
* conform to other constraints. `example` values will not impact validation
|
|
2351
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
2352
|
+
*
|
|
2353
|
+
* ```proto
|
|
2354
|
+
* message MyDuration {
|
|
2355
|
+
* google.protobuf.Duration value = 1 [
|
|
2356
|
+
* (buf.validate.field).duration.example = { seconds: 1 },
|
|
2357
|
+
* (buf.validate.field).duration.example = { seconds: 2 },
|
|
2358
|
+
* ];
|
|
2359
|
+
* }
|
|
2360
|
+
* ```
|
|
2361
|
+
*
|
|
2362
|
+
*/
|
|
2363
|
+
example: Duration[];
|
|
2364
|
+
lessThan?: {
|
|
2365
|
+
$case: "lt";
|
|
2366
|
+
lt: Duration;
|
|
2367
|
+
} | {
|
|
2368
|
+
$case: "lte";
|
|
2369
|
+
lte: Duration;
|
|
2370
|
+
} | undefined;
|
|
2371
|
+
greaterThan?: {
|
|
2372
|
+
$case: "gt";
|
|
2373
|
+
gt: Duration;
|
|
2374
|
+
} | {
|
|
2375
|
+
$case: "gte";
|
|
2376
|
+
gte: Duration;
|
|
2377
|
+
} | undefined;
|
|
2378
|
+
}
|
|
2379
|
+
export declare const DurationRules: MessageFns<DurationRules, "buf.validate.DurationRules">;
|
|
2380
|
+
/**
|
|
2381
|
+
* TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type.
|
|
2382
|
+
*
|
|
2383
|
+
*/
|
|
2384
|
+
export interface TimestampRules {
|
|
2385
|
+
$type: "buf.validate.TimestampRules";
|
|
2386
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
2387
|
+
[customJson]?: () => unknown;
|
|
2388
|
+
/**
|
|
2389
|
+
* `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
|
|
2390
|
+
*
|
|
2391
|
+
* ```proto
|
|
2392
|
+
* message MyTimestamp {
|
|
2393
|
+
* // value must equal 2023-05-03T10:00:00Z
|
|
2394
|
+
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
|
|
2395
|
+
* }
|
|
2396
|
+
* ```
|
|
2397
|
+
*
|
|
2398
|
+
*/
|
|
2399
|
+
const?: Dayjs | undefined;
|
|
2400
|
+
/**
|
|
2401
|
+
* `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
|
|
2402
|
+
*
|
|
2403
|
+
* ```proto
|
|
2404
|
+
* message MyTimestamp {
|
|
2405
|
+
* // value must be within 1 hour of now
|
|
2406
|
+
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
|
|
2407
|
+
* }
|
|
2408
|
+
* ```
|
|
2409
|
+
*
|
|
2410
|
+
*/
|
|
2411
|
+
within?: Duration | undefined;
|
|
2412
|
+
/**
|
|
2413
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
2414
|
+
* conform to other constraints. `example` values will not impact validation
|
|
2415
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
2416
|
+
*
|
|
2417
|
+
* ```proto
|
|
2418
|
+
* message MyTimestamp {
|
|
2419
|
+
* google.protobuf.Timestamp value = 1 [
|
|
2420
|
+
* (buf.validate.field).timestamp.example = { seconds: 1672444800 },
|
|
2421
|
+
* (buf.validate.field).timestamp.example = { seconds: 1672531200 },
|
|
2422
|
+
* ];
|
|
2423
|
+
* }
|
|
2424
|
+
* ```
|
|
2425
|
+
*
|
|
2426
|
+
*/
|
|
2427
|
+
example: Dayjs[];
|
|
2428
|
+
lessThan?: {
|
|
2429
|
+
$case: "lt";
|
|
2430
|
+
lt: Dayjs;
|
|
2431
|
+
} | {
|
|
2432
|
+
$case: "lte";
|
|
2433
|
+
lte: Dayjs;
|
|
2434
|
+
} | {
|
|
2435
|
+
$case: "ltNow";
|
|
2436
|
+
ltNow: boolean;
|
|
2437
|
+
} | undefined;
|
|
2438
|
+
greaterThan?: {
|
|
2439
|
+
$case: "gt";
|
|
2440
|
+
gt: Dayjs;
|
|
2441
|
+
} | {
|
|
2442
|
+
$case: "gte";
|
|
2443
|
+
gte: Dayjs;
|
|
2444
|
+
} | {
|
|
2445
|
+
$case: "gtNow";
|
|
2446
|
+
gtNow: boolean;
|
|
2447
|
+
} | undefined;
|
|
2448
|
+
}
|
|
2449
|
+
export declare const TimestampRules: MessageFns<TimestampRules, "buf.validate.TimestampRules">;
|
|
2450
|
+
/**
|
|
2451
|
+
* `Violations` is a collection of `Violation` messages. This message type is returned by
|
|
2452
|
+
* protovalidate when a proto message fails to meet the requirements set by the `Constraint` validation rules.
|
|
2453
|
+
* Each individual violation is represented by a `Violation` message.
|
|
2454
|
+
*
|
|
2455
|
+
*/
|
|
2456
|
+
export interface Violations {
|
|
2457
|
+
$type: "buf.validate.Violations";
|
|
2458
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
2459
|
+
[customJson]?: () => unknown;
|
|
2460
|
+
/**
|
|
2461
|
+
* `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
|
|
2462
|
+
*
|
|
2463
|
+
*/
|
|
2464
|
+
violations: Violation[];
|
|
2465
|
+
}
|
|
2466
|
+
export declare const Violations: MessageFns<Violations, "buf.validate.Violations">;
|
|
2467
|
+
/**
|
|
2468
|
+
* `Violation` represents a single instance where a validation rule, expressed
|
|
2469
|
+
* as a `Constraint`, was not met. It provides information about the field that
|
|
2470
|
+
* caused the violation, the specific constraint that wasn't fulfilled, and a
|
|
2471
|
+
* human-readable error message.
|
|
2472
|
+
*
|
|
2473
|
+
* ```json
|
|
2474
|
+
* {
|
|
2475
|
+
* "fieldPath": "bar",
|
|
2476
|
+
* "constraintId": "foo.bar",
|
|
2477
|
+
* "message": "bar must be greater than 0"
|
|
2478
|
+
* }
|
|
2479
|
+
* ```
|
|
2480
|
+
*
|
|
2481
|
+
*/
|
|
2482
|
+
export interface Violation {
|
|
2483
|
+
$type: "buf.validate.Violation";
|
|
2484
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
2485
|
+
[customJson]?: () => unknown;
|
|
2486
|
+
/**
|
|
2487
|
+
* `field` is a machine-readable path to the field that failed validation.
|
|
2488
|
+
* This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.
|
|
2489
|
+
*
|
|
2490
|
+
* For example, consider the following message:
|
|
2491
|
+
*
|
|
2492
|
+
* ```proto
|
|
2493
|
+
* message Message {
|
|
2494
|
+
* bool a = 1 [(buf.validate.field).required = true];
|
|
2495
|
+
* }
|
|
2496
|
+
* ```
|
|
2497
|
+
*
|
|
2498
|
+
* It could produce the following violation:
|
|
2499
|
+
*
|
|
2500
|
+
* ```textproto
|
|
2501
|
+
* violation {
|
|
2502
|
+
* field { element { field_number: 1, field_name: "a", field_type: 8 } }
|
|
2503
|
+
* ...
|
|
2504
|
+
* }
|
|
2505
|
+
* ```
|
|
2506
|
+
*
|
|
2507
|
+
*/
|
|
2508
|
+
field?: FieldPath | undefined;
|
|
2509
|
+
/**
|
|
2510
|
+
* `rule` is a machine-readable path that points to the specific constraint rule that failed validation.
|
|
2511
|
+
* This will be a nested field starting from the FieldConstraints of the field that failed validation.
|
|
2512
|
+
* For custom constraints, this will provide the path of the constraint, e.g. `cel[0]`.
|
|
2513
|
+
*
|
|
2514
|
+
* For example, consider the following message:
|
|
2515
|
+
*
|
|
2516
|
+
* ```proto
|
|
2517
|
+
* message Message {
|
|
2518
|
+
* bool a = 1 [(buf.validate.field).required = true];
|
|
2519
|
+
* bool b = 2 [(buf.validate.field).cel = {
|
|
2520
|
+
* id: "custom_constraint",
|
|
2521
|
+
* expression: "!this ? 'b must be true': ''"
|
|
2522
|
+
* }]
|
|
2523
|
+
* }
|
|
2524
|
+
* ```
|
|
2525
|
+
*
|
|
2526
|
+
* It could produce the following violations:
|
|
2527
|
+
*
|
|
2528
|
+
* ```textproto
|
|
2529
|
+
* violation {
|
|
2530
|
+
* rule { element { field_number: 25, field_name: "required", field_type: 8 } }
|
|
2531
|
+
* ...
|
|
2532
|
+
* }
|
|
2533
|
+
* violation {
|
|
2534
|
+
* rule { element { field_number: 23, field_name: "cel", field_type: 11, index: 0 } }
|
|
2535
|
+
* ...
|
|
2536
|
+
* }
|
|
2537
|
+
* ```
|
|
2538
|
+
*
|
|
2539
|
+
*/
|
|
2540
|
+
rule?: FieldPath | undefined;
|
|
2541
|
+
/**
|
|
2542
|
+
* `field_path` is a human-readable identifier that points to the specific field that failed the validation.
|
|
2543
|
+
* This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.
|
|
2544
|
+
*
|
|
2545
|
+
* Deprecated: use the `field` instead.
|
|
2546
|
+
*
|
|
2547
|
+
* @deprecated Deprecated.
|
|
2548
|
+
*/
|
|
2549
|
+
fieldPath?: string | undefined;
|
|
2550
|
+
/**
|
|
2551
|
+
* `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.
|
|
2552
|
+
* This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
|
|
2553
|
+
*
|
|
2554
|
+
*/
|
|
2555
|
+
constraintId?: string | undefined;
|
|
2556
|
+
/**
|
|
2557
|
+
* `message` is a human-readable error message that describes the nature of the violation.
|
|
2558
|
+
* This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
|
|
2559
|
+
*
|
|
2560
|
+
*/
|
|
2561
|
+
message?: string | undefined;
|
|
2562
|
+
/**
|
|
2563
|
+
* `for_key` indicates whether the violation was caused by a map key, rather than a value.
|
|
2564
|
+
*
|
|
2565
|
+
*/
|
|
2566
|
+
forKey?: boolean | undefined;
|
|
2567
|
+
}
|
|
2568
|
+
export declare const Violation: MessageFns<Violation, "buf.validate.Violation">;
|
|
2569
|
+
/**
|
|
2570
|
+
* `FieldPath` provides a path to a nested protobuf field.
|
|
2571
|
+
*
|
|
2572
|
+
* This message provides enough information to render a dotted field path even without protobuf descriptors.
|
|
2573
|
+
* It also provides enough information to resolve a nested field through unknown wire data.
|
|
2574
|
+
*
|
|
2575
|
+
*/
|
|
2576
|
+
export interface FieldPath {
|
|
2577
|
+
$type: "buf.validate.FieldPath";
|
|
2578
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
2579
|
+
[customJson]?: () => unknown;
|
|
2580
|
+
/**
|
|
2581
|
+
* `elements` contains each element of the path, starting from the root and recursing downward.
|
|
2582
|
+
*
|
|
2583
|
+
*/
|
|
2584
|
+
elements: FieldPathElement[];
|
|
2585
|
+
}
|
|
2586
|
+
export declare const FieldPath: MessageFns<FieldPath, "buf.validate.FieldPath">;
|
|
2587
|
+
/**
|
|
2588
|
+
* `FieldPathElement` provides enough information to nest through a single protobuf field.
|
|
2589
|
+
*
|
|
2590
|
+
* If the selected field is a map or repeated field, the `subscript` value selects a specific element from it.
|
|
2591
|
+
* A path that refers to a value nested under a map key or repeated field index will have a `subscript` value.
|
|
2592
|
+
* The `field_type` field allows unambiguous resolution of a field even if descriptors are not available.
|
|
2593
|
+
*
|
|
2594
|
+
*/
|
|
2595
|
+
export interface FieldPathElement {
|
|
2596
|
+
$type: "buf.validate.FieldPathElement";
|
|
2597
|
+
[unknownFieldsSymbol]?: Uint8Array | undefined;
|
|
2598
|
+
[customJson]?: () => unknown;
|
|
2599
|
+
/**
|
|
2600
|
+
* `field_number` is the field number this path element refers to.
|
|
2601
|
+
*
|
|
2602
|
+
*/
|
|
2603
|
+
fieldNumber?: number | undefined;
|
|
2604
|
+
/**
|
|
2605
|
+
* `field_name` contains the field name this path element refers to.
|
|
2606
|
+
* This can be used to display a human-readable path even if the field number is unknown.
|
|
2607
|
+
*
|
|
2608
|
+
*/
|
|
2609
|
+
fieldName?: string | undefined;
|
|
2610
|
+
/**
|
|
2611
|
+
* `field_type` specifies the type of this field. When using reflection, this value is not needed.
|
|
2612
|
+
*
|
|
2613
|
+
* This value is provided to make it possible to traverse unknown fields through wire data.
|
|
2614
|
+
* When traversing wire data, be mindful of both packed[1] and delimited[2] encoding schemes.
|
|
2615
|
+
*
|
|
2616
|
+
* [1]: https://protobuf.dev/programming-guides/encoding/#packed
|
|
2617
|
+
* [2]: https://protobuf.dev/programming-guides/encoding/#groups
|
|
2618
|
+
*
|
|
2619
|
+
* N.B.: Although groups are deprecated, the corresponding delimited encoding scheme is not, and
|
|
2620
|
+
* can be explicitly used in Protocol Buffers 2023 Edition.
|
|
2621
|
+
*
|
|
2622
|
+
*/
|
|
2623
|
+
fieldType?: FieldDescriptorProto_Type | undefined;
|
|
2624
|
+
/**
|
|
2625
|
+
* `key_type` specifies the map key type of this field. This value is useful when traversing
|
|
2626
|
+
* unknown fields through wire data: specifically, it allows handling the differences between
|
|
2627
|
+
* different integer encodings.
|
|
2628
|
+
*
|
|
2629
|
+
*/
|
|
2630
|
+
keyType?: FieldDescriptorProto_Type | undefined;
|
|
2631
|
+
/**
|
|
2632
|
+
* `value_type` specifies map value type of this field. This is useful if you want to display a
|
|
2633
|
+
* value inside unknown fields through wire data.
|
|
2634
|
+
*
|
|
2635
|
+
*/
|
|
2636
|
+
valueType?: FieldDescriptorProto_Type | undefined;
|
|
2637
|
+
/**
|
|
2638
|
+
* `subscript` contains a repeated index or map key, if this path element nests into a repeated or map field.
|
|
2639
|
+
*
|
|
2640
|
+
*/
|
|
2641
|
+
subscript?: {
|
|
2642
|
+
$case: "index";
|
|
2643
|
+
index: Long;
|
|
2644
|
+
} | {
|
|
2645
|
+
$case: "boolKey";
|
|
2646
|
+
boolKey: boolean;
|
|
2647
|
+
} | {
|
|
2648
|
+
$case: "intKey";
|
|
2649
|
+
intKey: Long;
|
|
2650
|
+
} | {
|
|
2651
|
+
$case: "uintKey";
|
|
2652
|
+
uintKey: Long;
|
|
2653
|
+
} | {
|
|
2654
|
+
$case: "stringKey";
|
|
2655
|
+
stringKey: string;
|
|
2656
|
+
} | undefined;
|
|
2657
|
+
}
|
|
2658
|
+
export declare const FieldPathElement: MessageFns<FieldPathElement, "buf.validate.FieldPathElement">;
|
|
2659
|
+
import "../../google/protobuf/index";
|
|
2660
|
+
declare module '../../google/protobuf/index' {
|
|
2661
|
+
interface MessageOptions {
|
|
2662
|
+
message?: MessageConstraints;
|
|
2663
|
+
}
|
|
2664
|
+
}
|
|
2665
|
+
declare module '../../google/protobuf/index' {
|
|
2666
|
+
interface OneofOptions {
|
|
2667
|
+
oneof?: OneofConstraints;
|
|
2668
|
+
}
|
|
2669
|
+
}
|
|
2670
|
+
declare module '../../google/protobuf/index' {
|
|
2671
|
+
interface FieldOptions {
|
|
2672
|
+
field?: FieldConstraints;
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
declare module '../../google/protobuf/index' {
|
|
2676
|
+
interface FieldOptions {
|
|
2677
|
+
predefined?: PredefinedConstraints;
|
|
2678
|
+
}
|
|
2679
|
+
}
|
|
2680
|
+
export {};
|
|
2681
|
+
//# sourceMappingURL=index.d.ts.map
|