@fiado/type-kit 3.308.0 → 3.310.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,5 +1,12 @@
1
+ import { AiImageInput } from "./AiImageInput";
1
2
  export declare class AiAnalyzeRequest {
2
3
  prompt: string;
3
4
  systemPrompt?: string;
4
5
  modelId?: string;
6
+ maxTokens?: number;
7
+ /**
8
+ * Imagenes adjuntas al prompt. Se envian ANTES del texto, que es el orden en
9
+ * el que el modelo las asocia correctamente con la instruccion.
10
+ */
11
+ images?: AiImageInput[];
5
12
  }
@@ -11,6 +11,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.AiAnalyzeRequest = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
+ const class_transformer_1 = require("class-transformer");
15
+ const AiImageInput_1 = require("./AiImageInput");
14
16
  class AiAnalyzeRequest {
15
17
  }
16
18
  exports.AiAnalyzeRequest = AiAnalyzeRequest;
@@ -29,3 +31,16 @@ __decorate([
29
31
  (0, class_validator_1.IsOptional)(),
30
32
  __metadata("design:type", String)
31
33
  ], AiAnalyzeRequest.prototype, "modelId", void 0);
34
+ __decorate([
35
+ (0, class_validator_1.IsInt)(),
36
+ (0, class_validator_1.Min)(1),
37
+ (0, class_validator_1.IsOptional)(),
38
+ __metadata("design:type", Number)
39
+ ], AiAnalyzeRequest.prototype, "maxTokens", void 0);
40
+ __decorate([
41
+ (0, class_validator_1.IsArray)(),
42
+ (0, class_validator_1.ValidateNested)({ each: true }),
43
+ (0, class_transformer_1.Type)(() => AiImageInput_1.AiImageInput),
44
+ (0, class_validator_1.IsOptional)(),
45
+ __metadata("design:type", Array)
46
+ ], AiAnalyzeRequest.prototype, "images", void 0);
@@ -0,0 +1,7 @@
1
+ /** Una imagen que acompaña al prompt, para analisis multimodal. */
2
+ export declare class AiImageInput {
3
+ /** Contenido de la imagen en base64, SIN el prefijo `data:`. */
4
+ data: string;
5
+ /** MIME real de la imagen: `image/jpeg`, `image/png` o `image/webp`. */
6
+ mediaType: string;
7
+ }
@@ -0,0 +1,27 @@
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.AiImageInput = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ /** Una imagen que acompaña al prompt, para analisis multimodal. */
15
+ class AiImageInput {
16
+ }
17
+ exports.AiImageInput = AiImageInput;
18
+ __decorate([
19
+ (0, class_validator_1.IsString)(),
20
+ (0, class_validator_1.IsNotEmpty)(),
21
+ __metadata("design:type", String)
22
+ ], AiImageInput.prototype, "data", void 0);
23
+ __decorate([
24
+ (0, class_validator_1.IsString)(),
25
+ (0, class_validator_1.IsNotEmpty)(),
26
+ __metadata("design:type", String)
27
+ ], AiImageInput.prototype, "mediaType", void 0);
@@ -1,2 +1,3 @@
1
+ export * from './dtos/internal/AiImageInput';
1
2
  export * from './dtos/internal/AiAnalyzeRequest';
2
3
  export * from './dtos/internal/AiAnalyzeResponse';
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  //dtos/internal
18
+ __exportStar(require("./dtos/internal/AiImageInput"), exports);
18
19
  __exportStar(require("./dtos/internal/AiAnalyzeRequest"), exports);
19
20
  __exportStar(require("./dtos/internal/AiAnalyzeResponse"), exports);
