@fayz-ai/plugin-workforce 0.1.1

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.
Files changed (41) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +56 -0
  3. package/dist/context.d.ts +57 -0
  4. package/dist/context.d.ts.map +1 -0
  5. package/dist/data/index.d.ts +4 -0
  6. package/dist/data/index.d.ts.map +1 -0
  7. package/dist/data/mock.d.ts +3 -0
  8. package/dist/data/mock.d.ts.map +1 -0
  9. package/dist/data/supabase.d.ts +5 -0
  10. package/dist/data/supabase.d.ts.map +1 -0
  11. package/dist/data/types.d.ts +81 -0
  12. package/dist/data/types.d.ts.map +1 -0
  13. package/dist/index.d.ts +98 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +6416 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/migrations/index.d.ts +12 -0
  18. package/dist/migrations/index.d.ts.map +1 -0
  19. package/dist/settings/usePayrollAccounts.d.ts +14 -0
  20. package/dist/settings/usePayrollAccounts.d.ts.map +1 -0
  21. package/dist/store.d.ts +32 -0
  22. package/dist/store.d.ts.map +1 -0
  23. package/dist/types.d.ts +330 -0
  24. package/dist/types.d.ts.map +1 -0
  25. package/dist/views/HrView.d.ts +5 -0
  26. package/dist/views/HrView.d.ts.map +1 -0
  27. package/dist/views/PayrollCostsView.d.ts +3 -0
  28. package/dist/views/PayrollCostsView.d.ts.map +1 -0
  29. package/dist/views/PeopleView.d.ts +8 -0
  30. package/dist/views/PeopleView.d.ts.map +1 -0
  31. package/dist/views/PeriodsView.d.ts +3 -0
  32. package/dist/views/PeriodsView.d.ts.map +1 -0
  33. package/dist/views/SchedulesView.d.ts +3 -0
  34. package/dist/views/SchedulesView.d.ts.map +1 -0
  35. package/dist/views/TemplatesView.d.ts +3 -0
  36. package/dist/views/TemplatesView.d.ts.map +1 -0
  37. package/dist/views/TimeEntriesView.d.ts +3 -0
  38. package/dist/views/TimeEntriesView.d.ts.map +1 -0
  39. package/dist/views/WorkforcePage.d.ts +18 -0
  40. package/dist/views/WorkforcePage.d.ts.map +1 -0
  41. package/package.json +60 -0
