@fayz-ai/admin 0.10.0 → 0.11.0

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 (160) hide show
  1. package/dist/{ScheduleEditor-BSFF7LME.js → ScheduleEditor-S3QI5MHO.js} +5 -5
  2. package/dist/{ScheduleEditor-BSFF7LME.js.map → ScheduleEditor-S3QI5MHO.js.map} +1 -1
  3. package/dist/app/AdminShell.d.ts +9 -0
  4. package/dist/app/AdminShell.d.ts.map +1 -1
  5. package/dist/app/RouteErrorBoundary.d.ts +42 -0
  6. package/dist/app/RouteErrorBoundary.d.ts.map +1 -0
  7. package/dist/app/admin-app.d.ts +1 -0
  8. package/dist/app/admin-app.d.ts.map +1 -1
  9. package/dist/app/config.d.ts +7 -0
  10. package/dist/app/config.d.ts.map +1 -1
  11. package/dist/app/contextual-nav.store.d.ts +39 -0
  12. package/dist/app/contextual-nav.store.d.ts.map +1 -0
  13. package/dist/app/scaffold.d.ts.map +1 -1
  14. package/dist/{chunk-TNTZHUL6.js → chunk-OI7RYSTM.js} +8 -4
  15. package/dist/chunk-OI7RYSTM.js.map +1 -0
  16. package/dist/components/RightRail.d.ts.map +1 -1
  17. package/dist/components/auth/LoginForm.d.ts +3 -1
  18. package/dist/components/auth/LoginForm.d.ts.map +1 -1
  19. package/dist/components/auth/OAuthButtons.d.ts +3 -1
  20. package/dist/components/auth/OAuthButtons.d.ts.map +1 -1
  21. package/dist/components/chat/AssistantActivityBar.d.ts +15 -0
  22. package/dist/components/chat/AssistantActivityBar.d.ts.map +1 -0
  23. package/dist/components/chat/AssistantInvite.d.ts +7 -0
  24. package/dist/components/chat/AssistantInvite.d.ts.map +1 -0
  25. package/dist/components/chat/ChatComposer.d.ts.map +1 -1
  26. package/dist/components/chat/ChatConversation.d.ts.map +1 -1
  27. package/dist/components/chat/ChatFab.d.ts.map +1 -1
  28. package/dist/components/chat/ChatMessages.d.ts.map +1 -1
  29. package/dist/components/chat/ChatSuggestions.d.ts.map +1 -1
  30. package/dist/components/chat/ConnectorSuggestionCard.d.ts +6 -0
  31. package/dist/components/chat/ConnectorSuggestionCard.d.ts.map +1 -0
  32. package/dist/components/chat/index.d.ts +2 -0
  33. package/dist/components/chat/index.d.ts.map +1 -1
  34. package/dist/components/connect/AddConnectorPanel.d.ts +61 -10
  35. package/dist/components/connect/AddConnectorPanel.d.ts.map +1 -1
  36. package/dist/components/connect/ConnectorDeliveries.d.ts +10 -0
  37. package/dist/components/connect/ConnectorDeliveries.d.ts.map +1 -0
  38. package/dist/components/connect/ConnectorDetail.d.ts +21 -2
  39. package/dist/components/connect/ConnectorDetail.d.ts.map +1 -1
  40. package/dist/components/connect/ConnectorDisclosure.d.ts +29 -0
  41. package/dist/components/connect/ConnectorDisclosure.d.ts.map +1 -0
  42. package/dist/components/connect/ConnectorMark.d.ts +7 -1
  43. package/dist/components/connect/ConnectorMark.d.ts.map +1 -1
  44. package/dist/components/connect/ConnectorPermissions.d.ts +49 -0
  45. package/dist/components/connect/ConnectorPermissions.d.ts.map +1 -0
  46. package/dist/components/connect/ConnectorRow.d.ts +14 -7
  47. package/dist/components/connect/ConnectorRow.d.ts.map +1 -1
  48. package/dist/components/connect/ConnectorRuns.d.ts +50 -0
  49. package/dist/components/connect/ConnectorRuns.d.ts.map +1 -0
  50. package/dist/components/connect/ConnectorSettings.d.ts +29 -0
  51. package/dist/components/connect/ConnectorSettings.d.ts.map +1 -0
  52. package/dist/components/connect/ConnectorSyncActions.d.ts +15 -0
  53. package/dist/components/connect/ConnectorSyncActions.d.ts.map +1 -0
  54. package/dist/components/connect/ConnectorsPanel.d.ts +5 -3
  55. package/dist/components/connect/ConnectorsPanel.d.ts.map +1 -1
  56. package/dist/components/connect/ConnectorsTab.d.ts.map +1 -1
  57. package/dist/components/connect/connector-map.generated.d.ts +28 -0
  58. package/dist/components/connect/connector-map.generated.d.ts.map +1 -0
  59. package/dist/components/connect/connector-search.d.ts +104 -0
  60. package/dist/components/connect/connector-search.d.ts.map +1 -0
  61. package/dist/components/connect/connector-sources.d.ts +32 -0
  62. package/dist/components/connect/connector-sources.d.ts.map +1 -0
  63. package/dist/components/connect/connector-status.d.ts +15 -0
  64. package/dist/components/connect/connector-status.d.ts.map +1 -0
  65. package/dist/components/connect/credentials.d.ts +65 -0
  66. package/dist/components/connect/credentials.d.ts.map +1 -0
  67. package/dist/components/connect/index.d.ts +15 -3
  68. package/dist/components/connect/index.d.ts.map +1 -1
  69. package/dist/components/connect/model.d.ts +197 -23
  70. package/dist/components/connect/model.d.ts.map +1 -1
  71. package/dist/components/connect/oauth-return.d.ts +59 -0
  72. package/dist/components/connect/oauth-return.d.ts.map +1 -0
  73. package/dist/components/connect/useConnectors.d.ts +16 -2
  74. package/dist/components/connect/useConnectors.d.ts.map +1 -1
  75. package/dist/components/connect/when.d.ts +22 -0
  76. package/dist/components/connect/when.d.ts.map +1 -0
  77. package/dist/components/plugins/ConnectorsHub.d.ts.map +1 -1
  78. package/dist/components/plugins/PluginSettingsPanel.d.ts +10 -6
  79. package/dist/components/plugins/PluginSettingsPanel.d.ts.map +1 -1
  80. package/dist/components/right-rail.d.ts +4 -0
  81. package/dist/components/right-rail.d.ts.map +1 -1
  82. package/dist/components/settings/SettingsPage.d.ts +5 -2
  83. package/dist/components/settings/SettingsPage.d.ts.map +1 -1
  84. package/dist/components/shared/ContactPicker.d.ts +3 -1
  85. package/dist/components/shared/ContactPicker.d.ts.map +1 -1
  86. package/dist/components/shared/RecordPickerModal.d.ts +36 -0
  87. package/dist/components/shared/RecordPickerModal.d.ts.map +1 -0
  88. package/dist/crud/CrudDetailPage.d.ts +4 -1
  89. package/dist/crud/CrudDetailPage.d.ts.map +1 -1
  90. package/dist/crud/CrudFormPage.d.ts +9 -1
  91. package/dist/crud/CrudFormPage.d.ts.map +1 -1
  92. package/dist/crud/CrudListView.d.ts +30 -1
  93. package/dist/crud/CrudListView.d.ts.map +1 -1
  94. package/dist/crud/CrudPage.d.ts.map +1 -1
  95. package/dist/crud/CrudRecordModal.d.ts +19 -0
  96. package/dist/crud/CrudRecordModal.d.ts.map +1 -0
  97. package/dist/crud/RecordMetaFooter.d.ts +6 -0
  98. package/dist/crud/RecordMetaFooter.d.ts.map +1 -0
  99. package/dist/crud/archetypes/OrderDetailView.d.ts +7 -0
  100. package/dist/crud/archetypes/OrderDetailView.d.ts.map +1 -1
  101. package/dist/crud/archetypes/OrderFormView.d.ts +1 -0
  102. package/dist/crud/archetypes/OrderFormView.d.ts.map +1 -1
  103. package/dist/crud/archetypes/OrderListView.d.ts +29 -1
  104. package/dist/crud/archetypes/OrderListView.d.ts.map +1 -1
  105. package/dist/crud/entity-zone.d.ts +19 -0
  106. package/dist/crud/entity-zone.d.ts.map +1 -0
  107. package/dist/crud/index.d.ts +1 -1
  108. package/dist/crud/index.d.ts.map +1 -1
  109. package/dist/data/client.d.ts.map +1 -1
  110. package/dist/hooks/useChat.d.ts +1 -0
  111. package/dist/hooks/useChat.d.ts.map +1 -1
  112. package/dist/hooks/useMicLevels.d.ts +7 -2
  113. package/dist/hooks/useMicLevels.d.ts.map +1 -1
  114. package/dist/index.d.ts +32 -5
  115. package/dist/index.d.ts.map +1 -1
  116. package/dist/index.js +5667 -1563
  117. package/dist/index.js.map +1 -1
  118. package/dist/lib/ai-tool-handlers.d.ts +11 -0
  119. package/dist/lib/ai-tool-handlers.d.ts.map +1 -1
  120. package/dist/lib/assistant-activity.d.ts +81 -0
  121. package/dist/lib/assistant-activity.d.ts.map +1 -0
  122. package/dist/lib/assistant-invite.d.ts +46 -0
  123. package/dist/lib/assistant-invite.d.ts.map +1 -0
  124. package/dist/lib/connector-ai-tools.d.ts +2 -0
  125. package/dist/lib/connector-ai-tools.d.ts.map +1 -0
  126. package/dist/lib/connector-cards.d.ts +3 -0
  127. package/dist/lib/connector-cards.d.ts.map +1 -0
  128. package/dist/lib/core-ai-tools.d.ts.map +1 -1
  129. package/dist/lib/fayz-events.d.ts +4 -0
  130. package/dist/lib/fayz-events.d.ts.map +1 -0
  131. package/dist/org/adapters/supabase.d.ts.map +1 -1
  132. package/dist/org/index.js +1 -1
  133. package/dist/plugins/SettingsGroup.d.ts +31 -1
  134. package/dist/plugins/SettingsGroup.d.ts.map +1 -1
  135. package/dist/projects/SeuSiteWidget.d.ts.map +1 -1
  136. package/dist/stores/audit.d.ts +61 -0
  137. package/dist/stores/audit.d.ts.map +1 -0
  138. package/dist/stores/chat.store.d.ts +33 -0
  139. package/dist/stores/chat.store.d.ts.map +1 -1
  140. package/dist/stores/createCrudStore.d.ts +4 -1
  141. package/dist/stores/createCrudStore.d.ts.map +1 -1
  142. package/dist/theme/utils.d.ts.map +1 -1
  143. package/dist/timeline/PersonTimeline.d.ts +21 -0
  144. package/dist/timeline/PersonTimeline.d.ts.map +1 -0
  145. package/dist/timeline/core-sources.d.ts +2 -0
  146. package/dist/timeline/core-sources.d.ts.map +1 -0
  147. package/dist/timeline/index.d.ts +6 -0
  148. package/dist/timeline/index.d.ts.map +1 -0
  149. package/dist/timeline/registry.d.ts +5 -0
  150. package/dist/timeline/registry.d.ts.map +1 -0
  151. package/dist/timeline/types.d.ts +91 -0
  152. package/dist/timeline/types.d.ts.map +1 -0
  153. package/dist/timeline/usePersonTimeline.d.ts +28 -0
  154. package/dist/timeline/usePersonTimeline.d.ts.map +1 -0
  155. package/dist/types/crud.d.ts +12 -1
  156. package/dist/types/crud.d.ts.map +1 -1
  157. package/dist/types/plugins.d.ts +4 -0
  158. package/dist/types/plugins.d.ts.map +1 -1
  159. package/package.json +7 -7
  160. package/dist/chunk-TNTZHUL6.js.map +0 -1
