@fiado/type-kit 3.307.0 → 3.309.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.
- package/bin/aiEngine/dtos/internal/AiAnalyzeRequest.d.ts +7 -0
- package/bin/aiEngine/dtos/internal/AiAnalyzeRequest.js +15 -0
- package/bin/aiEngine/dtos/internal/AiImageInput.d.ts +7 -0
- package/bin/aiEngine/dtos/internal/AiImageInput.js +27 -0
- package/bin/aiEngine/index.d.ts +1 -0
- package/bin/aiEngine/index.js +1 -0
- package/bin/centralPayments/dtos/GetEventsSinceResponse.d.ts +6 -0
- package/bin/centralPayments/dtos/GetEventsSinceResponse.js +6 -0
- package/bin/centralPayments/dtos/WebhookEventItem.d.ts +15 -0
- package/bin/centralPayments/dtos/WebhookEventItem.js +10 -0
- package/bin/centralPayments/index.d.ts +2 -0
- package/bin/centralPayments/index.js +2 -0
- package/bin/credit/enums/ExpedienteAccessActionEnum.d.ts +2 -1
- package/bin/credit/enums/ExpedienteAccessActionEnum.js +1 -0
- package/package.json +1 -1
- package/src/aiEngine/dtos/internal/AiAnalyzeRequest.ts +18 -1
- package/src/aiEngine/dtos/internal/AiImageInput.ts +14 -0
- package/src/aiEngine/index.ts +1 -0
- package/src/centralPayments/dtos/GetEventsSinceResponse.ts +7 -0
- package/src/centralPayments/dtos/WebhookEventItem.ts +15 -0
- package/src/centralPayments/index.ts +2 -0
- package/src/credit/enums/ExpedienteAccessActionEnum.ts +1 -0
|
@@ -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);
|
package/bin/aiEngine/index.d.ts
CHANGED
package/bin/aiEngine/index.js
CHANGED
|
@@ -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,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Un evento de webhook de Central Payments, tal como lo devuelve
|
|
3
|
+
* `central-payments-webhook` al consultarlo por fecha.
|
|
4
|
+
*/
|
|
5
|
+
export declare class WebhookEventItem {
|
|
6
|
+
id: string;
|
|
7
|
+
type: string;
|
|
8
|
+
cardholderId: string;
|
|
9
|
+
cardId: string;
|
|
10
|
+
/** Epoch en milisegundos. Dynamoose serializa el Date de `timestamps: true` como Number. */
|
|
11
|
+
createdAt: number;
|
|
12
|
+
/** Payload crudo del proveedor. Su forma depende del `type` del evento. */
|
|
13
|
+
event: unknown;
|
|
14
|
+
error?: unknown;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebhookEventItem = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Un evento de webhook de Central Payments, tal como lo devuelve
|
|
6
|
+
* `central-payments-webhook` al consultarlo por fecha.
|
|
7
|
+
*/
|
|
8
|
+
class WebhookEventItem {
|
|
9
|
+
}
|
|
10
|
+
exports.WebhookEventItem = WebhookEventItem;
|
|
@@ -7,6 +7,8 @@ export * from './dtos/GetMerchantLocationsResponse';
|
|
|
7
7
|
export * from './dtos/MerchantLocation';
|
|
8
8
|
export * from './dtos/CentralPaymentsTransactionInfo';
|
|
9
9
|
export * from './dtos/CentralWebhookEventRequest';
|
|
10
|
+
export * from './dtos/WebhookEventItem';
|
|
11
|
+
export * from './dtos/GetEventsSinceResponse';
|
|
10
12
|
export * from './enums/ServiceStatusEnum';
|
|
11
13
|
export * from './enums/MerchantLocationDistanceUnitEnum';
|
|
12
14
|
export * from './enums/CentralPaymentTransactionTypeEnum';
|
|
@@ -24,6 +24,8 @@ __exportStar(require("./dtos/GetMerchantLocationsResponse"), exports);
|
|
|
24
24
|
__exportStar(require("./dtos/MerchantLocation"), exports);
|
|
25
25
|
__exportStar(require("./dtos/CentralPaymentsTransactionInfo"), exports);
|
|
26
26
|
__exportStar(require("./dtos/CentralWebhookEventRequest"), exports);
|
|
27
|
+
__exportStar(require("./dtos/WebhookEventItem"), exports);
|
|
28
|
+
__exportStar(require("./dtos/GetEventsSinceResponse"), exports);
|
|
27
29
|
// central payments enums
|
|
28
30
|
__exportStar(require("./enums/ServiceStatusEnum"), exports);
|
|
29
31
|
__exportStar(require("./enums/MerchantLocationDistanceUnitEnum"), exports);
|
|
@@ -16,5 +16,6 @@ export declare enum ExpedienteAccessActionEnum {
|
|
|
16
16
|
VIEW_OFFERS = "VIEW_OFFERS",
|
|
17
17
|
VIEW_APPLICATIONS = "VIEW_APPLICATIONS",
|
|
18
18
|
VIEW_PAYMENTS = "VIEW_PAYMENTS",
|
|
19
|
-
VIEW_AUDIT_LOG = "VIEW_AUDIT_LOG"
|
|
19
|
+
VIEW_AUDIT_LOG = "VIEW_AUDIT_LOG",
|
|
20
|
+
VIEW_MESSAGES = "VIEW_MESSAGES"
|
|
20
21
|
}
|
|
@@ -21,4 +21,5 @@ var ExpedienteAccessActionEnum;
|
|
|
21
21
|
ExpedienteAccessActionEnum["VIEW_APPLICATIONS"] = "VIEW_APPLICATIONS";
|
|
22
22
|
ExpedienteAccessActionEnum["VIEW_PAYMENTS"] = "VIEW_PAYMENTS";
|
|
23
23
|
ExpedienteAccessActionEnum["VIEW_AUDIT_LOG"] = "VIEW_AUDIT_LOG";
|
|
24
|
+
ExpedienteAccessActionEnum["VIEW_MESSAGES"] = "VIEW_MESSAGES";
|
|
24
25
|
})(ExpedienteAccessActionEnum || (exports.ExpedienteAccessActionEnum = ExpedienteAccessActionEnum = {}));
|
package/package.json
CHANGED
|
@@ -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
|
+
}
|
package/src/aiEngine/index.ts
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Un evento de webhook de Central Payments, tal como lo devuelve
|
|
3
|
+
* `central-payments-webhook` al consultarlo por fecha.
|
|
4
|
+
*/
|
|
5
|
+
export class WebhookEventItem {
|
|
6
|
+
id: string;
|
|
7
|
+
type: string;
|
|
8
|
+
cardholderId: string;
|
|
9
|
+
cardId: string;
|
|
10
|
+
/** Epoch en milisegundos. Dynamoose serializa el Date de `timestamps: true` como Number. */
|
|
11
|
+
createdAt: number;
|
|
12
|
+
/** Payload crudo del proveedor. Su forma depende del `type` del evento. */
|
|
13
|
+
event: unknown;
|
|
14
|
+
error?: unknown;
|
|
15
|
+
}
|
|
@@ -9,6 +9,8 @@ export * from './dtos/GetMerchantLocationsResponse';
|
|
|
9
9
|
export * from './dtos/MerchantLocation';
|
|
10
10
|
export * from './dtos/CentralPaymentsTransactionInfo';
|
|
11
11
|
export * from './dtos/CentralWebhookEventRequest';
|
|
12
|
+
export * from './dtos/WebhookEventItem';
|
|
13
|
+
export * from './dtos/GetEventsSinceResponse';
|
|
12
14
|
|
|
13
15
|
// central payments enums
|
|
14
16
|
export * from './enums/ServiceStatusEnum';
|