@silexpert/core 1.3.168-approbation-5 → 1.3.168-approbation-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/dist/cjs/api/resources/SocietyApproval.d.ts +10 -5
- package/dist/cjs/api/resources/SocietyApproval.d.ts.map +1 -1
- package/dist/cjs/api/resources/SocietyApproval.js +10 -0
- package/dist/cjs/api/resources/SocietyApproval.js.map +1 -1
- package/dist/cjs/types/Interface/api/SocietyApproval.d.ts +8 -0
- package/dist/cjs/types/Interface/api/SocietyApproval.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/SocietyApproval.js +9 -1
- package/dist/cjs/types/Interface/api/SocietyApproval.js.map +1 -1
- package/dist/mjs/api/resources/SocietyApproval.d.ts +10 -5
- package/dist/mjs/api/resources/SocietyApproval.d.ts.map +1 -1
- package/dist/mjs/api/resources/SocietyApproval.js +10 -0
- package/dist/mjs/api/resources/SocietyApproval.js.map +1 -1
- package/dist/mjs/types/Interface/api/SocietyApproval.d.ts +8 -0
- package/dist/mjs/types/Interface/api/SocietyApproval.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/SocietyApproval.js +8 -0
- package/dist/mjs/types/Interface/api/SocietyApproval.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/SocietyApproval.ts +20 -5
- package/ts/types/Interface/api/SocietyApproval.ts +12 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Resource } from '../Resource';
|
|
2
|
-
import { ISocietyApproval, CreateDocument, ReadLibraryFile } from '../../types';
|
|
2
|
+
import { ISocietyApproval, CreateDocument, ReadLibraryFile, ResetDocument, IDocumentSection, IApprovalGeneratingData } from '../../types';
|
|
3
3
|
export declare class SocietyApproval extends Resource {
|
|
4
4
|
/**
|
|
5
5
|
* Get society approval data for a given exercice
|
|
@@ -13,10 +13,7 @@ export declare class SocietyApproval extends Resource {
|
|
|
13
13
|
* @param idExercice - The exercice ID
|
|
14
14
|
* @returns Approval data with template data for PDF generation
|
|
15
15
|
*/
|
|
16
|
-
getGeneratingData(idExercice: number): Promise<
|
|
17
|
-
approval: ISocietyApproval;
|
|
18
|
-
templateData: Record<string, any>;
|
|
19
|
-
}>;
|
|
16
|
+
getGeneratingData(idExercice: number): Promise<IApprovalGeneratingData>;
|
|
20
17
|
/**
|
|
21
18
|
* Create or update society approval
|
|
22
19
|
* @param idExercice - The exercice ID
|
|
@@ -31,6 +28,14 @@ export declare class SocietyApproval extends Resource {
|
|
|
31
28
|
* @returns PDF file as blob
|
|
32
29
|
*/
|
|
33
30
|
generatePdf(idExercice: number, payload: CreateDocument): Promise<ReadLibraryFile>;
|
|
31
|
+
/**
|
|
32
|
+
* Reset document section by regenerating from original template
|
|
33
|
+
* @param idExercice - The exercice ID
|
|
34
|
+
* @param idDocumentSection - The documentSection ID to reset
|
|
35
|
+
* @param payload - The document type for template selection
|
|
36
|
+
* @returns Updated documentSection with new content from template
|
|
37
|
+
*/
|
|
38
|
+
resetDocument(idExercice: number, idDocumentSection: number, payload: ResetDocument): Promise<IDocumentSection>;
|
|
34
39
|
/**
|
|
35
40
|
* Regenerate PDF document from existing documentSection HTML content
|
|
36
41
|
* @param idExercice - The exercice ID
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocietyApproval.d.ts","sourceRoot":"","sources":["../../../../ts/api/resources/SocietyApproval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,
|
|
1
|
+
{"version":3,"file":"SocietyApproval.d.ts","sourceRoot":"","sources":["../../../../ts/api/resources/SocietyApproval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,aAAa,CAAC;AAErB,qBAAa,eAAgB,SAAQ,QAAQ;IAC3C;;;;OAIG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIlD;;;;;OAKG;IACH,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAIvE;;;;;OAKG;IACH,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIxF;;;;;OAKG;IACH,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;IAIlF;;;;;;OAMG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAI/G;;;;;OAKG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAO9E"}
|
|
@@ -38,6 +38,16 @@ class SocietyApproval extends Resource_1.Resource {
|
|
|
38
38
|
generatePdf(idExercice, payload) {
|
|
39
39
|
return this.axios.$post(`/exercices/${idExercice}/approvals/pdf`, payload);
|
|
40
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Reset document section by regenerating from original template
|
|
43
|
+
* @param idExercice - The exercice ID
|
|
44
|
+
* @param idDocumentSection - The documentSection ID to reset
|
|
45
|
+
* @param payload - The document type for template selection
|
|
46
|
+
* @returns Updated documentSection with new content from template
|
|
47
|
+
*/
|
|
48
|
+
resetDocument(idExercice, idDocumentSection, payload) {
|
|
49
|
+
return this.axios.$put(`/exercices/${idExercice}/document-sections/${idDocumentSection}/reset`, payload);
|
|
50
|
+
}
|
|
41
51
|
/**
|
|
42
52
|
* Regenerate PDF document from existing documentSection HTML content
|
|
43
53
|
* @param idExercice - The exercice ID
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocietyApproval.js","sourceRoot":"","sources":["../../../../ts/api/resources/SocietyApproval.ts"],"names":[],"mappings":";;;AAAA,0CAAuC;
|
|
1
|
+
{"version":3,"file":"SocietyApproval.js","sourceRoot":"","sources":["../../../../ts/api/resources/SocietyApproval.ts"],"names":[],"mappings":";;;AAAA,0CAAuC;AAUvC,MAAa,eAAgB,SAAQ,mBAAQ;IAC3C;;;;OAIG;IACH,GAAG,CAAC,UAAkB;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,UAAU,YAAY,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;OAKG;IACH,iBAAiB,CAAC,UAAkB;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,UAAU,4BAA4B,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;OAKG;IACH,cAAc,CAAC,UAAkB,EAAE,OAAyB;QAC1D,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,UAAU,YAAY,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;;;;OAKG;IACH,WAAW,CAAC,UAAkB,EAAE,OAAuB;QACrD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,UAAU,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;OAMG;IACH,aAAa,CAAC,UAAkB,EAAE,iBAAyB,EAAE,OAAsB;QACjF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,UAAU,sBAAsB,iBAAiB,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC3G,CAAC;IAED;;;;;OAKG;IACH,aAAa,CAAC,UAAkB,EAAE,iBAAyB;QACzD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CACrB,cAAc,UAAU,2BAA2B,EACnD,EAAE,iBAAiB,EAAE,EACrB,EAAE,YAAY,EAAE,aAAa,EAAE,CAChC,CAAC;IACJ,CAAC;CACF;AAhED,0CAgEC","sourcesContent":["import { Resource } from '../Resource';\nimport {\n ISocietyApproval,\n CreateDocument,\n ReadLibraryFile,\n ResetDocument,\n IDocumentSection,\n IApprovalGeneratingData,\n} from '../../types';\n\nexport class SocietyApproval extends Resource {\n /**\n * Get society approval data for a given exercice\n * @param idExercice - The exercice ID\n * @returns Society approval with all needed data\n */\n get(idExercice: number): Promise<ISocietyApproval> {\n return this.axios.$get(`/exercices/${idExercice}/approvals`);\n }\n\n /**\n * Get approval data needed for PDF generation\n * Retrieves all necessary information before generating a PDF document\n * @param idExercice - The exercice ID\n * @returns Approval data with template data for PDF generation\n */\n getGeneratingData(idExercice: number): Promise<IApprovalGeneratingData> {\n return this.axios.$get(`/exercices/${idExercice}/approvals/generating-data`);\n }\n\n /**\n * Create or update society approval\n * @param idExercice - The exercice ID\n * @param payload - The approval data\n * @returns Updated or created society approval\n */\n updateOrCreate(idExercice: number, payload: ISocietyApproval): Promise<ISocietyApproval> {\n return this.axios.$post(`/exercices/${idExercice}/approvals`, payload);\n }\n\n /**\n * Generate approval PDF document\n * @param idExercice - The exercice ID\n * @param payload - The document type(s) to generate\n * @returns PDF file as blob\n */\n generatePdf(idExercice: number, payload: CreateDocument): Promise<ReadLibraryFile> {\n return this.axios.$post(`/exercices/${idExercice}/approvals/pdf`, payload);\n }\n\n /**\n * Reset document section by regenerating from original template\n * @param idExercice - The exercice ID\n * @param idDocumentSection - The documentSection ID to reset\n * @param payload - The document type for template selection\n * @returns Updated documentSection with new content from template\n */\n resetDocument(idExercice: number, idDocumentSection: number, payload: ResetDocument): Promise<IDocumentSection> {\n return this.axios.$put(`/exercices/${idExercice}/document-sections/${idDocumentSection}/reset`, payload);\n }\n\n /**\n * Regenerate PDF document from existing documentSection HTML content\n * @param idExercice - The exercice ID\n * @param idDocumentSection - The documentSection ID containing HTML content\n * @returns PDF file as buffer for download\n */\n regeneratePdf(idExercice: number, idDocumentSection: number): Promise<Buffer> {\n return this.axios.$post(\n `/exercices/${idExercice}/approvals/pdf/regenerate`,\n { idDocumentSection },\n { responseType: 'arraybuffer' },\n );\n }\n}\n"]}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { SocietyApprovalDocumentType } from '../../Enum/SocietyApproval';
|
|
2
|
+
import { ISocietyApproval } from '../models/ISocietyApproval';
|
|
2
3
|
export declare class SocietyApprovalJsonDatas {
|
|
3
4
|
approvalDate?: Date;
|
|
4
5
|
}
|
|
5
6
|
export declare class CreateDocument {
|
|
6
7
|
listIdDocumentType: SocietyApprovalDocumentType[];
|
|
7
8
|
}
|
|
9
|
+
export declare class ResetDocument {
|
|
10
|
+
idDocumentType: SocietyApprovalDocumentType;
|
|
11
|
+
}
|
|
12
|
+
export interface IApprovalGeneratingData {
|
|
13
|
+
approval: ISocietyApproval;
|
|
14
|
+
templateData: Record<string, any>;
|
|
15
|
+
}
|
|
8
16
|
//# sourceMappingURL=SocietyApproval.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocietyApproval.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/SocietyApproval.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"SocietyApproval.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/SocietyApproval.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,qBAAa,wBAAwB;IAInC,YAAY,CAAC,EAAE,IAAI,CAAC;CACrB;AAED,qBAAa,cAAc;IAGzB,kBAAkB,EAAE,2BAA2B,EAAE,CAAC;CACnD;AAED,qBAAa,aAAa;IAGxB,cAAc,EAAE,2BAA2B,CAAC;CAC7C;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC"}
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.CreateDocument = exports.SocietyApprovalJsonDatas = void 0;
|
|
12
|
+
exports.ResetDocument = exports.CreateDocument = exports.SocietyApprovalJsonDatas = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const utils_1 = require("../../../utils");
|
|
15
15
|
const SocietyApproval_1 = require("../../Enum/SocietyApproval");
|
|
@@ -30,4 +30,12 @@ __decorate([
|
|
|
30
30
|
(0, class_validator_1.IsEnum)(SocietyApproval_1.SocietyApprovalDocumentType, { each: true }),
|
|
31
31
|
__metadata("design:type", Array)
|
|
32
32
|
], CreateDocument.prototype, "listIdDocumentType", void 0);
|
|
33
|
+
class ResetDocument {
|
|
34
|
+
}
|
|
35
|
+
exports.ResetDocument = ResetDocument;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, utils_1.ApiProperty)(),
|
|
38
|
+
(0, class_validator_1.IsEnum)(SocietyApproval_1.SocietyApprovalDocumentType),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], ResetDocument.prototype, "idDocumentType", void 0);
|
|
33
41
|
//# sourceMappingURL=SocietyApproval.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocietyApproval.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/SocietyApproval.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA6D;AAC7D,0CAAkE;AAClE,gEAAyE;
|
|
1
|
+
{"version":3,"file":"SocietyApproval.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/SocietyApproval.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA6D;AAC7D,0CAAkE;AAClE,gEAAyE;AAGzE,MAAa,wBAAwB;CAKpC;AALD,4DAKC;AADC;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;8BACM,IAAI;8DAAC;AAGtB,MAAa,cAAc;CAI1B;AAJD,wCAIC;AADC;IAFC,IAAA,mBAAW,GAAE;IACb,IAAA,wBAAM,EAAC,6CAA2B,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;0DACF;AAGpD,MAAa,aAAa;CAIzB;AAJD,sCAIC;AADC;IAFC,IAAA,mBAAW,GAAE;IACb,IAAA,wBAAM,EAAC,6CAA2B,CAAC;;qDACQ","sourcesContent":["import { IsDate, IsEnum, IsOptional } from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../utils';\nimport { SocietyApprovalDocumentType } from '../../Enum/SocietyApproval';\nimport { ISocietyApproval } from '../models/ISocietyApproval';\n\nexport class SocietyApprovalJsonDatas {\n @ApiPropertyOptional()\n @IsOptional()\n @IsDate()\n approvalDate?: Date;\n}\n\nexport class CreateDocument {\n @ApiProperty()\n @IsEnum(SocietyApprovalDocumentType, { each: true })\n listIdDocumentType: SocietyApprovalDocumentType[];\n}\n\nexport class ResetDocument {\n @ApiProperty()\n @IsEnum(SocietyApprovalDocumentType)\n idDocumentType: SocietyApprovalDocumentType;\n}\n\nexport interface IApprovalGeneratingData {\n approval: ISocietyApproval;\n templateData: Record<string, any>;\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Resource } from '../Resource';
|
|
2
|
-
import { ISocietyApproval, CreateDocument, ReadLibraryFile } from '../../types';
|
|
2
|
+
import { ISocietyApproval, CreateDocument, ReadLibraryFile, ResetDocument, IDocumentSection, IApprovalGeneratingData } from '../../types';
|
|
3
3
|
export declare class SocietyApproval extends Resource {
|
|
4
4
|
/**
|
|
5
5
|
* Get society approval data for a given exercice
|
|
@@ -13,10 +13,7 @@ export declare class SocietyApproval extends Resource {
|
|
|
13
13
|
* @param idExercice - The exercice ID
|
|
14
14
|
* @returns Approval data with template data for PDF generation
|
|
15
15
|
*/
|
|
16
|
-
getGeneratingData(idExercice: number): Promise<
|
|
17
|
-
approval: ISocietyApproval;
|
|
18
|
-
templateData: Record<string, any>;
|
|
19
|
-
}>;
|
|
16
|
+
getGeneratingData(idExercice: number): Promise<IApprovalGeneratingData>;
|
|
20
17
|
/**
|
|
21
18
|
* Create or update society approval
|
|
22
19
|
* @param idExercice - The exercice ID
|
|
@@ -31,6 +28,14 @@ export declare class SocietyApproval extends Resource {
|
|
|
31
28
|
* @returns PDF file as blob
|
|
32
29
|
*/
|
|
33
30
|
generatePdf(idExercice: number, payload: CreateDocument): Promise<ReadLibraryFile>;
|
|
31
|
+
/**
|
|
32
|
+
* Reset document section by regenerating from original template
|
|
33
|
+
* @param idExercice - The exercice ID
|
|
34
|
+
* @param idDocumentSection - The documentSection ID to reset
|
|
35
|
+
* @param payload - The document type for template selection
|
|
36
|
+
* @returns Updated documentSection with new content from template
|
|
37
|
+
*/
|
|
38
|
+
resetDocument(idExercice: number, idDocumentSection: number, payload: ResetDocument): Promise<IDocumentSection>;
|
|
34
39
|
/**
|
|
35
40
|
* Regenerate PDF document from existing documentSection HTML content
|
|
36
41
|
* @param idExercice - The exercice ID
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocietyApproval.d.ts","sourceRoot":"","sources":["../../../../ts/api/resources/SocietyApproval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,
|
|
1
|
+
{"version":3,"file":"SocietyApproval.d.ts","sourceRoot":"","sources":["../../../../ts/api/resources/SocietyApproval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,aAAa,CAAC;AAErB,qBAAa,eAAgB,SAAQ,QAAQ;IAC3C;;;;OAIG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIlD;;;;;OAKG;IACH,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAIvE;;;;;OAKG;IACH,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIxF;;;;;OAKG;IACH,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;IAIlF;;;;;;OAMG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAI/G;;;;;OAKG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAO9E"}
|
|
@@ -35,6 +35,16 @@ export class SocietyApproval extends Resource {
|
|
|
35
35
|
generatePdf(idExercice, payload) {
|
|
36
36
|
return this.axios.$post(`/exercices/${idExercice}/approvals/pdf`, payload);
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Reset document section by regenerating from original template
|
|
40
|
+
* @param idExercice - The exercice ID
|
|
41
|
+
* @param idDocumentSection - The documentSection ID to reset
|
|
42
|
+
* @param payload - The document type for template selection
|
|
43
|
+
* @returns Updated documentSection with new content from template
|
|
44
|
+
*/
|
|
45
|
+
resetDocument(idExercice, idDocumentSection, payload) {
|
|
46
|
+
return this.axios.$put(`/exercices/${idExercice}/document-sections/${idDocumentSection}/reset`, payload);
|
|
47
|
+
}
|
|
38
48
|
/**
|
|
39
49
|
* Regenerate PDF document from existing documentSection HTML content
|
|
40
50
|
* @param idExercice - The exercice ID
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocietyApproval.js","sourceRoot":"","sources":["../../../../ts/api/resources/SocietyApproval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"SocietyApproval.js","sourceRoot":"","sources":["../../../../ts/api/resources/SocietyApproval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAUvC,MAAM,OAAO,eAAgB,SAAQ,QAAQ;IAC3C;;;;OAIG;IACH,GAAG,CAAC,UAAkB;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,UAAU,YAAY,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;OAKG;IACH,iBAAiB,CAAC,UAAkB;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,UAAU,4BAA4B,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;OAKG;IACH,cAAc,CAAC,UAAkB,EAAE,OAAyB;QAC1D,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,UAAU,YAAY,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;;;;OAKG;IACH,WAAW,CAAC,UAAkB,EAAE,OAAuB;QACrD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,UAAU,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;OAMG;IACH,aAAa,CAAC,UAAkB,EAAE,iBAAyB,EAAE,OAAsB;QACjF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,UAAU,sBAAsB,iBAAiB,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC3G,CAAC;IAED;;;;;OAKG;IACH,aAAa,CAAC,UAAkB,EAAE,iBAAyB;QACzD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CACrB,cAAc,UAAU,2BAA2B,EACnD,EAAE,iBAAiB,EAAE,EACrB,EAAE,YAAY,EAAE,aAAa,EAAE,CAChC,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { Resource } from '../Resource';\nimport {\n ISocietyApproval,\n CreateDocument,\n ReadLibraryFile,\n ResetDocument,\n IDocumentSection,\n IApprovalGeneratingData,\n} from '../../types';\n\nexport class SocietyApproval extends Resource {\n /**\n * Get society approval data for a given exercice\n * @param idExercice - The exercice ID\n * @returns Society approval with all needed data\n */\n get(idExercice: number): Promise<ISocietyApproval> {\n return this.axios.$get(`/exercices/${idExercice}/approvals`);\n }\n\n /**\n * Get approval data needed for PDF generation\n * Retrieves all necessary information before generating a PDF document\n * @param idExercice - The exercice ID\n * @returns Approval data with template data for PDF generation\n */\n getGeneratingData(idExercice: number): Promise<IApprovalGeneratingData> {\n return this.axios.$get(`/exercices/${idExercice}/approvals/generating-data`);\n }\n\n /**\n * Create or update society approval\n * @param idExercice - The exercice ID\n * @param payload - The approval data\n * @returns Updated or created society approval\n */\n updateOrCreate(idExercice: number, payload: ISocietyApproval): Promise<ISocietyApproval> {\n return this.axios.$post(`/exercices/${idExercice}/approvals`, payload);\n }\n\n /**\n * Generate approval PDF document\n * @param idExercice - The exercice ID\n * @param payload - The document type(s) to generate\n * @returns PDF file as blob\n */\n generatePdf(idExercice: number, payload: CreateDocument): Promise<ReadLibraryFile> {\n return this.axios.$post(`/exercices/${idExercice}/approvals/pdf`, payload);\n }\n\n /**\n * Reset document section by regenerating from original template\n * @param idExercice - The exercice ID\n * @param idDocumentSection - The documentSection ID to reset\n * @param payload - The document type for template selection\n * @returns Updated documentSection with new content from template\n */\n resetDocument(idExercice: number, idDocumentSection: number, payload: ResetDocument): Promise<IDocumentSection> {\n return this.axios.$put(`/exercices/${idExercice}/document-sections/${idDocumentSection}/reset`, payload);\n }\n\n /**\n * Regenerate PDF document from existing documentSection HTML content\n * @param idExercice - The exercice ID\n * @param idDocumentSection - The documentSection ID containing HTML content\n * @returns PDF file as buffer for download\n */\n regeneratePdf(idExercice: number, idDocumentSection: number): Promise<Buffer> {\n return this.axios.$post(\n `/exercices/${idExercice}/approvals/pdf/regenerate`,\n { idDocumentSection },\n { responseType: 'arraybuffer' },\n );\n }\n}\n"]}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { SocietyApprovalDocumentType } from '../../Enum/SocietyApproval';
|
|
2
|
+
import { ISocietyApproval } from '../models/ISocietyApproval';
|
|
2
3
|
export declare class SocietyApprovalJsonDatas {
|
|
3
4
|
approvalDate?: Date;
|
|
4
5
|
}
|
|
5
6
|
export declare class CreateDocument {
|
|
6
7
|
listIdDocumentType: SocietyApprovalDocumentType[];
|
|
7
8
|
}
|
|
9
|
+
export declare class ResetDocument {
|
|
10
|
+
idDocumentType: SocietyApprovalDocumentType;
|
|
11
|
+
}
|
|
12
|
+
export interface IApprovalGeneratingData {
|
|
13
|
+
approval: ISocietyApproval;
|
|
14
|
+
templateData: Record<string, any>;
|
|
15
|
+
}
|
|
8
16
|
//# sourceMappingURL=SocietyApproval.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocietyApproval.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/SocietyApproval.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"SocietyApproval.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/SocietyApproval.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,qBAAa,wBAAwB;IAInC,YAAY,CAAC,EAAE,IAAI,CAAC;CACrB;AAED,qBAAa,cAAc;IAGzB,kBAAkB,EAAE,2BAA2B,EAAE,CAAC;CACnD;AAED,qBAAa,aAAa;IAGxB,cAAc,EAAE,2BAA2B,CAAC;CAC7C;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC"}
|
|
@@ -27,4 +27,12 @@ __decorate([
|
|
|
27
27
|
IsEnum(SocietyApprovalDocumentType, { each: true }),
|
|
28
28
|
__metadata("design:type", Array)
|
|
29
29
|
], CreateDocument.prototype, "listIdDocumentType", void 0);
|
|
30
|
+
export class ResetDocument {
|
|
31
|
+
idDocumentType;
|
|
32
|
+
}
|
|
33
|
+
__decorate([
|
|
34
|
+
ApiProperty(),
|
|
35
|
+
IsEnum(SocietyApprovalDocumentType),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], ResetDocument.prototype, "idDocumentType", void 0);
|
|
30
38
|
//# sourceMappingURL=SocietyApproval.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocietyApproval.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/SocietyApproval.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"SocietyApproval.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/SocietyApproval.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAGzE,MAAM,OAAO,wBAAwB;IAInC,YAAY,CAAQ;CACrB;AADC;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,MAAM,EAAE;8BACM,IAAI;8DAAC;AAGtB,MAAM,OAAO,cAAc;IAGzB,kBAAkB,CAAgC;CACnD;AADC;IAFC,WAAW,EAAE;IACb,MAAM,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;0DACF;AAGpD,MAAM,OAAO,aAAa;IAGxB,cAAc,CAA8B;CAC7C;AADC;IAFC,WAAW,EAAE;IACb,MAAM,CAAC,2BAA2B,CAAC;;qDACQ","sourcesContent":["import { IsDate, IsEnum, IsOptional } from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../utils';\nimport { SocietyApprovalDocumentType } from '../../Enum/SocietyApproval';\nimport { ISocietyApproval } from '../models/ISocietyApproval';\n\nexport class SocietyApprovalJsonDatas {\n @ApiPropertyOptional()\n @IsOptional()\n @IsDate()\n approvalDate?: Date;\n}\n\nexport class CreateDocument {\n @ApiProperty()\n @IsEnum(SocietyApprovalDocumentType, { each: true })\n listIdDocumentType: SocietyApprovalDocumentType[];\n}\n\nexport class ResetDocument {\n @ApiProperty()\n @IsEnum(SocietyApprovalDocumentType)\n idDocumentType: SocietyApprovalDocumentType;\n}\n\nexport interface IApprovalGeneratingData {\n approval: ISocietyApproval;\n templateData: Record<string, any>;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.3.168-approbation-
|
|
3
|
+
"version": "1.3.168-approbation-6",
|
|
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-api",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { Resource } from '../Resource';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
ISocietyApproval,
|
|
4
|
+
CreateDocument,
|
|
5
|
+
ReadLibraryFile,
|
|
6
|
+
ResetDocument,
|
|
7
|
+
IDocumentSection,
|
|
8
|
+
IApprovalGeneratingData,
|
|
9
|
+
} from '../../types';
|
|
3
10
|
|
|
4
11
|
export class SocietyApproval extends Resource {
|
|
5
12
|
/**
|
|
@@ -17,10 +24,7 @@ export class SocietyApproval extends Resource {
|
|
|
17
24
|
* @param idExercice - The exercice ID
|
|
18
25
|
* @returns Approval data with template data for PDF generation
|
|
19
26
|
*/
|
|
20
|
-
getGeneratingData(idExercice: number): Promise<{
|
|
21
|
-
approval: ISocietyApproval;
|
|
22
|
-
templateData: Record<string, any>;
|
|
23
|
-
}> {
|
|
27
|
+
getGeneratingData(idExercice: number): Promise<IApprovalGeneratingData> {
|
|
24
28
|
return this.axios.$get(`/exercices/${idExercice}/approvals/generating-data`);
|
|
25
29
|
}
|
|
26
30
|
|
|
@@ -44,6 +48,17 @@ export class SocietyApproval extends Resource {
|
|
|
44
48
|
return this.axios.$post(`/exercices/${idExercice}/approvals/pdf`, payload);
|
|
45
49
|
}
|
|
46
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Reset document section by regenerating from original template
|
|
53
|
+
* @param idExercice - The exercice ID
|
|
54
|
+
* @param idDocumentSection - The documentSection ID to reset
|
|
55
|
+
* @param payload - The document type for template selection
|
|
56
|
+
* @returns Updated documentSection with new content from template
|
|
57
|
+
*/
|
|
58
|
+
resetDocument(idExercice: number, idDocumentSection: number, payload: ResetDocument): Promise<IDocumentSection> {
|
|
59
|
+
return this.axios.$put(`/exercices/${idExercice}/document-sections/${idDocumentSection}/reset`, payload);
|
|
60
|
+
}
|
|
61
|
+
|
|
47
62
|
/**
|
|
48
63
|
* Regenerate PDF document from existing documentSection HTML content
|
|
49
64
|
* @param idExercice - The exercice ID
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IsDate, IsEnum, IsOptional } from 'class-validator';
|
|
2
2
|
import { ApiProperty, ApiPropertyOptional } from '../../../utils';
|
|
3
3
|
import { SocietyApprovalDocumentType } from '../../Enum/SocietyApproval';
|
|
4
|
+
import { ISocietyApproval } from '../models/ISocietyApproval';
|
|
4
5
|
|
|
5
6
|
export class SocietyApprovalJsonDatas {
|
|
6
7
|
@ApiPropertyOptional()
|
|
@@ -14,3 +15,14 @@ export class CreateDocument {
|
|
|
14
15
|
@IsEnum(SocietyApprovalDocumentType, { each: true })
|
|
15
16
|
listIdDocumentType: SocietyApprovalDocumentType[];
|
|
16
17
|
}
|
|
18
|
+
|
|
19
|
+
export class ResetDocument {
|
|
20
|
+
@ApiProperty()
|
|
21
|
+
@IsEnum(SocietyApprovalDocumentType)
|
|
22
|
+
idDocumentType: SocietyApprovalDocumentType;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface IApprovalGeneratingData {
|
|
26
|
+
approval: ISocietyApproval;
|
|
27
|
+
templateData: Record<string, any>;
|
|
28
|
+
}
|