@@ -0,0 +1,32 @@
1
+ import type { ConnectorDefinition } from '@fayz-ai/core';
2
+ import type { ShelfIntegration, UnifiedConnector } from './model';
3
+ /**
4
+ * The connectors list, resolved outside React.
5
+ *
6
+ * `useConnectors` is the hook the screens render from; this is the same three
7
+ * sources through the same two builders, for a caller with no component to
8
+ * mount — the assistant's `findConnectors` executor. Sharing the builders is
9
+ * what keeps the tool and the screen from ever disagreeing: if this returned a
10
+ * list of its own the whole feature would be the bug it was written to fix.
11
+ *
12
+ * Both underlying loads are already shared — the catalogue is one flight per
13
+ * session, the statuses one batched read per tenant — so a tool call made while
14
+ * the screen is open costs nothing extra.
15
+ *
16
+ * Inbound grants are left out, deliberately. A granted external assistant is
17
+ * something the org approved, not an integration someone is shopping for, and
18
+ * fetching them needs an authenticated round trip this path has no reason to
19
+ * make.
20
+ */
21
+ export interface ConnectorIndex {
22
+ connectors: UnifiedConnector[];
23
+ shelf: ShelfIntegration[];
24
+ }
25
+ export declare function loadConnectorIndex(input: {
26
+ definitions: ConnectorDefinition[];
27
+ /** Plugin ids mounted in this build — what tells "em breve" from "outro módulo". */
28
+ installedModules: string[];
29
+ /** Defaults to the active tenant — the same id the screen's statuses key on. */
30
+ tenantId?: string;
31
+ }): Promise<ConnectorIndex>;
32
+ //# sourceMappingURL=connector-sources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connector-sources.d.ts","sourceRoot":"","sources":["../../../src/components/connect/connector-sources.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAIxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAEjE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,gBAAgB,EAAE,CAAA;IAC9B,KAAK,EAAE,gBAAgB,EAAE,CAAA;CAC1B;AAED,wBAAsB,kBAAkB,CAAC,KAAK,EAAE;IAC9C,WAAW,EAAE,mBAAmB,EAAE,CAAA;IAClC,oFAAoF;IACpF,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,gFAAgF;IAChF,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,GAAG,OAAO,CAAC,cAAc,CAAC,CAY1B"}
@@ -0,0 +1,15 @@
1
+ import type { ConnectorDefinition } from '@fayz-ai/core';
2
+ import type { InstalledConnector } from './model';
3
+ /** Test seam — drops in-flight bookkeeping. */
4
+ export declare function resetConnectorStatusFlights(): void;
5
+ /**
6
+ * Every installed connector's status. One read for all those that share
7
+ * `plg_connections`, plus one each for those that do not.
8
+ *
9
+ * `tenantId` is required for batching — without an active tenant there is no
10
+ * row to scope, and each connector falls back to reporting for itself.
11
+ */
12
+ export declare function loadConnectorStatuses(definitions: ConnectorDefinition[], tenantId: string | undefined, options?: {
13
+ client?: unknown;
14
+ }): Promise<InstalledConnector[]>;
15
+ //# sourceMappingURL=connector-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connector-status.d.ts","sourceRoot":"","sources":["../../../src/components/connect/connector-status.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAoB,mBAAmB,EAAmB,MAAM,eAAe,CAAA;AAC3F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAqDjD,+CAA+C;AAC/C,wBAAgB,2BAA2B,IAAI,IAAI,CAGlD;AAkCD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,mBAAmB,EAAE,EAClC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACjC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAqB/B"}
@@ -0,0 +1,65 @@
1
+ import type { ConnectorDefinition, ConnectorField, TestConnectionResult } from '@fayz-ai/core';
2
+ import { type ConnectorCredentialSink } from '@fayz-ai/sdk';
3
+ /**
4
+ * The split that keeps a tenant's secret out of connector-author code.
5
+ *
6
+ * The setup form collects one object; two very different things are in it. The
7
+ * domain the RankLayer account publishes to is configuration — the connector
8
+ * needs it, and it belongs in the app's own row. The API key next to it is a
9
+ * credential, and the moment `saveConnection(values)` is called with it, where
10
+ * it ends up is decided by code the platform does not own.
11
+ *
12
+ * Everything a connector is called through goes past here, so the split is not
13
+ * something each call site has to remember: `submitConnection` and
14
+ * `probeConnection` are the only two doors, and `NonSecretValues` is what comes
15
+ * out of both. The contract in `@fayz-ai/core` still types the callbacks as
16
+ * `Record<string, string>`, so the narrowing is expressed here — a plain
17
+ * `values` object is not a `NonSecretValues` and cannot be passed as one.
18
+ */
19
+ declare const nonSecret: unique symbol;
20
+ /** Form values that have been through the split — the only shape author code is handed. */
21
+ export type NonSecretValues = Record<string, string> & {
22
+ readonly [nonSecret]: true;
23
+ };
24
+ /** The connection could not be saved because this app has nowhere safe to put the secret. */
25
+ export declare class CredentialSinkMissingError extends Error {
26
+ constructor();
27
+ }
28
+ /** Masked, or explicitly marked — the unmasked half of a credential pair is still a credential. */
29
+ export declare function isSecretField(field: ConnectorField): boolean;
30
+ /** Whether saving this connector needs a sink at all — a connector with no secret asks nothing of the app. */
31
+ export declare function needsCredentialSink(definition: Pick<ConnectorDefinition, 'fields'>): boolean;
32
+ export declare function splitConnectorValues(fields: ConnectorField[] | undefined, values: Record<string, string>): {
33
+ safe: NonSecretValues;
34
+ secrets: Record<string, string>;
35
+ };
36
+ /**
37
+ * Test the connection with the non-secret half.
38
+ *
39
+ * The secret is discarded rather than forwarded: a pre-save test that worked
40
+ * would have to hand the credential to author code, which is the one thing this
41
+ * module exists to prevent. What a connector can still test this way is the
42
+ * connection it already has — so the hub only offers the button when there is
43
+ * no secret in the form.
44
+ */
45
+ export declare function probeConnection(input: {
46
+ definition: ConnectorDefinition;
47
+ values: Record<string, string>;
48
+ }): Promise<TestConnectionResult>;
49
+ /**
50
+ * Place the credential, then save the rest.
51
+ *
52
+ * Sink first: a connection saved against a credential that never landed reads
53
+ * as "connected" and fails at the first sync, which is the harder failure to
54
+ * diagnose of the two.
55
+ */
56
+ export declare function submitConnection(input: {
57
+ definition: ConnectorDefinition;
58
+ /** Raw form values, secrets included — this is where they part ways. */
59
+ values: Record<string, string>;
60
+ tenantId?: string;
61
+ /** Defaults to the app's configured sink; pass `null` to assert there is none. */
62
+ sink?: ConnectorCredentialSink | null;
63
+ }): Promise<void>;
64
+ export {};
65
+ //# sourceMappingURL=credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../src/components/connect/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAC9F,OAAO,EAA8B,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEvF;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,CAAC,MAAM,SAAS,EAAE,OAAO,MAAM,CAAA;AAEtC,2FAA2F;AAC3F,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG;IAAE,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,IAAI,CAAA;CAAE,CAAA;AAErF,6FAA6F;AAC7F,qBAAa,0BAA2B,SAAQ,KAAK;;CAKpD;AAED,mGAAmG;AACnG,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAE5D;AAED,8GAA8G;AAC9G,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,GAAG,OAAO,CAE5F;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,cAAc,EAAE,GAAG,SAAS,EACpC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7B;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAW5D;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,KAAK,EAAE;IAC3C,UAAU,EAAE,mBAAmB,CAAA;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC/B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAGhC;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,KAAK,EAAE;IAC5C,UAAU,EAAE,mBAAmB,CAAA;IAC/B,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kFAAkF;IAClF,IAAI,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAA;CACtC,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBhB"}
@@ -3,10 +3,22 @@ export type { ConnectConsentPageProps } from './ConnectConsentPage';
3
3
  export { ConnectorsTab } from './ConnectorsTab';