@@ -0,0 +1,14 @@
1
+ import { EmailVerificationStatusEnum } from '../enums/EmailVerificationStatusEnum';
2
+ import { EmailLinkExpirationReasonEnum } from '../enums/EmailLinkExpirationReasonEnum';
3
+ /**
4
+ * Un directorio que tiene registrado el correo consultado (búsqueda inversa de backoffice).
5
+ */
6
+ export declare class EmailOwnerItem {
7
+ directoryId: string;
8
+ isVerified: boolean;
9
+ isPrincipal: boolean;
10
+ status: EmailVerificationStatusEnum;
11
+ verifiedAt?: number;
12
+ /** Solo presente cuando status === EXPIRED. */
13
+ expirationReason?: EmailLinkExpirationReasonEnum;
14
+ }
@@ -0,0 +1,45 @@
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.EmailOwnerItem = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const EmailVerificationStatusEnum_1 = require("../enums/EmailVerificationStatusEnum");
15
+ const EmailLinkExpirationReasonEnum_1 = require("../enums/EmailLinkExpirationReasonEnum");
16
+ /**
17
+ * Un directorio que tiene registrado el correo consultado (búsqueda inversa de backoffice).
18
+ */
19
+ class EmailOwnerItem {
20
+ }
21
+ exports.EmailOwnerItem = EmailOwnerItem;
22
+ __decorate([
23
+ (0, class_transformer_1.Expose)(),
24
+ __metadata("design:type", String)
25
+ ], EmailOwnerItem.prototype, "directoryId", void 0);
26
+ __decorate([
27
+ (0, class_transformer_1.Expose)(),
28
+ __metadata("design:type", Boolean)
29
+ ], EmailOwnerItem.prototype, "isVerified", void 0);
30
+ __decorate([
31
+ (0, class_transformer_1.Expose)(),
32
+ __metadata("design:type", Boolean)
33
+ ], EmailOwnerItem.prototype, "isPrincipal", void 0);
34
+ __decorate([
35
+ (0, class_transformer_1.Expose)(),
36
+ __metadata("design:type", String)
37
+ ], EmailOwnerItem.prototype, "status", void 0);
38
+ __decorate([
39
+ (0, class_transformer_1.Expose)(),
40
+ __metadata("design:type", Number)
41
+ ], EmailOwnerItem.prototype, "verifiedAt", void 0);
42
+ __decorate([
43
+ (0, class_transformer_1.Expose)(),
44
+ __metadata("design:type", String)
45
+ ], EmailOwnerItem.prototype, "expirationReason", void 0);
@@ -0,0 +1,9 @@
1
+ import { EmailOwnerItem } from './EmailOwnerItem';
2
+ /**
3
+ * Respuesta de la búsqueda inversa (backoffice): qué directorios tienen
4
+ * el correo consultado y en qué estado. El verificado (si existe) va primero.
5
+ */
6
+ export declare class EmailOwnersResponse {
7
+ email: string;
8
+ items: EmailOwnerItem[];
9
+ }
@@ -0,0 +1,28 @@
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.EmailOwnersResponse = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ /**
15
+ * Respuesta de la búsqueda inversa (backoffice): qué directorios tienen
16
+ * el correo consultado y en qué estado. El verificado (si existe) va primero.
17
+ */
18
+ class EmailOwnersResponse {
19
+ }
20
+ exports.EmailOwnersResponse = EmailOwnersResponse;
21
+ __decorate([
22
+ (0, class_transformer_1.Expose)(),
23
+ __metadata("design:type", String)
24
+ ], EmailOwnersResponse.prototype, "email", void 0);
25
+ __decorate([
26
+ (0, class_transformer_1.Expose)(),
27
+ __metadata("design:type", Array)
28
+ ], EmailOwnersResponse.prototype, "items", void 0);
@@ -13,6 +13,8 @@ export * from './dtos/EmailSetPrincipalResponse';
13
13
  export * from './dtos/EmailDeleteRequest';
14
14
  export * from './dtos/EmailDeleteResponse';
15
15
  export * from './dtos/EmailConfirmRequest';
16
+ export * from './dtos/EmailOwnerItem';
17
+ export * from './dtos/EmailOwnersResponse';
16
18
  export * from './dtos/internal/PrimaryEmailByDirectoryRequest';
17
19
  export * from './dtos/internal/PrimaryEmailResponse';
18
20
  export * from './dtos/internal/EmailsByDirectoryRequest';
@@ -29,6 +29,8 @@ __exportStar(require("./dtos/EmailSetPrincipalResponse"), exports);
29
29
  __exportStar(require("./dtos/EmailDeleteRequest"), exports);
30
30
  __exportStar(require("./dtos/EmailDeleteResponse"), exports);
31
31
  __exportStar(require("./dtos/EmailConfirmRequest"), exports);
32
+ __exportStar(require("./dtos/EmailOwnerItem"), exports);
33
+ __exportStar(require("./dtos/EmailOwnersResponse"), exports);
32
34
  __exportStar(require("./dtos/internal/PrimaryEmailByDirectoryRequest"), exports);
33
35
  __exportStar(require("./dtos/internal/PrimaryEmailResponse"), exports);
