unleash-server 4.22.0-beta.64 → 4.22.0-beta.65
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/dist/lib/openapi/index.d.ts +13 -0
- package/dist/lib/openapi/index.js +1 -0
- package/dist/lib/openapi/index.js.map +1 -1
- package/dist/lib/openapi/spec/index.d.ts +1 -0
- package/dist/lib/openapi/spec/index.js +1 -0
- package/dist/lib/openapi/spec/index.js.map +1 -1
- package/dist/lib/openapi/spec/stickiness-schema.d.ts +15 -0
- package/dist/lib/openapi/spec/stickiness-schema.js +17 -0
- package/dist/lib/openapi/spec/stickiness-schema.js.map +1 -0
- package/dist/lib/openapi/validate.d.ts +1 -1
- package/dist/lib/routes/admin-api/project/index.d.ts +4 -1
- package/dist/lib/routes/admin-api/project/index.js +60 -0
- package/dist/lib/routes/admin-api/project/index.js.map +1 -1
- package/dist/test/e2e/api/admin/project/projects.e2e.test.js +20 -0
- package/dist/test/e2e/api/admin/project/projects.e2e.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -15405,6 +15405,19 @@ export declare const schemas: {
|
|
|
15405
15405
|
};
|
|
15406
15406
|
readonly components: {};
|
|
15407
15407
|
};
|
|
15408
|
+
stickinessSchema: {
|
|
15409
|
+
readonly $id: "#/components/schemas/stickinessSchema";
|
|
15410
|
+
readonly type: "object";
|
|
15411
|
+
readonly additionalProperties: false;
|
|
15412
|
+
readonly required: readonly ["stickiness"];
|
|
15413
|
+
readonly properties: {
|
|
15414
|
+
readonly stickiness: {
|
|
15415
|
+
readonly type: "string";
|
|
15416
|
+
readonly example: "userId";
|
|
15417
|
+
};
|
|
15418
|
+
};
|
|
15419
|
+
readonly components: {};
|
|
15420
|
+
};
|
|
15408
15421
|
tagsBulkAddSchema: {
|
|
15409
15422
|
readonly $id: "#/components/schemas/tagsBulkAddSchema";
|
|
15410
15423
|
readonly type: "object";
|
|
@@ -136,6 +136,7 @@ exports.schemas = {
|
|
|
136
136
|
stateSchema: spec_1.stateSchema,
|
|
137
137
|
strategiesSchema: spec_1.strategiesSchema,
|
|
138
138
|
strategySchema: spec_1.strategySchema,
|
|
139
|
+
stickinessSchema: spec_1.stickinessSchema,
|
|
139
140
|
tagsBulkAddSchema: spec_1.tagsBulkAddSchema,
|
|
140
141
|
tagSchema: spec_1.tagSchema,
|
|
141
142
|
tagsSchema: spec_1.tagsSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/openapi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/openapi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,iCAqIgB;AAEhB,kCAA8C;AAC9C,iCAAqC;AACrC,6BAA0B;AAC1B,8DAAyC;AACzC,kEAA8D;AAC9D,8EAAyE;AACzE,oEAA+D;AAC/D,gFAA0E;AAC1E,kEAA6D;AAE7D,uDAAuD;AAC1C,QAAA,OAAO,GAAG;IACnB,wBAAwB,EAAxB,+BAAwB;IACxB,oBAAoB,EAApB,2BAAoB;IACpB,WAAW,EAAX,kBAAW;IACX,YAAY,EAAZ,mBAAY;IACZ,eAAe,EAAf,sBAAe;IACf,cAAc,EAAd,qBAAc;IACd,eAAe,EAAf,sBAAe;IACf,iBAAiB,EAAjB,wBAAiB;IACjB,kBAAkB,EAAlB,yBAAkB;IAClB,sBAAsB,EAAtB,iDAAsB;IACtB,iBAAiB,EAAjB,uCAAiB;IACjB,oBAAoB,EAApB,2BAAoB;IACpB,uBAAuB,EAAvB,8BAAuB;IACvB,mBAAmB,EAAnB,0BAAmB;IACnB,yBAAyB,EAAzB,gCAAyB;IACzB,oBAAoB,EAApB,2BAAoB;IACpB,mBAAmB,EAAnB,0BAAmB;IACnB,sBAAsB,EAAtB,kDAAsB;IACtB,kBAAkB,EAAlB,yBAAkB;IAClB,gBAAgB,EAAh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QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;QAC5C,OAAO,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,IAAI,EAAE,CAAC;KACjD;IACD,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC;AAC9B,CAAC,CAAC;AAEK,MAAM,mBAAmB,GAAG,CAAC,EAChC,UAAU,EACV,WAAW,GACqC,EAGlD,EAAE;IACA,MAAM,GAAG,GAAG,WAAW,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IACjD,OAAO;QACH,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;QAC7B,IAAI,EAAE;YACF,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,iBAAU;SACtB;QACD,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;QAC1B,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,IAAA,gBAAS,EAAC,eAAO,EAAE,6BAAqB,CAAC;SACrD;QACD,IAAI,EAAE,kBAAW;KACpB,CAAC;AACN,CAAC,CAAC;AA5BW,QAAA,mBAAmB,uBA4B9B;AAEF,yCAAuB;AACvB,yCAAuB"}
|
|
@@ -129,4 +129,5 @@ export * from './project-overview-schema';
|
|
|
129
129
|
export * from './import-toggles-validate-item-schema';
|
|
130
130
|
export * from './import-toggles-validate-schema';
|
|
131
131
|
export * from './import-toggles-schema';
|
|
132
|
+
export * from './stickiness-schema';
|
|
132
133
|
export * from './tags-bulk-add-schema';
|
|
@@ -145,5 +145,6 @@ __exportStar(require("./project-overview-schema"), exports);
|
|
|
145
145
|
__exportStar(require("./import-toggles-validate-item-schema"), exports);
|
|
146
146
|
__exportStar(require("./import-toggles-validate-schema"), exports);
|
|
147
147
|
__exportStar(require("./import-toggles-schema"), exports);
|
|
148
|
+
__exportStar(require("./stickiness-schema"), exports);
|
|
148
149
|
__exportStar(require("./tags-bulk-add-schema"), exports);
|
|
149
150
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,8CAA4B;AAC5B,+CAA6B;AAC7B,+CAA6B;AAC7B,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,iDAA+B;AAC/B,iDAA+B;AAC/B,iDAA+B;AAC/B,iDAA+B;AAC/B,iDAA+B;AAC/B,iDAA+B;AAC/B,iDAA+B;AAC/B,iDAA+B;AAC/B,kDAAgC;AAChC,kDAAgC;AAChC,kDAAgC;AAChC,kDAAgC;AAChC,mDAAiC;AACjC,mDAAiC;AACjC,mDAAiC;AACjC,mDAAiC;AACjC,mDAAiC;AACjC,mDAAiC;AACjC,mDAAiC;AACjC,oDAAkC;AAClC,oDAAkC;AAClC,oDAAkC;AAClC,oDAAkC;AAClC,oDAAkC;AAClC,oDAAkC;AAClC,oDAAkC;AAClC,oDAAkC;AAClC,qDAAmC;AACnC,qDAAmC;AACnC,qDAAmC;AACnC,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,uDAAqC;AACrC,uDAAqC;AACrC,uDAAqC;AACrC,uDAAqC;AACrC,uDAAqC;AACrC,uDAAqC;AACrC,uDAAqC;AACrC,wDAAsC;AACtC,wDAAsC;AACtC,wDAAsC;AACtC,wDAAsC;AACtC,wDAAsC;AACtC,wDAAsC;AACtC,yDAAuC;AACvC,yDAAuC;AACvC,yDAAuC;AACvC,yDAAuC;AACvC,yDAAuC;AACvC,yDAAuC;AACvC,yDAAuC;AACvC,yDAAuC;AACvC,0DAAwC;AACxC,0DAAwC;AACxC,0DAAwC;AACxC,0DAAwC;AACxC,0DAAwC;AACxC,0DAAwC;AACxC,0DAAwC;AACxC,0DAAwC;AACxC,2DAAyC;AACzC,2DAAyC;AACzC,2DAAyC;AACzC,2DAAyC;AACzC,2DAAyC;AACzC,2DAAyC;AACzC,2DAAyC;AACzC,4DAA0C;AAC1C,4DAA0C;AAC1C,4DAA0C;AAC1C,4DAA0C;AAC1C,4DAA0C;AAC1C,4DAA0C;AAC1C,4DAA0C;AAC1C,6DAA2C;AAC3C,6DAA2C;AAC3C,6DAA2C;AAC3C,8DAA4C;AAC5C,8DAA4C;AAC5C,8DAA4C;AAC5C,8DAA4C;AAC5C,+DAA6C;AAC7C,+DAA6C;AAC7C,+DAA6C;AAC7C,+DAA6C;AAC7C,+DAA6C;AAC7C,+DAA6C;AAC7C,+DAA6C;AAC7C,gEAA8C;AAC9C,gEAA8C;AAC9C,gEAA8C;AAC9C,gEAA8C;AAC9C,gEAA8C;AAC9C,iEAA+C;AAC/C,gEAA8C;AAC9C,iEAA+C;AAC/C,mEAAiD;AACjD,mEAAiD;AACjD,mEAAiD;AACjD,oEAAkD;AAClD,sEAAoD;AACpD,sEAAoD;AACpD,uEAAqD;AACrD,+DAA6C;AAC7C,yEAAuD;AACvD,yDAAuC;AACvC,wDAAsC;AACtC,yDAAuC;AACvC,yDAAuC;AACvC,4DAA0C;AAC1C,wEAAsD;AACtD,mEAAiD;AACjD,0DAAwC;AACxC,yDAAuC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,8CAA4B;AAC5B,+CAA6B;AAC7B,+CAA6B;AAC7B,gDAA8B;A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AAC1C,4DAA0C;AAC1C,4DAA0C;AAC1C,4DAA0C;AAC1C,6DAA2C;AAC3C,6DAA2C;AAC3C,6DAA2C;AAC3C,8DAA4C;AAC5C,8DAA4C;AAC5C,8DAA4C;AAC5C,8DAA4C;AAC5C,+DAA6C;AAC7C,+DAA6C;AAC7C,+DAA6C;AAC7C,+DAA6C;AAC7C,+DAA6C;AAC7C,+DAA6C;AAC7C,+DAA6C;AAC7C,gEAA8C;AAC9C,gEAA8C;AAC9C,gEAA8C;AAC9C,gEAA8C;AAC9C,gEAA8C;AAC9C,iEAA+C;AAC/C,gEAA8C;AAC9C,iEAA+C;AAC/C,mEAAiD;AACjD,mEAAiD;AACjD,mEAAiD;AACjD,oEAAkD;AAClD,sEAAoD;AACpD,sEAAoD;AACpD,uEAAqD;AACrD,+DAA6C;AAC7C,yEAAuD;AACvD,yDAAuC;AACvC,wDAAsC;AACtC,yDAAuC;AACvC,yDAAuC;AACvC,4DAA0C;AAC1C,wEAAsD;AACtD,mEAAiD;AACjD,0DAAwC;AACxC,sDAAoC;AACpC,yDAAuC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FromSchema } from 'json-schema-to-ts';
|
|
2
|
+
export declare const stickinessSchema: {
|
|
3
|
+
readonly $id: "#/components/schemas/stickinessSchema";
|
|
4
|
+
readonly type: "object";
|
|
5
|
+
readonly additionalProperties: false;
|
|
6
|
+
readonly required: readonly ["stickiness"];
|
|
7
|
+
readonly properties: {
|
|
8
|
+
readonly stickiness: {
|
|
9
|
+
readonly type: "string";
|
|
10
|
+
readonly example: "userId";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
readonly components: {};
|
|
14
|
+
};
|
|
15
|
+
export declare type StickinessSchema = FromSchema<typeof stickinessSchema>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stickinessSchema = void 0;
|
|
4
|
+
exports.stickinessSchema = {
|
|
5
|
+
$id: '#/components/schemas/stickinessSchema',
|
|
6
|
+
type: 'object',
|
|
7
|
+
additionalProperties: false,
|
|
8
|
+
required: ['stickiness'],
|
|
9
|
+
properties: {
|
|
10
|
+
stickiness: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
example: 'userId',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
components: {},
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=stickiness-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stickiness-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/stickiness-schema.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAG;IAC5B,GAAG,EAAE,uCAAuC;IAC5C,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;IACxB,UAAU,EAAE;QACR,UAAU,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,QAAQ;SACpB;KACJ;IACD,UAAU,EAAE,EAAE;CACR,CAAC"}
|
|
@@ -5,4 +5,4 @@ export interface ISchemaValidationErrors<S = SchemaId> {
|
|
|
5
5
|
errors: ErrorObject[];
|
|
6
6
|
}
|
|
7
7
|
export declare const addAjvSchema: (schemaObjects: any[]) => any;
|
|
8
|
-
export declare const validateSchema: <S = "#/components/schemas/searchEventsSchema" | "#/components/schemas/idSchema" | "#/components/schemas/userSchema" | "#/components/schemas/permissionSchema" | "#/components/schemas/feedbackSchema" | "#/components/schemas/meSchema" | "#/components/schemas/patSchema" | "#/components/schemas/tagSchema" | "#/components/schemas/dateSchema" | "#/components/schemas/nameSchema" | "#/components/schemas/patsSchema" | "#/components/schemas/roleSchema" | "#/components/schemas/tagsSchema" | "#/components/schemas/addonSchema" | "#/components/schemas/emailSchema" | "#/components/schemas/eventSchema" | "#/components/schemas/groupUserModelSchema" | "#/components/schemas/groupSchema" | "#/components/schemas/loginSchema" | "#/components/schemas/patchSchema" | "#/components/schemas/overrideSchema" | "#/components/schemas/variantSchema" | "#/components/schemas/constraintSchema" | "#/components/schemas/parametersSchema" | "#/components/schemas/featureStrategySchema" | "#/components/schemas/featureEnvironmentSchema" | "#/components/schemas/featureSchema" | "#/components/schemas/tagTypeSchema" | "#/components/schemas/featureTagSchema" | "#/components/schemas/projectSchema" | "#/components/schemas/environmentSchema" | "#/components/schemas/segmentSchema" | "#/components/schemas/featureStrategySegmentSchema" | "#/components/schemas/strategySchema" | "#/components/schemas/stateSchema" | "#/components/schemas/usersSchema" | "#/components/schemas/addonParameterSchema" | "#/components/schemas/addonTypeSchema" | "#/components/schemas/addonsSchema" | "#/components/schemas/eventsSchema" | "#/components/schemas/groupsSchema" | "#/components/schemas/splashSchema" | "#/components/schemas/patchesSchema" | "#/components/schemas/profileSchema" | "#/components/schemas/versionSchema" | "#/components/schemas/featuresSchema" | "#/components/schemas/passwordSchema" | "#/components/schemas/projectsSchema" | "#/components/schemas/variantsSchema" | "#/components/schemas/apiTokenSchema" | "#/components/schemas/tagTypesSchema" | "#/components/schemas/uiConfigSchema" | "#/components/schemas/apiTokensSchema" | "#/components/schemas/edgeTokenSchema" | "#/components/schemas/sortOrderSchema" | "#/components/schemas/strategiesSchema" | "#/components/schemas/tokenUserSchema" | "#/components/schemas/applicationSchema" | "#/components/schemas/createUserSchema" | "#/components/schemas/legalValueSchema" | "#/components/schemas/sdkContextSchema" | "#/components/schemas/updateUserSchema" | "#/components/schemas/applicationsSchema" | "#/components/schemas/environmentsSchema" | "#/components/schemas/featureTypeSchema" | "#/components/schemas/healthCheckSchema" | "#/components/schemas/proxyClientSchema" | "#/components/schemas/usersSearchSchema" | "#/components/schemas/cloneFeatureSchema" | "#/components/schemas/contextFieldSchema" | "#/components/schemas/featureTypesSchema" | "#/components/schemas/featureEnvironmentMetricsSchema" | "#/components/schemas/featureUsageSchema" | "#/components/schemas/projectStatsSchema" | "#/components/schemas/healthOverviewSchema" | "#/components/schemas/healthReportSchema" | "#/components/schemas/proxyFeatureSchema" | "#/components/schemas/setUiConfigSchema" | "#/components/schemas/clientFeatureSchema" | "#/components/schemas/clientMetricsSchema" | "#/components/schemas/contextFieldsSchema" | "#/components/schemas/createFeatureSchema" | "#/components/schemas/featureEventsSchema" | "#/components/schemas/proxyFeaturesSchema" | "#/components/schemas/resetPasswordSchema" | "#/components/schemas/updateFeatureSchema" | "#/components/schemas/changePasswordSchema" | "#/components/schemas/clientFeaturesQuerySchema" | "#/components/schemas/clientFeaturesSchema" | "#/components/schemas/featureMetricsSchema" | "#/components/schemas/updateTagTypeSchema" | "#/components/schemas/upsertStrategySchema" | "#/components/schemas/createApiTokenSchema" | "#/components/schemas/featureVariantsSchema" | "#/components/schemas/tagWithVersionSchema" | "#/components/schemas/updateApiTokenSchema" | "#/components/schemas/usersGroupsBaseSchema" | "#/components/schemas/validatePasswordSchema" | "#/components/schemas/validateTagTypeSchema" | "#/components/schemas/clientApplicationSchema" | "#/components/schemas/playgroundConstraintSchema" | "#/components/schemas/playgroundSegmentSchema" | "#/components/schemas/playgroundStrategySchema" | "#/components/schemas/playgroundFeatureSchema" | "#/components/schemas/playgroundRequestSchema" | "#/components/schemas/createInvitedUserSchema" | "#/components/schemas/environmentProjectSchema" | "#/components/schemas/playgroundResponseSchema" | "#/components/schemas/projectEnvironmentSchema" | "#/components/schemas/publicSignupTokenSchema" | "#/components/schemas/environmentsProjectSchema" | "#/components/schemas/instanceAdminStatsSchema" | "#/components/schemas/publicSignupTokensSchema" | "#/components/schemas/upsertContextFieldSchema" | "#/components/schemas/validateEdgeTokensSchema" | "#/components/schemas/adminFeaturesQuerySchema" | "#/components/schemas/createFeatureStrategySchema" | "#/components/schemas/setStrategySortOrderSchema" | "#/components/schemas/updateFeatureStrategySchema" | "#/components/schemas/publicSignupTokenCreateSchema" | "#/components/schemas/publicSignupTokenUpdateSchema" | "#/components/schemas/requestsPerSecondSchema" | "#/components/schemas/requestsPerSecondSegmentedSchema" | "#/components/schemas/exportResultSchema" | "#/components/schemas/exportQuerySchema" | "#/components/schemas/pushVariantsSchema" | "#/components/schemas/projectOverviewSchema" | "#/components/schemas/importTogglesValidateItemSchema" | "#/components/schemas/importTogglesValidateSchema" | "#/components/schemas/importTogglesSchema" | "#/components/schemas/updateTagsSchema" | "#/components/schemas/tagsBulkAddSchema" | "#/components/schemas/maintenanceSchema" | "#/components/schemas/bulkRegistrationSchema" | "#/components/schemas/clientMetricsEnvSchema" | "#/components/schemas/bulkMetricsSchema">(schema: S, data: unknown) => ISchemaValidationErrors<S>;
|
|
8
|
+
export declare const validateSchema: <S = "#/components/schemas/searchEventsSchema" | "#/components/schemas/idSchema" | "#/components/schemas/userSchema" | "#/components/schemas/permissionSchema" | "#/components/schemas/feedbackSchema" | "#/components/schemas/meSchema" | "#/components/schemas/patSchema" | "#/components/schemas/tagSchema" | "#/components/schemas/dateSchema" | "#/components/schemas/nameSchema" | "#/components/schemas/patsSchema" | "#/components/schemas/roleSchema" | "#/components/schemas/tagsSchema" | "#/components/schemas/addonSchema" | "#/components/schemas/emailSchema" | "#/components/schemas/eventSchema" | "#/components/schemas/groupUserModelSchema" | "#/components/schemas/groupSchema" | "#/components/schemas/loginSchema" | "#/components/schemas/patchSchema" | "#/components/schemas/overrideSchema" | "#/components/schemas/variantSchema" | "#/components/schemas/constraintSchema" | "#/components/schemas/parametersSchema" | "#/components/schemas/featureStrategySchema" | "#/components/schemas/featureEnvironmentSchema" | "#/components/schemas/featureSchema" | "#/components/schemas/tagTypeSchema" | "#/components/schemas/featureTagSchema" | "#/components/schemas/projectSchema" | "#/components/schemas/environmentSchema" | "#/components/schemas/segmentSchema" | "#/components/schemas/featureStrategySegmentSchema" | "#/components/schemas/strategySchema" | "#/components/schemas/stateSchema" | "#/components/schemas/usersSchema" | "#/components/schemas/addonParameterSchema" | "#/components/schemas/addonTypeSchema" | "#/components/schemas/addonsSchema" | "#/components/schemas/eventsSchema" | "#/components/schemas/groupsSchema" | "#/components/schemas/splashSchema" | "#/components/schemas/patchesSchema" | "#/components/schemas/profileSchema" | "#/components/schemas/versionSchema" | "#/components/schemas/featuresSchema" | "#/components/schemas/passwordSchema" | "#/components/schemas/projectsSchema" | "#/components/schemas/variantsSchema" | "#/components/schemas/apiTokenSchema" | "#/components/schemas/tagTypesSchema" | "#/components/schemas/uiConfigSchema" | "#/components/schemas/apiTokensSchema" | "#/components/schemas/edgeTokenSchema" | "#/components/schemas/sortOrderSchema" | "#/components/schemas/strategiesSchema" | "#/components/schemas/tokenUserSchema" | "#/components/schemas/applicationSchema" | "#/components/schemas/createUserSchema" | "#/components/schemas/legalValueSchema" | "#/components/schemas/sdkContextSchema" | "#/components/schemas/updateUserSchema" | "#/components/schemas/applicationsSchema" | "#/components/schemas/environmentsSchema" | "#/components/schemas/featureTypeSchema" | "#/components/schemas/healthCheckSchema" | "#/components/schemas/proxyClientSchema" | "#/components/schemas/usersSearchSchema" | "#/components/schemas/cloneFeatureSchema" | "#/components/schemas/contextFieldSchema" | "#/components/schemas/featureTypesSchema" | "#/components/schemas/featureEnvironmentMetricsSchema" | "#/components/schemas/featureUsageSchema" | "#/components/schemas/projectStatsSchema" | "#/components/schemas/healthOverviewSchema" | "#/components/schemas/healthReportSchema" | "#/components/schemas/proxyFeatureSchema" | "#/components/schemas/setUiConfigSchema" | "#/components/schemas/clientFeatureSchema" | "#/components/schemas/clientMetricsSchema" | "#/components/schemas/contextFieldsSchema" | "#/components/schemas/createFeatureSchema" | "#/components/schemas/featureEventsSchema" | "#/components/schemas/proxyFeaturesSchema" | "#/components/schemas/resetPasswordSchema" | "#/components/schemas/updateFeatureSchema" | "#/components/schemas/changePasswordSchema" | "#/components/schemas/clientFeaturesQuerySchema" | "#/components/schemas/clientFeaturesSchema" | "#/components/schemas/featureMetricsSchema" | "#/components/schemas/updateTagTypeSchema" | "#/components/schemas/upsertStrategySchema" | "#/components/schemas/createApiTokenSchema" | "#/components/schemas/featureVariantsSchema" | "#/components/schemas/tagWithVersionSchema" | "#/components/schemas/updateApiTokenSchema" | "#/components/schemas/usersGroupsBaseSchema" | "#/components/schemas/validatePasswordSchema" | "#/components/schemas/validateTagTypeSchema" | "#/components/schemas/clientApplicationSchema" | "#/components/schemas/playgroundConstraintSchema" | "#/components/schemas/playgroundSegmentSchema" | "#/components/schemas/playgroundStrategySchema" | "#/components/schemas/playgroundFeatureSchema" | "#/components/schemas/playgroundRequestSchema" | "#/components/schemas/createInvitedUserSchema" | "#/components/schemas/environmentProjectSchema" | "#/components/schemas/playgroundResponseSchema" | "#/components/schemas/projectEnvironmentSchema" | "#/components/schemas/publicSignupTokenSchema" | "#/components/schemas/environmentsProjectSchema" | "#/components/schemas/instanceAdminStatsSchema" | "#/components/schemas/publicSignupTokensSchema" | "#/components/schemas/upsertContextFieldSchema" | "#/components/schemas/validateEdgeTokensSchema" | "#/components/schemas/adminFeaturesQuerySchema" | "#/components/schemas/createFeatureStrategySchema" | "#/components/schemas/setStrategySortOrderSchema" | "#/components/schemas/updateFeatureStrategySchema" | "#/components/schemas/publicSignupTokenCreateSchema" | "#/components/schemas/publicSignupTokenUpdateSchema" | "#/components/schemas/requestsPerSecondSchema" | "#/components/schemas/requestsPerSecondSegmentedSchema" | "#/components/schemas/exportResultSchema" | "#/components/schemas/exportQuerySchema" | "#/components/schemas/pushVariantsSchema" | "#/components/schemas/projectOverviewSchema" | "#/components/schemas/importTogglesValidateItemSchema" | "#/components/schemas/importTogglesValidateSchema" | "#/components/schemas/importTogglesSchema" | "#/components/schemas/stickinessSchema" | "#/components/schemas/updateTagsSchema" | "#/components/schemas/tagsBulkAddSchema" | "#/components/schemas/maintenanceSchema" | "#/components/schemas/bulkRegistrationSchema" | "#/components/schemas/clientMetricsEnvSchema" | "#/components/schemas/bulkMetricsSchema">(schema: S, data: unknown) => ISchemaValidationErrors<S>;
|
|
@@ -4,12 +4,15 @@ import { IUnleashConfig } from '../../../types/option';
|
|
|
4
4
|
import { IUnleashServices } from '../../../types/services';
|
|
5
5
|
import { ProjectsSchema } from '../../../openapi/spec/projects-schema';
|
|
6
6
|
import { IAuthRequest } from '../../unleash-types';
|
|
7
|
-
import { ProjectOverviewSchema } from '../../../../lib/openapi';
|
|
7
|
+
import { ProjectOverviewSchema, StickinessSchema } from '../../../../lib/openapi';
|
|
8
8
|
import { IArchivedQuery, IProjectParam } from '../../../types/model';
|
|
9
9
|
export default class ProjectApi extends Controller {
|
|
10
10
|
private projectService;
|
|
11
|
+
private settingService;
|
|
11
12
|
private openApiService;
|
|
12
13
|
constructor(config: IUnleashConfig, services: IUnleashServices);
|
|
13
14
|
getProjects(req: IAuthRequest, res: Response<ProjectsSchema>): Promise<void>;
|
|
14
15
|
getProjectOverview(req: IAuthRequest<IProjectParam, unknown, unknown, IArchivedQuery>, res: Response<ProjectOverviewSchema>): Promise<void>;
|
|
16
|
+
getProjectDefaultStickiness(req: IAuthRequest<IProjectParam, unknown, unknown, unknown>, res: Response<StickinessSchema>): Promise<void>;
|
|
17
|
+
setProjectDefaultStickiness(req: IAuthRequest<IProjectParam, StickinessSchema, StickinessSchema, unknown>, res: Response<StickinessSchema>): Promise<void>;
|
|
15
18
|
}
|
|
@@ -14,11 +14,14 @@ const serialize_dates_1 = require("../../../types/serialize-dates");
|
|
|
14
14
|
const create_response_schema_1 = require("../../../openapi/util/create-response-schema");
|
|
15
15
|
const openapi_1 = require("../../../../lib/openapi");
|
|
16
16
|
const api_token_1 = require("./api-token");
|
|
17
|
+
const STICKINESS_KEY = 'stickiness';
|
|
18
|
+
const DEFAULT_STICKINESS = 'default';
|
|
17
19
|
class ProjectApi extends controller_1.default {
|
|
18
20
|
constructor(config, services) {
|
|
19
21
|
super(config);
|
|
20
22
|
this.projectService = services.projectService;
|
|
21
23
|
this.openApiService = services.openApiService;
|
|
24
|
+
this.settingService = services.settingService;
|
|
22
25
|
this.route({
|
|
23
26
|
path: '',
|
|
24
27
|
method: 'get',
|
|
@@ -49,6 +52,38 @@ class ProjectApi extends controller_1.default {
|
|
|
49
52
|
}),
|
|
50
53
|
],
|
|
51
54
|
});
|
|
55
|
+
this.route({
|
|
56
|
+
method: 'get',
|
|
57
|
+
path: '/:projectId/stickiness',
|
|
58
|
+
handler: this.getProjectDefaultStickiness,
|
|
59
|
+
permission: permissions_1.NONE,
|
|
60
|
+
middleware: [
|
|
61
|
+
services.openApiService.validPath({
|
|
62
|
+
tags: ['Projects'],
|
|
63
|
+
operationId: 'getProjectDefaultStickiness',
|
|
64
|
+
responses: {
|
|
65
|
+
200: (0, create_response_schema_1.createResponseSchema)('stickinessSchema'),
|
|
66
|
+
404: openapi_1.emptyResponse,
|
|
67
|
+
},
|
|
68
|
+
}),
|
|
69
|
+
],
|
|
70
|
+
});
|
|
71
|
+
this.route({
|
|
72
|
+
method: 'post',
|
|
73
|
+
path: '/:projectId/stickiness',
|
|
74
|
+
handler: this.setProjectDefaultStickiness,
|
|
75
|
+
permission: permissions_1.UPDATE_PROJECT,
|
|
76
|
+
middleware: [
|
|
77
|
+
services.openApiService.validPath({
|
|
78
|
+
tags: ['Projects'],
|
|
79
|
+
operationId: 'setProjectDefaultStickiness',
|
|
80
|
+
responses: {
|
|
81
|
+
200: (0, create_response_schema_1.createResponseSchema)('stickinessSchema'),
|
|
82
|
+
404: openapi_1.emptyResponse,
|
|
83
|
+
},
|
|
84
|
+
}),
|
|
85
|
+
],
|
|
86
|
+
});
|
|
52
87
|
this.use('/', new project_features_1.default(config, services).router);
|
|
53
88
|
this.use('/', new environments_1.default(config, services).router);
|
|
54
89
|
this.use('/', new health_report_1.default(config, services).router);
|
|
@@ -69,6 +104,31 @@ class ProjectApi extends controller_1.default {
|
|
|
69
104
|
const overview = await this.projectService.getProjectOverview(projectId, archived, user.id);
|
|
70
105
|
this.openApiService.respondWithValidation(200, res, openapi_1.projectOverviewSchema.$id, (0, serialize_dates_1.serializeDates)(overview));
|
|
71
106
|
}
|
|
107
|
+
async getProjectDefaultStickiness(req, res) {
|
|
108
|
+
if (!this.config.flagResolver.isEnabled('projectScopedStickiness')) {
|
|
109
|
+
res.status(404);
|
|
110
|
+
return Promise.resolve();
|
|
111
|
+
}
|
|
112
|
+
const { projectId } = req.params;
|
|
113
|
+
const stickinessSettings = await this.settingService.get(STICKINESS_KEY, {
|
|
114
|
+
[projectId]: 'default',
|
|
115
|
+
});
|
|
116
|
+
this.openApiService.respondWithValidation(200, res, openapi_1.stickinessSchema.$id, { stickiness: stickinessSettings[projectId] });
|
|
117
|
+
}
|
|
118
|
+
async setProjectDefaultStickiness(req, res) {
|
|
119
|
+
if (!this.config.flagResolver.isEnabled('projectScopedStickiness')) {
|
|
120
|
+
res.status(404);
|
|
121
|
+
return Promise.resolve();
|
|
122
|
+
}
|
|
123
|
+
const { projectId } = req.params;
|
|
124
|
+
const { stickiness } = req.body;
|
|
125
|
+
const stickinessSettings = await this.settingService.get(STICKINESS_KEY, {
|
|
126
|
+
[projectId]: DEFAULT_STICKINESS,
|
|
127
|
+
});
|
|
128
|
+
stickinessSettings[projectId] = stickiness;
|
|
129
|
+
await this.settingService.insert(STICKINESS_KEY, stickinessSettings, req.user.name);
|
|
130
|
+
this.openApiService.respondWithValidation(200, res, openapi_1.stickinessSchema.$id, { stickiness: stickiness });
|
|
131
|
+
}
|
|
72
132
|
}
|
|
73
133
|
exports.default = ProjectApi;
|
|
74
134
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/routes/admin-api/project/index.ts"],"names":[],"mappings":";;;;;AACA,kEAA0C;AAG1C,0EAA2D;AAC3D,kEAAoD;AACpD,oEAAkD;AAElD,0DAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/routes/admin-api/project/index.ts"],"names":[],"mappings":";;;;;AACA,kEAA0C;AAG1C,0EAA2D;AAC3D,kEAAoD;AACpD,oEAAkD;AAElD,0DAA4C;AAC5C,4DAAkE;AAClE,2EAG+C;AAE/C,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24 @@ test('Should ONLY return default project', async () => {
|
|
|
33
33
|
expect(body.projects).toHaveLength(1);
|
|
34
34
|
expect(body.projects[0].id).toBe('default');
|
|
35
35
|
});
|
|
36
|
+
test('Should store and retrieve default project stickiness', async () => {
|
|
37
|
+
const appWithDefaultStickiness = await (0, test_helper_1.setupAppWithCustomConfig)(db.stores, {
|
|
38
|
+
experimental: {
|
|
39
|
+
flags: {
|
|
40
|
+
projectScopedStickiness: true,
|
|
41
|
+
strictSchemaValidation: true,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
const reqBody = { stickiness: 'userId' };
|
|
46
|
+
await appWithDefaultStickiness.request
|
|
47
|
+
.post('/api/admin/projects/default/stickiness')
|
|
48
|
+
.send(reqBody)
|
|
49
|
+
.expect(200);
|
|
50
|
+
const { body } = await appWithDefaultStickiness.request
|
|
51
|
+
.get('/api/admin/projects/default/stickiness')
|
|
52
|
+
.expect(200)
|
|
53
|
+
.expect('Content-Type', /json/);
|
|
54
|
+
expect(body).toStrictEqual(reqBody);
|
|
55
|
+
});
|
|
36
56
|
//# sourceMappingURL=projects.e2e.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.e2e.test.js","sourceRoot":"","sources":["../../../../../../src/test/e2e/api/admin/project/projects.e2e.test.ts"],"names":[],"mappings":";;;;;AAAA,mFAAoD;AACpD,8DAAwE;AACxE,+EAAuD;AAGvD,IAAI,GAAG,CAAC;AACR,IAAI,EAAE,CAAC;AAEP,IAAI,YAA0B,CAAC;AAE/B,SAAS,CAAC,KAAK,IAAI,EAAE;IACjB,EAAE,GAAG,MAAM,IAAA,uBAAM,EAAC,qBAAqB,EAAE,mBAAS,CAAC,CAAC;IACpD,GAAG,GAAG,MAAM,IAAA,sCAAwB,EAAC,EAAE,CAAC,MAAM,EAAE;QAC5C,YAAY,EAAE;YACV,KAAK,EAAE;gBACH,sBAAsB,EAAE,IAAI;aAC/B;SACJ;KACJ,CAAC,C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,CAAC,OAAO,CAAC;SACb,MAAM,CAAC,GAAG,CAAC,CAAC;IAEjB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,wBAAwB,CAAC,OAAO;SAClD,GAAG,CAAC,wCAAwC,CAAC;SAC7C,MAAM,CAAC,GAAG,CAAC;SACX,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IAEpC,MAAM,CAAC,IAAI,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unleash-server",
|
|
3
3
|
"description": "Unleash is an enterprise ready feature toggles service. It provides different strategies for handling feature toggles.",
|
|
4
|
-
"version": "4.22.0-beta.
|
|
4
|
+
"version": "4.22.0-beta.65",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unleash",
|
|
7
7
|
"feature toggle",
|