4
4
  export { AddConnectorPanel, AddConnectorButton } from './AddConnectorPanel';
5
5
  export { ConnectorRow, PlaneBadge, DirectionBadge, StateChip } from './ConnectorRow';
6
- export { ConnectorDetail, ConnectorJourney, ConnectorHeading } from './ConnectorDetail';
6
+ export { ConnectorDetail, ConnectorJourney, ConnectorHeading, hasOperatingSettings } from './ConnectorDetail';
7
+ export { useConnectorOAuthReturn, readConnectorOAuthReturn, urlWithoutOAuthReturn, oauthFailureMessage, OAUTH_FAILURE_REASONS, } from './oauth-return';
8
+ export type { ConnectorOAuthReturn, ConnectorOAuthFailureReason } from './oauth-return';
9
+ export { ConnectorRuns, useConnectorRuns, hasRunHistory } from './ConnectorRuns';
10
+ export { ConnectorSyncActions } from './ConnectorSyncActions';
11
+ export { ConnectorDeliveries } from './ConnectorDeliveries';
12
+ export type { ConnectorRunsState } from './ConnectorRuns';
7
13
  export { ConnectorMark } from './ConnectorMark';
8
14
  export { useConnectors, useConnectorCatalog } from './useConnectors';
15
+ export { loadConnectorIndex } from './connector-sources';
16
+ export type { ConnectorIndex } from './connector-sources';
17
+ export { searchConnectors, hasDestination, isConnectorState } from './connector-search';
18
+ export type { ConnectorSuggestion, ConnectorSuggestionState } from './connector-search';
9
19
  export { ConnectorsPanel, openConnectorsPanel, useConnectorsPanelAvailable } from './ConnectorsPanel';
