unleash-server 4.10.0-beta.5 → 4.10.0-beta.6
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 +8 -0
- package/dist/lib/app.js +6 -0
- package/dist/lib/app.js.map +1 -1
- package/dist/lib/middleware/demo-authentication.d.ts +2 -1
- package/dist/lib/middleware/demo-authentication.js +2 -1
- package/dist/lib/middleware/demo-authentication.js.map +1 -1
- package/dist/lib/middleware/no-authentication.js +1 -0
- package/dist/lib/middleware/no-authentication.js.map +1 -1
- package/dist/lib/openapi/index.d.ts +2 -0
- package/dist/lib/openapi/index.js +46 -0
- package/dist/lib/openapi/index.js.map +1 -0
- package/dist/lib/openapi/spec/constraint-schema.d.ts +38 -0
- package/dist/lib/openapi/spec/constraint-schema.js +24 -0
- package/dist/lib/openapi/spec/constraint-schema.js.map +1 -0
- package/dist/lib/openapi/spec/create-feature-request.d.ts +2 -0
- package/dist/lib/openapi/spec/create-feature-request.js +14 -0
- package/dist/lib/openapi/spec/create-feature-request.js.map +1 -0
- package/dist/lib/openapi/spec/create-feature-schema.d.ts +39 -0
- package/dist/lib/openapi/spec/create-feature-schema.js +24 -0
- package/dist/lib/openapi/spec/create-feature-schema.js.map +1 -0
- package/dist/lib/openapi/spec/feature-response.d.ts +2 -0
- package/dist/lib/openapi/spec/feature-response.js +14 -0
- package/dist/lib/openapi/spec/feature-response.js.map +1 -0
- package/dist/lib/openapi/spec/feature-schema.d.ts +101 -0
- package/dist/lib/openapi/spec/feature-schema.js +55 -0
- package/dist/lib/openapi/spec/feature-schema.js.map +1 -0
- package/dist/lib/openapi/spec/features-response.d.ts +2 -0
- package/dist/lib/openapi/spec/features-response.js +14 -0
- package/dist/lib/openapi/spec/features-response.js.map +1 -0
- package/dist/lib/openapi/spec/features-schema.d.ts +32 -0
- package/dist/lib/openapi/spec/features-schema.js +21 -0
- package/dist/lib/openapi/spec/features-schema.js.map +1 -0
- package/dist/lib/openapi/spec/override-schema.d.ts +32 -0
- package/dist/lib/openapi/spec/override-schema.js +21 -0
- package/dist/lib/openapi/spec/override-schema.js.map +1 -0
- package/dist/lib/openapi/spec/strategy-schema.d.ts +44 -0
- package/dist/lib/openapi/spec/strategy-schema.js +27 -0
- package/dist/lib/openapi/spec/strategy-schema.js.map +1 -0
- package/dist/lib/openapi/spec/variant-schema.d.ts +56 -0
- package/dist/lib/openapi/spec/variant-schema.js +33 -0
- package/dist/lib/openapi/spec/variant-schema.js.map +1 -0
- package/dist/lib/openapi/types.d.ts +11 -0
- package/dist/lib/openapi/types.js +7 -0
- package/dist/lib/openapi/types.js.map +1 -0
- package/dist/lib/routes/admin-api/api-token-controller.d.ts +1 -1
- package/dist/lib/routes/admin-api/api-token-controller.js +13 -16
- package/dist/lib/routes/admin-api/api-token-controller.js.map +1 -1
- package/dist/lib/routes/admin-api/archive.d.ts +4 -3
- package/dist/lib/routes/admin-api/archive.js +15 -2
- package/dist/lib/routes/admin-api/archive.js.map +1 -1
- package/dist/lib/routes/admin-api/feature.d.ts +3 -2
- package/dist/lib/routes/admin-api/feature.js +15 -2
- package/dist/lib/routes/admin-api/feature.js.map +1 -1
- package/dist/lib/routes/admin-api/project/features.d.ts +5 -3
- package/dist/lib/routes/admin-api/project/features.js +43 -5
- package/dist/lib/routes/admin-api/project/features.js.map +1 -1
- package/dist/lib/routes/client-api/register.test.js +13 -0
- package/dist/lib/routes/client-api/register.test.js.map +1 -1
- package/dist/lib/routes/controller.d.ts +13 -2
- package/dist/lib/routes/controller.js +46 -7
- package/dist/lib/routes/controller.js.map +1 -1
- package/dist/lib/services/addon-service-test-simple-addon.js +1 -1
- package/dist/lib/services/addon-service-test-simple-addon.js.map +1 -1
- package/dist/lib/services/client-metrics/schema.js +2 -2
- package/dist/lib/services/client-metrics/schema.js.map +1 -1
- package/dist/lib/services/client-metrics/schema.test.d.ts +1 -0
- package/dist/lib/services/client-metrics/schema.test.js +87 -0
- package/dist/lib/services/client-metrics/schema.test.js.map +1 -0
- package/dist/lib/services/feature-toggle-service.d.ts +2 -1
- package/dist/lib/services/feature-toggle-service.js +2 -1
- package/dist/lib/services/feature-toggle-service.js.map +1 -1
- package/dist/lib/services/index.js +3 -0
- package/dist/lib/services/index.js.map +1 -1
- package/dist/lib/services/openapi-service.d.ts +16 -0
- package/dist/lib/services/openapi-service.js +52 -0
- package/dist/lib/services/openapi-service.js.map +1 -0
- package/dist/lib/services/state-service.d.ts +2 -1
- package/dist/lib/services/state-service.js +2 -1
- package/dist/lib/services/state-service.js.map +1 -1
- package/dist/lib/types/mutable.d.ts +6 -0
- package/dist/lib/types/mutable.js +3 -0
- package/dist/lib/types/mutable.js.map +1 -0
- package/dist/lib/types/permissions.d.ts +1 -0
- package/dist/lib/types/permissions.js +2 -1
- package/dist/lib/types/permissions.js.map +1 -1
- package/dist/lib/types/services.d.ts +2 -0
- package/dist/lib/util/serialize-dates.d.ts +5 -0
- package/dist/lib/util/serialize-dates.js +17 -0
- package/dist/lib/util/serialize-dates.js.map +1 -0
- package/dist/lib/util/serialize-dates.test.d.ts +1 -0
- package/dist/lib/util/serialize-dates.test.js +17 -0
- package/dist/lib/util/serialize-dates.test.js.map +1 -0
- package/dist/migrations/20220425090847-add-token-permission.d.ts +2 -0
- package/dist/migrations/20220425090847-add-token-permission.js +31 -0
- package/dist/migrations/20220425090847-add-token-permission.js.map +1 -0
- package/dist/test/config/test-config.js +3 -6
- package/dist/test/config/test-config.js.map +1 -1
- package/dist/test/e2e/api/admin/api-token.auth.e2e.test.js +34 -7
- package/dist/test/e2e/api/admin/api-token.auth.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/openapi/openapi.e2e.test.d.ts +1 -0
- package/dist/test/e2e/api/openapi/openapi.e2e.test.js +39 -0
- package/dist/test/e2e/api/openapi/openapi.e2e.test.js.map +1 -0
- package/package.json +13 -8
package/README.md
CHANGED
|
@@ -110,6 +110,14 @@ We'd love to have your help too: Please feel free to open issues or provide pull
|
|
|
110
110
|
|
|
111
111
|
Check out [the CONTRIBUTING.md file](./CONTRIBUTING.md) for contribution guidelines and the [Unleash developer guide](./website/docs/contributing/developer-guide.md) for tips on environment setup, running the tests, and running Unleash from source.
|
|
112
112
|
|
|
113
|
+
### Contributors
|
|
114
|
+
|
|
115
|
+
<div align="center">
|
|
116
|
+
|
|
117
|
+
[](https://github.com/Unleash/unleash/graphs/contributors)
|
|
118
|
+
|
|
119
|
+
</div>
|
|
120
|
+
|
|
113
121
|
<br/>
|
|
114
122
|
|
|
115
123
|
## Features our users love
|
package/dist/lib/app.js
CHANGED
|
@@ -54,6 +54,9 @@ async function getApp(config, stores, services, unleashSession) {
|
|
|
54
54
|
if (config.enableOAS) {
|
|
55
55
|
app.use(`${baseUriPath}/oas`, express_1.default.static('docs/api/oas'));
|
|
56
56
|
}
|
|
57
|
+
if (config.enableOAS && services.openApiService) {
|
|
58
|
+
services.openApiService.useDocs(app);
|
|
59
|
+
}
|
|
57
60
|
switch (config.authentication.type) {
|
|
58
61
|
case option_1.IAuthType.OPEN_SOURCE: {
|
|
59
62
|
app.use(baseUriPath, (0, api_token_middleware_1.default)(config, services));
|
|
@@ -96,6 +99,9 @@ async function getApp(config, stores, services, unleashSession) {
|
|
|
96
99
|
}
|
|
97
100
|
// Setup API routes
|
|
98
101
|
app.use(`${baseUriPath}/`, new routes_1.default(config, services).router);
|
|
102
|
+
if (services.openApiService) {
|
|
103
|
+
services.openApiService.useErrorHandler(app);
|
|
104
|
+
}
|
|
99
105
|
if (process.env.NODE_ENV !== 'production') {
|
|
100
106
|
app.use((0, errorhandler_1.default)());
|
|
101
107
|
}
|
package/dist/lib/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/lib/app.ts"],"names":[],"mappings":";;;;;AAAA,uDAAgD;AAChD,sDAA+D;AAC/D,gDAAwB;AACxB,8DAAsC;AACtC,kEAAoC;AACpC,kEAAyC;AACzC,gDAAwB;AACxB,gEAAwC;AACxC,8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,IAAI,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC,CAAC;YACrD,OAAO;SACV;QAED,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACf,CAAC;AApID,yBAoIC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Application } from 'express';
|
|
2
2
|
import { IUnleashServices } from '../types/services';
|
|
3
3
|
import { IUnleashConfig } from '../types/option';
|
|
4
|
-
declare function demoAuthentication(app: Application, basePath: string,
|
|
4
|
+
declare function demoAuthentication(app: Application, basePath: string, // eslint-disable-line
|
|
5
|
+
{ userService }: Pick<IUnleashServices, 'userService'>, { authentication }: Pick<IUnleashConfig, 'authentication'>): void;
|
|
5
6
|
export default demoAuthentication;
|
|
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const authentication_required_1 = __importDefault(require("../types/authentication-required"));
|
|
7
7
|
const api_user_1 = __importDefault(require("../types/api-user"));
|
|
8
8
|
const api_token_1 = require("../types/models/api-token");
|
|
9
|
-
function demoAuthentication(app, basePath = '',
|
|
9
|
+
function demoAuthentication(app, basePath = '', // eslint-disable-line
|
|
10
|
+
{ userService }, { authentication }) {
|
|
10
11
|
app.post(`${basePath}/auth/demo/login`, async (req, res) => {
|
|
11
12
|
const { email } = req.body;
|
|
12
13
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"demo-authentication.js","sourceRoot":"","sources":["../../../src/lib/middleware/demo-authentication.ts"],"names":[],"mappings":";;;;;AACA,+FAAsE;AAGtE,iEAAwC;AACxC,yDAAyD;AAEzD,SAAS,kBAAkB,CACvB,GAAgB,EAChB,WAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"demo-authentication.js","sourceRoot":"","sources":["../../../src/lib/middleware/demo-authentication.ts"],"names":[],"mappings":";;;;;AACA,+FAAsE;AAGtE,iEAAwC;AACxC,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GAAG,CAAC,IAAI,EAAE;YAC7C,aAAa;YACb,GAAG,CAAC,IAAI,GAAG,IAAI,kBAAO,CAAC;gBACnB,QAAQ,EAAE,yBAAyB;gBACnC,WAAW,EAAE,EAAE;gBACf,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,wBAAY,CAAC,MAAM;gBACzB,OAAO,EAAE,GAAG;aACf,CAAC,CAAC;SACN;QACD,IAAI,EAAE,CAAC;IACX,CAAC,CAAC,CAAC;IAEH,GAAG,CAAC,GAAG,CAAC,GAAG,QAAQ,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC1C,aAAa;QACb,IAAI,GAAG,CAAC,IAAI,EAAE;YACV,OAAO,IAAI,EAAE,CAAC;SACjB;QACD,OAAO,GAAG;aACL,MAAM,CAAC,GAAG,CAAC;aACX,IAAI,CACD,IAAI,iCAAsB,CAAC;YACvB,IAAI,EAAE,GAAG,QAAQ,kBAAkB;YACnC,IAAI,EAAE,MAAM;YACZ,OAAO,EACH,wDAAwD;SAC/D,CAAC,CACL;aACA,GAAG,EAAE,CAAC;IACf,CAAC,CAAC,CAAC;AACP,CAAC;AAED,kBAAe,kBAAkB,CAAC"}
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const no_auth_user_1 = __importDefault(require("../types/no-auth-user"));
|
|
7
|
+
// eslint-disable-next-line
|
|
7
8
|
function noneAuthentication(basePath = '', app) {
|
|
8
9
|
app.use(`${basePath}/api/admin/`, (req, res, next) => {
|
|
9
10
|
// @ts-ignore
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-authentication.js","sourceRoot":"","sources":["../../../src/lib/middleware/no-authentication.ts"],"names":[],"mappings":";;;;;AACA,yEAA+C;AAE/C,SAAS,kBAAkB,CAAC,QAAQ,GAAG,EAAE,EAAE,GAAgB;IACvD,GAAG,CAAC,GAAG,CAAC,GAAG,QAAQ,aAAa,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QACjD,aAAa;QACb,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;YACX,mBAAmB;YACnB,GAAG,CAAC,IAAI,GAAG,IAAI,sBAAU,EAAE,CAAC;SAC/B;QACD,IAAI,EAAE,CAAC;IACX,CAAC,CAAC,CAAC;AACP,CAAC;AACD,kBAAe,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"no-authentication.js","sourceRoot":"","sources":["../../../src/lib/middleware/no-authentication.ts"],"names":[],"mappings":";;;;;AACA,yEAA+C;AAE/C,2BAA2B;AAC3B,SAAS,kBAAkB,CAAC,QAAQ,GAAG,EAAE,EAAE,GAAgB;IACvD,GAAG,CAAC,GAAG,CAAC,GAAG,QAAQ,aAAa,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QACjD,aAAa;QACb,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;YACX,mBAAmB;YACnB,GAAG,CAAC,IAAI,GAAG,IAAI,sBAAU,EAAE,CAAC;SAC/B;QACD,IAAI,EAAE,CAAC;IACX,CAAC,CAAC,CAAC;AACP,CAAC;AACD,kBAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createOpenApiSchema = void 0;
|
|
4
|
+
const features_schema_1 = require("./spec/features-schema");
|
|
5
|
+
const feature_schema_1 = require("./spec/feature-schema");
|
|
6
|
+
const strategy_schema_1 = require("./spec/strategy-schema");
|
|
7
|
+
const variant_schema_1 = require("./spec/variant-schema");
|
|
8
|
+
const override_schema_1 = require("./spec/override-schema");
|
|
9
|
+
const create_feature_schema_1 = require("./spec/create-feature-schema");
|
|
10
|
+
const constraint_schema_1 = require("./spec/constraint-schema");
|
|
11
|
+
// Create the base OpenAPI schema, with everything except paths.
|
|
12
|
+
const createOpenApiSchema = (serverUrl) => {
|
|
13
|
+
return {
|
|
14
|
+
openapi: '3.0.3',
|
|
15
|
+
servers: serverUrl ? [{ url: serverUrl }] : [],
|
|
16
|
+
info: {
|
|
17
|
+
title: 'Unleash API',
|
|
18
|
+
version: process.env.npm_package_version,
|
|
19
|
+
},
|
|
20
|
+
security: [
|
|
21
|
+
{
|
|
22
|
+
apiKey: [],
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
components: {
|
|
26
|
+
securitySchemes: {
|
|
27
|
+
apiKey: {
|
|
28
|
+
type: 'apiKey',
|
|
29
|
+
in: 'header',
|
|
30
|
+
name: 'Authorization',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
schemas: {
|
|
34
|
+
createFeatureSchema: create_feature_schema_1.createFeatureSchema,
|
|
35
|
+
featuresSchema: features_schema_1.featuresSchema,
|
|
36
|
+
featureSchema: feature_schema_1.featureSchema,
|
|
37
|
+
strategySchema: strategy_schema_1.strategySchema,
|
|
38
|
+
variantSchema: variant_schema_1.variantSchema,
|
|
39
|
+
overrideSchema: override_schema_1.overrideSchema,
|
|
40
|
+
constraintSchema: constraint_schema_1.constraintSchema,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
exports.createOpenApiSchema = createOpenApiSchema;
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/openapi/index.ts"],"names":[],"mappings":";;;AACA,4DAAwD;AACxD,0DAAsD;AACtD,4DAAwD;AACxD,0DAAsD;AACtD,4DAAwD;AACxD,wEAAmE;AACnE,gEAA4D;AAE5D,gEAAgE;AACzD,MAAM,mBAAmB,GAAG,CAC/B,SAAkB,EACe,EAAE;IACnC,OAAO;QACH,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;QAC9C,IAAI,EAAE;YACF,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB;SAC3C;QACD,QAAQ,EAAE;YACN;gBACI,MAAM,EAAE,EAAE;aACb;SACJ;QACD,UAAU,EAAE;YACR,eAAe,EAAE;gBACb,MAAM,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,EAAE,EAAE,QAAQ;oBACZ,IAAI,EAAE,eAAe;iBACxB;aACJ;YACD,OAAO,EAAE;gBACL,mBAAmB,EAAnB,2CAAmB;gBACnB,cAAc,EAAd,gCAAc;gBACd,aAAa,EAAb,8BAAa;gBACb,cAAc,EAAd,gCAAc;gBACd,aAAa,EAAb,8BAAa;gBACb,cAAc,EAAd,gCAAc;gBACd,gBAAgB,EAAhB,oCAAgB;aACnB;SACJ;KACJ,CAAC;AACN,CAAC,CAAC;AAlCW,QAAA,mBAAmB,uBAkC9B"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CreateSchemaType } from '../types';
|
|
2
|
+
export declare const schema: {
|
|
3
|
+
readonly type: "object";
|
|
4
|
+
readonly required: readonly ["contextName", "operator"];
|
|
5
|
+
readonly properties: {
|
|
6
|
+
readonly contextName: {
|
|
7
|
+
readonly type: "string";
|
|
8
|
+
};
|
|
9
|
+
readonly operator: {
|
|
10
|
+
readonly type: "string";
|
|
11
|
+
};
|
|
12
|
+
readonly values: {
|
|
13
|
+
readonly type: "array";
|
|
14
|
+
readonly items: {
|
|
15
|
+
readonly type: "string";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare type ConstraintSchema = CreateSchemaType<typeof schema>;
|
|
21
|
+
export declare const constraintSchema: import("../../types/mutable").DeepMutable<{
|
|
22
|
+
readonly type: "object";
|
|
23
|
+
readonly required: readonly ["contextName", "operator"];
|
|
24
|
+
readonly properties: {
|
|
25
|
+
readonly contextName: {
|
|
26
|
+
readonly type: "string";
|
|
27
|
+
};
|
|
28
|
+
readonly operator: {
|
|
29
|
+
readonly type: "string";
|
|
30
|
+
};
|
|
31
|
+
readonly values: {
|
|
32
|
+
readonly type: "array";
|
|
33
|
+
readonly items: {
|
|
34
|
+
readonly type: "string";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.constraintSchema = exports.schema = void 0;
|
|
4
|
+
const types_1 = require("../types");
|
|
5
|
+
exports.schema = {
|
|
6
|
+
type: 'object',
|
|
7
|
+
required: ['contextName', 'operator'],
|
|
8
|
+
properties: {
|
|
9
|
+
contextName: {
|
|
10
|
+
type: 'string',
|
|
11
|
+
},
|
|
12
|
+
operator: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
},
|
|
15
|
+
values: {
|
|
16
|
+
type: 'array',
|
|
17
|
+
items: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
exports.constraintSchema = (0, types_1.createSchemaObject)(exports.schema);
|
|
24
|
+
//# sourceMappingURL=constraint-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constraint-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/constraint-schema.ts"],"names":[],"mappings":";;;AAAA,oCAAgE;AAEnD,QAAA,MAAM,GAAG;IAClB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,aAAa,EAAE,UAAU,CAAC;IACrC,UAAU,EAAE;QACR,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;SACjB;QACD,QAAQ,EAAE;YACN,IAAI,EAAE,QAAQ;SACjB;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB;SACJ;KACJ;CACK,CAAC;AAIE,QAAA,gBAAgB,GAAG,IAAA,0BAAkB,EAAC,cAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createFeatureRequest = void 0;
|
|
4
|
+
exports.createFeatureRequest = {
|
|
5
|
+
required: true,
|
|
6
|
+
content: {
|
|
7
|
+
'application/json': {
|
|
8
|
+
schema: {
|
|
9
|
+
$ref: '#/components/schemas/createFeatureSchema',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=create-feature-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-feature-request.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/create-feature-request.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAgC;IAC7D,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE;QACL,kBAAkB,EAAE;YAChB,MAAM,EAAE;gBACJ,IAAI,EAAE,0CAA0C;aACnD;SACJ;KACJ;CACJ,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { CreateSchemaType } from '../types';
|
|
2
|
+
declare const schema: {
|
|
3
|
+
readonly type: "object";
|
|
4
|
+
readonly required: readonly ["name"];
|
|
5
|
+
readonly properties: {
|
|
6
|
+
readonly name: {
|
|
7
|
+
readonly type: "string";
|
|
8
|
+
};
|
|
9
|
+
readonly type: {
|
|
10
|
+
readonly type: "string";
|
|
11
|
+
};
|
|
12
|
+
readonly description: {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
};
|
|
15
|
+
readonly impressionData: {
|
|
16
|
+
readonly type: "boolean";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare type CreateFeatureSchema = CreateSchemaType<typeof schema>;
|
|
21
|
+
export declare const createFeatureSchema: import("../../types/mutable").DeepMutable<{
|
|
22
|
+
readonly type: "object";
|
|
23
|
+
readonly required: readonly ["name"];
|
|
24
|
+
readonly properties: {
|
|
25
|
+
readonly name: {
|
|
26
|
+
readonly type: "string";
|
|
27
|
+
};
|
|
28
|
+
readonly type: {
|
|
29
|
+
readonly type: "string";
|
|
30
|
+
};
|
|
31
|
+
readonly description: {
|
|
32
|
+
readonly type: "string";
|
|
33
|
+
};
|
|
34
|
+
readonly impressionData: {
|
|
35
|
+
readonly type: "boolean";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}>;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createFeatureSchema = void 0;
|
|
4
|
+
const types_1 = require("../types");
|
|
5
|
+
const schema = {
|
|
6
|
+
type: 'object',
|
|
7
|
+
required: ['name'],
|
|
8
|
+
properties: {
|
|
9
|
+
name: {
|
|
10
|
+
type: 'string',
|
|
11
|
+
},
|
|
12
|
+
type: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
},
|
|
15
|
+
description: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
},
|
|
18
|
+
impressionData: {
|
|
19
|
+
type: 'boolean',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
exports.createFeatureSchema = (0, types_1.createSchemaObject)(schema);
|
|
24
|
+
//# sourceMappingURL=create-feature-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-feature-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/create-feature-schema.ts"],"names":[],"mappings":";;;AAAA,oCAAgE;AAEhE,MAAM,MAAM,GAAG;IACX,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,UAAU,EAAE;QACR,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;SACjB;QACD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;SACjB;QACD,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;SACjB;QACD,cAAc,EAAE;YACZ,IAAI,EAAE,SAAS;SAClB;KACJ;CACK,CAAC;AAIE,QAAA,mBAAmB,GAAG,IAAA,0BAAkB,EAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.featureResponse = void 0;
|
|
4
|
+
exports.featureResponse = {
|
|
5
|
+
description: 'featureResponse',
|
|
6
|
+
content: {
|
|
7
|
+
'application/json': {
|
|
8
|
+
schema: {
|
|
9
|
+
$ref: '#/components/schemas/featureSchema',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=feature-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-response.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/feature-response.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAA6B;IACrD,WAAW,EAAE,iBAAiB;IAC9B,OAAO,EAAE;QACL,kBAAkB,EAAE;YAChB,MAAM,EAAE;gBACJ,IAAI,EAAE,oCAAoC;aAC7C;SACJ;KACJ;CACJ,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { CreateSchemaType } from '../types';
|
|
2
|
+
declare const schema: {
|
|
3
|
+
readonly type: "object";
|
|
4
|
+
readonly required: readonly ["name", "project"];
|
|
5
|
+
readonly properties: {
|
|
6
|
+
readonly name: {
|
|
7
|
+
readonly type: "string";
|
|
8
|
+
};
|
|
9
|
+
readonly type: {
|
|
10
|
+
readonly type: "string";
|
|
11
|
+
};
|
|
12
|
+
readonly description: {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
};
|
|
15
|
+
readonly project: {
|
|
16
|
+
readonly type: "string";
|
|
17
|
+
};
|
|
18
|
+
readonly enabled: {
|
|
19
|
+
readonly type: "boolean";
|
|
20
|
+
};
|
|
21
|
+
readonly stale: {
|
|
22
|
+
readonly type: "boolean";
|
|
23
|
+
};
|
|
24
|
+
readonly impressionData: {
|
|
25
|
+
readonly type: "boolean";
|
|
26
|
+
};
|
|
27
|
+
readonly createdAt: {
|
|
28
|
+
readonly type: "string";
|
|
29
|
+
readonly format: "date";
|
|
30
|
+
readonly nullable: true;
|
|
31
|
+
};
|
|
32
|
+
readonly lastSeenAt: {
|
|
33
|
+
readonly type: "string";
|
|
34
|
+
readonly format: "date";
|
|
35
|
+
readonly nullable: true;
|
|
36
|
+
};
|
|
37
|
+
readonly strategies: {
|
|
38
|
+
readonly type: "array";
|
|
39
|
+
readonly items: {
|
|
40
|
+
readonly $ref: "#/components/schemas/strategySchema";
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
readonly variants: {
|
|
44
|
+
readonly items: {
|
|
45
|
+
readonly $ref: "#/components/schemas/variantSchema";
|
|
46
|
+
};
|
|
47
|
+
readonly type: "array";
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export declare type FeatureSchema = CreateSchemaType<typeof schema>;
|
|
52
|
+
export declare const featureSchema: import("../../types/mutable").DeepMutable<{
|
|
53
|
+
readonly type: "object";
|
|
54
|
+
readonly required: readonly ["name", "project"];
|
|
55
|
+
readonly properties: {
|
|
56
|
+
readonly name: {
|
|
57
|
+
readonly type: "string";
|
|
58
|
+
};
|
|
59
|
+
readonly type: {
|
|
60
|
+
readonly type: "string";
|
|
61
|
+
};
|
|
62
|
+
readonly description: {
|
|
63
|
+
readonly type: "string";
|
|
64
|
+
};
|
|
65
|
+
readonly project: {
|
|
66
|
+
readonly type: "string";
|
|
67
|
+
};
|
|
68
|
+
readonly enabled: {
|
|
69
|
+
readonly type: "boolean";
|
|
70
|
+
};
|
|
71
|
+
readonly stale: {
|
|
72
|
+
readonly type: "boolean";
|
|
73
|
+
};
|
|
74
|
+
readonly impressionData: {
|
|
75
|
+
readonly type: "boolean";
|
|
76
|
+
};
|
|
77
|
+
readonly createdAt: {
|
|
78
|
+
readonly type: "string";
|
|
79
|
+
readonly format: "date";
|
|
80
|
+
readonly nullable: true;
|
|
81
|
+
};
|
|
82
|
+
readonly lastSeenAt: {
|
|
83
|
+
readonly type: "string";
|
|
84
|
+
readonly format: "date";
|
|
85
|
+
readonly nullable: true;
|
|
86
|
+
};
|
|
87
|
+
readonly strategies: {
|
|
88
|
+
readonly type: "array";
|
|
89
|
+
readonly items: {
|
|
90
|
+
readonly $ref: "#/components/schemas/strategySchema";
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
readonly variants: {
|
|
94
|
+
readonly items: {
|
|
95
|
+
readonly $ref: "#/components/schemas/variantSchema";
|
|
96
|
+
};
|
|
97
|
+
readonly type: "array";
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
}>;
|
|
101
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.featureSchema = void 0;
|
|
4
|
+
const types_1 = require("../types");
|
|
5
|
+
const schema = {
|
|
6
|
+
type: 'object',
|
|
7
|
+
required: ['name', 'project'],
|
|
8
|
+
properties: {
|
|
9
|
+
name: {
|
|
10
|
+
type: 'string',
|
|
11
|
+
},
|
|
12
|
+
type: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
},
|
|
15
|
+
description: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
},
|
|
18
|
+
project: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
},
|
|
21
|
+
enabled: {
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
},
|
|
24
|
+
stale: {
|
|
25
|
+
type: 'boolean',
|
|
26
|
+
},
|
|
27
|
+
impressionData: {
|
|
28
|
+
type: 'boolean',
|
|
29
|
+
},
|
|
30
|
+
createdAt: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
format: 'date',
|
|
33
|
+
nullable: true,
|
|
34
|
+
},
|
|
35
|
+
lastSeenAt: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
format: 'date',
|
|
38
|
+
nullable: true,
|
|
39
|
+
},
|
|
40
|
+
strategies: {
|
|
41
|
+
type: 'array',
|
|
42
|
+
items: {
|
|
43
|
+
$ref: '#/components/schemas/strategySchema',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
variants: {
|
|
47
|
+
items: {
|
|
48
|
+
$ref: '#/components/schemas/variantSchema',
|
|
49
|
+
},
|
|
50
|
+
type: 'array',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
exports.featureSchema = (0, types_1.createSchemaObject)(schema);
|
|
55
|
+
//# sourceMappingURL=feature-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/feature-schema.ts"],"names":[],"mappings":";;;AAAA,oCAAgE;AAEhE,MAAM,MAAM,GAAG;IACX,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;IAC7B,UAAU,EAAE;QACR,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;SACjB;QACD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;SACjB;QACD,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;SACjB;QACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;SACjB;QACD,OAAO,EAAE;YACL,IAAI,EAAE,SAAS;SAClB;QACD,KAAK,EAAE;YACH,IAAI,EAAE,SAAS;SAClB;QACD,cAAc,EAAE;YACZ,IAAI,EAAE,SAAS;SAClB;QACD,SAAS,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,IAAI;SACjB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,IAAI;SACjB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,qCAAqC;aAC9C;SACJ;QACD,QAAQ,EAAE;YACN,KAAK,EAAE;gBACH,IAAI,EAAE,oCAAoC;aAC7C;YACD,IAAI,EAAE,OAAO;SAChB;KACJ;CACK,CAAC;AAIE,QAAA,aAAa,GAAG,IAAA,0BAAkB,EAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.featuresResponse = void 0;
|
|
4
|
+
exports.featuresResponse = {
|
|
5
|
+
description: 'featuresResponse',
|
|
6
|
+
content: {
|
|
7
|
+
'application/json': {
|
|
8
|
+
schema: {
|
|
9
|
+
$ref: '#/components/schemas/featuresSchema',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=features-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features-response.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/features-response.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAA6B;IACtD,WAAW,EAAE,kBAAkB;IAC/B,OAAO,EAAE;QACL,kBAAkB,EAAE;YAChB,MAAM,EAAE;gBACJ,IAAI,EAAE,qCAAqC;aAC9C;SACJ;KACJ;CACJ,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CreateSchemaType } from '../types';
|
|
2
|
+
export declare const schema: {
|
|
3
|
+
readonly type: "object";
|
|
4
|
+
readonly required: readonly ["version", "features"];
|
|
5
|
+
readonly properties: {
|
|
6
|
+
readonly version: {
|
|
7
|
+
readonly type: "integer";
|
|
8
|
+
};
|
|
9
|
+
readonly features: {
|
|
10
|
+
readonly type: "array";
|
|
11
|
+
readonly items: {
|
|
12
|
+
readonly $ref: "#/components/schemas/featureSchema";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare type FeaturesSchema = CreateSchemaType<typeof schema>;
|
|
18
|
+
export declare const featuresSchema: import("../../types/mutable").DeepMutable<{
|
|
19
|
+
readonly type: "object";
|
|
20
|
+
readonly required: readonly ["version", "features"];
|
|
21
|
+
readonly properties: {
|
|
22
|
+
readonly version: {
|
|
23
|
+
readonly type: "integer";
|
|
24
|
+
};
|
|
25
|
+
readonly features: {
|
|
26
|
+
readonly type: "array";
|
|
27
|
+
readonly items: {
|
|
28
|
+
readonly $ref: "#/components/schemas/featureSchema";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.featuresSchema = exports.schema = void 0;
|
|
4
|
+
const types_1 = require("../types");
|
|
5
|
+
exports.schema = {
|
|
6
|
+
type: 'object',
|
|
7
|
+
required: ['version', 'features'],
|
|
8
|
+
properties: {
|
|
9
|
+
version: {
|
|
10
|
+
type: 'integer',
|
|
11
|
+
},
|
|
12
|
+
features: {
|
|
13
|
+
type: 'array',
|
|
14
|
+
items: {
|
|
15
|
+
$ref: '#/components/schemas/featureSchema',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
exports.featuresSchema = (0, types_1.createSchemaObject)(exports.schema);
|
|
21
|
+
//# sourceMappingURL=features-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/features-schema.ts"],"names":[],"mappings":";;;AAAA,oCAAgE;AAEnD,QAAA,MAAM,GAAG;IAClB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;IACjC,UAAU,EAAE;QACR,OAAO,EAAE;YACL,IAAI,EAAE,SAAS;SAClB;QACD,QAAQ,EAAE;YACN,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,oCAAoC;aAC7C;SACJ;KACJ;CACK,CAAC;AAIE,QAAA,cAAc,GAAG,IAAA,0BAAkB,EAAC,cAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CreateSchemaType } from '../types';
|
|
2
|
+
export declare const schema: {
|
|
3
|
+
readonly type: "object";
|
|
4
|
+
readonly required: readonly ["contextName", "values"];
|
|
5
|
+
readonly properties: {
|
|
6
|
+
readonly contextName: {
|
|
7
|
+
readonly type: "string";
|
|
8
|
+
};
|
|
9
|
+
readonly values: {
|
|
10
|
+
readonly type: "array";
|
|
11
|
+
readonly items: {
|
|
12
|
+
readonly type: "string";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare type OverrideSchema = CreateSchemaType<typeof schema>;
|
|
18
|
+
export declare const overrideSchema: import("../../types/mutable").DeepMutable<{
|
|
19
|
+
readonly type: "object";
|
|
20
|
+
readonly required: readonly ["contextName", "values"];
|
|
21
|
+
readonly properties: {
|
|
22
|
+
readonly contextName: {
|
|
23
|
+
readonly type: "string";
|
|
24
|
+
};
|
|
25
|
+
readonly values: {
|
|
26
|
+
readonly type: "array";
|
|
27
|
+
readonly items: {
|
|
28
|
+
readonly type: "string";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.overrideSchema = exports.schema = void 0;
|
|
4
|
+
const types_1 = require("../types");
|
|
5
|
+
exports.schema = {
|
|
6
|
+
type: 'object',
|
|
7
|
+
required: ['contextName', 'values'],
|
|
8
|
+
properties: {
|
|
9
|
+
contextName: {
|
|
10
|
+
type: 'string',
|
|
11
|
+
},
|
|
12
|
+
values: {
|
|
13
|
+
type: 'array',
|
|
14
|
+
items: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
exports.overrideSchema = (0, types_1.createSchemaObject)(exports.schema);
|
|
21
|
+
//# sourceMappingURL=override-schema.js.map
|