- HERENCIA-SIMCO.md actualizado con directivas v3.7 y v3.8 - Actualizaciones de configuracion Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
140 lines
5.4 KiB
JavaScript
140 lines
5.4 KiB
JavaScript
"use strict";
|
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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;
|
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
};
|
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.AvailableEventsDto = exports.PaginatedDeliveriesDto = exports.ListDeliveriesQueryDto = exports.TestWebhookDto = exports.DeliveryResponseDto = exports.WebhookStatsDto = exports.WebhookResponseDto = exports.UpdateWebhookDto = exports.CreateWebhookDto = exports.WEBHOOK_EVENTS = void 0;
|
|
const class_validator_1 = require("class-validator");
|
|
const entities_1 = require("../entities");
|
|
exports.WEBHOOK_EVENTS = [
|
|
'user.created',
|
|
'user.updated',
|
|
'user.deleted',
|
|
'subscription.created',
|
|
'subscription.updated',
|
|
'subscription.cancelled',
|
|
'invoice.paid',
|
|
'invoice.failed',
|
|
'file.uploaded',
|
|
'file.deleted',
|
|
'tenant.updated',
|
|
];
|
|
class CreateWebhookDto {
|
|
}
|
|
exports.CreateWebhookDto = CreateWebhookDto;
|
|
__decorate([
|
|
(0, class_validator_1.IsString)(),
|
|
(0, class_validator_1.MaxLength)(100),
|
|
__metadata("design:type", String)
|
|
], CreateWebhookDto.prototype, "name", void 0);
|
|
__decorate([
|
|
(0, class_validator_1.IsString)(),
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", String)
|
|
], CreateWebhookDto.prototype, "description", void 0);
|
|
__decorate([
|
|
(0, class_validator_1.IsUrl)({ protocols: ['https'], require_protocol: true }),
|
|
__metadata("design:type", String)
|
|
], CreateWebhookDto.prototype, "url", void 0);
|
|
__decorate([
|
|
(0, class_validator_1.IsArray)(),
|
|
(0, class_validator_1.ArrayMinSize)(1),
|
|
(0, class_validator_1.IsString)({ each: true }),
|
|
__metadata("design:type", Array)
|
|
], CreateWebhookDto.prototype, "events", void 0);
|
|
__decorate([
|
|
(0, class_validator_1.IsObject)(),
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", Object)
|
|
], CreateWebhookDto.prototype, "headers", void 0);
|
|
class UpdateWebhookDto {
|
|
}
|
|
exports.UpdateWebhookDto = UpdateWebhookDto;
|
|
__decorate([
|
|
(0, class_validator_1.IsString)(),
|
|
(0, class_validator_1.MaxLength)(100),
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", String)
|
|
], UpdateWebhookDto.prototype, "name", void 0);
|
|
__decorate([
|
|
(0, class_validator_1.IsString)(),
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", String)
|
|
], UpdateWebhookDto.prototype, "description", void 0);
|
|
__decorate([
|
|
(0, class_validator_1.IsUrl)({ protocols: ['https'], require_protocol: true }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", String)
|
|
], UpdateWebhookDto.prototype, "url", void 0);
|
|
__decorate([
|
|
(0, class_validator_1.IsArray)(),
|
|
(0, class_validator_1.IsString)({ each: true }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", Array)
|
|
], UpdateWebhookDto.prototype, "events", void 0);
|
|
__decorate([
|
|
(0, class_validator_1.IsObject)(),
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", Object)
|
|
], UpdateWebhookDto.prototype, "headers", void 0);
|
|
__decorate([
|
|
(0, class_validator_1.IsBoolean)(),
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", Boolean)
|
|
], UpdateWebhookDto.prototype, "isActive", void 0);
|
|
class WebhookResponseDto {
|
|
}
|
|
exports.WebhookResponseDto = WebhookResponseDto;
|
|
class WebhookStatsDto {
|
|
}
|
|
exports.WebhookStatsDto = WebhookStatsDto;
|
|
class DeliveryResponseDto {
|
|
}
|
|
exports.DeliveryResponseDto = DeliveryResponseDto;
|
|
class TestWebhookDto {
|
|
}
|
|
exports.TestWebhookDto = TestWebhookDto;
|
|
__decorate([
|
|
(0, class_validator_1.IsString)(),
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", String)
|
|
], TestWebhookDto.prototype, "eventType", void 0);
|
|
__decorate([
|
|
(0, class_validator_1.IsObject)(),
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", Object)
|
|
], TestWebhookDto.prototype, "payload", void 0);
|
|
class ListDeliveriesQueryDto {
|
|
}
|
|
exports.ListDeliveriesQueryDto = ListDeliveriesQueryDto;
|
|
__decorate([
|
|
(0, class_validator_1.IsEnum)(entities_1.DeliveryStatus),
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", String)
|
|
], ListDeliveriesQueryDto.prototype, "status", void 0);
|
|
__decorate([
|
|
(0, class_validator_1.IsString)(),
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", String)
|
|
], ListDeliveriesQueryDto.prototype, "eventType", void 0);
|
|
__decorate([
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", Number)
|
|
], ListDeliveriesQueryDto.prototype, "page", void 0);
|
|
__decorate([
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", Number)
|
|
], ListDeliveriesQueryDto.prototype, "limit", void 0);
|
|
class PaginatedDeliveriesDto {
|
|
}
|
|
exports.PaginatedDeliveriesDto = PaginatedDeliveriesDto;
|
|
class AvailableEventsDto {
|
|
}
|
|
exports.AvailableEventsDto = AvailableEventsDto;
|
|
//# sourceMappingURL=webhook.dto.js.map
|