sellinjaanus
cecca59f65
Task/open api reset password ( #1740 )
...
* task: add openapi for reset password
* fix: add respondWithValidation and remove email from tests
* fix: change tags to other
2022-06-22 14:31:41 +03:00
andreas-unleash
66452e2860
open-api addon controller ( #1721 )
...
* open-api addon controller
* bug fixes
* bug fixes
* resolve merge conflict
* bug fix
* bug fix
* bug fix
* PR comments
* PR comments
* Resolve merge conflics
* Resolve merge conflics
* bug and tests
2022-06-22 13:49:18 +03:00
Christopher Kolstad
18c720f4e9
Task/open api state ( #1738 )
...
* task: add open api to import/export
2022-06-22 09:09:49 +02:00
Christopher Kolstad
32399291e0
task: add OpenApi spec to metrics route ( #1725 )
...
* task: add OpenApi spec to metrics route
2022-06-21 09:12:40 +02:00
Christopher Kolstad
1821af8fe7
task: add openapi for tags ( #1724 )
...
* task: add openapi for tags
2022-06-21 08:23:30 +02:00
Nuno Góis
123991d28f
refactor: add OpenAPI schema to health-check controller ( #1732 )
...
* refactor: add OpenAPI schema to health-check controller
* refactor: address PR comments
* add type to health-check-schema
* fix: update snap
2022-06-20 11:22:41 +01:00
Nuno Góis
2354656632
refactor: add OpenAPI schema to api-token controller ( #1716 )
...
* refactor: add OpenAPI schema to api-token controller
* refactor: address PR comments
* fix: status codes on environment toggling
* fix tests
* refactor: address PR comments
* refactor: expiresAtSchema -> update-api-token-schema
2022-06-17 20:35:26 +01:00
Nuno Góis
525fce3e86
refactor: add OpenAPI schema to context controller ( #1711 )
...
* refactor: add OpenAPI schema to context controller
* Update src/lib/routes/admin-api/context.ts
Co-authored-by: olav <mail@olav.io>
* address PR comments, misc fixes and improvements
* refactor: address PR comments
* add createdAt to test
* fix: reverted upsert schema after discussion
Co-authored-by: olav <mail@olav.io>
2022-06-17 10:11:55 +01:00
olav
28ecb158a9
refactor: add schemas to feedback controller ( #1698 )
...
* refactor: remove previous getProjects route
* refactor: add schemas to feedback controller
2022-06-17 08:15:56 +02:00
Christopher Kolstad
780bb06dba
task: add open-api for tag-types ( #1700 )
...
* task: add open-api for tag-types
2022-06-14 09:06:41 +02:00
olav
7ba8cd05eb
fix: do not require Content-Type for requests without body ( #1707 )
...
* fix: do not require Content-Type for requests without body
* fix: require Content-Type for feature update requests
2022-06-14 08:16:08 +02:00
olav
47a719238d
refactor: fix duplicate operationIds ( #1701 )
2022-06-10 15:11:41 +02:00
olav
1264f8cb13
refactor: add schemas to splash controller ( #1697 )
2022-06-10 15:11:07 +02:00
olav
adface17c7
refactor: add OpenAPI schema to environments controller ( #1682 )
...
* refactor: normalize controller file names
* refactor: throw invalid responses in dev mode
* refactor: add OpenAPI schema to environments controller
* refactor: improve JSON schema prop removal code
* refactor: fix empty response specs
2022-06-10 10:04:56 +02:00
olav
d7c450abf8
refactor: remove unused my-sessions endpoint ( #1691 )
2022-06-09 14:48:03 +02:00
olav
0f11a33e3a
refactor: remove active-sessions endpoint ( #1690 )
2022-06-09 13:19:20 +02:00
olav
138300ab22
refactor: add OpenAPI schema to feature types controller ( #1684 )
...
* refactor: fix feature types id type
* refactor: fix error-hiding Controller imports
* refactor: add OpenAPI schema to feature types controller
2022-06-09 13:17:13 +02:00
olav
1ed8dd0f0d
refactor: add OpenAPI schema to constraints controller ( #1683 )
...
* refactor: add OpenAPI schema to constraints controller
* refactor: add more schema tests
2022-06-09 10:35:39 +02:00
olav
04c107a26e
refactor: add OpenAPI schemas to more controllers ( #1680 )
2022-06-08 15:31:34 +02:00
olav
09a6b578bf
refactor: add OpenAPI schema to UI config controller ( #1681 )
2022-06-08 14:57:39 +02:00
Christopher Kolstad
37211491e7
feat: default to memoizing client features ( #1674 )
2022-06-08 09:43:37 +02:00
olav
13ef025fab
refactor: add soft response schema validation ( #1657 )
...
* refactor: remove most schema refs
* refactor: generalize request/response schemas
* refactor: simplify schema date formats
* refactor: add soft response schema validation
* refactor: fix emptySchema definition
* refactor: update json-schema-to-ts and use refs
2022-06-08 08:01:14 +02:00
olav
ee35c7ad74
refactor: replace ts-ignore with ts-expect-error ( #1675 )
...
* refactor: replace ts-ignore with ts-expect-error
* refactor: remove unused ts-expect-errors
2022-06-07 11:49:17 +02:00
olav
9aa1f39add
refactor: always accept any content type for GET reqs ( #1672 )
2022-06-07 09:32:18 +02:00
Christopher Kolstad
7895002602
feat: add OpenApi spec to feature variants ( #1659 )
...
* feat: add OpenApi spec to feature variants
2022-06-03 13:16:59 +02:00
Ivar Conradi Østhus
3359dd204d
feat: add option to disable 'Clear-Site-Data' header on logout ( #1645 )
2022-06-03 11:50:58 +02:00
olav
7e3f0329ab
refactor: avoid inlining segments for supported clients ( #1640 )
...
* refactor: add semver lib types
* refactor: avoid inlining segments for supported clients
* refactor: fix FeatureController tests
* refactor: use spec version instead of client version
* refactor: improve header validation errors
2022-06-02 14:07:46 +02:00
olav
224b9cb229
refactor: move segment limits to env vars ( #1642 )
...
* refactor: improve env var helpers
* refactor: remove unused segments client API
* refactor: remove experimental segment flags
* refactor: move segment limits to env vars
* refactor: add segment limits to UIConfig response
* refactor: fix type name casing
2022-06-02 10:44:45 +02:00
Ivar Conradi Østhus
ddb7b075a8
fix: flag for anonymising user search
2022-05-31 21:51:49 +02:00
Ivar Conradi Østhus
34b2058faa
fix: add flag to annomise event log
2022-05-30 21:01:46 +02:00
sighphyre
0c1213ff81
feat: Add support for global segments ( #1577 )
...
feat: Add support for global segments
2022-05-30 09:10:20 +02:00
olav
59060ed3ea
refactor: improve OpenAPI refs ( #1620 )
...
* refactor: simplify FeatureEnvironmentSchema name
* refactor: format schema files
* fix: pass nested schemas to FromSchema
* refactor: remove ref order note
* refactor: fix overly strict required fields
* refactor: clean up mapper names and paths
* refactor: replace mappers with optional fields
2022-05-24 08:37:35 +02:00
olav
a8d34d6268
fix: the replaceGroupId field should be optional ( #1608 )
2022-05-20 11:07:30 +02:00
andreas-unleash
1a27bffe4d
Complete open api schemas for project features controller ( #1563 )
...
* Completed OpenAPI Schemas for ProjectFeatures Controller
Completed OpenAPI Schemas for Feature Controller (tags)
* Completed OpenAPI Schemas for ProjectFeatures Controller
Completed OpenAPI Schemas for Feature Controller (tags)
* bug fix
* bug fix
* fix merge conflicts, some refactoring
* fix merge conflicts, some refactoring
* fix merge conflicts, some refactoring
* added emptyResponse, patch feature operation schemas and request
* added emptyResponse, patch feature operation schemas and request
* patch strategy
* patch strategy
* update strategy
* update strategy
* fix pr comment
* fix pr comments
* improvements
* added operationId to schema for better generation
* fix pr comment
* fix pr comment
* fix pr comment
* improvements to generated and dynamic types
* improvements to generated and dynamic types
* improvements to generated and dynamic types
* Update response types to use inferred types
* Update addTag response status to 201
* refactor: move schema ref destructuring into createSchemaObject
* made serialize date handle deep objects
* made serialize date handle deep objects
* add `name` to IFeatureStrategy nad fix tests
* fix pr comments
* fix pr comments
* Add types to IAuthRequest
* Sync StrategySchema for FE and BE - into the rabbit hole
* Sync model with OAS spec
* Completed OpenAPI Schemas for ProjectFeatures Controller
Completed OpenAPI Schemas for Feature Controller (tags)
* Completed OpenAPI Schemas for ProjectFeatures Controller
Completed OpenAPI Schemas for Feature Controller (tags)
* bug fix
* bug fix
* fix merge conflicts, some refactoring
* fix merge conflicts, some refactoring
* fix merge conflicts, some refactoring
* added emptyResponse, patch feature operation schemas and request
* added emptyResponse, patch feature operation schemas and request
* patch strategy
* patch strategy
* update strategy
* update strategy
* fix pr comment
* fix pr comments
* improvements
* added operationId to schema for better generation
* fix pr comment
* fix pr comment
* fix pr comment
* improvements to generated and dynamic types
* improvements to generated and dynamic types
* improvements to generated and dynamic types
* Update response types to use inferred types
* Update addTag response status to 201
* refactor: move schema ref destructuring into createSchemaObject
* made serialize date handle deep objects
* made serialize date handle deep objects
* add `name` to IFeatureStrategy nad fix tests
* fix pr comments
* fix pr comments
* Add types to IAuthRequest
* Sync StrategySchema for FE and BE - into the rabbit hole
* Sync model with OAS spec
* Completed OpenAPI Schemas for ProjectFeatures Controller
Completed OpenAPI Schemas for Feature Controller (tags)
* Completed OpenAPI Schemas for ProjectFeatures Controller
Completed OpenAPI Schemas for Feature Controller (tags)
* bug fix
* bug fix
* fix merge conflicts, some refactoring
* fix merge conflicts, some refactoring
* fix merge conflicts, some refactoring
* added emptyResponse, patch feature operation schemas and request
* added emptyResponse, patch feature operation schemas and request
* patch strategy
* patch strategy
* update strategy
* update strategy
* fix pr comment
* fix pr comments
* improvements
* added operationId to schema for better generation
* fix pr comment
* fix pr comment
* fix pr comment
* improvements to generated and dynamic types
* improvements to generated and dynamic types
* improvements to generated and dynamic types
* Update response types to use inferred types
* Update addTag response status to 201
* refactor: move schema ref destructuring into createSchemaObject
* made serialize date handle deep objects
* made serialize date handle deep objects
* add `name` to IFeatureStrategy nad fix tests
* fix pr comments
* fix pr comments
* Add types to IAuthRequest
* Sync StrategySchema for FE and BE - into the rabbit hole
* Sync model with OAS spec
* Completed OpenAPI Schemas for ProjectFeatures Controller
Completed OpenAPI Schemas for Feature Controller (tags)
* Completed OpenAPI Schemas for ProjectFeatures Controller
Completed OpenAPI Schemas for Feature Controller (tags)
* bug fix
* bug fix
* fix merge conflicts, some refactoring
* fix merge conflicts, some refactoring
* fix merge conflicts, some refactoring
* added emptyResponse, patch feature operation schemas and request
* added emptyResponse, patch feature operation schemas and request
* patch strategy
* patch strategy
* update strategy
* update strategy
* fix pr comment
* fix pr comments
* improvements
* added operationId to schema for better generation
* fix pr comment
* fix pr comment
* fix pr comment
* improvements to generated and dynamic types
* improvements to generated and dynamic types
* improvements to generated and dynamic types
* Update response types to use inferred types
* Update addTag response status to 201
* refactor: move schema ref destructuring into createSchemaObject
* made serialize date handle deep objects
* made serialize date handle deep objects
* add `name` to IFeatureStrategy nad fix tests
* fix pr comments
* fix pr comments
* Add types to IAuthRequest
* Sync StrategySchema for FE and BE - into the rabbit hole
* Sync model with OAS spec
* revert
* revert
* revert
* revert
* revert
* mapper
* revert
* revert
* revert
* remove serialize-dates.ts
* remove serialize-dates.ts
* remove serialize-dates.ts
* remove serialize-dates.ts
* remove serialize-dates.ts
* revert
* revert
* add mappers
* add mappers
* fix pr comments
* ignore report.json
* ignore report.json
* Route permission required
Co-authored-by: olav <mail@olav.io>
2022-05-18 16:17:09 +03:00
olav
ac90a3b1c7
fix: remove trailing slash from OpenAPI route ( #1564 )
2022-05-05 11:45:23 +02:00
olav
56615e91f0
fix: validate the type and length of parameter values ( #1559 )
...
* refactor: coerce primitive types in OpenAPI requests
* refactor: avoid broken array args to serializeDates
* refactor: avoid some spec refs to improve generated types
* refactor: remove debug logging
* refactor: fix IExpressOpenApi interface name prefix
* refactor: ensure that parameter values are strings
* refactor: test that parameter values are coerced to strings
2022-05-04 15:16:18 +02:00
Nuno Góis
7e938a21b4
feat: show archived toggles on a project level ( #1555 )
...
* feat: show archived toggles on a project level
* refactor: split behaviour in 2 separate routes and methods for clarity
* add e2e test
2022-05-04 07:45:29 +01:00
olav
36922d156d
refactor: fix a few eslint module boundary type overrides ( #1542 )
2022-04-28 12:40:38 +02:00
olav
d0724afdf5
feat: add READ_API_TOKEN permission ( #1528 )
...
* refactor: extract accessibleTokens fn
* feat: add READ_API_TOKEN permission
2022-04-26 10:24:34 +02:00
olav
fdebeef929
feat: add OpenAPI validation to a few endpoints ( #1409 )
...
* feat: add OpenAPI validation to a few endpoints (2)
* refactor: use package version as the OpenAPI version
* refactor: keep the existing OpenAPI page for now
* refactor: add snapshots tests for the OpenAPI output
* refactor: validate Content-Type by default
* refactor: update vulnerable deps
* refactor: fix documentation URL to match schema
* refactor: improve external type declaration
* refactor: remove unused package resolutions
* refactor: try express-openapi fork
* Update package.json
* Update src/lib/services/openapi-service.ts
* Update src/lib/types/openapi.d.ts
* Update src/lib/types/openapi.d.ts
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2022-04-25 14:17:59 +02:00
Ivar Conradi Østhus
14694fdf04
fix: allow missing instanceId in client metrics ( #1522 )
...
* fix: allow missing instanceId in client metrics
* fix: remove ts-ignore
2022-04-22 13:52:27 +02:00
olav
e38f7cf7c2
feat: add context value descriptions ( #1496 )
...
* feat: add context value descriptions
* refactor: upcase SQL keywords
* refactor: allow blank descriptions
2022-04-19 08:40:07 +02:00
sighphyre
e889d8e29c
feat: Implement multi token support for client tokens
...
This adds support for multi project tokens to be created. Backward compatibility is handled at 3 different layers here:
- The API is made backwards compatible though a permissive data type that accepts either a project?: string or projects?: string[] property, validation is done through JOI here, which ensures that projects and project are not set together. In the case of neither, this defaults to the previous default of ALL_PROJECTS
- The service layer method to handle adding tokens has been made tolerant to either of the above case and has been deprecated, a new method supporting only the new structure of using projects has been added
- Existing compatibility for consumers of Unleash as a library should not be affected either, the ApiUser constructor is now tolerant to the the first input and will internally map to the new cleaned structure
2022-04-06 08:11:41 +02:00
olav
cf06b562f9
fix: allow instance ID to be empty for metrics ( #1471 )
2022-04-01 10:34:22 +02:00
olav
66d9d7a6d2
feat: add segments ( #1426 )
...
* refactor: fix missing tsconfig path in .eslintrc
* refactor: require contextName and operator
* refactor: fix crash on missing feature strategies
* feat: add segments schema
* feat: add segments client API
* feat: add segments permissions
* refactor: fail migration if things exist
* refactor: remove strategy IDs from responses
* refactor: allow empty description
* refactor: add segment import/export
* refactor: add perf scripts
* refactor: add get segment fn
* refactor: move constraint validation endpoint
* refactor: use a separate id for segment updates
* refactor: use PERF_AUTH_KEY for artillery
* refactor: adjust segment seed size
* refactor: add missing event data await
* refactor: improve method order
* refactor: remove request body limit override
2022-03-29 14:59:14 +02:00
Fredrik Strand Oseberg
6f075e4d1c
Feat/new constraint operators ( #1397 )
...
* feat: add migration for currentTime context field
* feat: add tests for number validator
* feat: add validation fields for constraint
* feat: add validation for semver, date and legalvalues
* fix: import paths
* fix: only allow specified operators
* fix: add operator test
* fix: reset db
* fix: remove unused import
* fix: set semver as dependency
2022-03-04 17:29:42 +01:00
Youssef
d4521a1c0c
fix: changeRole to assign roles without existing members
...
Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2022-03-03 14:33:32 +01:00
Christopher Kolstad
fc4d95ff5b
fix: configure user endpoint when AuthType is NONE ( #1403 )
...
Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2022-03-01 10:52:22 +01:00
olav
eb08ed0b55
refactor: add an hoursBack query param to the raw metrics endpoint ( #1373 )
...
* refactor: add an hoursBack query param to the raw metrics endpoint
* refactor: explicitly return undefined
* refactor: make parseHoursBackQueryParam non-static
* refactor: add test for hoursBack query param
* refactor: improve arg name
* refactor: add a 1 hour test case
2022-02-17 10:47:05 +01:00
Ivar Conradi Østhus
1cad01b97e
fix: welcome-email should not include password-link when disabled ( #1302 )
2022-01-28 12:50:35 +01:00