tychat-contracts 1.0.91 → 1.0.92

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.
@@ -4,4 +4,5 @@ export * from './create-analytic-event.dto';
4
4
  export * from './analytics-query.dto';
5
5
  export * from './analytics-kafka-topics';
6
6
  export * from './analytics-emitter.helper';
7
+ export * from './should-skip-analytics-tenant-lookup';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/analytics/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/analytics/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uCAAuC,CAAC"}
@@ -20,3 +20,4 @@ __exportStar(require("./create-analytic-event.dto"), exports);
20
20
  __exportStar(require("./analytics-query.dto"), exports);
21
21
  __exportStar(require("./analytics-kafka-topics"), exports);
22
22
  __exportStar(require("./analytics-emitter.helper"), exports);
23
+ __exportStar(require("./should-skip-analytics-tenant-lookup"), exports);
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Tenants that must not trigger tenant-service DB resolution for analytics ingestion.
3
+ * Events for these slugs are acknowledged without persistence (no per-tenant DB row).
4
+ */
5
+ export declare const TYCHAT_ANALYTICS_SKIP_TENANT_LOOKUP_SLUG = "__tychat_system__";
6
+ export declare function shouldSkipAnalyticsTenantLookup(tenantSlug: string): boolean;
7
+ //# sourceMappingURL=should-skip-analytics-tenant-lookup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"should-skip-analytics-tenant-lookup.d.ts","sourceRoot":"","sources":["../../src/analytics/should-skip-analytics-tenant-lookup.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,wCAAwC,sBAAsB,CAAC;AAE5E,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAG3E"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TYCHAT_ANALYTICS_SKIP_TENANT_LOOKUP_SLUG = void 0;
4
+ exports.shouldSkipAnalyticsTenantLookup = shouldSkipAnalyticsTenantLookup;
5
+ /**
6
+ * Tenants that must not trigger tenant-service DB resolution for analytics ingestion.
7
+ * Events for these slugs are acknowledged without persistence (no per-tenant DB row).
8
+ */
9
+ exports.TYCHAT_ANALYTICS_SKIP_TENANT_LOOKUP_SLUG = '__tychat_system__';
10
+ function shouldSkipAnalyticsTenantLookup(tenantSlug) {
11
+ const t = tenantSlug?.trim();
12
+ return t === exports.TYCHAT_ANALYTICS_SKIP_TENANT_LOOKUP_SLUG;
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.0.91",
3
+ "version": "1.0.92",
4
4
  "description": "DTOs compartilhados com class-validator (API e microserviços)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -4,3 +4,4 @@ export * from './create-analytic-event.dto';
4
4
  export * from './analytics-query.dto';
5
5
  export * from './analytics-kafka-topics';
6
6
  export * from './analytics-emitter.helper';
7
+ export * from './should-skip-analytics-tenant-lookup';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Tenants that must not trigger tenant-service DB resolution for analytics ingestion.
3
+ * Events for these slugs are acknowledged without persistence (no per-tenant DB row).
4
+ */
5
+ export const TYCHAT_ANALYTICS_SKIP_TENANT_LOOKUP_SLUG = '__tychat_system__';
6
+
7
+ export function shouldSkipAnalyticsTenantLookup(tenantSlug: string): boolean {
8
+ const t = tenantSlug?.trim();
9
+ return t === TYCHAT_ANALYTICS_SKIP_TENANT_LOOKUP_SLUG;
10
+ }