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
dadbc3addc
fix: add missing segment-deleted event data ( #1677 )
2022-06-07 14:06:45 +02:00
Thomas Heartman
fa74f81aa5
fix: env drop event data.name + /api/admin/events docs ( #1662 )
...
* docs: add all /events endpoints and query params
* docs: events page skeleton structure
* docs: correct description of event payloads
* docs: add table with event properties.
* docs: remove duplicate table.
* docs: sort property table
* docs: more work on adding events: feature events
* docs: add examples for most feature events
Still missing are: events that require imports, and
feature-project-change
* docs: scaffold out all events descriptions
* docs: normalize casing
* docs: add brief descriptions to strategy and context events
* docs: Add remaining non-import event descriptions and examples
* docs: add code sample annotations for all example events.
* docs: remove all references to myself
* docs: change "toggle" -> "feature", adjust headings
The headings aren't semantic for this doc yet. We'll need to create a
new document for this.
* docs: update event type description table
* docs: change header level of event type section
* docs: add details around feature-project-change event
* docs: add import type events
* docs: use a better `createdBy` name
* docs: "sort" events so that they're in a consistent order.
* docs: remove reference to ID in addon-config-created event
* fix: drop-environments data.name all-projects -> all-environments
This is probably a bug. Should be double checked.
* docs: clarify that `data.name` is always `all-x` on drop events
* Apply suggestions from code review
Co-authored-by: sighphyre <liquidwicked64@gmail.com>
Co-authored-by: sighphyre <liquidwicked64@gmail.com>
2022-06-07 11:33:30 +01: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
Christopher Kolstad
00c84f3c75
fix: use getCreatedBy to set created by on events stored ( #1648 )
2022-06-02 13:52:10 +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
Christopher Kolstad
606270d86a
feat: Allow extra CSP domains ( #1610 )
...
* feat: Allow extra CSP domains
Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
* fix: eslint:
* fix: allow partial csp domains
* fix: add option and config type
* fix: snapshot
Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2022-05-31 11:32:15 +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
sighphyre
6273d0d924
fix: Allow project roles to be changed when the relevant user has a root role ( #1632 )
2022-05-26 16:20:36 +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
Tymoteusz Czech
0f272680ee
fix: project environments order ( #1599 )
2022-05-23 08:52:50 +00:00
olav
b53912aef9
refactor: add regression test for long parameter values ( #1617 )
...
* refactor: add regression test for long parameter values
* refactor: format file
2022-05-20 15:44:41 +02:00
olav
05808745a7
fix: remove parametersSchema maxLength requirement ( #1616 )
2022-05-20 11:31:34 +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
8c1d4838b8
fix: require equal environments when moving toggles ( #1595 )
...
* fix: apply query from checkProjectsCompatibility
* fix: require equal environments when moving toggles
* refactor: clean up project service tests
* refactor: add test for project compatibility check
* refactor: improve arraysHaveSameItems name
2022-05-18 11:07:01 +02:00
Wilco Schoneveld
c30e92dc49
Added ability to set additional transport options to email service ( #1589 )
...
Co-authored-by: Wilco Schoneveld <wilco.schoneveld@politie.nl>
2022-05-13 09:06:10 +02:00
olav
3bea8a9931
refactor: use static as the asset dir name ( #1586 )
...
* refactor: use static as the asset dir name
* chore: update unleash-frontend
* refactor: use the real index.html in tests
2022-05-10 15:47:54 +02:00
olav
3b46bfb83a
refactor: fix CDN prefix rewrite ( #1585 )
...
* fix: change folder path
* refactor: revert cdnPrefix test config
* refactor: fix rewriteHTML test data
* refactor: add rewriteHTML cdnPrefix test
Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2022-05-10 14:05:53 +02:00
Ivar Conradi Østhus
d711c4749d
fix: correct types used in addon.ts
2022-05-10 09:35:39 +02:00
sighphyre
5ef8dba7a7
fix: Upgrade knex to 2.0.0 and patch some stores to correctly order their count queries so they compile ( #1579 )
2022-05-09 15:20:12 +02:00
Connor Teague
e67c0d115b
1568 fix datadog type/value order in addon ( #1569 )
2022-05-06 09:07:19 +02:00
Nuno Góis
ce2714713a
refactor: use vite html in test ( #1561 )
2022-05-05 16:14:47 +01: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
Fredrik Strand Oseberg
42e32a9118
fix: set favicon icon to CDN if prefix is set ( #1553 )
2022-05-02 12:49:48 +02:00
Martin Lehmann
a36a19c33a
Don't import from root URL ( #1540 )
2022-04-29 10:44:01 +02:00
olav
c02865504e
refactor: disallow additionalProperties in response schemas ( #1543 )
2022-04-29 08:09:27 +02:00
olav
36922d156d
refactor: fix a few eslint module boundary type overrides ( #1542 )
2022-04-28 12:40:38 +02:00
Christopher Kolstad
3e40cb935e
task: Use make-fetch-happen ( #1500 )
...
closes #739
2022-04-28 10:57:52 +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
renovate[bot]
f52f1cadac
chore(deps): update dependency eslint-config-airbnb-typescript to v16.1.0 ( #1147 )
...
* chore(deps): update dependency eslint-config-airbnb-typescript to v16.1.0
* chore: Update a few places with eslint-ignore due to new linter rules for optional parameters
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: sighphyre <liquidwicked64@gmail.com>
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2022-04-25 13:14:43 +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
c9b44b6546
Merge pull request #1476 from Unleash/feat/multi-project-tokens
...
feat: Implement multi token support for client tokens
2022-04-08 11:51:31 +02:00
Salvatore Novelli
7ddbff2669
feat: add "application_name" as an optional DB option #1170 ( #1478 )
...
* implemented changes to resolve issue 1170
* added applicationName to the list of db options in the documentation'
Co-authored-by: Daniele Casal <daniele.casal@lloydsbanking.com>
Co-authored-by: Sukhvinder Panesar <79143027+esspee-lbg@users.noreply.github.com>
2022-04-07 20:55:56 +02:00
abhinav1708
66c66c7e4a
feat: events for feature tag and untag ( #1355 )
2022-04-06 20:51:01 +02:00
Nuno Góis
794327f8e0
fix: reject duplicate segment names ( #1475 )
...
* fix: reject duplicate segment names
* refactor: remove unnecessary comment
* refactor: improve validateName logic with existsByName
* fix: removed unused NotFoundError import
2022-04-06 14:01:50 +01: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
9f7d878422
fix: add missing awaits ( #1472 )
...
* refactor: silence expected console.error call
* fix: add missing access service awaits
* fix: add missing constraint validation await
2022-04-01 11:10:21 +02:00
olav
1da38781d5
feat: add segment limits ( #1469 )
...
* feat: add segment limits
* refactor: move segment limits to constants
2022-04-01 10:53:52 +02:00