Skip to content

Commit

Permalink
Merge branch 'dev' into analytics-email-csv-improvement-issue-1733
Browse files Browse the repository at this point in the history
  • Loading branch information
danoswaltCL authored Jul 22, 2024
2 parents 90b8c2b + ec71c8d commit 1a07621
Show file tree
Hide file tree
Showing 104 changed files with 2,770 additions and 1,800 deletions.
8 changes: 8 additions & 0 deletions backend/packages/Upgrade/src/api/DTO/ExperimentDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,14 @@ export class ParticipantsValidator {
public segment: SegmentValidator;
}

export class ParticipantsArrayValidator {
@IsNotEmpty()
@IsArray()
@ValidateNested({ each: true })
@Type(() => SegmentValidator)
public segments: SegmentValidator[];
}

class StateTimeLogValidator {
@IsNotEmpty()
@IsString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ interface IExperimentAssignment {
/**
* @swagger
* tags:
* - name: Client Side SDK
* - name: Client API calls
* description: CRUD operations related to experiments points
*/

Expand Down Expand Up @@ -155,14 +155,23 @@ export class ExperimentClientController {
* example: instructor1
* description: ExperimentUser
* tags:
* - Client Side SDK
* - Client API calls
* produces:
* - application/json
* responses:
* '200':
* description: Set Group Membership
* schema:
* $ref: '#/definitions/initResponse'
* '400':
* description: BadRequestError - InvalidParameterValue
* '401':
* description: AuthorizationRequiredError
* '404':
* description: Experiment User not defined
* '500':
* description: Internal Server Error
*
*/
@Post('init')
public async init(
Expand Down Expand Up @@ -247,8 +256,14 @@ export class ExperimentClientController {
* description: Set Group Membership
* schema:
* $ref: '#/definitions/initResponse'
* '400':
* description: BadRequestError - InvalidParameterValue
* '401':
* description: AuthorizationRequiredError
* '404':
* description: Experiment User not defined
* '500':
* description: null value in column "id" of relation "experiment_user" violates not-null constraint
* description: Internal Server Error
*/
@Post('groupmembership')
public async setGroupMemberShip(
Expand Down Expand Up @@ -310,8 +325,14 @@ export class ExperimentClientController {
* description: Set Group Membership
* schema:
* $ref: '#/definitions/initResponse'
* '400':
* description: BadRequestError - InvalidParameterValue
* '401':
* description: AuthorizationRequiredError
* '404':
* description: Experiment User not defined
* '500':
* description: null value in column "id" of relation "experiment_user" violates not-null constraint
* description: Internal Server Error
*/
@Post('workinggroup')
public async setWorkingGroup(
Expand Down Expand Up @@ -413,8 +434,14 @@ export class ExperimentClientController {
* - enrollmentCode
* - userId
* - condition
* '400':
* description: BadRequestError - InvalidParameterValue
* '401':
* description: AuthorizationRequiredError
* '404':
* description: Experiment User not defined
* '500':
* description: User not defined
* description: Internal Server Error
*/
@Post('mark')
public async markExperimentPoint(
Expand Down Expand Up @@ -529,10 +556,14 @@ export class ExperimentClientController {
* - conditionCode
* - assignmentWeight
* - order
* '500':
* description: null value in column "id" of relation "experiment_user" violates not-null constraint
* '400':
* description: BadRequestError - InvalidParameterValue
* '401':
* description: AuthorizationRequiredError
* '404':
* description: Experiment user not defined
* description: Experiment User not defined
* '500':
* description: Internal Server Error
*/
@Post('assign')
public async getAllExperimentConditions(
Expand Down Expand Up @@ -631,8 +662,14 @@ export class ExperimentClientController {
* responses:
* '200':
* description: Log data
* '400':
* description: BadRequestError - InvalidParameterValue
* '401':
* description: AuthorizationRequiredError
* '404':
* description: Experiment User not defined
* '500':
* description: null value in column "id\" of relation \"experiment_user\" violates not-null constraint
* description: Internal Server Error
*/
@Post('log')
public async log(
Expand Down Expand Up @@ -670,9 +707,15 @@ export class ExperimentClientController {
* - application/json
* responses:
* '200':
* description: Log data
* description: Log Caliper data
* '400':
* description: BadRequestError - InvalidParameterValue
* '401':
* description: AuthorizationRequiredError
* '404':
* description: Experiment User not defined
* '500':
* description: null value in column "id\" of relation \"experiment_user\" violates not-null constraint
* description: Internal Server Error
*/
@Post('log/caliper')
public async caliperLog(
Expand Down Expand Up @@ -727,6 +770,14 @@ export class ExperimentClientController {
* responses:
* '200':
* description: Log blob data
* '400':
* description: BadRequestError - InvalidParameterValue
* '401':
* description: AuthorizationRequiredError
* '404':
* description: Experiment User not defined
* '500':
* description: Internal Server Error
*/
@Post('bloblog')
public async blobLog(@Req() request: express.Request): Promise<any> {
Expand Down Expand Up @@ -796,8 +847,14 @@ export class ExperimentClientController {
* responses:
* '200':
* description: Client side reported error
* '400':
* description: BadRequestError - InvalidParameterValue
* '401':
* description: AuthorizationRequiredError
* '404':
* description: Experiment User not defined
* '500':
* description: null value in column "id\" of relation \"experiment_user\" violates not-null constraint
* description: Internal Server Error
*/
@Post('failed')
public async failedExperimentPoint(
Expand Down Expand Up @@ -852,6 +909,14 @@ export class ExperimentClientController {
* responses:
* '200':
* description: Feature flags list
* '400':
* description: BadRequestError - InvalidParameterValue
* '401':
* description: AuthorizationRequiredError
* '404':
* description: Experiment User not defined
* '500':
* description: Internal Server Error
*/
@Post('featureflag')
public async getAllFlags(
Expand Down Expand Up @@ -886,6 +951,10 @@ export class ExperimentClientController {
* responses:
* '200':
* description: Filtered Metrics
* '400':
* description: BadRequestError - InvalidParameterValue
* '401':
* description: AuthorizationRequiredError
* '500':
* description: Insert error in database
*/
Expand Down Expand Up @@ -962,8 +1031,14 @@ export class ExperimentClientController {
* originalUser:
* type: string
* minLength: 1
* '400':
* description: BadRequestError - InvalidParameterValue
* '401':
* description: AuthorizationRequiredError
* '404':
* description: Experiment User not defined
* '500':
* description: null value in column "id\" of relation \"experiment_user\" violates not-null constraint
* description: Internal Server Error
*/
@Post('useraliases')
public async setUserAliases(
Expand Down Expand Up @@ -1008,6 +1083,10 @@ export class ExperimentClientController {
* responses:
* '200':
* description: Database cleared
* '400':
* description: BadRequestError - InvalidParameterValue
* '401':
* description: AuthorizationRequiredError
* '500':
* description: DEMO mode is disabled
*/
Expand Down
Loading

0 comments on commit 1a07621

Please sign in to comment.