@fayz-ai/plugin-automations 0.9.0 → 0.9.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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @fayz-ai/plugin-automations
2
2
 
3
- > **Status: experimental (incubating).** Not capability-complete — missing some or all of the capability bar (data-provider contract w/ supabase+mock pair, entity registries, settings, migrations; see `docs/PLUGIN-PATTERNS.md`). Fine to explore in dogfoods; NOT ready for fresh installs or generated apps, and its API may change without notice.
3
+ > **Status: experimental (incubating).** Not capability-complete — missing some or all of the capability bar (data-provider contract w/ supabase+mock pair, entity registries, settings, migrations; see `docs/plugins/PLUGIN-PATTERNS.md`). Fine to explore in dogfoods; NOT ready for fresh installs or generated apps, and its API may change without notice.
4
4
 
5
5
  > Visual trigger → action workflows, native to your app's own events.
6
6
 
@@ -28,7 +28,7 @@ Peer deps: `react`, `react-dom`. Runtime deps: `@fayz-ai/core`, `@fayz-ai/ui`.
28
28
 
29
29
  ## Usage
30
30
  ```tsx
31
- import { defineSaas } from '@fayz-ai/saas'
31
+ import { defineSaas } from '@fayz-ai/admin'
32
32
  import { createAutomationsPlugin } from '@fayz-ai/plugin-automations'
33
33
 
34
34
  export const app = defineSaas({
@@ -43,7 +43,7 @@ export const app = defineSaas({
43
43
  ```
44
44
 
45
45
  ## Part of the Fayz SDK
46
- One of the composable plugins for `@fayz-ai/saas` — this one owns the automate surface: workflows that react to your app's events.
46
+ One of the composable plugins for `@fayz-ai/admin` — this one owns the automate surface: workflows that react to your app's events.
47
47
 
48
48
  ## Roadmap & contributing
49
- Built and evolving in the open. See the [Fayz SDK roadmap](../../docs/ROADMAP.md#plugin-automations) for current gaps, missing features, and good first issues.
49
+ Built and evolving in the open. See the [Fayz SDK roadmap](../../docs/platform/ROADMAP.md#plugin-automations) for current gaps, missing features, and good first issues.
@@ -0,0 +1,9 @@
1
+ import type { MessageTemplate, UpsertMessageTemplateInput } from '@fayz-ai/core';
2
+ export interface MessageTemplateStore {
3
+ list(tenantId?: string): Promise<MessageTemplate[]>;
4
+ upsert(input: UpsertMessageTemplateInput, tenantId?: string): Promise<MessageTemplate>;
5
+ /** Descarta a personalização inteira — a linha some e o padrão volta a valer. */
6
+ reset(eventKey: string, channel: string, tenantId?: string): Promise<void>;
7
+ }
8
+ export declare function createSupabaseTemplateStore(): MessageTemplateStore;
9
+ //# sourceMappingURL=templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/data/templates.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAA;AA6BhF,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;IACnD,MAAM,CAAC,KAAK,EAAE,0BAA0B,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;IACtF,iFAAiF;IACjF,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC3E;AAED,wBAAgB,2BAA2B,IAAI,oBAAoB,CA4ClE"}
package/dist/index.d.ts CHANGED
@@ -1,10 +1,25 @@
1
1
  import type { PluginManifest, PluginScope, VerticalId } from '@fayz-ai/core';
2
+ import { createSupabaseTemplateStore, type MessageTemplateStore } from './data/templates';
2
3
  export interface AutomationsPluginOptions {
3
4
  navPosition?: number;
4
5
  navSection?: 'main' | 'secondary' | 'settings';
5
6
  navLabel?: string;
7
+ /**
8
+ * Where the list lives.
9
+ *
10
+ * 'nav' its own menu item (default) — for apps where sending is daily
11
+ * routine, like the store.
12
+ * 'settings' a tab inside settings, no menu item. In a salon the calendar is
13
+ * what runs all day; automations are configured once, and a fixed
14
+ * top-level item charges attention daily for a monthly screen.
15
+ */
16
+ placement?: 'nav' | 'settings';
6
17
  scope?: PluginScope;
7
18
  verticalId?: VerticalId;
19
+ /** Swaps data access (tests, mock mode). */
20
+ store?: MessageTemplateStore;
8
21
  }
9
22
  export declare function createAutomationsPlugin(options?: AutomationsPluginOptions): PluginManifest;
23
+ export { createSupabaseTemplateStore };
24
+ export type { MessageTemplateStore };
10
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAS5E,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,UAAU,CAAA;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,UAAU,CAAC,EAAE,UAAU,CAAA;CACxB;AAED,wBAAgB,uBAAuB,CAAC,OAAO,CAAC,EAAE,wBAAwB,GAAG,cAAc,CAiC1F"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAI5E,OAAO,EAAE,2BAA2B,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAiBzF,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,UAAU,CAAA;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,UAAU,CAAA;IAC9B,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,oBAAoB,CAAA;CAC7B;AAED,wBAAgB,uBAAuB,CAAC,OAAO,CAAC,EAAE,wBAAwB,GAAG,cAAc,CA8D1F;AAED,OAAO,EAAE,2BAA2B,EAAE,CAAA;AACtC,YAAY,EAAE,oBAAoB,EAAE,CAAA"}