10
- export { buildConnectorList, filterConnectors, sortConnectors, connectorRoute, CATEGORY_LABELS, } from './model';
11
- export type { UnifiedConnector, ConnectorState, ConnectorFilter, AgentGrant, CatalogConnector, InstalledConnector, } from './model';
20
+ export { CredentialSinkMissingError, isSecretField, needsCredentialSink, probeConnection, splitConnectorValues, submitConnection, } from './credentials';
21
+ export type { NonSecretValues } from './credentials';
22
+ export { buildConnectorList, filterConnectors, sortConnectors, connectorRoute, connectorSubscriptions, categoryLabel, inCategories, CATEGORY_LABELS, } from './model';
23
+ export type { UnifiedConnector, ConnectorState, ConnectorFilter, ConnectorSubscription, AgentGrant, CatalogConnector, InstalledConnector, } from './model';
12
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/connect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAC3E,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACpF,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAA;AACrG,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,eAAe,GAChB,MAAM,SAAS,CAAA;AAChB,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf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AAE,MAAM,oBAAoB,CAAA;AACvF,YAAY,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AACvF,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAA;AACrG,OAAO,EACL,0BAA0B,EAC1B,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,eAAe,CAAA;AACtB,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,eAAe,GAChB,MAAM,SAAS,CAAA;AAChB,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,UAAU,EACV,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,SAAS,CAAA"}
@@ -1,4 +1,5 @@
1
- import type { ConnectorDefinition, ConnectorPlane, ConnectorDirection, ConnectorAgentTool } from '@fayz-ai/core';
1
+ import type { ConnectorCategory, ConnectorDefinition, ConnectorPermission, ConnectorPlane, ConnectorDirection, ConnectorAgentTool, ConnectorInvocation } from '@fayz-ai/core';
2
+ import { type SdkIntegration } from './connector-map.generated';
2
3
  /**
3
4
  * One list, one noun.
4
5
  *
@@ -21,20 +22,33 @@ import type { ConnectorDefinition, ConnectorPlane, ConnectorDirection, Connector
21
22
  */