34
36
  __exportStar(require("./dtos/internal/EmailsByDirectoryRequest"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.308.0",
3
+ "version": "3.310.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -1,4 +1,6 @@
1
- import { IsNotEmpty, IsString, IsOptional } from "class-validator";
1
+ import { IsNotEmpty, IsString, IsOptional, IsArray, ValidateNested, IsInt, Min } from "class-validator";
2
+ import { Type } from "class-transformer";
3
+ import { AiImageInput } from "./AiImageInput";
2
4
 
3
5
  export class AiAnalyzeRequest {
4
6
  @IsString()
@@ -12,4 +14,19 @@ export class AiAnalyzeRequest {
12
14
  @IsString()
13
15
  @IsOptional()
14
16
  modelId?: string;
17
+
18
+ @IsInt()
19
+ @Min(1)
20
+ @IsOptional()
21
+ maxTokens?: number;
22
+
23
+ /**
24
+ * Imagenes adjuntas al prompt. Se envian ANTES del texto, que es el orden en
25
+ * el que el modelo las asocia correctamente con la instruccion.
26
+ */
27
+ @IsArray()
28
+ @ValidateNested({ each: true })
29
+ @Type(() => AiImageInput)
30
+ @IsOptional()
31
+ images?: AiImageInput[];
15
32
  }
@@ -0,0 +1,14 @@
1
+ import { IsNotEmpty, IsString } from "class-validator";
2
+
3
+ /** Una imagen que acompaña al prompt, para analisis multimodal. */
4
+ export class AiImageInput {
5
+ /** Contenido de la imagen en base64, SIN el prefijo `data:`. */
6
+ @IsString()
7
+ @IsNotEmpty()
8
+ data: string;
9
+
10
+ /** MIME real de la imagen: `image/jpeg`, `image/png` o `image/webp`. */
11
+ @IsString()
12
+ @IsNotEmpty()
13
+ mediaType: string;
14
+ }
@@ -1,3 +1,4 @@
1
1
  //dtos/internal
2
+ export * from './dtos/internal/AiImageInput';
2
3
  export * from './dtos/internal/AiAnalyzeRequest';
3
4
  export * from './dtos/internal/AiAnalyzeResponse';
@@ -0,0 +1,27 @@
1
+ import { Expose } from 'class-transformer';
2
+ import { EmailVerificationStatusEnum } from '../enums/EmailVerificationStatusEnum';
3
+ import { EmailLinkExpirationReasonEnum } from '../enums/EmailLinkExpirationReasonEnum';
4
+
5
+ /**
6
+ * Un directorio que tiene registrado el correo consultado (búsqueda inversa de backoffice).
7
+ */
8
+ export class EmailOwnerItem {
9
+ @Expose()
10
+ directoryId!: string;
11
+
12
+ @Expose()
13
+ isVerified!: boolean;
14
+
15
+ @Expose()
16
+ isPrincipal!: boolean;
17
+
18
+ @Expose()
19
+ status!: EmailVerificationStatusEnum;
20
+
21
+ @Expose()
22
+ verifiedAt?: number;
23
+
24
+ /** Solo presente cuando status === EXPIRED. */
25
+ @Expose()
26
+ expirationReason?: EmailLinkExpirationReasonEnum;
27
+ }
@@ -0,0 +1,14 @@
1
+ import { Expose } from 'class-transformer';
2
+ import { EmailOwnerItem } from './EmailOwnerItem';
3
+
4
+ /**
5
+ * Respuesta de la búsqueda inversa (backoffice): qué directorios tienen
6
+ * el correo consultado y en qué estado. El verificado (si existe) va primero.
7
+ */
8
+ export class EmailOwnersResponse {
9
+ @Expose()
10
+ email!: string;
11
+
12
+ @Expose()
13
+ items!: EmailOwnerItem[];
14
+ }
@@ -13,6 +13,8 @@ export * from './dtos/EmailSetPrincipalResponse';
13
13
  export * from './dtos/EmailDeleteRequest';
14
14
  export * from './dtos/EmailDeleteResponse';
15
15
  export * from './dtos/EmailConfirmRequest';
16
+ export * from './dtos/EmailOwnerItem';
17
+ export * from './dtos/EmailOwnersResponse';
16
18
  export * from './dtos/internal/PrimaryEmailByDirectoryRequest';
17
19
  export * from './dtos/internal/PrimaryEmailResponse';
18
20
  export * from './dtos/internal/EmailsByDirectoryRequest';