@anthor/entities-types 1.132.27 → 1.132.28

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/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './enums';
2
2
  export * from './entities';
3
3
  export * from './constants/reservedSlugs';
4
+ export * from './payloads/JwtPayload';
package/dist/index.js CHANGED
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./enums"), exports);
18
18
  __exportStar(require("./entities"), exports);
19
19
  __exportStar(require("./constants/reservedSlugs"), exports);
20
+ __exportStar(require("./payloads/JwtPayload"), exports);
20
21
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B;AAC3B,4DAA0C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B;AAC3B,4DAA0C;AAC1C,wDAAsC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * SDD B v2 (jwt-enrichment-companyslug) — Critério 9.
3
+ *
4
+ * Payload tipado para tokens JWT emitidos pelos resolvers do users service
5
+ * (authUser, refreshToken, generateMagicLink).
6
+ *
7
+ * - `companySlug?: string` — presente APENAS para users CHAIN e ESTABLISHMENT
8
+ * após o enriquecimento via `enrichUserWithCompanySlug` (HTTP cross-service
9
+ * contra o companies service). Quando ausente, FE-Chains cai em fallback
10
+ * gracioso (mesmo comportamento de tokens antigos pré-deploy).
11
+ *
12
+ * - Para `CHAIN`: `companySlug = company.slug` (lookup self).
13
+ * - Para `ESTABLISHMENT`: `companySlug = chainPai.slug` (lookup encadeado via
14
+ * `company.chain`). Assimetria semântica intencional — FE-Chains compara o
15
+ * valor com o subdomínio.
16
+ *
17
+ * - `iat` e `jti` são adicionados pelo `generateToken` no momento da assinatura.
18
+ *
19
+ * Campo opcional — backward compatible com tokens existentes (não invalida).
20
+ */
21
+ import { User } from '../entities/User';
22
+ export interface JwtPayload extends Omit<User, 'password'> {
23
+ companySlug?: string;
24
+ iat: number;
25
+ jti: string;
26
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=JwtPayload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JwtPayload.js","sourceRoot":"","sources":["../../src/payloads/JwtPayload.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthor/entities-types",
3
- "version": "1.132.27",
3
+ "version": "1.132.28",
4
4
  "publishConfig": {
5
5
  "access": "restricted"
6
6
  },
@@ -25,5 +25,5 @@
25
25
  "geojson": "^0.5.0",
26
26
  "jest-sonar-reporter": "^2.0.0"
27
27
  },
28
- "gitHead": "a198ca51319f089763acb516c96eeed00c62a6e3"
28
+ "gitHead": "b0d2f313112894a1058788ba4944121534bbd65d"
29
29
  }