@@ -0,0 +1,330 @@
1
+ /** O evento da batida. É `kind` em plg_workforce_time_entries. */
2
+ export type TimeEntryKind = 'clock_in' | 'break_start' | 'break_end' | 'clock_out';
3
+ /** De onde a batida veio. */
4
+ export type TimeEntryOrigin = 'totem' | 'device' | 'manual' | 'import' | 'migration';
5
+ /** O que um ajuste FAZ com a batida. Nunca um UPDATE — sempre uma linha nova. */
6
+ export type TimeAdjustmentAction = 'correct' | 'insert' | 'void';
7
+ /** Estado da escala do dia. */
8
+ export type ScheduleStatus = 'draft' | 'published' | 'closed';
9
+ /** Titular ou reserva, no molde e na instância. */
10
+ export type AssignmentRole = 'titular' | 'standby';
11
+ /** O ciclo do convite de escala. */
12
+ export type AssignmentStatus = 'pending' | 'notified' | 'confirmed' | 'declined' | 'realized';
13
+ /** Estado da competência mensal. */
14
+ export type PeriodStatus = 'open' | 'closed';
15
+ /**
16
+ * Uma batida COM a hora que vale — a leitura de `v_workforce_time_entries`.
17
+ * `punchedAt` é o que o totem gravou e nunca muda; `effectiveAt` é o que o
18
+ * último ajuste não anulado disse. A folha soma o segundo e prova pelo primeiro.
19
+ */
20
+ /**
21
+ * Onde os BYTES da foto da batida moram no V2.
22
+ *
23
+ * Dentro de `evidence` convivem duas chaves, e a diferença importa: `photo_path`
24
+ * é o caminho no V1 — procedência, que fica —, e `photo` é este ponteiro, escrito
25
+ * quando a imagem de fato atravessou. Ter o primeiro sem o segundo significa
26
+ * "houve captura e ela não está aqui", que é diferente de "não houve captura".
27
+ *
28
+ * O bucket é privado (é biometria facial com hora e coordenada ao lado), então
29
+ * não existe URL estável para guardar: ver `signPunchPhoto` no provider.
30
+ */
31
+ export interface PunchPhoto {
32
+ bucket: string;
33
+ path: string;
34
+ documentId?: string | null;
35
+ }
36
+ export interface TimeEntry {
37
+ id: string;
38
+ unitId?: string | null;
39
+ personId: string;
40
+ personName?: string | null;
41
+ kind: TimeEntryKind;
42
+ workDate: string;
43
+ seq: number;
44
+ origin: TimeEntryOrigin;
45
+ punchedAt: string;
46
+ effectiveAt: string;
47
+ adjusted: boolean;
48
+ voided: boolean;
49
+ adjustmentReason?: string | null;
50
+ adjustedByName?: string | null;
51
+ assignmentId?: string | null;
52
+ /** Preenchido = hora já paga. A trigger do banco recusa ajuste sobre ela. */
53
+ payableInvoiceId?: string | null;
54
+ evidence?: Record<string, unknown>;
55
+ /** Lido de `evidence.photo`. Ausente = a imagem não atravessou (ou não houve). */
56
+ photo?: PunchPhoto | null;
57
+ }
58
+ /**
59
+ * O dia de uma pessoa, previsto ao lado de realizado — `v_workforce_day`.
60
+ * `absent` é escala sem ponto; `outsideSchedule` é ponto sem escala.
61
+ */
62
+ export interface WorkDay {
63
+ personId: string;
64
+ /** Não vem da view: o provider resolve pelo cadastro para a tela ter um nome. */
65
+ personName?: string | null;
66
+ unitId?: string | null;
67
+ /** Resolvido pelo provider: a tabela mostra o nome, não o uuid. */
68
+ unitName?: string | null;
69
+ workDate: string;
70
+ assignmentId?: string | null;
71
+ shiftLabel?: string | null;
72
+ shiftStartTime?: string | null;
73
+ shiftEndTime?: string | null;
74
+ assignmentStatus?: AssignmentStatus | null;
75
+ plannedMinutes?: number | null;
76
+ workedMinutes?: number | null;
77
+ varianceMinutes?: number | null;
78
+ firstIn?: string | null;
79
+ lastOut?: string | null;
80
+ breakCount?: number | null;
81
+ /**
82
+ * O instante da abertura que ainda não tem par, quando o ponto está aberto.
83
+ *
84
+ * É o INSTANTE e não a duração: o relógio corre do lado de quem olha. Ver a
85
+ * migration 003 — `worked_minutes` passou a contar só os trechos FECHADOS, e
86
+ * sem este campo a tela não teria como dizer há quanto tempo a pessoa está
87
+ * dentro sem buscar as batidas de cada linha.
88
+ */
89
+ openSince?: string | null;
90
+ /**
91
+ * Por que este dia NÃO entra na soma. `null` = entra.
92
+ *
93
+ * `open` ainda não terminou
94
+ * `span_too_long` fechou com duração que não é jornada — na prática, saída
95
+ * não batida. Medido no Pertinho do Céu: 180 dias assim,
96
+ * 11.197 das 14.969 horas somadas.
97
+ *
98
+ * O `workedMinutes` ao lado continua sendo o MEDIDO, sempre. Corrigir o
99
+ * número aqui faria a tela parecer certa e a batida furada nunca ser
100
+ * consertada — ver a migration 004.
101
+ */
102
+ reviewReason?: 'open' | 'span_too_long' | null;
103
+ isOpen: boolean;
104
+ absent: boolean;
105
+ outsideSchedule: boolean;
106
+ }
107
+ /** O ajuste como LINHA. `reason` é obrigatório no banco, e aqui também. */
108
+ export interface TimeAdjustmentInput {
109
+ timeEntryId: string;
110
+ action: TimeAdjustmentAction;
111
+ /** Obrigatório em correct/insert; ausente em void, por constraint. */
112
+ effectiveAt?: string;
113
+ reason: string;
114
+ }
115
+ export interface TimeEntryQuery {
116
+ from: string;
117
+ to: string;
118
+ personId?: string;
119
+ unitId?: string;
120
+ }
121
+ export interface WorkforcePeriod {
122
+ id: string;
123
+ /** Sempre o dia 1º — o banco garante por constraint. */
124
+ competenceMonth: string;
125
+ status: PeriodStatus;
126
+ closedAt?: string | null;
127
+ reopenedAt?: string | null;
128
+ reopenReason?: string | null;
129
+ notes?: string | null;
130
+ }
131
+ export interface ScheduleRequirement {
132
+ id: string;
133
+ shiftId: string;
134
+ /** Texto livre: o V2 ainda não tem cadastro de profissão. Ver o SQL. */
135
+ professionName: string;
136
+ requiredCount: number;
137
+ }
138
+ export interface ScheduleShift {
139
+ id: string;
140
+ templateId: string;
141
+ label: string;
142
+ /** 'HH:MM' ou 'HH:MM:SS', como o Postgres devolve `time`. */
143
+ startTime: string;
144
+ endTime: string;
145
+ /** 0 = domingo, como `extract(dow)`. */
146
+ weekdays: number[];
147
+ crossesMidnight: boolean;
148
+ sortOrder: number;
149
+ requirements: ScheduleRequirement[];
150
+ }
151
+ export interface ScheduleTemplate {
152
+ id: string;
153
+ unitId?: string | null;
154
+ name: string;
155
+ isActive: boolean;
156
+ notes?: string | null;
157
+ shifts: ScheduleShift[];
158
+ }
159
+ export interface SaveTemplateInput {
160
+ id?: string;
161
+ name: string;
162
+ unitId?: string | null;
163
+ isActive?: boolean;
164
+ notes?: string | null;
165
+ }
166
+ export interface SaveShiftInput {
167
+ id?: string;
168
+ templateId: string;
169
+ label: string;
170
+ startTime: string;
171
+ endTime: string;
172
+ weekdays: number[];
173
+ sortOrder?: number;
174
+ }
175
+ export interface SaveRequirementInput {
176
+ id?: string;
177
+ shiftId: string;
178
+ professionName: string;
179
+ requiredCount: number;
180
+ }
181
+ export interface ScheduleAssignment {
182
+ id: string;
183
+ scheduleId: string;
184
+ shiftId?: string | null;
185
+ /** SNAPSHOT do turno na hora da criação. Mudar o molde não reescreve isto. */
186
+ shiftLabel?: string | null;
187
+ shiftStartTime?: string | null;
188
+ shiftEndTime?: string | null;
189
+ professionName?: string | null;
190
+ personId: string;
191
+ personName?: string | null;
192
+ role: AssignmentRole;
193
+ priority: number;
194
+ status: AssignmentStatus;
195
+ /** A ponte com a agenda: a linha de `public.schedules` que a publicação criou. */
196
+ scheduleRowId?: string | null;
197
+ }
198
+ export interface DaySchedule {
199
+ id: string;
200
+ scheduleDate: string;
201
+ templateId?: string | null;
202
+ unitId?: string | null;
203
+ status: ScheduleStatus;
204
+ publishedAt?: string | null;
205
+ isSpecialDay: boolean;
206
+ specialDayLabel?: string | null;
207
+ notes?: string | null;
208
+ assignments: ScheduleAssignment[];
209
+ }
210
+ export interface ScheduleQuery {
211
+ from: string;
212
+ to: string;
213
+ unitId?: string;
214
+ }
215
+ export interface CreateScheduleInput {
216
+ scheduleDate: string;
217
+ templateId: string;
218
+ unitId?: string | null;
219
+ notes?: string | null;
220
+ }
221
+ /** O mínimo de `public.people` que as telas de escala precisam. */
222
+ export interface WorkforcePerson {
223
+ id: string;
224
+ name: string;
225
+ isActive: boolean;
226
+ }
227
+ /**
228
+ * O custo de pessoal, LIDO do razão do financeiro. Este plugin não escreve
229
+ * nenhuma linha aqui — quem lança encargo é o Financeiro, e duplicar a escrita
230
+ * seria ter dois livros para a mesma despesa.
231
+ */
232
+ export interface PayrollCostRow {
233
+ chartAccountId: string | null;
234
+ /** Nulo = a linha existe e NÃO está classificada (a natureza da conta não
235
+ * casa com o sentido do título, ou não há conta). É a regra do demonstrativo
236
+ * — ver a migration 039 do financeiro. */
237
+ chartAccountCode: string | null;
238
+ chartAccountName: string;
239
+ /** Dia 1º do mês de competência. NULO = ESTRUTURA: a conta existe no plano e
240
+ * não teve movimento. Vira nó na árvore e não vira coluna — um zero com mês
241
+ * afirmaria que houve movimento de zero naquele mês. */
242
+ competenceMonth: string | null;
243
+ total: number;
244
+ }
245
+ export interface PayrollCostQuery {
246
+ from: string;
247
+ to: string;
248
+ }
249
+ export type ContractKind = 'clt' | 'pj' | 'estagio' | 'jovem_aprendiz' | 'autonomo' | 'socio' | 'temporario' | 'intermitente';
250
+ export type ScheduleRegime = 'mensalista' | 'horista' | 'diarista' | 'escala_12x36' | 'escala_6x1' | 'escala_5x2';
251
+ export type PayFrequency = 'mensal' | 'quinzenal' | 'semanal' | 'diario' | 'por_hora';
252
+ export type VacationStatus = 'pendente' | 'programada' | 'em_gozo' | 'concluida' | 'vencida';
253
+ export type AbsenceKind = 'falta_justificada' | 'falta_injustificada' | 'atestado' | 'licenca_maternidade' | 'licenca_paternidade' | 'licenca_nao_remunerada' | 'suspensao' | 'ferias' | 'afastamento_inss';
254
+ export type PendingPriority = 'baixa' | 'normal' | 'alta' | 'urgente';
255
+ export type PendingCategory = 'documento' | 'exame' | 'epi' | 'treinamento' | 'assinatura' | 'outro';
256
+ /** O vínculo. Uma linha por pessoa — recontratação reabre a mesma. */
257
+ export interface Employment {
258
+ id?: string;
259
+ personId: string;
260
+ contractKind?: ContractKind | null;
261
+ admissionDate?: string | null;
262
+ dismissalDate?: string | null;
263
+ dismissalReason?: string | null;
264
+ probationFirstEnd?: string | null;
265
+ probationFinalEnd?: string | null;
266
+ jobTitle?: string | null;
267
+ department?: string | null;
268
+ scheduleRegime?: ScheduleRegime | null;
269
+ weeklyHours?: number | null;
270
+ monthlyHours?: number | null;
271
+ esocialRegistration?: string | null;
272
+ /** Valor de REFERÊNCIA. Não vira conta a pagar nem comissão — nem no V1. */
273
+ baseSalary?: number | null;
274
+ payFrequency?: PayFrequency | null;
275
+ notes?: string | null;
276
+ }
277
+ export interface Vacation {
278
+ id?: string;
279
+ personId: string;
280
+ accrualStart: string;
281
+ accrualEnd: string;
282
+ takenStart?: string | null;
283
+ takenEnd?: string | null;
284
+ daysTaken?: number | null;
285
+ daysSold?: number | null;
286
+ status: VacationStatus;
287
+ notes?: string | null;
288
+ }
289
+ export interface Absence {
290
+ id?: string;
291
+ personId: string;
292
+ kind: AbsenceKind;
293
+ startsOn: string;
294
+ endsOn?: string | null;
295
+ days?: number | null;
296
+ paid: boolean;
297
+ /** Dado de saúde. Só chega a quem tem `workforce_hr.read`. */
298
+ icdCode?: string | null;
299
+ doctor?: string | null;
300
+ notes?: string | null;
301
+ }
302
+ export interface PendingItem {
303
+ id?: string;
304
+ personId: string;
305
+ title: string;
306
+ category?: PendingCategory | null;
307
+ priority: PendingPriority;
308
+ dueOn?: string | null;
309
+ resolvedAt?: string | null;
310
+ description?: string | null;
311
+ }
312
+ /** Os oito cartões — `v_workforce_hr_overview`. */
313
+ export interface HrOverview {
314
+ headcount: number;
315
+ admissions30d: number;
316
+ dismissals30d: number;
317
+ probationEnding: number;
318
+ birthdaysThisMonth: number;
319
+ vacationsDue60d: number;
320
+ criticalPending: number;
321
+ }
322
+ /** O que vence em 60 dias, COM o nome de quem — o V1 mostra só a data (V1-073). */
323
+ export interface HrUpcoming {
324
+ kind: 'vacation' | 'probation' | 'pending';
325
+ personId: string;
326
+ personName?: string | null;
327
+ dueOn?: string | null;
328
+ detail?: string | null;
329
+ }
330
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AASA,kEAAkE;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I,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACvB"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { AbsenceKind } from '../types';
3
+ export declare const AFASTAMENTO: Record<AbsenceKind, string>;
4
+ export declare function HrView(): React.JSX.Element;
5
+ //# sourceMappingURL=HrView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HrView.d.ts","sourceRoot":"","sources":["../../src/views/HrView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAO,KAAK,EACD,WAAW,EAErB,MAAM,UAAU,CAAA;AA2CjB,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAKnD,CAAA;AA6YD,wBAAgB,MAAM,sBAwErB"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare function PayrollCostsView(): React.JSX.Element;
3
+ //# sourceMappingURL=PayrollCostsView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PayrollCostsView.d.ts","sourceRoot":"","sources":["../../src/views/PayrollCostsView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA8GzB,wBAAgB,gBAAgB,sBAkM/B"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { EntityDef } from '@fayz-ai/core';
3
+ /** O recorte de `public.people` que o RH edita. O app pode substituir. */
4
+ export declare const DEFAULT_STAFF_ENTITY: EntityDef;
5
+ export declare function PeopleView({ entity }: {
6
+ entity?: EntityDef;
7
+ }): React.JSX.Element;
8
+ //# sourceMappingURL=PeopleView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PeopleView.d.ts","sourceRoot":"","sources":["../../src/views/PeopleView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAe9C,0EAA0E;AAC1E,eAAO,MAAM,oBAAoB,EAAE,SAqBlC,CAAA;AAMD,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,CAAC,EAAE,SAAS,CAAA;CAAE,qBAU5D"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare function PeriodsView(): React.JSX.Element;
3
+ //# sourceMappingURL=PeriodsView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PeriodsView.d.ts","sourceRoot":"","sources":["../../src/views/PeriodsView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAkCzB,wBAAgB,WAAW,sBAgH1B"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare function SchedulesView(): React.JSX.Element;
3
+ //# sourceMappingURL=SchedulesView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchedulesView.d.ts","sourceRoot":"","sources":["../../src/views/SchedulesView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA+DzB,wBAAgB,aAAa,sBAkK5B"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare function TemplatesView(): React.JSX.Element;
3
+ //# sourceMappingURL=TemplatesView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TemplatesView.d.ts","sourceRoot":"","sources":["../../src/views/TemplatesView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAkNzB,wBAAgB,aAAa,sBA+D5B"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare function TimeEntriesView(): React.JSX.Element;
3
+ //# sourceMappingURL=TimeEntriesView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimeEntriesView.d.ts","sourceRoot":"","sources":["../../src/views/TimeEntriesView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAmmBzB,wBAAgB,eAAe,sBAsO9B"}
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import type { StoreApi } from 'zustand/vanilla';
3
+ import type { EntityDef } from '@fayz-ai/core';
4
+ import { type ResolvedWorkforceConfig } from '../context';
5
+ import type { WorkforceDataProvider } from '../data/types';
6
+ import type { WorkforceUIState } from '../store';
7
+ export interface ViewIntent {
8
+ view: string;
9
+ mode?: 'list' | 'new' | 'edit' | 'detail';
10
+ editId?: string;
11
+ }
12
+ export declare function WorkforcePage({ config, provider, store, staffEntity }: {
13
+ config: ResolvedWorkforceConfig;
14
+ provider: WorkforceDataProvider;
15
+ store: StoreApi<WorkforceUIState>;
16
+ staffEntity?: EntityDef;
17
+ }): React.JSX.Element;
18
+ //# sourceMappingURL=WorkforcePage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkforcePage.d.ts","sourceRoot":"","sources":["../../src/views/WorkforcePage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAM/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAA4B,KAAK,uBAAuB,EAAE,MAAM,YAAY,CAAA;AACnF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAahD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAA;IACzC,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAyGD,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE;IACtE,MAAM,EAAE,uBAAuB,CAAA;IAC/B,QAAQ,EAAE,qBAAqB,CAAA;IAC/B,KAAK,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAA;IACjC,WAAW,CAAC,EAAE,SAAS,CAAA;CACxB,qBAqEA"}
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@fayz-ai/plugin-workforce",
3
+ "fayz": {
4
+ "status": "beta",
5
+ "dependencies": []
6
+ },
7
+ "version": "0.1.1",
8
+ "description": "Fayz SDK — plugin-workforce plugin",
9
+ "type": "module",
10
+ "sideEffects": false,
11
+ "main": "./dist/index.js",
12
+ "module": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/index.js"
18
+ }
19
+ },
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "peerDependencies": {
24
+ "lucide-react": ">=0.400.0 <1.0.0",
25
+ "react": "^18.0.0 || ^19.0.0",
26
+ "react-dom": "^18.0.0 || ^19.0.0",
27
+ "zustand": "^4.5.0 || ^5.0.0"
28
+ },
29
+ "dependencies": {
30
+ "@fayz-ai/admin": "^0.23.0",
31
+ "@fayz-ai/core": "^0.23.0",
32
+ "@fayz-ai/ui": "^0.23.0"
33
+ },
34
+ "devDependencies": {
35
+ "@types/node": "^20.0.0",
36
+ "@types/react": "^18.3.0",
37
+ "@types/react-dom": "^18.3.0",
38
+ "lucide-react": "^0.400.0",
39
+ "react": "^18.3.0",
40
+ "react-dom": "^18.3.0",
41
+ "tsup": "^8.2.0",
42
+ "typescript": "^5.5.0",
43
+ "zustand": "^4.5.0"
44
+ },
45
+ "license": "MIT",
46
+ "keywords": [
47
+ "fayz",
48
+ "fayz-plugin",
49
+ "fayz-sdk"
50
+ ],
51
+ "publishConfig": {
52
+ "access": "public"
53
+ },
54
+ "scripts": {
55
+ "build": "tsup && tsc -b --force",
56
+ "dev": "tsup --watch",
57
+ "typecheck": "tsc -b",
58
+ "clean": "rm -rf dist .tsbuildinfo"
59
+ }
60
+ }