@fiado/type-kit 3.89.0 → 3.91.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,6 +1,6 @@
1
1
  // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
2
 
3
- exports[`PERMISSION_BIT_ORDER PERMS_VERSION es número estable 1`] = `2577227741`;
3
+ exports[`PERMISSION_BIT_ORDER PERMS_VERSION es número estable 1`] = `2374504554`;
4
4
 
5
5
  exports[`PERMISSION_BIT_ORDER append-only: snapshot del ORDEN COMPLETO (rompe ante cualquier reorden/inserción) 1`] = `
6
6
  [
@@ -121,5 +121,6 @@ exports[`PERMISSION_BIT_ORDER append-only: snapshot del ORDEN COMPLETO (rompe an
121
121
  "agents.group.user.manage",
122
122
  "agents.person.create",
123
123
  "platform.tenant.userfields.manage",
124
+ "agents.app.access",
124
125
  ]
125
126
  `;
@@ -0,0 +1,4 @@
1
+ export interface DeleteLeadResponse {
2
+ deleted: boolean;
3
+ leadId: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import { LeadStatusEnum } from '../enums/LeadStatusEnum';
2
+ export declare class UpdateLeadRequest {
3
+ name?: string;
4
+ email?: string;
5
+ phone?: string;
6
+ company?: string;
7
+ notes?: string;
8
+ status?: LeadStatusEnum;
9
+ }
@@ -0,0 +1,57 @@
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.UpdateLeadRequest = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const LeadStatusEnum_1 = require("../enums/LeadStatusEnum");
16
+ class UpdateLeadRequest {
17
+ }
18
+ exports.UpdateLeadRequest = UpdateLeadRequest;
19
+ __decorate([
20
+ (0, class_transformer_1.Expose)(),
21
+ (0, class_validator_1.IsOptional)(),
22
+ (0, class_validator_1.IsString)(),
23
+ (0, class_validator_1.MaxLength)(200),
24
+ __metadata("design:type", String)
25
+ ], UpdateLeadRequest.prototype, "name", void 0);
26
+ __decorate([
27
+ (0, class_transformer_1.Expose)(),
28
+ (0, class_validator_1.IsOptional)(),
29
+ (0, class_validator_1.IsEmail)(),
30
+ __metadata("design:type", String)
31
+ ], UpdateLeadRequest.prototype, "email", void 0);
32
+ __decorate([
33
+ (0, class_transformer_1.Expose)(),
34
+ (0, class_validator_1.IsOptional)(),
35
+ (0, class_validator_1.IsString)(),
36
+ __metadata("design:type", String)
37
+ ], UpdateLeadRequest.prototype, "phone", void 0);
38
+ __decorate([
39
+ (0, class_transformer_1.Expose)(),
40
+ (0, class_validator_1.IsOptional)(),
41
+ (0, class_validator_1.IsString)(),
42
+ (0, class_validator_1.MaxLength)(200),
43
+ __metadata("design:type", String)
44
+ ], UpdateLeadRequest.prototype, "company", void 0);
45
+ __decorate([
46
+ (0, class_transformer_1.Expose)(),
47
+ (0, class_validator_1.IsOptional)(),
48
+ (0, class_validator_1.IsString)(),
49
+ (0, class_validator_1.MaxLength)(500),
50
+ __metadata("design:type", String)
51
+ ], UpdateLeadRequest.prototype, "notes", void 0);
52
+ __decorate([
53
+ (0, class_transformer_1.Expose)(),
54
+ (0, class_validator_1.IsOptional)(),
55
+ (0, class_validator_1.IsEnum)(LeadStatusEnum_1.LeadStatusEnum),
56
+ __metadata("design:type", String)
57
+ ], UpdateLeadRequest.prototype, "status", void 0);
@@ -9,6 +9,8 @@ export * from './dtos/ListProfilesResponse';
9
9
  export * from './dtos/DeleteProfileResponse';
10
10
  export * from './dtos/SaveLeadRequest';
11
11
  export * from './dtos/SaveLeadResponse';
12
+ export * from './dtos/UpdateLeadRequest';
13
+ export * from './dtos/DeleteLeadResponse';
12
14
  export * from './dtos/LeadResponse';
13
15
  export * from './dtos/ListLeadsResponse';
14
16
  export * from './dtos/CreateLeadGroupRequest';
@@ -28,6 +28,8 @@ __exportStar(require("./dtos/DeleteProfileResponse"), exports);
28
28
  // Lead DTOs
29
29
  __exportStar(require("./dtos/SaveLeadRequest"), exports);
30
30
  __exportStar(require("./dtos/SaveLeadResponse"), exports);
31
+ __exportStar(require("./dtos/UpdateLeadRequest"), exports);
32
+ __exportStar(require("./dtos/DeleteLeadResponse"), exports);
31
33
  __exportStar(require("./dtos/LeadResponse"), exports);
32
34
  __exportStar(require("./dtos/ListLeadsResponse"), exports);
33
35
  // Lead Group DTOs
@@ -120,6 +120,7 @@ export declare enum Permission {
120
120
  MDM_OPERATION_LOG_VIEW = "mdm.operation_log.view",
121
121
  MDM_TEST = "mdm.test",
122
122
  PAY_TRANSACTION_VIEW = "pay.transaction.view",
123
+ AGENTS_APP_ACCESS = "agents.app.access",
123
124
  AGENTS_AGENT_LIST = "agents.agent.list",
124
125
  AGENTS_AGENT_CREATE = "agents.agent.create",
125
126
  AGENTS_AGENT_CREATE_BULK = "agents.agent.create_bulk",
@@ -161,6 +161,9 @@ var Permission;
161
161
  // (ver fiado-agents-webapp/docs/rbac/RBAC-agents.md §5.2). El aislamiento entre orgs lo da el
162
162
  // scope GROUP del roleAssignment (scopeRef = Group_GT.id), no un permiso aparte.
163
163
  // ====================================================
164
+ // Gate de ACCESO a la app web de Agents (gobernanza). Sin este permiso el usuario no
165
+ // entra a la app. Lo otorgan los 5 roles GROUP de agents (en su propio repo, no acá).
166
+ Permission["AGENTS_APP_ACCESS"] = "agents.app.access";
164
167
  Permission["AGENTS_AGENT_LIST"] = "agents.agent.list";
165
168
  Permission["AGENTS_AGENT_CREATE"] = "agents.agent.create";
166
169
  Permission["AGENTS_AGENT_CREATE_BULK"] = "agents.agent.create_bulk";
@@ -326,6 +329,9 @@ exports.PERMISSION_BIT_ORDER = [
326
329
  // no correr bits existentes. (El bitset está deprecado por token-flaco, pero el orden se mantiene
327
330
  // sincronizado con el enum para que el test de bits no rompa.)
328
331
  Permission.PLATFORM_TENANT_USERFIELDS_MANAGE,
332
+ // Append-only 2026-06-21: gate de acceso a la app web de Agents (gobernanza). Al FINAL para no
333
+ // correr bits existentes (PERMS_VERSION cambia, pero los índices previos se conservan).
334
+ Permission.AGENTS_APP_ACCESS,
329
335
  ];
330
336
  function djb2(input) {
331
337
  let h = 5381;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.89.0",
3
+ "version": "3.91.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -0,0 +1,4 @@
1
+ export interface DeleteLeadResponse {
2
+ deleted: boolean;
3
+ leadId: string;
4
+ }
@@ -0,0 +1,12 @@
1
+ import { Expose } from 'class-transformer';
2
+ import { IsString, IsOptional, IsEnum, IsEmail, MaxLength } from 'class-validator';
3
+ import { LeadStatusEnum } from '../enums/LeadStatusEnum';
4
+
5
+ export class UpdateLeadRequest {
6
+ @Expose() @IsOptional() @IsString() @MaxLength(200) name?: string;
7
+ @Expose() @IsOptional() @IsEmail() email?: string;
8
+ @Expose() @IsOptional() @IsString() phone?: string;
9
+ @Expose() @IsOptional() @IsString() @MaxLength(200) company?: string;
10
+ @Expose() @IsOptional() @IsString() @MaxLength(500) notes?: string;
11
+ @Expose() @IsOptional() @IsEnum(LeadStatusEnum) status?: LeadStatusEnum;
12
+ }
@@ -14,6 +14,8 @@ export * from './dtos/DeleteProfileResponse';
14
14
  // Lead DTOs
15
15
  export * from './dtos/SaveLeadRequest';
16
16
  export * from './dtos/SaveLeadResponse';
17
+ export * from './dtos/UpdateLeadRequest';
18
+ export * from './dtos/DeleteLeadResponse';
17
19
  export * from './dtos/LeadResponse';
18
20
  export * from './dtos/ListLeadsResponse';
19
21
 
@@ -162,6 +162,9 @@ export enum Permission {
162
162
  // (ver fiado-agents-webapp/docs/rbac/RBAC-agents.md §5.2). El aislamiento entre orgs lo da el
163
163
  // scope GROUP del roleAssignment (scopeRef = Group_GT.id), no un permiso aparte.
164
164
  // ====================================================
165
+ // Gate de ACCESO a la app web de Agents (gobernanza). Sin este permiso el usuario no
166
+ // entra a la app. Lo otorgan los 5 roles GROUP de agents (en su propio repo, no acá).
167
+ AGENTS_APP_ACCESS = 'agents.app.access',
165
168
  AGENTS_AGENT_LIST = 'agents.agent.list',
166
169
  AGENTS_AGENT_CREATE = 'agents.agent.create',
167
170
  AGENTS_AGENT_CREATE_BULK = 'agents.agent.create_bulk',
@@ -328,6 +331,9 @@ export const PERMISSION_BIT_ORDER: readonly Permission[] = [
328
331
  // no correr bits existentes. (El bitset está deprecado por token-flaco, pero el orden se mantiene
329
332
  // sincronizado con el enum para que el test de bits no rompa.)
330
333
  Permission.PLATFORM_TENANT_USERFIELDS_MANAGE,
334
+ // Append-only 2026-06-21: gate de acceso a la app web de Agents (gobernanza). Al FINAL para no
335
+ // correr bits existentes (PERMS_VERSION cambia, pero los índices previos se conservan).
336
+ Permission.AGENTS_APP_ACCESS,
331
337
  ] as const;
332
338
 
333
339
  function djb2(input: string): number {