@topconsultnpm/sdk-ts 6.20.0-dev2.8 → 6.20.0-dev2.9

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.
@@ -307,4 +307,45 @@ export class PlatformObjectValidator {
307
307
  return dtdFrom;
308
308
  });
309
309
  }
310
+ static DataListValidator(d) {
311
+ return __awaiter(this, void 0, void 0, function* () {
312
+ var _a;
313
+ let vil = [];
314
+ this.ObjectNameValidator(d.name, TMPropertyNames.entityName, vil, TMPropertyNames.entityName);
315
+ this.RequiredObjectValidator(d.items, TMPropertyNames.items, vil, '');
316
+ if (d.items) {
317
+ if (d.items.length == 0)
318
+ this.RequiredNotEqualZeroNumberValidator_RequiredField((_a = d.items) === null || _a === void 0 ? void 0 : _a.length, TMPropertyNames.items, vil, '');
319
+ else {
320
+ let viList;
321
+ let i = 0;
322
+ for (let aid of d.items) {
323
+ i++;
324
+ viList = [];
325
+ yield this.DataListItemValidator(aid, viList, true);
326
+ for (let vi of viList) {
327
+ vil.push(new ValidationItem(vi.ResultType, vi.PropertyName, `${SDK_Localizator.DataListItem} #${i} - ${vi.Message}`));
328
+ }
329
+ }
330
+ for (let curdlid of d.items) {
331
+ let v = d.items.filter(i => i.value == curdlid.value);
332
+ if (v.length > 1) {
333
+ vil.push(new ValidationItem(ResultTypes.ERROR, "items", `Esistono più elementi della lista dati con valore ${v[0].value}`));
334
+ break;
335
+ }
336
+ }
337
+ }
338
+ }
339
+ return vil;
340
+ });
341
+ }
342
+ static DataListItemValidator(dlid_1, vil_1) {
343
+ return __awaiter(this, arguments, void 0, function* (dlid, vil, showPropertyName = false) {
344
+ this.RequiredStringValidator(dlid.value, TMPropertyNames.value, vil, '');
345
+ if (!dlid.name) {
346
+ vil.push(new ValidationItem(ResultTypes.ERROR, "itemName", SDK_Localizator.RequiredField));
347
+ return;
348
+ }
349
+ });
350
+ }
310
351
  }
@@ -68,6 +68,16 @@ export class SDK_Localizator {
68
68
  default: return "Lista dati";
69
69
  }
70
70
  }
