@silexpert/core 0.4.8 → 0.4.9-0

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.
@@ -1,9 +1,11 @@
1
- export declare const SurveyTypeDatas: {
2
- 1: {
3
- id: number;
4
- question: string;
5
- type: string;
6
- answers: string[];
7
- }[];
1
+ export declare type SurveyTypeDatasTypeContent = {
2
+ id: number;
3
+ question: string;
4
+ type: 'checkbox' | 'select';
5
+ answers: Array<string>;
8
6
  };
7
+ export declare type SurveyTypeDatasType = {
8
+ [key: number]: Array<SurveyTypeDatasTypeContent>;
9
+ };
10
+ export declare const SurveyTypeDatas: SurveyTypeDatasType;
9
11
  //# sourceMappingURL=SurveyTypeDatas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SurveyTypeDatas.d.ts","sourceRoot":"","sources":["../../../ts/types/Enum/SurveyTypeDatas.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;CA0C3B,CAAC"}
1
+ {"version":3,"file":"SurveyTypeDatas.d.ts","sourceRoot":"","sources":["../../../ts/types/Enum/SurveyTypeDatas.ts"],"names":[],"mappings":"AAEA,oBAAY,0BAA0B,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,GAAG,QAAQ,CAAC;IAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAAE,CAAC;AAC/H,oBAAY,mBAAmB,GAAG;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,0BAA0B,CAAC,CAAA;CAAE,CAAC;AAErD,eAAO,MAAM,eAAe,EAAE,mBA0C7B,CAAC"}
@@ -1,5 +1,6 @@
1
+ import { SurveyType } from './SurveyType';
1
2
  export const SurveyTypeDatas = {
2
- 1: [
3
+ [SurveyType.ONBOARDING]: [
3
4
  {
4
5
  id: 1,
5
6
  question: 'interestingFeatures',
@@ -1 +1 @@
1
- {"version":3,"file":"SurveyTypeDatas.js","sourceRoot":"","sources":["../../../ts/types/Enum/SurveyTypeDatas.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,CAAC,EAAE;QACD;YACE,EAAE,EAAE,CAAC;YACL,QAAQ,EAAE,qBAAqB;YAC/B,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE;gBACP,UAAU;gBACV,mCAAmC;gBACnC,oBAAoB;gBACpB,uCAAuC;gBACvC,2BAA2B;gBAC3B,aAAa;gBACb,yBAAyB;gBACzB,6CAA6C;aAC9C;SACF;QACD;YACE,EAAE,EAAE,CAAC;YACL,QAAQ,EAAE,aAAa;YACvB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,MAAM;gBACN,OAAO;gBACP,QAAQ;gBACR,QAAQ;gBACR,WAAW;aACZ;SACF;QACD;YACE,EAAE,EAAE,CAAC;YACL,QAAQ,EAAE,mBAAmB;YAC7B,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,UAAU;gBACV,YAAY;gBACZ,kBAAkB;gBAClB,qBAAqB;gBACrB,OAAO;aACR;SACF;KACF;CACF,CAAC","sourcesContent":["export const SurveyTypeDatas = {\n 1: [\n {\n id: 1,\n question: 'interestingFeatures',\n type: 'checkbox',\n answers: [\n 'syncBanc',\n 'expensesAndRevenuesCategorization',\n 'cashFlowSimulation',\n 'expenseReportsAndKilometricAllowances',\n 'trackingToolAndDashboards',\n 'billingTool',\n 'vatDeclarationAutomated',\n 'balanceSheetAndTaxReturnGenerationAutomated',\n ],\n },\n {\n id: 2,\n question: 'societySize',\n type: 'select',\n answers: [\n '1to5',\n '6to10',\n '11to25',\n '26to50',\n '51andMore',\n ],\n },\n {\n id: 3,\n question: 'userRoleInSociety',\n type: 'select',\n answers: [\n 'director',\n 'accountant',\n 'accountantExpert',\n 'managementAssistant',\n 'other',\n ],\n },\n ],\n};"]}
1
+ {"version":3,"file":"SurveyTypeDatas.js","sourceRoot":"","sources":["../../../ts/types/Enum/SurveyTypeDatas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,MAAM,CAAC,MAAM,eAAe,GAAwB;IAClD,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;QACvB;YACE,EAAE,EAAE,CAAC;YACL,QAAQ,EAAE,qBAAqB;YAC/B,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE;gBACP,UAAU;gBACV,mCAAmC;gBACnC,oBAAoB;gBACpB,uCAAuC;gBACvC,2BAA2B;gBAC3B,aAAa;gBACb,yBAAyB;gBACzB,6CAA6C;aAC9C;SACF;QACD;YACE,EAAE,EAAE,CAAC;YACL,QAAQ,EAAE,aAAa;YACvB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,MAAM;gBACN,OAAO;gBACP,QAAQ;gBACR,QAAQ;gBACR,WAAW;aACZ;SACF;QACD;YACE,EAAE,EAAE,CAAC;YACL,QAAQ,EAAE,mBAAmB;YAC7B,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,UAAU;gBACV,YAAY;gBACZ,kBAAkB;gBAClB,qBAAqB;gBACrB,OAAO;aACR;SACF;KACF;CACF,CAAC","sourcesContent":["import { SurveyType } from './SurveyType';\n\nexport type SurveyTypeDatasTypeContent = { id: number, question: string, type: 'checkbox' | 'select', answers: Array<string> };\nexport type SurveyTypeDatasType = {\n [key: number]: Array<SurveyTypeDatasTypeContent> };\n\nexport const SurveyTypeDatas: SurveyTypeDatasType = {\n [SurveyType.ONBOARDING]: [\n {\n id: 1,\n question: 'interestingFeatures',\n type: 'checkbox',\n answers: [\n 'syncBanc',\n 'expensesAndRevenuesCategorization',\n 'cashFlowSimulation',\n 'expenseReportsAndKilometricAllowances',\n 'trackingToolAndDashboards',\n 'billingTool',\n 'vatDeclarationAutomated',\n 'balanceSheetAndTaxReturnGenerationAutomated',\n ],\n },\n {\n id: 2,\n question: 'societySize',\n type: 'select',\n answers: [\n '1to5',\n '6to10',\n '11to25',\n '26to50',\n '51andMore',\n ],\n },\n {\n id: 3,\n question: 'userRoleInSociety',\n type: 'select',\n answers: [\n 'director',\n 'accountant',\n 'accountantExpert',\n 'managementAssistant',\n 'other',\n ],\n },\n ],\n};\n"]}
@@ -1,11 +1,8 @@
1
1
  import { BaseEntity } from '../../../../utils';
2
2
  import { SurveyType } from '../../../Enum/SurveyType';
3
- import { ISurvey } from '../../models/ISurvey';
3
+ import { ISurvey, SurveyDataType } from '../../models/ISurvey';
4
4
  export declare class CreateSurvey implements Omit<BaseEntity<ISurvey>, 'finishedAt' | 'cancelledAt' | 'idSociety'> {
5
- data: {
6
- name: string;
7
- data: (string | number)[];
8
- }[];
5
+ data: SurveyDataType;
9
6
  idSurveyType: SurveyType;
10
7
  }
11
8
  //# sourceMappingURL=CreateSurvey.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreateSurvey.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/survey/CreateSurvey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,qBAAa,YAAa,YAAW,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,aAAa,GAAG,WAAW,CAAC;IACxG,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,CAAC,MAAM,GAAE,MAAM,CAAC,EAAE,CAAA;KAAE,EAAE,CAAC;IACnD,YAAY,EAAE,UAAU,CAAC;CAC1B"}
1
+ {"version":3,"file":"CreateSurvey.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/survey/CreateSurvey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE/D,qBAAa,YAAa,YAAW,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,aAAa,GAAG,WAAW,CAAC;IACxG,IAAI,EAAE,cAAc,CAAC;IACrB,YAAY,EAAE,UAAU,CAAC;CAC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"CreateSurvey.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/survey/CreateSurvey.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,YAAY;CAGxB","sourcesContent":["import { BaseEntity } from '../../../../utils';\nimport { SurveyType } from '../../../Enum/SurveyType';\nimport { ISurvey } from '../../models/ISurvey';\n\nexport class CreateSurvey implements Omit<BaseEntity<ISurvey>, 'finishedAt' | 'cancelledAt' | 'idSociety'> {\n data: { name: string, data: (string |number)[] }[];\n idSurveyType: SurveyType;\n}\n"]}
1
+ {"version":3,"file":"CreateSurvey.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/survey/CreateSurvey.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,YAAY;CAGxB","sourcesContent":["import { BaseEntity } from '../../../../utils';\nimport { SurveyType } from '../../../Enum/SurveyType';\nimport { ISurvey, SurveyDataType } from '../../models/ISurvey';\n\nexport class CreateSurvey implements Omit<BaseEntity<ISurvey>, 'finishedAt' | 'cancelledAt' | 'idSociety'> {\n data: SurveyDataType;\n idSurveyType: SurveyType;\n}\n"]}
@@ -1,11 +1,14 @@
1
1
  import { SurveyType } from '../../Enum/SurveyType';
2
2
  import { ISociety } from './ISociety';
3
+ export declare type SurveyDataOfDataType = Array<string | number> | string;
4
+ export declare type SurveyDataType = Array<{
5
+ name: string;
6
+ data: SurveyDataOfDataType;
7
+ other?: string | null;
8
+ }>;
3
9
  export interface ISurvey {
4
10
  id?: number;
5
- data: {
6
- name: string;
7
- data: (string | number)[];
8
- }[];
11
+ data: SurveyDataType;
9
12
  idSurveyType: SurveyType;
10
13
  idSociety: number;
11
14
  finishedAt?: Date | null;
@@ -1 +1 @@
1
- {"version":3,"file":"ISurvey.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/ISurvey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,MAAM,WAAW,OAAO;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,CAAC,MAAM,GAAE,MAAM,CAAC,EAAE,CAAA;KAAE,EAAE,CAAC;IACnD,YAAY,EAAE,UAAU,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAElB,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAE1B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB"}
1
+ {"version":3,"file":"ISurvey.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/ISurvey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,oBAAY,oBAAoB,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC;AACnE,oBAAY,cAAc,GAAG,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,oBAAoB,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,CAAC;AAGxG,MAAM,WAAW,OAAO;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,cAAc,CAAC;IACrB,YAAY,EAAE,UAAU,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAElB,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAE1B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ISurvey.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/ISurvey.ts"],"names":[],"mappings":"","sourcesContent":["import { SurveyType } from '../../Enum/SurveyType';\nimport { ISociety } from './ISociety';\n\n// survey\nexport interface ISurvey {\n id?: number;\n data: { name: string, data: (string |number)[] }[];\n idSurveyType: SurveyType;\n idSociety: number;\n\n finishedAt?: Date | null;\n cancelledAt?: Date | null;\n\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n // Associations\n society?: ISociety;\n}\n"]}
1
+ {"version":3,"file":"ISurvey.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/ISurvey.ts"],"names":[],"mappings":"","sourcesContent":["import { SurveyType } from '../../Enum/SurveyType';\nimport { ISociety } from './ISociety';\n\nexport type SurveyDataOfDataType = Array<string | number> | string;\nexport type SurveyDataType = Array<{ name: string, data: SurveyDataOfDataType, other?: string | null }>;\n\n// survey\nexport interface ISurvey {\n id?: number;\n data: SurveyDataType;\n idSurveyType: SurveyType;\n idSociety: number;\n\n finishedAt?: Date | null;\n cancelledAt?: Date | null;\n\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n // Associations\n society?: ISociety;\n}\n"]}
@@ -3,8 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.SurveyTypeDatas = undefined;
7
+
8
+ var _SurveyType = require("./SurveyType");
9
+
6
10
  const SurveyTypeDatas = exports.SurveyTypeDatas = {
7
- 1: [{
11
+ [_SurveyType.SurveyType.ONBOARDING]: [{
8
12
  id: 1,
9
13
  question: 'interestingFeatures',
10
14
  type: 'checkbox',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../ts/types/Enum/SurveyTypeDatas.ts"],"names":[],"mappings":";;;;;AAAO,MAAM,eAAe,WAAf,eAAe,GAAG;AAC7B,KAAG,CACD;AACE,IAAA,EAAE,EAAE,CADN;AAEE,IAAA,QAAQ,EAAE,qBAFZ;AAGE,IAAA,IAAI,EAAE,UAHR;AAIE,IAAA,OAAO,EAAE,CACP,UADO,EAEP,mCAFO,EAGP,oBAHO,EAIP,uCAJO,EAKP,2BALO,EAMP,aANO,EAOP,yBAPO,EAQP,6CARO;AAJX,GADC,EAgBD;AACE,IAAA,EAAE,EAAE,CADN;AAEE,IAAA,QAAQ,EAAE,aAFZ;AAGE,IAAA,IAAI,EAAE,QAHR;AAIE,IAAA,OAAO,EAAE,CACP,MADO,EAEP,OAFO,EAGP,QAHO,EAIP,QAJO,EAKP,WALO;AAJX,GAhBC,EA4BD;AACE,IAAA,EAAE,EAAE,CADN;AAEE,IAAA,QAAQ,EAAE,mBAFZ;AAGE,IAAA,IAAI,EAAE,QAHR;AAIE,IAAA,OAAO,EAAE,CACP,UADO,EAEP,YAFO,EAGP,kBAHO,EAIP,qBAJO,EAKP,OALO;AAJX,GA5BC;AAD0B,CAAxB","sourcesContent":["export const SurveyTypeDatas = {\n 1: [\n {\n id: 1,\n question: 'interestingFeatures',\n type: 'checkbox',\n answers: [\n 'syncBanc',\n 'expensesAndRevenuesCategorization',\n 'cashFlowSimulation',\n 'expenseReportsAndKilometricAllowances',\n 'trackingToolAndDashboards',\n 'billingTool',\n 'vatDeclarationAutomated',\n 'balanceSheetAndTaxReturnGenerationAutomated',\n ],\n },\n {\n id: 2,\n question: 'societySize',\n type: 'select',\n answers: [\n '1to5',\n '6to10',\n '11to25',\n '26to50',\n '51andMore',\n ],\n },\n {\n id: 3,\n question: 'userRoleInSociety',\n type: 'select',\n answers: [\n 'director',\n 'accountant',\n 'accountantExpert',\n 'managementAssistant',\n 'other',\n ],\n },\n ],\n};"],"sourceRoot":"","file":"SurveyTypeDatas.js"}
1
+ {"version":3,"sources":["../../../ts/types/Enum/SurveyTypeDatas.ts"],"names":[],"mappings":";;;;;;;AAAA;;AAMO,MAAM,eAAe,WAAf,eAAe,GAAwB;AAClD,GAAC,uBAAW,UAAZ,GAAyB,CACvB;AACE,IAAA,EAAE,EAAE,CADN;AAEE,IAAA,QAAQ,EAAE,qBAFZ;AAGE,IAAA,IAAI,EAAE,UAHR;AAIE,IAAA,OAAO,EAAE,CACP,UADO,EAEP,mCAFO,EAGP,oBAHO,EAIP,uCAJO,EAKP,2BALO,EAMP,aANO,EAOP,yBAPO,EAQP,6CARO;AAJX,GADuB,EAgBvB;AACE,IAAA,EAAE,EAAE,CADN;AAEE,IAAA,QAAQ,EAAE,aAFZ;AAGE,IAAA,IAAI,EAAE,QAHR;AAIE,IAAA,OAAO,EAAE,CACP,MADO,EAEP,OAFO,EAGP,QAHO,EAIP,QAJO,EAKP,WALO;AAJX,GAhBuB,EA4BvB;AACE,IAAA,EAAE,EAAE,CADN;AAEE,IAAA,QAAQ,EAAE,mBAFZ;AAGE,IAAA,IAAI,EAAE,QAHR;AAIE,IAAA,OAAO,EAAE,CACP,UADO,EAEP,YAFO,EAGP,kBAHO,EAIP,qBAJO,EAKP,OALO;AAJX,GA5BuB;AADyB,CAA7C","sourcesContent":["import { SurveyType } from './SurveyType';\n\nexport type SurveyTypeDatasTypeContent = { id: number, question: string, type: 'checkbox' | 'select', answers: Array<string> };\nexport type SurveyTypeDatasType = {\n [key: number]: Array<SurveyTypeDatasTypeContent> };\n\nexport const SurveyTypeDatas: SurveyTypeDatasType = {\n [SurveyType.ONBOARDING]: [\n {\n id: 1,\n question: 'interestingFeatures',\n type: 'checkbox',\n answers: [\n 'syncBanc',\n 'expensesAndRevenuesCategorization',\n 'cashFlowSimulation',\n 'expenseReportsAndKilometricAllowances',\n 'trackingToolAndDashboards',\n 'billingTool',\n 'vatDeclarationAutomated',\n 'balanceSheetAndTaxReturnGenerationAutomated',\n ],\n },\n {\n id: 2,\n question: 'societySize',\n type: 'select',\n answers: [\n '1to5',\n '6to10',\n '11to25',\n '26to50',\n '51andMore',\n ],\n },\n {\n id: 3,\n question: 'userRoleInSociety',\n type: 'select',\n answers: [\n 'director',\n 'accountant',\n 'accountantExpert',\n 'managementAssistant',\n 'other',\n ],\n },\n ],\n};\n"],"sourceRoot":"","file":"SurveyTypeDatas.js"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../ts/types/Interface/api/survey/CreateSurvey.ts"],"names":[],"mappings":";;;;;;AAIM,MAAO,YAAP,CAAmB;;QAAZ,Y,GAAA,Y","sourcesContent":["import { BaseEntity } from '../../../../utils';\nimport { SurveyType } from '../../../Enum/SurveyType';\nimport { ISurvey } from '../../models/ISurvey';\n\nexport class CreateSurvey implements Omit<BaseEntity<ISurvey>, 'finishedAt' | 'cancelledAt' | 'idSociety'> {\n data: { name: string, data: (string |number)[] }[];\n idSurveyType: SurveyType;\n}\n"],"sourceRoot":"","file":"CreateSurvey.js"}
1
+ {"version":3,"sources":["../../../../../ts/types/Interface/api/survey/CreateSurvey.ts"],"names":[],"mappings":";;;;;;AAIM,MAAO,YAAP,CAAmB;;QAAZ,Y,GAAA,Y","sourcesContent":["import { BaseEntity } from '../../../../utils';\nimport { SurveyType } from '../../../Enum/SurveyType';\nimport { ISurvey, SurveyDataType } from '../../models/ISurvey';\n\nexport class CreateSurvey implements Omit<BaseEntity<ISurvey>, 'finishedAt' | 'cancelledAt' | 'idSociety'> {\n data: SurveyDataType;\n idSurveyType: SurveyType;\n}\n"],"sourceRoot":"","file":"CreateSurvey.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "0.4.8",
3
+ "version": "0.4.9-0",
4
4
  "description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
5
5
  "homepage": "https://gitlab.compta-clementine.fr/dev/silex-core",
6
6
  "main": "js/index.js",
@@ -1,5 +1,11 @@
1
- export const SurveyTypeDatas = {
2
- 1: [
1
+ import { SurveyType } from './SurveyType';
2
+
3
+ export type SurveyTypeDatasTypeContent = { id: number, question: string, type: 'checkbox' | 'select', answers: Array<string> };
4
+ export type SurveyTypeDatasType = {
5
+ [key: number]: Array<SurveyTypeDatasTypeContent> };
6
+
7
+ export const SurveyTypeDatas: SurveyTypeDatasType = {
8
+ [SurveyType.ONBOARDING]: [
3
9
  {
4
10
  id: 1,
5
11
  question: 'interestingFeatures',
@@ -40,4 +46,4 @@ export const SurveyTypeDatas = {
40
46
  ],
41
47
  },
42
48
  ],
43
- };
49
+ };
@@ -1,8 +1,8 @@
1
1
  import { BaseEntity } from '../../../../utils';
2
2
  import { SurveyType } from '../../../Enum/SurveyType';
3
- import { ISurvey } from '../../models/ISurvey';
3
+ import { ISurvey, SurveyDataType } from '../../models/ISurvey';
4
4
 
5
5
  export class CreateSurvey implements Omit<BaseEntity<ISurvey>, 'finishedAt' | 'cancelledAt' | 'idSociety'> {
6
- data: { name: string, data: (string |number)[] }[];
6
+ data: SurveyDataType;
7
7
  idSurveyType: SurveyType;
8
8
  }
@@ -1,10 +1,13 @@
1
1
  import { SurveyType } from '../../Enum/SurveyType';
2
2
  import { ISociety } from './ISociety';
3
3
 
4
+ export type SurveyDataOfDataType = Array<string | number> | string;
5
+ export type SurveyDataType = Array<{ name: string, data: SurveyDataOfDataType, other?: string | null }>;
6
+
4
7
  // survey
5
8
  export interface ISurvey {
6
9
  id?: number;
7
- data: { name: string, data: (string |number)[] }[];
10
+ data: SurveyDataType;
8
11
  idSurveyType: SurveyType;
9
12
  idSociety: number;
10
13