unleash-server 5.4.4 → 5.5.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/README.md +5 -3
- package/dist/lib/addons/addon-schema.js +2 -1
- package/dist/lib/addons/addon-schema.js.map +1 -1
- package/dist/lib/addons/datadog-definition.js +22 -7
- package/dist/lib/addons/datadog-definition.js.map +1 -1
- package/dist/lib/addons/datadog.d.ts +7 -1
- package/dist/lib/addons/datadog.js +16 -3
- package/dist/lib/addons/datadog.js.map +1 -1
- package/dist/lib/addons/datadog.test.js +62 -0
- package/dist/lib/addons/datadog.test.js.map +1 -1
- package/dist/lib/addons/index.js +3 -11
- package/dist/lib/addons/index.js.map +1 -1
- package/dist/lib/addons/slack-app-definition.js +5 -24
- package/dist/lib/addons/slack-app-definition.js.map +1 -1
- package/dist/lib/addons/slack-app.d.ts +0 -1
- package/dist/lib/addons/slack-app.js +5 -17
- package/dist/lib/addons/slack-app.js.map +1 -1
- package/dist/lib/addons/slack-app.test.js +39 -25
- package/dist/lib/addons/slack-app.test.js.map +1 -1
- package/dist/lib/addons/slack-definition.js +11 -4
- package/dist/lib/addons/slack-definition.js.map +1 -1
- package/dist/lib/addons/teams-definition.js +5 -4
- package/dist/lib/addons/teams-definition.js.map +1 -1
- package/dist/lib/addons/webhook-definition.js +10 -12
- package/dist/lib/addons/webhook-definition.js.map +1 -1
- package/dist/lib/create-config.js +13 -1
- package/dist/lib/create-config.js.map +1 -1
- package/dist/lib/create-config.test.js +14 -0
- package/dist/lib/create-config.test.js.map +1 -1
- package/dist/lib/db/access-store.d.ts +23 -5
- package/dist/lib/db/access-store.js +263 -17
- package/dist/lib/db/access-store.js.map +1 -1
- package/dist/lib/db/access-store.test.js +83 -0
- package/dist/lib/db/access-store.test.js.map +1 -0
- package/dist/lib/db/client-applications-store.d.ts +1 -3
- package/dist/lib/db/client-applications-store.js +13 -24
- package/dist/lib/db/client-applications-store.js.map +1 -1
- package/dist/lib/db/event-store.js +1 -0
- package/dist/lib/db/event-store.js.map +1 -1
- package/dist/lib/db/feature-toggle-client-store.js +17 -4
- package/dist/lib/db/feature-toggle-client-store.js.map +1 -1
- package/dist/lib/db/feature-toggle-store.js +1 -1
- package/dist/lib/db/feature-toggle-store.js.map +1 -1
- package/dist/lib/db/group-store.d.ts +4 -2
- package/dist/lib/db/group-store.js +24 -0
- package/dist/lib/db/group-store.js.map +1 -1
- package/dist/lib/db/index.d.ts +1 -2
- package/dist/lib/db/index.js +5 -1
- package/dist/lib/db/index.js.map +1 -1
- package/dist/lib/db/project-stats-store.d.ts +2 -0
- package/dist/lib/db/project-stats-store.js +27 -0
- package/dist/lib/db/project-stats-store.js.map +1 -1
- package/dist/lib/db/project-store.d.ts +7 -1
- package/dist/lib/db/project-store.js +34 -1
- package/dist/lib/db/project-store.js.map +1 -1
- package/dist/lib/error/bad-data-error.d.ts +1 -1
- package/dist/lib/error/index.d.ts +2 -1
- package/dist/lib/error/index.js +3 -1
- package/dist/lib/error/index.js.map +1 -1
- package/dist/lib/error/pattern-error.d.ts +10 -0
- package/dist/lib/error/pattern-error.js +20 -0
- package/dist/lib/error/pattern-error.js.map +1 -0
- package/dist/lib/features/dependent-features/createDependentFeaturesService.d.ts +3 -0
- package/dist/lib/features/dependent-features/createDependentFeaturesService.js +11 -0
- package/dist/lib/features/dependent-features/createDependentFeaturesService.js.map +1 -0
- package/dist/lib/features/dependent-features/dependent-features-controller.d.ts +28 -0
- package/dist/lib/features/dependent-features/dependent-features-controller.js +151 -0
- package/dist/lib/features/dependent-features/dependent-features-controller.js.map +1 -0
- package/dist/lib/features/dependent-features/dependent-features-service.d.ts +11 -0
- package/dist/lib/features/dependent-features/dependent-features-service.js +40 -0
- package/dist/lib/features/dependent-features/dependent-features-service.js.map +1 -0
- package/dist/lib/features/dependent-features/dependent-features-store-type.d.ts +8 -0
- package/dist/lib/features/dependent-features/dependent-features-store-type.js +3 -0
- package/dist/lib/features/dependent-features/dependent-features-store-type.js.map +1 -0
- package/dist/lib/features/dependent-features/dependent-features-store.d.ts +12 -0
- package/dist/lib/features/dependent-features/dependent-features-store.js +56 -0
- package/dist/lib/features/dependent-features/dependent-features-store.js.map +1 -0
- package/dist/lib/features/dependent-features/dependent-features.d.ts +14 -0
- package/dist/lib/features/dependent-features/dependent-features.js +3 -0
- package/dist/lib/features/dependent-features/dependent-features.js.map +1 -0
- package/dist/lib/features/dependent-features/dependent.features.e2e.test.d.ts +1 -0
- package/dist/lib/features/dependent-features/dependent.features.e2e.test.js +82 -0
- package/dist/lib/features/dependent-features/dependent.features.e2e.test.js.map +1 -0
- package/dist/lib/features/dependent-features/fake-dependent-features-store.d.ts +8 -0
- package/dist/lib/features/dependent-features/fake-dependent-features-store.js +22 -0
- package/dist/lib/features/dependent-features/fake-dependent-features-store.js.map +1 -0
- package/dist/lib/features/export-import-toggles/createExportImportService.js +6 -3
- package/dist/lib/features/export-import-toggles/createExportImportService.js.map +1 -1
- package/dist/lib/features/export-import-toggles/export-import-service.d.ts +9 -3
- package/dist/lib/features/export-import-toggles/export-import-service.js +51 -21
- package/dist/lib/features/export-import-toggles/export-import-service.js.map +1 -1
- package/dist/lib/features/export-import-toggles/export-import.e2e.test.js +120 -50
- package/dist/lib/features/export-import-toggles/export-import.e2e.test.js.map +1 -1
- package/dist/lib/features/export-import-toggles/import-permissions-service.d.ts +1 -2
- package/dist/lib/features/export-import-toggles/import-toggles-store-type.d.ts +6 -0
- package/dist/lib/features/export-import-toggles/import-toggles-store.d.ts +2 -1
- package/dist/lib/features/export-import-toggles/import-toggles-store.js +25 -0
- package/dist/lib/features/export-import-toggles/import-toggles-store.js.map +1 -1
- package/dist/lib/features/export-import-toggles/import-validation-messages.d.ts +18 -2
- package/dist/lib/features/export-import-toggles/import-validation-messages.js +27 -11
- package/dist/lib/features/export-import-toggles/import-validation-messages.js.map +1 -1
- package/dist/lib/features/feature-naming-pattern/feature-naming-validation.d.ts +14 -0
- package/dist/lib/features/feature-naming-pattern/feature-naming-validation.js +46 -0
- package/dist/lib/features/feature-naming-pattern/feature-naming-validation.js.map +1 -0
- package/dist/lib/features/feature-naming-pattern/feature-naming-validation.test.d.ts +1 -0
- package/dist/lib/features/feature-naming-pattern/feature-naming-validation.test.js +116 -0
- package/dist/lib/features/feature-naming-pattern/feature-naming-validation.test.js.map +1 -0
- package/dist/lib/features/feature-toggle/createFeatureToggleService.js +11 -2
- package/dist/lib/features/feature-toggle/createFeatureToggleService.js.map +1 -1
- package/dist/lib/features/instance-stats/getActiveUsers.d.ts +9 -0
- package/dist/lib/features/instance-stats/getActiveUsers.e2e.test.d.ts +1 -0
- package/dist/lib/features/instance-stats/getActiveUsers.e2e.test.js +141 -0
- package/dist/lib/features/instance-stats/getActiveUsers.e2e.test.js.map +1 -0
- package/dist/lib/features/instance-stats/getActiveUsers.js +33 -0
- package/dist/lib/features/instance-stats/getActiveUsers.js.map +1 -0
- package/dist/lib/{services → features/instance-stats}/instance-stats-service.d.ts +13 -7
- package/dist/lib/{services → features/instance-stats}/instance-stats-service.js +16 -7
- package/dist/lib/features/instance-stats/instance-stats-service.js.map +1 -0
- package/dist/lib/features/instance-stats/instance-stats-service.test.d.ts +1 -0
- package/dist/lib/{services → features/instance-stats}/instance-stats-service.test.js +6 -5
- package/dist/lib/features/instance-stats/instance-stats-service.test.js.map +1 -0
- package/dist/lib/features/playground/advanced-playground.test.js +2 -3
- package/dist/lib/features/playground/advanced-playground.test.js.map +1 -1
- package/dist/lib/features/playground/feature-evaluator/variant.d.ts +1 -1
- package/dist/lib/features/playground/generateObjectCombinations.d.ts +1 -1
- package/dist/lib/features/playground/generateObjectCombinations.js +14 -4
- package/dist/lib/features/playground/generateObjectCombinations.js.map +1 -1
- package/dist/lib/features/playground/generateObjectCombinations.test.js +21 -0
- package/dist/lib/features/playground/generateObjectCombinations.test.js.map +1 -1
- package/dist/lib/features/playground/playground-service.d.ts +5 -3
- package/dist/lib/features/playground/playground-service.js +18 -3
- package/dist/lib/features/playground/playground-service.js.map +1 -1
- package/dist/lib/features/playground/playground.d.ts +2 -1
- package/dist/lib/features/playground/playground.js +2 -1
- package/dist/lib/features/playground/playground.js.map +1 -1
- package/dist/lib/features/private-project/createPrivateProjectChecker.d.ts +5 -0
- package/dist/lib/features/private-project/createPrivateProjectChecker.js +22 -0
- package/dist/lib/features/private-project/createPrivateProjectChecker.js.map +1 -0
- package/dist/lib/features/private-project/fakePrivateProjectChecker.d.ts +7 -0
- package/dist/lib/features/private-project/fakePrivateProjectChecker.js +15 -0
- package/dist/lib/features/private-project/fakePrivateProjectChecker.js.map +1 -0
- package/dist/lib/features/private-project/privateProjectChecker.d.ts +10 -0
- package/dist/lib/features/private-project/privateProjectChecker.js +22 -0
- package/dist/lib/features/private-project/privateProjectChecker.js.map +1 -0
- package/dist/lib/features/private-project/privateProjectCheckerType.d.ts +5 -0
- package/dist/lib/features/private-project/privateProjectCheckerType.js +3 -0
- package/dist/lib/features/private-project/privateProjectCheckerType.js.map +1 -0
- package/dist/lib/features/private-project/privateProjectStore.d.ts +18 -0
- package/dist/lib/features/private-project/privateProjectStore.js +70 -0
- package/dist/lib/features/private-project/privateProjectStore.js.map +1 -0
- package/dist/lib/features/private-project/privateProjectStoreType.d.ts +4 -0
- package/dist/lib/features/private-project/privateProjectStoreType.js +3 -0
- package/dist/lib/features/private-project/privateProjectStoreType.js.map +1 -0
- package/dist/lib/features/project/createProjectService.js +5 -8
- package/dist/lib/features/project/createProjectService.js.map +1 -1
- package/dist/lib/features/segment/createSegmentService.js +5 -2
- package/dist/lib/features/segment/createSegmentService.js.map +1 -1
- package/dist/lib/features/segment/segment-controller.d.ts +39 -0
- package/dist/lib/features/segment/segment-controller.js +291 -0
- package/dist/lib/features/segment/segment-controller.js.map +1 -0
- package/dist/lib/metrics.d.ts +1 -1
- package/dist/lib/metrics.js +30 -1
- package/dist/lib/metrics.js.map +1 -1
- package/dist/lib/metrics.test.js +3 -2
- package/dist/lib/metrics.test.js.map +1 -1
- package/dist/lib/middleware/rbac-middleware.d.ts +2 -0
- package/dist/lib/middleware/rbac-middleware.js +2 -0
- package/dist/lib/middleware/rbac-middleware.js.map +1 -1
- package/dist/lib/middleware/secure-headers.js +18 -0
- package/dist/lib/middleware/secure-headers.js.map +1 -1
- package/dist/lib/openapi/index.js +13 -0
- package/dist/lib/openapi/index.js.map +1 -1
- package/dist/lib/openapi/meta-schema-rules.test.js +14 -4
- package/dist/lib/openapi/meta-schema-rules.test.js.map +1 -1
- package/dist/lib/openapi/spec/addon-type-schema.d.ts +6 -1
- package/dist/lib/openapi/spec/addon-type-schema.js +6 -1
- package/dist/lib/openapi/spec/addon-type-schema.js.map +1 -1
- package/dist/lib/openapi/spec/addons-schema.d.ts +8 -3
- package/dist/lib/openapi/spec/addons-schema.js +8 -3
- package/dist/lib/openapi/spec/addons-schema.js.map +1 -1
- package/dist/lib/openapi/spec/admin-segment-schema.d.ts +115 -0
- package/dist/lib/openapi/spec/admin-segment-schema.js +75 -0
- package/dist/lib/openapi/spec/admin-segment-schema.js.map +1 -0
- package/dist/lib/openapi/spec/admin-segment-schema.test.d.ts +1 -0
- package/dist/lib/openapi/spec/admin-segment-schema.test.js +39 -0
- package/dist/lib/openapi/spec/admin-segment-schema.test.js.map +1 -0
- package/dist/lib/openapi/spec/admin-strategies-schema.d.ts +46 -0
- package/dist/lib/openapi/spec/admin-strategies-schema.js +54 -0
- package/dist/lib/openapi/spec/admin-strategies-schema.js.map +1 -0
- package/dist/lib/openapi/spec/admin-strategies-schema.test.d.ts +1 -0
- package/dist/lib/openapi/spec/admin-strategies-schema.test.js +40 -0
- package/dist/lib/openapi/spec/admin-strategies-schema.test.js.map +1 -0
- package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.d.ts +51 -6
- package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.js +3 -1
- package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.js.map +1 -1
- package/dist/lib/openapi/spec/advanced-playground-feature-schema.d.ts +101 -11
- package/dist/lib/openapi/spec/advanced-playground-feature-schema.js +2 -0
- package/dist/lib/openapi/spec/advanced-playground-feature-schema.js.map +1 -1
- package/dist/lib/openapi/spec/advanced-playground-request-schema.d.ts +1 -0
- package/dist/lib/openapi/spec/advanced-playground-response-schema.d.ts +203 -22
- package/dist/lib/openapi/spec/advanced-playground-response-schema.js +2 -0
- package/dist/lib/openapi/spec/advanced-playground-response-schema.js.map +1 -1
- package/dist/lib/openapi/spec/client-feature-schema.d.ts +41 -6
- package/dist/lib/openapi/spec/client-feature-schema.js +9 -0
- package/dist/lib/openapi/spec/client-feature-schema.js.map +1 -1
- package/dist/lib/openapi/spec/client-features-schema.d.ts +75 -12
- package/dist/lib/openapi/spec/client-features-schema.js +2 -0
- package/dist/lib/openapi/spec/client-features-schema.js.map +1 -1
- package/dist/lib/openapi/spec/context-field-strategies-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/context-field-strategies-schema.js +1 -1
- package/dist/lib/openapi/spec/context-field-strategies-schema.js.map +1 -1
- package/dist/lib/openapi/spec/create-api-token-schema.d.ts +1 -139
- package/dist/lib/openapi/spec/create-api-token-schema.js +16 -20
- package/dist/lib/openapi/spec/create-api-token-schema.js.map +1 -1
- package/dist/lib/openapi/spec/create-dependent-feature-schema.d.ts +29 -0
- package/dist/lib/openapi/spec/create-dependent-feature-schema.js +31 -0
- package/dist/lib/openapi/spec/create-dependent-feature-schema.js.map +1 -0
- package/dist/lib/openapi/spec/create-feature-naming-pattern-schema.d.ts +29 -0
- package/dist/lib/openapi/spec/create-feature-naming-pattern-schema.js +33 -0
- package/dist/lib/openapi/spec/create-feature-naming-pattern-schema.js.map +1 -0
- package/dist/lib/openapi/spec/create-feature-strategy-schema.d.ts +2 -2
- package/dist/lib/openapi/spec/create-strategy-schema.d.ts +15 -0
- package/dist/lib/openapi/spec/create-strategy-schema.js +15 -0
- package/dist/lib/openapi/spec/create-strategy-schema.js.map +1 -1
- package/dist/lib/openapi/spec/create-strategy-variant-schema.d.ts +2 -2
- package/dist/lib/openapi/spec/create-strategy-variant-schema.js +2 -2
- package/dist/lib/openapi/spec/create-strategy-variant-schema.js.map +1 -1
- package/dist/lib/openapi/spec/dependent-feature-schema.d.ts +30 -0
- package/dist/lib/openapi/spec/dependent-feature-schema.js +14 -0
- package/dist/lib/openapi/spec/dependent-feature-schema.js.map +1 -0
- package/dist/lib/openapi/spec/dora-features-schema.d.ts +20 -0
- package/dist/lib/openapi/spec/dora-features-schema.js +22 -0
- package/dist/lib/openapi/spec/dora-features-schema.js.map +1 -0
- package/dist/lib/openapi/spec/environment-project-schema.d.ts +4 -4
- package/dist/lib/openapi/spec/environments-project-schema.d.ts +4 -4
- package/dist/lib/openapi/spec/event-schema.d.ts +3 -3
- package/dist/lib/openapi/spec/events-schema.d.ts +3 -3
- package/dist/lib/openapi/spec/export-query-schema.d.ts +22 -15
- package/dist/lib/openapi/spec/export-query-schema.js +16 -15
- package/dist/lib/openapi/spec/export-query-schema.js.map +1 -1
- package/dist/lib/openapi/spec/export-result-schema.d.ts +26 -26
- package/dist/lib/openapi/spec/feature-environment-schema.d.ts +6 -6
- package/dist/lib/openapi/spec/feature-events-schema.d.ts +3 -3
- package/dist/lib/openapi/spec/feature-schema.d.ts +12 -12
- package/dist/lib/openapi/spec/feature-strategy-schema.d.ts +2 -2
- package/dist/lib/openapi/spec/feature-variants-schema.d.ts +2 -2
- package/dist/lib/openapi/spec/features-schema.d.ts +24 -24
- package/dist/lib/openapi/spec/health-overview-schema.d.ts +63 -33
- package/dist/lib/openapi/spec/health-overview-schema.js +6 -1
- package/dist/lib/openapi/spec/health-overview-schema.js.map +1 -1
- package/dist/lib/openapi/spec/health-report-schema.d.ts +63 -33
- package/dist/lib/openapi/spec/import-toggles-schema.d.ts +52 -52
- package/dist/lib/openapi/spec/index.d.ts +9 -0
- package/dist/lib/openapi/spec/index.js +9 -0
- package/dist/lib/openapi/spec/index.js.map +1 -1
- package/dist/lib/openapi/spec/instance-admin-stats-schema.d.ts +42 -0
- package/dist/lib/openapi/spec/instance-admin-stats-schema.js +42 -0
- package/dist/lib/openapi/spec/instance-admin-stats-schema.js.map +1 -1
- package/dist/lib/openapi/spec/parent-feature-options-schema.d.ts +11 -0
- package/dist/lib/openapi/spec/parent-feature-options-schema.js +13 -0
- package/dist/lib/openapi/spec/parent-feature-options-schema.js.map +1 -0
- package/dist/lib/openapi/spec/playground-feature-schema.d.ts +5 -5
- package/dist/lib/openapi/spec/playground-request-schema.d.ts +1 -0
- package/dist/lib/openapi/spec/playground-response-schema.d.ts +12 -10
- package/dist/lib/openapi/spec/playground-strategy-schema.d.ts +4 -4
- package/dist/lib/openapi/spec/playground-strategy-schema.js +1 -1
- package/dist/lib/openapi/spec/playground-strategy-schema.js.map +1 -1
- package/dist/lib/openapi/spec/profile-schema.d.ts +12 -12
- package/dist/lib/openapi/spec/project-dora-metrics-schema.d.ts +44 -0
- package/dist/lib/openapi/spec/project-dora-metrics-schema.js +28 -0
- package/dist/lib/openapi/spec/project-dora-metrics-schema.js.map +1 -0
- package/dist/lib/openapi/spec/project-environment-schema.d.ts +4 -4
- package/dist/lib/openapi/spec/project-overview-schema.d.ts +63 -33
- package/dist/lib/openapi/spec/project-overview-schema.js +6 -1
- package/dist/lib/openapi/spec/project-overview-schema.js.map +1 -1
- package/dist/lib/openapi/spec/project-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/project-schema.js +1 -1
- package/dist/lib/openapi/spec/project-schema.js.map +1 -1
- package/dist/lib/openapi/spec/projects-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/push-variants-schema.d.ts +2 -2
- package/dist/lib/openapi/spec/sdk-context-schema.d.ts +1 -0
- package/dist/lib/openapi/spec/sdk-context-schema.js +1 -0
- package/dist/lib/openapi/spec/sdk-context-schema.js.map +1 -1
- package/dist/lib/openapi/spec/sdk-flat-context-schema.d.ts +46 -0
- package/dist/lib/openapi/spec/sdk-flat-context-schema.js +15 -0
- package/dist/lib/openapi/spec/sdk-flat-context-schema.js.map +1 -0
- package/dist/lib/openapi/spec/search-events-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/segments-schema.d.ts +177 -0
- package/dist/lib/openapi/spec/segments-schema.js +26 -0
- package/dist/lib/openapi/spec/segments-schema.js.map +1 -0
- package/dist/lib/openapi/spec/segments-schema.test.d.ts +1 -0
- package/dist/lib/openapi/spec/segments-schema.test.js +16 -0
- package/dist/lib/openapi/spec/segments-schema.test.js.map +1 -0
- package/dist/lib/openapi/spec/state-schema.d.ts +23 -23
- package/dist/lib/openapi/spec/strategy-variant-schema.d.ts +2 -2
- package/dist/lib/openapi/spec/update-feature-strategy-segments-schema.d.ts +35 -0
- package/dist/lib/openapi/spec/update-feature-strategy-segments-schema.js +37 -0
- package/dist/lib/openapi/spec/update-feature-strategy-segments-schema.js.map +1 -0
- package/dist/lib/openapi/spec/update-feature-strategy-segments-schema.test.d.ts +1 -0
- package/dist/lib/openapi/spec/update-feature-strategy-segments-schema.test.js +19 -0
- package/dist/lib/openapi/spec/update-feature-strategy-segments-schema.test.js.map +1 -0
- package/dist/lib/openapi/spec/upsert-segment-schema.d.ts +8 -15
- package/dist/lib/openapi/spec/upsert-segment-schema.js +8 -17
- package/dist/lib/openapi/spec/upsert-segment-schema.js.map +1 -1
- package/dist/lib/openapi/spec/upsert-segment-schema.test.d.ts +1 -0
- package/dist/lib/openapi/spec/upsert-segment-schema.test.js +35 -0
- package/dist/lib/openapi/spec/upsert-segment-schema.test.js.map +1 -0
- package/dist/lib/openapi/spec/validate-feature-schema.d.ts +6 -0
- package/dist/lib/openapi/spec/validate-feature-schema.js +6 -0
- package/dist/lib/openapi/spec/validate-feature-schema.js.map +1 -1
- package/dist/lib/openapi/spec/variant-schema.d.ts +2 -2
- package/dist/lib/openapi/spec/variant-schema.js +2 -2
- package/dist/lib/openapi/spec/variant-schema.js.map +1 -1
- package/dist/lib/openapi/spec/variants-schema.d.ts +2 -2
- package/dist/lib/openapi/util/all-of.d.ts +3 -0
- package/dist/lib/openapi/util/all-of.js +34 -0
- package/dist/lib/openapi/util/all-of.js.map +1 -0
- package/dist/lib/openapi/util/openapi-tags.d.ts +46 -58
- package/dist/lib/openapi/util/openapi-tags.js +27 -34
- package/dist/lib/openapi/util/openapi-tags.js.map +1 -1
- package/dist/lib/openapi/util/openapi-tags.test.d.ts +1 -0
- package/dist/lib/openapi/util/openapi-tags.test.js +15 -0
- package/dist/lib/openapi/util/openapi-tags.test.js.map +1 -0
- package/dist/lib/openapi/validate.js +0 -1
- package/dist/lib/openapi/validate.js.map +1 -1
- package/dist/lib/routes/admin-api/archive.d.ts +1 -1
- package/dist/lib/routes/admin-api/archive.js +3 -2
- package/dist/lib/routes/admin-api/archive.js.map +1 -1
- package/dist/lib/routes/admin-api/context.js +2 -1
- package/dist/lib/routes/admin-api/context.js.map +1 -1
- package/dist/lib/routes/admin-api/feature.js +2 -1
- package/dist/lib/routes/admin-api/feature.js.map +1 -1
- package/dist/lib/routes/admin-api/index.js +2 -0
- package/dist/lib/routes/admin-api/index.js.map +1 -1
- package/dist/lib/routes/admin-api/instance-admin.d.ts +2 -2
- package/dist/lib/routes/admin-api/instance-admin.js +7 -1
- package/dist/lib/routes/admin-api/instance-admin.js.map +1 -1
- package/dist/lib/routes/admin-api/metrics.d.ts +2 -1
- package/dist/lib/routes/admin-api/metrics.js +2 -1
- package/dist/lib/routes/admin-api/metrics.js.map +1 -1
- package/dist/lib/routes/admin-api/project/api-token.d.ts +2 -1
- package/dist/lib/routes/admin-api/project/api-token.js +12 -3
- package/dist/lib/routes/admin-api/project/api-token.js.map +1 -1
- package/dist/lib/routes/admin-api/project/environments.d.ts +2 -1
- package/dist/lib/routes/admin-api/project/environments.js +3 -1
- package/dist/lib/routes/admin-api/project/environments.js.map +1 -1
- package/dist/lib/routes/admin-api/project/index.d.ts +2 -1
- package/dist/lib/routes/admin-api/project/index.js +31 -0
- package/dist/lib/routes/admin-api/project/index.js.map +1 -1
- package/dist/lib/routes/admin-api/strategy.d.ts +1 -1
- package/dist/lib/routes/admin-api/strategy.js.map +1 -1
- package/dist/lib/routes/client-api/metrics.js +14 -8
- package/dist/lib/routes/client-api/metrics.js.map +1 -1
- package/dist/lib/routes/client-api/metrics.test.js +27 -0
- package/dist/lib/routes/client-api/metrics.test.js.map +1 -1
- package/dist/lib/routes/controller.d.ts +1 -1
- package/dist/lib/routes/controller.js +17 -10
- package/dist/lib/routes/controller.js.map +1 -1
- package/dist/lib/routes/proxy-api/index.js +5 -0
- package/dist/lib/routes/proxy-api/index.js.map +1 -1
- package/dist/lib/schema/role-schema.js +3 -1
- package/dist/lib/schema/role-schema.js.map +1 -1
- package/dist/lib/schema/role-schema.test.js +1 -1
- package/dist/lib/schema/role-schema.test.js.map +1 -1
- package/dist/lib/segments/segment-service-interface.d.ts +1 -1
- package/dist/lib/services/access-service.d.ts +29 -11
- package/dist/lib/services/access-service.js +53 -10
- package/dist/lib/services/access-service.js.map +1 -1
- package/dist/lib/services/access-service.test.js +2 -1
- package/dist/lib/services/access-service.test.js.map +1 -1
- package/dist/lib/services/addon-service.js +4 -2
- package/dist/lib/services/addon-service.js.map +1 -1
- package/dist/lib/services/addon-service.test.js +65 -0
- package/dist/lib/services/addon-service.test.js.map +1 -1
- package/dist/lib/services/client-metrics/instance-service.d.ts +5 -2
- package/dist/lib/services/client-metrics/instance-service.js +22 -3
- package/dist/lib/services/client-metrics/instance-service.js.map +1 -1
- package/dist/lib/services/client-metrics/instance-service.test.js +5 -4
- package/dist/lib/services/client-metrics/instance-service.test.js.map +1 -1
- package/dist/lib/services/context-service.d.ts +6 -2
- package/dist/lib/services/context-service.js +16 -2
- package/dist/lib/services/context-service.js.map +1 -1
- package/dist/lib/services/feature-service-potentially-stale.test.js +1 -1
- package/dist/lib/services/feature-service-potentially-stale.test.js.map +1 -1
- package/dist/lib/services/feature-toggle-service.d.ts +20 -7
- package/dist/lib/services/feature-toggle-service.js +105 -41
- package/dist/lib/services/feature-toggle-service.js.map +1 -1
- package/dist/lib/services/group-service.d.ts +4 -4
- package/dist/lib/services/group-service.js +17 -16
- package/dist/lib/services/group-service.js.map +1 -1
- package/dist/lib/services/index.d.ts +3 -2
- package/dist/lib/services/index.js +31 -17
- package/dist/lib/services/index.js.map +1 -1
- package/dist/lib/services/project-schema.js +9 -1
- package/dist/lib/services/project-schema.js.map +1 -1
- package/dist/lib/services/project-service.d.ts +16 -12
- package/dist/lib/services/project-service.js +127 -17
- package/dist/lib/services/project-service.js.map +1 -1
- package/dist/lib/services/scheduler-service.d.ts +1 -1
- package/dist/lib/services/scheduler-service.js +3 -3
- package/dist/lib/services/scheduler-service.js.map +1 -1
- package/dist/lib/services/scheduler-service.test.js +15 -15
- package/dist/lib/services/scheduler-service.test.js.map +1 -1
- package/dist/lib/services/segment-service.d.ts +4 -2
- package/dist/lib/services/segment-service.js +17 -10
- package/dist/lib/services/segment-service.js.map +1 -1
- package/dist/lib/services/state-service.test.js +13 -3
- package/dist/lib/services/state-service.test.js.map +1 -1
- package/dist/lib/services/version-service.test.js +3 -0
- package/dist/lib/services/version-service.test.js.map +1 -1
- package/dist/lib/types/events.d.ts +60 -1
- package/dist/lib/types/events.js +65 -3
- package/dist/lib/types/events.js.map +1 -1
- package/dist/lib/types/experimental.d.ts +1 -1
- package/dist/lib/types/experimental.js +9 -5
- package/dist/lib/types/experimental.js.map +1 -1
- package/dist/lib/types/group.d.ts +2 -2
- package/dist/lib/types/model.d.ts +31 -2
- package/dist/lib/types/model.js.map +1 -1
- package/dist/lib/types/no-auth-user.d.ts +1 -0
- package/dist/lib/types/no-auth-user.js +3 -1
- package/dist/lib/types/no-auth-user.js.map +1 -1
- package/dist/lib/types/option.d.ts +7 -0
- package/dist/lib/types/services.d.ts +6 -1
- package/dist/lib/types/stores/access-store.d.ts +23 -4
- package/dist/lib/types/stores/feature-strategies-store.d.ts +2 -1
- package/dist/lib/types/stores/group-store.d.ts +4 -2
- package/dist/lib/types/stores/project-stats-store-type.d.ts +2 -0
- package/dist/lib/types/stores/project-store.d.ts +7 -14
- package/dist/lib/types/stores/strategy-store.d.ts +3 -17
- package/dist/lib/types/stores.d.ts +5 -1
- package/dist/lib/util/findDuplicates.d.ts +1 -0
- package/dist/lib/util/findDuplicates.js +18 -0
- package/dist/lib/util/findDuplicates.js.map +1 -0
- package/dist/lib/util/findDuplicates.test.d.ts +1 -0
- package/dist/lib/util/findDuplicates.test.js +23 -0
- package/dist/lib/util/findDuplicates.test.js.map +1 -0
- package/dist/migrations/20230830121352-update-client-applications-usage-table.d.ts +2 -0
- package/dist/migrations/20230830121352-update-client-applications-usage-table.js +16 -0
- package/dist/migrations/20230830121352-update-client-applications-usage-table.js.map +1 -0
- package/dist/migrations/20230905122605-add-feature-naming-description.d.ts +2 -0
- package/dist/migrations/20230905122605-add-feature-naming-description.js +13 -0
- package/dist/migrations/20230905122605-add-feature-naming-description.js.map +1 -0
- package/dist/migrations/20230919104006-dependent-features.d.ts +2 -0
- package/dist/migrations/20230919104006-dependent-features.js +21 -0
- package/dist/migrations/20230919104006-dependent-features.js.map +1 -0
- package/dist/migrations/20230927071830-reset-pnps-feedback.d.ts +2 -0
- package/dist/migrations/20230927071830-reset-pnps-feedback.js +10 -0
- package/dist/migrations/20230927071830-reset-pnps-feedback.js.map +1 -0
- package/dist/server-dev.js +7 -4
- package/dist/server-dev.js.map +1 -1
- package/dist/test/e2e/api/admin/addon.e2e.test.js +0 -1
- package/dist/test/e2e/api/admin/addon.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/admin/api-token.auth.e2e.test.js +8 -12
- package/dist/test/e2e/api/admin/api-token.auth.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/admin/event.e2e.test.js +9 -2
- package/dist/test/e2e/api/admin/event.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/admin/metrics.e2e.test.js +2 -10
- package/dist/test/e2e/api/admin/metrics.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/admin/project/environments.e2e.test.js +8 -0
- package/dist/test/e2e/api/admin/project/environments.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/admin/project/features.e2e.test.js +41 -15
- package/dist/test/e2e/api/admin/project/features.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/admin/project/project.api.tokens.e2e.test.js +30 -3
- package/dist/test/e2e/api/admin/project/project.api.tokens.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/admin/segment.e2e.test.d.ts +1 -0
- package/dist/test/e2e/api/admin/segment.e2e.test.js +272 -0
- package/dist/test/e2e/api/admin/segment.e2e.test.js.map +1 -0
- package/dist/test/e2e/api/admin/state.e2e.test.js +0 -11
- package/dist/test/e2e/api/admin/state.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/admin/strategy.e2e.test.js +1 -1
- package/dist/test/e2e/api/client/feature.e2e.test.js +27 -3
- package/dist/test/e2e/api/client/feature.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/client/feature.token.access.e2e.test.js +2 -2
- package/dist/test/e2e/api/client/feature.token.access.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/client/segment.e2e.test.js +1 -1
- package/dist/test/e2e/api/client/segment.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/proxy/proxy.e2e.test.js +34 -9
- package/dist/test/e2e/api/proxy/proxy.e2e.test.js.map +1 -1
- package/dist/test/e2e/helpers/app.utils.d.ts +6 -0
- package/dist/test/e2e/helpers/app.utils.js +16 -0
- package/dist/test/e2e/helpers/app.utils.js.map +1 -0
- package/dist/test/e2e/helpers/database.json +24 -0
- package/dist/test/e2e/services/access-service.e2e.test.js +549 -135
- package/dist/test/e2e/services/access-service.e2e.test.js.map +1 -1
- package/dist/test/e2e/services/api-token-service.e2e.test.js +4 -2
- package/dist/test/e2e/services/api-token-service.e2e.test.js.map +1 -1
- package/dist/test/e2e/services/client-metrics-service.e2e.test.js +2 -1
- package/dist/test/e2e/services/client-metrics-service.e2e.test.js.map +1 -1
- package/dist/test/e2e/services/feature-toggle-service-v2.e2e.test.js +38 -5
- package/dist/test/e2e/services/feature-toggle-service-v2.e2e.test.js.map +1 -1
- package/dist/test/e2e/services/group-service.e2e.test.js +16 -11
- package/dist/test/e2e/services/group-service.e2e.test.js.map +1 -1
- package/dist/test/e2e/services/playground-service.test.js +5 -2
- package/dist/test/e2e/services/playground-service.test.js.map +1 -1
- package/dist/test/e2e/services/project-health-service.e2e.test.js +4 -2
- package/dist/test/e2e/services/project-health-service.e2e.test.js.map +1 -1
- package/dist/test/e2e/services/project-service.e2e.test.js +242 -60
- package/dist/test/e2e/services/project-service.e2e.test.js.map +1 -1
- package/dist/test/fixtures/access-service-mock.d.ts +3 -4
- package/dist/test/fixtures/access-service-mock.js.map +1 -1
- package/dist/test/fixtures/fake-access-store.d.ts +15 -5
- package/dist/test/fixtures/fake-access-store.js +30 -3
- package/dist/test/fixtures/fake-access-store.js.map +1 -1
- package/dist/test/fixtures/fake-group-store.d.ts +4 -2
- package/dist/test/fixtures/fake-group-store.js +3 -0
- package/dist/test/fixtures/fake-group-store.js.map +1 -1
- package/dist/test/fixtures/fake-project-stats-store.d.ts +1 -0
- package/dist/test/fixtures/fake-project-stats-store.js +3 -0
- package/dist/test/fixtures/fake-project-stats-store.js.map +1 -1
- package/dist/test/fixtures/fake-project-store.d.ts +2 -1
- package/dist/test/fixtures/fake-project-store.js +3 -0
- package/dist/test/fixtures/fake-project-store.js.map +1 -1
- package/dist/test/fixtures/no-logger.d.ts +2 -1
- package/dist/test/fixtures/no-logger.js +8 -4
- package/dist/test/fixtures/no-logger.js.map +1 -1
- package/dist/test/fixtures/store.js +3 -0
- package/dist/test/fixtures/store.js.map +1 -1
- package/frontend/README.md +7 -1
- package/frontend/build/index.html +2 -2
- package/frontend/build/static/{AdvancedPlayground-1748fcdd.js → AdvancedPlayground-20059178.js} +11 -11
- package/frontend/build/static/CreateProject-6955728f.js +4 -0
- package/frontend/build/static/{Error-cbce6b64.js → Error-f56339ab.js} +1 -1
- package/frontend/build/static/FeatureArchiveDialog-33dc3a5b.js +10 -0
- package/frontend/build/static/{FeatureMetricsChart-8fd8a304.js → FeatureMetricsChart-5ad514bc.js} +2 -2
- package/frontend/build/static/FeatureViewLazyExport-85a68ed0.js +7 -0
- package/frontend/build/static/LazyAdminExport-e2677758.js +35 -0
- package/frontend/build/static/LazyProjectExport-969bb54e.js +24 -0
- package/frontend/build/static/Logo-android-218bddbb.svg +1 -0
- package/frontend/build/static/Logo-flutter-cc3c706f.svg +1 -0
- package/frontend/build/static/Logo-go-02475b3d.svg +1 -0
- package/frontend/build/static/Logo-java-6e556b26.svg +1 -0
- package/frontend/build/static/Logo-javascript-caebc06e.svg +1 -0
- package/frontend/build/static/Logo-net-0a33abee.svg +1 -0
- package/frontend/build/static/Logo-node-318ed025.svg +1 -0
- package/frontend/build/static/Logo-php-201f18c3.svg +1 -0
- package/frontend/build/static/Logo-python-4305760e.svg +1 -0
- package/frontend/build/static/Logo-react-18e98687.svg +1 -0
- package/frontend/build/static/Logo-ruby-58f46832.svg +1 -0
- package/frontend/build/static/Logo-rust-c83a80f9.svg +1 -0
- package/frontend/build/static/Logo-svelte-97dcb624.svg +1 -0
- package/frontend/build/static/Logo-swift-315f842b.svg +5 -0
- package/frontend/build/static/Logo-vue-0de73099.svg +1 -0
- package/frontend/build/static/{NetworkOverview-349a7bdd.js → NetworkOverview-894877e6.js} +2 -2
- package/frontend/build/static/{NetworkTraffic-60478e50.js → NetworkTraffic-81eff1ae.js} +1 -1
- package/frontend/build/static/ReactJSONEditor-59c8a094.js +129 -0
- package/frontend/build/static/RoleCell-35857d41.js +1 -0
- package/frontend/build/static/{StrategyItemContainer-a4caeace.js → StrategyItemContainer-b250f2d4.js} +1 -1
- package/frontend/build/static/{chartjs-adapter-date-fns.esm-03d2fbea.js → chartjs-adapter-date-fns.esm-c51fe022.js} +1 -1
- package/frontend/build/static/cr-db7653ac.png +0 -0
- package/frontend/build/static/datadog-543762b6.svg +5 -0
- package/frontend/build/static/edge-daisy-chaining-012bfdef.svg +48 -0
- package/frontend/build/static/edge-mode-5d25949b.svg +22 -0
- package/frontend/build/static/edge-offline-f6a0f761.svg +19 -0
- package/frontend/build/static/{flowchart-elk-definition-170a3958-fc100c77.js → flowchart-elk-definition-170a3958-a8c4a86a.js} +1 -1
- package/frontend/build/static/{index-866f9bf9.js → index-0515f416.js} +1 -1
- package/frontend/build/static/index-942e9eeb.js +463 -0
- package/frontend/build/static/{index-3c63138f.js → index-a59b2d65.js} +1 -1
- package/frontend/build/static/{is_dark-31c253e9.js → is_dark-464961a8.js} +1 -1
- package/frontend/build/static/jira-1abe7cbf.svg +17 -0
- package/frontend/build/static/{mindmap-definition-44684416-398682f9.js → mindmap-definition-44684416-3a71a9a5.js} +1 -1
- package/frontend/build/static/slack-36ce798a.svg +18 -0
- package/frontend/build/static/style-97d3ef98.css +1 -0
- package/frontend/build/static/teams-4e30b51f.svg +45 -0
- package/frontend/build/static/{timeline-definition-8e5a9bc6-04a0ae08.js → timeline-definition-8e5a9bc6-da4ebc88.js} +1 -1
- package/frontend/build/static/{unknownify-b8618d88.js → unknownify-3563456b.js} +1 -1
- package/frontend/build/static/unleash-integration-949d8966.svg +1 -0
- package/frontend/build/static/webhooks-b1b44207.svg +16 -0
- package/frontend/package.json +20 -18
- package/package.json +23 -23
- package/dist/lib/services/instance-stats-service.js.map +0 -1
- package/dist/lib/services/instance-stats-service.test.js.map +0 -1
- package/frontend/build/static/CreateProject-972fa820.js +0 -4
- package/frontend/build/static/FeatureArchiveDialog-8a281845.js +0 -10
- package/frontend/build/static/FeatureViewLazyExport-a215d53b.js +0 -7
- package/frontend/build/static/LazyAdminExport-ba7d55ca.js +0 -35
- package/frontend/build/static/LazyProjectExport-12bccd40.js +0 -17
- package/frontend/build/static/RoleCell-144e7eca.js +0 -1
- package/frontend/build/static/datadog-591b6a73.svg +0 -1
- package/frontend/build/static/index-17d74ac9.js +0 -454
- package/frontend/build/static/slack-c0af31c6.svg +0 -1
- package/frontend/build/static/style-770afaee.css +0 -1
- package/frontend/build/static/teams-62e72076.svg +0 -26
- package/frontend/build/static/webhooks-ffa904ac.svg +0 -1
- /package/dist/lib/{services/instance-stats-service.test.d.ts → db/access-store.test.d.ts} +0 -0
- /package/frontend/build/static/{jira-d9eb9af9.svg → jira-comment-d9eb9af9.svg} +0 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { FromSchema } from 'json-schema-to-ts';
|
|
2
|
+
export declare const segmentsSchema: {
|
|
3
|
+
readonly $id: "#/components/schemas/segmentsSchema";
|
|
4
|
+
readonly description: "Data containing a list of [segments](https://docs.getunleash.io/reference/segments)";
|
|
5
|
+
readonly type: "object";
|
|
6
|
+
readonly properties: {
|
|
7
|
+
readonly segments: {
|
|
8
|
+
readonly type: "array";
|
|
9
|
+
readonly description: "A list of segments";
|
|
10
|
+
readonly items: {
|
|
11
|
+
readonly $ref: "#/components/schemas/adminSegmentSchema";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
readonly components: {
|
|
16
|
+
readonly schemas: {
|
|
17
|
+
readonly adminSegmentSchema: {
|
|
18
|
+
readonly $id: "#/components/schemas/adminSegmentSchema";
|
|
19
|
+
readonly type: "object";
|
|
20
|
+
readonly required: readonly ["id", "name", "constraints", "createdAt"];
|
|
21
|
+
readonly description: "A description of a [segment](https://docs.getunleash.io/reference/segments)";
|
|
22
|
+
readonly additionalProperties: false;
|
|
23
|
+
readonly properties: {
|
|
24
|
+
readonly id: {
|
|
25
|
+
readonly type: "integer";
|
|
26
|
+
readonly description: "The ID of this segment";
|
|
27
|
+
readonly example: 2;
|
|
28
|
+
readonly minimum: 0;
|
|
29
|
+
};
|
|
30
|
+
readonly name: {
|
|
31
|
+
readonly type: "string";
|
|
32
|
+
readonly description: "The name of this segment";
|
|
33
|
+
readonly example: "ios-users";
|
|
34
|
+
};
|
|
35
|
+
readonly description: {
|
|
36
|
+
readonly type: "string";
|
|
37
|
+
readonly nullable: true;
|
|
38
|
+
readonly description: "The description for this segment";
|
|
39
|
+
readonly example: "IOS users segment";
|
|
40
|
+
};
|
|
41
|
+
readonly constraints: {
|
|
42
|
+
readonly type: "array";
|
|
43
|
+
readonly description: "The list of constraints that are used in this segment";
|
|
44
|
+
readonly items: {
|
|
45
|
+
readonly $ref: "#/components/schemas/constraintSchema";
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
readonly usedInFeatures: {
|
|
49
|
+
readonly type: "integer";
|
|
50
|
+
readonly minimum: 0;
|
|
51
|
+
readonly description: "The number of projects that use this segment";
|
|
52
|
+
readonly example: 3;
|
|
53
|
+
readonly nullable: true;
|
|
54
|
+
};
|
|
55
|
+
readonly usedInProjects: {
|
|
56
|
+
readonly type: "integer";
|
|
57
|
+
readonly minimum: 0;
|
|
58
|
+
readonly description: "The number of projects that use this segment";
|
|
59
|
+
readonly example: 2;
|
|
60
|
+
readonly nullable: true;
|
|
61
|
+
};
|
|
62
|
+
readonly project: {
|
|
63
|
+
readonly type: "string";
|
|
64
|
+
readonly nullable: true;
|
|
65
|
+
readonly example: "red-vista";
|
|
66
|
+
readonly description: "The project the segment belongs to. Only present if the segment is a project-specific segment.";
|
|
67
|
+
};
|
|
68
|
+
readonly createdBy: {
|
|
69
|
+
readonly description: "The creator's email or username";
|
|
70
|
+
readonly example: "someone@example.com";
|
|
71
|
+
readonly type: "string";
|
|
72
|
+
readonly nullable: true;
|
|
73
|
+
};
|
|
74
|
+
readonly createdAt: {
|
|
75
|
+
readonly type: "string";
|
|
76
|
+
readonly format: "date-time";
|
|
77
|
+
readonly description: "When the segment was created";
|
|
78
|
+
readonly example: "2023-04-12T11:13:31.960Z";
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
readonly components: {
|
|
82
|
+
readonly schemas: {
|
|
83
|
+
readonly constraintSchema: {
|
|
84
|
+
readonly type: "object";
|
|
85
|
+
readonly required: readonly ["contextName", "operator"];
|
|
86
|
+
readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/reference/strategy-constraints)";
|
|
87
|
+
readonly properties: {
|
|
88
|
+
readonly contextName: {
|
|
89
|
+
readonly description: "The name of the context field that this constraint should apply to.";
|
|
90
|
+
readonly example: "appName";
|
|
91
|
+
readonly type: "string";
|
|
92
|
+
};
|
|
93
|
+
readonly operator: {
|
|
94
|
+
readonly description: "The operator to use when evaluating this constraint. For more information about the various operators, refer to [the strategy constraint operator documentation](https://docs.getunleash.io/reference/strategy-constraints#strategy-constraint-operators).";
|
|
95
|
+
readonly type: "string";
|
|
96
|
+
readonly enum: readonly ["NOT_IN", "IN", "STR_ENDS_WITH", "STR_STARTS_WITH", "STR_CONTAINS", "NUM_EQ", "NUM_GT", "NUM_GTE", "NUM_LT", "NUM_LTE", "DATE_AFTER", "DATE_BEFORE", "SEMVER_EQ", "SEMVER_GT", "SEMVER_LT"];
|
|
97
|
+
readonly example: "IN";
|
|
98
|
+
};
|
|
99
|
+
readonly caseInsensitive: {
|
|
100
|
+
readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
|
|
101
|
+
readonly type: "boolean";
|
|
102
|
+
readonly default: false;
|
|
103
|
+
};
|
|
104
|
+
readonly inverted: {
|
|
105
|
+
readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
|
|
106
|
+
readonly type: "boolean";
|
|
107
|
+
readonly default: false;
|
|
108
|
+
};
|
|
109
|
+
readonly values: {
|
|
110
|
+
readonly type: "array";
|
|
111
|
+
readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
|
|
112
|
+
readonly items: {
|
|
113
|
+
readonly type: "string";
|
|
114
|
+
};
|
|
115
|
+
readonly example: readonly ["my-app", "my-other-app"];
|
|
116
|
+
};
|
|
117
|
+
readonly value: {
|
|
118
|
+
readonly description: "The context value that should be used for constraint evaluation. Use this property instead of `values` for properties that only accept single values.";
|
|
119
|
+
readonly type: "string";
|
|
120
|
+
readonly example: "my-app";
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
readonly components: {};
|
|
124
|
+
readonly $id: "#/components/schemas/constraintSchema";
|
|
125
|
+
readonly additionalProperties: false;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
readonly constraintSchema: {
|
|
131
|
+
readonly type: "object";
|
|
132
|
+
readonly required: readonly ["contextName", "operator"];
|
|
133
|
+
readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/reference/strategy-constraints)";
|
|
134
|
+
readonly properties: {
|
|
135
|
+
readonly contextName: {
|
|
136
|
+
readonly description: "The name of the context field that this constraint should apply to.";
|
|
137
|
+
readonly example: "appName";
|
|
138
|
+
readonly type: "string";
|
|
139
|
+
};
|
|
140
|
+
readonly operator: {
|
|
141
|
+
readonly description: "The operator to use when evaluating this constraint. For more information about the various operators, refer to [the strategy constraint operator documentation](https://docs.getunleash.io/reference/strategy-constraints#strategy-constraint-operators).";
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
readonly enum: readonly ["NOT_IN", "IN", "STR_ENDS_WITH", "STR_STARTS_WITH", "STR_CONTAINS", "NUM_EQ", "NUM_GT", "NUM_GTE", "NUM_LT", "NUM_LTE", "DATE_AFTER", "DATE_BEFORE", "SEMVER_EQ", "SEMVER_GT", "SEMVER_LT"];
|
|
144
|
+
readonly example: "IN";
|
|
145
|
+
};
|
|
146
|
+
readonly caseInsensitive: {
|
|
147
|
+
readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
|
|
148
|
+
readonly type: "boolean";
|
|
149
|
+
readonly default: false;
|
|
150
|
+
};
|
|
151
|
+
readonly inverted: {
|
|
152
|
+
readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
|
|
153
|
+
readonly type: "boolean";
|
|
154
|
+
readonly default: false;
|
|
155
|
+
};
|
|
156
|
+
readonly values: {
|
|
157
|
+
readonly type: "array";
|
|
158
|
+
readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
|
|
159
|
+
readonly items: {
|
|
160
|
+
readonly type: "string";
|
|
161
|
+
};
|
|
162
|
+
readonly example: readonly ["my-app", "my-other-app"];
|
|
163
|
+
};
|
|
164
|
+
readonly value: {
|
|
165
|
+
readonly description: "The context value that should be used for constraint evaluation. Use this property instead of `values` for properties that only accept single values.";
|
|
166
|
+
readonly type: "string";
|
|
167
|
+
readonly example: "my-app";
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
readonly components: {};
|
|
171
|
+
readonly $id: "#/components/schemas/constraintSchema";
|
|
172
|
+
readonly additionalProperties: false;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
export declare type SegmentsSchema = FromSchema<typeof segmentsSchema>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.segmentsSchema = void 0;
|
|
4
|
+
const admin_segment_schema_1 = require("./admin-segment-schema");
|
|
5
|
+
const constraint_schema_1 = require("./constraint-schema");
|
|
6
|
+
exports.segmentsSchema = {
|
|
7
|
+
$id: '#/components/schemas/segmentsSchema',
|
|
8
|
+
description: 'Data containing a list of [segments](https://docs.getunleash.io/reference/segments)',
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
segments: {
|
|
12
|
+
type: 'array',
|
|
13
|
+
description: 'A list of segments',
|
|
14
|
+
items: {
|
|
15
|
+
$ref: '#/components/schemas/adminSegmentSchema',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
components: {
|
|
20
|
+
schemas: {
|
|
21
|
+
adminSegmentSchema: admin_segment_schema_1.adminSegmentSchema,
|
|
22
|
+
constraintSchema: constraint_schema_1.constraintSchema,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=segments-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segments-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/segments-schema.ts"],"names":[],"mappings":";;;AACA,iEAA4D;AAC5D,2DAAuD;AAE1C,QAAA,cAAc,GAAG;IAC1B,GAAG,EAAE,qCAAqC;IAC1C,WAAW,EACP,qFAAqF;IACzF,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,QAAQ,EAAE;YACN,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,oBAAoB;YACjC,KAAK,EAAE;gBACH,IAAI,EAAE,yCAAyC;aAClD;SACJ;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,kBAAkB,EAAlB,yCAAkB;YAClB,gBAAgB,EAAhB,oCAAgB;SACnB;KACJ;CACK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const validate_1 = require("../validate");
|
|
4
|
+
test('updateEnvironmentSchema', () => {
|
|
5
|
+
const data = {
|
|
6
|
+
segments: [],
|
|
7
|
+
};
|
|
8
|
+
expect((0, validate_1.validateSchema)('#/components/schemas/segmentsSchema', data)).toBeUndefined();
|
|
9
|
+
expect((0, validate_1.validateSchema)('#/components/schemas/segmentsSchema', {
|
|
10
|
+
segments: [],
|
|
11
|
+
additional: 'property',
|
|
12
|
+
})).toBeUndefined();
|
|
13
|
+
expect((0, validate_1.validateSchema)('#/components/schemas/segmentsSchema', {})).toMatchSnapshot();
|
|
14
|
+
expect((0, validate_1.validateSchema)('#/components/schemas/segmentsSchema', 'not an object')).toMatchSnapshot();
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=segments-schema.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segments-schema.test.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/segments-schema.test.ts"],"names":[],"mappings":";;AAAA,0CAA6C;AAG7C,IAAI,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACjC,MAAM,IAAI,GAAmB;QACzB,QAAQ,EAAE,EAAE;KACf,CAAC;IAEF,MAAM,CACF,IAAA,yBAAc,EAAC,qCAAqC,EAAE,IAAI,CAAC,CAC9D,CAAC,aAAa,EAAE,CAAC;IAElB,MAAM,CACF,IAAA,yBAAc,EAAC,qCAAqC,EAAE;QAClD,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,UAAU;KACzB,CAAC,CACL,CAAC,aAAa,EAAE,CAAC;IAElB,MAAM,CACF,IAAA,yBAAc,EAAC,qCAAqC,EAAE,EAAE,CAAC,CAC5D,CAAC,eAAe,EAAE,CAAC;IAEpB,MAAM,CACF,IAAA,yBAAc,EAAC,qCAAqC,EAAE,eAAe,CAAC,CACzE,CAAC,eAAe,EAAE,CAAC;AACxB,CAAC,CAAC,CAAC"}
|
|
@@ -517,9 +517,9 @@ export declare const stateSchema: {
|
|
|
517
517
|
readonly description: "Extra data configured for this variant";
|
|
518
518
|
readonly properties: {
|
|
519
519
|
readonly type: {
|
|
520
|
-
readonly description: "The type of the value. Commonly used types are string, json and csv.";
|
|
520
|
+
readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
|
|
521
521
|
readonly type: "string";
|
|
522
|
-
readonly enum: readonly ["json", "csv", "string"];
|
|
522
|
+
readonly enum: readonly ["json", "csv", "string", "number"];
|
|
523
523
|
};
|
|
524
524
|
readonly value: {
|
|
525
525
|
readonly description: "The actual value of payload";
|
|
@@ -572,9 +572,9 @@ export declare const stateSchema: {
|
|
|
572
572
|
readonly description: "Extra data configured for this variant";
|
|
573
573
|
readonly properties: {
|
|
574
574
|
readonly type: {
|
|
575
|
-
readonly description: "The type of the value. Commonly used types are string, json and csv.";
|
|
575
|
+
readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
|
|
576
576
|
readonly type: "string";
|
|
577
|
-
readonly enum: readonly ["json", "csv", "string"];
|
|
577
|
+
readonly enum: readonly ["json", "csv", "string", "number"];
|
|
578
578
|
};
|
|
579
579
|
readonly value: {
|
|
580
580
|
readonly description: "The actual value of payload";
|
|
@@ -625,9 +625,9 @@ export declare const stateSchema: {
|
|
|
625
625
|
readonly additionalProperties: false;
|
|
626
626
|
readonly properties: {
|
|
627
627
|
readonly type: {
|
|
628
|
-
readonly description: "The type of the value. Commonly used types are string, json and csv.";
|
|
628
|
+
readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
|
|
629
629
|
readonly type: "string";
|
|
630
|
-
readonly enum: readonly ["json", "csv", "string"];
|
|
630
|
+
readonly enum: readonly ["json", "csv", "string", "number"];
|
|
631
631
|
};
|
|
632
632
|
readonly value: {
|
|
633
633
|
readonly description: "The actual value of payload";
|
|
@@ -833,9 +833,9 @@ export declare const stateSchema: {
|
|
|
833
833
|
readonly description: "Extra data configured for this variant";
|
|
834
834
|
readonly properties: {
|
|
835
835
|
readonly type: {
|
|
836
|
-
readonly description: "The type of the value. Commonly used types are string, json and csv.";
|
|
836
|
+
readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
|
|
837
837
|
readonly type: "string";
|
|
838
|
-
readonly enum: readonly ["json", "csv", "string"];
|
|
838
|
+
readonly enum: readonly ["json", "csv", "string", "number"];
|
|
839
839
|
};
|
|
840
840
|
readonly value: {
|
|
841
841
|
readonly description: "The actual value of payload";
|
|
@@ -888,9 +888,9 @@ export declare const stateSchema: {
|
|
|
888
888
|
readonly description: "Extra data configured for this variant";
|
|
889
889
|
readonly properties: {
|
|
890
890
|
readonly type: {
|
|
891
|
-
readonly description: "The type of the value. Commonly used types are string, json and csv.";
|
|
891
|
+
readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
|
|
892
892
|
readonly type: "string";
|
|
893
|
-
readonly enum: readonly ["json", "csv", "string"];
|
|
893
|
+
readonly enum: readonly ["json", "csv", "string", "number"];
|
|
894
894
|
};
|
|
895
895
|
readonly value: {
|
|
896
896
|
readonly description: "The actual value of payload";
|
|
@@ -973,9 +973,9 @@ export declare const stateSchema: {
|
|
|
973
973
|
readonly additionalProperties: false;
|
|
974
974
|
readonly properties: {
|
|
975
975
|
readonly type: {
|
|
976
|
-
readonly description: "The type of the value. Commonly used types are string, json and csv.";
|
|
976
|
+
readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
|
|
977
977
|
readonly type: "string";
|
|
978
|
-
readonly enum: readonly ["json", "csv", "string"];
|
|
978
|
+
readonly enum: readonly ["json", "csv", "string", "number"];
|
|
979
979
|
};
|
|
980
980
|
readonly value: {
|
|
981
981
|
readonly description: "The actual value of payload";
|
|
@@ -1195,7 +1195,7 @@ export declare const stateSchema: {
|
|
|
1195
1195
|
};
|
|
1196
1196
|
readonly mode: {
|
|
1197
1197
|
readonly type: "string";
|
|
1198
|
-
readonly enum: readonly ["open", "protected"];
|
|
1198
|
+
readonly enum: readonly ["open", "protected", "private"];
|
|
1199
1199
|
readonly example: "open";
|
|
1200
1200
|
readonly description: "The project's [collaboration mode](https://docs.getunleash.io/reference/project-collaboration-mode). Determines whether non-project members can submit change requests or not.";
|
|
1201
1201
|
};
|
|
@@ -1362,9 +1362,9 @@ export declare const stateSchema: {
|
|
|
1362
1362
|
readonly description: "Extra data configured for this variant";
|
|
1363
1363
|
readonly properties: {
|
|
1364
1364
|
readonly type: {
|
|
1365
|
-
readonly description: "The type of the value. Commonly used types are string, json and csv.";
|
|
1365
|
+
readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
|
|
1366
1366
|
readonly type: "string";
|
|
1367
|
-
readonly enum: readonly ["json", "csv", "string"];
|
|
1367
|
+
readonly enum: readonly ["json", "csv", "string", "number"];
|
|
1368
1368
|
};
|
|
1369
1369
|
readonly value: {
|
|
1370
1370
|
readonly description: "The actual value of payload";
|
|
@@ -1417,9 +1417,9 @@ export declare const stateSchema: {
|
|
|
1417
1417
|
readonly description: "Extra data configured for this variant";
|
|
1418
1418
|
readonly properties: {
|
|
1419
1419
|
readonly type: {
|
|
1420
|
-
readonly description: "The type of the value. Commonly used types are string, json and csv.";
|
|
1420
|
+
readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
|
|
1421
1421
|
readonly type: "string";
|
|
1422
|
-
readonly enum: readonly ["json", "csv", "string"];
|
|
1422
|
+
readonly enum: readonly ["json", "csv", "string", "number"];
|
|
1423
1423
|
};
|
|
1424
1424
|
readonly value: {
|
|
1425
1425
|
readonly description: "The actual value of payload";
|
|
@@ -1707,9 +1707,9 @@ export declare const stateSchema: {
|
|
|
1707
1707
|
readonly description: "Extra data configured for this variant";
|
|
1708
1708
|
readonly properties: {
|
|
1709
1709
|
readonly type: {
|
|
1710
|
-
readonly description: "The type of the value. Commonly used types are string, json and csv.";
|
|
1710
|
+
readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
|
|
1711
1711
|
readonly type: "string";
|
|
1712
|
-
readonly enum: readonly ["json", "csv", "string"];
|
|
1712
|
+
readonly enum: readonly ["json", "csv", "string", "number"];
|
|
1713
1713
|
};
|
|
1714
1714
|
readonly value: {
|
|
1715
1715
|
readonly description: "The actual value of payload";
|
|
@@ -1762,9 +1762,9 @@ export declare const stateSchema: {
|
|
|
1762
1762
|
readonly description: "Extra data configured for this variant";
|
|
1763
1763
|
readonly properties: {
|
|
1764
1764
|
readonly type: {
|
|
1765
|
-
readonly description: "The type of the value. Commonly used types are string, json and csv.";
|
|
1765
|
+
readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
|
|
1766
1766
|
readonly type: "string";
|
|
1767
|
-
readonly enum: readonly ["json", "csv", "string"];
|
|
1767
|
+
readonly enum: readonly ["json", "csv", "string", "number"];
|
|
1768
1768
|
};
|
|
1769
1769
|
readonly value: {
|
|
1770
1770
|
readonly description: "The actual value of payload";
|
|
@@ -1815,9 +1815,9 @@ export declare const stateSchema: {
|
|
|
1815
1815
|
readonly additionalProperties: false;
|
|
1816
1816
|
readonly properties: {
|
|
1817
1817
|
readonly type: {
|
|
1818
|
-
readonly description: "The type of the value. Commonly used types are string, json and csv.";
|
|
1818
|
+
readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
|
|
1819
1819
|
readonly type: "string";
|
|
1820
|
-
readonly enum: readonly ["json", "csv", "string"];
|
|
1820
|
+
readonly enum: readonly ["json", "csv", "string", "number"];
|
|
1821
1821
|
};
|
|
1822
1822
|
readonly value: {
|
|
1823
1823
|
readonly description: "The actual value of payload";
|
|
@@ -34,9 +34,9 @@ export declare const strategyVariantSchema: {
|
|
|
34
34
|
readonly description: "Extra data configured for this variant";
|
|
35
35
|
readonly properties: {
|
|
36
36
|
readonly type: {
|
|
37
|
-
readonly description: "The type of the value. Commonly used types are string, json and csv.";
|
|
37
|
+
readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
|
|
38
38
|
readonly type: "string";
|
|
39
|
-
readonly enum: readonly ["json", "csv", "string"];
|
|
39
|
+
readonly enum: readonly ["json", "csv", "string", "number"];
|
|
40
40
|
};
|
|
41
41
|
readonly value: {
|
|
42
42
|
readonly description: "The actual value of payload";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { FromSchema } from 'json-schema-to-ts';
|
|
2
|
+
export declare const updateFeatureStrategySegmentsSchema: {
|
|
3
|
+
readonly $id: "#/components/schemas/updateFeatureStrategySegmentsSchema";
|
|
4
|
+
readonly type: "object";
|
|
5
|
+
readonly required: readonly ["projectId", "strategyId", "environmentId", "segmentIds"];
|
|
6
|
+
readonly description: "Data required to update segments for a strategy.";
|
|
7
|
+
readonly properties: {
|
|
8
|
+
readonly projectId: {
|
|
9
|
+
readonly type: "string";
|
|
10
|
+
readonly description: "The ID of the project that the strategy belongs to.";
|
|
11
|
+
readonly example: "red-vista";
|
|
12
|
+
};
|
|
13
|
+
readonly strategyId: {
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly description: "The ID of the strategy to update segments for.";
|
|
16
|
+
readonly example: "15d1e20b-6310-4e17-a0c2-9fb84de3053a";
|
|
17
|
+
};
|
|
18
|
+
readonly environmentId: {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
readonly description: "The ID of the strategy environment.";
|
|
21
|
+
readonly example: "development";
|
|
22
|
+
};
|
|
23
|
+
readonly segmentIds: {
|
|
24
|
+
readonly type: "array";
|
|
25
|
+
readonly description: "The new list of segments (IDs) to use for this strategy. Any segments not in this list will be removed from the strategy.";
|
|
26
|
+
readonly example: readonly [1, 5, 6];
|
|
27
|
+
readonly items: {
|
|
28
|
+
readonly type: "integer";
|
|
29
|
+
readonly minimum: 0;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly components: {};
|
|
34
|
+
};
|
|
35
|
+
export declare type UpdateFeatureStrategySegmentsSchema = FromSchema<typeof updateFeatureStrategySegmentsSchema>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateFeatureStrategySegmentsSchema = void 0;
|
|
4
|
+
exports.updateFeatureStrategySegmentsSchema = {
|
|
5
|
+
$id: '#/components/schemas/updateFeatureStrategySegmentsSchema',
|
|
6
|
+
type: 'object',
|
|
7
|
+
required: ['projectId', 'strategyId', 'environmentId', 'segmentIds'],
|
|
8
|
+
description: 'Data required to update segments for a strategy.',
|
|
9
|
+
properties: {
|
|
10
|
+
projectId: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: 'The ID of the project that the strategy belongs to.',
|
|
13
|
+
example: 'red-vista',
|
|
14
|
+
},
|
|
15
|
+
strategyId: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
description: 'The ID of the strategy to update segments for.',
|
|
18
|
+
example: '15d1e20b-6310-4e17-a0c2-9fb84de3053a',
|
|
19
|
+
},
|
|
20
|
+
environmentId: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'The ID of the strategy environment.',
|
|
23
|
+
example: 'development',
|
|
24
|
+
},
|
|
25
|
+
segmentIds: {
|
|
26
|
+
type: 'array',
|
|
27
|
+
description: 'The new list of segments (IDs) to use for this strategy. Any segments not in this list will be removed from the strategy.',
|
|
28
|
+
example: [1, 5, 6],
|
|
29
|
+
items: {
|
|
30
|
+
type: 'integer',
|
|
31
|
+
minimum: 0,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
components: {},
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=update-feature-strategy-segments-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-feature-strategy-segments-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/update-feature-strategy-segments-schema.ts"],"names":[],"mappings":";;;AAEa,QAAA,mCAAmC,GAAG;IAC/C,GAAG,EAAE,0DAA0D;IAC/D,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,YAAY,CAAC;IACpE,WAAW,EAAE,kDAAkD;IAC/D,UAAU,EAAE;QACR,SAAS,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qDAAqD;YAClE,OAAO,EAAE,WAAW;SACvB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,gDAAgD;YAC7D,OAAO,EAAE,sCAAsC;SAClD;QACD,aAAa,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qCAAqC;YAClD,OAAO,EAAE,aAAa;SACzB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,OAAO;YACb,WAAW,EACP,2HAA2H;YAC/H,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YAClB,KAAK,EAAE;gBACH,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,CAAC;aACb;SACJ;KACJ;IACD,UAAU,EAAE,EAAE;CACR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const validate_1 = require("../validate");
|
|
4
|
+
test('updateFeatureStrategySegmentsSchema schema', () => {
|
|
5
|
+
const data = {
|
|
6
|
+
strategyId: '1',
|
|
7
|
+
segmentIds: [1, 2],
|
|
8
|
+
projectId: 'default',
|
|
9
|
+
environmentId: 'default',
|
|
10
|
+
additional: 'property',
|
|
11
|
+
};
|
|
12
|
+
expect((0, validate_1.validateSchema)('#/components/schemas/updateFeatureStrategySegmentsSchema', data)).toBeUndefined();
|
|
13
|
+
expect((0, validate_1.validateSchema)('#/components/schemas/updateFeatureStrategySegmentsSchema', {})).toMatchSnapshot();
|
|
14
|
+
expect((0, validate_1.validateSchema)('#/components/schemas/updateFeatureStrategySegmentsSchema', {
|
|
15
|
+
strategyId: '1',
|
|
16
|
+
segmentIds: [],
|
|
17
|
+
})).toMatchSnapshot();
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=update-feature-strategy-segments-schema.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-feature-strategy-segments-schema.test.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/update-feature-strategy-segments-schema.test.ts"],"names":[],"mappings":";;AAAA,0CAA6C;AAG7C,IAAI,CAAC,4CAA4C,EAAE,GAAG,EAAE;IACpD,MAAM,IAAI,GAAwC;QAC9C,UAAU,EAAE,GAAG;QACf,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAClB,SAAS,EAAE,SAAS;QACpB,aAAa,EAAE,SAAS;QACxB,UAAU,EAAE,UAAU;KACzB,CAAC;IAEF,MAAM,CACF,IAAA,yBAAc,EACV,0DAA0D,EAC1D,IAAI,CACP,CACJ,CAAC,aAAa,EAAE,CAAC;IAElB,MAAM,CACF,IAAA,yBAAc,EACV,0DAA0D,EAC1D,EAAE,CACL,CACJ,CAAC,eAAe,EAAE,CAAC;IAEpB,MAAM,CACF,IAAA,yBAAc,EACV,0DAA0D,EAC1D;QACI,UAAU,EAAE,GAAG;QACf,UAAU,EAAE,EAAE;KACjB,CACJ,CACJ,CAAC,eAAe,EAAE,CAAC;AACxB,CAAC,CAAC,CAAC"}
|
|
@@ -2,41 +2,34 @@ import { FromSchema } from 'json-schema-to-ts';
|
|
|
2
2
|
export declare const upsertSegmentSchema: {
|
|
3
3
|
readonly $id: "#/components/schemas/upsertSegmentSchema";
|
|
4
4
|
readonly type: "object";
|
|
5
|
-
readonly description: "
|
|
5
|
+
readonly description: "Data used to create or update a segment";
|
|
6
6
|
readonly required: readonly ["name", "constraints"];
|
|
7
7
|
readonly properties: {
|
|
8
8
|
readonly name: {
|
|
9
|
+
readonly description: "The name of the segment";
|
|
10
|
+
readonly example: "beta-users";
|
|
9
11
|
readonly type: "string";
|
|
10
|
-
readonly description: "The name of the segment.";
|
|
11
12
|
};
|
|
12
13
|
readonly description: {
|
|
13
14
|
readonly type: "string";
|
|
14
15
|
readonly nullable: true;
|
|
15
|
-
readonly description: "
|
|
16
|
+
readonly description: "A description of what the segment is for";
|
|
17
|
+
readonly example: "Users willing to help us test and build new features.";
|
|
16
18
|
};
|
|
17
19
|
readonly project: {
|
|
18
20
|
readonly type: "string";
|
|
19
21
|
readonly nullable: true;
|
|
20
|
-
readonly description: "
|
|
22
|
+
readonly description: "The project the segment belongs to if any.";
|
|
23
|
+
readonly example: "red-vista";
|
|
21
24
|
};
|
|
22
25
|
readonly constraints: {
|
|
23
26
|
readonly type: "array";
|
|
24
|
-
readonly description: "
|
|
27
|
+
readonly description: "The list of constraints that make up this segment";
|
|
25
28
|
readonly items: {
|
|
26
29
|
readonly $ref: "#/components/schemas/constraintSchema";
|
|
27
30
|
};
|
|
28
31
|
};
|
|
29
32
|
};
|
|
30
|
-
readonly example: {
|
|
31
|
-
readonly name: "segment name";
|
|
32
|
-
readonly description: "segment description";
|
|
33
|
-
readonly project: "optional project id";
|
|
34
|
-
readonly constraints: readonly [{
|
|
35
|
-
readonly contextName: "environment";
|
|
36
|
-
readonly operator: "IN";
|
|
37
|
-
readonly values: readonly ["production", "staging"];
|
|
38
|
-
}];
|
|
39
|
-
};
|
|
40
33
|
readonly components: {
|
|
41
34
|
readonly schemas: {
|
|
42
35
|
readonly constraintSchema: {
|
|
@@ -5,43 +5,34 @@ const constraint_schema_1 = require("./constraint-schema");
|
|
|
5
5
|
exports.upsertSegmentSchema = {
|
|
6
6
|
$id: '#/components/schemas/upsertSegmentSchema',
|
|
7
7
|
type: 'object',
|
|
8
|
-
description: '
|
|
8
|
+
description: 'Data used to create or update a segment',
|
|
9
9
|
required: ['name', 'constraints'],
|
|
10
10
|
properties: {
|
|
11
11
|
name: {
|
|
12
|
+
description: 'The name of the segment',
|
|
13
|
+
example: 'beta-users',
|
|
12
14
|
type: 'string',
|
|
13
|
-
description: 'The name of the segment.',
|
|
14
15
|
},
|
|
15
16
|
description: {
|
|
16
17
|
type: 'string',
|
|
17
18
|
nullable: true,
|
|
18
|
-
description: '
|
|
19
|
+
description: 'A description of what the segment is for',
|
|
20
|
+
example: 'Users willing to help us test and build new features.',
|
|
19
21
|
},
|
|
20
22
|
project: {
|
|
21
23
|
type: 'string',
|
|
22
24
|
nullable: true,
|
|
23
|
-
description: '
|
|
25
|
+
description: 'The project the segment belongs to if any.',
|
|
26
|
+
example: 'red-vista',
|
|
24
27
|
},
|
|
25
28
|
constraints: {
|
|
26
29
|
type: 'array',
|
|
27
|
-
description: '
|
|
30
|
+
description: 'The list of constraints that make up this segment',
|
|
28
31
|
items: {
|
|
29
32
|
$ref: '#/components/schemas/constraintSchema',
|
|
30
33
|
},
|
|
31
34
|
},
|
|
32
35
|
},
|
|
33
|
-
example: {
|
|
34
|
-
name: 'segment name',
|
|
35
|
-
description: 'segment description',
|
|
36
|
-
project: 'optional project id',
|
|
37
|
-
constraints: [
|
|
38
|
-
{
|
|
39
|
-
contextName: 'environment',
|
|
40
|
-
operator: 'IN',
|
|
41
|
-
values: ['production', 'staging'],
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
36
|
components: {
|
|
46
37
|
schemas: {
|
|
47
38
|
constraintSchema: constraint_schema_1.constraintSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upsert-segment-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/upsert-segment-schema.ts"],"names":[],"mappings":";;;AACA,2DAAuD;AAE1C,QAAA,mBAAmB,GAAG;IAC/B,GAAG,EAAE,0CAA0C;IAC/C,IAAI,EAAE,QAAQ;IACd,WAAW,
|
|
1
|
+
{"version":3,"file":"upsert-segment-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/upsert-segment-schema.ts"],"names":[],"mappings":";;;AACA,2DAAuD;AAE1C,QAAA,mBAAmB,GAAG;IAC/B,GAAG,EAAE,0CAA0C;IAC/C,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,yCAAyC;IACtD,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;IACjC,UAAU,EAAE;QACR,IAAI,EAAE;YACF,WAAW,EAAE,yBAAyB;YACtC,OAAO,EAAE,YAAY;YACrB,IAAI,EAAE,QAAQ;SACjB;QACD,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,0CAA0C;YACvD,OAAO,EAAE,uDAAuD;SACnE;QACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,4CAA4C;YACzD,OAAO,EAAE,WAAW;SACvB;QACD,WAAW,EAAE;YACT,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,mDAAmD;YAChE,KAAK,EAAE;gBACH,IAAI,EAAE,uCAAuC;aAChD;SACJ;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,gBAAgB,EAAhB,oCAAgB;SACnB;KACJ;CACK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|