22
23
  export type { ConnectorPlane, ConnectorDirection, ConnectorAgentTool };
23
24
  /**
24
- * How far along the journey a connector is. The distinction between `ready`,
25
- * `catalog` and `soon` is the one worth being strict about: collapsing them is
26
- * how a catalogue turns into a promise, because only `ready` has somewhere real
27
- * to send the user.
25
+ * How far along the journey a connector is.
26
+ *
27
+ * Every state is about a connector THIS app backs. Rows for what the platform
28
+ * *could* build were the defect — see {@link buildConnectorList} — and no state
29
+ * here may bring them back.
30
+ *
31
+ * `needs_setup` is not a fourth kind of "maybe connected": the authorization
32
+ * happened and nothing about it needs redoing. It exists because the connect
33
+ * step stopped asking for operational configuration, so there is now a real gap
34
+ * between "authorized" and "able to work" — and a carrier that cannot quote
35
+ * because nobody chose an origin postcode must not read as ready. The truth
36
+ * lives in `plg_connections.status = 'pending'`; this is its name in the UI.
37
+ *
38
+ * These tokens are not only rendered — they are the assistant's vocabulary too.
39
+ * {@link ConnectorSuggestionState} is this union plus the two shelf answers, and
40
+ * `findConnectors` puts the same word on the wire for a model to read, which is
41
+ * what makes "the tool and the screen never disagree" a fact about the types
42
+ * rather than something to keep in sync. Hence `needs_setup` and not
43
+ * `needs-setup`: its siblings over there are `soon` and `needs_module`.
28
44
  */
29
45
  export type ConnectorState =
30
46
  /** Live — granted (inbound) or authorized (outbound). */
31
47
  'connected'
48
+ /** Authorized, and unable to work until a required-to-operate setting is chosen. */
49
+ | 'needs_setup'
32
50
  /** Installed in this app: a plugin here contributes it, so it can be connected now. */
