Skip to content

Commit f43569d

Browse files
committed
deploy: 51e5532
1 parent 571ff55 commit f43569d

File tree

19 files changed

+251
-247
lines changed

19 files changed

+251
-247
lines changed

classes/IdentitiesCrudService.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2716,9 +2716,9 @@ <h3 id="methods">
27162716
delete (data.metadata);
27172717
}
27182718

2719-
await this._validation.transform(data.additionalFields);
2719+
await this._validation.transform(data.additionalFields || {});
27202720

2721-
let validationsAdFields &#x3D; await this._validation.validate(data.additionalFields);
2721+
let validationsAdFields &#x3D; await this._validation.validate(data.additionalFields || {});
27222722

27232723
this.logger.log(&#x60;${logPrefix} AdditionalFields validation successful.&#x60;);
27242724
this.logger.log(&#x60;Validations Additional fields: ${validationsAdFields}&#x60;);

injectables/IdentitiesValidationService.html

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ <h3 id="methods">
670670
<tr>
671671
<td class="col-md-4">
672672
<span class="modifier-icon icon ion-ios-reset"></span>
673-
<code>transform(data: AdditionalFieldsPart | additionalFieldsPartDto)</code>
673+
<code>transform(data: Partial<AdditionalFieldsPart | additionalFieldsPartDto>)</code>
674674
</td>
675675
</tr>
676676

@@ -695,26 +695,30 @@ <h3 id="methods">
695695
<td>Name</td>
696696
<td>Type</td>
697697
<td>Optional</td>
698+
<td>Default value</td>
698699
</tr>
699700
</thead>
700701
<tbody>
701702
<tr>
702703
<td>data</td>
703704
<td>
704-
<code>AdditionalFieldsPart | additionalFieldsPartDto</code>
705+
<code>Partial&lt;AdditionalFieldsPart | additionalFieldsPartDto&gt;</code>
705706
</td>
706707

707708
<td>
708709
No
709710
</td>
710711

712+
<td>
713+
<code>{}</code>
714+
</td>
711715

712716
</tr>
713717
</tbody>
714718
</table>
715719
</div>
716720
<div class="io-description">
717-
<b>Returns : </b> <code>Promise&lt;AdditionalFieldsPart | additionalFieldsPartDto&gt;</code>
721+
<b>Returns : </b> <code>Promise&lt;Partial&lt;AdditionalFieldsPart | additionalFieldsPartDto&gt;&gt;</code>
718722

719723
</div>
720724
<div class="io-description">
@@ -1271,7 +1275,7 @@ <h3 id="inputs">
12711275
import ajvErrors from &#x27;ajv-errors&#x27;;
12721276
import { ValidationConfigException, ValidationSchemaException } from &#x27;~/_common/errors/ValidationException&#x27;;
12731277
import { additionalFieldsPartDto } from &#x27;../_dto/_parts/additionalFields.dto&#x27;;
1274-
import {ConfigService} from &quot;@nestjs/config&quot;;
1278+
import { ConfigService } from &quot;@nestjs/config&quot;;
12751279

12761280
/**
12771281
* Service responsible for validating identities.
@@ -1332,7 +1336,7 @@ <h3 id="inputs">
13321336
return null;
13331337
}
13341338

1335-
public async transform(data: AdditionalFieldsPart | additionalFieldsPartDto): Promise&lt;AdditionalFieldsPart | additionalFieldsPartDto&gt; {
1339+
public async transform(data: Partial&lt;AdditionalFieldsPart | additionalFieldsPartDto&gt; &#x3D; {}): Promise&lt;Partial&lt;AdditionalFieldsPart | additionalFieldsPartDto&gt;&gt; {
13361340
if (!data.objectClasses) {
13371341
data.objectClasses &#x3D; [];
13381342
}
@@ -1341,15 +1345,15 @@ <h3 id="inputs">
13411345
}
13421346
data.validations &#x3D; {};
13431347

1344-
const objectClasses &#x3D; data.objectClasses || [];
13451348
const attributes &#x3D; data.attributes || {};
13461349
const attributesKeys &#x3D; Object.keys(attributes);
1347-
const validations &#x3D; {};
1350+
13481351
//test si il y a les attributs sans attributes
13491352
await this.checkAndCreateObjectClasses(data);
13501353
for (const key of attributesKeys) {
13511354
await this.transformAttribute(key, attributes[key], attributes);
13521355
}
1356+
13531357
return data
13541358
}
13551359

@@ -1487,7 +1491,7 @@ <h3 id="inputs">
14871491
* @param data - The additional fields data to validate.
14881492
* @returns A promise that resolves if validation succeeds, or rejects with validation errors.
14891493
*/
1490-
public async validate(data: AdditionalFieldsPart | additionalFieldsPartDto,callException:boolean&#x3D;true): Promise&lt;object&gt; {
1494+
public async validate(data: AdditionalFieldsPart | additionalFieldsPartDto, callException: boolean &#x3D; true): Promise&lt;object&gt; {
14911495
if (!data.objectClasses) {
14921496
data.objectClasses &#x3D; [];
14931497
}
@@ -1576,15 +1580,15 @@ <h3 id="inputs">
15761580
// mise de min length et minItems dans les champs requis
15771581
if (schema.hasOwnProperty(&#x27;required&#x27;)) {
15781582
for (const required of schema[&#x27;required&#x27;]) {
1579-
switch(schema[&#x27;properties&#x27;][required][&#x27;type&#x27;]){
1583+
switch (schema[&#x27;properties&#x27;][required][&#x27;type&#x27;]) {
15801584
case &#x27;array&#x27;:
1581-
if (!schema[&#x27;properties&#x27;][required][&#x27;minItems&#x27;]){
1582-
schema[&#x27;properties&#x27;][required][&#x27;minItems&#x27;]&#x3D;1
1585+
if (!schema[&#x27;properties&#x27;][required][&#x27;minItems&#x27;]) {
1586+
schema[&#x27;properties&#x27;][required][&#x27;minItems&#x27;] &#x3D; 1
15831587
}
15841588
break;
15851589
case &#x27;string&#x27;:
1586-
if (!schema[&#x27;properties&#x27;][required][&#x27;minLength&#x27;]){
1587-
schema[&#x27;properties&#x27;][required][&#x27;minLength&#x27;]&#x3D;1
1590+
if (!schema[&#x27;properties&#x27;][required][&#x27;minLength&#x27;]) {
1591+
schema[&#x27;properties&#x27;][required][&#x27;minLength&#x27;] &#x3D; 1
15881592
}
15891593
break;
15901594
}
@@ -1704,8 +1708,8 @@ <h3 id="inputs">
17041708
}
17051709
return parse(readFileSync(filePath, &#x27;utf-8&#x27;));
17061710
}
1707-
private async translateAjv(messages){
1708-
switch(this.config.get(&#x27;application.lang&#x27;)){
1711+
private async translateAjv(messages) {
1712+
switch (this.config.get(&#x27;application.lang&#x27;)) {
17091713
case &#x27;en&#x27;:
17101714
break
17111715
case &#x27;fr&#x27;:

js/search/search_index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/AppModule.html

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -117,91 +117,91 @@
117117
<title>cluster_AppModule</title>
118118
<polygon fill="none" stroke="black" stroke-dasharray="1,5" points="8,-70 8,-195 866,-195 866,-70 8,-70"/>
119119
</g>
120-
<g id="clust3" class="cluster">
121-
<title>cluster_AppModule_imports</title>
122-
<polygon fill="none" stroke="black" points="343,-78 343,-130 858,-130 858,-78 343,-78"/>
123-
</g>
124120
<g id="clust6" class="cluster">
125121
<title>cluster_AppModule_providers</title>
126-
<polygon fill="none" stroke="black" points="16,-78 16,-130 335,-130 335,-78 16,-78"/>
122+
<polygon fill="none" stroke="black" points="539,-78 539,-130 858,-130 858,-78 539,-78"/>
123+
</g>
124+
<g id="clust3" class="cluster">
125+
<title>cluster_AppModule_imports</title>
126+
<polygon fill="none" stroke="black" points="16,-78 16,-130 531,-130 531,-78 16,-78"/>
127127
</g>
128128
<!-- CoreModule -->
129129
<g id="node1" class="node">
130130
<title>CoreModule</title>
131-
<polygon fill="#8dd3c7" stroke="black" points="850.26,-122 847.26,-126 826.26,-126 823.26,-122 763.74,-122 763.74,-86 850.26,-86 850.26,-122"/>
132-
<text text-anchor="middle" x="807" y="-99.8" font-family="Times,serif" font-size="14.00">CoreModule</text>
131+
<polygon fill="#8dd3c7" stroke="black" points="523.26,-122 520.26,-126 499.26,-126 496.26,-122 436.74,-122 436.74,-86 523.26,-86 523.26,-122"/>
132+
<text text-anchor="middle" x="480" y="-99.8" font-family="Times,serif" font-size="14.00">CoreModule</text>
133133
</g>
134134
<!-- AppModule -->
135135
<g id="node5" class="node">
136136
<title>AppModule</title>
137-
<polygon fill="#8dd3c7" stroke="black" points="509.66,-187 506.66,-191 485.66,-191 482.66,-187 426.34,-187 426.34,-151 509.66,-151 509.66,-187"/>
138-
<text text-anchor="middle" x="468" y="-164.8" font-family="Times,serif" font-size="14.00">AppModule</text>
137+
<polygon fill="#8dd3c7" stroke="black" points="457.66,-187 454.66,-191 433.66,-191 430.66,-187 374.34,-187 374.34,-151 457.66,-151 457.66,-187"/>
138+
<text text-anchor="middle" x="416" y="-164.8" font-family="Times,serif" font-size="14.00">AppModule</text>
139139
</g>
140140
<!-- CoreModule&#45;&gt;AppModule -->
141141
<g id="edge1" class="edge">
142142
<title>CoreModule&#45;&gt;AppModule</title>
143-
<path fill="none" stroke="black" d="M807,-122.28C807,-143.32 807,-175 807,-175 807,-175 519.91,-175 519.91,-175"/>
144-
<polygon fill="black" stroke="black" points="519.91,-171.5 509.91,-175 519.91,-178.5 519.91,-171.5"/>
143+
<path fill="none" stroke="black" d="M447.22,-122.11C447.22,-122.11 447.22,-140.99 447.22,-140.99"/>
144+
<polygon fill="black" stroke="black" points="443.72,-140.99 447.22,-150.99 450.72,-140.99 443.72,-140.99"/>
145145
</g>
146146
<!-- ManagementModule -->
147147
<g id="node2" class="node">
148148
<title>ManagementModule</title>
149-
<polygon fill="#8dd3c7" stroke="black" points="745.13,-122 742.13,-126 721.13,-126 718.13,-122 612.87,-122 612.87,-86 745.13,-86 745.13,-122"/>
150-
<text text-anchor="middle" x="679" y="-99.8" font-family="Times,serif" font-size="14.00">ManagementModule</text>
149+
<polygon fill="#8dd3c7" stroke="black" points="418.13,-122 415.13,-126 394.13,-126 391.13,-122 285.87,-122 285.87,-86 418.13,-86 418.13,-122"/>
150+
<text text-anchor="middle" x="352" y="-99.8" font-family="Times,serif" font-size="14.00">ManagementModule</text>
151151
</g>
152152
<!-- ManagementModule&#45;&gt;AppModule -->
153153
<g id="edge2" class="edge">
154154
<title>ManagementModule&#45;&gt;AppModule</title>
155-
<path fill="none" stroke="black" d="M679,-122.02C679,-139.37 679,-163 679,-163 679,-163 519.69,-163 519.69,-163"/>
156-
<polygon fill="black" stroke="black" points="519.69,-159.5 509.69,-163 519.69,-166.5 519.69,-159.5"/>
155+
<path fill="none" stroke="black" d="M396.24,-122.11C396.24,-122.11 396.24,-140.99 396.24,-140.99"/>
156+
<polygon fill="black" stroke="black" points="392.74,-140.99 396.24,-150.99 399.74,-140.99 392.74,-140.99"/>
157157
</g>
158158
<!-- MigrationsModule -->
159159
<g id="node3" class="node">
160160
<title>MigrationsModule</title>
161-
<polygon fill="#8dd3c7" stroke="black" points="594.49,-122 591.49,-126 570.49,-126 567.49,-122 473.51,-122 473.51,-86 594.49,-86 594.49,-122"/>
162-
<text text-anchor="middle" x="534" y="-99.8" font-family="Times,serif" font-size="14.00">MigrationsModule</text>
161+
<polygon fill="#8dd3c7" stroke="black" points="267.49,-122 264.49,-126 243.49,-126 240.49,-122 146.51,-122 146.51,-86 267.49,-86 267.49,-122"/>
162+
<text text-anchor="middle" x="207" y="-99.8" font-family="Times,serif" font-size="14.00">MigrationsModule</text>
163163
</g>
164164
<!-- MigrationsModule&#45;&gt;AppModule -->
165165
<g id="edge3" class="edge">
166166
<title>MigrationsModule&#45;&gt;AppModule</title>
167-
<path fill="none" stroke="black" d="M491.67,-122.11C491.67,-122.11 491.67,-140.99 491.67,-140.99"/>
168-
<polygon fill="black" stroke="black" points="488.17,-140.99 491.67,-150.99 495.17,-140.99 488.17,-140.99"/>
167+
<path fill="none" stroke="black" d="M207,-122.02C207,-139.37 207,-163 207,-163 207,-163 364.21,-163 364.21,-163"/>
168+
<polygon fill="black" stroke="black" points="364.21,-166.5 374.21,-163 364.21,-159.5 364.21,-166.5"/>
169169
</g>
170170
<!-- SettingsModule -->
171171
<g id="node4" class="node">
172172
<title>SettingsModule</title>
173-
<polygon fill="#8dd3c7" stroke="black" points="455.16,-122 452.16,-126 431.16,-126 428.16,-122 350.84,-122 350.84,-86 455.16,-86 455.16,-122"/>
174-
<text text-anchor="middle" x="403" y="-99.8" font-family="Times,serif" font-size="14.00">SettingsModule</text>
173+
<polygon fill="#8dd3c7" stroke="black" points="128.16,-122 125.16,-126 104.16,-126 101.16,-122 23.84,-122 23.84,-86 128.16,-86 128.16,-122"/>
174+
<text text-anchor="middle" x="76" y="-99.8" font-family="Times,serif" font-size="14.00">SettingsModule</text>
175175
</g>
176176
<!-- SettingsModule&#45;&gt;AppModule -->
177177
<g id="edge4" class="edge">
178178
<title>SettingsModule&#45;&gt;AppModule</title>
179-
<path fill="none" stroke="black" d="M440.75,-122.11C440.75,-122.11 440.75,-140.99 440.75,-140.99"/>
180-
<polygon fill="black" stroke="black" points="437.25,-140.99 440.75,-150.99 444.25,-140.99 437.25,-140.99"/>
179+
<path fill="none" stroke="black" d="M76,-122.28C76,-143.32 76,-175 76,-175 76,-175 364.31,-175 364.31,-175"/>
180+
<polygon fill="black" stroke="black" points="364.31,-178.5 374.31,-175 364.31,-171.5 364.31,-178.5"/>
181181
</g>
182182
<!-- AppService -->
183183
<g id="node6" class="node">
184184
<title>AppService</title>
185-
<ellipse fill="#fdb462" stroke="black" cx="270" cy="-104" rx="56.74" ry="18"/>
186-
<text text-anchor="middle" x="270" y="-99.8" font-family="Times,serif" font-size="14.00">AppService</text>
185+
<ellipse fill="#fdb462" stroke="black" cx="793" cy="-104" rx="56.74" ry="18"/>
186+
<text text-anchor="middle" x="793" y="-99.8" font-family="Times,serif" font-size="14.00">AppService</text>
187187
</g>
188188
<!-- AppService&#45;&gt;AppModule -->
189189
<g id="edge5" class="edge">
190190
<title>AppService&#45;&gt;AppModule</title>
191-
<path fill="none" stroke="black" d="M270,-122.02C270,-139.37 270,-163 270,-163 270,-163 416.01,-163 416.01,-163"/>
192-
<polygon fill="black" stroke="black" points="416.01,-166.5 426.01,-163 416.01,-159.5 416.01,-166.5"/>
191+
<path fill="none" stroke="black" d="M793,-122.28C793,-143.32 793,-175 793,-175 793,-175 467.79,-175 467.79,-175"/>
192+
<polygon fill="black" stroke="black" points="467.79,-171.5 457.79,-175 467.79,-178.5 467.79,-171.5"/>
193193
</g>
194194
<!-- ShutdownObserver -->
195195
<g id="node7" class="node">
196196
<title>ShutdownObserver</title>
197-
<ellipse fill="#fdb462" stroke="black" cx="110" cy="-104" rx="85.68" ry="18"/>
198-
<text text-anchor="middle" x="110" y="-99.8" font-family="Times,serif" font-size="14.00">ShutdownObserver</text>
197+
<ellipse fill="#fdb462" stroke="black" cx="633" cy="-104" rx="85.68" ry="18"/>
198+
<text text-anchor="middle" x="633" y="-99.8" font-family="Times,serif" font-size="14.00">ShutdownObserver</text>
199199
</g>
200200
<!-- ShutdownObserver&#45;&gt;AppModule -->
201201
<g id="edge6" class="edge">
202202
<title>ShutdownObserver&#45;&gt;AppModule</title>
203-
<path fill="none" stroke="black" d="M110,-122.28C110,-143.32 110,-175 110,-175 110,-175 416.23,-175 416.23,-175"/>
204-
<polygon fill="black" stroke="black" points="416.23,-178.5 426.23,-175 416.23,-171.5 416.23,-178.5"/>
203+
<path fill="none" stroke="black" d="M633,-122.02C633,-139.37 633,-163 633,-163 633,-163 467.84,-163 467.84,-163"/>
204+
<polygon fill="black" stroke="black" points="467.84,-159.5 457.84,-163 467.84,-166.5 467.84,-159.5"/>
205205
</g>
206206
</g>
207207
</svg>

0 commit comments

Comments
 (0)