@fayz-ai/plugin-crm 0.11.0 → 0.11.2
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/components/CrmGeneralSettings.d.ts.map +1 -1
- package/dist/components/SegmentEditorDialog.d.ts +12 -0
- package/dist/components/SegmentEditorDialog.d.ts.map +1 -0
- package/dist/context.d.ts +2 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/data/mock.d.ts.map +1 -1
- package/dist/data/registries.d.ts.map +1 -1
- package/dist/data/supabase.d.ts.map +1 -1
- package/dist/data/tables.d.ts +6 -0
- package/dist/data/tables.d.ts.map +1 -1
- package/dist/data/types.d.ts +36 -1
- package/dist/data/types.d.ts.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3364 -188
- package/dist/index.js.map +1 -1
- package/dist/lib/scorecard.d.ts +19 -0
- package/dist/lib/scorecard.d.ts.map +1 -0
- package/dist/lib/segments.d.ts +32 -0
- package/dist/lib/segments.d.ts.map +1 -0
- package/dist/locales/en.d.ts.map +1 -1
- package/dist/locales/pt-BR.d.ts.map +1 -1
- package/dist/migrations/index.d.ts +5 -1
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/types.d.ts +168 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/views/CrmPage.d.ts.map +1 -1
- package/dist/views/NetworkView.d.ts +3 -0
- package/dist/views/NetworkView.d.ts.map +1 -0
- package/dist/views/SegmentsView.d.ts +3 -0
- package/dist/views/SegmentsView.d.ts.map +1 -0
- package/dist/views/dashboardWidgets.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/components/PipelineSettings.d.ts +0 -3
- package/dist/components/PipelineSettings.d.ts.map +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { UnitScorecardRow, ScorecardWeights, ScorecardDimension } from '../types';
|
|
2
|
+
export declare const SCORECARD_DIMENSIONS: ScorecardDimension[];
|
|
3
|
+
/** As dimensões que este plugin sabe medir hoje. As outras existem no cadastro
|
|
4
|
+
* de pesos de propósito — o dia em que a fonte aparecer, o peso já está
|
|
5
|
+
* combinado — e até lá saem da conta em vez de entrarem como zero. */
|
|
6
|
+
export declare const MEASURED_DIMENSIONS: ScorecardDimension[];
|
|
7
|
+
export interface ScoredUnit extends UnitScorecardRow {
|
|
8
|
+
/** 0–100 sobre as dimensões que tinham dado, ou nulo quando nenhuma tinha. */
|
|
9
|
+
score: number | null;
|
|
10
|
+
/** Quantas dimensões entraram na conta. A tela mostra: uma nota feita de uma
|
|
11
|
+
* dimensão só não é comparável com uma feita de cinco, e esconder isso faria
|
|
12
|
+
* o ranking parecer mais firme do que é. */
|
|
13
|
+
measured: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function scoreUnits(rows: UnitScorecardRow[], weights: ScorecardWeights): ScoredUnit[];
|
|
16
|
+
/** A média da rede — sobre as unidades que TÊM nota. Incluir as sem nota como
|
|
17
|
+
* zero afundaria a média da rede toda por causa de lojas que só não têm dado. */
|
|
18
|
+
export declare function networkScore(units: ScoredUnit[]): number | null;
|
|
19
|
+
//# sourceMappingURL=scorecard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scorecard.d.ts","sourceRoot":"","sources":["../../src/lib/scorecard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAiBtF,eAAO,MAAM,oBAAoB,EAAE,kBAAkB,EAGpD,CAAA;AAED;;uEAEuE;AACvE,eAAO,MAAM,mBAAmB,EAAE,kBAAkB,EAEnD,CAAA;AAED,MAAM,WAAW,UAAW,SAAQ,gBAAgB;IAClD,8EAA8E;IAC9E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB;;iDAE6C;IAC7C,QAAQ,EAAE,MAAM,CAAA;CACjB;AAeD,wBAAgB,UAAU,CAAC,IAAI,EAAE,gBAAgB,EAAE,EAAE,OAAO,EAAE,gBAAgB,GAAG,UAAU,EAAE,CA8B5F;AAED;kFACkF;AAClF,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,MAAM,GAAG,IAAI,CAI/D"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Segment, SegmentFieldDef, SegmentRule, SegmentRuleOp } from '../types';
|
|
2
|
+
export declare const SEGMENT_FIELDS: SegmentFieldDef[];
|
|
3
|
+
export declare function segmentFieldFor(column: string): SegmentFieldDef | undefined;
|
|
4
|
+
/** Operadores que não levam valor. A tela esconde o campo, e o banco não o lê. */
|
|
5
|
+
export declare const VALUELESS_OPS: SegmentRuleOp[];
|
|
6
|
+
/** Operadores cujo valor é um NÚMERO DE DIAS, não uma data. É a diferença
|
|
7
|
+
* entre um recorte que envelhece e um que não. */
|
|
8
|
+
export declare const DAY_OPS: SegmentRuleOp[];
|
|
9
|
+
/**
|
|
10
|
+
* A regra em uma frase, para o chip e para a lista.
|
|
11
|
+
*
|
|
12
|
+
* Vale a pena existir: um segmento cuja regra só aparece dentro do editor é um
|
|
13
|
+
* segmento que ninguém confere. Quem olha a lista tem de conseguir ver que
|
|
14
|
+
* "Parados há 90 dias" pergunta por `updated_at`, e não por data de compra.
|
|
15
|
+
*/
|
|
16
|
+
export declare function describeRule(rule: SegmentRule, t: (k: string, p?: Record<string, string>) => string): string;
|
|
17
|
+
export interface SegmentEvalRow {
|
|
18
|
+
id: string;
|
|
19
|
+
kind?: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
email?: string | null;
|
|
22
|
+
phone?: string | null;
|
|
23
|
+
city?: string | null;
|
|
24
|
+
tags?: string[];
|
|
25
|
+
is_active?: boolean;
|
|
26
|
+
created_at?: string;
|
|
27
|
+
updated_at?: string;
|
|
28
|
+
date_of_birth?: string | null;
|
|
29
|
+
[k: string]: unknown;
|
|
30
|
+
}
|
|
31
|
+
export declare function evaluateSegment(segment: Segment, rows: SegmentEvalRow[], nowMs?: number): string[];
|
|
32
|
+
//# sourceMappingURL=segments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segments.d.ts","sourceRoot":"","sources":["../../src/lib/segments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAepF,eAAO,MAAM,cAAc,EAAE,eAAe,EAW3C,CAAA;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAE3E;AAED,kFAAkF;AAClF,eAAO,MAAM,aAAa,EAAE,aAAa,EAA4B,CAAA;AAErE;mDACmD;AACnD,eAAO,MAAM,OAAO,EAAE,aAAa,EAA+D,CAAA;AAElG;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,GAAG,MAAM,CAgB5G;AAYD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AA0DD,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,KAAK,SAAa,GAAG,MAAM,EAAE,CAItG"}
|
package/dist/locales/en.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/locales/en.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/locales/en.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAwfrC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pt-BR.d.ts","sourceRoot":"","sources":["../../src/locales/pt-BR.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"pt-BR.d.ts","sourceRoot":"","sources":["../../src/locales/pt-BR.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAwfvC,CAAA"}
|