71
+ static get DataListItem() {
72
+ switch (this._cultureID) {
73
+ case CultureIDs.De_DE: return "Datenlistenelement";
74
+ case CultureIDs.En_US: return "Data list item";
75
+ case CultureIDs.Es_ES: return "Elemento de lista de datos";
76
+ case CultureIDs.Fr_FR: return "Élément de la liste de données";
77
+ case CultureIDs.Pt_PT: return "Elemento da lista de dados";
78
+ default: return "Elemento della lista dati";
79
+ }
80
+ }
71
81
  static get DataLists() {
72
82
  switch (this._cultureID) {
73
83
  case CultureIDs.De_DE: return "Datenlisten";
@@ -13,10 +13,12 @@ export class TMPropertyNames {
13
13
  }
14
14
  TMPropertyNames.entityName = "name";
15
15
  TMPropertyNames.fromTid = "fromTid";
16
+ TMPropertyNames.items = "items";
16
17
  TMPropertyNames.join = "join";
17
18
  TMPropertyNames.maxDcmtsToBeReturned = "maxDcmtsToBeReturned";
18
19
  TMPropertyNames.orderBy = "orderBy";
19
20
  TMPropertyNames.select = "select";
21
+ TMPropertyNames.value = "value";
20
22
  TMPropertyNames.where = "where";
21
23
  export class TMScopeNames {
22
24
  }
@@ -1,4 +1,4 @@
1
- import { DcmtTypeDescriptor, QueryDescriptor, QueryOperators, WhereItem } from "../openAPIs/TopMediaServiceClient";
1
+ import { DataListDescriptor, DataListItemDescriptor, DcmtTypeDescriptor, QueryDescriptor, QueryOperators, WhereItem } from "../openAPIs/TopMediaServiceClient";
2
2
  export declare enum ResultTypes {
3
3
  NONE = "None",
4
4
  SUCCESS = "Success",
@@ -40,4 +40,6 @@ export declare class PlatformObjectValidator {
40
40
  static GetNumberOfOperands(qo?: QueryOperators): 0 | 1 | 2 | 12 | 11 | 99;
41
41
  static WhereItemHasValues(wi: WhereItem): boolean;
42
42
  static QueryValidatorAsync(qdNew: QueryDescriptor | undefined, vl: ValidationItem[], qvo: QueryValidatorOptions, showPropertyName?: boolean): Promise<DcmtTypeDescriptor | undefined>;
43
+ static DataListValidator(d: DataListDescriptor): Promise<ValidationItem[] | undefined>;
44
+ static DataListItemValidator(dlid: DataListItemDescriptor, vil: ValidationItem[], showPropertyName?: boolean): Promise<void>;
43
45
  }
@@ -9,6 +9,7 @@ export declare class SDK_Localizator {
9
9
  static get BasketTypes(): "Behältertypen" | "Basket types" | "Tipos de tanque" | "Types de réservoir" | "Tanques tipos" | "Tipi serbatoio";
10
10
  static get DataFileName(): "Name der Datendatei" | "Data file name" | "Nombre del archivo de datos" | "Nom du fichier des données" | "Nome do arquivo de dados" | "Nome del file di dati";
11
11
  static get DataList(): "Datenliste" | "Data list" | "Lista de datos" | "Liste de données" | "Listar dados" | "Lista dati";
12
+ static get DataListItem(): "Datenlistenelement" | "Data list item" | "Elemento de lista de datos" | "Élément de la liste de données" | "Elemento da lista de dados" | "Elemento della lista dati";
12
13
  static get DataLists(): "Datenlisten" | "Data lists" | "Listas datos" | "Liste de donnée" | "Listas dados" | "Liste dati";
13
14
  static get DcmtType(): "Dokumententyp" | "Document type" | "Tipo de documento" | "Type de document" | "Tipo documento";
14
15
  static get DcmtTypeFrom(): "Hauptdokumenttyp" | "Main document type" | "Tipo de documento principal" | "Type document principal" | "Tipo documento principale";
@@ -1,12 +1,14 @@
1
1
  import { ITopMediaSession } from "../TopMediaSession";
2
2
  export declare class TMPropertyNames {
3
- static entityName: string;
4
- static fromTid: string;
5
- static join: string;
6
- static maxDcmtsToBeReturned: string;
7
- static orderBy: string;
8
- static select: string;
9
- static where: string;
3
+ static readonly entityName = "name";
4
+ static readonly fromTid = "fromTid";
5
+ static readonly items = "items";
6
+ static readonly join = "join";
7
+ static readonly maxDcmtsToBeReturned = "maxDcmtsToBeReturned";
8
+ static readonly orderBy = "orderBy";
9
+ static readonly select = "select";
10
+ static readonly value = "value";
11
+ static readonly where = "where";
10
12
  }
11
13
  export declare class TMScopeNames {
12
14
  static qd: string;
package/package.json CHANGED
@@ -1,32 +1,32 @@
1
1
  {
2
- "name": "@topconsultnpm/sdk-ts",
3
- "version": "6.20.0-dev2.8",
4
- "description": "TopMedia SDK typescript",
5
- "main": "dist/lib/index.js",
6
- "types": "dist/types/index.d.ts",
7
- "scripts": {
8
- "test": "echo \"Error: no test specified\" \u0026\u0026 exit 1",
9
- "tm-terser": "terser dist/lib/openAPIs/TopMediaServiceClient.js -c toplevel,passes=2 -m toplevel -o dist/lib/openAPIs/TopMediaServiceClient.js",
10
- "tm-build": "tsc \u0026\u0026 npm run tm-terser",
11
- "tm-watch": "tsc -w",
12
- "tm-publish": "npm publish --tag latest",
13
- "tm-publish_wl": "npm publish"
14
- },
15
- "files": [
16
- "dist/lib/**/*",
17
- "dist/types/**/*"
18
- ],
19
- "dependencies": {
20
- "@azure/msal-browser": "^4.28.1",
21
- "@babel/runtime": "^7.28.4",
22
- "async-mutex": "^0.4.0",
23
- "axios": "^1.7.2"
24
- },
25
- "author": "TopConsult",
26
- "license": "ISC",
27
- "devDependencies": {
28
- "@types/node": "^18.11.18",
29
- "terser": "^5.44.0",
30
- "typescript": "^5.9.3"
31
- }
32
- }
2
+ "name": "@topconsultnpm/sdk-ts",
3
+ "version": "6.20.0-dev2.9",
4
+ "description": "TopMedia SDK typescript",
5
+ "main": "dist/lib/index.js",
6
+ "types": "dist/types/index.d.ts",
7
+ "scripts": {
8
+ "test": "echo \"Error: no test specified\" \u0026\u0026 exit 1",
9
+ "tm-terser": "terser dist/lib/openAPIs/TopMediaServiceClient.js -c toplevel,passes=2 -m toplevel -o dist/lib/openAPIs/TopMediaServiceClient.js",
10
+ "tm-build": "tsc \u0026\u0026 npm run tm-terser",
11
+ "tm-watch": "tsc -w",
12
+ "tm-publish": "npm publish --tag latest",
13
+ "tm-publish_wl": "npm publish"
14
+ },
15
+ "files": [
16
+ "dist/lib/**/*",
17
+ "dist/types/**/*"
18
+ ],
19
+ "dependencies": {
20
+ "@azure/msal-browser": "^4.28.1",
21
+ "@babel/runtime": "^7.28.4",
22
+ "async-mutex": "^0.4.0",
23
+ "axios": "^1.7.2"
24
+ },
25
+ "author": "TopConsult",
26
+ "license": "ISC",
27
+ "devDependencies": {
28
+ "@types/node": "^18.11.18",
29
+ "terser": "^5.44.0",
30
+ "typescript": "^5.9.3"
31
+ }
32
+ }