33
- | 'ready'
34
- /** The platform has it built, but this app lacks the plugin that hosts it. */
35
- | 'catalog'
36
- /** A catalogue entry with nothing behind it yet. */
37
- | 'soon';
51
+ | 'ready';
38
52
  export interface UnifiedConnector {
39
53
  /** Stable row key — connector id, catalog slug, or grant id. */
40
54
  id: string;
@@ -48,19 +62,25 @@ export interface UnifiedConnector {
48
62
  /** The plane it is running on right now (only meaningful when connected). */
49
63
  activePlane?: ConnectorPlane;
50
64
  state: ConnectorState;
65
+ /** Setting keys still to be chosen, when `state` is 'needs_setup'. Keys only. */
66
+ missingSettings?: string[];
51
67
  hostPluginId?: string;
52
68
  category?: string;
53
69
  /** Lucide icon name (installed connectors). */
54
70
  icon?: string;
55
71
  /** Brand mark from the catalogue or the granting client. */
56
72
  logoUrl?: string;
57
- /** Canonical entities the connector touches. */
73
+ /** Canonical entities the connector touches — derived from `permissions`. */
58
74
  entities?: string[];
75
+ /** What the connector declared it needs access to, and why. Consent view's source. */
76
+ permissions?: ConnectorPermission[];
59
77
  /** How many record types it reaches, when the source only counts them. */
60
78
  entityCount?: number;
61
79
  /** Tools the assistant gains — declared (outbound) or granted (inbound). */
62
80
  agentTools?: ConnectorAgentTool[];
63
81
  detail?: string;
82
+ /** What is wrong with a live connection, when the connector enumerates it. */
83
+ issues?: string[];
64
84
  docsUrl?: string;
65
85
  builtIn?: boolean;
66
86
  revocable?: boolean;
@@ -107,45 +127,199 @@ export interface AgentGrant {
107
127
  tools: string[];
108
128
  };
109
129
  }
110
- /** A row of the Fayz connector directory. */
130
+ /** A row of the Fayz connector directory — read here for copy and brand mark only. */
111
131
  export interface CatalogConnector {
112
132
  slug: string;
113
133
  name: string;
114
134
  description?: string;
115
135
  category?: string;
136
+ /** Builder-audience flag ("the Fayz panel has this wired"). Never a tenant signal. */
116
137
  enabled?: boolean;
117
138
  logoUrl?: string;
118
139
  iconUrl?: string;
119
- /** Planes the platform declares for this provider, when it knows. */
120
- planes?: ConnectorPlane[];
121
140
  }
122
- export declare const CATEGORY_LABELS: Record<string, string>;
123
- /** The four the product leads with; the rest follow, in catalogue order. */
124
- export declare const FEATURED: string[];
141
+ /**
142
+ * Every category, in the tenant's language.
143
+ *
144
+ * Keyed by `ConnectorCategory` and not `string`, so the compiler is what catches
145
+ * the next shelf the catalogue adds. This map trailed the catalogue by five
146
+ * entries when M6 opened — `marketplace`, `crm`, `banking`, `local` and
147
+ * `courses` all rendered no badge — and nothing failed, which is exactly the
148
+ * failure mode a `Record<string, string>` guarantees.
149
+ */
150
+ export declare const CATEGORY_LABELS: Record<ConnectorCategory, string>;
151
+ /**
152
+ * The badge text for a category, or nothing.
153
+ *
154
+ * Still tolerant of an unknown string at runtime: a connector definition may
155
+ * arrive from a published third-party package built against an older core, and
156
+ * a raw `logistics` in front of a salon owner reads as a bug while a missing
157
+ * badge costs nothing.
158
+ */
159
+ export declare function categoryLabel(category?: string): string | undefined;
125
160
  /** An installed connector plus the status the hub already resolved for it. */
126
161
  export interface InstalledConnector {
127
162
  definition: ConnectorDefinition;
128
163
  connected?: boolean;
129
164
  detail?: string;
165
+ /** Everything wrong with the live connection, when there is more than one thing. */
166
+ issues?: string[];
130
167
  /** Plane reported by `getStatus()`; falls back to the preferred one. */
131
168
  plane?: ConnectorPlane;
169
+ /** Connected, waiting on a required-to-operate setting. */
170
+ needsSetup?: boolean;
171
+ /** Which setting keys are missing. Keys only. */
172
+ missingSettings?: string[];
132
173
  }
133
174
  /**
134
- * Merge the three sources into the single list both surfaces render.
175
+ * The catalogue slug a connector joins on.
176
+ *
177
+ * The id names the implementation and the slug names the provider; they are
178
+ * only usually the same word. `plugbank` IS the directory's `tecnospeed` — and
179
+ * until the definition said so, that row looked up a slug that is not there and
180
+ * rendered a grey plug next to a household brand.
181
+ */
182
+ export declare function connectorSlug(def: Pick<ConnectorDefinition, 'id' | 'catalogSlug'>): string;
183
+ /**
184
+ * Merge the sources into the single list both surfaces render.
185
+ *
186
+ * A row exists if and only if something in THIS app backs it: an installed
187
+ * `ConnectorDefinition`, or a grant somebody approved. The Fayz catalogue is
188
+ * enrichment and nothing else — it lends an installed connector its localized
189
+ * copy and its brand mark, and contributes no row of its own.
135
190
  *
136
- * Installed connectors win over their catalogue twin — the catalogue only
137
- * lends them a brand mark — because the installed one is the copy with real
138
- * verbs behind it.
191
+ * It used to. The catalogue is the *builder* directory: `enabled` there means
192
+ * "the Fayz panel has this wired for a builder org" (its Supabase row is about
193
+ * provisioning an app's database), and reading that flag from a tenant screen
194
+ * offered Supabase, Anthropic and Google Analytics to the owner of a salon.
195
+ * An audience flag consumed audience-blind is not a filter problem — the rows
196
+ * were never addressed to this reader.
139
197
  */
140
198
  export declare function buildConnectorList(input: {
141
199
  installed?: InstalledConnector[];
142
200
  grants?: AgentGrant[];
143
201
  catalog?: CatalogConnector[];
144
202
  }): UnifiedConnector[];
145
- /** Connected first, then what can be connected here, then the catalogue. */
203
+ /** Connected first, then what can be connected here; alphabetical within each. */
146
204
  export declare function sortConnectors(list: UnifiedConnector[]): UnifiedConnector[];
205
+ /** One event a live connector says it listens to, with the reaction it owns. */
206
+ export interface ConnectorSubscription {
207
+ /** Exact key of a managed automation, or the raw pattern when none covers it. */
208
+ key: string;
209
+ /** What the tenant is told happens — only for an automation the connector owns. */
210
+ label?: string;
211
+ }
212
+ /**
213
+ * What a connector listens to, once it is live.
214
+ *
215
+ * Empty until connected on purpose: a subscription is a fact about a running
216
+ * connection, and listing it next to a connect button would read as a promise
217
+ * the app has not made yet.
218
+ */
219
+ export declare function connectorSubscriptions(connector: UnifiedConnector): ConnectorSubscription[];
220
+ /** Live — authorized, whether or not it is fully configured. */
221
+ export declare function isLive(state: ConnectorState): boolean;
222
+ /**
223
+ * "Acionado em quais momentos" — the two answers, kept apart.
224
+ *
225
+ * `calls` are invocations that exist in code and may be described plainly.
226
+ * `events` are subscriptions, which the platform does not dispatch yet, so the
227
+ * copy next to them says "ouve" and never "reage". Splitting them here rather
228
+ * than in the component is what keeps that distinction assertable.
229
+ *
230
+ * Unlike {@link connectorSubscriptions}, this answers before the connection
231
+ * exists: it describes what the connector IS, which is what step 1 is for.
232
+ */
233
+ export declare function connectorMoments(connector: UnifiedConnector): {
234
+ calls: ConnectorInvocation[];
235
+ events: ConnectorSubscription[];
236
+ };
237
+ /**
238
+ * A slug a module put on the shelf, and cannot be connected right now.
239
+ *
240
+ * Deliberately NOT a {@link UnifiedConnector}: there is no connection, no
241
+ * status to probe and nothing to click, and giving it a `state` would be the
242
+ * third state #89 deleted — the one that turned "the platform could build this"
243
+ * into a row a salon owner was invited to press. What it carries instead is
244
+ * why: a module that is not here, or an integration that is not built yet.
245
+ */
246
+ export interface ShelfIntegration {
247
+ id: string;
248
+ slug: string;
249
+ name: string;
250
+ description?: string;
251
+ category?: string;
252
+ icon?: string;
253
+ logoUrl?: string;
254
+ planes?: ConnectorPlane[];
255
+ direction?: ConnectorDirection;
256
+ /** Plugin id of the module that brings it — labelled through i18n. */
257
+ moduleId: string;
258
+ /** Whether that module is mounted in this build. */
259
+ moduleInstalled: boolean;
260
+ /** `available` — implemented, waiting on the module. `soon` — declared, not built. */
261
+ status: 'available' | 'soon';
262
+ }
263
+ /**
264
+ * The rows "Adicionar conector" can offer: everything an installed plugin backs.
265
+ *
266
+ * What it drops is a granted assistant — that arrives by approving a consent
267
+ * screen, not by being added, and it is already in the list behind the panel.
268
+ * The tell is having no `definition`, NOT `direction`: direction is which side
269
+ * reaches for the other, and filtering on it silently hid Bling, PlugBank and
270
+ * RankLayer — three connectors an installed plugin ships and a shopkeeper came
271
+ * here to add.
272
+ */
273
+ export declare function addableConnectors(list: UnifiedConnector[]): UnifiedConnector[];
274
+ /**
275
+ * Narrow any connector-ish list to the categories a section is about.
276
+ *
277
+ * One function for both the installed rows and the shelf, because the bug it
278
+ * fixes was the two disagreeing: "Provedores de pagamento" filtered its own
279
+ * list by `payments` and then opened an add panel that offered the ERP and the
280
+ * carrier. No categories means no narrowing — the hub is the whole app.
281
+ *
282
+ * A row with no category is dropped when a scope is given: it cannot be shown
283
+ * to belong, and guessing is how a gateway list grows a CRM.
284
+ */
285
+ export declare function inCategories<T extends {
286
+ category?: string;
287
+ }>(list: T[], categories?: string[]): T[];
288
+ /**
289
+ * Everything the modules put within reach that is not already a row above.
290
+ *
291
+ * The source is {@link SDK_INTEGRATIONS}, generated from the plugin manifests
292
+ * in this repo — never the platform catalogue. The catalogue is a builder
293
+ * directory with no notion of a host plugin, and reading it here is how the
294
+ * owner of a salon was once offered Supabase and Anthropic. What decides is the
295
+ * module: having CRM is what makes Kommo relevant, having Financeiro is what
296
+ * makes AbacatePay relevant. A slug reaches this list because a manifest asked
297
+ * for it, and for no other reason — asserted, not assumed.
298
+ *
299
+ * The catalogue is still read, for exactly two things: the localized name and
300
+ * the brand mark, joined by slug. It contributes no row.
301
+ *
302
+ * One row per slug, even though a slug can be on two modules' shelves (Stripe
303
+ * is money-in for Loja, Financeiro and Cursos). The winner is the module this
304
+ * app actually has, then the one that already implements it — a shopkeeper does
305
+ * not care which module technically hosts it, only whether it is within reach.
306
+ */
307
+ export declare function shelfIntegrations(input: {
308
+ present: UnifiedConnector[];
309
+ /** Plugin ids mounted in this build — what tells "em breve" from "outro módulo". */
310
+ installedModules?: Iterable<string>;
311
+ /** The Fayz directory, for the localized name and the brand mark. */
312
+ catalog?: CatalogConnector[];
313
+ map?: readonly SdkIntegration[];
314
+ }): ShelfIntegration[];
315
+ /** Declared by a module this app HAS, and not built yet — informational. */
316
+ export declare function comingSoonHere(list: ShelfIntegration[]): ShelfIntegration[];
317
+ /** Implemented or promised by a module this app was not built with. */
318
+ export declare function withAnotherModule(list: ShelfIntegration[]): ShelfIntegration[];
319
+ /** Same free-text match the installed list uses, so one query filters both. */
320
+ export declare function filterAvailable(list: ShelfIntegration[], query?: string): ShelfIntegration[];
147
321
  export type ConnectorFilter = 'all' | 'connected' | 'agentic' | 'sync' | 'inbound' | 'outbound';
148
322
  export declare function filterConnectors(list: UnifiedConnector[], filter: ConnectorFilter, query?: string): UnifiedConnector[];
149
323
  /** Deep link to where a connector is actually configured. */
150
- export declare function connectorRoute(connector: UnifiedConnector): string;
324
+ export declare function connectorRoute(connector: Pick<UnifiedConnector, 'hostPluginId'>): string;
151
325
  //# sourceMappingURL=model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/components/connect/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAGhH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA;AAEtE;;;;;GAKG;AACH,MAAM,MAAM,cAAc;AACxB,yDAAyD;AACvD,WAAW;AACb,uFAAuF;GACrF,OAAO;AACT,8EAA8E;GAC5E,SAAS;AACX,oDAAoD;GAClD,MAAM,CAAA;AAEV,MAAM,WAAW,gBAAgB;IAC/B,gEAAgE;IAChE,EA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AA6D;AAC7D,wBAAgB,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,cAAc,CAAC,GAAG,MAAM,CAIxF"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Every reason the platform's redirect route can give for a failure.
3
+ *
4
+ * A closed set, and an allow-list rather than a formatting rule: the value
5
+ * arrives in a query string anyone can type, and it is about to select a
6
+ * sentence shown to a shop owner. A slug that is not on this list is not
7
+ * rendered at all — `token_exchange_failed` on a merchant's screen is noise
8
+ * either way, and an arbitrary string from the URL bar would be worse.
9
+ */
10
+ export declare const OAUTH_FAILURE_REASONS: readonly ["config_missing", "invalid_state", "expired_state", "not_a_member", "provider_denied", "missing_code", "token_exchange_failed", "token_incomplete", "store_failed", "unexpected"];
11
+ export type ConnectorOAuthFailureReason = (typeof OAUTH_FAILURE_REASONS)[number];
12
+ export interface ConnectorOAuthReturn {
13
+ connectorId: string;
14
+ status: 'connected' | 'error';
15
+ /**
16
+ * The platform's own verdict, from {@link OAUTH_FAILURE_REASONS}. Generic
17
+ * callbacks only, and never rendered as-is — see {@link oauthFailureMessage}.
18
+ */
19
+ reason?: ConnectorOAuthFailureReason;
20
+ /**
21
+ * The provider's own words, when a legacy per-connector callback passed any.
22
+ *
23
+ * Kept apart from `reason` because they are different kinds of thing: the
24
+ * calendar function has always written prose a person can read ("acesso
25
+ * negado"), and collapsing the two would either print a slug or throw away a
26
+ * sentence that was already in the reader's language.
27
+ */
28
+ message?: string;
29
+ }
30
+ /** What the callback said, or null when this is an ordinary page load. */
31
+ export declare function readConnectorOAuthReturn(search: string): ConnectorOAuthReturn | null;
32
+ /** Every query key this module owns — what has to leave the URL once it is read. */
33
+ export declare function oauthReturnParams(): string[];
34
+ /**
35
+ * The same URL with the markers gone.
36
+ *
37
+ * The hash is preserved untouched — it is the route the person was on before
38
+ * they left for Google, and losing it would land them somewhere else after a
39
+ * successful grant.
40
+ */
41
+ export declare function urlWithoutOAuthReturn(href: string): string;
42
+ /**
43
+ * What to tell the person, in their language.
44
+ *
45
+ * Three sources, in order of how much they know: the platform's slug becomes a
46
+ * translated sentence; a legacy callback's prose is already a sentence and is
47
+ * passed through; anything else is the honest generic failure. The second
48
+ * `t(key) !== key` guard is belt and braces — a slug that reached the closed set
49
+ * before someone wrote its copy must still not print as `store_failed`.
50
+ */
51
+ export declare function oauthFailureMessage(t: (key: string) => string, result: Pick<ConnectorOAuthReturn, 'reason' | 'message'>): string;
52
+ /**
53
+ * Mounted once, in the shell: a consent screen can return to any route.
54
+ *
55
+ * The marker is consumed exactly once — `replaceState` strips it before the
56
+ * panel opens, so a refresh is a refresh and not a second "conectado".
57
+ */
58
+ export declare function useConnectorOAuthReturn(): void;
59
+ //# sourceMappingURL=oauth-return.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-return.d.ts","sourceRoot":"","sources":["../../../src/components/connect/oauth-return.ts"],"names":[],"mappings":"AA2CA;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,6LAWxB,CAAA;AAEV,MAAM,MAAM,2BAA2B,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAA;AAIhF,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,WAAW,GAAG,OAAO,CAAA;IAC7B;;;OAGG;IACH,MAAM,CAAC,EAAE,2BAA2B,CAAA;IACpC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,0EAA0E;AAC1E,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CA2BpF;AAED,oFAAoF;AACpF,wBAAgB,iBAAiB,IAAI,MAAM,EAAE,CAI5C;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI1D;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,EAC1B,MAAM,EAAE,IAAI,CAAC,oBAAoB,EAAE,QAAQ,GAAG,SAAS,CAAC,GACvD,MAAM,CAOR;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAyB9C"}
@@ -1,5 +1,18 @@
1
1
  import { type CatalogConnector, type UnifiedConnector } from './model';
2
+ export declare function loadCatalog(): Promise<CatalogConnector[]>;
2
3
  export declare function useConnectorCatalog(): CatalogConnector[] | null;
4
+ /** Every connector list on screen re-reads. Safe to call from anywhere. */
5
+ export declare function refreshConnectors(): void;
6
+ /**
7
+ * Plugin ids mounted in this build.
8
+ *
9
+ * What tells "não dá pra ligar ainda" from "não tem esse módulo": both are inert
10
+ * rows on the same shelf, and only the module the app actually has decides which
11
+ * sentence is true. Inactive plugins count — a module switched off for a tenant
12
+ * is still in the app, and offering it as something a new build would bring is a
13
+ * lie the tenant can disprove from the settings screen.
14
+ */
15
+ export declare function useInstalledModuleIds(): string[];
3
16
  export interface ConnectorsView {
4
17
  connectors: UnifiedConnector[] | null;
5
18
  error: string | null;
@@ -12,13 +25,14 @@ export interface ConnectorsView {
12
25
  }
13
26
  /**
14
27
  * Builds the unified list: inbound grants (what reaches this org) + installed
15
- * connectors (what this app reaches) + the Fayz catalogue (what it could).
28
+ * connectors (what this app reaches). The catalogue contributes no row — it only
29
+ * lends the connectors that ARE installed their localized copy and brand mark.
16
30
  */
17
31
  export declare function useConnectors(options?: {
18
32
  hostPluginId?: string;
19
33
  /** Include the inbound grants — the plugin-scoped view leaves them out. */
20
34
  includeGrants?: boolean;
21
- /** Include catalogue rows this app can't connect yet. */
35
+ /** Enrich installed connectors with the catalogue's localized copy and mark. */
22
36
  includeCatalog?: boolean;
23
37
  }): ConnectorsView;
24
38
  //# sourceMappingURL=useConnectors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useConnectors.d.ts","sourceRoot":"","sources":["../../../src/components/connect/useConnectors.ts"],"names":[],"mappings":"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AAM,EAAE,MAAM,IAAI,CAAA;IAClB,gEAAgE;IAChE,WAAW,EAAE,CAAC,SAAS,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3D,+EAA+E;IAC/E,cAAc,EAAE,OAAO,CAAA;IACvB,WAAW,EAAE,OAAO,CAAA;CACrB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE;IACrC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,2EAA2E;IAC3E,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gFAAgF;IAChF,cAAc,CAAC,EAAE,OAAO,CAAA;CACpB,GAAG,cAAc,CAyGtB"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * When something happened, in the reader's language.
3
+ *
4
+ * Both formatters used to be private to ConnectorDetail, and the relative one
5
+ * had "agora" and "há 2 h" written into it — correct for the only locale that
6
+ * had a reader, and a lie in the en bundle next to it. The translator is passed
7
+ * in rather than hooked so the same functions work inside a `.map` and inside a
8
+ * test with no provider mounted.
9
+ */
10
+ /** Same shape core's `useTranslation` hands back. */
11
+ export type Translate = (key: string, params?: Record<string, string | number>) => string;
12
+ export declare function formatDate(iso: string): string;
13
+ /** Full stamp, for the title of something showing a relative time. */
14
+ export declare function formatDateTime(iso: string): string;
15
+ /**
16
+ * "há 2 h" up to a month, and a date after that.
17
+ *
18
+ * A month-old run is answered with the day it happened: nobody counts back 47
19
+ * days, and "is it working?" stopped being the question long before then.
20
+ */
21
+ export declare function formatRelative(iso: string, t: Translate): string;
22
+ //# sourceMappingURL=when.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"when.d.ts","sourceRoot":"","sources":["../../../src/components/connect/when.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,qDAAqD;AACrD,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAA;AAEzF,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM,CAUhE"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectorsHub.d.ts","sourceRoot":"","sources":["../../../src/components/plugins/ConnectorsHub.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA2BzB,wBAAgB,aAAa,CAAC,EAAE,YAAY,EAAE,EAAE;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,qBA0DvE"}
1
+ {"version":3,"file":"ConnectorsHub.d.ts","sourceRoot":"","sources":["../../../src/components/plugins/ConnectorsHub.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAkCzB,wBAAgB,aAAa,CAAC,EAAE,YAAY,EAAE,EAAE;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,qBAoGvE"}