@dolfinhos/studio 0.1.0 → 0.2.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.
- package/dist/index.cjs +273 -155
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -3
- package/dist/index.d.ts +23 -3
- package/dist/index.js +270 -153
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -142,6 +142,18 @@ interface Fact {
|
|
|
142
142
|
createdAt: string;
|
|
143
143
|
createdBy: Actor | null;
|
|
144
144
|
}
|
|
145
|
+
/** Provedor de IA e se a empresa já cadastrou a chave (só o final dela vem do servidor). */
|
|
146
|
+
interface ProviderCredential {
|
|
147
|
+
name: string;
|
|
148
|
+
label: string;
|
|
149
|
+
description?: string;
|
|
150
|
+
/** O que acontece com a empresa sem chave (definido pela aplicação). */
|
|
151
|
+
whenMissing?: string;
|
|
152
|
+
configured: boolean;
|
|
153
|
+
last4?: string;
|
|
154
|
+
updatedAt?: string;
|
|
155
|
+
updatedBy?: string;
|
|
156
|
+
}
|
|
145
157
|
declare class StudioError extends Error {
|
|
146
158
|
readonly status: number;
|
|
147
159
|
constructor(message: string, status: number);
|
|
@@ -189,6 +201,11 @@ declare function createStudioClient(options?: StudioClientOptions): {
|
|
|
189
201
|
forget: (id: string) => Promise<{
|
|
190
202
|
ok: true;
|
|
191
203
|
}>;
|
|
204
|
+
credentials: () => Promise<ProviderCredential[]>;
|
|
205
|
+
saveCredential: (name: string, value: string) => Promise<ProviderCredential>;
|
|
206
|
+
removeCredential: (name: string) => Promise<{
|
|
207
|
+
ok: true;
|
|
208
|
+
}>;
|
|
192
209
|
};
|
|
193
210
|
type StudioClient = ReturnType<typeof createStudioClient>;
|
|
194
211
|
interface StudioLabels {
|
|
@@ -252,6 +269,9 @@ declare function BehaviorSettings({ currency }: {
|
|
|
252
269
|
currency?: string | null;
|
|
253
270
|
}): react.JSX.Element;
|
|
254
271
|
|
|
272
|
+
/** As chaves de API que esta empresa usa nos provedores de IA. Cada empresa paga o próprio uso. */
|
|
273
|
+
declare function ProviderKeys(): react.JSX.Element;
|
|
274
|
+
|
|
255
275
|
/** Documentos que o assistente e o bot consultam: perguntas frequentes, políticas, explicações. */
|
|
256
276
|
declare function KnowledgeBase(): react.JSX.Element;
|
|
257
277
|
|
|
@@ -262,7 +282,7 @@ declare function MyMemory({ subject }: {
|
|
|
262
282
|
subject: Pick<FactSubject, 'type' | 'id'>;
|
|
263
283
|
}): react.JSX.Element;
|
|
264
284
|
|
|
265
|
-
type StudioSection = 'approvals' | 'behavior' | 'automations' | 'knowledge' | 'memory' | 'usage' | 'audit';
|
|
285
|
+
type StudioSection = 'approvals' | 'behavior' | 'automations' | 'knowledge' | 'memory' | 'usage' | 'keys' | 'audit';
|
|
266
286
|
interface DolfinhosStudioProps {
|
|
267
287
|
/** Quais abas mostrar, nesta ordem. Padrão: todas. */
|
|
268
288
|
sections?: StudioSection[];
|
|
@@ -297,5 +317,5 @@ interface StudioProviderProps extends StudioClientOptions {
|
|
|
297
317
|
*/
|
|
298
318
|
declare function StudioProvider({ children, endpoint, headers, fetch, labels, locale, navigate }: StudioProviderProps): react.JSX.Element;
|
|
299
319
|
|
|
300
|
-
export { ApprovalsInbox, AuditLog, AutomationsEditor, BehaviorSettings, DolfinhosStudio, KnowledgeBase, MemoryBrowser, MyMemory, StudioContextProvider, StudioError, StudioProvider, UsageReport, createStudioClient, useResource, useStudio };
|
|
301
|
-
export type { Actor, ApprovalItem, ApprovalsInboxProps, Audience, AuditRecord, Automation, Capability, DolfinhosStudioProps, EventInfo, Fact, FactSubject, Kind, KnowledgeDoc, KnowledgeHit, Mode, PendingApproval, Risk, Rule, Settings, StudioClient, StudioClientOptions, StudioLabels, StudioProviderProps, StudioSection, UsageSummary, UsageTotals };
|
|
320
|
+
export { ApprovalsInbox, AuditLog, AutomationsEditor, BehaviorSettings, DolfinhosStudio, KnowledgeBase, MemoryBrowser, MyMemory, ProviderKeys, StudioContextProvider, StudioError, StudioProvider, UsageReport, createStudioClient, useResource, useStudio };
|
|
321
|
+
export type { Actor, ApprovalItem, ApprovalsInboxProps, Audience, AuditRecord, Automation, Capability, DolfinhosStudioProps, EventInfo, Fact, FactSubject, Kind, KnowledgeDoc, KnowledgeHit, Mode, PendingApproval, ProviderCredential, Risk, Rule, Settings, StudioClient, StudioClientOptions, StudioLabels, StudioProviderProps, StudioSection, UsageSummary, UsageTotals };
|
package/dist/index.d.ts
CHANGED
|
@@ -142,6 +142,18 @@ interface Fact {
|
|
|
142
142
|
createdAt: string;
|
|
143
143
|
createdBy: Actor | null;
|
|
144
144
|
}
|
|
145
|
+
/** Provedor de IA e se a empresa já cadastrou a chave (só o final dela vem do servidor). */
|
|
146
|
+
interface ProviderCredential {
|
|
147
|
+
name: string;
|
|
148
|
+
label: string;
|
|
149
|
+
description?: string;
|
|
150
|
+
/** O que acontece com a empresa sem chave (definido pela aplicação). */
|
|
151
|
+
whenMissing?: string;
|
|
152
|
+
configured: boolean;
|
|
153
|
+
last4?: string;
|
|
154
|
+
updatedAt?: string;
|
|
155
|
+
updatedBy?: string;
|
|
156
|
+
}
|
|
145
157
|
declare class StudioError extends Error {
|
|
146
158
|
readonly status: number;
|
|
147
159
|
constructor(message: string, status: number);
|
|
@@ -189,6 +201,11 @@ declare function createStudioClient(options?: StudioClientOptions): {
|
|
|
189
201
|
forget: (id: string) => Promise<{
|
|
190
202
|
ok: true;
|
|
191
203
|
}>;
|
|
204
|
+
credentials: () => Promise<ProviderCredential[]>;
|
|
205
|
+
saveCredential: (name: string, value: string) => Promise<ProviderCredential>;
|
|
206
|
+
removeCredential: (name: string) => Promise<{
|
|
207
|
+
ok: true;
|
|
208
|
+
}>;
|
|
192
209
|
};
|
|
193
210
|
type StudioClient = ReturnType<typeof createStudioClient>;
|
|
194
211
|
interface StudioLabels {
|
|
@@ -252,6 +269,9 @@ declare function BehaviorSettings({ currency }: {
|
|
|
252
269
|
currency?: string | null;
|
|
253
270
|
}): react.JSX.Element;
|
|
254
271
|
|
|
272
|
+
/** As chaves de API que esta empresa usa nos provedores de IA. Cada empresa paga o próprio uso. */
|
|
273
|
+
declare function ProviderKeys(): react.JSX.Element;
|
|
274
|
+
|
|
255
275
|
/** Documentos que o assistente e o bot consultam: perguntas frequentes, políticas, explicações. */
|
|
256
276
|
declare function KnowledgeBase(): react.JSX.Element;
|
|
257
277
|
|
|
@@ -262,7 +282,7 @@ declare function MyMemory({ subject }: {
|
|
|
262
282
|
subject: Pick<FactSubject, 'type' | 'id'>;
|
|
263
283
|
}): react.JSX.Element;
|
|
264
284
|
|
|
265
|
-
type StudioSection = 'approvals' | 'behavior' | 'automations' | 'knowledge' | 'memory' | 'usage' | 'audit';
|
|
285
|
+
type StudioSection = 'approvals' | 'behavior' | 'automations' | 'knowledge' | 'memory' | 'usage' | 'keys' | 'audit';
|
|
266
286
|
interface DolfinhosStudioProps {
|
|
267
287
|
/** Quais abas mostrar, nesta ordem. Padrão: todas. */
|
|
268
288
|
sections?: StudioSection[];
|
|
@@ -297,5 +317,5 @@ interface StudioProviderProps extends StudioClientOptions {
|
|
|
297
317
|
*/
|
|
298
318
|
declare function StudioProvider({ children, endpoint, headers, fetch, labels, locale, navigate }: StudioProviderProps): react.JSX.Element;
|
|
299
319
|
|
|
300
|
-
export { ApprovalsInbox, AuditLog, AutomationsEditor, BehaviorSettings, DolfinhosStudio, KnowledgeBase, MemoryBrowser, MyMemory, StudioContextProvider, StudioError, StudioProvider, UsageReport, createStudioClient, useResource, useStudio };
|
|
301
|
-
export type { Actor, ApprovalItem, ApprovalsInboxProps, Audience, AuditRecord, Automation, Capability, DolfinhosStudioProps, EventInfo, Fact, FactSubject, Kind, KnowledgeDoc, KnowledgeHit, Mode, PendingApproval, Risk, Rule, Settings, StudioClient, StudioClientOptions, StudioLabels, StudioProviderProps, StudioSection, UsageSummary, UsageTotals };
|
|
320
|
+
export { ApprovalsInbox, AuditLog, AutomationsEditor, BehaviorSettings, DolfinhosStudio, KnowledgeBase, MemoryBrowser, MyMemory, ProviderKeys, StudioContextProvider, StudioError, StudioProvider, UsageReport, createStudioClient, useResource, useStudio };
|
|
321
|
+
export type { Actor, ApprovalItem, ApprovalsInboxProps, Audience, AuditRecord, Automation, Capability, DolfinhosStudioProps, EventInfo, Fact, FactSubject, Kind, KnowledgeDoc, KnowledgeHit, Mode, PendingApproval, ProviderCredential, Risk, Rule, Settings, StudioClient, StudioClientOptions, StudioLabels, StudioProviderProps, StudioSection, UsageSummary, UsageTotals };
|