@likewatt/models 1.106.2 → 1.108.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.
@@ -33,6 +33,7 @@ export declare class CollectiveSite {
33
33
  hasAnalysis: boolean;
34
34
  buildingData?: BuildingData | null;
35
35
  buildingDataStatus?: BuildingDataStatus | null;
36
+ demoTemplateSourceId?: string;
36
37
  createdAt?: Date | string;
37
38
  updatedAt?: Date | string;
38
39
  }
@@ -219,6 +219,13 @@ __decorate([
219
219
  (0, class_validator_1.IsEnum)(BuildingDataStatus_1.BuildingDataStatus),
220
220
  __metadata("design:type", Object)
221
221
  ], CollectiveSite.prototype, "buildingDataStatus", void 0);
222
+ __decorate([
223
+ (0, swagger_1.ApiPropertyOptional)(),
224
+ (0, class_validator_1.IsOptional)(),
225
+ (0, class_validator_1.IsString)(),
226
+ (0, mongoose_1.Prop)({ required: false }),
227
+ __metadata("design:type", String)
228
+ ], CollectiveSite.prototype, "demoTemplateSourceId", void 0);
222
229
  __decorate([
223
230
  (0, swagger_1.ApiPropertyOptional)(),
224
231
  (0, class_validator_1.IsOptional)(),
@@ -0,0 +1,23 @@
1
+ import { Document } from 'mongoose';
2
+ /**
3
+ * Quota d'essai OCR Koncile, un document par compte PRINCIPAL.
4
+ * - config admin (`enabled`, `limit`) : ne touche JAMAIS `count`
5
+ * - incrément upload DONE (`count`) : ne touche JAMAIS `enabled`/`limit`
6
+ * Absence de doc = pas d'accès (désactivé par défaut).
7
+ */
8
+ export declare class KoncileOcrTrial {
9
+ userId: string;
10
+ enabled: boolean;
11
+ limit: number;
12
+ count: number;
13
+ }
14
+ export type KoncileOcrTrialDocument = KoncileOcrTrial & Document;
15
+ export declare const KoncileOcrTrialSchema: import("mongoose").Schema<KoncileOcrTrial, import("mongoose").Model<KoncileOcrTrial, any, any, any, Document<unknown, any, KoncileOcrTrial, any, {}> & KoncileOcrTrial & {
16
+ _id: import("mongoose").Types.ObjectId;
17
+ } & {
18
+ __v: number;
19
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, KoncileOcrTrial, Document<unknown, {}, import("mongoose").FlatRecord<KoncileOcrTrial>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<KoncileOcrTrial> & {
20
+ _id: import("mongoose").Types.ObjectId;
21
+ } & {
22
+ __v: number;
23
+ }>;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.KoncileOcrTrialSchema = exports.KoncileOcrTrial = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const mongoose_1 = require("@nestjs/mongoose");
15
+ const class_validator_1 = require("class-validator");
16
+ /**
17
+ * Quota d'essai OCR Koncile, un document par compte PRINCIPAL.
18
+ * - config admin (`enabled`, `limit`) : ne touche JAMAIS `count`
19
+ * - incrément upload DONE (`count`) : ne touche JAMAIS `enabled`/`limit`
20
+ * Absence de doc = pas d'accès (désactivé par défaut).
21
+ */
22
+ let KoncileOcrTrial = class KoncileOcrTrial {
23
+ };
24
+ exports.KoncileOcrTrial = KoncileOcrTrial;
25
+ __decorate([
26
+ (0, swagger_1.ApiProperty)({
27
+ description: 'Compte PRINCIPAL propriétaire du quota (unique, indexé)',
28
+ example: '2M61PGSm7lRpqXeaDacbAYOLTYG3',
29
+ }),
30
+ (0, mongoose_1.Prop)({ type: String, required: true, unique: true, index: true }),
31
+ (0, class_validator_1.IsString)(),
32
+ __metadata("design:type", String)
33
+ ], KoncileOcrTrial.prototype, "userId", void 0);
34
+ __decorate([
35
+ (0, swagger_1.ApiProperty)({
36
+ description: "Module activé par l'admin (défaut false)",
37
+ example: false,
38
+ }),
39
+ (0, mongoose_1.Prop)({ type: Boolean, required: true, default: false }),
40
+ (0, class_validator_1.IsOptional)(),
41
+ (0, class_validator_1.IsBoolean)(),
42
+ __metadata("design:type", Boolean)
43
+ ], KoncileOcrTrial.prototype, "enabled", void 0);
44
+ __decorate([
45
+ (0, swagger_1.ApiProperty)({
46
+ description: "Limite d'imports facturés (surchargeable par client)",
47
+ example: 10,
48
+ }),
49
+ (0, mongoose_1.Prop)({ type: Number, required: true, default: 10 }),
50
+ (0, class_validator_1.IsOptional)(),
51
+ (0, class_validator_1.IsNumber)(),
52
+ (0, class_validator_1.Min)(0),
53
+ __metadata("design:type", Number)
54
+ ], KoncileOcrTrial.prototype, "limit", void 0);
55
+ __decorate([
56
+ (0, swagger_1.ApiProperty)({
57
+ description: "Nombre d'imports facturés par Koncile (statut DONE)",
58
+ example: 0,
59
+ }),
60
+ (0, mongoose_1.Prop)({ type: Number, required: true, default: 0 }),
61
+ (0, class_validator_1.IsOptional)(),
62
+ (0, class_validator_1.IsNumber)(),
63
+ (0, class_validator_1.Min)(0),
64
+ __metadata("design:type", Number)
65
+ ], KoncileOcrTrial.prototype, "count", void 0);
66
+ exports.KoncileOcrTrial = KoncileOcrTrial = __decorate([
67
+ (0, mongoose_1.Schema)({
68
+ timestamps: true,
69
+ collection: 'koncileocrtrials',
70
+ toJSON: { virtuals: true, versionKey: false },
71
+ toObject: { virtuals: true, versionKey: false },
72
+ })
73
+ ], KoncileOcrTrial);
74
+ exports.KoncileOcrTrialSchema = mongoose_1.SchemaFactory.createForClass(KoncileOcrTrial);
@@ -135,6 +135,7 @@ export declare class Site {
135
135
  hasContractData: boolean;
136
136
  scenarioOption?: string;
137
137
  invoiceData?: InvoiceOcrResult;
138
+ demoTemplateSourceId?: string;
138
139
  createdAt?: Date | string;
139
140
  updatedAt?: Date | string;
140
141
  }
package/dist/core/Site.js CHANGED
@@ -713,6 +713,13 @@ __decorate([
713
713
  (0, class_transformer_1.Type)(() => invoiceOcrResult_1.InvoiceOcrResult),
714
714
  __metadata("design:type", invoiceOcrResult_1.InvoiceOcrResult)
715
715
  ], Site.prototype, "invoiceData", void 0);
716
+ __decorate([
717
+ (0, swagger_1.ApiPropertyOptional)(),
718
+ (0, class_validator_1.IsOptional)(),
719
+ (0, class_validator_1.IsString)(),
720
+ (0, mongoose_1.Prop)({ required: false }),
721
+ __metadata("design:type", String)
722
+ ], Site.prototype, "demoTemplateSourceId", void 0);
716
723
  __decorate([
717
724
  (0, swagger_1.ApiPropertyOptional)(),
718
725
  (0, class_validator_1.IsOptional)(),
package/dist/index.d.ts CHANGED
@@ -14,6 +14,7 @@ export * from './core/DefaultRate';
14
14
  export * from './core/Leads';
15
15
  export * from './core/Regex';
16
16
  export * from './core/InfoBanner';
17
+ export * from './core/KoncileOcrTrial';
17
18
  export * from './core/TypeORM/analysis';
18
19
  export * from './core/TypeORM/AuthAuditLog';
19
20
  export * from './core/TypeORM/Co2History';
package/dist/index.js CHANGED
@@ -32,6 +32,7 @@ __exportStar(require("./core/DefaultRate"), exports);
32
32
  __exportStar(require("./core/Leads"), exports);
33
33
  __exportStar(require("./core/Regex"), exports);
34
34
  __exportStar(require("./core/InfoBanner"), exports);
35
+ __exportStar(require("./core/KoncileOcrTrial"), exports);
35
36
  // TypeORM entities
36
37
  __exportStar(require("./core/TypeORM/analysis"), exports);
37
38
  __exportStar(require("./core/TypeORM/AuthAuditLog"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likewatt/models",
3
- "version": "1.106.2",
3
+ "version": "1.108.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {